Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
cf724bc9
TT
12017-11-17 Tom Tromey <tom@tromey.com>
2
3 * symtab.h (enum symbol_subclass_kind): New.
4 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
5 Remove.
6 <subclass>: New member.
7 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
8 * rust-lang.c (rust_get_trait_object_pointer): Update.
9 * dwarf2read.c (read_func_scope): Update.
10 (read_variable): Update.
11
68e745e3
TT
122017-11-17 Tom Tromey <tom@tromey.com>
13
14 * dwarf2read.c (read_func_scope): Update.
15 * symtab.h (struct template_symbol): Derive from symbol.
16 <base>: Remove.
17
71a3c369
TT
182017-11-17 Tom Tromey <tom@tromey.com>
19
20 * symtab.h (struct symbol) <is_rust_vtable>: New member.
21 (struct rust_vtable_symbol): New.
22 (find_symbol_at_address): Declare.
23 * symtab.c (find_symbol_at_address): New function.
24 * symfile.h (struct quick_symbol_functions)
25 <find_compunit_symtab_by_address>: New member.
26 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
27 function.
28 (debug_sym_quick_functions): Link to
29 debug_qf_find_compunit_symtab_by_address.
30 * rust-lang.c (rust_get_trait_object_pointer): New function.
31 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
32 rust_get_trait_object_pointer.
33 * psymtab.c (psym_relocate): Clear psymbol_map.
34 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
35 functions.
36 (psym_functions): Link to psym_find_compunit_symtab_by_address.
37 * objfiles.h (struct objfile) <psymbol_map>: New member.
38 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
39 (process_die) <DW_TAG_variable>: New case. Call read_variable.
40 (rust_containing_type, read_variable): New functions.
41
7468702d
SM
422017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
45
37269bc9
SM
462017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
47
48 * common/filestuff.c: Include <algorithm>.
49 (open_fds): Change type to std::vector<int>.
50 (do_mark_open_fd): Adjust.
51 (unmark_fd_no_cloexec): Adjust.
52 (do_close): Adjust.
53
5c632425
SM
542017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
55
56 * breakpoint.c (output_thread_groups): Take an std::vector.
57 (print_one_breakpoint_location): Adjust.
58
ced9779b
JB
592017-11-17 Joel Brobecker <brobecker@adacore.com>
60
61 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
62 (ada_evaluate_subexp_for_cast): New function.
63 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
64 ada_evaluate_subexp_for_cast.
65 (ada_evaluate_subexp) <nosideret>: Replace code by call to
66 eval_skip_value.
67 * eval.c (evaluate_var_value): Make non-static.
68 (evaluate_var_msym_value, eval_skip_value): Likewise.
69 * value.h (evaluate_var_value, evaluate_var_msym_value)
70 (eval_skip_value): Declare.
71
b7e22850
JB
722017-11-16 Joel Brobecker <brobecker@adacore.com>
73
74 * ada-lang.c (ada_value_cast): Remove parameter "noside".
75 Update all callers.
76
9ccabccd
PA
772017-11-16 Pedro Alves <palves@redhat.com>
78
79 * python/py-unwind.c (pyuw_sniffer): Translate
80 PyExc_KeyboardInterrupt to a GDB Quit exception.
81
d930703d
PA
822017-11-16 Pedro Alves <palves@redhat.com>
83
84 * infrun.c (resume_cleanups): Delete.
85 (resume): No longer install a resume_cleanups cleanup nor call
86 QUIT.
87 (proceed): Pass the terminal to the inferior.
88 (keep_going_pass_signal): No longer install a resume_cleanups
89 cleanup.
90
38dc2859
PA
912017-11-16 Pedro Alves <palves@redhat.com>
92
93 * inf-loop.c (inferior_event_handler): Don't swallow the exception
94 if the prompt is blocked.
95
688fca4f
PA
962017-11-16 Pedro Alves <palves@redhat.com>
97
98 * breakpoint.c (insert_bp_location): Replace bp_err and
99 bp_err_message locals by a gdb_exception local.
100
e2c33ac7
PA
1012017-11-16 Pedro Alves <palves@redhat.com>
102
103 * inflow.c (scoped_ignore_sigttou): New class.
104 (child_terminal_ours_1, new_tty): Use it.
105
d7236961
UW
1062017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
107
108 * target-float.c (decimal_from_number): Add byte_order argument and
109 call match_endianness. Error if unknown floating-point type.
110 (decimal_to_number): Add byte_order argument and call match_endianness.
111 (decimal_from_longest): Update call. Do not call match_endianness.
112 (decimal_from_ulongest): Likewise.
113 (decimal_binop): Likewise.
114 (decimal_is_zero): Likewise.
115 (decimal_compare): Likewise.
116 (decimal_convert): Likewise.
117
d8ae99a7
PM
1182017-11-16 Phil Muldoon <pmuldoon@redhat.com>
119
120 * python/python.c (gdbpy_rbreak): New function.
121 * NEWS: Document Python rbreak feature.
122
c632b645
YQ
1232017-11-16 Yao Qi <yao.qi@linaro.org>
124
125 * features/tic6x-c62x.xml: Remove.
126 * features/tic6x-c64x.xml: Remove.
127 * features/tic6x-c64xp.xml: Remove.
128
a014b87a
JB
1292017-11-15 John Baldwin <jhb@FreeBSD.org>
130
131 * symtab.h: Include <array>.
132
94765011
JB
1332017-11-15 John Baldwin <jhb@FreeBSD.org>
134
135 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
136 (bsd_kvm_proc_cmd): Likewise.
137
625ad440
SM
1382017-11-15 Simon Marchi <simon.marchi@ericsson.com>
139
140 * tui/tui-win.c (window_name_completer): Replace VEC with
141 std::vector.
142
c0c11fa9
AC
1432017-11-15 Andrew Cagney <cagney@gnu.org>
144
145 * MAINTAINERS: Remove no-longer applicable entries.
146
34a7ebaf
AC
1472017-11-15 Andrew Cagney <cagney@gnu.org>
148
149 * MAINTAINERS: Move self to Past Maintainers.
150
5334ef39
YQ
1512017-11-15 Yao Qi <yao.qi@linaro.org>
152
153 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
154 * features/nios2-linux.c: Remove.
155 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
156 initialize_tdesc_nios2_linux.
157
a714b0d6
YQ
1582017-11-15 Yao Qi <yao.qi@linaro.org>
159
160 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
161 M68HC11_LAST_HARD_REG + 1.
162
92ffd475
PC
1632017-11-14 Paul Carroll <pcarroll@codesourcery.com>
164
165 PR gdb/22388
166 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
167 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
168 Return TARGET_XFER_EOF if size of returned data is 0.
169
07431908
SM
1702017-11-14 Simon Marchi <simon.marchi@ericsson.com>
171
172 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
173 memory-map-selftests.c.
174 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
175 * memory-map.c (memory_map_start_memory): Fix computation of hi
176 address.
177 * unittests/memory-map-selftests.c: New file.
178
31432a67
JB
1792017-11-09 Joel Brobecker <brobecker@adacore.com>
180
181 * ada-lang.c: Fix some typos in the general command documenting
182 how Ada expressions are being evaluated and how their result
183 is printed.
184
e793c052
TT
1852017-11-09 Tom Tromey <tom@tromey.com>
186
187 * psymtab.c (psymbol_hash): Do not hash string contents.
188 (psymbol_compare): Add comment.
189
7e8835c5
TT
1902017-11-09 Tom Tromey <tom@tromey.com>
191
192 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
193
286acbb5
JB
1942017-11-08 Joel Brobecker <brobecker@adacore.com>
195
196 * ada-exp.y (write_var_from_sym): Remove parameter
197 "orig_left_context". Update all callers.
198
b44ec619
SM
1992017-11-08 Simon Marchi <simon.marchi@ericsson.com>
200
201 * tracepoint.h (class collection_list) <stringify>: Return
202 std::vector<std::string>.
203 (encode_actions_rsp): Change parameters to
204 std::vector<std::string> *.
205 * tracepoint.c (collection_list::stringify): Return
206 std::vector<std::string> and adjust accordingly.
207 (encode_actions_rsp): Changee parameters to
208 std::vector<std::string> and adjust accordingly.
209 * remote.c (free_actions_list),
210 free_actions_list_cleanup_wrapper): Remove.
211 (remote_download_tracepoint): Adjust to std::vector.
212
2f4732b0
TT
2132017-11-08 Tom Tromey <tom@tromey.com>
214
215 * dwarf2read.c (symbolp): Remove typedef.
216 (read_func_scope): Use std::vector.
217 (process_structure_scope): Use std::vector.
218
f9d67a22
PA
2192017-11-08 Pedro Alves <palves@redhat.com>
220
221 * ada-lang.c (ada_make_symbol_completion_list): Use
222 completion_skip_symbol.
223 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
224 (symbol_is_function_or_method(symbol*)): New.
225 (add_symtab_completions): Add complete_symbol_mode parameter. Use
226 completion_skip_symbol.
227 (default_collect_symbol_completion_matches_break_on): Use
228 completion_skip_symbol. Pass down mode.
229 (collect_file_symbol_completion_matches): Pass down mode.
230 * symtab.h (symbol_is_function_or_method): New declarations.
231 (completion_skip_symbol): New template function.
232
56d87ef7
PA
2332017-11-08 Pedro Alves <palves@redhat.com>
234
235 * linespec.c (iterate_over_all_matching_symtabs): Add
236 search_domain parameter. Pass it down to expand_symtabs_matching.
237 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
238 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
239 search_domain.
240 (add_all_symbol_names_from_pspace): Add search_domain parameter.
241 Pass it down.
242 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
243 symbols.
244 (add_matching_symbols_to_info): Add search_domain parameter. Pass
245 it down.
246
1b026119
PA
2472017-11-08 Pedro Alves <palves@redhat.com>
248
249 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
250 text_len locals and don't pass them down.
251 * symtab.c (completion_list_add_name): Remove
252 sym_text/sym_text_len parameters and adjust.
253 (completion_list_add_symbol, completion_list_add_msymbol)
254 (completion_list_objc_symbol, completion_list_add_fields)
255 (add_symtab_completions): Likewise.
256 (default_collect_symbol_completion_matches_break_on)
257 (collect_file_symbol_completion_matches): Remove sym_text_len
258 local and don't pass it down.
259 * symtab.h (completion_list_add_name): Remove
260 sym_text/sym_text_len parameters.
261
c62446b1
PA
2622017-11-08 Pedro Alves <palves@redhat.com>
263
264 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
265 unittests/lookup_name_info-selftests.c.
266 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
267 * cp-support.c: Include "selftest.h".
268 (cp_remove_params_1): Rename from cp_remove_params. Add
269 'require_param' parameter, and handle it.
270 (cp_remove_params): Reimplement.
271 (cp_remove_params_if_any): New.
272 (selftests::quote): New.
273 (selftests::check_remove_params): New.
274 (selftests::test_cp_remove_params): New.
275 (_initialize_cp_support): Install
276 selftests::test_cp_remove_params.
277 * cp-support.h (cp_remove_params_if_any): Declare.
278 * dwarf2read.c :Include "selftest.h".
279 (dw2_expand_symtabs_matching_symbol): Use
280 lookup_name_info::make_ignore_params.
281 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
282 (selftests::dw2_expand_symtabs_matching::string_or_null)
283 (selftests::dw2_expand_symtabs_matching::check_match)
284 (selftests::dw2_expand_symtabs_matching::test_symbols)
285 (selftests::dw2_expand_symtabs_matching::run_test): New.
286 (_initialize_dwarf2_read): Register
287 selftests::dw2_expand_symtabs_matching::run_test.
288 * psymtab.c (psym_expand_symtabs_matching): Use
289 lookup_name_info::make_ignore_params.
290 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
291 If the lookup name wants to ignore parameters, strip them.
292 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
293 code handling '('.
294 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
295 (default_collect_symbol_completion_matches_break_on): Don't try to
296 strip parameters.
297 * symtab.h (lookup_name_info::lookup_name_info): Add
298 'ignore_parameters' parameter.
299 (lookup_name_info::ignore_parameters)
300 (lookup_name_info::make_ignore_params): New methods.
301 (lookup_name_info::m_ignore_parameters): New field.
302 * unittests/lookup_name_info-selftests.c: New file.
303
61920122
PA
3042017-11-08 Pedro Alves <palves@redhat.com>
305
306 * dwarf2read.c (dw2_expand_marked_cus)
307 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
308 (dw2_expand_symtabs_matching): Move further below.
309 (dw2_expand_marked_cus): Reindent.
310
3f563c84
PA
3112017-11-08 Pedro Alves <palves@redhat.com>
312
313 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
314 (struct name_component): New.
315 (mapped_index::name_components): New field.
316 (mapped_index::symbol_name_at): New method.
317 (dwarf2_read_index): Call mapped_index ctor.
318 (dw2_map_matching_symbols): Add comment about name_components
319 table.
320 (dw2_expand_symtabs_matching): Factor part to...
321 (dw2_expand_symtabs_matching_symbol): ... this new function.
322 Build name components table, and lookup symbols in it before
323 calling the name matcher.
324 (dw2_expand_marked_cus): New, factored out from
325 dw2_expand_symtabs_matching.
326 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
327
b5ec771e
PA
3282017-11-08 Pedro Alves <palves@redhat.com>
329
330 * ada-lang.c (ada_encode): Rename to ..
331 (ada_encode_1): ... this. Add throw_errors parameter and handle
332 it.
333 (ada_encode): Reimplement.
334 (match_name): Delete, folded into full_name.
335 (resolve_subexp): No longer pass the encoded name to
336 ada_lookup_symbol_list.
337 (should_use_wild_match): Delete.
338 (name_match_type_from_name): New.
339 (ada_lookup_simple_minsym): Use lookup_name_info and the
340 language's symbol_name_matcher_ftype.
341 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
342 (ada_add_block_renamings): Adjust to use lookup_name_info.
343 (ada_lookup_name): New.
344 (add_nonlocal_symbols, ada_add_all_symbols)
345 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
346 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
347 (ada_name_for_lookup): Delete.
348 (ada_lookup_encoded_symbol): Construct a verbatim name.
349 (wild_match): Reverse sense of return type. Use bool.
350 (full_match): Reverse sense of return type. Inline bits of old
351 match_name here.
352 (ada_add_block_symbols): Adjust to use lookup_name_info.
353 (symbol_completion_match): Delete, folded into...
354 (ada_lookup_name_info::matches): ... .this new method.
355 (symbol_completion_add): Delete.
356 (ada_collect_symbol_completion_matches): Add name_match_type
357 parameter. Adjust to use lookup_name_info and
358 completion_list_add_name.
359 (get_var_value, ada_add_global_exceptions): Adjust to use
360 lookup_name_info.
361 (ada_get_symbol_name_cmp): Delete.
362 (do_wild_match, do_full_match): New functions.
363 (ada_lookup_name_info::ada_lookup_name_info): New method.
364 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
365 functions.
366 (ada_language_defn): Install ada_get_symbol_name_matcher.
367 * ada-lex.l (processId): If name starts with '<', copy it
368 verbatim.
369 * block.c (block_iter_match_step, block_iter_match_first)
370 (block_iter_match_next, block_lookup_symbol)
371 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
372 lookup_name_info.
373 * block.h (block_iter_match_first, block_iter_match_next)
374 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
375 * c-lang.c (c_language_defn, cplus_language_defn)
376 (asm_language_defn, minimal_language_defn): Adjust comments to
377 refer to la_get_symbol_name_matcher.
378 * completer.c (complete_files_symbols)
379 (collect_explicit_location_matches, symbol_completer): Pass a
380 symbol_name_match_type down.
381 * completer.h (class completion_match, completion_match_result):
382 New classes.
383 (completion_tracker::reset_completion_match_result): New method.
384 (completion_tracker::m_completion_match_result): New field.
385 * cp-support.c (make_symbol_overload_list_block): Adjust to use
386 lookup_name_info.
387 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
388 functions.
389 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
390 * d-lang.c: Adjust comments to refer to
391 la_get_symbol_name_matcher.
392 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
393 Adjust to use lookup_name_info.
394 (dict_iter_match_first, dict_iter_match_next)
395 (iter_match_first_hashed, iter_match_next_hashed)
396 (iter_match_first_linear, iter_match_next_linear): Adjust to work
397 with a lookup_name_info.
398 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
399 Likewise.
400 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
401 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
402 (gdb_index_symbol_name_matcher): New class.
403 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
404 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
405 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
406 with a symbol_name_match_type.
407 (f_language_defn): Adjust comments to refer to
408 la_get_symbol_name_matcher.
409 * go-lang.c (go_language_defn): Adjust comments to refer to
410 la_get_symbol_name_matcher.
411 * language.c (default_symbol_name_matcher)
412 (language_get_symbol_name_matcher): New functions.
413 (unknown_language_defn, auto_language_defn): Adjust comments to
414 refer to la_get_symbol_name_matcher.
415 * language.h (symbol_name_cmp_ftype): Delete.
416 (language_defn) <la_collect_symbol_completion_matches>: Add match
417 type parameter.
418 <la_get_symbol_name_cmp>: Delete field.
419 <la_get_symbol_name_matcher>: New field.
420 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
421 (default_symbol_name_matcher, language_get_symbol_name_matcher):
422 Declare.
423 * linespec.c (iterate_over_all_matching_symtabs)
424 (iterate_over_file_blocks): Adjust to use lookup_name_info.
425 (find_methods): Add language parameter, and use lookup_name_info
426 and the language's symbol_name_matcher_ftype.
427 (linespec_complete_function): Adjust.
428 (lookup_prefix_sym): Use lookup_name_info.
429 (add_all_symbol_names_from_pspace): Adjust.
430 (find_superclass_methods): Add language parameter and pass it
431 down.
432 (find_method): Pass symbol language down.
433 (find_linespec_symbols): Don't demangle or Ada encode here.
434 (search_minsyms_for_name): Add lookup_name_info parameter.
435 (add_matching_symbols_to_info): Add name_match_type parameter.
436 Use lookup_name_info.
437 * m2-lang.c (m2_language_defn): Adjust comments to refer to
438 la_get_symbol_name_matcher.
439 * minsyms.c: Include <algorithm>.
440 (add_minsym_to_demangled_hash_table): Remove table parameter and
441 add objfile parameter. Use search_name_hash, and add language to
442 demangled languages vector.
443 (struct found_minimal_symbols): New struct.
444 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
445 New functions.
446 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
447 input names here. Use lookup_name_info instead. Lookup up
448 demangled names once for each language in the demangled names
449 vector.
450 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
451 demangled names once for each language in the demangled names
452 vector.
453 (build_minimal_symbol_hash_tables): Adjust.
454 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
455 lookup_name_info.
456 * objc-lang.c (objc_language_defn): Adjust comment to refer to
457 la_get_symbol_name_matcher.
458 * objfiles.h: Include <vector>.
459 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
460 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
461 la_get_symbol_name_matcher.
462 * p-lang.c (pascal_language_defn): Adjust comment to refer to
463 la_get_symbol_name_matcher.
464 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
465 (match_partial_symbol): Use symbol_name_match_type,
466 lookup_name_info and psymbol_name_matches.
467 (lookup_partial_symbol): Use lookup_name_info.
468 (map_block): Use symbol_name_match_type and lookup_name_info.
469 (psym_map_matching_symbols): Use symbol_name_match_type.
470 (psymbol_name_matches): New.
471 (recursively_search_psymtabs): Use lookup_name_info and
472 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
473 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
474 'kind' parameter to 'domain'.
475 * rust-lang.c (rust_language_defn): Adjust comment to refer to
476 la_get_symbol_name_matcher.
477 * symfile-debug.c (debug_qf_map_matching_symbols)
478 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
479 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
480 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
481 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
482 Adjust to use symbol_name_match_type.
483 <expand_symtabs_matching>: Adjust to use lookup_name_info.
484 (expand_symtabs_matching): Adjust to use lookup_name_info.
485 * symmisc.c (maintenance_expand_symtabs): Use
486 lookup_name_info::match_any ().
487 * symtab.c (symbol_matches_search_name): New.
488 (eq_symbol_entry): Adjust to use lookup_name_info and the
489 language's matcher.
490 (demangle_for_lookup_info::demangle_for_lookup_info): New.
491 (lookup_name_info::match_any): New.
492 (iterate_over_symbols, search_symbols): Use lookup_name_info.
493 (compare_symbol_name): Add language, lookup_name_info and
494 completion_match_result parameters, and use them.
495 (completion_list_add_name): Make extern. Add language and
496 lookup_name_info parameters. Use them.
497 (completion_list_add_symbol, completion_list_add_msymbol)
498 (completion_list_objc_symbol): Add lookup_name_info parameters and
499 adjust. Pass down language.
500 (completion_list_add_fields): Add lookup_name_info parameters and
501 adjust. Pass down language.
502 (add_symtab_completions): Add lookup_name_info parameters and
503 adjust.
504 (default_collect_symbol_completion_matches_break_on): Add
505 name_match_type parameter, and use it. Use lookup_name_info.
506 (default_collect_symbol_completion_matches)
507 (collect_symbol_completion_matches): Add name_match_type
508 parameter, and pass it down.
509 (collect_symbol_completion_matches_type): Adjust.
510 (collect_file_symbol_completion_matches): Add name_match_type
511 parameter, and use lookup_name_info.
512 * symtab.h: Include <string> and "common/gdb_optional.h".
513 (enum class symbol_name_match_type): New.
514 (class ada_lookup_name_info): New.
515 (struct demangle_for_lookup_info): New.
516 (class lookup_name_info): New.
517 (symbol_name_matcher_ftype): New.
518 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
519 (symbol_matches_search_name): Declare.
520 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
521 (default_collect_symbol_completion_matches)
522 (collect_symbol_completion_matches)
523 (collect_file_symbol_completion_matches): Add name_match_type
524 parameter.
525 (iterate_over_symbols): Use lookup_name_info.
526 (completion_list_add_name): Declare.
527 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
528 (strncmp_iw_with_mode): Now extern.
529 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
530 (strncmp_iw_with_mode): Declare.
531
5ffa0793
PA
5322017-11-08 Keith Seitz <keiths@redhat.com>
533 Pedro Alves <palves@redhat.com>
534
535 * ada-lang.c (ada_language_defn): Install
536 default_search_name_hash.
537 * buildsym.c (struct buildsym_compunit): <language>: New field.
538 (finish_block_internal): Pass language when creating dictionaries.
539 (start_buildsym_compunit, start_symtab): New language parameters.
540 Use them.
541 (restart_symtab): Pass down compilation unit's language.
542 * buildsym.h (enum language): Forward declare.
543 (start_symtab): New 'language' parameter.
544 * c-lang.c (c_language_defn, cplus_language_defn)
545 (asm_language_defn, minimal_language_defn): Install
546 default_search_name_hash.
547 * coffread.c (coff_start_symtab): Adjust.
548 * d-lang.c (d_language_defn): Install default_search_name_hash.
549 * dbxread.c (struct symloc): Add 'pst_language' field.
550 (PST_LANGUAGE): Define.
551 (start_psymtab, read_ofile_symtab): Use it.
552 (process_one_symbol): New 'language' parameter. Pass it down.
553 * dictionary.c (struct dictionary) <language>: New field.
554 (DICT_LANGUAGE): Define.
555 (dict_create_hashed, dict_create_hashed_expandable)
556 (dict_create_linear, dict_create_linear_expandable): New parameter
557 'language'. Set the dictionary's language.
558 (iter_match_first_hashed): Adjust to rename.
559 (insert_symbol_hashed): Assert we don't see mismatching
560 languages. Adjust to rename.
561 (dict_hash): Rename to ...
562 (default_search_name_hash): ... this and make extern.
563 * dictionary.h (struct language_defn): Forward declare.
564 (dict_create_hashed): New parameter 'language'.
565 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
566 * f-lang.c (f_language_defn): Install default_search_name_hash.
567 * go-lang.c (go_language_defn): Install default_search_name_hash.
568 * jit.c (finalize_symtab): Pass compunit's language to dictionary
569 creation.
570 * language.c (unknown_language_defn, auto_language_defn):
571 * language.h (language_defn::la_search_name_hash): New field.
572 (default_search_name_hash): Declare.
573 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
574 * mdebugread.c (new_block): New parameter 'language'.
575 * mdebugread.c (parse_symbol): Pass symbol language to block
576 allocation.
577 (psymtab_to_symtab_1): Pass down language.
578 (new_symtab): Pass compunit's language to block allocation.
579 * objc-lang.c (objc_language_defn): Install
580 default_search_name_hash.
581 * opencl-lang.c (opencl_language_defn):
582 * p-lang.c (pascal_language_defn): Install
583 default_search_name_hash.
584 * rust-lang.c (rust_language_defn): Install
585 default_search_name_hash.
586 * stabsread.h (enum language): Forward declare.
587 (process_one_symbol): Add 'language' parameter.
588 * symtab.c (search_name_hash): New function.
589 * symtab.h (search_name_hash): Declare.
590 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
591
2a1dde5d
PA
5922017-11-08 Pedro Alves <palves@redhat.com>
593
594 * cp-name-parser.y (main): Don't initialize extra_chars.
595
95a6b0a1
TT
5962017-11-07 Tom Tromey <tom@tromey.com>
597
598 * event-top.h (command_handler): Constify.
599 * record-full.c (cmd_record_full_start): Update.
600 * thread.c (thread_apply_all_command): Update.
601 * printcmd.c (eval_command): Update.
602 * mi/mi-main.c (mi_execute_cli_command): Update.
603 (mi_execute_async_cli_command): Update.
604 * tui/tui-stack.c (tui_update_command): Update.
605 * cli/cli-interp.c (safe_execute_command): Constify.
606 * record.c (record_start): Update.
607 (record_start, record_stop, cmd_record_start): Update.
608 * record-btrace.c (cmd_record_btrace_bts_start): Update.
609 (cmd_record_btrace_pt_start): Update.
610 (cmd_record_btrace_start): Update.
611 (cmd_record_btrace_start): Update.
612 * reverse.c (exec_reverse_once): Update.
613 * python/python.c (execute_gdb_command): Don't copy the command.
614 * event-top.c (command_line_handler): Update.
615 (command_handler): Constify.
616 * defs.h (deprecated_call_command_hook): Constify.
617 * cli/cli-script.h (execute_user_command): Constify.
618 * cli/cli-script.c (execute_user_command): Constify.
619 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
620 (enum command_control_type): Update.
621 * main.c (catch_command_errors): Remove non-const overload.
622 (catch_command_errors_ftype): Remove.
623 * python/py-cmd.c (cmdpy_function): Constify.
624 * guile/scm-cmd.c (cmdscm_function): Constify.
625 * cli/cli-dump.c (call_dump_func): Constify.
626 * cli/cli-decode.c (do_const_cfunc): Constify.
627 (do_sfunc): Constify.
628 (cmd_func): Constify.
629 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
630 * top.h (execute_command): Constify.
631 * top.c (execute_command): Constify.
632 (execute_command_to_string): Constify.
633 (deprecated_call_command_hook): Constify.
634 * command.h (cmd_func): Constify.
635 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
636
eb4c3f4a
TT
6372017-11-07 Tom Tromey <tom@tromey.com>
638
639 * ada-lang.c (catch_ada_exception_command): Constify.
640 (catch_assert_command): Constify.
641 * break-catch-throw.c (catch_catch_command, catch_throw_command)
642 (catch_rethrow_command): Constify.
643 (catch_exception_command_1): Constify.
644 * breakpoint.h (add_catch_command): Constify.
645 * break-catch-syscall.c (catch_syscall_command_1): Constify.
646 (catch_syscall_split_args): Constify.
647 * break-catch-sig.c (catch_signal_command): Constify.
648 (catch_signal_split_args): Constify.
649 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
650 cmd_const_sfunc_ftype.
651 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
652 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
653 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
654 (add_setshow_string_cmd, struct cmd_list_element)
655 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
656 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
657 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
658 Constify.
659 (set_cmd_sfunc): Constify.
660 (empty_sfunc): Constify.
661 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
662 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
663 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
664 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
665 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
666 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
667 Constify.
668 (set_cmd_sfunc): Constify.
669 (cmd_sfunc_ftype): Remove.
670 * compile/compile.c (set_compile_args): Constify.
671 * infrun.c (set_disable_randomization): Constify.
672 * infcmd.c (set_args_command, set_cwd_command): Constify.
673 * breakpoint.c (set_condition_evaluation_mode): Constify.
674 (add_catch_command): Constify.
675 (catch_fork_command_1, catch_exec_command_1)
676 (catch_load_command_1, catch_unload_command_1): Constify.
677 (catch_load_or_unload): Constify.
678 * guile/scm-param.c (pascm_set_func): Constify.
679 (add_setshow_generic): Constify.
680 * python/py-param.c (get_set_value): Constify.
681 * top.h (set_verbose): Constify.
682 * tui/tui-win.c (tui_set_var_cmd): Constify.
683 * mi/mi-main.c (set_mi_async_command): Constify.
684 * cli/cli-logging.c (set_logging_overwrite)
685 (set_logging_redirect): Constify.
686 * value.c (set_max_value_size): Constify.
687 * valprint.c (set_input_radix, set_output_radix): Constify.
688 * utils.c (set_width_command, set_height_command): Constify.
689 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
690 * tracepoint.c (set_disconnected_tracing)
691 (set_circular_trace_buffer, set_trace_buffer_size)
692 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
693 * top.c (set_history_size_command, set_verbose, set_editing)
694 (set_gdb_datadir, set_history_filename): Constify.
695 * target.c (set_targetdebug, maint_set_target_async_command)
696 (maint_set_target_non_stop_command, set_target_permissions)
697 (set_write_memory_permission): Constify.
698 (open_target): Constify.
699 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
700 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
701 * symtab.c (set_symbol_cache_size_handler): Constify.
702 * symfile.c (set_ext_lang_command): Constify.
703 * symfile-debug.c (set_debug_symfile): Constify.
704 * source.c (set_directories_command): Constify.
705 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
706 * serial.c (set_parity): Constify.
707 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
708 * remote.c (set_remote_exec_file, set_remotebreak)
709 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
710 * record.c (set_record_insn_history_size)
711 (set_record_call_history_size): Constify.
712 * record-full.c (set_record_full_insn_max_num): Constify.
713 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
714 * osabi.c (set_osabi): Constify.
715 * mips-tdep.c (set_mips64_transfers_32bit_regs)
716 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
717 * maint.c (maintenance_set_profile_cmd): Constify.
718 * linux-thread-db.c (set_libthread_db_search_path): Constify.
719 * language.c (set_language_command, set_range_command)
720 (set_case_command): Constify.
721 * infrun.c (set_non_stop, set_observer_mode)
722 (set_stop_on_solib_events, set_schedlock_func)
723 (set_exec_direction_func): Constify.
724 * infcmd.c (set_inferior_tty_command): Constify.
725 * disasm.c (set_disassembler_options_sfunc): Constify.
726 * demangle.c (set_demangling_command): Constify.
727 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
728 * cris-tdep.c (set_cris_version, set_cris_mode)
729 (set_cris_dwarf2_cfi): Constify.
730 * corefile.c (set_gnutarget_command): Constify.
731 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
732 (set_target_wide_charset_sfunc): Constify.
733 * breakpoint.c (update_dprintf_commands): Constify.
734 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
735 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
736 (set_disassembly_style_sfunc): Constify.
737 * arch-utils.c (set_endian, set_architecture): Constify.
738 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
739 * agent.c (set_can_use_agent): Constify.
740
5fed81ff
TT
7412017-11-07 Tom Tromey <tom@tromey.com>
742
743 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
744 (go32_pde, go32_pte, go32_pte_for_address): Constify.
745 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
746 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
747 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
748 (parse_int_arg, show_thread_default_detach_sc_cmd)
749 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
750 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
751 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
752 (show_task_pause_cmd, set_task_detach_sc_cmd)
753 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
754 (set_noninvasive_cmd, set_thread_pause_cmd)
755 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
756 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
757 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
758 * windows-nat.c (display_selectors): Constify.
759 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
760 non-const "cfunc".
761 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
762 (cmd_cfunc_eq): Likewise.
763 (struct cmd_list_element): Likewise.
764 (do_cfunc): Remove.
765 (cli_user_command_p): Update.
766 * command.h (add_cmd): Remove non-const overload.
767 (cmd_cfunc_ftype): Remove typedef.
768 (cmd_cfunc_eq): Remove non-const overload.
769 * value.c (show_values): Constify.
770 * thread.c (thread_apply_all_command): Constify.
771 * symfile.c (load_command): Constify.
772 * source.c (directory_command): Constify.
773 * maint.c (maintenance_internal_error)
774 (maintenance_demangler_warning, maintenance_space_display)
775 (maintenance_print_architecture, maintenance_translate_address)
776 (maintenance_info_selftests, maintenance_internal_warning):
777 Constify.
778 * breakpoint.c (disable_trace_command, enable_trace_command):
779 Constify.
780 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
781 Constify.
782 (add_auto_load_safe_path): Constify.
783 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
784 * top.h (show_commands): Constify.
785 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
786 * sparc64-tdep.c (adi_examine_command): Constify.
787 (adi_assign_command): Constify.
788
1d12d88f
TT
7892017-11-07 Tom Tromey <tom@tromey.com>
790
791 * frame.h (info_locals_command, info_args_command): Constify.
792 * auto-load.h (auto_load_info_scripts): Constify.
793 * inferior.h (registers_info): Constify.
794 * copying.c: Rebuild.
795 * copying.awk: Constify generated commands.
796 * auto-load.c (auto_load_info_scripts)
797 (info_auto_load_gdb_scripts): Constify.
798 * cli/cli-decode.c (struct cmd_list_element): Take a
799 cmd_const_cfunc_ftype.
800 * command.h (add_info): Take a cmd_const_cfunc_ftype.
801 * tui/tui-win.c (tui_all_windows_info): Constify.
802 * python/py-auto-load.c (info_auto_load_python_scripts):
803 Constify.
804 * cli/cli-cmds.c (show_command): Remove non-const overload.
805 * tracepoint.c (info_tvariables_command, info_scope_command):
806 Constify.
807 (info_static_tracepoint_markers_command): Constify.
808 * thread.c (info_threads_command): Constify.
809 (print_thread_info_1): Constify.
810 * target.c (info_target_command): Constify.
811 * symtab.c (info_sources_command, info_functions_command)
812 (info_types_command): Constify.
813 (info_variables_command): Remove non-const overload.
814 * symfile.c (info_ext_lang_command): Constify.
815 * stack.c (info_frame_command, info_locals_command)
816 (info_args_command): Constify.
817 (backtrace_command): Remove non-const overload.
818 * source.c (info_source_command, info_line_command): Constify.
819 * solib.c (info_sharedlibrary_command): Constify.
820 * skip.c (info_skip_command): Constify.
821 * ser-go32.c (info_serial_command): Constify.
822 * reverse.c (info_bookmarks_command): Constify.
823 * printcmd.c (info_symbol_command, info_address_command)
824 (info_display_command): Constify.
825 * osdata.c (info_osdata_command): Constify.
826 * objc-lang.c (info_selectors_command, info_classes_command):
827 Constify.
828 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
829 * memattr.c (info_mem_command): Constify.
830 * macrocmd.c (info_macro_command, info_macros_command): Constify.
831 * linux-fork.c (info_checkpoints_command): Constify.
832 * infrun.c (info_signals_command): Constify.
833 * inflow.c (info_terminal_command): Constify.
834 * inferior.c (info_inferiors_command): Constify.
835 (print_inferior): Constify.
836 * infcmd.c (info_program_command, info_all_registers_command)
837 (info_registers_command, info_vector_command)
838 (info_float_command): Constify.
839 (registers_info): Constify.
840 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
841 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
842 Constify.
843 * f-valprint.c (info_common_command): Constify.
844 * dcache.c (info_dcache_command): Constify.
845 (dcache_info_1): Constify.
846 * darwin-nat-info.c (info_mach_tasks_command)
847 (info_mach_task_command, info_mach_ports_command)
848 (info_mach_port_command, info_mach_threads_command)
849 (info_mach_thread_command, info_mach_regions_command)
850 (info_mach_regions_recurse_command, info_mach_region_command)
851 (info_mach_exceptions_command): Constify.
852 (get_task_from_args): Constify.
853 * cp-support.c (info_vtbl_command): Constify.
854 * breakpoint.c (info_watchpoints_command)
855 (info_tracepoints_command): Constify.
856 (info_breakpoints_command): Remove non-const overload.
857 * avr-tdep.c (avr_io_reg_read_command): Constify.
858 * auxv.c (info_auxv_command): Constify.
859 * ada-tasks.c (info_tasks_command): Constify.
860 (info_task): Constify.
861 * ada-lang.c (info_exceptions_command): Constify.
862
0b39b52e
TT
8632017-11-07 Tom Tromey <tom@tromey.com>
864
865 * solib.h (no_shared_libraries): Constify.
866 * frame.h (return_command): Constify.
867 * cli/cli-cmds.h (quit_command): Constify.
868 * top.h (quit_command, execute_command): Constify.
869 * target.h (flash_erase_command): Constify.
870 * inferior.h (set_inferior_args, attach_command): Constify.
871 * tracepoint.h (start_tracing, stop_tracing): Constify.
872 * breakpoint.h (break_command, tbreak_command)
873 (hbreak_command_wrapper, thbreak_command_wrapper)
874 (rbreak_command_wrapper, watch_command_wrapper)
875 (awatch_command_wrapper, rwatch_command_wrapper)
876 (get_tracepoint_by_number): Constify.
877 * symtab.c (info_variables_command, rbreak_command)
878 (symtab_symbol_info): Constify.
879 (info_variables_command): Add non-const overload.
880 * top.c (dont_repeat_command): Constify.
881 * breakpoint.c (ignore_command, commands_command)
882 (condition_command, tbreak_command, hbreak_command)
883 (thbreak_command, clear_command, break_command)
884 (info_breakpoints_command, watch_command, rwatch_command)
885 (awatch_command, trace_command, ftrace_command, strace_command)
886 (trace_pass_command, break_range_command, dprintf_command)
887 (agent_printf_command, get_tracepoint_by_number)
888 (watch_maybe_just_location, trace_pass_command): Constify.
889 (info_breakpoints_command): Add non-const overload.
890 * tracefile.c (tsave_command): Constify.
891 * infcmd.c (attach_command, disconnect_command, signal_command)
892 (queue_signal_command, stepi_command, nexti_command)
893 (finish_command, next_command, step_command, until_command)
894 (advance_command, jump_command, continue_command, run_command)
895 (start_command, starti_command, interrupt_command)
896 (run_command_1, set_inferior_args, step_1): Constify.
897 * inferior.c (add_inferior_command, remove_inferior_command)
898 (clone_inferior_command): Constify.
899 * linux-fork.c (checkpoint_command, restart_command): Constify.
900 * windows-nat.c (signal_event_command): Constify.
901 * guile/guile.c (guile_repl_command, guile_command): Constify.
902 * printcmd.c (x_command, display_command, printf_command)
903 (output_command, set_command, call_command, print_command)
904 (eval_command): Constify.
905 (non_const_set_command): Remove.
906 (_initialize_printcmd): Update.
907 * source.c (forward_search_command, reverse_search_command):
908 Constify.
909 * jit.c (jit_reader_load_command, jit_reader_unload_command):
910 Constify.
911 * infrun.c (handle_command): Constify.
912 * memattr.c (mem_command): Constify.
913 * stack.c (return_command, up_command, up_silently_command)
914 (down_command, down_silently_command, frame_command)
915 (backtrace_command, func_command, backtrace_command_1): Constify.
916 (backtrace_command): Add non-const overload.
917 * remote-sim.c (simulator_command): Constify.
918 * exec.c (set_section_command): Constify.
919 * tracepoint.c (tdump_command, trace_variable_command)
920 (tstatus_command, tstop_command, tstart_command)
921 (end_actions_pseudocommand, while_stepping_pseudocommand)
922 (collect_pseudocommand, teval_pseudocommand, actions_command)
923 (start_tracing, stop_tracing): Constify.
924 * value.c (init_if_undefined_command): Constify.
925 * tui/tui-stack.c (tui_update_command): Constify.
926 * tui/tui-win.c (tui_refresh_all_command)
927 (tui_set_tab_width_command, tui_set_win_height_command)
928 (tui_set_focus_command, tui_scroll_forward_command)
929 (tui_scroll_backward_command, tui_scroll_left_command)
930 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
931 (tui_set_win_height): Constify.
932 * tui/tui-layout.c (tui_layout_command): Constify.
933 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
934 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
935 (proc_untrace_sysexit_cmd): Constify.
936 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
937 (threadset_test_cmd, threadlist_update_test_cmd)
938 (threadalive_test): Constify.
939 * objc-lang.c (print_object_command): Constify.
940 * command.h (add_com): Constify.
941 * cli/cli-dump.c (restore_command): Constify.
942 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
943 (help_command, complete_command, shell_command, edit_command)
944 (list_command, disassemble_command, make_command)
945 (apropos_command, alias_command): Constify.
946 * cli/cli-script.c (document_command, define_command)
947 (while_command, if_command, validate_comname): Constify.
948 * cli/cli-decode.c (struct cmd_list_element): Change type of
949 "fun".
950 * target.c (do_monitor_command, flash_erase_command): Constify.
951 * regcache.c (reg_flush_command): Constify.
952 * reverse.c (reverse_step, reverse_next, reverse_stepi)
953 (reverse_nexti, reverse_continue, reverse_finish)
954 (save_bookmark_command, goto_bookmark_command)
955 (exec_reverse_once): Constify.
956 * python/python.c (python_interactive_command, python_command):
957 Constify.
958 * typeprint.c (ptype_command, whatis_command, whatis_exp):
959 Constify.
960 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
961 * gcore.c (gcore_command): Constify.
962
85c4be7c
TT
9632017-11-07 Tom Tromey <tom@tromey.com>
964
965 * printcmd.c (x_command): Call set_repeat_arguments.
966 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
967 * top.c (repeat_arguments): New global.
968 (set_repeat_arguments): New function.
969 (execute_command): Handle repeat_arguments.
970 (show_commands): Calls set_repeat_arguments.
971 * command.h (set_repeat_arguments): Declare.
972
022643b4
TT
9732017-11-07 Tom Tromey <tom@tromey.com>
974
975 * stack.c (backtrace_command): Use std::string.
976 (backtrace_command_1): Make "count_exp" const.
977
5614fb77
TT
9782017-11-07 Tom Tromey <tom@tromey.com>
979
980 * source.c (directory_switch, mod_path, add_path): Constify.
981 * defs.h (add_path, mod_path, directory_switch): Constify.
982 * mi/mi-cmd-env.c (env_mod_path): Constify.
983
6be9a197
TT
9842017-11-07 Tom Tromey <tom@tromey.com>
985
986 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
987 (run_command_1, continue_command, step_1, jump_command)
988 (signal_command, until_command, advance_command, finish_command)
989 (attach_command): Update.
990
c2252c0d
TT
9912017-11-07 Tom Tromey <tom@tromey.com>
992
993 * command.h (set_cmd_cfunc): Don't declare.
994 * cli/cli-decode.c (set_cmd_cfunc): Now static.
995
1ee870c5
TT
9962017-11-07 Tom Tromey <tom@tromey.com>
997
998 * stack.c (select_frame_command): Constify.
999 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1000 * command.h (add_com_suppress_notification): Constify.
1001
ee7ddd71
TT
10022017-11-07 Tom Tromey <tom@tromey.com>
1003
1004 * breakpoint.c (stop_command): Constify.
1005 * cli/cli-decode.c (struct cmd_list_element): Constify.
1006 * command.h (add_abbrev_prefix_cmd): Constify.
1007
95e95a6d
PA
10082017-11-07 Pedro Alves <palves@redhat.com>
1009
1010 * breakpoint.c (extract_bp_kind): New enum.
1011 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1012 factored out from ...
1013 (extract_bp_number_and_location): ... here.
1014 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1015
cc638e86
PA
10162017-11-07 Pedro Alves <palves@redhat.com>
1017
1018 * breakpoint.c (extract_bp_number_and_location): Change return
1019 type to void. Throw error instead of warning.
1020 (enable_disable_command): Adjust.
1021
d0fe4701
XR
10222017-11-07 Xavier Roirand <roirand@adacore.com>
1023 Pedro Alves <palves@redhat.com>
1024
1025 * breakpoint.c (map_breakpoint_number_range): New, factored out
1026 from ...
1027 (map_breakpoint_numbers): ... here.
1028 (find_location_by_number): Change parameters from string to
1029 breakpoint number and location.
1030 (extract_bp_number_and_location): New function.
1031 (enable_disable_bp_num_loc)
1032 (enable_disable_breakpoint_location_range)
1033 (enable_disable_command): New functions, factored out ...
1034 (enable_command, disable_command): ... these functions, and
1035 adjusted to support ranges.
1036 * NEWS: Document enable/disable breakpoint location range feature.
1037
635dc5b2
LM
10382017-11-06 Luis Machado <luis.machado@linaro.org>
1039
1040 * MAINTAINERS (Write After Approval): Update my e-mail address.
1041
556e5da5
PA
10422017-11-06 Pedro Alves <palves@redhat.com>
1043
1044 * gnu-nat.c (gnu_terminal_init): Delete.
1045 (gnu_target): Don't install gnu_terminal_init.
1046 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1047 (child_terminal_init): ... this function.
1048
d1928160
PA
10492017-11-06 Pedro Alves <palves@redhat.com>
1050
1051 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1052 sgtty.h.
1053 * config.in, configure: Regenerate.
1054
6aa899ce
PA
10552017-11-06 Pedro Alves <palves@redhat.com>
1056
1057 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1058 (async_init_signals): Adjust.
1059 (handle_stop_sig): Rename to ...
1060 (handle_sigtstp): ... this.
1061 (async_stop_sig): Rename to ...
1062 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1063 SIGTSTP path.
1064 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1065 instead of STOP_SIGNAL thoughout.
1066 (handle_stop_sig): Rename to ...
1067 (handle_sigtstp): ... this.
1068 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1069
a94799ac
PA
10702017-11-06 Pedro Alves <palves@redhat.com>
1071
1072 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1073 longer set flags twice in row.
1074
726e1356
PA
10752017-11-06 Pedro Alves <palves@redhat.com>
1076
1077 * Makefile.in (SER_HARDWIRE): Update comment.
1078 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1079 * common/gdb_termios.h: Delete file.
1080 * common/job-control.c: Include termios.h and unistd.h instead of
1081 gdb_termios.h.
1082 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1083 check.
1084 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1085 Remove sgtty code.
1086 * configure.ac: No longer check for termio.h and sgtty.h.
1087 * configure: Regenerate.
1088 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1089 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1090 Replace PROCESS_GROUP_TYPE references with pid_t references
1091 throughout.
1092 (gdb_getpgrp): Delete.
1093 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1094 (child_terminal_inferior): Remove comment. Remove sgtty code.
1095 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1096 gdb_getpgrp. Use serial_set_tty_state instead aof
1097 serial_noflush_set_tty_state. Remove sgtty code.
1098 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1099 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1100 (inferior_process_group): Now returns pid_t.
1101 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1102 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1103 * ser-event.c (serial_event_ops): Update.
1104 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1105 (dos_ops): Update.
1106 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1107 * ser-pipe.c (pipe_ops): Update.
1108 * ser-tcp.c (tcp_ops): Update.
1109 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1110 HAVE_TERMIOS checks.
1111 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1112 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1113 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1114 assume termios.
1115 (hardwire_noflush_set_tty_state): Delete.
1116 (hardwire_print_tty_state, hardwire_drain_output)
1117 (hardwire_flush_output, hardwire_flush_input)
1118 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1119 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1120 code, and assume termios.
1121 (hardwire_ops): Update.
1122 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1123 * serial.c (serial_noflush_set_tty_state): Delete.
1124 * serial.h (serial_noflush_set_tty_state): Delete.
1125 (serial_ops::noflush_set_tty_state): Delete.
1126
1cfb73db
UW
11272017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1128
1129 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1130 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1131 (COMMON_OBS): Remove doublest.o and dfp.o.
1132 Do not build target-float.c (instead of doublest.c)
1133 with -Wformat-nonliteral.
1134
1135 * doublest.c: Remove file.
1136 * doublest.h: Remove file.
1137 * dfp.c: Remove file.
1138 * dfp.h: Remove file.
1139
1140 * target-float.c: Do not include "doublest.h" and "dfp.h".
1141 (DOUBLEST): Move here from doublest.h.
1142 (enum float_kind): Likewise.
1143 (FLOATFORMAT_CHAR_BIT): Likewise.
1144 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1145 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1146 (floatformat_precision): Likewise.
1147 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1148 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1149 Likewise.
1150 (host_float_format, host_double_format, host_long_double_format):
1151 Likewise.
1152 (floatformat_to_string, floatformat_from_string): Likewise.
1153 (floatformat_to_doublest): Likewise. Also, inline the original
1154 convert_floatformat_to_doublest.
1155 (floatformat_from_doublest): Likewise. Also, inline the original
1156 convert_floatformat_from_doublest.
1157
1158 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1159 (MAX_DECIMAL_STRING): Move here from dfp.c.
1160 (match_endianness): Likewise.
1161 (set_decnumber_context, decimal_check_errors): Likewise.
1162 (decimal_from_number, decimal_to_number): Likewise.
1163 (decimal_to_string, decimal_from_string): Likewise. Make static.
1164 (decimal_from_longest, decimal_from_ulongest): Likewise.
1165 (decimal_to_longest): Likewise.
1166 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1167 (decimal_convert): Likewise.
1168
b07e9c46
UW
11692017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1170
1171 * doublest.c: Do not include "gdbtypes.h".
1172 (extract_typed_floating): Remove.
1173 (store_typed_floating): Remove.
1174 (convert_typed_floating): Remove.
1175 * doublest.h (struct type): Remove.
1176 (DOUBLEST_PRINT_FORMAT): Remove.
1177 (DOUBLEST_SCAN_FORMAT): Remove.
1178 (extract_typed_floating): Remove.
1179 (store_typed_floating): Remove.
1180 (convert_typed_floating): Remove.
1181
1182 * dfp.c (decimal_from_doublest): Remove.
1183 (decimal_to_doublest): Remove.
1184 * dfp.h: Do not include "doublest.h".
1185 (decimal_from_doublest): Remove.
1186 (decimal_to_doublest): Remove.
1187
1188 * value.c: Do not include "doublest.h" and "dfp.h".
1189 (value_as_double): Remove.
1190 (unpack_double): Remove.
1191 (value_from_double): Remove.
1192 (value_from_decfloat): Remove.
1193 * value.h: Do not include "doublest.h".
1194 (value_as_double): Remove.
1195 (unpack_double): Remove.
1196 (value_from_double): Remove.
1197 (value_from_decfloat): Remove.
1198
3b2ca824
UW
11992017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1200
1201 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1202 (i386_extract_return_value): Use target_float_convert.
1203 (i386_store_return_value): Likewise.
1204 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1205 (i387_value_to_register): Likewise.
1206 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1207 (ia64_register_to_value): Use target_float_convert.
1208 (ia64_value_to_register): Likewise.
1209 (ia64_extract_return_value): Likewise.
1210 (ia64_store_return_value): Likewise.
1211 (ia64_push_dummy_call): Likewise.
1212 * m68k-tdep.c: Include "target-float.h".
1213 (m68k_register_to_value): Use target_float_convert.
1214 (m68k_value_to_register): Likewise.
1215 (m68k_svr4_extract_return_value): Likewise.
1216 (m68k_svr4_store_return_value): Likewise.
1217 * ppc-sysv-tdep.c: Include "target-float.h".
1218 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1219 (do_ppc_sysv_return_value): Likewise.
1220 (ppc64_sysv_abi_push_freg): Likewise.
1221 (ppc64_sysv_abi_return_value_base): Likewise.
1222 * rs6000-aix-tdep.c: Include "target-float.h".
1223 (rs6000_push_dummy_call): Use target_float_convert.
1224 (rs6000_return_value): Likewise.
1225 * rs6000-lynx178-tdep.c: Include "target-float.h".
1226 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1227 (rs6000_lynx178_return_value): Likewise.
1228 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1229 (rs6000_register_to_value): Use target_float_convert.
1230 (rs6000_value_to_register): Likewise.
1231 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1232 (arm_extract_return_value): Use target_float_convert.
1233 (arm_store_return_value): Likewise.
1234 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1235 (sh_register_convert_to_virtual): Use target_float_convert.
1236 (sh_register_convert_to_raw): Likewise.
1237 * sh64-tdep.c: Include "target-float.h".
1238 (sh64_extract_return_value): Use target_float_convert.
1239 (sh64_register_convert_to_virtual): Likewise.
1240 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1241
14ad9311
UW
12422017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1243
1244 * target-float.c (floatformat_to_host_double): New function.
1245 (floatformat_from_host_double): Likewise.
1246 (target_float_to_host_double): Likewise.
1247 (target_float_from_host_double): Likewise.
1248 * target-float.h (target_float_to_host_double): Add prototype.
1249 (target_float_from_host_double): Likewise.
1250
1251 * guile/scm-value.c: Include "target-float.h".
1252 (gdbscm_value_to_real): Use target_float_to_host_double.
1253 Handle integer source values via value_as_long.
1254 * guile/scm-math.c: Include "target-float.h". Do not include
1255 "doublest.h", "dfp.h", and "expression.h".
1256 (vlscm_convert_typed_number): Use target_float_from_host_double.
1257 (vlscm_convert_number): Likewise.
1258
1259 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1260 (convert_value_from_python): Use target_float_from_host_double.
1261
50eff16b
UW
12622017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1263
1264 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1265 (cast_from_fixed): Likewise.
1266 (ada_scaling_type): New function.
1267 (ada_delta): Return value instead of DOUBLEST. Perform target
1268 arithmetic instead of host arithmetic.
1269 (scaling_factor): Rename to ...
1270 (ada_scaling_factor) ... this. Make non-static. Return value instead
1271 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1272 (ada_fixed_to_float): Remove.
1273 (ada_float_to_fixed): Remove.
1274 * ada-lang.h (ada_fixed_to_float): Remove.
1275 (ada_float_to_fixed): Remove.
1276 (ada_delta): Return value instead of DOUBLEST.
1277 (ada_scaling_factor): Add prototype.
1278
1279 * ada-typeprint.c: Include "target-float.h".
1280 (print_fixed_point_type): Perform target arithmetic instead of
1281 host arithmetic.
1282 * ada-valprint.c: Include "target-float.h".
1283 (ada_val_print_num): Perform target arithmetic instead of
1284 host arithmetic for fixed-point types.
1285
66c02b9e
UW
12862017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1287
1288 * target-float.c: Include <math.h>.
1289 (floatformat_binop): New function.
1290 (floatformat_compare): Likewise.
1291 (target_float_binop): Likewise.
1292 (target_float_compare): Likewise.
1293 * target-float.h: Include "expression.h".
1294 (target_float_binop): Add prototype.
1295 (target_float_compare): Likewise.
1296
1297 * valarith.c: Do not include "doublest.h" and "dfp.h".
1298 Include "common/byte-vector.h".
1299 (value_args_as_decimal): Remove, replace by ...
1300 (value_args_as_target_float): ... this function. Handle both
1301 binary and decimal target floating-point formats.
1302 (scalar_binop): Handle both binary and decimal FP using
1303 value_args_as_target_float and target_float_binop.
1304 (value_equal): Handle both binary and decimal FP using
1305 value_args_as_target_float and target_float_compare.
1306 (value_less): Likewise.
1307 (value_pos): Handle all scalar types as simple copy.
1308 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1309 * dfp.c (decimal_binop): Throw error instead of internal_error
1310 when called with an unsupported operation code.
1311
f69fdf9b
UW
13122017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1313
1314 * target-float.c (target_float_to_string): New function.
1315 (target_float_from_string): New function.
1316 * target-float.h (target_float_to_string): Add prototype.
1317 (target_float_from_string): Add prototype.
1318
1319 * valprint.c: Include "target-float.h". Do not include
1320 "doublest.h" and "dfp.h".
1321 (print_floating): Use target_float_to_string.
1322 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1323 (printf_floating): Use target_float_to_string.
1324 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1325 (print_i387_value): Use target_float_to_string.
1326 * mips-tdep.c: Include "target-float.h".
1327 (mips_print_fp_register): Use target_float_to_string.
1328 * sh64-tdep.c: Include "target-float.h".
1329 (sh64_do_fp_register): Use target_float_to_string.
1330
1331 * parse.c: Include "target-float.h". Do not include
1332 "doublest.h" and "dfp.h".
1333 (parse_float): Use target_float_from_string.
1334 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1335 (define_symbol): Use target_float_from_string.
1336 * gdbarch-selftests.c: Include "target-float.h".
1337 (register_to_value_test): Use target_float_from_string.
1338
70100014
UW
13392017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1340
1341 * Makefile.c (SFILES): Add target-float.c.
1342 (HFILES_NO_SRCDIR): Add target-float.h.
1343 (COMMON_OBS): Add target-float.o.
1344 * target-float.h: New file.
1345 * target-float.c: New file.
1346
1347 * doublest.c (floatformat_classify): Fix detection of float_zero.
1348
1349 * gdbtypes.c (is_floating_type): New function.
1350 * gdbtypes.h (is_floating_type): Add prototype.
1351
1352 * value.c: Do not include "floatformat.h".
1353 (unpack_double): Use target_float_is_valid.
1354 (is_floating_value): New function.
1355 * value.h (is_floating_value): Add prototype-
1356
1357 * valarith.c: Include "target-float.h".
1358 (value_logical_not): Use target_float_is_zero.
1359
1360 * python/py-value.c: Include "target-float.h".
1361 (valpy_nonzero): Use target_float_is_zero.
1362
ab4b1c46
TT
13632017-11-04 Tom Tromey <tom@tromey.com>
1364
1365 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1366
454dafbd
TT
13672017-11-04 Tom Tromey <tom@tromey.com>
1368
1369 * breakpoint.c (set_momentary_breakpoint): Return
1370 breakpoint_up.
1371 (until_break_command): Update.
1372 (new_until_break_fsm): Change argument types to
1373 breakpoint_up.
1374 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1375 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1376 Remove.
1377 * infcmd.c (finish_forward): Update.
1378 * breakpoint.h (set_momentary_breakpoint)
1379 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1380 (make_cleanup_delete_breakpoint): Remove.
1381 (struct breakpoint_deleter): New.
1382 (breakpoint_up): New typedef.
1383 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1384 (insert_exception_resume_breakpoint): Update.
1385 (insert_exception_resume_from_probe): Update.
1386 (insert_longjmp_resume_breakpoint): Update.
1387 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1388 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1389 * infcall.c (call_function_by_hand_dummy): Update
1390
331b71e5
TT
13912017-11-04 Tom Tromey <tom@tromey.com>
1392
1393 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1394
9f584b37
TT
13952017-11-04 Tom Tromey <tom@tromey.com>
1396
1397 * linux-tdep.c (linux_core_info_proc_mappings): Use
1398 gdb::def_vector.
1399 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1400 "size" argument.
1401 (linux_corefile_thread): Update.
1402 (linux_make_corefile_notes): Remove unused variable.
1403
779bc38e
TT
14042017-11-04 Tom Tromey <tom@tromey.com>
1405
1406 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1407 gdb::byte_vector.
1408
ed2b3126
TT
14092017-11-04 Tom Tromey <tom@tromey.com>
1410
1411 * objfiles.c (do_free_objfile_cleanup): Remove.
1412 * compile/compile-object-load.c (compile_object_load): Update.
1413 * objfiles.h (make_cleanup_free_objfile): Remove.
1414
7f6743fd
TT
14152017-11-04 Tom Tromey <tom@tromey.com>
1416
1417 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1418 (adi_read_versions): Change "tags" to "gdb_byte *".
1419 (adi_print_versions): Likewise.
1420
c80049d3
TT
14212017-11-04 Tom Tromey <tom@tromey.com>
1422
1423 * breakpoint.c
1424 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1425 from start_rbreak_breakpoints.
1426 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1427 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1428 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1429 * symtab.c (do_end_rbreak_breakpoints): Remove.
1430 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1431
167b0be1
TT
14322017-11-04 Tom Tromey <tom@tromey.com>
1433
1434 * cp-namespace.c (reset_directive_searched): Remove.
1435 (cp_lookup_symbol_via_imports): Use scoped_restore.
1436 * cp-support.c (reset_directive_searched): Remove.
1437 (make_symbol_overload_list_using): Use scoped_restore.
1438 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1439 (reset_directive_searched): Remove.
1440
5eae7aea
TT
14412017-11-04 Tom Tromey <tom@tromey.com>
1442
1443 * symfile.c (find_separate_debug_file_by_debuglink): Use
1444 unique_xmalloc_ptr.
1445
c6bcad5f
TT
14462017-11-04 Tom Tromey <tom@tromey.com>
1447
1448 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1449 type of "info".
1450 (compute_stack_depth): Likewise.
1451 (do_compile_dwarf_expr_to_c): Use std::vector.
1452
20dcd8ca
TT
14532017-11-04 Tom Tromey <tom@tromey.com>
1454
1455 * compile/compile-object-load.c (link_callbacks_einfo): Use
1456 std::string.
1457
33c7c59d
TT
14582017-11-04 Tom Tromey <tom@tromey.com>
1459
1460 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1461 Use scoped_free_pendings.
1462 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1463 scoped_free_pendings.
1464 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1465 (xcoff_initial_scan): Likewise.
1466 * buildsym.c (reset_symtab_globals): Update comment.
1467 (scoped_free_pendings): Rename from really_free_pendings.
1468 (prepare_for_building): Update comment.
1469 (buildsym_init): Likewise.
1470 * buildsym.h (class scoped_free_pendings): New class.
1471 (really_free_pendings): Don't declare.
1472
67fa57cf
UW
14732017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1474
1475 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1476 output when converting a zero value to a special byteorder format.
1477
f26ae15b
YQ
14782017-11-02 Yao Qi <yao.qi@linaro.org>
1479
1480 * frame.c (do_frame_register_read): Remove aspace.
1481 * jit.c (jit_frame_sniffer): Likwise.
1482 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1483 * regcache.c (regcache::regcache): Pass nullptr.
1484 (regcache_print): Caller updated.
1485 * regcache.h (regcache::regcache): Remove one constructor
1486 parameter aspace.
1487
6c6e9412
YQ
14882017-11-02 Yao Qi <yao.qi@linaro.org>
1489
1490 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1491
8b86c959
YQ
14922017-11-02 Yao Qi <yao.qi@linaro.org>
1493
1494 * breakpoint.c (insert_single_step_breakpoints): Update.
1495 * frame.c (struct frame_info) <aspace>: Add const.
1496 (frame_save_as_regcache): Add const.
1497 (get_frame_address_space): Return const address_space *.
1498 * frame.h (get_frame_address_space): Update declaration.
1499 * infrun.c (struct step_over_info) <aspace>: Add const.
1500 (set_step_over_info): Make aspace const.
1501 (displaced_step_prepare_throw): Change variable const.
1502 (resume): Likewise.
1503 (proceed): Likewise.
1504 (adjust_pc_after_break): Likewise.
1505 (save_waitstatus): Likewise.
1506 (handle_signal_stop): Likewise.
1507 (keep_going_pass_signal): Likewise.
1508 * jit.c (jit_frame_sniffer): Add const.
1509 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1510 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1511 * record-full.c (record_full_wait_1): Likewise.
1512 * regcache.c (regcache::regcache): Change parameter to const.
1513 * regcache.h (regcache::regcache): Likewise.
1514 (regcache::aspace): Return const address_space *.
1515 (regcache) <m_aspace>: Add const.
1516
a01bda52
YQ
15172017-11-02 Yao Qi <yao.qi@linaro.org>
1518
1519 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1520 * frame.c (create_sentinel_frame): Likewise.
1521 * infrun.c (displaced_step_prepare_throw): Likewise.
1522 (resume): Likewise.
1523 (thread_still_needs_step_over_bp): Likewise.
1524 (proceed): Likewise.
1525 (do_target_wait): Likewise.
1526 (adjust_pc_after_break): Likewise.
1527 (handle_syscall_event): Likewise.
1528 (save_waitstatus): Likewise.
1529 (handle_inferior_event_1): Likewise.
1530 (handle_signal_stop): Likewise.
1531 (keep_going_pass_signal): Likewise.
1532 * linux-nat.c (status_callback): Likewise.
1533 (save_stop_reason): Likewise.
1534 (resume_stopped_resumed_lwps): Likewise.
1535 * record-full.c (record_full_exec_insn): Likewise.
1536 (record_full_wait_1): Likewise.
1537 * regcache.c (get_regcache_aspace): Remove.
1538 * regcache.h (get_regcache_aspace): Remove.
1539
d999647b
YQ
15402017-11-02 Yao Qi <yao.qi@linaro.org>
1541
1542 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1543 (init_regcache_descr): Use gdbarch_num_regs.
1544 (regcache::regcache): Likewise.
1545 (regcache::get_register_status): Likewise.
1546 (regcache::assert_raw_regnum): Likewise.
1547 (regcache::cooked_read): Likewise.
1548 (regcache::cooked_read_value): Likewise.
1549 (regcache::cooked_write): Likewise.
1550 (regcache::dump): Likewise.
1551 (regcache::num_raw_registers): New method.
1552 * regcache.h (class regcache) <num_raw_registers>: New.
1553
4e888c28
YQ
15542017-11-02 Yao Qi <yao.qi@linaro.org>
1555
1556 * regcache.c (regcache::assert_regnum): New method.
1557 (regcache::invalidate): Call assert_regnum.
1558 (regcache::raw_update): Likewise.
1559 (regcache::raw_write): Likewise.
1560 (regcache::raw_read_part): Likewise.
1561 (regcache::raw_write_part): Likewise.
1562 (regcache::raw_supply): Likewise.
1563 (regcache::raw_supply_integer): Likewise.
1564 (regcache::raw_supply_zeroed): Likewise.
1565 (regcache::raw_collect): Likewise.
1566 (regcache::raw_collect_integer): Likewise.
1567 * regcache.h (regcache::assert_regnum): Declare.
1568
2e1b49b3
YQ
15692017-11-02 Yao Qi <yao.qi@linaro.org>
1570
1571 * regcache.c (regcache::dump): Remove code.
1572
6c5218df
YQ
15732017-11-02 Yao Qi <yao.qi@linaro.org>
1574
1575 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1576 Remove.
1577 <sizeof_cooked_register_status>: Remove.
1578 (init_regcache_descr): Update.
1579 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1580 (regcache::save): Likewise.
1581 (regcache::dump): Likewise.
1582
dcc31d28
JB
15832017-11-01 James Bowman <james.bowman@ftdichip.com>
1584
1585 * ft32-tdep.c (ft32_fetch_instruction): New function.
1586 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1587
3a87ae65
SM
15882017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1589
1590 * cli/cli-script.c (execute_control_command): Rename to ...
1591 (execute_control_command_1): ... this.
1592 (execute_control_command): New function.
1593
09b847f3
SM
15942017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * tracepoint.c (tfind_command): Remove const_cast.
1597
f871c485
MG
15982017-10-30 Mike Gulick <mgulick@mathworks.com>
1599
1600 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1601
b020ff80
SM
16022017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1603
1604 * common/common-utils.h (in_inclusive_range): New function.
1605 * arm-tdep.c (arm_record_extension_space): Use
1606 in_inclusive_range.
1607 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1608 * cris-tdep.c (cris_spec_reg_applicable): Use
1609 in_inclusive_range.
1610
1b81856f
PA
16112017-10-30 Pedro Alves <palves@redhat.com>
1612 Simon Marchi <simon.marchi@ericsson.com>
1613
1614 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1615 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1616
31b833b3
PA
16172017-10-30 Pedro Alves <palves@redhat.com>
1618
1619 * common/common-utils.c (string_appendf, string_vappendf): New
1620 functions.
1621 * common/common-utils.h (string_appendf, string_vappendf): New
1622 declarations.
1623 * unittests/common-utils-selftests.c (string_appendf_func)
1624 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1625 (string_vappendf_tests): New functions.
1626 (_initialize_common_utils_selftests): Register "string_appendf" and
1627 "string_vappendf tests".
1628
4a250334
PA
16292017-10-30 Pedro Alves <palves@redhat.com>
1630
1631 * unittests/common-utils-selftests.c (format_func): New typedef.
1632 (string_printf_tests, string_vprintf_tests): Tests factored out
1633 and merged to ...
1634 (test_format_func): ... this new function.
1635 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1636 test_format_func.
1637
16c5c17e
SM
16382017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * darwin-nat.c: Remove include of gdb.h.
1641
7ca51576
SM
16422017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1643
1644 * xtensa-xtregs.c: Fix formatting issues.
1645
c1342859
SM
16462017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1649
484d8d36
MD
16502017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1651
1652 PR python/21213
1653 * python/py-infthread.c (thpy_get_inferior): Increment reference
1654 of inferior before returning it.
1655
b5540b5f
SM
16562017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1657
1658 * unittests/common-utils-selftests.c (format): Add
1659 ATTRIBUTE_PRINTF.
1660
5a9dcda1
SM
16612017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1662
1663 * xml-syscall.c (struct syscall_desc): Add constructor.
1664 <name>: Change type to std::string.
1665 (syscall_desc_up): New typedef.
1666 (syscall_desc_p): Remove typeder.
1667 (DEF_VEC_P(syscall_desc_p)): Remove.
1668 (struct syscall_group_desc): Add constructor.
1669 <name>: Change type to std::string.
1670 <syscalls>: Change type to std::vector.
1671 (syscall_group_desc_up): New typedef.
1672 (syscall_group_desc_p): Remove typedef.
1673 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1674 (struct syscalls_info) <syscalls>: Change type to std::vector of
1675 unique_ptr.
1676 <groups>: Likewise.
1677 <my_gdb_datadir>: Change type to std::string.
1678 (syscalls_info_up): New typedef.
1679 (allocate_syscalls_info): Remove.
1680 (syscalls_info_free_syscalls_desc): Remove.
1681 (syscalls_info_free_syscall_group_desc): Remove.
1682 (free_syscalls_info): Remove.
1683 (make_cleanup_free_syscalls_info): Remove.
1684 (syscall_group_create_syscall_group_desc): Adjust.
1685 (syscall_group_add_syscall): Adjust.
1686 (syscall_create_syscall_desc): Adjust.
1687 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1688 (init_syscalls_info): Adjust.
1689 (syscall_group_get_group_by_name): Adjust.
1690 (xml_get_syscall_number): Adjust.
1691 (xml_get_syscall_name): Adjust.
1692 (xml_list_of_syscalls): Adjust.
1693 (xml_list_syscalls_by_group): Adjust.
1694 (xml_list_of_groups): Adjust.
1695
45461e0d
SM
16962017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1697
1698 * probe.h: Don't include gdb_vecs.h.
1699 (DEF_VEC_P (probe_p)): Remove.
1700 (find_probes_in_objfile): Return an std::vector.
1701 * probe.c (find_probes_in_objfile): Likewise.
1702 * breakpoint.c (breakpoint_objfile_data)
1703 <longjmp_probes>: Change type to std::vector.
1704 <exception_probes>: Likewise.
1705 (free_breakpoint_probes): Don't manually free vectors.
1706 (create_longjmp_master_breakpoint): Adjust.
1707 (create_exception_master_breakpoint): Adjust.
1708 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1709 parameter type, adjust.
1710 (svr4_create_solib_event_breakpoints): Adjust.
1711
43dce439
SM
17122017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1713
1714 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1715 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1716 with new.
1717 (free_breakpoint_probes): Rename to ...
1718 (free_breakpoint_objfile_data): ... this, and call delete on
1719 bp_objfile_data..
1720
6a1b9516
SM
17212017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1724 (loaded_script_ptr): Remove typedef.
1725 (DEF_VEC_P (loaded_script_ptr)): Remove.
1726 (struct collect_matching_scripts_data): Add constructor.
1727 <scripts_p>: Change type to (pointer to) std::vector.
1728 (collect_matching_scripts_data): Adjust.
1729 (sort_scripts_by_name): Make suitable for std::sort.
1730 (print_scripts): Don't sort vector, adjust to std::vector.
1731 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1732
593e3209
SM
17332017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1734
1735 * symfile.c (filename_language): Make struct, not typedef. Add
1736 constructor.
1737 <ext>: Change type to std::string.
1738 (DEF_VEC_O (filename_language)): Remove.
1739 (filename_language_table): Change type to std::vector.
1740 (add_filename_language): Adjust.
1741 (set_ext_lang_command): Adjust.
1742 (info_ext_lang_command): Adjust.
1743 (deduce_language_from_filename): Adjust.
1744 (class scoped_restore_filename_language_table): Remove.
1745 (test_filename_language): Use scoped_restore.
1746 (test_set_ext_lang_command): Use scoped_restore, adjust to
1747 std::vector change.
1748
32fa66eb
SM
17492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * symfile.c: Include selftest.h.
1752 (class scoped_restore_filename_language_table): New.
1753 (test_filename_language): New test.
1754 (test_set_ext_lang_command): New test.
1755 (_initialize_symfile): Register tests.
1756
4a27f119
KS
17572017-10-27 Keith Seitz <keiths@redhat.com>
1758
1759 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1760 in the bp_location, falling back to find_pc_sect_function when
1761 needed.
1762 (add_location_to_breakpoint): Save sal->symbol.
1763 * breakpoint.h (struct bp_location) <symbol>: New field.
1764 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1765 * symtab.h (struct symtab_and_line) <symbol>: New field.
1766
a43f3893
PF
17672017-10-26 Patrick Frants <osscontribute@gmail.com>
1768
7453e6b2 1769 PR gdb/13669
a43f3893
PF
1770 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1771 to rewind obstack.
1772
23cc4e1b
PA
17732017-10-26 Pedro Alves <palves@redhat.com>
1774
1775 * remote.c (remote_async_terminal_ours_p): Delete.
1776 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1777 Remove references to 'remote_async_terminal_ours_p'.
1778
6abc18bb
YQ
17792017-10-26 Yao Qi <yao.qi@linaro.org>
1780
1781 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1782
bd522513
YQ
17832017-10-26 Yao Qi <yao.qi@linaro.org>
1784
1785 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1786 aspace const.
1787 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1788 Likewise.
1789 * breakpoint.c (bpstat_check_location): Remove cast.
1790 (breakpoint_hit_catch_fork): Make aspce const.
1791 (breakpoint_hit_catch_solib): Likewise.
1792 (breakpoint_hit_catch_exec): Likewise.
1793 (breakpoint_hit_ranged_breakpoint): Likewise.
1794 (breakpoint_hit_watchpoint): Likewise.
1795 (base_breakpoint_breakpoint_hit): Likewise.
1796 (bkpt_breakpoint_hit): Likewise.
1797 (dprintf_breakpoint_hit): Likewise.
1798 (tracepoint_breakpoint_hit): Likewise.
1799 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1800
accd0bcd
YQ
18012017-10-26 Yao Qi <yao.qi@linaro.org>
1802
1803 * breakpoint.c (breakpoint_location_address_match): Change
1804 "struct address_space *" to "const address_space".
1805 (breakpoint_location_address_range_overlap): Likewise.
1806 (breakpoint_here_p): Likewise.
1807 (breakpoint_in_range_p): Likewise.
1808 (moribund_breakpoint_here_p): Likewise.
1809 (bp_location_inserted_here_p): Likewise.
1810 (software_breakpoint_inserted_here_p): Likewise.
1811 (hardware_breakpoint_inserted_here_p): Likewise.
1812 (hardware_watchpoint_inserted_in_range): Likewise.
1813 (bpstat_check_location): Likewise.
1814 (bpstat_stop_status): Likewise.
1815 (breakpoint_address_match): Likewise.
1816 (breakpoint_address_match_range): Likewise.
1817 (breakpoint_location_address_match): Likewise.
1818 (breakpoint_location_address_range_overlap): Likewise.
1819 (insert_single_step_breakpoint): Likewise.
1820 (breakpoint_has_location_inserted_here): Likewise.
1821 (single_step_breakpoint_inserted_here_p): Likewise.
1822 (pc_at_non_inline_function): Likewise.
1823 * breakpoint.h (bpstat_stop_status): Update declaration.
1824 (breakpoint_here_p): Likewise.
1825 (breakpoint_in_range_p): Likewise.
1826 (moribund_breakpoint_here_p): Likewise.
1827 (breakpoint_inserted_here_p): Likewise.
1828 (software_breakpoint_inserted_here_p): Likewise.
1829 (hardware_breakpoint_inserted_here_p): Likewise.
1830 (breakpoint_has_location_inserted_here): Likewise.
1831 (single_step_breakpoint_inserted_here_p): Likewise.
1832 (hardware_watchpoint_inserted_in_range): Likewise.
1833 (breakpoint_address_match): Likewise.
1834 (insert_single_step_breakpoint): Likewise.
1835 (pc_at_non_inline_function): Likewise.
1836 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1837 * record.c (record_check_stopped_by_breakpoint): Likewise.
1838 * record.h (record_check_stopped_by_breakpoint): Likewise.
1839 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1840
ac7936df
YQ
18412017-10-25 Yao Qi <yao.qi@linaro.org>
1842
1843 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1844 regcache->arch () instead get_regcache_arch.
1845 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1846 Likewise.
1847 (aarch64_fbsd_store_inferior_registers): Likewise.
1848 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1849 (store_gregs_to_thread): Likewise.
1850 (fetch_fpregs_from_thread): Likewise.
1851 (store_fpregs_to_thread): Likewise.
1852 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1853 (aarch64_store_return_value): Likewise.
1854 (aarch64_software_single_step): Likewise.
1855 * aix-thread.c (aix_thread_wait): Likewise.
1856 (supply_reg32): Likewise.
1857 (supply_sprs64): Likewise.
1858 (supply_sprs32): Likewise.
1859 (fill_gprs64): Likewise.
1860 (fill_gprs32): Likewise.
1861 (fill_sprs64): Likewise.
1862 (fill_sprs32): Likewise.
1863 (store_regs_user_thread): Likewise.
1864 (store_regs_kernel_thread): Likewise.
1865 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1866 (alphabsd_store_inferior_registers): Likewise.
1867 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1868 (alpha_store_return_value): Likewise.
1869 (alpha_deal_with_atomic_sequence): Likewise.
1870 (alpha_next_pc): Likewise.
1871 (alpha_software_single_step): Likewise.
1872 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1873 (amd64bsd_store_inferior_registers): Likewise.
1874 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1875 Likewise.
1876 (amd64_linux_store_inferior_registers): Likewise.
1877 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1878 (amd64_collect_native_gregset): Likewise.
1879 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1880 (amd64obsd_collect_uthread): Likewise.
1881 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1882 (amd64_collect_fpregset): Likewise.
1883 (amd64_supply_fxsave): Likewise.
1884 (amd64_supply_xsave): Likewise.
1885 (amd64_collect_fxsave): Likewise.
1886 (amd64_collect_xsave): Likewise.
1887 * arc-tdep.c (arc_write_pc): Likewise.
1888 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1889 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1890 (arm_fbsd_store_inferior_registers): Likewise.
1891 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1892 (store_vfp_regs): Likewise.
1893 (arm_linux_fetch_inferior_registers): Likewise.
1894 (arm_linux_store_inferior_registers): Likewise.
1895 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1896 (arm_linux_sigreturn_next_pc): Likewise.
1897 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1898 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1899 (fetch_register): Likewise.
1900 (store_register): Likewise.
1901 * arm-tdep.c (arm_is_thumb): Likewise.
1902 (displaced_in_arm_mode): Likewise.
1903 (bx_write_pc): Likewise.
1904 (arm_get_next_pcs_addr_bits_remove): Likewise.
1905 (arm_software_single_step): Likewise.
1906 (arm_extract_return_value): Likewise.
1907 (arm_store_return_value): Likewise.
1908 (arm_write_pc): Likewise.
1909 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1910 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1911 (bsd_uthread_store_registers): Likewise.
1912 * core-regset.c (fetch_core_registers): Likewise.
1913 * corelow.c (get_core_registers): Likewise.
1914 * cris-tdep.c (cris_store_return_value): Likewise.
1915 (cris_extract_return_value): Likewise.
1916 (find_step_target): Likewise.
1917 (find_step_target): Likewise.
1918 (cris_software_single_step): Likewise.
1919 * ctf.c (ctf_fetch_registers): Likewise.
1920 * darwin-nat.c (cancel_breakpoint): Likewise.
1921 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1922 * frv-tdep.c (frv_extract_return_value): Likewise.
1923 * ft32-tdep.c (ft32_store_return_value): Likewise.
1924 (ft32_extract_return_value): Likewise.
1925 * go32-nat.c (fetch_register): Likewise.
1926 (go32_fetch_registers): Likewise.
1927 (go32_store_registers): Likewise.
1928 (store_register): Likewise.
1929 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1930 (h8300_store_return_value): Likewise.
1931 * hppa-linux-nat.c (fetch_register): Likewise.
1932 (store_register): Likewise.
1933 (hppa_linux_fetch_inferior_registers): Likewise.
1934 (hppa_linux_store_inferior_registers): Likewise.
1935 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1936 (i386_darwin_store_inferior_registers): Likewise.
1937 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1938 (gnu_store_registers): Likewise.
1939 * i386-linux-nat.c (fetch_register): Likewise.
1940 (store_register): Likewise.
1941 (supply_gregset): Likewise.
1942 (fill_gregset): Likewise.
1943 (i386_linux_fetch_inferior_registers): Likewise.
1944 (i386_linux_store_inferior_registers): Likewise.
1945 (i386_linux_resume): Likewise.
1946 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1947 Likewise.
1948 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1949 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1950 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1951 (i386obsd_collect_uthread): Likewise.
1952 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1953 (i386_supply_gregset): Likewise.
1954 (i386_collect_gregset): Likewise.
1955 (i386_supply_fpregset): Likewise.
1956 (i386_collect_fpregset): Likewise.
1957 (i386_mpx_bd_base): Likewise.
1958 * i386-v4-nat.c (supply_fpregset): Likewise.
1959 (fill_fpregset): Likewise.
1960 * i387-tdep.c (i387_supply_fsave): Likewise.
1961 (i387_collect_fsave): Likewise.
1962 (i387_supply_fxsave): Likewise.
1963 (i387_collect_fxsave): Likewise.
1964 (i387_supply_xsave): Likewise.
1965 (i387_collect_xsave): Likewise.
1966 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1967 (ia64_linux_store_registers): Likewise.
1968 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1969 (ia64_extract_return_value): Likewise.
1970 (ia64_store_return_value): Likewise.
1971 (find_func_descr): Likewise.
1972 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1973 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1974 (inf_ptrace_store_registers): Likewise.
1975 * infrun.c (use_displaced_stepping): Likewise.
1976 (displaced_step_prepare_throw): Likewise.
1977 (resume): Likewise.
1978 (proceed): Likewise.
1979 (do_target_wait): Likewise.
1980 (adjust_pc_after_break): Likewise.
1981 (handle_inferior_event_1): Likewise.
1982 (handle_signal_stop): Likewise.
1983 (save_infcall_suspend_state): Likewise.
1984 (restore_infcall_suspend_state): Likewise.
1985 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1986 * jit.c (jit_frame_prev_register): Likewise.
1987 * linux-nat.c (save_stop_reason): Likewise.
1988 (linux_nat_wait_1): Likewise.
1989 (resume_stopped_resumed_lwps): Likewise.
1990 * linux-record.c (record_linux_sockaddr): Likewise.
1991 (record_linux_msghdr): Likewise.
1992 (record_linux_system_call): Likewise.
1993 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1994 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1995 (lm32_store_return_value): Likewise.
1996 * m32c-tdep.c (m32c_read_flg): Likewise.
1997 (m32c_pseudo_register_read): Likewise.
1998 (m32c_pseudo_register_write): Likewise.
1999 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2000 (m32r_linux_collect_gregset): Likewise.
2001 * m32r-tdep.c (m32r_store_return_value): Likewise.
2002 (m32r_extract_return_value): Likewise.
2003 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2004 (m68kbsd_collect_fpregset): Likewise.
2005 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2006 * m68k-linux-nat.c (fetch_register): Likewise.
2007 (old_fetch_inferior_registers): Likewise.
2008 (old_store_inferior_registers): Likewise.
2009 (store_regs): Likewise.
2010 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2011 (m68k_svr4_store_return_value): Likewise.
2012 * m88k-tdep.c (m88k_store_arguments): Likewise.
2013 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2014 (mi_cmd_data_write_register_values): Likewise.
2015 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2016 (mips_fbsd_store_inferior_registers): Likewise.
2017 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2018 (mips_fbsd_supply_gregs): Likewise.
2019 (mips_fbsd_collect_fpregs): Likewise.
2020 (mips_fbsd_collect_gregs): Likewise.
2021 (mips_fbsd_supply_fpregset): Likewise.
2022 (mips_fbsd_collect_fpregset): Likewise.
2023 (mips_fbsd_supply_gregset): Likewise.
2024 (mips_fbsd_collect_gregset): Likewise.
2025 * mips-linux-nat.c (supply_gregset): Likewise.
2026 (fill_gregset): Likewise.
2027 (supply_fpregset): Likewise.
2028 (fill_fpregset): Likewise.
2029 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2030 (mips_fill_gregset): Likewise.
2031 (mips_supply_fpregset): Likewise.
2032 (mips_fill_fpregset): Likewise.
2033 (mips64_supply_gregset): Likewise.
2034 (micromips_linux_sigframe_validate): Likewise.
2035 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2036 (mipsnbsd_fetch_inferior_registers): Likewise.
2037 (mipsnbsd_store_inferior_registers): Likewise.
2038 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2039 (mipsnbsd_supply_gregset): Likewise.
2040 (mipsnbsd_iterate_over_regset_sections): Likewise.
2041 (mipsnbsd_supply_reg): Likewise.
2042 (mipsnbsd_supply_fpreg): Likewise.
2043 * mips-tdep.c (mips_in_frame_stub): Likewise.
2044 (mips_dummy_id): Likewise.
2045 (is_octeon_bbit_op): Likewise.
2046 (micromips_bc1_pc): Likewise.
2047 (extended_mips16_next_pc): Likewise.
2048 (mips16_next_pc): Likewise.
2049 (deal_with_atomic_sequence): Likewise.
2050 * moxie-tdep.c (moxie_process_readu): Likewise.
2051 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2052 * nto-procfs.c (procfs_store_registers): Likewise.
2053 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2054 (ppcfbsd_store_inferior_registers): Likewise.
2055 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2056 (fetch_altivec_register): Likewise.
2057 (get_spe_registers): Likewise.
2058 (fetch_spe_register): Likewise.
2059 (fetch_altivec_registers): Likewise.
2060 (fetch_all_gp_regs): Likewise.
2061 (fetch_all_fp_regs): Likewise.
2062 (store_vsx_register): Likewise.
2063 (store_altivec_register): Likewise.
2064 (set_spe_registers): Likewise.
2065 (store_spe_register): Likewise.
2066 (store_altivec_registers): Likewise.
2067 (store_all_gp_regs): Likewise.
2068 (store_all_fp_regs): Likewise.
2069 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2070 (ppc_linux_collect_gregset): Likewise.
2071 (ppc_canonicalize_syscall): Likewise.
2072 (ppc_linux_record_signal): Likewise.
2073 (ppu2spu_prev_register): Likewise.
2074 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2075 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2076 (ppcobsd_store_registers): Likewise.
2077 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2078 Likewise.
2079 (ppc_ravenscar_generic_store_registers): Likewise.
2080 * procfs.c (procfs_fetch_registers): Likewise.
2081 (procfs_store_registers): Likewise.
2082 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2083 (ravenscar_store_registers): Likewise.
2084 (ravenscar_prepare_to_store): Likewise.
2085 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2086 * record-full.c (record_full_wait_1): Likewise.
2087 (record_full_registers_change): Likewise.
2088 (record_full_store_registers): Likewise.
2089 (record_full_core_fetch_registers): Likewise.
2090 (record_full_save): Likewise.
2091 (record_full_goto_insn): Likewise.
2092 * regcache.c (regcache_register_size): Likewise.
2093 (get_regcache_arch): Remove.
2094 (regcache_read_pc): Likewise.
2095 * regcache.h (get_regcache_arch): Remove.
2096 * remote-sim.c (gdbsim_fetch_register): Likewise.
2097 (gdbsim_store_register): Likewise.
2098 * remote.c (fetch_register_using_p): Likewise.
2099 (send_g_packet): Likewise.
2100 (remote_prepare_to_store): Likewise.
2101 (store_registers_using_G): Likewise.
2102 * reverse.c (save_bookmark_command): Likewise.
2103 (goto_bookmark_command): Likewise.
2104 * rs6000-aix-tdep.c (branch_dest): Likewise.
2105 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2106 (fetch_register): Likewise.
2107 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2108 (ppc_collect_reg): Likewise.
2109 (ppc_collect_gregset): Likewise.
2110 (ppc_collect_fpregset): Likewise.
2111 (ppc_collect_vsxregset): Likewise.
2112 (ppc_collect_vrregset): Likewise.
2113 (ppc_displaced_step_hw_singlestep): Likewise.
2114 (rs6000_pseudo_register_read): Likewise.
2115 (rs6000_pseudo_register_write): Likewise.
2116 * s390-linux-nat.c (supply_gregset): Likewise.
2117 (fill_gregset): Likewise.
2118 (s390_linux_fetch_inferior_registers): Likewise.
2119 * s390-linux-tdep.c (s390_write_pc): Likewise.
2120 (s390_software_single_step): Likewise.
2121 (s390_all_but_pc_registers_record): Likewise.
2122 (s390_linux_syscall_record): Likewise.
2123 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2124 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2125 (shnbsd_store_inferior_registers): Likewise.
2126 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2127 (sh_extract_return_value_fpu): Likewise.
2128 (sh_store_return_value_nofpu): Likewise.
2129 (sh_corefile_supply_regset): Likewise.
2130 (sh_corefile_collect_regset): Likewise.
2131 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2132 (sh64_store_return_value): Likewise.
2133 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2134 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2135 (sparc_store_inferior_registers): Likewise.
2136 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2137 (sparc_ravenscar_prepare_to_store): Likewise.
2138 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2139 (sparc_analyze_control_transfer): Likewise.
2140 (sparc_step_trap): Likewise.
2141 (sparc_software_single_step): Likewise.
2142 (sparc32_gdbarch_init): Likewise.
2143 (sparc_supply_rwindow): Likewise.
2144 (sparc_collect_rwindow): Likewise.
2145 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2146 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2147 (sparc64nbsd_collect_gregset): Likewise.
2148 (sparc64nbsd_supply_fpregset): Likewise.
2149 (sparc64nbsd_collect_fpregset): Likewise.
2150 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2151 (sparc64_supply_gregset): Likewise.
2152 (sparc64_collect_gregset): Likewise.
2153 (sparc64_supply_fpregset): Likewise.
2154 (sparc64_collect_fpregset): Likewise.
2155 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2156 * spu-tdep.c (spu_unwind_sp): Likewise.
2157 (spu2ppu_prev_register): Likewise.
2158 (spu_memory_remove_breakpoint): Likewise.
2159 * stack.c (return_command): Likewise.
2160 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2161 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2162 * tracefile.c (trace_save_ctf): Likewise.
2163 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2164 (do_windows_store_inferior_registers): Likewise.
2165 (windows_resume): Likewise.
2166 * xtensa-linux-nat.c (fill_gregset): Likewise.
2167 (supply_gregset_reg): Likewise.
2168 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2169 (xtensa_register_read_masked): Likewise.
2170 (xtensa_supply_gregset): Likewise.
2171 (xtensa_extract_return_value): Likewise.
2172 (xtensa_store_return_value): Likewise.
2173
edd079d9
UW
21742017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2175
2176 * doublest.c (floatformat_from_string): New function.
2177 * doublest.h (floatformat_from_string): Add prototype.
2178
2179 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2180 (OP_FLOAT): ... this.
2181 * expression.h: Do not include "doublest.h".
2182 (union exp_element): Replace doubleconst and decfloatconst by
2183 new element floatconst.
2184 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2185 (ada_evaluate_subexp): Likewise.
2186 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2187 OP_DOUBLE and OP_DECFLOAT.
2188 * expprint.c (print_subexp_standard): Likewise.
2189 (dump_subexp_body_standard): Likewise.
2190 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2191
2192 * parse.c: Include "dfp.h".
2193 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2194 (write_exp_elt_floatcst): New function.
2195 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2196 and OP_DECFLOAT.
2197 (operator_check_standard): Likewise.
2198 (parse_float): Do not accept suffix. Take type as input. Return bool.
2199 Return target format buffer instead of host DOUBLEST.
2200 Use floatformat_from_string and decimal_from_string to parse
2201 either binary or decimal floating-point types.
2202 (parse_c_float): Remove.
2203 * parser-defs.h: Do not include "doublest.h".
2204 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2205 (write_exp_elt_floatcst): Add prototype.
2206 (parse_float): Update prototype.
2207 (parse_c_float): Remove.
2208
2209 * c-exp.y: Do not include "dfp.h".
2210 (typed_val_float): Use byte buffer instead of DOUBLEST.
2211 (typed_val_decfloat): Remove.
2212 (DECFLOAT): Remove.
2213 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2214 (parse_number): Update to new parse_float interface.
2215 Parse suffixes and determine type before calling parse_float.
2216 Handle decimal and binary FP types the same way.
2217
2218 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2219 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2220 (parse_number): Update to new parse_float interface.
2221 Parse suffixes and determine type before calling parse_float.
2222
2223 * f-exp.y: Replace dval by typed_val_float.
2224 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2225 (parse_number): Use parse_float instead of atof.
2226
2227 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2228 (parse_go_float): Remove.
2229 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2230 (parse_number): Call parse_float instead of parse_go_float.
2231 Parse suffixes and determine type before calling parse_float.
2232
2233 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2234 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2235 (parse_number): Update to new parse_float interface.
2236 Parse suffixes and determine type before calling parse_float.
2237
2238 * m2-exp.y: Replace dval by byte buffer val.
2239 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2240 (parse_number): Call parse_float instead of atof.
2241
2242 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2243 (lex_number): Call parse_float instead of strtod.
2244 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2245 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2246 Use write_exp_elt_floatcst.
2247 (unit_testing): Remove static variable.
2248 (rust_type): Do not check unit_testing.
2249 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2250
2251 * ada-exp.y (type_float, type_double): Remove.
2252 (typed_val_float): Use byte buffer instead of DOUBLEST.
2253 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2254 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2255
cc628f3d
AH
22562017-10-25 Alan Hayward <alan.hayward@arm.com>
2257
2258 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2259 * arch/aarch64.h: New file.
2260
09a7c6aa
UW
22612017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2262
2263 * dfp.h (decimal_from_string): Use const reference for argument.
2264 * dfp.c (decimal_from_string): Likewise.
2265
8ba0dd51
UW
22662017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2267
2268 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2269 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2270 * mips-tdep.c (mips_print_fp_register): Likewise.
2271
16e812b2
UW
22722017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2273
2274 * common/format.h (enum argclass): Replace decfloat_arg by
2275 dec32float_arg, dec64float_arg, and dec128float_arg.
2276 * common/format.c (parse_format_string): Update to return
2277 new decimal float argument classes.
2278
2279 * printcmd.c (printf_decfloat): Rename to ...
2280 (printf_floating): ... this. Add argclass argument, and use it
2281 instead of parsing the format string again. Add support for
2282 binary floating-point values, using floatformat_to_string.
2283 Convert value to the target format if it doesn't already match.
2284 (ui_printf): Call printf_floating instead of printf_decfloat,
2285 also for double_arg / long_double_arg. Pass argclass.
2286
2287 * dfp.c (decimal_to_string): Add format string argument.
2288 * dfp.h (decimal_to_string): Likewise.
2289
2290 * doublest.c (floatformat_to_string): Add format string argument.
2291 * doublest.h (floatformat_to_string): Likewise.
2292
fdf0cbc2
UW
22932017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2294
2295 * doublest.c (floatformat_precision): New routine.
2296 (floatformat_to_string): Likewise.
2297 * doublest.c (floatformat_to_string): Add prototype.
2298
2299 * printcmd.c (print_scalar_formatted): Only call print_floating
2300 on floating-point types.
2301 * valprint.c: Do not include "floatformat.h".
2302 (generic_val_print_decfloat): Remove.
2303 (generic_val_print): Call generic_val_print_float for both
2304 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2305 (print_floating): Use floatformat_to_string. Handle decimal float.
2306 (print_decimal_floating): Remove, merge into floatformat_to_string.
2307 * value.h (print_decimal_floating): Remove.
2308
2309 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2310
5033013f
UW
23112017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2312
2313 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2314
a664f67e
SM
23152017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2316
2317 * memattr.h: Don't include vec.h.
2318 (struct mem_attrib): Initialize fields.
2319 <unknown>: New static method.
2320 (struct mem_region): Add constructors, operator<, initialize
2321 fields.
2322 * memattr.c: Include algorithm.
2323 (default_mem_attrib, unknown_mem_attrib): Remove.
2324 (user_mem_region_list): New global.
2325 (target_mem_region_list, mem_region_list): Change type to
2326 std::vector<mem_region>.
2327 (mem_use_target): Now a function.
2328 (target_mem_regions_valid): Change type to bool.
2329 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2330 (require_user_regions): Adjust.
2331 (require_target_regions): Adjust.
2332 (create_mem_region): Adjust.
2333 (lookup_mem_region): Adjust.
2334 (invalidate_target_mem_regions): Adjust.
2335 (mem_clear): Rename to...
2336 (user_mem_clear): ... this, and adjust.
2337 (mem_command): Adjust.
2338 (info_mem_command): Adjust.
2339 (mem_enable, enable_mem_command, mem_disable,
2340 disable_mem_command): Adjust.
2341 (mem_delete): Adjust.
2342 (delete_mem_command): Adjust.
2343 * memory-map.h (parse_memory_map): Return an std::vector.
2344 * memory-map.c (parse_memory_map): Likewise.
2345 (struct memory_map_parsing_data): Add constructor.
2346 <memory_map>: Point to std::vector.
2347 (memory_map_start_memory): Adjust.
2348 (memory_map_end_memory): Adjust.
2349 (memory_map_end_property): Adjust.
2350 (clear_result): Remove.
2351 * remote.c (remote_memory_map): Return an std::vector.
2352 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2353 Remove.
2354 (target_debug_print_mem_region_vector): New.
2355 * target-delegates.c: Regenerate.
2356 * target.h (mem_region_vector): New typedef.
2357 (to_memory_map): Return mem_region_vector.
2358 (target_memory_map): Return an std::vector.
2359 * target.c (target_memory_map): Return an std::vector.
2360 (flash_erase_command): Adjust.
2361
6e17c565
SM
23622017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2363
2364 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2365 Change type to std::string.
2366 (memory_map_start_property): Adjust.
2367 (memory_map_end_property): Adjust.
2368
cfba9872
SM
23692017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2370
2371 * infrun.h: Include common/byte-vector.h.
2372 (struct displaced_step_closure): New struct.
2373 (struct buf_displaced_step_closure): New struct.
2374 * infrun.c (displaced_step_closure::~displaced_step_closure):
2375 Provide default implementation.
2376 (displaced_step_clear): Deallocate step closure with delete.
2377 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2378 (aarch64_displaced_step_closure): ... this, extend
2379 displaced_step_closure.
2380 (aarch64_displaced_step_data) <dsc>: Change type to
2381 aarch64_displaced_step_closure.
2382 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2383 unique_ptr.
2384 (aarch64_displaced_step_fixup): Add cast for displaced step
2385 closure.
2386 * amd64-tdep.c (displaced_step_closure): Rename to ...
2387 (amd64_displaced_step_closure): ... this, extend
2388 displaced_step_closure.
2389 <insn_buf>: Change type to std::vector<gdb_byte>.
2390 <max_len>: Remove.
2391 (fixup_riprel): Change type of DSC parameter, adjust to type
2392 change of insn_buf.
2393 (fixup_displaced_copy): Change type of DSC parameter.
2394 (amd64_displaced_step_copy_insn): Instantiate
2395 amd64_displaced_step_closure.
2396 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2397 to type change of insn_buf.
2398 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2399 parameter DSC.
2400 (arm_linux_copy_svc): Likewise.
2401 (cleanup_kernel_helper_return): Likewise.
2402 (arm_catch_kernel_helper_return): Likewise.
2403 (arm_linux_displaced_step_copy_insn): Instantiate
2404 arm_displaced_step_closure.
2405 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2406 (displaced_read_reg): Change type of parameter DSC.
2407 (branch_write_pc): Likewise.
2408 (load_write_pc): Likewise.
2409 (alu_write_pc): Likewise.
2410 (displaced_write_reg): Likewise.
2411 (arm_copy_unmodified): Likewise.
2412 (thumb_copy_unmodified_32bit): Likewise.
2413 (thumb_copy_unmodified_16bit): Likewise.
2414 (cleanup_preload): Likewise.
2415 (install_preload): Likewise.
2416 (arm_copy_preload): Likewise.
2417 (thumb2_copy_preload): Likewise.
2418 (install_preload_reg): Likewise.
2419 (arm_copy_preload_reg): Likewise.
2420 (cleanup_copro_load_store): Likewise.
2421 (install_copro_load_store): Likewise.
2422 (arm_copy_copro_load_store) Likewise.
2423 (thumb2_copy_copro_load_store): Likewise.
2424 (cleanup_branch): Likewise.
2425 (install_b_bl_blx): Likewise.
2426 (arm_copy_b_bl_blx): Likewise.
2427 (thumb2_copy_b_bl_blx): Likewise.
2428 (thumb_copy_b): Likewise.
2429 (install_bx_blx_reg): Likewise.
2430 (arm_copy_bx_blx_reg): Likewise.
2431 (thumb_copy_bx_blx_reg): Likewise.
2432 (cleanup_alu_imm): Likewise.
2433 (arm_copy_alu_imm): Likewise.
2434 (thumb2_copy_alu_imm): Likewise.
2435 (cleanup_alu_reg): Likewise.
2436 (install_alu_reg): Likewise.
2437 (arm_copy_alu_reg): Likewise.
2438 (thumb_copy_alu_reg): Likewise.
2439 (cleanup_alu_shifted_reg): Likewise.
2440 (install_alu_shifted_reg): Likewise.
2441 (arm_copy_alu_shifted_reg): Likewise.
2442 (cleanup_load): Likewise.
2443 (cleanup_store): Likewise.
2444 (arm_copy_extra_ld_st): Likewise.
2445 (install_load_store): Likewise.
2446 (thumb2_copy_load_literal): Likewise.
2447 (thumb2_copy_load_reg_imm): Likewise.
2448 (arm_copy_ldr_str_ldrb_strb): Likewise.
2449 (cleanup_block_load_all): Likewise.
2450 (cleanup_block_store_pc): Likewise.
2451 (cleanup_block_load_pc): Likewise.
2452 (arm_copy_block_xfer): Likewise.
2453 (thumb2_copy_block_xfer): Likewise.
2454 (cleanup_svc): Likewise.
2455 (install_svc): Likewise.
2456 (arm_copy_svc): Likewise.
2457 (thumb_copy_svc): Likewise.
2458 (arm_copy_undef): Likewise.
2459 (thumb_32bit_copy_undef): Likewise.
2460 (arm_copy_unpred): Likewise.
2461 (arm_decode_misc_memhint_neon): Likewise.
2462 (arm_decode_unconditional): Likewise.
2463 (arm_decode_miscellaneous): Likewise.
2464 (arm_decode_dp_misc): Likewise.
2465 (arm_decode_ld_st_word_ubyte): Likewise.
2466 (arm_decode_media): Likewise.
2467 (arm_decode_b_bl_ldmstm): Likewise.
2468 (arm_decode_ext_reg_ld_st): Likewise.
2469 (thumb2_decode_dp_shift_reg): Likewise.
2470 (thumb2_decode_ext_reg_ld_st): Likewise.
2471 (arm_decode_svc_copro): Likewise.
2472 (thumb2_decode_svc_copro): Likewise.
2473 (install_pc_relative): Likewise.
2474 (thumb_copy_pc_relative_16bit): Likewise.
2475 (thumb_decode_pc_relative_16bit): Likewise.
2476 (thumb_copy_pc_relative_32bit): Likewise.
2477 (thumb_copy_16bit_ldr_literal): Likewise.
2478 (thumb_copy_cbnz_cbz): Likewise.
2479 (thumb2_copy_table_branch): Likewise.
2480 (cleanup_pop_pc_16bit_all): Likewise.
2481 (thumb_copy_pop_pc_16bit): Likewise.
2482 (thumb_process_displaced_16bit_insn): Likewise.
2483 (decode_thumb_32bit_ld_mem_hints): Likewise.
2484 (thumb_process_displaced_32bit_insn): Likewise.
2485 (thumb_process_displaced_insn): Likewise.
2486 (arm_process_displaced_insn): Likewise.
2487 (arm_displaced_init_closure): Likewise.
2488 (arm_displaced_step_fixup): Add cast for closure.
2489 * arm-tdep.h: Include infrun.h.
2490 (displaced_step_closure): Rename to ...
2491 (arm_displaced_step_closure): ... this, extend
2492 displaced_step_closure.
2493 <u::svc::copy_svc_os>: Change type of parameter DSC.
2494 <cleanup>: Likewise.
2495 (arm_process_displaced_insn): Likewise.
2496 (arm_displaced_init_closure): Likewise.
2497 (displaced_read_reg): Likewise.
2498 (displaced_write_reg): Likewise.
2499 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2500 Adjust.
2501 * i386-tdep.h: Include infrun.h.
2502 (i386_displaced_step_closure): New typedef.
2503 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2504 i386_displaced_step_closure.
2505 (i386_displaced_step_fixup): Adjust.
2506 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2507 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2508 and unique_ptr.
2509 (ppc_displaced_step_fixup): Adjust.
2510 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2511 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2512 and unique_ptr.
2513 (s390_displaced_step_fixup): Adjust.
2514
b392b304
SM
25152017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2516
2517 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2518 Remove declarations.
2519
d5833c62
TT
25202017-10-20 Tom Tromey <tom@tromey.com>
2521
2522 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2523 std::vector.
2524 (gdb_bfd_record_inclusion): Update.
2525 (bfdp): Remove typedef.
2526
06d5bbc8
TT
25272017-10-20 Tom Tromey <tom@tromey.com>
2528
2529 * gdb_bfd.c (gdb_bfd_ref): Use new.
2530 (struct gdb_bfd_data): Add constructor, destructor, and member
2531 initializers.
2532 (gdb_bfd_unref): Use delete.
2533
2712ce2e
TT
25342017-10-20 Tom Tromey <tom@tromey.com>
2535
2536 * exec.c (exec_file_attach): Use new_bfd_ref.
2537 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2538 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2539 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2540 new_bfd_ref.
2541 * gdb_bfd.h (new_bfd_ref): New function.
2542
fcc8fb2f
PA
25432017-10-20 Pedro Alves <palves@redhat.com>
2544
2545 * main.c (captured_command_loop): Add attribute noinline.
2546
4c2287b0
SM
25472017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2548
2549 * interps.c (struct interp_factory): Add constructor.
2550 (interp_factory_p): Remove typedef.
2551 (DEF_VEC_P(interp_factory_p)): Remove.
2552 (interpreter_factories): Change type to std::vector.
2553 (interp_factory_register): Adjust.
2554 (interp_lookup): Adjust.
2555 (interpreter_completer): Adjust.
2556
3d415c26
TT
25572017-10-19 Tom Tromey <tom@tromey.com>
2558
2559 * break-catch-syscall.c (catch_syscall_completer): Use
2560 std::string, gdb::unique_xmalloc_ptr.
2561
395423c4
TT
25622017-10-19 Tom Tromey <tom@tromey.com>
2563
2564 * infcall.c (call_function_by_hand_dummy): Use std::string.
2565
54f70bc1
TT
25662017-10-19 Tom Tromey <tom@tromey.com>
2567
2568 * mi/mi-main.c (mi_cmd_execute): Update.
2569 * top.h (prepare_execute_command): Return scoped_value_mark.
2570 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2571 Add move constructor.
2572 * top.c (prepare_execute_command): Return scoped_value_mark.
2573 (execute_command): Update.
2574
63929e84
PA
25752017-10-19 Pedro Alves <palves@redhat.com>
2576
2577 * xml-support.c (xml_fetch_content_from_file): Check fread's
2578 return.
2579
a75868f5
PA
25802017-10-19 Pedro Alves <palves@redhat.com>
2581
2582 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2583 async.
2584 (handle_error_fd): New function.
2585 (ser_base_async): Add/delete an event loop file handler for
2586 error_fd.
2587
2edf834e
PA
25882017-10-19 Pedro Alves <palves@redhat.com>
2589
2590 * xml-support.c (xml_fetch_content_from_file): Don't read in
2591 chunks. Instead use fseek to determine the file's size, and read
2592 it in one go.
2593
c8ba13ad
KS
25942017-11-18 Keith Seitz <keiths@redhat.com>
2595
2596 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2597 types.
2598 Add whitespace to front of type name.
2599
37534686
KS
26002017-10-18 Keith Seitz <keiths@redhat.com>
2601
2602 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2603 DW_AT_accessibility.
2604
28c7c158
YQ
26052017-10-18 Yao Qi <yao.qi@linaro.org>
2606
2607 * features/tic6x-c62x-linux.c: Remove.
2608
30f0b101
TT
26092017-10-17 Tom Tromey <tom@tromey.com>
2610
2611 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2612 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2613 (do_mixed_source_and_assembly): Likewise.
2614
57e12da9
TT
26152017-10-17 Tom Tromey <tom@tromey.com>
2616
2617 * regcache.c (regcache::xfer_part): Remove assertion.
2618
7b700999
PA
26192017-10-17 Pedro Alves <palves@redhat.com>
2620
2621 * xml-support.c (xml_fetch_content_from_file): Call
2622 unique_ptr::release() instead unique_ptr::get() when passing
2623 through xrealloc.
2624
d3037ba6
YQ
26252017-10-17 Yao Qi <yao.qi@linaro.org>
2626
2627 * regcache.c (regcache::xfer_part): Remove parameters read and
2628 write, add parameter is_raw. All callers are updated.
2629
83d5a34d
KS
26302017-10-16 Keith Seitz <keiths@redhat.com>
2631
2632 * c-typeprint.c (enum access_specifier): Moved here from
2633 c_type_print_base.
2634 (output_access_specifier): New function.
2635 (c_type_print_base): Consider typedefs when assessing
2636 whether access labels are needed.
2637 Use output_access_specifier as needed.
2638 Output access specifier for typedefs, if needed.
2639 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2640 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2641 fields.
2642 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2643 accessor macros.
2644
87028b87
TT
26452017-10-16 Tom Tromey <tom@tromey.com>
2646
2647 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2648 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2649 * target.c (target_fileio_read_stralloc): Update.
2650 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2651 * target.h (target_fileio_read_stralloc): Return
2652 unique_xmalloc_ptr.
2653
b7b030ad
TT
26542017-10-16 Tom Tromey <tom@tromey.com>
2655
2656 * xml-syscall.c (xml_init_syscalls_info): Update.
2657 * xml-support.c (xinclude_start_include): Update.
2658 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2659 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2660 (xml_fetch_content_from_file): Likewise.
2661 * osdata.c (get_osdata): Update.
2662 * target.h (target_read_stralloc, target_get_osdata): Return
2663 unique_xmalloc_ptr.
2664 * solib-aix.c (solib_aix_get_library_list): Update.
2665 * solib-target.c (solib_target_current_sos): Update.
2666 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2667 * xml-tdesc.c (fetch_available_features_from_target): Update.
2668 (target_fetch_description_xml): Update.
2669 (file_read_description_xml): Update.
2670 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2671 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2672 (remote_pid_to_exec_file): Update.
2673 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2674 (target_get_osdata): Likewise.
2675
b80406ac
TT
26762017-10-16 Tom Tromey <tom@tromey.com>
2677
2678 * remote.c (remote_register_number_and_offset): Use std::vector.
2679 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2680 (putpkt_binary): Use gdb::def_vector.
2681 (compare_sections_command): Use gdb::byte_vector.
2682
a90ecff8
TT
26832017-10-16 Tom Tromey <tom@tromey.com>
2684
2685 * ppc-linux-nat.c (hwdebug_insert_point): Use
2686 gdb::unique_xmalloc_ptr, XDUP.
2687
2dc0e219
TT
26882017-10-16 Tom Tromey <tom@tromey.com>
2689
2690 * probe.c (parse_probes): Use std::string.
2691 (info_probes_for_ops, enable_probes_command)
2692 (disable_probes_command): Remove cleanups.
2693
b05628f0
TT
26942017-10-16 Tom Tromey <tom@tromey.com>
2695
2696 * buildsym.c (block_compar): Remove.
2697 (end_symtab_get_static_block): Use std::vector.
2698
a79b1bc6
SM
26992017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2700
2701 * memrange.h (struct mem_range): Define operator< and operator==.
2702 (mem_range_s): Remove.
2703 (DEF_VEC_O (mem_range_s)): Remove.
2704 (normalize_mem_ranges): Change parameter type to std::vector.
2705 * memrange.c (compare_mem_ranges): Remove.
2706 (normalize_mem_ranges): Change parameter type to std::vector,
2707 adjust to vector change.
2708 * exec.c (section_table_available_memory): Return vector, remove
2709 parameter.
2710 (section_table_read_available_memory): Adjust to std::vector
2711 change.
2712 * remote.c (remote_read_bytes): Adjust to std::vector
2713 change.
2714 * tracepoint.h (traceframe_available_memory): Change parameter
2715 type to std::vector.
2716 * tracepoint.c (traceframe_available_memory): Change parameter
2717 type to std::vector, adjust.
2718 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2719 std::vector change.
2720 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2721 unittests/memrange-selftests.c.
2722 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2723 * gdb/unittests/memrange-selftests.c: New file.
2724
63f0e930
PA
27252017-10-16 Pedro Alves <palves@redhat.com>
2726
2727 * elfread.c (probe_key_free): Rename range-for variable.
2728 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2729 (find_probe_by_pc, collect_probes): Rename range-for variable.
2730
c40c7bfc
YQ
27312017-10-16 Yao Qi <yao.qi@linaro.org>
2732
2733 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2734 * features/tic6x-c62x.c: Remove.
2735 * features/tic6x-c64x-linux.c: Remove.
2736 * features/tic6x-c64x.c: Remove.
2737 * features/tic6x-c64xp-linux.c: Remove.
2738 * features/tic6x-c64xp.c: Remove.
2739 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2740 initialize_tdesc_tic6x_*_linux functions.
2741 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2742 initialize_tdesc_tic6x_* functions.
2743
df27ae6a
YQ
27442017-10-16 Yao Qi <yao.qi@linaro.org>
2745
2746 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2747 tic6x-c62x.
2748 * regformats/tic6x-c62x.dat: Remove.
2749 * regformats/tic6x-c64x.dat: Remove.
2750 * regformats/tic6x-c64xp.dat: Remove.
2751
86766165
SM
27522017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2753
2754 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2755 (the !HAVE_LIBEXPAT version).
2756
824dfcc3
SM
27572017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2758
2759 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2760 const.
2761
2098b393
SM
27622017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2763
2764 * target.h: Include tracepoint.h.
2765 (enum trace_find_type): Move to tracepoint.h.
2766 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2767 * tracepoint.h: Don't include target.h
2768 (enum trace_find_type): Move from target.h.
2769 (parse_traceframe_info): Return a unique ptr.
2770 * tracepoint.c (current_traceframe_info): Change type to unique
2771 ptr.
2772 (free_traceframe_info): Remove.
2773 (clear_traceframe_info): Don't manually free
2774 current_traceframe_info.
2775 (free_result): Remove.
2776 (parse_traceframe_info): Return a unique ptr.
2777 (get_traceframe_info): Adjust to unique ptr.
2778 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2779 * remote.c (remote_traceframe_info): Return a unique ptr.
2780 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2781 ptr.
2782 * target-debug.h (target_debug_print_traceframe_info_up): New
2783 macro.
2784 * target-delegates.c: Regenerate.
2785
4cdd21a8
SM
27862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2787
2788 * memrange.h (struct mem_range): Add constructors.
2789 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2790 std::vector<mem_range>.
2791 * tracepoint.c (free_traceframe_info): Don't manually free
2792 vector.
2793 (traceframe_info_start_memory): Adjust to vector change.
2794 (traceframe_available_memory): Likewise.
2795 * tracefile-tfile.c (build_traceframe_info): Likewise.
2796 * ctf.c (ctf_traceframe_info): Likewise.
2797
d0d292a2
SM
27982017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2799
2800 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2801 std::vector<int>.
2802 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2803 (traceframe_info_start_tvar): Adjust to vector change.
2804 (parse_traceframe_info): Allocate with new.
2805 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2806 vector change.
2807 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2808 change.
2809 tfile_traceframe_info): Allocate with new.
2810 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2811 change.
2812
8d3c73ef
SM
28132017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2814
2815 * tracepoint.c (traceframe_info): Rename to...
2816 (current_traceframe_info): ...this.
2817 (clear_traceframe_info): Adjust.
2818 (get_traceframe_info): Adjust.
2819
b129dcac
SM
28202017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2821
2822 * nat/linux-osdata.c: Include algorithm.
2823 (compare_processes): Remove.
2824 (struct pid_pgid_entry): New struct.
2825 (linux_xfer_osdata_processgroups): Use std::vector instead of
2826 XNEWVEC.
2827
af5bf4ad
SM
28282017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2829
2830 * objfiles.h: Don't include symfile.h.
2831 (struct partial_symbol): Remove forward-declaration.
2832 (struct objfile) <global_psymbols, static_psymbols>: Change type
2833 to std::vector<partial_symbol *>.
2834 * objfiles.c (objfile::objfile): Don't memset those fields.
2835 (objfile::~objfile): Don't free those fields.
2836 * psympriv.h (struct psymbol_allocation_list): Remove
2837 forward-declaration.
2838 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2839 to std::vector.
2840 (start_psymtab_common): Change parameters to std::vector.
2841 * psymtab.c: Include algorithm.
2842 (require_partial_symbols): Call shrink_to_fit.
2843 (find_pc_sect_psymbol): Adjust to vector change.
2844 (match_partial_symbol): Likewise.
2845 (lookup_partial_symbol): Likewise.
2846 (psym_relocate): Likewise.
2847 (dump_psymtab): Likewise.
2848 (recursively_search_psymtabs): Likewise.
2849 (compare_psymbols): Remove.
2850 (sort_pst_symbols): Adjust to vector change.
2851 (start_psymtab_common): Likewise.
2852 (end_psymtab_common): Likewise.
2853 (psymbol_bcache_full): De-constify return value.
2854 (add_psymbol_to_bcache): Likewise.
2855 (extend_psymbol_list): Remove.
2856 (append_psymbol_to_list): Adjust to vector change.
2857 (add_psymbol_to_list): Likewise.
2858 (init_psymbol_list): Likewise.
2859 (maintenance_info_psymtabs): Likewise.
2860 (maintenance_check_psymtabs): Likewise.
2861 * symfile.h (struct psymbol_allocation_list): Remove.
2862 * symfile.c (reread_symbols): Adjust to vector change.
2863 * dbxread.c (start_psymtab): Change type of parameters.
2864 (dbx_symfile_read): Adjust to vector change.
2865 (read_dbx_symtab): Likewise.
2866 (start_psymtab): Change type of parameters.
2867 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2868 (create_partial_symtab): Likewise.
2869 (add_partial_symbol): Likewise.
2870 (write_one_signatured_type): Likewise.
2871 (recursively_write_psymbols): Likewise.
2872 * mdebugread.c (parse_partial_symbols): Likewise.
2873 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2874 (scan_xcoff_symtab): Adjust to vector change.
2875 (xcoff_initial_scan): Likewise.
2876
3ec5942f
SM
28772017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2878
2879 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2880
2399fe6a
YQ
28812017-10-13 Yao Qi <yao.qi@linaro.org>
2882
2883 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2884 Remove s390x-*-expedite, add s390x-expedite.
2885
4bf3f4a8
YQ
28862017-10-13 Yao Qi <yao.qi@linaro.org>
2887
2888 * features/s390-gs-linux64.c: Regenerated.
2889 * features/s390x-gs-linux64.c: Regenerated.
2890
9e86da07
TT
28912017-10-13 Tom Tromey <tom@tromey.com>
2892
2893 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2894 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2895 delete.
2896 * symfile.c (symbol_file_add_with_addrs): Use new.
2897 (symbol_file_add_separate): Update comment.
2898 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2899 * jit.c (jit_object_close_impl): Use new.
2900 (jit_unregister_code): Use delete.
2901 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2902 (~objfile): Rename from free_objfile.
2903 (free_objfile_separate_debug, do_free_objfile_cleanup)
2904 (free_all_objfiles, objfile_purge_solibs): Use delete.
2905 * objfiles.h (struct objfile): Add constructor and destructor.
2906 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2907 (allocate_objfile, free_objfile): Don't declare.
2908 (struct objstats): Add initializers.
2909
c2508e90
SM
29102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2911
2912 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2913 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2914 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2915 * gdbarch.h: Regenerate.
2916 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2917 Adjust comment.
2918 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2919 (i386_displaced_step_fixup): Adjust comment.
2920 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2921
a900ff72
TT
29222017-10-12 Tom Tromey <tom@tromey.com>
2923
2924 * prologue-value.h (pv_area::store_would_trash): Return bool.
2925 (pv_area::find_reg): Likewise.
2926 * prologue-value.c (pv_area::store_would_trash): Return bool.
2927 (pv_area::find_reg): Likewise.
2928
f7b7ed97
TT
29292017-10-12 Tom Tromey <tom@tromey.com>
2930
2931 * s390-linux-tdep.c (s390_store, s390_load)
2932 (s390_check_for_saved, s390_analyze_prologue): Update.
2933 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2934 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2935 * prologue-value.h (class pv_area): Move from prologue-value.c.
2936 Change names of members. Add constructor, destructor, member
2937 functions.
2938 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2939 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2940 (pv_area_fetch, pv_area_scan): Don't declare.
2941 * prologue-value.c (struct pv_area::area_entry): Now member of
2942 pv_area.
2943 (struct pv_area): Move to prologue-value.h.
2944 (pv_area::pv_area): Rename from make_pv_area.
2945 (pv_area::~pv_area): Rename from free_pv_area.
2946 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2947 (clear_entries, find_entry, overlaps, store_would_trash, store)
2948 (fetch, find_reg, scan): Now member of pv_area.
2949 Remove "area" argument. Update.
2950 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2951 Update.
2952 * mn10300-tdep.c (push_reg, check_for_saved)
2953 (mn10300_analyze_prologue): Update.
2954 * mep-tdep.c (is_arg_spill, check_for_saved)
2955 (mep_analyze_prologue): Update.
2956 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2957 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2958 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2959 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2960 Update.
2961 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2962 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2963
466eecee
SM
29642017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2965
2966 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2967 * linux-nat.c (linux_nat_delete_thread): New variable.
2968 (lwp_free): Invoke linux_nat_delete_thread if set.
2969 (linux_nat_set_delete_thread): New function.
2970 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2971 thread delete callback.
2972 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2973 (_initialize_arm_linux_nat): Assign thread delete callback.
2974 * s390-linux-nat.c (s390_delete_thread): New function.
2975 (_initialize_s390_nat): Assign thread delete callback.
2976 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2977 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2978 function.
2979 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2980 declaration.
2981 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2982 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2983
f71c8822
TT
29842017-10-09 Tom Tromey <tom@tromey.com>
2985
2986 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2987 std::string.
2988 * tui/tui-layout.c (enum tui_status): Use std::string.
2989
981a3fb3
TT
29902017-10-11 Tom Tromey <tom@tromey.com>
2991
2992 * gdbthread.h (thread_command): Constify.
2993 * inferior.h (detach_command): Constify.
2994 * top.h (set_history, show_history): Constify.
2995 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2996 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2997 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2998 * printcmd.c (set_command): Constify.
2999 (non_const_set_command): New function.
3000 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3001 * breakpoint.c (enable_command, disable_command, delete_command)
3002 (catch_command, tcatch_command, set_breakpoint_cmd)
3003 (show_breakpoint_cmd): Constify.
3004 * macrocmd.c (macro_command): Constify.
3005 * infcmd.c (unset_command, kill_command, detach_command)
3006 (info_proc_cmd): Constify.
3007 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3008 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3009 (info_auto_load_cmd): Constify.
3010 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3011 (unset_tdesc_cmd): Constify.
3012 * ada-lang.c (set_ada_command, show_ada_command)
3013 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3014 * guile/guile.c (set_guile_command, show_guile_command)
3015 (info_guile_command): Constify.
3016 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3017 Constify.
3018 * skip.c (skip_command): Constify.
3019 * compile/compile.c (_initialize_compile): Constify.
3020 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3021 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3022 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3023 (maint_btrace_pt_show_cmd): Constify.
3024 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3025 Constify.
3026 * python/python.c (user_show_python, user_set_python): Constify.
3027 * mips-tdep.c (set_mips_command, show_mips_command)
3028 (set_mipsfpu_command): Constify.
3029 * record-btrace.c (cmd_record_btrace_start)
3030 (cmd_set_record_btrace, cmd_show_record_btrace)
3031 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3032 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3033 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3034 Constify.
3035 * symfile.c (overlay_command): Constify.
3036 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3037 * cli/cli-logging.c (set_logging_command, show_logging_command):
3038 Constify.
3039 * cli/cli-dump.c (dump_command, append_command)
3040 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3041 (tekhex_dump_command, binary_dump_command)
3042 (binary_append_command): Constify.
3043 * cli/cli-decode.c (struct cmd_list_element): Change type of
3044 "fun".
3045 * cli/cli-cmds.c (info_command, show_command, set_debug)
3046 (show_debug): Constify.
3047 (show_command): Add non-const overload.
3048 * top.c (set_history, show_history): Constify.
3049 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3050 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3051 * target.c (target_command): Constify.
3052 * sparc64-tdep.c (info_adi_command): Constify.
3053 * record-full.c (cmd_record_full_start): Constify.
3054 (set_record_full_command): Constify. Fix typo.
3055 (show_record_full_command): Constify.
3056 * thread.c (thread_command, thread_apply_command): Constify.
3057 * memattr.c (dummy_cmd): Constify.
3058 * value.c (function_command): Constify.
3059 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3060 * probe.c (info_probes_command): Constify.
3061 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3062 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3063 (show_thread_cmd, set_thread_default_cmd)
3064 (show_thread_default_cmd): Constify.
3065 (check_empty): Constify.
3066 * tracepoint.c (tfind_command): Constify.
3067 * cp-support.c (maint_cplus_command): Constify.
3068 * windows-tdep.c (info_w32_command): Constify.
3069 * record.c (cmd_record_start, set_record_command)
3070 (show_record_command, info_record_command, cmd_record_goto):
3071 Constify.
3072 * ravenscar-thread.c (set_ravenscar_command)
3073 (show_ravenscar_command): Constify.
3074 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3075 Constify.
3076 (add_internal_problem_command): Remove casts.
3077 * arc-tdep.c (maintenance_print_arc_command): Constify.
3078 * valprint.c (set_print, show_print, set_print_raw)
3079 (show_print_raw): Constify.
3080 * maint.c (maintenance_command, maintenance_info_command)
3081 (maintenance_print_command, maintenance_set_cmd)
3082 (maintenance_show_cmd, set_per_command_cmd)
3083 (show_per_command_cmd, maintenance_check_command): Constify.
3084 * language.c (set_check, show_check): Constify.
3085 * typeprint.c (show_print_type, set_print_type): Constify.
3086 * go32-nat.c (go32_info_dos_command): Constify.
3087
fdf44873
TT
30882017-10-11 Tom Tromey <tom@tromey.com>
3089
3090 * breakpoint.c (prepare_re_set_context): Remove.
3091 (breakpoint_re_set_one): Update. Don't use cleanups.
3092 (breakpoint_re_set): Use scoped_restore, std::string, and
3093 scoped_restore_current_language.
3094
81b1e71c
TT
30952017-10-11 Tom Tromey <tom@tromey.com>
3096
3097 * breakpoint.c (commands_command_1): Use std::string.
3098 (cleanup_executing_breakpoints): Remove.
3099 (bpstat_do_actions_1): Use scoped_restore.
3100 (bpstat_check_watchpoint): Use std::string.
3101 (decode_static_tracepoint_spec): Likewise.
3102 (break_range_command): Likewise.
3103 (watch_command_1): Likewise.
3104 (compare_breakpoints): Change argument types.
3105 (clear_command): Use std::vector.
3106 (cleanup_executing_breakpoints): Remove.
3107 (update_global_location_list): Use unique_xmalloc_ptr.
3108 (strace_command): Remove unused declaration.
3109
4f9d9906
JB
31102017-10-11 John Baldwin <jhb@FreeBSD.org>
3111
3112 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3113 * NEWS: Mention new FreeBSD/arm native configuration.
3114 * configure.host: Add arm*-*-freebsd*.
3115 * configure.nat: Likewise.
3116 * arm-fbsd-nat.c: New file.
3117
7176dfd2
JB
31182017-10-11 John Baldwin <jhb@FreeBSD.org>
3119
3120 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3121 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3122 * NEWS: Mention new FreeBSD/arm target.
3123 * configure.tgt: Add arm*-*-freebsd*.
3124 * arm-fbsd-tdep.c: New file.
3125 * arm-fbsd-tdep.h: New file.
3126
fe220226
MR
31272017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3128
3129 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3130 `gdbarch_elfcore_write_linux_prpsinfo'.
3131 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3132 method.
3133 (elf_internal_linux_prpsinfo): Remove declaration.
3134 * gdbarch.h: Regenerate.
3135 * gdbarch.c: Regenerate.
3136
a2f63b2e
MR
31372017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3138
3139 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3140 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3141
458ca1d0
PA
31422017-10-11 Pedro Alves <palves@redhat.com>
3143
3144 * breakpoint.c (reattach_breakpoints): Delete.
3145 * breakpoint.h (reattach_breakpoints): Delete.
3146
905014d7
SM
31472017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3148
3149 * symfile.c (registered_sym_fns): Make struct, not typedef.
3150 (DEF_VEC_O (registered_sym_fns)): Remove.
3151 (symtab_fns): Change type to std::vector.
3152 (add_symtab_fns): Adjust.
3153 (find_sym_fns): Adjust.
3154
56d704da
AK
31552017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3156
3157 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3158 * arc-tdep.h (arc_arch_is_em): New function.
3159 (arc_arch_is_hs): Likewise.
3160
7fa29be9
EB
31612017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3162
3163 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3164 parentheses in the declaration.
3165 (macro_lookup_inclusion): Likewise.
3166 (macro_lookup_definition): Likewise.
3167 * p-lang.h (pascal_builtin_types): Likewise.
3168 * tui/tui-data.c (tui_win_list): Likewise.
3169 * tui/tui-data.h (tui_win_list): Likewise.
3170 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3171
d9b477e3
KB
31722017-10-11 Mark Rages <markrages@gmail.com>
3173
3174 * target-memory.c (block_boundaries): Fix for block address not
3175 aligned on block size.
3176
65630365
PA
31772017-10-10 Pedro Alves <palves@redhat.com>
3178 Tom Tromey <tom@tromey.com>
3179
3180 * breakpoint.c (struct captured_breakpoint_query_args)
3181 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3182 (print_breakpoint): New.
3183 * breakpoint.h (print_breakpoint): Declare.
3184 * common/common-exceptions.h (enum return_reason): Remove
3185 references to catch_exceptions.
3186 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3187 Delete.
3188 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3189 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3190 * gdb.h: Delete.
3191 * gdbthread.h (thread_select): Declare.
3192 * mi/mi-cmd-break.c: Don't include gdb.h.
3193 (breakpoint_notify): Use print_breakpoint.
3194 * mi/mi-cmd-catch.c: Don't include gdb.h.
3195 * mi/mi-interp.c: Don't include gdb.h.
3196 (mi_print_breakpoint_for_event): New.
3197 (mi_breakpoint_created, mi_breakpoint_modified): Use
3198 mi_print_breakpoint_for_event.
3199 * mi/mi-main.c: Don't include gdb.h.
3200 (mi_cmd_thread_select): Parse the global thread ID here. Use
3201 thread_select instead of gdb_thread_select.
3202 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3203 of using gdb_list_thread_ids.
3204 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3205 FILEIO_ENOSYS here.
3206 (remote_fileio_request): Use TRY/CATCH instead of
3207 catch_exceptions.
3208 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3209 (symbol_file_add_from_memory_wrapper): Delete.
3210 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3211 * thread.c: Don't include gdb.h.
3212 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3213 (thread_alive): Use thread_select.
3214 (do_captured_thread_select): Delete, parts salvaged as ...
3215 (thread_select): ... this new function.
3216 (gdb_thread_select): Delete.
3217
bf469271
PA
32182017-10-10 Pedro Alves <palves@redhat.com>
3219 Tom Tromey <tom@tromey.com>
3220
3221 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3222 and reverse logic.
3223 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3224 No longer macros. Instead ...
3225 (enum wp_check_result): They're now values of this new
3226 enumeration.
3227 (watchpoint_check): Change return type to wp_check_result and
3228 parameter type to bpstat.
3229 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3230 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3231 catch_errors. Reverse logic of watchpoint_check call.
3232 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3233 pointer as parameter.
3234 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3235 * common/common-exceptions.c (throw_exception_sjlj): Update
3236 comments to avoid mentioning catch_errors.
3237 * exceptions.c (catch_errors): Delete.
3238 * exceptions.h: Update comments to avoid mentioning catch_errors.
3239 (catch_errors_ftype, catch_errors): Delete.
3240 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3241 (hook_stop_stub): Delete.
3242 (restore_selected_frame): Change return type to void, and
3243 parameter type to const frame_id &.
3244 (restore_infcall_control_state): Use TRY/CATCH instead of
3245 catch_errors.
3246 * main.c (captured_command_loop): Return void and remove
3247 parameter. Remove references to catch_errors.
3248 (captured_main): Use TRY/CATCH instead of catch_errors.
3249 * objc-lang.c (objc_submethod_helper_data)
3250 (find_objc_msgcall_submethod_helper): Delete.
3251 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3252 catch_errors.
3253 * record-full.c (record_full_message): Return void.
3254 (record_full_message_args, record_full_message_wrapper): Delete.
3255 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3256 instead of catch_errors.
3257 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3258 parameter type to int.
3259 * solib-darwin.c (open_symbol_file_object): Ditto.
3260 * solib-dsbt.c (open_symbol_file_object): Ditto.
3261 * solib-frv.c (open_symbol_file_object): Ditto.
3262 * solib-svr4.c (open_symbol_file_object): Ditto.
3263 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3264 * solib.c (update_solib_list): Use TRY/CATCH instead of
3265 catch_errors.
3266 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3267 Change type.
3268 * symmisc.c (struct print_symbol_args): Remove.
3269 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3270 (print_symbol): Change type.
3271 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3272 and remove parameters.
3273 (catch_errors): New.
3274 (get_windows_debug_event): Adjust.
3275
1a56bfa5
TT
32762017-10-09 Tom Tromey <tom@tromey.com>
3277
3278 * mi/mi-main.c (free_splay_tree): Remove.
3279 (list_available_thread_groups): Use splay_tree_up.
3280 * common/gdb_splay_tree.h: New file.
3281
0c478e2d
TT
32822017-10-09 Tom Tromey <tom@tromey.com>
3283
3284 * mi/mi-main.c (do_nothing): Remove.
3285 (list_available_thread_groups): Update.
3286
cbd2b4e3
PA
32872017-10-09 Pedro Alves <palves@redhat.com>
3288
3289 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3290 reading registers when switching context.
3291
a181c0bf
JB
32922017-10-09 John Baldwin <jhb@FreeBSD.org>
3293
3294 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3295 (fbsd_convert_siginfo): Likewise.
3296 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3297
6e66f753
SM
32982017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3299
3300 * configure.ac (try_guile_versions): Remove guile-2.2.
3301 * configure: Regenerate.
3302
890e9790
TT
33032017-10-09 Tom Tromey <tom@tromey.com>
3304
3305 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3306 (COMPILE.pre): Use $(CXX).
3307
109483d9
PA
33082017-10-09 Pedro Alves <palves@redhat.com>
3309
3310 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3311 Use bool.
3312 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3313 * cp-support.h (cp_remove_params): Now returns a
3314 gdb::unique_xmalloc_ptr.
3315 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3316 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3317 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3318 returning a gdb::unique_xmalloc_ptr.
3319 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3320 * stack.c (find_frame_funname): Adjust to cp_remove_params
3321 returning a gdb::unique_xmalloc_ptr.
3322
791afaa2
TT
33232017-10-08 Tom Tromey <tom@tromey.com>
3324
3325 * dwarf2read.c (dwarf2_get_dwz_file): Use
3326 gdb::unique_xmalloc_ptr.
3327 (find_slot_in_mapped_hash): Likewise.
3328 (dwarf2_physname): Likewise.
3329 (create_dwo_unit_in_dwp_v1): Use std::string.
3330 (create_dwo_unit_in_dwp_v2): Likewise.
3331 (lookup_dwo_cutu): Likewise.
3332 (inherit_abstract_dies): Use std::vector.
3333 (read_array_type): Likewise.
3334 (dwarf_decode_macros): Remove unused declaration.
3335 (unsigned_int_compar): Remove.
3336 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3337 (psymtabs_addrmap_cleanup): Remove.
3338
30a9c02f
TT
33392017-10-08 Tom Tromey <tom@tromey.com>
3340
3341 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3342 * frame.h (frame_cleanup_after_sniffer): Declare.
3343 (frame_prepare_for_sniffer): Return void.
3344 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3345 type of argument.
3346 (frame_prepare_for_sniffer): Return void.
3347
757325a3
TT
33482017-10-08 Tom Tromey <tom@tromey.com>
3349
3350 * utils.h (make_cleanup_value_free): Remove.
3351 * utils.c (do_value_free, struct cleanup): Remove.
3352 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3353 Use gdb_value_up.
3354 * value.h (struct value_deleter): New.
3355 (gdb_value_up): New typedef.
3356
b9c04fb2
TT
33572017-10-08 Tom Tromey <tom@tromey.com>
3358
3359 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3360 (make_cleanup_free_search_symbols): Remove.
3361 (search_symbols): Return std::vector.
3362 (symbol_search::compare_search_syms): Now member of
3363 symbol_search. Change arguments.
3364 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3365 (symtab_symbol_info, rbreak_command): Update.
3366 * symtab.h (struct symbol_search) <next>: Remove.
3367 Add constructors.
3368 (symbol_search::operator<): New function.
3369 (symbol_search::operator==): New function.
3370 (search_symbols): Remove std::vector.
3371 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3372 (symbol_search::compare_search_syms): Declare.
3373
0d28b0a5
YQ
33742017-10-06 Yao Qi <yao.qi@linaro.org>
3375
3376 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3377 arch/aarch64-insn.o.
3378 Remove one rule.
3379 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3380
71917808
YQ
33812017-10-06 Yao Qi <yao.qi@linaro.org>
3382
3383 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3384 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3385 arch/arm-linux.o respectively.
3386 * configure.tgt: Likewise.
3387
2081b2b2
YQ
33882017-10-06 Yao Qi <yao.qi@linaro.org>
3389
3390 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3391 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3392
a1b85d28
PA
33932017-10-06 Pedro Alves <palves@redhat.com>
3394
3395 * windows-nat.c: Include <algorithm>.
3396
d97987e2
YQ
33972017-10-06 Yao Qi <yao.qi@linaro.org>
3398
3399 * configure.tgt (i386_tobjs): New variable.
3400 (amd64_tobjs): New variable.
3401 Set $cpu_obs and $os_obs.
3402
f38307f5
YQ
34032017-10-06 Yao Qi <yao.qi@linaro.org>
3404
3405 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3406 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3407 (clean): Remove object files and dependency files.
3408 (distclean): Remove the directory.
3409 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3410 * configure: Re-generated.
3411 * configure.tgt: Replace amd64.o with arch/amd64.o.
3412
2f924de6
JM
34132017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3414
3415 PR build/22188
3416 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3417 and SETEND.
3418
2fd9d7ca
PA
34192017-10-05 Pedro Alves <palves@redhat.com>
3420
3421 * linux-nat.c (linux_child_follow_fork): When following the parent
3422 and detaching the child, consult the parent thread's architecture
3423 instead of the child's.
3424
d13b8493
UW
34252017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3426
3427 * ax.h: Do not include "doublest.h".
3428 (union agent_val): Remove.
3429
3b4b2f16
UW
34302017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3431
3432 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3433 (decimal_to_string): Return std::string object.
3434 (decimal_from_string): Accept std::string object. Return bool.
3435 (decimal_from_integral, decimal_from_doublest): Remove.
3436 (decimal_from_longest): Add prototype.
3437 (decimal_from_ulongest): Likewise.
3438 (decimal_to_longest): Likewise.
3439 (decimal_from_doublest): Likewise.
3440 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3441 (MAX_DECIMAL_STRING): Move here.
3442 (decimal_to_string): Return std::string object.
3443 (decimal_from_string): Accept std::string object. Return bool.
3444 (decimal_from_integral): Remove, replace by ...
3445 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3446 (decimal_to_longest): New function.
3447 (decimal_from_floating): Remove, replace by ...
3448 (decimal_from_doublest): ... this new function.
3449 (decimal_to_doublest): Update to new decimal_to_string interface.
3450
3451 * value.c (unpack_long): Use decimal_to_longest.
3452 * valops.c (value_cast): Use decimal_from_doublest instead of
3453 decimal_from_floating. Use decimal_from_[u]longest isntead of
3454 decimal_from_integral.
3455 * valarith.c (value_args_as_decimal): Likewise.
3456 * valprint.c (print_decimal_floating): Update to new
3457 decimal_to_string interface.
3458 * printcmd.c (printf_decfloat): Likewise.
3459 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3460
1841ee5d
UW
34612017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3462
3463 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3464 * gdbtypes.c: Include "floatformat.h".
3465 * value.c: Likewise.
3466 * m68k-tdep.c: Likewise.
3467
3468 * findvar.c: Do not include "floatformat.h".
3469 * amd64-darwin-tdep.c: Likewise.
3470 * arm-linux-tdep.c: Likewise.
3471 * i386-darwin-tdep.c: Likewise.
3472 * i387-tdep.c: Likewise.
3473 * m68k-linux-tdep.c: Likewise.
3474 * mep-tdep.c: Likewise.
3475 * mips-tdep.c: Likewise.
3476 * nios2-tdep.c: Likewise.
3477 * s390-linux-tdep.c: Likewise.
3478 * sparc-obsd-tdep.c: Likewise.
3479 * sparc-tdep.c: Likewise.
3480 * sparc64-tdep.c: Likewise.
3481 * spu-tdep.c: Likewise.
3482 * tic6x-tdep.c: Likewise.
3483 * tilegx-tdep.c: Likewise.
3484 * vax-tdep.c: Likewise.
3485 * xstormy16-tdep.c: Likewise.
3486 * xtensa-tdep.c: Likewise.
3487
3488 * top.c: Do not include "doublest.h".
3489 * aarch64-tdep.c: Likewise.
3490 * alpha-tdep.c: Likewise.
3491 * arm-linux-tdep.c: Likewise.
3492 * m68k-linux-tdep.c: Likewise.
3493 * tilegx-tdep.c: Likewise.
3494 * xstormy16-tdep.c: Likewise.
3495
a80a6471
JB
34962017-10-05 John Baldwin <jhb@FreeBSD.org>
3497
3498 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3499 (mipsn32_fbsd_sigframe): Define.
3500 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3501 for FreeBSD/mipsn32.
3502
12c4bd7f
JB
35032017-10-05 John Baldwin <jhb@FreeBSD.org>
3504
3505 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3506 AT_HWCAP.
3507
c91933e9
TG
35082017-10-05 Tristan Gingold <tgingold@free.fr>
3509
3510 * MAINTAINERS (Misc): Update my email address.
3511
5cd63fda
PA
35122017-10-04 Pedro Alves <palves@redhat.com>
3513
3514 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3515 it instead of target_gdbarch.
3516 (get_remote_state, get_remote_packet_size): Adjust
3517 get_remote_arch_state calls, passing down target_gdbarch
3518 explicitly.
3519 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3520 'gdbarch' and use it instead of target_gdbarch.
3521 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3522 passing down target_gdbarch explicitly.
3523 (struct stop_reply) <arch>: New field.
3524 (remote_parse_stop_reply): Use the stopped thread's architecture,
3525 not the current inferior's. Save the architecture in the
3526 stop_reply.
3527 (process_stop_reply): Use the stop reply's architecture.
3528 (process_g_packet, remote_fetch_registers)
3529 (remote_prepare_to_store, store_registers_using_G)
3530 (remote_store_registers): Adjust get_remote_arch_state calls,
3531 using the regcache's architecture.
3532 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3533 passing down target_gdbarch explicitly.
3534 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3535 beneath instead of calling target_gdbarch.
3536 * target.c (default_thread_architecture): Use the specified
3537 inferior's architecture, instead of the current inferior's
3538 architecture (via target_gdbarch).
3539
ed4227b7
PA
35402017-10-04 Pedro Alves <palves@redhat.com>
3541
3542 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3543 case.
3544 (regcache_print): Handle !target_has_registers here instead.
3545
55b11ddf
PA
35462017-10-04 Pedro Alves <palves@redhat.com>
3547
3548 * frame.c (create_test_frame): Delete.
3549 * frame.h (create_test_frame): Delete.
3550 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3551 (class regcache_test): Delete.
3552 (test_target_has_registers, test_target_has_stack)
3553 (test_target_has_memory, test_target_prepare_to_store)
3554 (test_target_store_registers): New functions.
3555 (test_target_ops): New class.
3556 (register_to_value_test): Error out if there's already a
3557 process_stratum (or higher) target pushed. Create a fuller mock
3558 environment, with mock target_ops, inferior, address space, thread
3559 and inferior_ptid.
3560 * progspace.c (struct address_space): Move to ...
3561 * progspace.h (struct address_space): ... here.
3562 * regcache.h (regcache::~regcache, regcache::raw_write)
3563 [GDB_SELF_TEST]: No longer virtual.
3564
4c71c105
SM
35652017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3566
3567 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3568
73dcd72d
PA
35692017-10-04 Pedro Alves <palves@redhat.com>
3570
3571 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3572 out of 'between TRY and CATCH'.
3573
44704526
PA
35742017-10-04 Pedro Alves <palves@redhat.com>
3575
3576 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3577 * common/common-exceptions.h (TRY): Open an outermost scope.
3578 Expand intro comment.
3579 (CATCH): Reindent.
3580 (END_CATCH): Close the outermost scope.
3581 * completer.c (complete_line_internal): Add missing END_CATCH.
3582
bc3b087d
SDJ
35832017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3584
3585 * NEWS (Changes since GDB 8.0): Add entry about new
3586 'set-cwd-on-gdbserver' feature.
3587 (New remote packets): Add entry for QSetWorkingDir.
3588 * common/common-inferior.h (set_inferior_cwd): New prototype.
3589 * infcmd.c (set_inferior_cwd): Remove "static".
3590 (show_cwd_command): Expand text to include remote debugging.
3591 * remote.c: Add PACKET_QSetWorkingDir.
3592 (remote_protocol_features) <QSetWorkingDir>: New entry for
3593 PACKET_QSetWorkingDir.
3594 (extended_remote_set_inferior_cwd): New function.
3595 (extended_remote_create_inferior): Call
3596 "extended_remote_set_inferior_cwd".
3597 (_initialize_remote): Call "add_packet_config_cmd" for
3598 QSetWorkingDir.
3599
d092c5a2
SDJ
36002017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3601
3602 * NEWS (New commands): Mention "set/show cwd".
3603 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3604 "cd" command's help text.
3605 * common/common-inferior.h (get_inferior_cwd): New prototype.
3606 * infcmd.c (inferior_cwd_scratch): New global variable.
3607 (set_inferior_cwd): New function.
3608 (get_inferior_cwd): Likewise.
3609 (set_cwd_command): Likewise.
3610 (show_cwd_command): Likewise.
3611 (_initialize_infcmd): Add "set/show cwd" commands.
3612 * inferior.h (class inferior) <cwd>: New field.
3613 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3614 (fork_inferior): Change inferior's cwd before its execution.
3615 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3616 to CreateProcess.
3617
7da0a886
SDJ
36182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3619
3620 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3621 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3622 (COMMON_OBS): Add gdb_tilde_expand.o.
3623 * common/gdb_tilde_expand.c: New file.
3624 * common/gdb_tilde_expand.h: Likewise.
3625
db8dd160
MR
36262017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3627
3628 * gdbarch.sh (objfile): Remove duplicate declaration.
3629 * gdbarch.h: Regenerate.
3630
f8bfbf22
TT
36312017-10-03 Tom Tromey <tom@tromey.com>
3632
3633 * utils.c (internal_vproblem): Use string_vprintf.
3634
5178ed48
TT
36352017-10-03 Tom Tromey <tom@tromey.com>
3636
3637 * printcmd.c (info_symbol_command): Use std::string.
3638
8cff8730
TT
36392017-10-03 Tom Tromey <tom@tromey.com>
3640
3641 * top.c (gdb_safe_append_history): Use std::string.
3642
895b8f30
TT
36432017-10-03 Tom Tromey <tom@tromey.com>
3644
3645 * event-top.c (stdin_event_handler): Update.
3646 * main.c (captured_main_1): Update.
3647 * top.h (make_delete_ui_cleanup): Remove.
3648 (struct ui): Add constructor and destructor.
3649 (new_ui, delete_ui): Remove.
3650 * top.c (make_delete_ui_cleanup): Remove.
3651 (new_ui_command): Use std::unique_ptr.
3652 (delete_ui_cleanup): Remove.
3653 (ui::ui): Rename from new_ui. Update.
3654 (free_ui): Remove.
3655 (ui::~ui): Rename from delete_ui. Update.
3656
0efef640
TT
36572017-10-03 Tom Tromey <tom@tromey.com>
3658
3659 * symfile.c (load_progress): Use gdb::byte_vector.
3660
245ad7d3
TT
36612017-10-03 Tom Tromey <tom@tromey.com>
3662
3663 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3664 declaration.
3665 * printcmd.c (x_command): Remove unused declaration.
3666 * symfile.c (symbol_file_command): Remove unused declaration.
3667
e05550d7
TT
36682017-10-03 Tom Tromey <tom@tromey.com>
3669
3670 * utils.c (internal_vproblem): Use std::string.
3671 (defaulted_query): Likewise.
3672
b95de2b7
TT
36732017-10-03 Tom Tromey <tom@tromey.com>
3674
3675 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3676 * top.c (execute_command_to_string): Update.
3677 * utils.c (make_cleanup_restore_page_info): Remove.
3678 (do_restore_page_info_cleanup): Remove.
3679 (set_batch_flag_and_restore_page_info):
3680 New.
3681 (make_cleanup_restore_page_info): Remove.
3682 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3683 (~set_batch_flag_and_restore_page_info): New
3684 (make_cleanup_restore_uinteger): Remove.
3685 (make_cleanup_restore_integer): Remove.
3686 (struct restore_integer_closure): Remove.
3687 (restore_integer): Remove.
3688 * utils.h (struct set_batch_flag_and_restore_page_info): New
3689 class.
3690 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3691 (make_cleanup_restore_page_info): Remove.
3692 (make_cleanup_restore_uinteger) Remove.
3693 (make_cleanup_restore_integer) Remove.
3694
07036511
TT
36952017-10-03 Tom Tromey <tom@tromey.com>
3696
3697 * record-full.h (record_full_gdb_operation_disable_set): Return
3698 scoped_restore_tmpl<int>.
3699 * infrun.c (adjust_pc_after_break): Update.
3700 (handle_signal_stop): Update.
3701 * record-full.c (record_full_gdb_operation_disable_set): Return
3702 scoped_restore_tmpl<int>.
3703 (record_full_wait_1, record_full_insert_breakpoint)
3704 (record_full_remove_breakpoint, record_full_save)
3705 (record_full_goto_insn): Update.
3706
45320ffa
TT
37072017-10-02 Tom Tromey <tom@tromey.com>
3708
3709 PR rust/22236:
3710 * rust-lang.c (rust_val_print_str): New function.
3711 (val_print_struct): Call it.
3712 (rust_subscript): Preserve name of slice type.
3713
b3e3859b
TT
37142017-10-02 Tom Tromey <tom@tromey.com>
3715
3716 * rust-lang.c (rust_subscript): Handle slices in
3717 EVAL_AVOID_SIDE_EFFECTS case.
3718
01af5e0d
TT
37192017-10-02 Tom Tromey <tom@tromey.com>
3720
3721 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3722
888e3ddb
TT
37232017-10-02 Tom Tromey <tom@tromey.com>
3724
3725 * rust-lang.h (rust_slice_type): Add "extern".
3726
cc536b21
PA
37272017-10-02 Tom Tromey <tom@tromey.com>
3728 Pedro Alves <palves@redhat.com>
3729
3730 * ada-lang.h (ada_exc_info::operator<): Make const.
3731 (ada_exc_info::operator==): Make const.
3732 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3733 Make const.
3734
386c8614
TT
37352017-09-29 Tom Tromey <tom@tromey.com>
3736
3737 * target.c (read_whatever_is_readable): Change type of "result".
3738 Update.
3739 (free_memory_read_result_vector): Remove.
3740 (read_memory_robust): Change return type. Update.
3741 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3742 bin2hex, std::string.
3743 * target.h (memory_read_result_s): Remove typedef.
3744 (free_memory_read_result_vector): Remove.
3745 (read_memory_robust): Return std::vector.
3746
789c4b5e
TT
37472017-09-29 Tom Tromey <tom@tromey.com>
3748
3749 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3750
ab816a27
TT
37512017-09-29 Tom Tromey <tom@tromey.com>
3752
3753 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3754 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3755 operator< and operator==.
3756 (ada_exceptions_list): Return a std::vector.
3757 * ada-lang.c (ada_exc_info::operator<): Rename from
3758 compare_ada_exception_info.
3759 (ada_exc_info::operator==): New.
3760 (sort_remove_dups_ada_exceptions_list): Change type of
3761 "exceptions".
3762 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3763 (ada_add_global_exceptions): Likewise.
3764 (ada_exceptions_list_1): Return a std::vector.
3765 (ada_exceptions_list): Likewise.
3766
52f9abe4
TT
37672017-09-29 Tom Tromey <tom@tromey.com>
3768
3769 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3770 'std::set *'.
3771 (print_one_inferior): Update.
3772 (free_vector_of_ints): Remove.
3773 (list_available_thread_groups): Change "ids" to std::set.
3774 (mi_cmd_list_thread_groups): Update.
3775 (struct collect_cores_data) <core>: Now a std::set.
3776 (collect_cores): Update.
3777 (unique): Remove.
3778 (print_one_inferior): Update.
3779
dcd5ddcc
TT
37802017-09-29 Tom Tromey <tom@tromey.com>
3781
3782 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3783 (mi_execute_async_cli_command): Likewise.
3784 (mi_cmd_trace_frame_collected): Use field_fmt.
3785
45d288cc
TT
37862017-09-29 Tom Tromey <tom@tromey.com>
3787
3788 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3789 gdb::byte_vector.
3790
6afe2f4a
TT
37912017-09-29 Tom Tromey <tom@tromey.com>
3792
3793 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3794
9813429a
TT
37952017-09-29 Tom Tromey <tom@tromey.com>
3796
3797 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3798
2d6960b4
TT
37992017-09-29 Tom Tromey <tom@tromey.com>
3800
3801 * varobj.h (varobj_gen_name): Return std::string.
3802 * varobj.c (varobj_gen_name): Return std::string.
3803 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3804 (mi_cmd_var_delete): Don't copy "name".
3805
784c453a
TT
38062017-09-29 Tom Tromey <tom@tromey.com>
3807
3808 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3809 (mi_cmd_break_insert_1): Update.
3810
a9bc57b9
TT
38112017-09-29 Tom Tromey <tom@tromey.com>
3812
3813 * target.h (make_scoped_defer_target_commit_resume): Update.
3814 * target.c (make_scoped_defer_target_commit_resume): Rename from
3815 make_cleanup_defer_target_commit_resume. Return a
3816 scoped_restore.
3817 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3818
9754d8c4
TT
38192017-09-29 Tom Tromey <tom@tromey.com>
3820
3821 * main.c (captured_main_1): Remove unused declaration.
3822 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3823
99ef965c
TT
38242017-09-29 Tom Tromey <tom@tromey.com>
3825
3826 * symtab.c (search_symbols): Remove unused outer cleanup.
3827 (make_source_files_completion_list): Remove unused declaration.
3828
42518ba7
TT
38292017-09-29 Tom Tromey <tom@tromey.com>
3830
3831 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3832
726b2169
TT
38332017-09-29 Tom Tromey <tom@tromey.com>
3834
3835 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3836 gdb::byte_vector.
3837
55b06432
TT
38382017-09-29 Tom Tromey <tom@tromey.com>
3839
3840 * complaints.c (vcomplaint): Use std::string.
3841
8abcee91
TT
38422017-09-29 Tom Tromey <tom@tromey.com>
3843
3844 * tracepoint.c (trace_variable_command): Use std::string.
3845 (encode_actions_1): Remove unused declarations.
3846 (create_tsv_from_upload): Use std::string.
3847
6ad94bc7
TT
38482017-09-29 Tom Tromey <tom@tromey.com>
3849
3850 * cp-support.c (gdb_demangle): Use std::string.
3851
2003f3d8
TT
38522017-09-29 Tom Tromey <tom@tromey.com>
3853
3854 * stack.c (parse_frame_specification): Use std::string
3855 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3856
8f8accb5
TT
38572017-09-29 Tom Tromey <tom@tromey.com>
3858
3859 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3860
200aa7b1
TT
38612017-09-29 Tom Tromey <tom@tromey.com>
3862
3863 * utils.c (vfprintf_maybe_filtered): Use std::string.
3864 (vfprintf_unfiltered): Likewise.
3865
606aae8a
TT
38662017-09-29 Tom Tromey <tom@tromey.com>
3867
3868 * event-top.c (top_level_prompt): Return std::string.
3869 (display_gdb_prompt): Update.
3870
bd413795
TT
38712017-09-29 Tom Tromey <tom@tromey.com>
3872
3873 * unittests/common-utils-selftests.c (format): New function.
3874 (string_vprintf_tests): New function.
3875 (_initialize_common_utils_selftests): Register new tests.
3876 * common/common-utils.c (string_vprintf): New function.
3877 * common/common-utils.h (string_vprintf): Declare.
3878
256642e8
PA
38792017-09-29 Pedro Alves <palves@redhat.com>
3880
3881 * common/rsp-low.c (unpack_varlen_hex): Constify.
3882 * common/rsp-low.h (unpack_varlen_hex): Constify.
3883 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3884 Constify.
3885 * remote.c (remote_set_permissions, read_ptid)
3886 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3887 (remote_static_tracepoint_marker_at)
3888 (remote_static_tracepoint_markers_by_strid)
3889 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3890 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3891 (parse_tracepoint_definition, parse_tsv_definition)
3892 (parse_static_tracepoint_marker_definition): Constify.
3893 * tracepoint.h (parse_static_tracepoint_marker_definition)
3894 (parse_trace_status, parse_tracepoint_status)
3895 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3896
b6bb3468
PA
38972017-09-29 Pedro Alves <palves@redhat.com>
3898
3899 * remote.c (target_buf, target_buf_size): Delete.
3900 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3901 Use the connection's packet buffer instead.
3902 All callers adjusted.
3903 (_initialize_remote): Remove references to target_buf and
3904 target_buf_size.
3905
b2f8eb7a
PA
39062017-09-28 Pedro Alves <palves@redhat.com>
3907
3908 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3909 unittests/common-utils-selftests.c.
3910 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3911 (COMMON_OBS): Remove utils-selftests.o.
3912 * utils-selftests.c: Move to ...
3913 * unittests/common-utils-selftests.c: ... here and rename self
3914 test to "string_printf".
3915
08302ed2
DE
39162017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3917
3918 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3919 having NULL cus or tus.
3920
96a5a1d3
UW
39212017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3922
3923 * arm-tdep.c: (convert_from_extended): Remove.
3924 (convert_to_extended): Likewise.
3925 (arm_extract_return_value): Use convert_typed_floating.
3926 (arm_store_return_value): Likewise.
3927
3928 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3929 * sh-tdep.c: Do not include "floatformat.h".
3930 (sh_littlebyte_bigword_type): New function.
3931 (sh_register_convert_to_virtual): Use convert_typed_floating.
3932 (sh_register_convert_to_raw): Likewise.
3933 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3934 (sh64_littlebyte_bigword_type): New function.
3935 (sh64_extract_return_value): Use convert_typed_floating.
3936 (sh64_register_convert_to_virtual): Likewise.
3937 (sh64_register_convert_to_raw): Likewise.
3938
0db7851f
UW
39392017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3940
3941 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3942 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3943
3944 * gdbtypes.h (union type_specific): Make field floatformat hold
3945 just a single struct floatformat, not an array.
3946 (floatformat_from_type): Move here.
3947 * gdbtypes.c (floatformat_from_type): Move here. Update to
3948 changed TYPE_FLOATFORMAT definition.
3949 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3950 (recursive_dump_type): Likewise.
3951 (init_float_type): Install correct floatformat for byte order.
3952 (arch_float_type): Likewise.
3953
77b7c781
UW
39542017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3955
3956 * gdbtypes.c (init_type): Change incoming argument from
3957 length-in-bytes to length-in-bits. Assert length is a
3958 multiple of TARGET_CHAR_BITS.
3959 (arch_type, arch_flags_type): Likewise.
3960 (init_integer_type): Update call to init_type.
3961 (init_character_type): Likewise.
3962 (init_boolean_type): Likewise.
3963 (init_float_type): Likewise.
3964 (init_decfloat_type): Likewise.
3965 (init_complex_type): Likewise.
3966 (init_pointer_type): Likewise.
3967 (objfile_type): Likewise.
3968 (arch_integer_type): Update call to arch_type.
3969 (arch_character_type): Likewise.
3970 (arch_boolean_type): Likewise.
3971 (arch_float_type): Likewise.
3972 (arch_decfloat_type): Likewise.
3973 (arch_complex_type): Likewise.
3974 (arch_pointer_type): Likewise.
3975 (gdbtypes_post_init): Likewise.
3976
3977 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3978 (read_base_type): Likewise.
3979 * mdebugread.c (basic_type): Likewise.
3980 * stabsread.c (dbx_init_float_type): Likewise.
3981 (rs6000_builtin_type): Likewise.
3982 (read_range_type): Likewise. Also, fix call to init_integer_type
3983 with erroneous length argument.
3984
3985 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3986 * d-lang.c (build_d_types): Likewise.
3987 * f-lang.c (build_fortran_types): Likewise.
3988 * go-lang.c (build_go_types): Likewise.
3989 * opencl-lang.c (build_opencl_types): Likewise.
3990 * jit.c (finalize_symtab): Likewise.
3991 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3992 (build_std_type_info_type): Likewise.
3993 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3994 update call to arch_flags_type.
3995
3996 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3997 arch_type.
3998 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3999 * windows-tdep.c (windows_get_tlb_type): Likewise.
4000
4001 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4002 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4003 * m32c-tdep.c (make_types): Likewise.
4004 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4005 (rl78_psw_type): Update call to arch_flags_type.
4006 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4007 * rx-tdep.c (rx_psw_type): Likewise.
4008 (rx_fpsw_type): Likewise.
4009 * sparc-tdep.c (sparc_psr_type): Likewise.
4010 (sparc_fsr_type): Likewise.
4011 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4012 (sparc64_ccr_type): Likewise.
4013 (sparc64_fsr_type): Likewise.
4014 (sparc64_fprs_type): Likewise.
4015
f21b4d5c
TT
40162017-09-27 Tom Tromey <tom@tromey.com>
4017
4018 * findcmd.c (find_command): Constify.
4019
643c2ffa
TT
40202017-09-27 Tom Tromey <tom@tromey.com>
4021
4022 * ada-tasks.c (task_command_1, task_command): Constify.
4023
510e5e56
TT
40242017-09-27 Tom Tromey <tom@tromey.com>
4025
4026 * symtab.c (maintenance_print_symbol_cache)
4027 (maintenance_flush_symbol_cache)
4028 (maintenance_print_symbol_cache_statistics): Constify.
4029
e503b191
TT
40302017-09-27 Tom Tromey <tom@tromey.com>
4031
4032 * inferior.c (detach_inferior_command, kill_inferior_command)
4033 (inferior_command): Constify.
4034
4e001312
TT
40352017-09-27 Tom Tromey <tom@tromey.com>
4036
4037 * regcache.c (regcache_print, maintenance_print_registers)
4038 (maintenance_print_raw_registers)
4039 (maintenance_print_cooked_registers)
4040 (maintenance_print_register_groups)
4041 (maintenance_print_remote_registers): Constify.
4042
77763700
TT
40432017-09-27 Tom Tromey <tom@tromey.com>
4044
4045 * printcmd.c (map_display_numbers, undisplay_command)
4046 (enable_disable_display_command, enable_display_command)
4047 (disable_display_command): Constify.
4048
4495129a
TT
40492017-09-27 Tom Tromey <tom@tromey.com>
4050
4051 * breakpoint.h (delete_command): Don't declare.
4052 * breakpoint.c (delete_command, enable_once_command)
4053 (enable_count_command, enable_delete_command, breakpoint_1)
4054 (maintenance_info_breakpoints, stopin_command, stopat_command)
4055 (delete_command, delete_trace_command, save_breakpoints)
4056 (save_breakpoints_command, save_tracepoints_command): Constify.
4057
3088cf40
TT
40582017-09-27 Tom Tromey <tom@tromey.com>
4059
4060 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4061 (skip_ws, extract_identifier, macro_define_command)
4062 (macro_undef_command, macro_list_command): Constify.
4063
69f476a3
TT
40642017-09-27 Tom Tromey <tom@tromey.com>
4065
4066 * infcmd.c (environment_info, set_environment_command)
4067 (unset_environment_command, path_info, info_proc_cmd_1)
4068 (info_proc_cmd_mappings, info_proc_cmd_stat)
4069 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4070 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4071
c4a3e68e
TT
40722017-09-27 Tom Tromey <tom@tromey.com>
4073
4074 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4075 Constify.
4076
c9d31bd6
TT
40772017-09-27 Tom Tromey <tom@tromey.com>
4078
4079 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4080
1f3f85eb
TT
40812017-09-27 Tom Tromey <tom@tromey.com>
4082
4083 * demangle.c (demangle_command): Constify.
4084
9c504b5d
TT
40852017-09-27 Tom Tromey <tom@tromey.com>
4086
4087 * progspace.c (maintenance_info_program_spaces_command):
4088 Constify.
4089
6663cf91
TT
40902017-09-27 Tom Tromey <tom@tromey.com>
4091
4092 * compile/compile.c (check_raw_argument, compile_file_command)
4093 (compile_code_command, compile_print_command): Constify.
4094
34e5fa26
TT
40952017-09-27 Tom Tromey <tom@tromey.com>
4096
4097 * reggroups.c (maintenance_print_reggroups): Constify.
4098
8384c356
TT
40992017-09-27 Tom Tromey <tom@tromey.com>
4100
4101 * dwarf2read.c (save_gdb_index_command): Constify.
4102
884beb0c
TT
41032017-09-27 Tom Tromey <tom@tromey.com>
4104
4105 * stap-probe.c (info_probes_stap_command): Constify.
4106
e0b2930c
TT
41072017-09-27 Tom Tromey <tom@tromey.com>
4108
4109 * fork-child.c (unset_exec_wrapper_command): Constify.
4110
f938677d
TT
41112017-09-27 Tom Tromey <tom@tromey.com>
4112
4113 * btrace.c (get_uint, get_context_size, no_chunk)
4114 (maint_btrace_packet_history_cmd)
4115 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4116 (maint_info_btrace_cmd): Constify.
4117
8949cb87
TT
41182017-09-27 Tom Tromey <tom@tromey.com>
4119
4120 * reverse.c (delete_bookmark_command): Constify.
4121
ac88e2de
TT
41222017-09-27 Tom Tromey <tom@tromey.com>
4123
4124 * remote.c (set_memory_packet_size)
4125 (set_memory_write_packet_size, show_memory_write_packet_size)
4126 (set_memory_read_packet_size, show_memory_read_packet_size)
4127 (compare_sections_command, packet_command, remote_put_command)
4128 (remote_get_command, remote_delete_command): Constify.
4129
bd4c9dfe
TT
41302017-09-27 Tom Tromey <tom@tromey.com>
4131
4132 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4133 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4134 (set_mipsfpu_auto_command): Constify.
4135
5e93d4c6
TT
41362017-09-27 Tom Tromey <tom@tromey.com>
4137
4138 * cli/cli-cmds.h (cd_command): Constify.
4139 * cli/cli-cmds.c (cd_command): Constify.
4140
fc41a75b
TT
41412017-09-27 Tom Tromey <tom@tromey.com>
4142
4143 * thread.c (thread_name_command, thread_find_command): Constify.
4144
67810076
TT
41452017-09-27 Tom Tromey <tom@tromey.com>
4146
4147 * probe.c (enable_probes_command, disable_probes_command):
4148 Constify.
4149
1d8b34a7
TT
41502017-09-27 Tom Tromey <tom@tromey.com>
4151
4152 * symfile.c (symbol_file_command): Constify.
4153 * gdbcore.h (deprecated_file_changed_hook): Constify.
4154 * exec.c (deprecated_file_changed_hook, exec_file_command)
4155 (file_command): Constify.
4156 * defs.h (symbol_file_command): Constify.
4157
442019e1
TT
41582017-09-27 Tom Tromey <tom@tromey.com>
4159
4160 * remote-fileio.c (set_system_call_allowed)
4161 (show_system_call_allowed): Constify.
4162
2983f7cb
TT
41632017-09-27 Tom Tromey <tom@tromey.com>
4164
4165 * tracepoint.c (delete_trace_variable_command)
4166 (tfind_end_command, tfind_start_command, tfind_pc_command)
4167 (tfind_tracepoint_command, tfind_line_command)
4168 (tfind_range_command, tfind_outside_command): Constify.
4169
4fd41b24
TT
41702017-09-27 Tom Tromey <tom@tromey.com>
4171
4172 * ax-gdb.c (maint_agent_printf_command, agent_command)
4173 (agent_eval_command): Constify.
4174
f2fc3015
TT
41752017-09-27 Tom Tromey <tom@tromey.com>
4176
4177 * tracepoint.c (info_scope_command): Constify.
4178 * python/python.c (gdbpy_decode_line): Constify.
4179 * python/py-breakpoint.c (bppy_init): Constify.
4180 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4181 * location.h: (new_linespec_location)
4182 (string_to_event_location_basic, string_to_event_location):
4183 Constify.
4184 * location.c (new_linespec_location)
4185 (string_to_event_location_basic, string_to_event_location):
4186 Constify.
4187 * linespec.h (decode_line_with_current_source)
4188 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4189 * linespec.c (linespec_lex_to_end)
4190 (decode_line_with_current_source)
4191 (decode_line_with_last_displayed): Constify.
4192 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4193 Constify.
4194 * cli/cli-cmds.c (edit_command, list_command): Constify.
4195 * breakpoint.h (until_break_command, watch_command_wrapper)
4196 (awatch_command_wrapper, rwatch_command_wrapper)
4197 (init_ada_exception_breakpoint): Constify.
4198 * breakpoint.c (break_command_1, dprintf_command)
4199 (break_range_command, watch_command_wrapper)
4200 (rwatch_command_wrapper, awatch_command_wrapper)
4201 (until_break_command, init_ada_exception_breakpoint)
4202 (strace_marker_create_sals_from_location, trace_command)
4203 (ftrace_command, strace_command, struct tracepoint): Constify.
4204 * ax-gdb.c (agent_command_1): Constify.
4205 * ada-lang.c (ada_exception_sal): Constify.
4206
8c2f95f4
TT
42072017-09-27 Tom Tromey <tom@tromey.com>
4208
4209 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4210 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4211 (get_context_size, no_chunk, get_insn_history_modifiers)
4212 (cmd_record_insn_history, get_call_history_modifiers)
4213 (cmd_record_call_history): Constify.
4214
a0d65762
TT
42152017-09-27 Tom Tromey <tom@tromey.com>
4216
4217 * source.c (show_substitute_path_command)
4218 (unset_substitute_path_command, set_substitute_path_command):
4219 Constify.
4220
58971144
TT
42212017-09-27 Tom Tromey <tom@tromey.com>
4222
4223 * typeprint.c (maintenance_print_type): Constify.
4224 * maint.c (maintenance_dump_me, maintenance_demangle)
4225 (maintenance_time_display, maintenance_info_sections)
4226 (maintenance_print_statistics, maintenance_deprecate)
4227 (maintenance_undeprecate): Constify.
4228 (maintenance_do_deprecate): Constify. Use std::string.
4229 (maintenance_selftest): Constify.
4230 * gdbtypes.h (maintenance_print_type): Constify.
4231
c482f52c
TT
42322017-09-27 Tom Tromey <tom@tromey.com>
4233
4234 * hppa-tdep.c (unwind_command): Constify.
4235
e100df1a
TT
42362017-09-27 Tom Tromey <tom@tromey.com>
4237
4238 * target-descriptions.c (unset_tdesc_filename_cmd)
4239 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4240 Constify.
4241
31d56ade
TT
42422017-09-27 Tom Tromey <tom@tromey.com>
4243
4244 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4245
b961da0b
TT
42462017-09-27 Tom Tromey <tom@tromey.com>
4247
4248 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4249
e2d8ae16
TT
42502017-09-27 Tom Tromey <tom@tromey.com>
4251
4252 * tui/tui-regs.c (tui_reg_command): Constify.
4253
863779b0
TT
42542017-09-27 Tom Tromey <tom@tromey.com>
4255
4256 * skip.c (skip_file_command, skip_function_command)
4257 (skip_enable_command, skip_disable_command, skip_delete_command):
4258 Constify.
4259
cdb34d4a
TT
42602017-09-27 Tom Tromey <tom@tromey.com>
4261
4262 * record-btrace.c (cmd_record_btrace_bts_start)
4263 (cmd_record_btrace_pt_start): Constify.
4264
e99c83e7
TT
42652017-09-27 Tom Tromey <tom@tromey.com>
4266
4267 * symmisc.c (maintenance_print_symbols)
4268 (maintenance_print_msymbols, maintenance_print_objfiles)
4269 (maintenance_info_symtabs, maintenance_check_symtabs)
4270 (maintenance_expand_symtabs, maintenance_info_line_tables):
4271 Constify.
4272
32faf971
TT
42732017-09-27 Tom Tromey <tom@tromey.com>
4274
4275 * top.c (new_ui_command): Constify.
4276
2cf311eb
TT
42772017-09-27 Tom Tromey <tom@tromey.com>
4278
4279 * symfile.c (add_symbol_file_command)
4280 (remove_symbol_file_command, list_overlays_command)
4281 (map_overlay_command, unmap_overlay_command)
4282 (overlay_auto_command, overlay_manual_command)
4283 (overlay_off_command, overlay_load_command): Constify.
4284
e6738699
TT
42852017-09-27 Tom Tromey <tom@tromey.com>
4286
4287 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4288 (info_spu_mailbox_command, info_spu_dma_command)
4289 (info_spu_proxydma_command): Constify.
4290
aa360cd5
TT
42912017-09-27 Tom Tromey <tom@tromey.com>
4292
4293 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4294
898241a5
TT
42952017-09-27 Tom Tromey <tom@tromey.com>
4296
4297 * cli/cli-script.c (user_defined_command): Constify.
4298
2d0ac106
TT
42992017-09-27 Tom Tromey <tom@tromey.com>
4300
4301 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4302 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4303 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4304 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4305 (dump_binary_value, append_binary_memory, append_binary_value):
4306 Constify.
4307 (struct dump_context) <func>: Constify.
4308 (add_dump_command): Update.
4309
dede02ce
TT
43102017-09-27 Tom Tromey <tom@tromey.com>
4311
4312 * cli/cli-cmds.c (show_version, show_configuration)
4313 (source_command, show_user): Constify.
4314
d3cb6b99
TT
43152017-09-27 Tom Tromey <tom@tromey.com>
4316
4317 * target.c (maintenance_print_target_stack): Constify.
4318
1970a12f
TT
43192017-09-27 Tom Tromey <tom@tromey.com>
4320
4321 * interps.c (interpreter_exec_cmd): Constify.
4322
41243651
TT
43232017-09-27 Tom Tromey <tom@tromey.com>
4324
4325 * record-full.c (cmd_record_full_restore): Constify.
4326
4465d9db
TT
43272017-09-27 Tom Tromey <tom@tromey.com>
4328
4329 * memattr.c (enable_mem_command, disable_mem_command)
4330 (delete_mem_command): Constify.
4331
ad25e423
TT
43322017-09-27 Tom Tromey <tom@tromey.com>
4333
4334 * value.c (show_convenience): Constify.
4335
d64097b1
TT
43362017-09-27 Tom Tromey <tom@tromey.com>
4337
4338 * gdbcore.h (core_file_command): Update.
4339 * corefile.c (core_file_command): Constify.
4340
4d4589ef
TT
43412017-09-27 Tom Tromey <tom@tromey.com>
4342
4343 * user-regs.c (maintenance_print_user_registers): Constify.
4344
32a7bf17
TT
43452017-09-27 Tom Tromey <tom@tromey.com>
4346
4347 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4348
4a475551
TT
43492017-09-27 Tom Tromey <tom@tromey.com>
4350
4351 * cp-support.c (first_component_command): Constify.
4352
990b9f9f
TT
43532017-09-27 Tom Tromey <tom@tromey.com>
4354
4355 * psymtab.c (maintenance_print_psymbols)
4356 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4357 Constify.
4358
c281872e
TT
43592017-09-27 Tom Tromey <tom@tromey.com>
4360
4361 * windows-tdep.c (display_tib): Constify.
4362
5b64bf74
TT
43632017-09-27 Tom Tromey <tom@tromey.com>
4364
4365 * linux-fork.c (delete_checkpoint_command)
4366 (detach_checkpoint_command): Constify.
4367
4ada038f
TT
43682017-09-27 Tom Tromey <tom@tromey.com>
4369
4370 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4371
57f5a81b
TT
43722017-09-27 Tom Tromey <tom@tromey.com>
4373
4374 * arc-tdep.c (dump_arc_instruction_command): Constify.
4375
b0a8e6c4
TT
43762017-09-27 Tom Tromey <tom@tromey.com>
4377
4378 * valprint.c (set_radix, show_radix): Constify.
4379
8d97dc1c
TT
43802017-09-27 Tom Tromey <tom@tromey.com>
4381
4382 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4383
eb7c454d
TT
43842017-09-27 Tom Tromey <tom@tromey.com>
4385
4386 * command.h (not_just_help_class_command): Update.
4387 * cli/cli-decode.h (not_just_help_class_command): Update.
4388 * cli/cli-decode.c (not_just_help_class_command): Constify.
4389
e4e33335
TT
43902017-09-27 Tom Tromey <tom@tromey.com>
4391
4392 * gdb_bfd.c (maintenance_info_bfds): Constify.
4393
0450cc4c
TT
43942017-09-27 Tom Tromey <tom@tromey.com>
4395
4396 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4397 overloads.
4398 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4399 (do_const_cfunc): New function.
4400 (cmd_cfunc_eq): New overload.
4401 (cli_user_command_p): Check do_const_cfunc.
4402 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4403 const_cfunc.
4404 * command.h (add_cmd): Add const overload and no-function
4405 overload.
4406 (set_cmd_cfunc): Add const overload.
4407 (cmd_const_cfunc_ftype): Declare.
4408 (cmd_cfunc_eq): Add const overload.
4409 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4410 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4411 overload.
4412
a9bbfbd8
TT
44132017-09-27 Tom Tromey <tom@tromey.com>
4414
4415 * macroexp.c (get_next_token_for_substitution): New function.
4416 (substitute_args): Call it. Check for __VA_OPT__.
4417
5230b05a
WT
44182017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4419 Pedro Alves <palves@redhat.com>
4420
4421 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4422 producer_is_icc_lt_14.
4423 (producer_is_icc_lt_14): New function.
4424 (check_producer): Add code for checking version of ICC.
4425 (producer_is_icc): Move to producer.c.
4426 (read_structure_type): Restrict ICC workaround to ICC<14.
4427 * producer.c: Include selftest.h.
4428 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4429 New functions.
4430 * producer.h (producer_is_icc): New declaration.
4431
b32b108a
WT
44322017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4433
4434 * Makefile.in (SFILES): Add producer.c.
4435 (COMMON_OBS): Add producer.o
4436 * amd64-tdep.c (producer.h): Add new include.
4437 * dwarf2read.c (producer.h): Add new include.
4438 * producer.c: New file.
4439 * producer.h: New file.
4440 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4441 producer.c.
4442 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4443 producer.h.
4444
5007d765
MK
44452017-09-26 Matthias Klose <doko@ubuntu.com>
4446
4447 * configure.ac: Search ncursesw before ncurses.
4448 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4449 * gdb_curses.h: Include <ncursesw/ncurses.h>
4450 * config.in, configure: Regenerate.
4451
281c4447
RO
44522017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4453
4454 PR gdb/22185
4455 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4456 obsolete.
4457 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4458 Remove i386sol2 support.
4459 * configure.nat <i386sol2>: Remove.
4460 <sol2-64>: Fold into ...
4461 <sol2>: ... this.
4462 Move common settings to default section.
4463 Add sol-thread.o.
4464 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4465 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4466 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4467 <i[34567]86-*-solaris*>: Remove.
4468 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4469
4470 * configure.ac: Remove wctype in libw check.
4471 (_MSE_INT_H): Don't define on Solaris 7-9.
4472 <solaris*>: Remove libthread_db.so.1 check.
4473 * configure: Regenerate.
4474 * config.in: Regenerate.
4475
4476 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4477 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4478 (gdb_ps_size_t): Remove.
4479 Use base types in users.
4480 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4481
4482 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4483
39b06c20
RO
44842017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4485
4486 PR build/22206
4487 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4488 (adi_is_addr_mapped): Likewise.
4489 (PSR_ICC): Don't redefine.
4490 (PSR_IMPL): Likewise.
4491
6c3e20f1
TT
44922017-09-25 Tom Tromey <tom@tromey.com>
4493
4494 * regcache.c (regcache::dump): Use string_printf.
4495
b292235f
TT
44962017-09-25 Tom Tromey <tom@tromey.com>
4497
4498 * regcache.c (class regcache_invalidator): New.
4499 (struct register_to_invalidate): Remove.
4500 (make_cleanup_regcache_invalidate): Remove.
4501 (regcache::raw_write): Use regcache_invalidator.
4502
9ac86b52
TT
45032017-09-25 Tom Tromey <tom@tromey.com>
4504
4505 * spu-tdep.c (spu2ppu_sniffer): Update.
4506 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4507 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4508 Remove.
4509 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4510 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4511 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4512 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4513 (frame_pop): Update.
4514
c0e383c6
TT
45152017-09-25 Tom Tromey <tom@tromey.com>
4516
4517 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4518 * regcache.h (regcache_xfree): Don't declare.
4519 * regcache.c (regcache_xfree): Remove.
4520 (do_regcache_xfree): Use delete.
4521 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4522 * linux-fork.c (free_fork): Use delete.
4523 (fork_save_infrun_state): Likewise.
4524 * jit.c (jit_dealloc_cache): Use delete.
4525 * infrun.c (discard_infcall_suspend_state): Use delete.
4526
791199cc
TT
45272017-09-25 Tom Tromey <tom@tromey.com>
4528
4529 * regcache.h (regcache_xmalloc): Don't declare.
4530 (regcache_raw_set_cached_value): Update comment.
4531 * regcache.c (regcache_xmalloc): Remove.
4532 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4533 * jit.c (jit_frame_sniffer): Use new.
4534 * frame.c (frame_save_as_regcache): Use new.
4535
289e23aa
AA
45362017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4537
4538 * NEWS: Advertise support for guarded-storage registers on IBM z.
4539
1b63490c
AA
45402017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4541
4542 * s390-linux-nat.c (have_regset_gs): New static variable.
4543 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4544 control block and guarded-storage broadcast control regsets.
4545 (s390_read_description): Detect whether the target has
4546 guarded-storage support, return appropriate tdesc.
4547 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4548 (features/s390x-gs-linux64.c): Likewise.
4549 (struct gdbarch_tdep) <have_gs>: New field.
4550 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4551 (s390_gsbc_regset): New variables.
4552 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4553 and s390_gsbc_regset, if applicable.
4554 (s390_core_read_description): Check whether core file was from a
4555 target with guarded-storage support; include appropriate regsets.
4556 (s390_gdbarch_init): Add registers for guarded-storage support.
4557 (_initialize_s390_tdep): Initialize new target descriptions that
4558 include registers for guarded-storage support.
4559 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4560 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4561 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4562 (S390_NUM_REGS): Adjust macro definition.
4563 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4564 (tdesc_s390x_gs_linux64): New declarations.
4565
96235dc1
AA
45662017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4567
4568 * features/s390-gs-linux64.xml: New file.
4569 * features/s390-gs.xml: New file.
4570 * features/s390-gsbc.xml: New file.
4571 * features/s390x-gs-linux64.xml: New file.
4572 * features/Makefile (WHICH): Add s390-gs-linux64 and
4573 s390x-gs-linux64.
4574 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4575 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4576 * features/s390-gs-linux64.c: New generated file.
4577 * features/s390x-gs-linux64.c: New file.
4578 * regformats/s390-gs-linux64.dat: New file.
4579 * regformats/s390x-gs-linux64.dat: New file.
4580
b4a7c699
TT
45812017-09-23 Tom Tromey <tom@tromey.com>
4582
4583 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4584
c2f97536
TT
45852017-09-22 Tom Tromey <tom@tromey.com>
4586
4587 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4588 type to scoped_restore_tmpl.
4589 <scoped_input_handler>: Initialize m_quit_handler directly.
4590
43573013
SDJ
45912017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4592
4593 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4594 (cd_command): Likewise. Free "current_directory" before
4595 assigning to it.
4596 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4597 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4598 * top.c (gdb_dirbuf): Remove global declaration.
4599 * top.h (gdb_dirbuf): Likewise.
4600
6ec2e0f5
SDJ
46012017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4602
4603 * gnulib/aclocal.m4: Regenerate.
4604 * gnulib/config.in: Regenerate.
4605 * gnulib/configure: Regenerate.
4606 * gnulib/import/Makefile.am: Regenerate.
4607 * gnulib/import/Makefile.in: Regenerate.
4608 * gnulib/import/assure.h: New file.
4609 * gnulib/import/at-func.c: Likewise
4610 * gnulib/import/chdir-long.c: New file.
4611 * gnulib/import/chdir-long.h: New file.
4612 * gnulib/import/cloexec.c: New file.
4613 * gnulib/import/cloexec.h: New file.
4614 * gnulib/import/close.c: New file.
4615 * gnulib/import/closedir.c: New file.
4616 * gnulib/import/dirent-private.h: New file.
4617 * gnulib/import/dup-safer.c: New file.
4618 * gnulib/import/dup.c: New file.
4619 * gnulib/import/dup2.c: New file.
4620 * gnulib/import/error.c: New file.
4621 * gnulib/import/error.h: New file.
4622 * gnulib/import/exitfail.c: New file.
4623 * gnulib/import/exitfail.h: New file.
4624 * gnulib/import/fchdir.c: New file.
4625 * gnulib/import/fcntl.c: New file.
4626 * gnulib/import/fcntl.in.h: New file.
4627 * gnulib/import/fd-hook.c: New file.
4628 * gnulib/import/fd-hook.h: New file.
4629 * gnulib/import/fd-safer.c: New file.
4630 * gnulib/import/fdopendir.c: New file.
4631 * gnulib/import/filename.h: New file.
4632 * gnulib/import/filenamecat-lgpl.c: New file.
4633 * gnulib/import/filenamecat.h: New file.
4634 * gnulib/import/fstat.c: New file.
4635 * gnulib/import/fstatat.c: New file.
4636 * gnulib/import/getcwd-lgpl.c: New file.
4637 * gnulib/import/getcwd.c: New file.
4638 * gnulib/import/getdtablesize.c: New file.
4639 * gnulib/import/getlogin_r.c: New file.
4640 * gnulib/import/getprogname.c: New file.
4641 * gnulib/import/getprogname.h: New file.
4642 * gnulib/import/gettext.h: New file.
4643 * gnulib/import/glob-libc.h: New file.
4644 * gnulib/import/glob.c: New file.
4645 * gnulib/import/glob.in.h: New file.
4646 * gnulib/import/intprops.h: New file.
4647 * gnulib/import/m4/chdir-long.m4: New file.
4648 * gnulib/import/m4/close.m4: New file.
4649 * gnulib/import/m4/closedir.m4: New file.
4650 * gnulib/import/m4/d-ino.m4: New file.
4651 * gnulib/import/m4/d-type.m4: New file.
4652 * gnulib/import/m4/dup.m4: New file.
4653 * gnulib/import/m4/dup2.m4: New file.
4654 * gnulib/import/m4/error.m4: New file.
4655 * gnulib/import/m4/fchdir.m4: New file.
4656 * gnulib/import/m4/fcntl.m4: New file.
4657 * gnulib/import/m4/fcntl_h.m4: New file.
4658 * gnulib/import/m4/fdopendir.m4: New file.
4659 * gnulib/import/m4/filenamecat.m4: New file.
4660 * gnulib/import/m4/fstat.m4: New file.
4661 * gnulib/import/m4/fstatat.m4: New file.
4662 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4663 * gnulib/import/m4/getcwd-path-max.m4: New file.
4664 * gnulib/import/m4/getcwd.m4: New file.
4665 * gnulib/import/m4/getdtablesize.m4: New file.
4666 * gnulib/import/m4/getlogin_r.m4: New file.
4667 * gnulib/import/m4/getprogname.m4: New file.
4668 * gnulib/import/m4/glob.m4: New file.
4669 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4670 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4671 * gnulib/import/m4/mempcpy.m4: New file.
4672 * gnulib/import/m4/memrchr.m4: New file.
4673 * gnulib/import/m4/mode_t.m4: New file.
4674 * gnulib/import/m4/msvc-inval.m4: New file.
4675 * gnulib/import/m4/msvc-nothrow.m4: New file.
4676 * gnulib/import/m4/open.m4: New file.
4677 * gnulib/import/m4/openat.m4: New file.
4678 * gnulib/import/m4/opendir.m4: New file.
4679 * gnulib/import/m4/readdir.m4: New file.
4680 * gnulib/import/m4/realloc.m4: New file.
4681 * gnulib/import/m4/rewinddir.m4: New file.
4682 * gnulib/import/m4/save-cwd.m4: New file.
4683 * gnulib/import/m4/strdup.m4: New file.
4684 * gnulib/import/m4/strerror.m4: New file.
4685 * gnulib/import/m4/unistd-safer.m4: New file.
4686 * gnulib/import/mempcpy.c: New file.
4687 * gnulib/import/memrchr.c: New file.
4688 * gnulib/import/msvc-inval.c: New file.
4689 * gnulib/import/msvc-inval.h: New file.
4690 * gnulib/import/msvc-nothrow.c: New file.
4691 * gnulib/import/msvc-nothrow.h: New file.
4692 * gnulib/import/open.c: New file.
4693 * gnulib/import/openat-die.c: New file.
4694 * gnulib/import/openat-priv.h: New file.
4695 * gnulib/import/openat-proc.c: New file.
4696 * gnulib/import/openat.c: New file.
4697 * gnulib/import/openat.h: New file.
4698 * gnulib/import/opendir.c: New file.
4699 * gnulib/import/pipe-safer.c: New file.
4700 * gnulib/import/readdir.c: New file.
4701 * gnulib/import/realloc.c: New file.
4702 * gnulib/import/rewinddir.c: New file.
4703 * gnulib/import/save-cwd.c: New file.
4704 * gnulib/import/save-cwd.h: New file.
4705 * gnulib/import/strdup.c: New file.
4706 * gnulib/import/strerror-override.c: New file.
4707 * gnulib/import/strerror-override.h: New file.
4708 * gnulib/import/strerror.c: New file.
4709 * gnulib/import/unistd--.h: New file.
4710 * gnulib/import/unistd-safer.h: New file.
4711 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4712 "getcwd" and "glob".
4713 * ser-tcp.c: Undefine "close" before redefining it.
4714
432ae719
SM
47152017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4716
4717 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4718 get rid of res_val.
4719
4fa7574e
RO
47202017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4721
4722 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4723 <sol2,sparc>: Likewise.
4724 <sol2-64,i386>: Likewise.
4725
4726 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4727 -Wdeprecated-declarations on *-*-solaris*.
4728 * configure: Regenerate.
4729
4730 * procfs.c: Include "nat/inferior.h".
4731 (procfs_info_proc): Fix typo.
4732
f6327dcb
KB
47332017-09-21 Kevin Buettner <kevinb@redhat.com>
4734
4735 * remote.c (vector): Include.
4736 (struct private_thread_info): Add field, thread_handle.
4737 (free_private_thread_info): Deallocate storage associated with
4738 thread handle.
4739 (get_private_info_thread): Initialize `thread_handle' field.
4740 (struct thread_item): Add field, thread_handle.
4741 (clear_threads_listing_context): Deallocate storage associated
4742 with thread handle.
4743 (start_thread): Add support for "handle" attribute.
4744 (thread_attributes): Add "handle".
4745 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4746 field.
4747 (remote_update_thread_list): Update thread_handle.
4748 (remote_thread_handle_to_thread_info): New function.
4749 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4750
fbbe5337
KB
47512017-09-21 Kevin Buettner <kevinb@redhat.com>
4752
4753 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4754 function.
4755 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4756 * python/python-internal.h (thread_object_type): Declare.
4757
e04ee09e
KB
47582017-09-21 Kevin Buettner <kevinb@redhat.com>
4759
4760 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4761 (target_thread_handle_to_thread_info): Declare.
4762 * target.c (target_thread_handle_to_thread_info): New function.
4763 * target-delegates.c: Regenerate.
4764 * gdbthread.h (find_thread_by_handle): Declare.
4765 * thread.c (find_thread_by_handle): New function.
4766 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4767 function.
4768 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4769
1e5b66ed
SM
47702017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4771
4772 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4773
ebe48ba0
SM
47742017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4775
4776 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4777
0a0bf5dc
YQ
47782017-09-21 Yao Qi <yao.qi@linaro.org>
4779
4780 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4781 to gdb_target_obs.
4782
d1b0a7bf
TT
47832017-09-20 Tom Tromey <tom@tromey.com>
4784
4785 * breakpoint.c (struct counted_command_line): Remove.
4786 (breakpoint_commands): Update.
4787 (alloc_counted_command_line, incref_counted_command_line)
4788 (decref_counted_command_line, do_cleanup_counted_command_line)
4789 (make_cleanup_decref_counted_command_line): Remove.
4790 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4791 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4792 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4793 (save_breakpoints): Update.
4794 * breakpoint.h (counted_command_line): Now a typedef to
4795 shared_ptr.
4796 (struct breakpoint) <commands>: Now a counted_command_line.
4797 (struct bpstats) <command>: Likewise.
4798
48649e1b
TT
47992017-09-20 Tom Tromey <tom@tromey.com>
4800
4801 * breakpoint.c (struct commands_info, do_map_commands_command):
4802 Remove.
4803 (commands_command_1): Update.
4804 (iterate_over_related_breakpoints): Take a function_view.
4805 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4806 (delete_command): Update.
4807 (map_breakpoint_numbers): Take a function_view.
4808 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4809 (disable_command): Update.
4810 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4811 (enable_command): Update.
4812 (struct disp_data, do_enable_breakpoint_disp)
4813 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4814 (do_map_enable_delete_breakpoint): Remove.
4815 (enable_once_command, enable_count_command, enable_delete_command)
4816 (delete_trace_variable_command): Update.
4817
04afa70c
TT
48182017-09-20 Tom Tromey <tom@tromey.com>
4819
4820 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4821 (bpstat_clear): Use delete.
4822 (bpstats): New constructors.
4823 (bpstat_copy, bpstat_stop_status): Use new.
4824 (dprintf_after_condition_true): Update.
4825 * breakpoint.h (bpstats::bpstats): Add constructors.
4826 (bpstats::~bpstats): Add destructor.
4827
c83833f4
PA
48282017-09-20 Pedro Alves <palves@redhat.com>
4829
4830 * eval.c (make_params): Delete, refactored as ...
4831 (class fake_method): ... this new type's ctor.
4832 (fake_method::~fake_method): New.
4833 (evaluate_subexp_standard): Use 'fake_method'.
4834
223ffa71
TT
48352017-09-20 Tom Tromey <tom@tromey.com>
4836
4837 * windows-nat.c (get_windows_debug_event, windows_wait)
4838 (do_initial_windows_stuff, windows_attach): Update.
4839 * utils.c (vwarning, internal_vproblem): Update.
4840 (ui_unregister_input_event_handler_cleanup)
4841 (prepare_to_handle_input): Remove.
4842 (class scoped_input_handler): New.
4843 (defaulted_query, prompt_for_continue): Update.
4844 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4845 Update.
4846 * top.c (undo_terminal_modifications_before_exit): Update.
4847 * target/target.h (target_terminal_init, target_terminal_inferior)
4848 (target_terminal_ours): Don't declare.
4849 (class target_terminal): New.
4850 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4851 (target_terminal_ours_for_output)
4852 (make_cleanup_restore_target_terminal): Don't declare.
4853 (target_terminal_info): Remove.
4854 * target.c (enum terminal_state, terminal_state): Remove.
4855 (target_terminal::terminal_state): Define.
4856 (target_terminal::init): Rename from target_terminal_init.
4857 (target_terminal::inferior): Rename from
4858 target_terminal_inferior.
4859 (target_terminal::ours): Rename from target_terminal_ours.
4860 (target_terminal::ours_for_output): Rename from
4861 target_terminal_ours_for_output.
4862 (target_terminal::info): New method.
4863 (cleanup_restore_target_terminal)
4864 (make_cleanup_restore_target_terminal): Remove.
4865 * solib.c (handle_solib_event): Update.
4866 * remote.c (remote_serial_quit_handler): Update.
4867 (remote_terminal_inferior, remote_wait_as): Update.
4868 * record-full.c (record_full_wait_1): Update.
4869 * nto-procfs.c (procfs_create_inferior): Update.
4870 * nat/fork-inferior.c (startup_inferior): Update.
4871 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4872 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4873 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4874 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4875 (mi_breakpoint_created, mi_breakpoint_deleted)
4876 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4877 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4878 (mi_user_selected_context_changed, report_initial_inferior):
4879 Update.
4880 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4881 (linux_nat_terminal_inferior): Update.
4882 * infrun.c (follow_fork_inferior)
4883 (handle_vfork_child_exec_or_exit, do_target_resume)
4884 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4885 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4886 Update.
4887 * inflow.c (child_terminal_init, info_terminal_command): Update.
4888 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4889 (attach_command): Update.
4890 * infcall.c (call_thread_fsm_should_stop): Update.
4891 * gnu-nat.c (gnu_attach): Update.
4892 * extension.c (struct active_ext_lang_state)
4893 (restore_active_ext_lang): Update.
4894 * exceptions.c (print_flush): Update.
4895 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4896 (struct quit_handler_cleanup_data, restore_quit_handler)
4897 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4898 Remove.
4899 * cp-support.c (gdb_demangle): Update.
4900 * breakpoint.c (update_inserted_breakpoint_locations)
4901 (insert_breakpoint_locations, handle_jit_event)
4902 (disable_breakpoints_in_unloaded_shlib): Update.
4903 * annotate.c (annotate_breakpoints_invalid)
4904 (annotate_frames_invalid): Update.
4905
013af3fc
TT
49062017-09-20 Tom Tromey <tom@tromey.com>
4907
4908 * main.c (catch_command_errors): Rename from
4909 catch_command_errors_const.
4910 (captured_main_1): Update.
4911
06871ae8
PA
49122017-09-20 Pedro Alves <palves@redhat.com>
4913
4914 * cli/cli-cmds.c (list_command): Use print_sal_location.
4915 (print_sal_location): New function.
4916 (ambiguous_line_spec): Use print_sal_location.
4917 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4918 * symtab.c (find_function_start_sal): Likewise.
4919 * symtab.h (symtab_and_line::symbol): New field.
4920
e5f25bc5
PA
49212017-09-20 Pedro Alves <palves@redhat.com>
4922
4923 * linespec.c (minsym_found): Handle non-text minsyms.
4924 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4925
1b7fa39e
WT
49262017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4927
4928 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4929 backslash.
4930
37dd0825
WT
49312017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4932
4933 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4934 vmovups instead vmovaps.
4935 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4936
4e5a4f58
JB
49372017-09-19 John Baldwin <jhb@FreeBSD.org>
4938
4939 * NEWS (Changes since GDB 8.0): Add starti.
4940 * infcmd.c (enum run_break): New.
4941 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4942 case.
4943 (run_command): Use enum run_how.
4944 (start_command): Likewise.
4945 (starti_command): New function.
4946 (RUN_ARGS_HELP): New macro.
4947 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4948 commands. Add starti command.
4949
aa70c9f1
YQ
49502017-09-19 Yao Qi <yao.qi@linaro.org>
4951
4952 * Makefile.in (monitor.o): Remove the rule.
4953
d6541620
YQ
49542017-09-19 Yao Qi <yao.qi@linaro.org>
4955
4956 * annotate.h (struct annotate_arg_emitter): Use
4957 DISABLE_COPY_AND_ASSIGN.
4958 * common/refcounted-object.h (refcounted_object): Likewise.
4959 * completer.h (struct completion_result): Likewise.
4960 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4961 * filename-seen-cache.h (filename_seen_cache): Likewise.
4962 * gdbcore.h (thread_section_name): Likewise.
4963 * gdb_regex.h (compiled_regex): Likewise.
4964 * gdbthread.h (scoped_restore_current_thread): Likewise.
4965 * inferior.h (scoped_restore_current_inferior): Likewise.
4966 * jit.c (jit_reader): Likewise.
4967 * linespec.h (struct linespec_result): Likewise.
4968 * mi/mi-parse.h (struct mi_parse): Likewise.
4969 * nat/fork-inferior.c (execv_argv): Likewise.
4970 * progspace.h (scoped_restore_current_program_space): Likewise.
4971 * python/python-internal.h (class gdbpy_enter): Likewise.
4972 * regcache.h (regcache): Likewise.
4973 * target-descriptions.c (struct tdesc_reg): Likewise.
4974 (struct tdesc_type): Likewise.
4975 (struct tdesc_feature): Likewise.
4976 * ui-out.h (ui_out_emit_type): Likewise.
4977
0615127c
SM
49782017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4979
4980 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4981 label abort_expression.
4982
5e187554
SM
49832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4984
4985 * common/buffer.c (buffer_xml_printf): Adjust.
4986 * common/xml-utils.c (xml_escape_text): Change return type to
4987 std::string, update code accordingly.
4988 * common/xml-utils.h (xml_escape_text): Change return type to
4989 std::string.
4990 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4991 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4992 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4993 Adjust.
4994
c3d7b541
SM
49952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4996
4997 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4998 (SUBDIR_UNITTESTS_OBS): Add new object file.
4999 * unittests/xml-utils-selftests.c: New file.
5000
1526853e
SM
50012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5002
5003 * common/selftest.h (selftest): New struct/interface.
5004 (register_test): Add name parameter, add new overload.
5005 (run_tests): Add filter parameter.
5006 (for_each_selftest_ftype): New typedef.
5007 (for_each_selftest): New declaration.
5008 * common/selftest.c (tests): Change type to
5009 map<string, unique_ptr<selftest>>.
5010 (simple_selftest): New struct.
5011 (register_test): New function.
5012 (register_test): Add name parameter and use it.
5013 (run_tests): Add filter parameter and use it. Add prints.
5014 Adjust to vector -> map change.
5015 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5016 registering selftests.
5017 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5018 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5019 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5020 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5021 * findvar.c (_initialize_findvar): Likewise.
5022 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5023 * maint.c (maintenance_selftest): Update call to run_tests.
5024 (maintenance_info_selftests): New function.
5025 (_initialize_maint_cmds): Register "maintenance info selftests"
5026 command. Update "maintenance selftest" doc.
5027 * regcache.c (_initialize_regcache): Add names when registering
5028 selftests.
5029 * rust-exp.y (_initialize_rust_exp): Likewise.
5030 * selftest-arch.c (gdbarch_selftest): New struct.
5031 (gdbarch_tests): Remove.
5032 (register_test_foreach_arch): Add name parameter. Call
5033 register_test.
5034 (tests_with_arch): Remove, move most content to
5035 gdbarch_selftest::operator().
5036 (_initialize_selftests_foreach_arch): Remove.
5037 * selftest-arch.h (register_test_foreach_arch): Add name
5038 parameter.
5039 (run_tests_with_arch): New declaration.
5040 * utils-selftests.c (_initialize_utils_selftests): Add names
5041 when registering selftests.
5042 * utils.c (_initialize_utils): Likewise.
5043 * unittests/array-view-selftests.c
5044 (_initialize_array_view_selftests): Likewise.
5045 * unittests/environ-selftests.c (_initialize_environ_selftests):
5046 Likewise.
5047 * unittests/function-view-selftests.c
5048 (_initialize_function_view_selftests): Likewise.
5049 * unittests/offset-type-selftests.c
5050 (_initialize_offset_type_selftests): Likewise.
5051 * unittests/optional-selftests.c
5052 (_initialize_optional_selftests): Likewise.
5053 * unittests/scoped_restore-selftests.c
5054 (_initialize_scoped_restore_selftests): Likewise.
5055 * NEWS: Document "maintenance selftest" and "maint info
5056 selftests".
5057
5846367a
SM
50582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5059
5060 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5061 scoped_restore.
5062
bd77e8ff
SM
50632017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * mi/mi-main.c (mi_load_progress): Make uiout variable
5066 a unique_ptr.
5067
26a67918
PA
50682017-09-15 Pedro Alves <palves@redhat.com>
5069
5070 * compile/compile-c-types.c (convert_enum, convert_int)
5071 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5072
3f8a7804
SM
50732017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5074
5075 * dwarf2read.c (copy_string): Remove.
5076 (parse_macro_definition): Replace copy_string with savestring.
5077
8d200706
YQ
50782017-09-15 Yao Qi <yao.qi@linaro.org>
5079
5080 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5081 gdb_target_obs.
5082 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5083 Likewise.
5084 (i[34567]86-*-linux*): Likewise.
5085
d185219d
SM
50862017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5087
5088 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5089 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5090 <stack>: Change type to std::vector.
5091 <stack_len, stack_allocated>: Remove.
5092 <grow_stack>: Remove.
5093 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5094 (dwarf_expr_context::~dwarf_expr_context): Remove.
5095 (dwarf_expr_context::grow_stack): Remove.
5096 (dwarf_expr_context::push): Adjust.
5097 (dwarf_expr_context::pop): Adjust.
5098 (dwarf_expr_context::fetch): Adjust.
5099 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5100 (dwarf_expr_context::stack_empty_p): Adjust.
5101 (dwarf_expr_context::execute_stack_op): Adjust.
5102
eccd80d6
SM
51032017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5104
5105 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5106 return type to bool.
5107 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5108
69009882
SM
51092017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5112 Change type to bool.
5113 (dwarf_stack_value) <in_stack_memory>: Likewise.
5114 (dwarf_expr_context) <push_address>: Change parameter type to
5115 bool.
5116 <fetch_in_stack_memory>: Change return type to bool.
5117 <push>: Change parameter type to bool.
5118 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5119 to bool.
5120 (dwarf_expr_context::push_address): Likewise.
5121 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5122 to bool.
5123 (dwarf_expr_context::execute_stack_op): Adjust.
5124 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5125
1e467161
SM
51262017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5127
5128 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5129 (struct dwarf_expr_context) <n_pieces>: Remove.
5130 <pieces>: Change type to std::vector.
5131 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5132 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5133 pieces.
5134 (dwarf_expr_context::add_piece): Adjust.
5135 * dwarf2loc.c (struct piece_closure): Initialize fields.
5136 <n_pieces>: Remove.
5137 <pieces>: Change type to std::vector.
5138 (allocate_piece_closure): Adjust, change parameter to
5139 std::vector rvalue and std::move it to piece_closure.
5140 (rw_pieced_value): Adjust.
5141 (check_pieced_synthetic_pointer): Adjust.
5142 (indirect_synthetic_pointer): Adjust.
5143 (coerce_pieced_ref): Adjust.
5144 (free_pieced_value_closure): Adjust. Use delete to free
5145 piece_closure.
5146 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5147 to allocate_piece_closure.
5148 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5149
0782db84
SM
51502017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5151
5152 * probe.h (probe_ops_cp): Remove typedef.
5153 (DEF_VEC_P (probe_ops_cp)): Remove.
5154 (all_probe_ops): Change type to std::vector.
5155 * probe.c (info_probes_for_ops): Adjust to vector change.
5156 (probe_linespec_to_ops): Likewise.
5157 (all_probe_ops): Change type to std::vector.
5158 (_initialize_probe): Adjust to vector change.
5159 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5160 * elfread.c (elf_get_probes): Likewise.
5161 * stap-probe.c (_initialize_stap_probe): Likewise.
5162
1eac6bea
SM
51632017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5164
5165 * probe.h (struct bound_probe): Define constructors.
5166 * probe.c (bound_probe_s): Remove typedef.
5167 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5168 (collect_probes): Change return type to std::vector, remove
5169 cleanup.
5170 (compare_probes): Return bool, change parameter type. Change
5171 semantic to "less than".
5172 (gen_ui_out_table_header_info): Change parameter to std::vector
5173 and update.
5174 (exists_probe_with_pops): Likewise.
5175 (info_probes_for_ops): Update to std::vector change.
5176 (enable_probes_command): Likewise.
5177 (disable_probes_command): Likewise.
5178
aaa63a31
SM
51792017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5180
5181 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5182 vec to std::vector.
5183 * probe.c (parse_probes_in_pspace): Update.
5184 (find_probes_in_objfile): Update.
5185 (find_probe_by_pc): Update.
5186 (collect_probes): Update.
5187 (probe_any_get_probes): Update.
5188 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5189 return type to reference to std::vector.
5190 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5191 std::vector and update.
5192 (dtrace_process_dof): Likewise.
5193 (dtrace_get_probes): Likewise.
5194 * elfread.c (elf_get_probes): Change return type to std::vector,
5195 store an std::vector in bfd_data.
5196 (probe_key_free): Update to std::vector.
5197 * stap-probe.c (handle_stap_probe): Change parameter to
5198 std::vector and update.
5199 (stap_get_probes): Likewise.
5200 * symfile-debug.c (debug_sym_get_probes): Change return type to
5201 std::vector and update.
5202
cb85b21b
TT
52032017-09-11 Tom Tromey <tom@tromey.com>
5204
5205 * breakpoint.c (program_breakpoint_here_p): Update.
5206 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5207 from make_show_memory_breakpoints_cleanup. Return a
5208 scoped_restore_tmpl<int>.
5209 (restore_show_memory_breakpoints): Remove.
5210 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5211 * mem-break.c (memory_validate_breakpoint): Update.
5212 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5213 (ia64_memory_remove_breakpoint): Update.
5214 (ia64_breakpoint_from_pc): Update.
5215 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5216 from make_show_memory_breakpoints_cleanup.
5217
8fbc99ef
TT
52182017-09-11 Tom Tromey <tom@tromey.com>
5219
5220 * d-namespace.c (d_lookup_symbol): Use std::string.
5221 (find_symbol_in_baseclass): Likewise.
5222
50feb4bd
TT
52232017-09-11 Tom Tromey <tom@tromey.com>
5224
5225 * ctf.c (ctf_start): Use std::string.
5226
c6dc63a1
TT
52272017-09-11 Tom Tromey <tom@tromey.com>
5228
5229 * ada-lang.c (is_known_support_routine): Update.
5230 (ada_unhandled_exception_name_addr_from_raise): Update.
5231 * guile/scm-frame.c (gdbscm_frame_name): Update.
5232 * python/py-frame.c (frapy_name): Update.
5233 (frapy_function): Update.
5234 * stack.h (find_frame_funname): Update.
5235 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5236 (print_frame): Update.
5237
d6b9b80f
TT
52382017-09-11 Tom Tromey <tom@tromey.com>
5239
5240 * findcmd.c (put_bits): Take a gdb::byte_vector.
5241 (parse_find_args): Return gdb::byte_vector. "args" now const.
5242 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5243 cleanups.
5244 (find_command): Update.
5245
a9921622
TT
52462017-09-11 Tom Tromey <tom@tromey.com>
5247
5248 * cli/cli-script.c (class scoped_restore_hook_in): New.
5249 (clear_hook_in_cleanup): Remove.
5250 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5251 scoped_restore_hook_in.
5252
be0d7abb
TT
52532017-09-11 Tom Tromey <tom@tromey.com>
5254
5255 * cli/cli-script.c (restore_interp): Remove.
5256 (read_command_lines): Use scoped_restore_interp.
5257 * interps.c (scoped_restore_interp::set_temp): Rename from
5258 interp_set_temp.
5259 * interps.h (class scoped_restore_interp): New.
5260 (interp_set_temp): Remove.
5261
00f675ff
TT
52622017-09-11 Tom Tromey <tom@tromey.com>
5263
5264 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5265 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5266 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5267 scoped_restore.
5268 (mi_cmd_break_insert_1): Update.
5269 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5270 scoped_restore.
5271
cb791d59
TT
52722017-09-11 Tom Tromey <tom@tromey.com>
5273
5274 * demangle.c (demangle_command): Update.
5275 * breakpoint.c (disable_command): Update.
5276 (enable_command): Update.
5277 (find_location_by_number): Make "number" const. Use
5278 get_number_trailer.
5279 * cli/cli-utils.c (extract_arg): Return std::string.
5280 * probe.c (parse_probe_linespec): Update. Change types.
5281 (collect_probes): Take string arguments.
5282 (parse_probe_linespec): Likewise.
5283 (info_probes_for_ops): Update.
5284 (enable_probes_command): Update.
5285 (disable_probes_command): Update.
5286 * break-catch-sig.c (catch_signal_split_args): Update.
5287 * mi/mi-parse.c (mi_parse): Update.
5288
2039bd9f
TT
52892017-09-11 Tom Tromey <tom@tromey.com>
5290
5291 * language.h (language_enum): Make argument const.
5292 * language.c (language_enum): Make argument const.
5293
f1735a53
TT
52942017-09-11 Tom Tromey <tom@tromey.com>
5295
5296 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5297 as function.
5298 (skip_to_space): Rename from skip_to_space_const.
5299 * common/common-utils.c (skip_to_space): New function.
5300 (skip_to_space): Rename from skip_to_space_const.
5301 * cli/cli-utils.h (get_number): Rename from get_number_const.
5302 (extract_arg): Rename from extract_arg_const.
5303 * cli/cli-utils.c (get_number): Rename from get_number_const.
5304 (extract_arg): Rename from extract_arg_const.
5305 (number_or_range_parser::get_number): Use ::get_number.
5306 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5307 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5308 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5309 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5310 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5311 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5312 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5313 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5314
7d221d74
TT
53152017-09-11 Tom Tromey <tom@tromey.com>
5316
5317 * python/python.c (do_start_initialization): Use
5318 py-event-types.def to initialize types.
5319 Define all object type structures.
5320 * python/python-internal.h: Don't declare event initialization
5321 functions.
5322 * python/py-threadevent.c (thread_event_object_type): Don't
5323 define.
5324 * python/py-stopevent.c (stop_event_object_type): Don't define.
5325 * python/py-signalevent.c (signal_event_object_type): Don't
5326 declare or define.
5327 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5328 (clear_objfiles_event_object_type): Don't declare or define.
5329 * python/py-infevents.c (inferior_call_pre_event_object_type)
5330 (inferior_call_post_event_object_type)
5331 (register_changed_event_object_type)
5332 (memory_changed_event_object_type): Don't declare or define.
5333 * python/py-inferior.c (new_thread_event_object_type)
5334 (new_inferior_event_object_type)
5335 (inferior_deleted_event_object_type): Don't declare or define.
5336 * python/py-exitedevent.c (exited_event_object_type): Don't
5337 declare or define.
5338 * python/py-evts.c (gdbpy_initialize_py_events): Use
5339 py-all-events.def.
5340 * python/py-events.h (thread_event_object_type): Don't declare.
5341 (events_object): Use py-all-events.def.
5342 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5343 py-event-types.def.
5344 * python/py-event-types.def: New file.
5345 * python/py-continueevent.c (create_continue_event_object): Don't
5346 declare or define.
5347 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5348 declare or define.
5349 * python/py-all-events.def: New file.
5350
35c61a1d
TT
53512017-09-11 Tom Tromey <tom@tromey.com>
5352
5353 * python/py-threadevent.c (create_thread_event_object): Return
5354 gdbpy_ref.
5355 * python/py-stopevent.h (create_stop_event_object)
5356 (create_breakpoint_event_object, create_signal_event_object):
5357 Update.
5358 * python/py-stopevent.c (create_stop_event_object): Return
5359 gdbpy_ref.
5360 (emit_stop_event): Update.
5361 * python/py-signalevent.c (create_signal_event_object): Return
5362 gdbpy_ref.
5363 * python/py-infevents.c (create_inferior_call_event_object):
5364 Update.
5365 * python/py-event.h (create_event_object)
5366 (create_thread_event_object): Update.
5367 * python/py-event.c (create_event_object): Return gdbpy_ref.
5368 * python/py-continueevent.c: Return gdbpy_ref.
5369 * python/py-bpevent.c (create_breakpoint_event_object): Return
5370 gdbpy_ref.
5371
7c96f8c1
TT
53722017-09-11 Tom Tromey <tom@tromey.com>
5373
5374 PR python/15622:
5375 * NEWS: Add entry.
5376 * python/python.c (do_start_initialization): Initialize new event
5377 types.
5378 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5379 (gdbpy_initialize_inferior_deleted_event)
5380 (gdbpy_initialize_new_thread_event): Declare.
5381 * python/py-threadevent.c (create_thread_event_object): Add option
5382 "thread" parameter.
5383 * python/py-inferior.c (new_thread_event_object_type)
5384 (new_inferior_event_object_type)
5385 (inferior_deleted_event_object_type): Declare.
5386 (python_new_inferior, python_inferior_deleted): New functions.
5387 (add_thread_object): Emit new_thread event.
5388 (gdbpy_initialize_inferior): Attach new functions to corresponding
5389 observers.
5390 (new_thread, new_inferior, inferior_deleted): Define new event
5391 types.
5392 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5393 registries.
5394 * python/py-events.h (events_object) <new_inferior,
5395 inferior_deleted, new_thread>: New fields.
5396 * python/py-event.h (create_thread_event_breakpoint): Add optional
5397 "thread" parameter.
5398
72542b8e
AB
53992017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5400
5401 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5402 check current_ui instead.
5403 (internal_vproblem): Likewise.
5404
0d64823e
SM
54052017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5406
5407 * thread.c (print_thread_info_1): Remove unnecessary calls to
5408 uiout->is_mi_like_p.
5409
eb1e02fd
TT
54102017-09-09 Tom Tromey <tom@tromey.com>
5411
5412 * namespace.h (add_using_directive): Update.
5413 * namespace.c (add_using_directive): Change type of excludes to
5414 std::vector.
5415 * dwarf2read.c (read_import_statement): Use std::vector.
5416 (read_namespace): Update.
5417 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5418
0fc21fd8
TT
54192017-09-09 Tom Tromey <tom@tromey.com>
5420
5421 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5422
49663d05
TT
54232017-09-09 Tom Tromey <tom@tromey.com>
5424
5425 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5426
0b868b60
TT
54272017-09-09 Tom Tromey <tom@tromey.com>
5428
5429 * stack.c (func_command): Use gdb::def_vector.
5430
c0470d48
TT
54312017-09-09 Tom Tromey <tom@tromey.com>
5432
5433 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5434 ui_out_emit_list, ui_out_emit_tuple.
5435 (mi_cmd_var_update): Likewise.
5436
ca5909c7
TT
54372017-09-09 Tom Tromey <tom@tromey.com>
5438
5439 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5440 ui_out_redirect_pop.
5441 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5442 ui_out_redirect_pop.
5443 * utils.c (do_ui_out_redirect_pop)
5444 (make_cleanup_ui_out_redirect_pop): Remove.
5445 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5446 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5447 * ui-out.h (ui_out_redirect_pop): New class.
5448
e6a2252a
TT
54492017-09-09 Tom Tromey <tom@tromey.com>
5450
5451 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5452 (list_available_thread_groups, mi_cmd_list_thread_groups)
5453 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5454 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5455 Likewise.
5456
393702cd
TT
54572017-09-09 Tom Tromey <tom@tromey.com>
5458
5459 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5460 ui_out_emit_tuple.
5461
76f9c9cf
TT
54622017-09-09 Tom Tromey <tom@tromey.com>
5463
5464 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5465 * stack.c (print_frame): Use ui_out_emit_tuple.
5466 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5467 (info_spu_mailbox_command, info_spu_dma_command)
5468 (info_spu_proxydma_command): Likewise.
5469 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5470 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5471 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5472 ui_out_emit_tuple.
5473 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5474
dc9fe180
TT
54752017-09-09 Tom Tromey <tom@tromey.com>
5476
5477 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5478 (class ui_out_emit_table): Update comment.
5479 * ui-out.c (do_cleanup_table_end)
5480 (make_cleanup_ui_out_table_begin_end): Remove.
5481 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5482 (info_spu_dma_cmdlist): Likewise.
5483 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5484 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5485 ui_out_emit_table.
5486
f8cc3da6
TT
54872017-09-09 Tom Tromey <tom@tromey.com>
5488
5489 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5490 ui_out_emit_list, gdb::optional.
5491
481695ed
JB
54922017-09-09 John Baldwin <jhb@FreeBSD.org>
5493
5494 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5495 prototype.
5496 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5497 prototype.
5498 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5499 prototype.
5500 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5501 * ada-exp.y: Remove _initialize_ada_exp prototype.
5502 * ada-lang.c: Remove _initialize_ada_language prototype.
5503 * ada-tasks.c: Remove _initialize_tasks prototype.
5504 * addrmap.c: Remove _initialize_addrmap prototype.
5505 * agent.c: Remove _initialize_agent prototype.
5506 * aix-thread.c: Remove _initialize_aix_thread prototype.
5507 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5508 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5509 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5510 prototype.
5511 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5512 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5513 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5514 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5515 prototype.
5516 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5517 prototype.
5518 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5519 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5520 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5521 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5522 prototype.
5523 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5524 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5525 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5526 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5527 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5528 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5529 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5530 prototype.
5531 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5532 prototype.
5533 * annotate.c: Remove _initialize_annotate prototype.
5534 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5535 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5536 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5537 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5538 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5539 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5540 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5541 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5542 prototype.
5543 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5544 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5545 * auto-load.c: Remove _initialize_auto_load prototype.
5546 * auxv.c: Remove _initialize_auxv prototype.
5547 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5548 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5549 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5550 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5551 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5552 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5553 prototype.
5554 * break-catch-throw.c: Remove _initialize_break_catch_throw
5555 prototype.
5556 * breakpoint.c: Remove _initialize_breakpoint prototype.
5557 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5558 * btrace.c: Remove _initialize_btrace prototype.
5559 * charset.c: Remove _initialize_charset prototype.
5560 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5561 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5562 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5563 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5564 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5565 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5566 * coffread.c: Remove _initialize_coffread prototype.
5567 * compile/compile.c: Remove _initialize_compile prototype.
5568 * complaints.c: Remove _initialize_complaints prototype.
5569 * completer.c: Remove _initialize_completer prototype.
5570 * copying.awk: Remove _initialize_copying prototype.
5571 * copying.c: Regenerate.
5572 * core-regset.c: Remove _initialize_core_regset prototype.
5573 * corefile.c: Remove _initialize_core prototype.
5574 * corelow.c: Remove _initialize_corelow prototype.
5575 * cp-abi.c: Remove _initialize_cp_abi prototype.
5576 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5577 * cp-support.c: Remove _initialize_cp_support prototype.
5578 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5579 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5580 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5581 * ctf.c: Remove _initialize_ctf prototype.
5582 * d-lang.c: Remove _initialize_d_language prototype.
5583 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5584 prototype.
5585 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5586 * dbxread.c: Remove _initialize_dbxread prototype.
5587 * dcache.c: Remove _initialize_dcache prototype.
5588 * demangle.c: Remove _initialize_demangler prototype.
5589 * disasm-selftests.c: Remove _initialize_disasm_selftests
5590 prototype.
5591 * disasm.c: Remove _initialize_disasm prototype.
5592 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5593 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5594 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5595 prototype.
5596 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5597 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5598 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5599 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5600 * elfread.c: Remove _initialize_elfread prototype.
5601 * exec.c: Remove _initialize_exec prototype.
5602 * extension.c: Remove _initialize_extension prototype.
5603 * f-lang.c: Remove _initialize_f_language prototype.
5604 * f-valprint.c: Remove _initialize_f_valprint prototype.
5605 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5606 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5607 * filesystem.c: Remove _initialize_filesystem prototype.
5608 * findcmd.c: Remove _initialize_mem_search prototype.
5609 * fork-child.c: Remove _initialize_fork_child prototype.
5610 * frame-base.c: Remove _initialize_frame_base prototype.
5611 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5612 * frame.c: Remove _initialize_frame prototype.
5613 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5614 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5615 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5616 * gcore.c: Remove _initialize_gcore prototype.
5617 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5618 * gdbarch.c: Regenerate.
5619 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5620 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5621 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5622 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5623 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5624 * go-lang.c: Remove _initialize_go_language prototype.
5625 * go32-nat.c: Remove _initialize_go32_nat prototype.
5626 * guile/guile.c: Remove _initialize_guile prototype.
5627 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5628 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5629 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5630 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5631 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5632 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5633 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5634 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5635 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5636 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5637 prototype.
5638 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5639 prototype.
5640 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5641 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5642 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5643 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5644 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5645 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5646 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5647 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5648 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5649 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5650 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5651 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5652 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5653 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5654 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5655 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5656 prototype.
5657 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5658 prototype.
5659 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5660 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5661 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5662 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5663 * infcall.c: Remove _initialize_infcall prototype.
5664 * infcmd.c: Remove _initialize_infcmd prototype.
5665 * inferior.c: Remove _initialize_inferiors prototype.
5666 * inflow.c: Remove _initialize_inflow prototype.
5667 * infrun.c: Remove _initialize_infrun prototype.
5668 * interps.c: Remove _initialize_interpreter prototype.
5669 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5670 * jit.c: Remove _initialize_jit prototype.
5671 * language.c: Remove _initialize_language prototype.
5672 * linux-fork.c: Remove _initialize_linux_fork prototype.
5673 * linux-nat.c: Remove _initialize_linux_nat prototype.
5674 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5675 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5676 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5677 * m2-lang.c: Remove _initialize_m2_language prototype.
5678 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5679 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5680 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5681 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5682 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5683 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5684 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5685 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5686 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5687 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5688 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5689 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5690 * machoread.c: Remove _initialize_machoread prototype.
5691 * macrocmd.c: Remove _initialize_macrocmd prototype.
5692 * macroscope.c: Remove _initialize_macroscope prototype.
5693 * maint.c: Remove _initialize_maint_cmds prototype.
5694 * mdebugread.c: Remove _initialize_mdebugread prototype.
5695 * memattr.c: Remove _initialize_mem prototype.
5696 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5697 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5698 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5699 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5700 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5701 * microblaze-linux-tdep.c: Remove
5702 _initialize_microblaze_linux_tdep prototype.
5703 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5704 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5705 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5706 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5707 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5708 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5709 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5710 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5711 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5712 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5713 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5714 prototype.
5715 * mipsread.c: Remove _initialize_mipsread prototype.
5716 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5717 prototype.
5718 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5719 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5720 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5721 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5722 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5723 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5724 prototype.
5725 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5726 * nto-procfs.c: Remove _initialize_procfs prototype.
5727 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5728 * objc-lang.c: Remove _initialize_objc_language prototype.
5729 * objfiles.c: Remove _initialize_objfiles prototype.
5730 * observer.c: Remove observer_test_first_notification_function,
5731 observer_test_second_notification_function,
5732 observer_test_third_notification_function, and
5733 _initialize_observer prototypes.
5734 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5735 * osabi.c: Remove _initialize_gdb_osabi prototype.
5736 * osdata.c: Remove _initialize_osdata prototype.
5737 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5738 * parse.c: Remove _initialize_parse prototype.
5739 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5740 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5741 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5742 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5743 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5744 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5745 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5746 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5747 * printcmd.c: Remove _initialize_printcmd prototype.
5748 * probe.c: Remove _initialize_probe prototype.
5749 * proc-api.c: Remove _initialize_proc_api prototype.
5750 * proc-events.c: Remove _initialize_proc_events prototype.
5751 * proc-service.c: Remove _initialize_proc_service prototype.
5752 * procfs.c: Remove _initialize_procfs prototype.
5753 * psymtab.c: Remove _initialize_psymtab prototype.
5754 * python/python.c: Remove _initialize_python prototype.
5755 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5756 * record-btrace.c: Remove _initialize_record_btrace prototype.
5757 * record-full.c: Remove _initialize_record_full prototype.
5758 * record.c: Remove _initialize_record prototype.
5759 * regcache.c: Remove _initialize_regcache prototype.
5760 * reggroups.c: Remove _initialize_reggroup prototype.
5761 * remote-notif.c: Remove _initialize_notif prototype.
5762 * remote-sim.c: Remove _initialize_remote_sim prototype.
5763 * remote.c: Remove _initialize_remote prototype.
5764 * reverse.c: Remove _initialize_reverse prototype.
5765 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5766 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5767 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5768 prototype.
5769 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5770 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5771 * rust-exp.y: Remove _initialize_rust_exp prototype.
5772 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5773 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5774 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5775 * score-tdep.c: Remove _initialize_score_tdep prototype.
5776 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5777 prototype.
5778 * ser-go32.c: Remove _initialize_ser_dos prototype.
5779 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5780 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5781 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5782 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5783 * serial.c: Remove _initialize_serial prototype.
5784 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5785 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5786 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5787 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5788 * skip.c: Remove _initialize_step_skip prototype.
5789 * sol-thread.c: Remove _initialize_sol_thread prototype.
5790 * solib-aix.c: Remove _initialize_solib_aix prototype.
5791 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5792 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5793 * solib-frv.c: Remove _initialize_frv_solib prototype.
5794 * solib-spu.c: Remove _initialize_spu_solib prototype.
5795 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5796 * solib-target.c: Remove _initialize_solib_target prototype.
5797 * solib.c: Remove _initialize_solib prototype.
5798 * source.c: Remove _initialize_source prototype.
5799 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5800 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5801 prototype.
5802 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5803 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5804 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5805 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5806 prototype.
5807 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5808 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5809 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5810 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5811 prototype.
5812 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5813 prototype.
5814 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5815 prototype.
5816 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5817 prototype.
5818 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5819 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5820 prototype.
5821 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5822 prototype.
5823 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5824 prototype.
5825 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5826 prototype.
5827 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5828 prototype.
5829 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5830 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5831 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5832 * stabsread.c: Remove _initialize_stabsread prototype.
5833 * stack.c: Remove _initialize_stack prototype.
5834 * stap-probe.c: Remove _initialize_stap_probe prototype.
5835 * std-regs.c: Remove _initialize_frame_reg prototype.
5836 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5837 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5838 * symfile.c: Remove _initialize_symfile prototype.
5839 * symmisc.c: Remove _initialize_symmisc prototype.
5840 * symtab.c: Remove _initialize_symtab prototype.
5841 * target-dcache.c: Remove _initialize_target_dcache prototype.
5842 * target-descriptions.c: Remove _initialize_target_descriptions
5843 prototype.
5844 * thread.c: Remove _initialize_thread prototype.
5845 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5846 prototype.
5847 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5848 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5849 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5850 prototype.
5851 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5852 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5853 * tracefile.c: Remove _initialize_tracefile prototype.
5854 * tracepoint.c: Remove _initialize_tracepoint prototype.
5855 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5856 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5857 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5858 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5859 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5860 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5861 * tui/tui.c: Remove _initialize_tui prototype.
5862 * typeprint.c: Remove _initialize_typeprint prototype.
5863 * user-regs.c: Remove _initialize_user_regs prototype.
5864 * utils.c: Remove _initialize_utils prototype.
5865 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5866 * valarith.c: Remove _initialize_valarith prototype.
5867 * valops.c: Remove _initialize_valops prototype.
5868 * valprint.c: Remove _initialize_valprint prototype.
5869 * value.c: Remove _initialize_values prototype.
5870 * varobj.c: Remove _initialize_varobj prototype.
5871 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5872 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5873 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5874 * windows-nat.c: Remove _initialize_windows_nat,
5875 _initialize_check_for_gdb_ini, and _initialize_loadable
5876 prototypes.
5877 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5878 * xcoffread.c: Remove _initialize_xcoffread prototype.
5879 * xml-support.c: Remove _initialize_xml_support prototype.
5880 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5881 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5882 prototype.
5883 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5884 prototype.
5885 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5886
a611b5cb
KS
58872017-09-08 Keith Seitz <keiths@redhat.com>
5888
5889 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5890 field.
5891
469412dd
CW
58922017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5893
5894 * f-valprint.c (f_val_print): Remove check for one byte
5895 sized integers. Remove printing of character type.
5896
a5ad232b
FP
58972017-09-08 Frank Penczek <frank.penczek@intel.com>
5898 Christoph Weinmann <christoph.t.weinmann@intel.com>
5899 Bernhard Heckel <bernhard.heckel@intel.com>
5900
5901 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5902 to maintain proper indentation when printing pointers/refs.
5903
e5014227
JB
59042017-09-07 Joel Brobecker <brobecker@adacore.com>
5905
5906 GDB 8.0.1 released.
5907
63c99141
JB
59082017-09-07 Joel Brobecker <brobecker@adacore.com>
5909
5910 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5911
69c1e056
TT
59122017-09-05 Tom Tromey <tom@tromey.com>
5913
5914 * parse.c (funcall_chain): Now a std::vector.
5915 (start_arglist, end_arglist): Simplify.
5916 (free_funcalls): Remove.
5917 (parse_exp_in_context_1): Remove cleanup.
5918
fef704bf
TT
59192017-09-05 Tom Tromey <tom@tromey.com>
5920
5921 * go-exp.y (go_parse): Don't create a cleanup.
5922
5613c585
TT
59232017-09-05 Tom Tromey <tom@tromey.com>
5924
5925 * d-exp.y (PrimaryExpression): Use std::string.
5926 (d_parse): Don't create a cleanup.
5927
eae49211
TT
59282017-09-05 Tom Tromey <tom@tromey.com>
5929
5930 * utils.c (do_clear_parser_state): Remove.
5931 (make_cleanup_clear_parser_state): Remove.
5932 * p-exp.y (pascal_parse): Use scoped_restore.
5933 * m2-exp.y (m2_parse): Use scoped_restore.
5934 * f-exp.y (f_parse): Use scoped_restore.
5935 * d-exp.y (d_parse): Use scoped_restore.
5936 * c-exp.y (c_parse): Use scoped_restore.
5937 * ada-exp.y (ada_parse): Use scoped_restore.
5938 * utils.h (make_cleanup_clear_parser_state): Remove.
5939
73b9be8b
KS
59402017-09-06 Keith Seitz <keiths@redhat.com>
5941
5942 * dwarf2read.c (dw2_linkage_name_attr): New function.
5943 (dw2_linkage_name): New function.
5944 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5945 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5946 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5947
a102602b
KR
59482017-09-06 Kamil Rytarowski <n54@gmx.com>
5949
5950 * config/djgpp/djconfig.sh: Correct shell portability issue.
5951
28ad437d
KR
59522017-09-06 Kamil Rytarowski <n54@gmx.com>
5953
5954 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5955
351787dd
JB
59562017-09-06 John Baldwin <jhb@FreeBSD.org>
5957
5958 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5959 * NEWS: Mention new FreeBSD/mips native configuration.
5960 * configure.host: Add aarch64*-*-freebsd*.
5961 * configure.nat: Likewise.
5962 * aarch64-fbsd-nat.c: New file.
5963
c0f84956
JB
59642017-09-06 John Baldwin <jhb@FreeBSD.org>
5965
5966 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5967 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5968 * NEWS: Mention new FreeBSD/aarch64 target.
5969 * configure.tgt: Add aarch64*-*-freebsd*.
5970 * aarch64-fbsd-tdep.c: New file.
5971 * aarch64-fbsd-tdep.h: New file.
5972
7610297a
KR
59732017-09-06 Kamil Rytarowski <n54@gmx.com>
5974
5975 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5976
fbd1b771
JK
59772017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5978
5979 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5980 of TLS symbols.
5981
5ca79eae
PW
59822017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5983
5984 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5985 call.
5986
bf93d7ba
SM
59872017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5988
5989 * infrun.c (follow_exec): Call add_thread after
5990 target_find_description.
5991
1bb7c059
SM
59922017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5993
5994 * infrun.c (handle_inferior_event_1): When exec'ing, read
5995 stop_pc after follow_exec.
5996
fc809827
SM
59972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5998
5999 * remote.c (process_g_packet): Update error message.
6000
d2fcdd85
YQ
60012017-09-05 Yao Qi <yao.qi@linaro.org>
6002
6003 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6004 targets.
6005
e69570ee
PA
60062017-09-05 Pedro Alves <palves@redhat.com>
6007
6008 * eval.c (eval_call, evaluate_funcall): New functions, factored
6009 out from ...
6010 (evaluate_subexp_standard): ... this.
6011
22916b07
YQ
60122017-09-05 Yao Qi <yao.qi@linaro.org>
6013
6014 * amd64-tdep.c (amd64_target_description): Create target
6015 descriptions.
6016 (_initialize_amd64_tdep): Don't call functions
6017 initialize_tdesc_amd64_*. Add self tests.
6018 * arch/amd64.c (amd64_create_target_description): Add parameter
6019 is_linux. Call set_tdesc_osabi if is_linux is true.
6020 * arch/amd64.h (amd64_create_target_description): Update the
6021 declaration.
6022 * arch/i386.c (i386_create_target_description): Add parameter
6023 is_linux. Call set_tdesc_osabi if is_linux is true.
6024 * arch/i386.h (i386_create_target_description): Update
6025 declaration.
6026 * configure.tgt: Add i386.o to gdb_target_obs.
6027 * features/Makefile (XMLTOC): Remove i386/*.xml.
6028 * features/i386/amd64-avx-avx512.c: Remove.
6029 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6030 * features/i386/amd64-avx-mpx.c: Remove.
6031 * features/i386/amd64-avx.c: Remove.
6032 * features/i386/amd64-mpx.c: Remove.
6033 * features/i386/amd64.c: Remove.
6034 * features/i386/i386-avx-avx512.c: Remove.
6035 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6036 * features/i386/i386-avx-mpx.c: Remove.
6037 * features/i386/i386-avx.c: Remove.
6038 * features/i386/i386-mmx.c: Remove.
6039 * features/i386/i386-mpx.c: Remove.
6040 * features/i386/i386.c: Remove.
6041 * i386-tdep.c: Don't include features/i386/i386*.c., include
6042 target-descriptions.h and arch/i386.h.
6043 (i386_target_description): Create target descriptions.
6044 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6045 functions. Do self tests.
6046
0854b7b1
YQ
60472017-09-05 Yao Qi <yao.qi@linaro.org>
6048
6049 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6050 * features/i386/amd64-avx-avx512-linux.c: Removed.
6051 * features/i386/amd64-avx-linux.c: Removed.
6052 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6053 * features/i386/amd64-avx-mpx-linux.c: Removed.
6054 * features/i386/amd64-linux.c: Removed.
6055 * features/i386/amd64-mpx-linux.c: Removed.
6056 * features/i386/x32-avx-avx512-linux.c: Removed.
6057 * features/i386/x32-avx-linux.c: Removed.
6058 * features/i386/x32-linux.c: Removed.
6059
b4570e4b
YQ
60602017-09-05 Yao Qi <yao.qi@linaro.org>
6061
6062 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6063 features/i386/*.c.
6064 (amd64_linux_read_description): Call
6065 amd64_create_target_description.
6066 * arch/amd64.c: New file.
6067 * arch/amd64.h: New file.
6068 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6069 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6070
6c73f67f
YQ
60712017-09-05 Yao Qi <yao.qi@linaro.org>
6072
6073 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6074 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6075 (amd64_linux_read_description): Create target descriptions.
6076 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6077 functions. Add unit tests.
6078 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6079 x32-core.xml.
6080 * features/i386/64bit-avx.c: Generated.
6081 * features/i386/64bit-avx512.c: Generated.
6082 * features/i386/64bit-core.c: Generated.
6083 * features/i386/64bit-linux.c: Generated.
6084 * features/i386/64bit-mpx.c: Generated.
6085 * features/i386/64bit-pkeys.c: Generated.
6086 * features/i386/64bit-segments.c: Generated.
6087 * features/i386/64bit-sse.c: Generated.
6088 * features/i386/x32-core.c: Generated.
6089 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6090 c files for amd64-linux and x32-linux.
6091
9d3d478b
YQ
60922017-09-05 Yao Qi <yao.qi@linaro.org>
6093
6094 * amd64-linux-tdep.c (amd64_linux_read_description): New
6095 function.
6096 (amd64_linux_core_read_description): Call
6097 amd64_linux_read_description.
6098 (amd64_linux_init_abi): Likewise.
6099 (amd64_x32_linux_init_abi): Likewise.
6100 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6101 * x86-linux-nat.c (x86_linux_read_description): Call
6102 amd64_linux_read_description.
6103
b9f1d50f
YQ
61042017-09-05 Yao Qi <yao.qi@linaro.org>
6105
6106 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6107 comments.
6108
188c9e6d
YQ
61092017-09-05 Yao Qi <yao.qi@linaro.org>
6110
6111 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6112 * features/i386/i386-avx-avx512-linux.c: Remove.
6113 * features/i386/i386-avx-linux.c: Remove.
6114 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6115 * features/i386/i386-avx-mpx-linux.c: Remove.
6116 * features/i386/i386-linux.c: Remove.
6117 * features/i386/i386-mmx-linux.c: Remove.
6118 * features/i386/i386-mpx-linux.c: Remove.
6119
5f035c07
YQ
61202017-09-05 Yao Qi <yao.qi@linaro.org>
6121
6122 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6123 (SFILES): Add arch/i386.c.
6124 (HFILES_NO_SRCDIR): Add arch/i386.h.
6125 * arch/i386.c: New file.
6126 * arch/i386.h: New file.
6127 * arch/tdesc.h (allocate_target_description): Declare.
6128 (set_tdesc_architecture): Declare.
6129 (set_tdesc_osabi): Declare.
6130 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6131 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6132 include arch/i386.h.
6133 (i386_linux_read_description): Remove code and call
6134 i386_create_target_description.
6135 (set_tdesc_architecture): New function.
6136 (set_tdesc_osabi): New function.
6137 * target-descriptions.h (allocate_target_description): Remove.
6138
0abe8a89
YQ
61392017-09-05 Yao Qi <yao.qi@linaro.org>
6140
6141 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6142 * target-descriptions.c (tdesc_create_feature): Likewise, and
6143 adjust code.
6144 * features/i386/32bit-avx.c: Re-generated.
6145 * features/i386/32bit-avx512.c: Re-generated.
6146 * features/i386/32bit-core.c: Re-generated.
6147 * features/i386/32bit-linux.c: Re-generated.
6148 * features/i386/32bit-mpx.c: Re-generated.
6149 * features/i386/32bit-pkeys.c: Re-generated.
6150 * features/i386/32bit-sse.c: Re-generated.
6151
0a188386
YQ
61522017-09-05 Yao Qi <yao.qi@linaro.org>
6153
6154 * regformats/regdef.h (struct reg): Override operator == and !=.
6155
f49ff000
YQ
61562017-09-05 Yao Qi <yao.qi@linaro.org>
6157
6158 * arch/tdesc.h: New file.
6159 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6160 * target-descriptions.c: Update comments.
6161 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6162 declarations.
6163 * features/i386/32bit-avx.c: Re-generated.
6164 * features/i386/32bit-avx512.c: Re-generated.
6165 * features/i386/32bit-core.c: Re-generated.
6166 * features/i386/32bit-linux.c: Re-generated.
6167 * features/i386/32bit-mpx.c: Re-generated.
6168 * features/i386/32bit-pkeys.c: Re-generated.
6169 * features/i386/32bit-sse.c: Re-generated.
6170
f7000548
YQ
61712017-09-05 Yao Qi <yao.qi@linaro.org>
6172
6173 * regformats/regdat.sh: Update generated code.
6174
c9a5e2a5
YQ
61752017-09-05 Yao Qi <yao.qi@linaro.org>
6176
6177 * regformats/regdat.sh: Adjust code order.
6178
d6b687ac
SM
61792017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6180
6181 * expprint.c (dump_subexp_body_standard): Use constant format
6182 string in fprintf_filtered call.
6183
a379bfd0
JB
61842017-09-04 John Baldwin <jhb@FreeBSD.org>
6185
6186 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6187 NetBSD/i386.
6188 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6189
f7efc967
JB
61902017-09-04 John Baldwin <jhb@FreeBSD.org>
6191
6192 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6193
c49fbc6c
JB
61942017-09-04 John Baldwin <jhb@FreeBSD.org>
6195
6196 * bsd-kvm.o: Define _KMEMUSER.
6197 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6198 * configure: Regenerate.
6199
26562e73
JB
62002017-09-04 John Baldwin <jhb@FreeBSD.org>
6201
6202 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6203 * i386-fbsd-nat.c: Likewise.
6204
31cf1487
JB
62052017-09-04 John Baldwin <jhb@FreeBSD.org>
6206
6207 * unittests/array-view-selftests.c: Add include of <array>.
6208
5b9f8a7c
JB
62092017-09-04 John Baldwin <jhb@FreeBSD.org>
6210
6211 * spu-tdep.c (flush_ea_cache): Add missing argument to
6212 call_function_by_hand.
6213
d69cf9b2
PA
62142017-09-04 Pedro Alves <palves@redhat.com>
6215
6216 * NEWS (Safer support for debugging with no debug info): New.
6217
3693fdb3
PA
62182017-09-04 Pedro Alves <palves@redhat.com>
6219
6220 * c-exp.y (function_method, function_method_void): Add current
6221 instance flags to TYPE_INSTANCE.
6222 * dwarf2read.c (check_modifier): New.
6223 (compute_delayed_physnames): Assert that only C++ adds delayed
6224 physnames. Mark fn_fields as const/volatile depending on
6225 physname.
6226 * eval.c (make_params): New type_instance_flags parameter. Use
6227 it as the new type's instance flags.
6228 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6229 flags element and pass it to make_params.
6230 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6231 instance flags element.
6232 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6233 * gdbtypes.h: Include "enum-flags.h".
6234 (type_instance_flags): New enum-flags type.
6235 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6236 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6237 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6238 (follow_type_instance_flags): New function.
6239 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6240 * parser-defs.h (follow_type_instance_flags): Declare.
6241 * valops.c (value_struct_elt_for_reference): const/volatile must
6242 match too.
6243
e68cb8e0
PA
62442017-09-04 Pedro Alves <palves@redhat.com>
6245
6246 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6247 function/method scopes; lookup the nested name as a function local
6248 static variable.
6249
858be34c
PA
62502017-09-04 Pedro Alves <palves@redhat.com>
6251
6252 (%type <voidval>): Add function_method.
6253 * c-exp.y (exp): New production for calls with no arguments.
6254 (function_method, function_method_void_or_typelist): New
6255 productions.
6256 (exp): New production for "method()::static_var".
6257 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6258 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6259 Handle OP_FUNC_STATIC_VAR.
6260 * parse.c (operator_length_standard):
6261 Handle OP_FUNC_STATIC_VAR.
6262
dd5901a6
PA
62632017-09-04 Pedro Alves <palves@redhat.com>
6264
6265 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6266 handling.
6267 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6268 Ditto.
6269 * parse.c (operator_length_standard, operator_check_standard):
6270 Ditto.
6271 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6272
46a4882b
PA
62732017-09-04 Pedro Alves <palves@redhat.com>
6274
6275 * ax-gdb.c: Include "typeprint.h".
6276 (gen_expr_for_cast): New function.
6277 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6278 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6279 type is unknown.
6280 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6281 nodebug_data_symbol.
6282 * eval.c: Include "typeprint.h".
6283 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6284 Error out if symbol has unknown type.
6285 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6286 evaluate_subexp_for_cast.
6287 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6288 OP_VAR_MSYM_VALUE.
6289 (evaluate_subexp_for_cast): New function.
6290 * gdbtypes.c (init_nodebug_var_type): New function.
6291 (objfile_type): Use it to initialize types of variables with no
6292 debug info.
6293 * typeprint.c (error_unknown_type): New.
6294 * typeprint.h (error_unknown_type): New declaration.
6295 * compile/compile-c-types.c (convert_type_basic): Handle
6296 TYPE_CODE_ERROR; warn and fallback to int for variables with
6297 unknown type.
6298
fe13dfec
PA
62992017-09-04 Pedro Alves <palves@redhat.com>
6300
6301 * eval.c (evaluate_var_value): New function, factored out from ...
6302 (evaluate_subexp_standard): ... here.
6303
d008ee21
PA
63042017-09-04 Pedro Alves <palves@redhat.com>
6305
6306 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6307 Remove useless assignments to 'op'.
6308
827d0c51
PA
63092017-09-04 Pedro Alves <palves@redhat.com>
6310
6311 * eval.c (eval_skip_value): New function.
6312 (evaluate_subexp_standard): Use it.
6313
2c5a2be1
PA
63142017-09-04 Pedro Alves <palves@redhat.com>
6315
6316 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6317 function name from symbol/minsym and pass it to
6318 error_call_unknown_return_type.
6319
74ea4be4
PA
63202017-09-04 Pedro Alves <palves@redhat.com>
6321
6322 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6323 * ax-gdb.c (gen_msym_var_ref): New function.
6324 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6325 * eval.c (evaluate_var_msym_value): New function.
6326 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6327 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6328 to call_function_by_hand.
6329 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6330 Handle OP_VAR_MSYM_VALUE.
6331 (union exp_element) <msymbol>: New field.
6332 * minsyms.h (struct type): Forward declare.
6333 (find_minsym_type_and_address): Declare.
6334 * parse.c (write_exp_elt_msym): New function.
6335 (write_exp_msymbol): Delete, refactored as ...
6336 (find_minsym_type_and_address): ... this new function.
6337 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6338 (operator_length_standard, operator_check_standard): Handle
6339 OP_VAR_MSYM_VALUE.
6340 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6341
7022349d
PA
63422017-09-04 Pedro Alves <palves@redhat.com>
6343
6344 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6345 TYPE_GNU_IFUNC specially here. Throw error if return type is
6346 unknown.
6347 * ada-typeprint.c (print_func_type): Handle functions with unknown
6348 return type.
6349 * c-typeprint.c (c_type_print_base): Handle functions and methods
6350 with unknown return type.
6351 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6352 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6353 * compile/compile-c-types.c: Include "objfiles.h".
6354 (convert_func): For functions with unknown return type, warn and
6355 default to int.
6356 * compile/compile-object-run.c (compile_object_run): Adjust call
6357 to call_function_by_hand_dummy.
6358 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6359 call_function_by_hand.
6360 * eval.c (evaluate_subexp_standard): Adjust calls to
6361 call_function_by_hand. Handle functions and methods with unknown
6362 return type. Pass expect_type to call_function_by_hand.
6363 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6364 return type.
6365 * gcore.c (call_target_sbrk): Adjust call to
6366 call_function_by_hand.
6367 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6368 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6369 an integer address type instead of nodebug.
6370 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6371 call_function_by_hand.
6372 * infcall.c (error_call_unknown_return_type): New function.
6373 (call_function_by_hand): New "default_return_type" parameter.
6374 Pass it down.
6375 (call_function_by_hand_dummy): New "default_return_type"
6376 parameter. Use it instead of defaulting to int. If there's no
6377 default and the return type is unknown, throw an error. If
6378 there's a default return type, and the called function has no
6379 debug info, then assume the function is prototyped.
6380 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6381 New "default_return_type" parameter.
6382 (error_call_unknown_return_type): New declaration.
6383 * linux-fork.c (call_lseek): Cast return type of lseek.
6384 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6385 call_function_by_hand.
6386 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6387 calls to call_function_by_hand.
6388 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6389 return type.
6390 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6391 (value_nsstring, print_object_command): Adjust calls to
6392 call_function_by_hand.
6393 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6394 functions with unknown return type.
6395 (pascal_type_print_func_varspec_suffix): New function.
6396 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6397 TYPE_CODE_METHOD>: Use it.
6398 * python/py-value.c (valpy_call): Adjust call to
6399 call_function_by_hand.
6400 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6401 call_function_by_hand.
6402 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6403 call_function_by_hand.
6404 * valops.c (value_allocate_space_in_inferior): Adjust call to
6405 call_function_by_hand.
6406 * typeprint.c (type_print_unknown_return_type): New function.
6407 * typeprint.h (type_print_unknown_return_type): New declaration.
6408
54990598
PA
64092017-09-04 Pedro Alves <palves@redhat.com>
6410
6411 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6412 types with more than one parameter as prototyped.
6413
9a24775b
PA
64142017-09-04 Pedro Alves <palves@redhat.com>
6415
6416 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6417 (disassemble_command): Use gdb_disassembly_flags instead of bare
6418 int.
6419 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6420 (dump_insns, do_mixed_source_and_assembly_deprecated)
6421 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6422 Use gdb_disassembly_flags instead of bare int.
6423 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6424 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6425 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6426 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6427 (enum gdb_disassembly_flag): ... values of this new enumeration.
6428 (gdb_disassembly_flags): Define.
6429 (gdb_disassembly)
6430 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6431 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6432 gdb_disassembly_flags instead of bare int.
6433 * record-btrace.c (btrace_insn_history)
6434 (record_btrace_insn_history, record_btrace_insn_history_range)
6435 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6436 instead of bare int.
6437 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6438 Use gdb_disassembly_flags instead of bare int.
6439 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6440 Define.
6441 * target-delegates.c: Regenerate.
6442 * target.c (target_insn_history, target_insn_history_from)
6443 (target_insn_history_range): Use gdb_disassembly_flags instead of
6444 bare int.
6445 * target.h: Include "disasm.h".
6446 (struct target_ops) <to_insn_history, to_insn_history_from,
6447 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6448 int.
6449 (target_insn_history, target_insn_history_from)
6450 (target_insn_history_range): Use gdb_disassembly_flags instead of
6451 bare int.
6452
80a65e9b
SM
64532017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6454
6455 * cli/cli-script.c (build_command_line): For if/while commands,
6456 check whether args is empty.
6457
6b66338c
SM
64582017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6459
6460 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6461 (enum command_control_type): Likewise.
6462 (struct command_line): Likewise.
6463 (free_command_lines): Likewise.
6464 (struct command_lines_deleter): Likewise.
6465 (command_line_up): Likewise.
6466 (read_command_lines): Likewise.
6467 (read_command_lines_1): Likewise.
6468 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6469 (enum command_control_type): Likewise.
6470 (struct command_line): Likewise.
6471 (free_command_lines): Likewise.
6472 (struct command_lines_deleter): Likewise.
6473 (command_line_up): Likewise.
6474 (read_command_lines): Likewise.
6475 (read_command_lines_1): Likewise.
6476 * breakpoint.h: Include cli/cli-script.h.
6477 * extension-priv.h: Likewise.
6478 * gdbcmd.h: Likewise.
6479
51abb421
PA
64802017-09-04 Pedro Alves <palves@redhat.com>
6481
6482 * ada-lang.c (is_known_support_routine): Move sal declaration to
6483 where it is initialized.
6484 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6485 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6486 (clear_command, update_static_tracepoint): Remove init_sal
6487 references. Move declarations closer to initializations.
6488 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6489 initializations.
6490 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6491 references. Move sal declarations closer to initializations.
6492 * frame.c (find_frame_sal): Return a symtab_and_line via function
6493 return instead of output parameter. Remove init_sal references.
6494 * frame.h (find_frame_sal): Return a symtab_and_line via function
6495 return instead of output parameter.
6496 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6497 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6498 instead of memset.
6499 (gdbscm_find_pc_line): Remove init_sal reference.
6500 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6501 references. Move declarations closer to initializations.
6502 * infcmd.c (set_step_frame): Update. Move declarations closer to
6503 initializations.
6504 (finish_backward): Remove init_sal references. Move declarations
6505 closer to initializations.
6506 * infrun.c (process_event_stop_test, handle_step_into_function)
6507 (insert_hp_step_resume_breakpoint_at_frame)
6508 (insert_step_resume_breakpoint_at_caller): Likewise.
6509 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6510 (symbol_to_sal): Likewise.
6511 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6512 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6513 to its initialization.
6514 * reverse.c (save_bookmark_command): Use new/delete. Remove
6515 init_sal references. Move declarations closer to initializations.
6516 * source.c (get_current_source_symtab_and_line): Remove brace
6517 initialization.
6518 (set_current_source_symtab_and_line): Now takes the sal by const
6519 reference. Remove brace initialization.
6520 (line_info): Remove init_sal reference.
6521 * source.h (set_current_source_symtab_and_line): Now takes a
6522 symtab_and_line via const reference.
6523 * stack.c (set_current_sal_from_frame): Adjust.
6524 (print_frame_info): Adjust.
6525 (get_last_displayed_sal): Return the sal via function return
6526 instead of via output parameter. Simplify.
6527 (frame_info): Adjust.
6528 * stack.h (get_last_displayed_sal): Return the sal via function
6529 return instead of via output parameter.
6530 * symtab.c (init_sal): Delete.
6531 (find_pc_sect_line): Remove init_sal references. Move
6532 declarations closer to initializations.
6533 (find_function_start_sal): Remove init_sal references. Move
6534 declarations closer to initializations.
6535 * symtab.h (struct symtab_and_line): In-class initialize all
6536 fields.
6537 * tracepoint.c (set_traceframe_context)
6538 (print_one_static_tracepoint_marker): Remove init_sal references.
6539 Move declarations closer to initializations.
6540 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6541 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6542 declarations closer to initializations.
6543 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6544 init_sal references. Adjust.
6545
6c5b2ebe
PA
65462017-09-04 Pedro Alves <palves@redhat.com>
6547
6548 * ax-gdb.c (agent_command_1): Use range-for.
6549 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6550 * breakpoint.c: Include "common/array-view.h".
6551 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6552 parameter from struct symtabs_and_lines to
6553 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6554 (breakpoint_sals_to_pc): Change sals parameter from struct
6555 symtabs_and_lines to std::vector reference.
6556 (check_fast_tracepoint_sals): Change sals parameter from struct
6557 symtabs_and_lines to std::array_view. Use range-for.
6558 (decode_static_tracepoint_spec): Return a std::vector instead of
6559 symtabs_and_lines. Update.
6560 (create_breakpoint): Update.
6561 (break_range_command, until_break_command, clear_command): Update.
6562 (base_breakpoint_decode_location, bkpt_decode_location)
6563 (bkpt_probe_create_sals_from_location)
6564 (bkpt_probe_decode_location, tracepoint_decode_location)
6565 (tracepoint_probe_decode_location)
6566 (strace_marker_create_sals_from_location): Return a std::vector
6567 instead of symtabs_and_lines.
6568 (strace_marker_create_breakpoints_sal): Update.
6569 (strace_marker_decode_location): Return a std::vector instead of
6570 symtabs_and_lines. Update.
6571 (update_breakpoint_locations): Change struct symtabs_and_lines
6572 parameters to gdb::array_view. Adjust.
6573 (location_to_sals): Return a std::vector instead of
6574 symtabs_and_lines. Update.
6575 (breakpoint_re_set_default): Use std::vector instead of struct
6576 symtabs_and_lines.
6577 (decode_location_default): Return a std::vector instead of
6578 symtabs_and_lines. Update.
6579 * breakpoint.h: Include "common/array-view.h".
6580 (struct breakpoint_ops) <decode_location>: Now returns a
6581 std::vector instead of returning a symtabs_and_lines via output
6582 parameter.
6583 (update_breakpoint_locations): Change sals parameters to use
6584 gdb::array_view.
6585 * cli/cli-cmds.c (edit_command, list_command): Update to use
6586 std::vector and gdb::array_view.
6587 (ambiguous_line_spec): Adjust to use gdb::array_view and
6588 range-for.
6589 (compare_symtabs): Rename to ...
6590 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6591 const reference and adjust.
6592 (filter_sals): Rewrite using std::vector and standard algorithms.
6593 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6594 (jump_command): Update to use std::vector.
6595 * linespec.c (struct linespec_state) <canonical_names>: Update
6596 comment.
6597 (add_sal_to_sals_basic): Delete.
6598 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6599 (decode_line_2, create_sals_line_offset)
6600 (convert_address_location_to_sals, convert_linespec_to_sals)
6601 (convert_explicit_location_to_sals, parse_linespec)
6602 (event_location_to_sals, decode_line_full, decode_line_1)
6603 (decode_line_with_current_source)
6604 (decode_line_with_last_displayed, decode_objc)
6605 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6606 (linespec_result::~linespec_result): Adjust to use std::vector
6607 instead of symtabs_and_lines.
6608 * linespec.h (linespec_sals::sals): Now a std::vector.
6609 (struct linespec_result): Use std::vector, bool, and in-class
6610 initialization.
6611 (decode_line_1, decode_line_with_current_source)
6612 (decode_line_with_last_displayed): Return std::vector.
6613 * macrocmd.c (info_macros_command): Use std::vector.
6614 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6615 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6616 std::vector.
6617 * probe.h (parse_probes): Return a std::vector.
6618 * python/python.c (gdbpy_decode_line): Use std::vector and
6619 gdb::array_view.
6620 * source.c (select_source_symtab, line_info): Use std::vector.
6621 * stack.c (func_command): Use std::vector.
6622 * symtab.h (struct symtabs_and_lines): Delete.
6623 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6624
7c44b49c
PA
66252017-09-04 Pedro Alves <palves@redhat.com>
6626
6627 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6628 unittests/array-view-selftests.c.
6629 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6630 * common/array-view.h: New file.
6631 * unittests/array-view-selftests.c: New file.
6632
e439fa14
PA
66332017-09-04 Pedro Alves <palves@redhat.com>
6634
6635 * cli/cli-cmds.c (edit_command): Pass message to
6636 ambiguous_line_spec.
6637 (list_command): Pass message to ambiguous_line_spec. Say
6638 "first"/"last" instead of "start" and "end" to be consistent with
6639 the manual.
6640 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6641 them to print formatted message.
6642
7525b645
PA
66432017-09-04 Pedro Alves <palves@redhat.com>
6644
6645 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6646 ftrace_update_insns by reference instead of pointer.
6647
badc0020
YQ
66482017-09-04 Yao Qi <yao.qi@linaro.org>
6649
6650 * i386-go32-tdep.c: Include x86-xstate.h.
6651 (i386_go32_init_abi): Call i386_target_description.
6652 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6653 if xcr0 is X86_XSTATE_X87_MASK.
6654 * i386-tdep.h (tdesc_i386): Remove the declaration.
6655 (tdesc_i386_mmx): Likewise.
6656
d78bdb54
YQ
66572017-09-04 Yao Qi <yao.qi@linaro.org>
6658
6659 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6660 X86_XSTATE_SSE_MASK instead of 0.
6661
ca1fa5ee
YQ
66622017-09-04 Yao Qi <yao.qi@linaro.org>
6663
6664 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6665 i386_target_description.
6666 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6667 i386_target_description.
6668 * i386-tdep.c (i386_gdbarch_init): Likewise.
6669
2434b019
YQ
66702017-09-04 Yao Qi <yao.qi@linaro.org>
6671
6672 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6673 (x86_darwin_init_abi_64): Call amd64_target_description.
6674 * amd64-dicos-tdep.c: Likewise.
6675 * amd64-fbsd-nat.c: Likewise.
6676 * amd64-fbsd-tdep.c: Likewise.
6677 * amd64-nbsd-tdep.c: Likewise.
6678 * amd64-obsd-tdep.c: Likewise.
6679 * amd64-sol2-tdep.c: Likewise.
6680 * amd64-windows-tdep.c: Likewise.
6681 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6682
0860c437
SM
66832017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6684
6685 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6686 (btrace_function) <insn>: Change type to use std::vector.
6687 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6688 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6689 ftrace_update_insns, ftrace_compute_global_level_offset,
6690 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6691 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6692 change to std::vector.
6693 (ftrace_update_insns): Adjust to change to std::vector, change
6694 type of INSN parameter.
6695 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6696 * record-btrace.c (btrace_call_history_insn_range,
6697 btrace_compute_src_line_range,
6698 record_btrace_frame_prev_register): Adjust to change to
6699 std::vector.
6700 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6701 to change to std::vector.
6702
0638b7f9
TT
67032017-09-03 Tom Tromey <tom@tromey.com>
6704
6705 * corefile.c (reopen_exec_file): Use std::string.
6706
8f84fb0e
TT
67072017-09-03 Tom Tromey <tom@tromey.com>
6708
6709 * compile/compile.c (compile_register_name_mangled): Return
6710 std::string.
6711 * compile/compile-loc2c.c (pushf_register_address): Update.
6712 (pushf_register): Update.
6713 * compile/compile-c-types.c (convert_array): Update.
6714 * compile/compile-c-symbols.c (generate_vla_size): Update.
6715 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6716 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6717 (convert_one_symbol): Update.
6718 (generate_c_for_for_one_variable): Update.
6719 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6720 std::string.
6721 (generate_register_struct): Update.
6722 * compile/compile-internal.h (c_get_range_decl_name): Return a
6723 std::string.
6724 (compile_register_name_mangled): Return std::string.
6725
18e9961f
TT
67262017-09-03 Tom Tromey <tom@tromey.com>
6727
6728 * utils.c (perror_string): Return a std::string.
6729 (throw_perror_with_name, perror_warning_with_name): Update.
6730
45343786
TT
67312017-09-03 Tom Tromey <tom@tromey.com>
6732
6733 * demangle.c (demangle_command): Use std::string,
6734 unique_xmalloc_ptr.
6735
b57af503
TT
67362017-09-03 Tom Tromey <tom@tromey.com>
6737
6738 * cli/cli-setshow.c (do_set_command): Use std::string.
6739
6eecf35f
TT
67402017-09-03 Tom Tromey <tom@tromey.com>
6741
6742 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6743
56496dd4
TT
67442017-09-03 Tom Tromey <tom@tromey.com>
6745
6746 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6747
e91a1fa7
TT
67482017-09-03 Tom Tromey <tom@tromey.com>
6749
6750 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6751 gdb::unique_xmalloc_ptr.
6752
7ffd83d7
TT
67532017-09-03 Tom Tromey <tom@tromey.com>
6754
6755 * thread.c (print_thread_info_1): Use string_printf.
6756 (thread_apply_command, thread_apply_all_command): Use
6757 std::string.
6758
1ccbe998
TT
67592017-09-03 Tom Tromey <tom@tromey.com>
6760
6761 * valprint.c (val_print_string): Update.
6762 * gdbcore.h (memory_error_message): Return std::string.
6763 * corefile.c (memory_error_message): Return std::string.
6764 (memory_error): Update.
6765 * breakpoint.c (insert_bp_location): Update.
6766
23fdd69e
SM
67672017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6768
6769 * target/waitstatus.h (target_waitstatus_to_string): Change
6770 return type to std::string.
6771 * target/waitstatus.c (target_waitstatus_to_string): Return
6772 std::string.
6773 * target.h (target_waitstatus_to_string): Remove declaration.
6774 * infrun.c (resume, clear_proceed_status_thread,
6775 print_target_wait_results, do_target_wait, save_waitstatus,
6776 stop_all_threads): Adjust.
6777 * record-btrace.c (record_btrace_wait): Adjust.
6778 * target-debug.h
6779 (target_debug_print_struct_target_waitstatus_p): Adjust.
6780
5c811d30
JK
67812017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6782
6783 PR gdb/22046
6784 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6785 detection.
6786
0a2dde4a
SDJ
67872017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6788
6789 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6790 for setting/unsetting environment variables on the remote target.
6791 (New remote packets): Add entries for QEnvironmentHexEncoded,
6792 QEnvironmentUnset and QEnvironmentReset.
6793 * common/environ.c (gdb_environ::operator=): Extend method to
6794 handle m_user_set_env_list and m_user_unset_env_list.
6795 (gdb_environ::clear): Likewise.
6796 (match_var_in_string): Change type of first parameter from 'char
6797 *' to 'const char *'.
6798 (gdb_environ::set): Extend method to handle
6799 m_user_set_env_list and m_user_unset_env_list.
6800 (gdb_environ::unset): Likewise.
6801 (gdb_environ::clear_user_set_env): New method.
6802 (gdb_environ::user_set_envp): Likewise.
6803 (gdb_environ::user_unset_envp): Likewise.
6804 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6805 m_user_unset_env_list on move constructor/assignment.
6806 (unset): Add new default parameter 'update_unset_list = true'.
6807 (clear_user_set_env): New method.
6808 (user_set_envp): Likewise.
6809 (user_unset_envp): Likewise.
6810 (m_user_set_env_list): New std::set.
6811 (m_user_unset_env_list): Likewise.
6812 * common/rsp-low.c (hex2str): New function.
6813 (bin2hex): New overload for bin2hex function.
6814 * common/rsp-low.c (hex2str): New prototype.
6815 (str2hex): New overload prototype.
6816 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6817 QEnvironmentUnset and QEnvironmentReset.
6818 (remote_protocol_features): Add QEnvironmentHexEncoded,
6819 QEnvironmentUnset and QEnvironmentReset packets.
6820 (send_environment_packet): New function.
6821 (extended_remote_environment_support): Likewise.
6822 (extended_remote_create_inferior): Call
6823 extended_remote_environment_support.
6824 (_initialize_remote): Add QEnvironmentHexEncoded,
6825 QEnvironmentUnset and QEnvironmentReset packet configs.
6826 * unittests/environ-selftests.c (gdb_selftest_env_var):
6827 New variable.
6828 (test_vector_initialization): New function.
6829 (test_init_from_host_environ): Likewise.
6830 (test_reinit_from_host_environ): Likewise.
6831 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6832 Likewise.
6833 (test_unset_set_empty_vector): Likewise.
6834 (test_vector_clear): Likewise.
6835 (test_std_move): Likewise.
6836 (test_move_constructor):
6837 (test_self_move): Likewise.
6838 (test_set_unset_reset): Likewise.
6839 (run_tests): Rewrite in terms of the functions above.
6840
654670a4
WP
68412017-08-31 Weimin Pan <weimin.pan@oracle.com>
6842
6843 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6844 (adi_available): Use a temp variable of type CORE_ADDR as argument
6845 3 when calling target_auxv_search.
6846 (adi_normalize_address): Use masks and xor operators to calculate
6847 normalized address.
6848 (adi_read_versions, adi_write_versions, adi_print_versions)
6849 (do_examine, do_assign): Use paddress.
6850
7755ddb7
JB
68512017-08-29 John Baldwin <jhb@FreeBSD.org>
6852
6853 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6854 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6855 out of loop and add supply of FIR.
6856 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6857 add collect of FIR.
6858
fd437cbc
SM
68592017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6860
3804a343 6861 PR gdb/21827
fd437cbc
SM
6862 * cli/cli-script.c (define_command): Don't convert command name
6863 to lower case.
6864
988f6b3d
JB
68652017-08-25 Joel Brobecker <brobecker@adacore.com>
6866
6867 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6868 Update all callers accordingly. Remove all code blocks handling
6869 the case where DISPP is not NULL.
6870
663c44ac
JK
68712017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6872
6873 PR symtab/22003
6874 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6875 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6876 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6877
f1902523
JK
68782017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6879
6880 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6881 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6882 (read_comp_units_from_section): New parameter abbrev_section, use
6883 read_and_check_comp_unit_head, allocate signatured_type if needed.
6884 (create_all_comp_units): Update read_comp_units_from_section caller.
6885
87215ad1
SDJ
68862017-08-23 Pedro Alves <palves@redhat.com>
6887
6888 PR remote/21852
6889 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6890 to null_ptid and switch to thread without reading the registers
6891 after adding the inferior.
6892
6e41ddec
JK
68932017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6894
6895 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6896 compile-gcc.
6897 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6898 (compile_to_object): Implement compile_gcc.
6899 (_initialize_compile): Install "set compile-gcc". Initialize
6900 compile_gcc.
6901
e68c32d5
JK
69022017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6903
6904 * compile/compile.c (compile_to_object): Conditionally call
6905 set_verbose. Conditionally call compile or compile_v0.
6906
58afddc6
WP
69072017-08-07 Weimin Pan <weimin.pan@oracle.com>
6908
6909 * sparc64-tdep.h: (adi_normalize_address): New export.
6910 * sparc-nat.h: (open_adi_tag_fd): New export.
6911 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6912 * sparc64-linux-tdep.c:
6913 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6914 (sparc64_linux_handle_segmentation_fault): New function.
6915 (sparc64_linux_init_abi): Register
6916 sparc64_linux_handle_segmentation_fault
6917 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6918 (sparc64_addr_bits_remove): New function.
6919 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6920 (MAX_PROC_NAME_SIZE): New macro.
6921 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6922 (sparc64adilist): New variable.
6923 (adi_proc_list): New variable.
6924 (find_adi_info): New function.
6925 (add_adi_info): New function.
6926 (get_adi_info_proc): New function.
6927 (get_adi_info): New function.
6928 (info_adi_command): New function.
6929 (read_maps_entry): New function.
6930 (adi_available): New function.
6931 (adi_normalize_address): New function.
6932 (adi_align_address): New function.
6933 (adi_convert_byte_count): New function.
6934 (adi_tag_fd): New function.
6935 (adi_is_addr_mapped): New function.
6936 (adi_read_versions): New function.
6937 (adi_write_versions): New function.
6938 (adi_print_versions): New function.
6939 (do_examine): New function.
6940 (do_assign): New function.
6941 (adi_examine_command): New function.
6942 (adi_assign_command): New function.
6943 (_initialize_sparc64_adi_tdep): New function.
6944
11db9430
SM
69452017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6946
6947 * breakpoint.c (breakpoints_info): Rename to ...
6948 (info_breakpoints_command): ... this.
6949 (watchpoints_info): Rename to ...
6950 (info_watchpoints_command): ... this.
6951 (tracepoints_info): Rename to ...
6952 (info_tracepoints_command): ... this.
6953 (_initialize_breakpoint): Adjust.
6954 * dcache.c (dcache_info): Rename to ...
6955 (info_display_command): ... this.
6956 (_initialize_dcache): Adjust.
6957 * frame.h (args_info): Rename to ...
6958 (info_args_command): ... this.
6959 (locals_info): Rename to ...
6960 (info_locals_command): ... this.
6961 * infcmd.c (nofp_registers_info): Rename to ...
6962 (info_registers_command): ... this.
6963 (float_info): Rename to ...
6964 (info_float_command): ... this.
6965 (program_info): Rename to ...
6966 (info_program_command): ... this.
6967 (all_registers_info): Rename to ...
6968 (info_all_registers_command): ... this.
6969 (vector_info): Rename to ...
6970 (info_vector_command): ... this.
6971 (float_info): Rename to ...
6972 (info_float_command): ... this.
6973 (_initialize_infcmd): Adjust.
6974 * inferior.h (term_info): Rename to ...
6975 (info_terminal_command): ... this.
6976 * inflow.c (term_info): Rename to ...
6977 (info_terminal_command): ... this.
6978 (_initialize_inflow): Adjust.
6979 * infrun.c (signals_info): Rename to ...
6980 (info_signals_command): ... this.
6981 (_initialize_infrun): Adjust.
6982 * objc-lang.c (classes_info): Rename to ...
6983 (info_classes_command): ... this.
6984 (selectors_info): Rename to ...
6985 (info_selectors_command): ... this.
6986 (_initialize_objc_language): Adjust.
6987 * printcmd.c (sym_info): Rename to ...
6988 (info_symbol_command): ... this.
6989 (address_info): Rename to ...
6990 (info_address_command): ... this.
6991 (display_info): Rename to ...
6992 (info_display_command): ... this.
6993 (_initialize_printcmd): Adjust.
6994 * reverse.c (bookmarks_info): Rename to ...
6995 (info_breakpoints_command): ... this.
6996 (_initialize_reverse): Adjust.
6997 * ser-go32.c (dos_info): Rename to ...
6998 (info_serial_command): ... this.
6999 (_initialize_ser_dos): Adjust.
7000 * skip.c (skip_info): Rename to ...
7001 (info_skip_command): ... this.
7002 (_initialize_step_skip): Adjust.
7003 * source.c (line_info): Rename to ...
7004 (info_line_command): ... this.
7005 (source_info): Rename to ...
7006 (info_source_command)
7007 * stack.c (frame_info): Rename to ...
7008 (info_frame_command): ... this.
7009 (locals_info): Rename to ...
7010 (info_locals_command): ... this.
7011 (args_info): Rename to ...
7012 (info_args_command): ... this.
7013 (_initialize_stack): Adjust.
7014 * symtab.c (sources_info): Rename to ...
7015 (info_sources_command): ... this.
7016 (variables_info): Rename to ...
7017 (info_variables_command): ... this.
7018 (functions_info): Rename to ...
7019 (info_functions_command): ... this.
7020 (types_info): Rename to ...
7021 (info_types_command): ... this.
7022 (_initialize_symtab): Adjust.
7023 * target.c (target_info): Rename to ...
7024 (info_target_command): ... this.
7025 (initialize_targets): Adjust.
7026 * tracepoint.c (tvariables_info): Rename to ...
7027 (info_tvariables_command): ... this.
7028 (scope_info): Rename to ...
7029 (info_scope_command): ... this.
7030 (trace_dump_actions): Adjust.
7031 (_initialize_tracepoint): Adjust.
7032
b270e6f9
TT
70332017-08-22 Tom Tromey <tom@tromey.com>
7034
7035 * breakpoint.h (install_breakpoint): Update.
7036 * breakpoint.c (add_solib_catchpoint): Update.
7037 (install_breakpoint): Change argument to a std::unique_ptr.
7038 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7039 (create_breakpoint_sal, create_breakpoint): Update.
7040 (watch_command_1, catch_exec_command_1)
7041 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7042 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7043 Return the breakpoint.
7044 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7045 (new_single_step_breakpoint): Update.
7046 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7047 std::unique_ptr.
7048 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7049 std::unique_ptr.
7050 * break-catch-sig.c (create_signal_catchpoint): Use
7051 std::unique_ptr.
7052 * ada-lang.c (create_ada_exception_catchpoint): Use
7053 std::unique_ptr.
7054
36bd8eaa
TT
70552017-08-22 Tom Tromey <tom@tromey.com>
7056
7057 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7058
56f37645
TT
70592017-08-22 Tom Tromey <tom@tromey.com>
7060
7061 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7062 (lookup_partial_symbol): Update.
7063
0b581c69
TT
70642017-08-22 Tom Tromey <tom@tromey.com>
7065
7066 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7067 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7068 (find_and_open_source, symtab_to_fullname): Update.
7069 * psymtab.c (psymtab_to_fullname): Update.
7070
14278e1f
TT
70712017-08-22 Tom Tromey <tom@tromey.com>
7072
7073 * exec.c (exec_file_attach): Update.
7074 * linux-thread-db.c (try_thread_db_load): Update.
7075 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7076 * utils.c (gdb_realpath): Change return type.
7077 (gdb_realpath_keepfile): Update.
7078 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7079 (_initialize_utils): Register the new self test.
7080 * source.c (openp): Update.
7081 (find_and_open_source): Update.
7082 * nto-tdep.c (nto_find_and_open_solib): Update.
7083 * main.c (set_gdb_data_directory): Update.
7084 (captured_main_1): Update.
7085 * dwarf2read.c (dwarf2_get_dwz_file): Update
7086 (dw2_map_symbol_filenames): Update.
7087 * auto-load.c (auto_load_safe_path_vec_update): Update.
7088 (filename_is_in_auto_load_safe_path_vec): Change type of
7089 "filename_realp".
7090 (auto_load_objfile_script): Update.
7091 (file_is_auto_load_safe): Update. Use std::string.
7092 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7093
4971c9a7
TT
70942017-08-22 Tom Tromey <tom@tromey.com>
7095
7096 * utils.c (gdb_realpath_keepfile): Return a
7097 gdb::unique_xmalloc_ptr.
7098 * exec.c (exec_file_attach): Update.
7099 * utils.h (gdb_realpath_keepfile): Return a
7100 gdb::unique_xmalloc_ptr.
7101
e3e41d58
TT
71022017-08-22 Tom Tromey <tom@tromey.com>
7103
7104 * compile/compile.c (compile_file_command): Use
7105 gdb::unique_xmalloc_ptr, std::string.
7106 * utils.c (gdb_abspath): Change return type.
7107 * source.c (openp): Update.
7108 * objfiles.c (allocate_objfile): Update.
7109 * main.c (set_gdb_data_directory): Update.
7110 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7111
0d999a6e
ZZ
71122017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7113
7114 * cli-cmds.c (list_commands): List actual code around more than
7115 one location.
7116
329d5e7e
JB
71172017-08-21 John Baldwin <jhb@FreeBSD.org>
7118
7119 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7120
bf223d3e
PA
71212017-08-21 Pedro Alves <palves@redhat.com>
7122
7123 PR gdb/19487
7124 * c-exp.y (variable production): Handle function aliases.
7125 * minsyms.c (msymbol_is_text): New function.
7126 * minsyms.h (msymbol_is_text): Declare.
7127 * symtab.c (find_function_alias_target): New function.
7128 * symtab.h (find_function_alias_target): Declare.
7129
c973d0aa
PA
71302017-08-21 Pedro Alves <palves@redhat.com>
7131
7132 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7133 typedefs.
7134 * typeprint.c (whatis_exp): If handling "whatis", and expression
7135 is OP_TYPE, strip one typedef level. Otherwise don't strip
7136 typedefs here.
7137 * valops.c (value_cast): Save "to" type before resolving
7138 stubs/typedefs. Use that type as resulting value's type.
7139
2989a365
TT
71402017-08-18 Tom Tromey <tom@tromey.com>
7141 Pedro Alves <palves@redhat.com>
7142
7143 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7144 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7145 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7146 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7147 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7148 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7149 (linux_get_siginfo_data): Add "thread" argument. Use
7150 scoped_restore.
7151 * linux-nat.c (linux_child_follow_fork)
7152 (check_stopped_by_watchpoint): Use scoped_restore.
7153 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7154 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7155 (restore_inferior_ptid, save_inferior_ptid): Remove.
7156 * btrace.c (btrace_fetch): Use scoped_restore.
7157 * bsd-uthread.c (bsd_uthread_fetch_registers)
7158 (bsd_uthread_store_registers): Use scoped_restore.
7159 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7160 scoped_restore.
7161 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7162 (aix_thread_xfer_partial): Use scoped_restore.
7163 * inferior.h (save_inferior_ptid): Remove.
7164
e60eb288
YQ
71652017-08-18 Yao Qi <yao.qi@linaro.org>
7166
7167 PR tdep/21818
7168 * arm-tdep.c (gdb_print_insn_arm): Mark
7169 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7170
6d580b63
YQ
71712017-08-18 Yao Qi <yao.qi@linaro.org>
7172
7173 * NEWS: Mention GDBserver's new option "--selftest".
7174 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7175 * selftest.c: Move it to common/selftest.c.
7176 * selftest.h: Move it to common/selftest.h.
7177 * selftest-arch.c (reset): New function.
7178 (tests_with_arch): Call reset.
7179
86dcbf50
YQ
71802017-08-18 Yao Qi <yao.qi@linaro.org>
7181
7182 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7183 instead of exception_fprintf and printf_filtered.
7184
7649770c
YQ
71852017-08-18 Yao Qi <yao.qi@linaro.org>
7186
7187 * selftest.c (register_self_test): Rename it to
7188 selftests::register_test.
7189 (run_self_tests): selftest::run_tests.
7190 * selftest.h: Update declarations.
7191 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7192 selftests::register_test_foreach_arch.
7193 * selftest-arch.h: Update declaration.
7194 * aarch64-tdep.c: Update.
7195 * arm-tdep.c: Likewise.
7196 * disasm-selftests.c: Likewise.
7197 * dwarf2loc.c: Likewise.
7198 * dwarf2-frame.c: Likewise.
7199 * findvar.c: Likewise.
7200 * gdbarch-selftests.c: Likewise.
7201 * maint.c (maintenance_selftest): Likewise.
7202 * regcache.c: Likewise.
7203 * rust-exp.y: Likewise.
7204 * selftest-arch.c: Likewise.
7205 * unittests/environ-selftests.c: Likewise.
7206 * unittests/function-view-selftests.c: Likewise.
7207 * unittests/offset-type-selftests.c: Likewise.
7208 * unittests/optional-selftests.c: Likewise.
7209 * unittests/scoped_restore-selftests.c: Likewise.
7210 * utils-selftests.c: Likewise.
7211
b0cba12e
PA
72122017-08-17 Pedro Alves <palves@redhat.com>
7213
7214 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7215 local.
7216
4c8aa72d
PA
72172017-08-17 Pedro Alves <palves@redhat.com>
7218
7219 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7220 field.
7221 (reset_die_in_process): Delete, replaced by ...
7222 (process_die_scope): ... this new class. Make it responsible for
7223 freeing cu->line_header too.
7224 (process_die): Use process_die_scope.
7225 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7226 cu->line_header_die_owner. Don't release the line header if it's
7227 owned by the CU.
7228 (setup_type_unit_groups): Make the CU/DIE own the line header.
7229 Don't release the line header here.
7230
ba713918
AL
72312017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7232
7233 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7234
44d0fb3a
RK
72352017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7236
7237 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7238 Single-Key mode
7239
a5afdb16
RK
72402017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7241
7242 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7243 mode command list.
7244
47613aeb
SH
72452017-08-15 Stafford Horne <shorne@gmail.com>
7246
7247 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7248
9c3cc999
SH
72492017-08-15 Stafford Horne <shorne@gmail.com>
7250
7251 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7252
206726fb
SDJ
72532017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7254
7255 PR gdb/21954
7256 * infcmd.c (unset_environment_command): Use the 'clear' method on
7257 the environment instead of resetting it.
7258
0335ac6d
JB
72592017-08-15 John Baldwin <jhb@FreeBSD.org>
7260
7261 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7262 platforms.
7263
d3abe1c8
TT
72642017-08-14 Tom Tromey <tom@tromey.com>
7265
7266 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7267 (print_binary_chars): Likewise.
7268 (BITS_IN_BYTES): Remove.
7269
d6382fff
TT
72702017-08-14 Tom Tromey <tom@tromey.com>
7271
7272 PR gdb/21675
7273 * valprint.c (LOW_ZERO): Change value to 034.
7274 (print_octal_chars): Add static_asserts for octal constants.
7275 * printcmd.c (print_scalar_formatted): Add 'd' case.
7276
f978cb06
TT
72772017-08-11 Tom Tromey <tom@tromey.com>
7278
7279 * symfile.c (add_symbol_file_command): Use std::vector.
7280
2f5404b3
TT
72812017-08-14 Tom Tromey <tom@tromey.com>
7282
7283 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7284 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7285 std::move.
7286 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7287
de7985c3
PA
72882017-08-11 Pedro Alves <palves@redhat.com>
7289
7290 * infrun.c (process_event_stop_test): Adjust
7291 function_name_is_marked_for_skip call.
7292 * skip.c: Include <list>.
7293 (skiplist_entry): Make it a class with private fields, and
7294 getters/setters.
7295 (skiplist_entry_chain): Delete.
7296 (skiplist_entries): New.
7297 (skiplist_entry_count): Delete.
7298 (highest_skiplist_entry_num): New.
7299 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7300 (add_skiplist_entry): Delete.
7301 (skiplist_entry::skiplist_entry): New.
7302 (skiplist_entry::add_entry): New.
7303 (skip_file_command, skip_function): Adjust.
7304 (compile_skip_regexp): Delete.
7305 (skip_command): Don't compile regexp here. Adjust to use
7306 skiplist_entry::add_entry.
7307 (skip_info): Adjust to use range-for and getters.
7308 (skip_enable_command, skip_disable_command): Adjust to use
7309 range-for and setters.
7310 (skip_delete_command): Adjust to use std::list.
7311 (add_skiplist_entry): Delete.
7312 (skip_file_p): Delete, refactored as ...
7313 (skiplist_entry::do_skip_file_p): ... this new method.
7314 (skip_gfile_p): Delete, refactored as ...
7315 (skiplist_entry::do_gskip_file_p): ... this new method.
7316 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7317 (skiplist_entry::skip_function_p): ... this new method.
7318 (function_name_is_marked_for_skip): Now returns bool, and takes
7319 the function sal by const reference. Adjust to use range-for and
7320 skiplist_entry methods.
7321 (_initialize_step_skip): Remove references to
7322 skiplist_entry_chain, skiplist_entry_count.
7323 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7324 takes the function sal by const reference.
7325
be7d3cd5
YQ
73262017-08-11 Yao Qi <yao.qi@linaro.org>
7327
7328 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7329 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7330 (dwarf2_frame_cache):
7331 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7332 RETURN_MASK_ALL and set *this_case to NULL.
7333 * frame-unwind.h: Update comments.
7334
1c90d9f0
YQ
73352017-08-11 Yao Qi <yao.qi@linaro.org>
7336
7337 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7338 (dwarf2_frame_state_copy_regs): Remove.
7339 (dwarf2_frame_state_free_regs): Remove.
7340 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7341 (dwarf2_restore_rule): Call method .alloc_regs instead of
7342 dwarf2_frame_state_alloc_regs.
7343 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7344 constructor. Call std::move.
7345 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7346 (dwarf2_frame_cache): Likewise.
7347
7348 [GDB_SELF_TEST]: Include selftest.h and
7349 selftest-arch.h.
7350 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7351 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7352 execute_cfa_program_test.
7353
7354 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7355 copy ctor, assignment operator, move assignment.
7356 <alloc_regs>: New method.
7357 <swap>: New method.
7358 (struct dwarf2_frame_state): Delete dtor.
7359 (dwarf2_frame_state_alloc_regs): Remove declaration.
7360 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7361 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7362
afe37d6b
YQ
73632017-08-11 Yao Qi <yao.qi@linaro.org>
7364
7365 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7366 (dwarf2_frame_state::dwarf2_frame_state): New.
7367 (dwarf2_frame_state::~dwarf2_frame_state): New.
7368 (dwarf2_fetch_cfa_info): Update.
7369 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7370 rather than a pointer. Update code.
7371 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7372 dtor.
7373 <data_align, code_align, retaddr_column>: Change them to const.
7374 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7375 to bool.
7376
b348037f
YQ
73772017-08-11 Yao Qi <yao.qi@linaro.org>
7378
7379 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7380 <loc.exp>: New field.
7381 * dwarf2-frame.c (execute_cfa_program): Update.
7382 (dwarf2_frame_prev_register): Update.
7383
e7c9de26
PA
73842017-08-10 Pedro Alves <palves@redhat.com>
7385
7386 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7387
e8c6b620
JB
73882017-08-09 John Baldwin <jhb@FreeBSD.org>
7389
7390 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7391 (fbsd_pending_children): Use std::list.
7392 (fbsd_remember_child): Likewise.
7393 (fbsd_is_child_pending): Likewise.
7394 (fbsd_pending_vfork_done): Use std::forward_list.
7395 (fbsd_add_vfork_done): Likewise.
7396 (fbsd_is_vfork_done_pending): Likewise.
7397 (fbsd_next_vfork_done): Likewise.
7398
e4a26669
JB
73992017-08-09 John Baldwin <jhb@FreeBSD.org>
7400
7401 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7402 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7403 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7404 for `mapfilename'.
7405 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 7406 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 7407
142311d3
JB
74082017-08-09 John Baldwin <jhb@FreeBSD.org>
7409
7410 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7411 "filestuff.h".
7412 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7413
42fa2e0e
TT
74142017-08-09 Tom Tromey <tom@tromey.com>
7415
7416 * skip.c (skiplist_entry): New constructor.
7417 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7418 (skiplist_entry::file_is_glob): Now bool.
7419 (skiplist_entry::file, skiplist_entry::function): Now
7420 std::string.
7421 (make_skip_entry): Return a unique_ptr. Use new.
7422 (free_skiplist_entry, free_skiplist_entry_cleanup)
7423 (make_free_skiplist_entry_cleanup): Remove.
7424 (skip_command, skip_disable_command, add_skiplist_entry)
7425 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7426 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7427 (function_name_is_marked_for_skip): Update.
7428 (skip_delete_command): Update. Use delete.
7429
cd3af38d
JW
74302017-08-09 Jiong Wang <jiong.wang@arm.com>
7431
7432 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7433 (aarch64_linux_core_read_description): New function.
7434 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7435
29592bde
PA
74362017-08-09 Pedro Alves <palves@redhat.com>
7437
7438 * cp-name-parser.y (cp_comp_to_string): Return a
7439 gdb::unique_xmalloc_ptr<char>.
7440 * cp-support.c (replace_typedefs_qualified_name)
7441 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7442 (cp_canonicalize_string_full): Use op= instead of explicit
7443 convertion.
7444 (cp_class_name_from_physname, method_name_from_physname)
7445 (cp_func_name, cp_remove_params): Adjust to use
7446 gdb::unique_xmalloc_ptr<char>.
7447 * cp-support.h (cp_comp_to_string): Return a
7448 gdb::unique_xmalloc_ptr<char>.
7449 * python/py-type.c (typy_lookup_type): Adjust to use
7450 gdb::unique_xmalloc_ptr<char>.
7451
b3340438
L
74522017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7453
7454 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7455
e88e8651
YQ
74562017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7457 Yao Qi <yao.qi@linaro.org>
7458
7459 * cp-support.c (cp_canonicalize_string_full): Use
7460 gdb::unique_xmalloc_ptr<char>.
7461 (cp_canonicalize_string): Likewise.
7462
f5a29eb0
YQ
74632017-08-09 Yao Qi <yao.qi@linaro.org>
7464
7465 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7466 * regformats/i386/amd64-avx-avx512.dat: Remove.
7467 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7468 * regformats/i386/amd64-avx-mpx.dat:Remove.
7469 * regformats/i386/amd64-avx.dat: Remove.
7470 * regformats/i386/amd64-mpx.dat: Remove.
7471 * regformats/i386/i386-avx-avx512.dat: Remove.
7472 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7473 * regformats/i386/i386-avx-mpx.dat: Remove.
7474 * regformats/i386/i386-mmx.dat: Remove.
7475 * regformats/i386/i386-mpx.dat: Remove.
7476
57757c2f
YQ
74772017-08-09 Yao Qi <yao.qi@linaro.org>
7478
7479 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7480 * amd64-tdep.c: Don't include features/i386/x32*.c.
7481 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7482 functions.
7483 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7484 and i386/x32-avx-avx512.
7485 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7486 and i386/x32.xml.
7487 * features/i386/x32-avx-avx512.c: Removed.
7488 * features/i386/x32-avx-avx512.xml: Removed.
7489 * features/i386/x32-avx.c: Removed.
7490 * features/i386/x32-avx.xml: Removed.
7491 * features/i386/x32.c: Removed.
7492 * features/i386/x32.xml: Removed.
7493 * regformats/i386/x32-avx-avx512.dat: Removed.
7494 * regformats/i386/x32-avx.dat: Removed.
7495 * regformats/i386/x32.dat: Removed.
7496
ba7b109b
MR
74972017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7498
7499 PR breakpoints/21886
7500 * mem-break.c (default_memory_insert_breakpoint): Use
7501 `->placed_address' rather than `->reqstd_address' for the
7502 breakpoint location.
7503
e347efc3
MR
75042017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7505
7506 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7507 assertions.
7508
0dba2a6c
MR
75092017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7510
7511 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7512 a union of `tdep_info', `tdesc_data' and `id'.
7513 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7514 rather than `info.tdep_info'.
7515 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7516 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7517 * i386-tdep.c (i386_gdbarch_init): Likewise.
7518 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7519 * mips-tdep.c (mips_gdbarch_init): Likewise.
7520 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7521 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7522 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7523 `info.tdep_info'.
7524 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7525 `info.tdep_info'.
7526 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7527 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7528 `info.tdep_info'.
7529 * spu-tdep.c (spu_gdbarch_init): Likewise.
7530 * gdbarch.h: Regenerate.
7531
16eb6b2d
LS
75322017-08-07 Leszek Swirski <leszeks@google.com>
7533
7b005726 7534 PR symtab/20899
16eb6b2d
LS
7535 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7536
74cbb09e
SM
75372017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7538
7539 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7540 (gdbsim_open): Rename gdb_argv args object to argv.
7541
ee0c3293
TT
75422017-08-05 Tom Tromey <tom@tromey.com>
7543
7544 * compile/compile-object-load.c (compile_object_load): Use
7545 gdb::unique_xmalloc_ptr.
7546 * cli/cli-dump.c (scan_filename): Rename from
7547 scan_filename_with_cleanup. Change return type.
7548 (scan_expression): Rename from scan_expression_with_cleanup.
7549 Change return type.
7550 (dump_memory_to_file, dump_value_to_file, restore_command):
7551 Use gdb::unique_xmalloc_ptr. Update.
7552 * cli/cli-cmds.c (find_and_open_script): Use
7553 gdb::unique_xmalloc_ptr.
7554 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7555 * symmisc.c (maintenance_print_symbols)
7556 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7557 * symfile.c (symfile_bfd_open, generic_load)
7558 (add_symbol_file_command, remove_symbol_file_command): Use
7559 gdb::unique_xmalloc_ptr.
7560 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7561 * psymtab.c (maintenance_print_psymbols): Use
7562 gdb::unique_xmalloc_ptr.
7563 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7564 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7565 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7566 (reload_shared_libraries_1): Likewise.
7567
3232fabd
TT
75682017-08-05 Tom Tromey <tom@tromey.com>
7569
7570 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7571 (rust_op_vector, rust_set_vector): New typedefs.
7572 (current_parser): New global.
7573 (work_obstack): Change to pointer type. Update all users.
7574 (rust_ast, pstate): Remove globals.
7575 (struct rust_parser): New.
7576 (%union) <params, field_inits>: Change type.
7577 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7578 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7579 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7580 (convert_params_to_types, convert_params_to_expression): Change
7581 type of "params".
7582 (ast_string): Change type of "fields".
7583 (rust_parse): Make a rust_parser. Remove cleanups.
7584 (rust_lex_tests): Make and install an auto_obstack.
7585
f02fd774
YQ
75862017-08-04 Yao Qi <yao.qi@linaro.org>
7587
7588 * configure.srv (ipa_x32_linux_regobj): New.
7589 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7590 instead of X86_TDESC_AVX512.
7591 (initialize_low_tracepoint): Call
7592 init_registers_x32_avx_avx512_linux.
7593
91975afd
YQ
75942017-08-04 Yao Qi <yao.qi@linaro.org>
7595
7596 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7597
2331fa3a
RK
75982017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7599
7600 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7601
744e4fe1
TT
76022017-08-03 Tom Tromey <tom@tromey.com>
7603
7604 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7605 Remove.
7606 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7607
1c034b67
TT
76082017-08-03 Tom Tromey <tom@tromey.com>
7609
7610 * python/py-param.c (compute_enum_values): Use gdb_argv.
7611
773a1edc
TT
76122017-08-03 Tom Tromey <tom@tromey.com>
7613
7614 * utils.h (struct gdb_argv_deleter): New.
7615 (gdb_argv): New class.
7616 * utils.c (gdb_argv::reset): New method.
7617 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7618 * tracefile.c (tsave_command): Use gdb_argv.
7619 * top.c (new_ui_command): Use gdb_argv.
7620 * symmisc.c (maintenance_print_symbols)
7621 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7622 * symfile.c (symbol_file_command, generic_load)
7623 (remove_symbol_file_command): Use gdb_argv.
7624 * stack.c (backtrace_command): Use gdb_argv.
7625 * source.c (add_path, show_substitute_path_command)
7626 (unset_substitute_path_command, set_substitute_path_command):
7627 Use gdb_argv.
7628 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7629 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7630 * remote.c (extended_remote_run, remote_put_command)
7631 (remote_get_command, remote_delete_command): Use gdb_argv.
7632 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7633 (gdbsim_open): Use gdb_argv.
7634 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7635 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7636 * procfs.c (procfs_info_proc): Use gdb_argv.
7637 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7638 * infrun.c (handle_command): Use gdb_argv.
7639 * inferior.c (add_inferior_command, clone_inferior_command):
7640 Use gdb_argv.
7641 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7642 * exec.c (exec_file_command): Use gdb_argv.
7643 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7644 * compile/compile.c (build_argc_argv): Use gdb_argv.
7645
0d50bde3
TT
76462017-08-03 Tom Tromey <tom@tromey.com>
7647
7648 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7649
7f968c89
TT
76502017-08-03 Tom Tromey <tom@tromey.com>
7651
7652 * python/python.c (compute_python_string): Return std::string.
7653 (gdbpy_eval_from_control_command): Update.
7654 (do_start_initialization): Use std::string.
7655 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7656 xstrprintf.
7657 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7658 xstrprintf.
7659
3c9ebddd
TT
76602017-08-03 Tom Tromey <tom@tromey.com>
7661
7662 * top.h (do_restore_instream_cleanup): Remove.
7663 * top.c (do_restore_instream_cleanup): Remove.
7664 (read_command_file): Use scoped_restore.
7665 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7666
b51b225e
TT
76672017-08-03 Tom Tromey <tom@tromey.com>
7668
7669 * cli/cli-script.c (execute_user_command)
7670 (execute_control_command): Use scoped_restore.
7671
ac991630
TT
76722017-08-03 Tom Tromey <tom@tromey.com>
7673
7674 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7675 (execute_user_command): Remove user_call_depth; use
7676 user_args_stack's size instead.
7677
898e0c8e
TT
76782017-08-03 Tom Tromey <tom@tromey.com>
7679
7680 * top.h (in_user_command): Remove.
7681 * top.c (in_user_command): Remove.
7682 * cli/cli-script.c (do_restore_user_call_depth)
7683 (execute_user_command): Update.
7684
26fcd5d7
TT
76852017-08-03 Tom Tromey <tom@tromey.com>
7686
7687 * valops.c (search_struct_method): Use gdb::byte_vector.
7688 * valarith.c (value_concat): Use std::vector.
7689 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7690 (simple_search_memory): Likewise.
7691 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7692 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7693 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7694 * elfread.c (elf_rel_plt_read): Use std::string.
7695 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7696 * cli/cli-dump.c (restore_section_callback): Use
7697 gdb::byte_vector.
7698
7c218e6c
TT
76992017-08-03 Tom Tromey <tom@tromey.com>
7700
7701 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7702
31b68d4a
TT
77032017-08-03 Tom Tromey <tom@tromey.com>
7704
7705 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7706 (tui_register_format): Use scoped_restore.
7707
2ec845e7
TT
77082017-08-03 Tom Tromey <tom@tromey.com>
7709
7710 * reverse.c (exec_direction_default): Remove.
7711 (exec_reverse_once): Use scoped_restore.
7712 * remote.c (restore_remote_timeout): Remove.
7713 (remote_flash_erase, remote_flash_write, remote_flash_done)
7714 (readchar, remote_serial_write): Use scoped_restore.
7715 * cli/cli-script.c (struct source_cleanup_lines_args)
7716 (source_cleanup_lines): Remove.
7717 (script_from_file): Use scoped_restore.
7718 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7719 (source_command): Use scoped_restore.
7720
b3bc8453
TT
77212017-08-03 Tom Tromey <tom@tromey.com>
7722
7723 * utils.h (make_cleanup_free_so): Remove.
7724 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7725 * solist.h (struct so_deleter): New.
7726 (so_list_up): New typedef.
7727 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7728
e3ad2841
TT
77292017-08-03 Tom Tromey <tom@tromey.com>
7730
7731 * utils.h (make_cleanup_restore_current_language): Remove.
7732 * utils.c (do_restore_current_language)
7733 (make_cleanup_restore_current_language): Remove.
7734 * parse.c (parse_exp_in_context_1)
7735 (parse_expression_with_language): Use
7736 scoped_restore_current_language.
7737 * mi/mi-main.c (mi_cmd_execute): Use
7738 scoped_restore_current_language.
7739 * language.h (scoped_restore_current_language): New class.
7740
b80cf838
TT
77412017-08-03 Tom Tromey <tom@tromey.com>
7742
7743 * compile/compile.c (cleanup_unlink_file): Remove.
7744 (compile_to_object): Use gdb::unlinker.
7745 (eval_compile_command): Likewise.
7746
fad0444a
TT
77472017-08-03 Tom Tromey <tom@tromey.com>
7748
7749 * utils.h (make_cleanup_fclose): Remove.
7750 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7751
6e7bc05c
TT
77522017-08-03 Tom Tromey <tom@tromey.com>
7753
7754 * top.c (open_terminal_stream): Return gdb_file_up.
7755 (new_ui_command): Update.
7756
4a45905b
TT
77572017-08-03 Tom Tromey <tom@tromey.com>
7758
7759 * source.c (print_source_lines_base, forward_search_command)
7760 (reverse_search_command): Use gdb_file_up.
7761
7cd06d6e
TT
77622017-08-03 Tom Tromey <tom@tromey.com>
7763
7764 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7765
ed166945
TT
77662017-08-03 Tom Tromey <tom@tromey.com>
7767
7768 * cli/cli-cmds.c (find_and_open_script): Change return type.
7769 Remove "streamp" and "full_path" parameters.
7770 (source_script_with_search): Update.
7771 * auto-load.c (source_script_file): Update.
7772 * cli/cli-cmds.h (find_and_open_script): Change type.
7773 (open_script): New struct.
7774
d419f42d
TT
77752017-08-03 Tom Tromey <tom@tromey.com>
7776
7777 * xml-support.c (xml_fetch_content_from_file): Update.
7778 * ui-file.c (stdio_file::open): Update.
7779 * tracefile-tfile.c (tfile_start): Update.
7780 * remote.c (remote_file_put, remote_file_get): Update.
7781 * nat/linux-procfs.c (linux_proc_get_int)
7782 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7783 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7784 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7785 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7786 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7787 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7788 * linux-nat.c (linux_proc_pending_signals): Update.
7789 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7790 (file_closer): Remove.
7791 * compile/compile.c (compile_to_object): Update.
7792 * common/filestuff.h (struct gdb_file_deleter): New.
7793 (gdb_file_up): New typedef.
7794 (gdb_fopen_cloexec): Change return type.
7795 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7796 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7797 (dump_binary_file, restore_binary_file): Update.
7798 * auto-load.c (auto_load_objfile_script_1): Update.
7799
4a2b031d
TT
78002017-08-03 Tom Tromey <tom@tromey.com>
7801
7802 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7803 (info_static_tracepoint_markers_command): Likewise.
7804 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7805 * skip.c (skip_info): Use ui_out_emit_table.
7806 * progspace.c (print_program_space): Use ui_out_emit_table.
7807 * osdata.c (info_osdata): Use ui_out_emit_table.
7808 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7809 ui_out_emit_table.
7810 * linux-thread-db.c (info_auto_load_libthread_db): Use
7811 ui_out_emit_table.
7812 * inferior.c (print_inferior): Use ui_out_emit_table.
7813 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7814 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7815 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7816 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7817 * ui-out.h (class ui_out_emit_table): New.
7818
a4f320fd
MR
78192017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7820
7821 * mips-tdep.c (mips_fpu_type_str): New function.
7822 (mips_dump_tdep): Call it.
7823
a2f1f308
MR
78242017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7825
7826 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7827 `->mips_fpu_type'.
7828
7e5ed83b
XR
78292017-07-31 Xavier Roirand <roirand@adacore.com>
7830
7831 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7832
4c9dc811
XR
78332017-07-27 Xavier Roirand <roirand@adacore.com>
7834
7835 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7836
27d41eac
YQ
78372017-07-26 Yao Qi <yao.qi@linaro.org>
7838
7839 * cli/cli-cmds.c (maintenancechecklist): New variable.
7840 * gdbcmd.h (maintenancechecklist): Declare it.
7841 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7842 Call i386_linux_read_description with different masks.
7843 * maint.c (maintenance_check_command): New function.
7844 (_initialize_maint_cmds): Call add_prefix_cmd.
7845 * target-descriptions.c (tdesc_reg): override operator != and ==.
7846 (tdesc_type): Likewise.
7847 (tdesc_feature): Likewise.
7848 (target_desc): Likewise.
7849 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7850 (maintenance_check_xml_descriptions): New function.
7851 (_initialize_target_descriptions) Add command "xml-descriptions".
7852 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7853
ea03d0d3
YQ
78542017-07-26 Yao Qi <yao.qi@linaro.org>
7855
7856 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7857 Include features/i386/32bit-*.c.
7858 (i386_linux_read_description): Generate target description if it
7859 doesn't exist.
7860 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7861 functions.
7862 * features/i386/32bit-linux.c: Re-generated.
7863 * features/i386/32bit-sse.c: Likewise.
7864 * target-descriptions.c (print_c_feature::visit): Print code to
7865 set register number if needed.
7866 (print_c_feature) <m_next_regnum>: New field.
7867
25aa13e5
YQ
78682017-07-26 Yao Qi <yao.qi@linaro.org>
7869
7870 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7871 (FEATURE_XMLFILES): New.
7872 (FEATURE_CFILES): New.
7873 New rules.
7874 (clean-cfiles): Remove generated c files.
7875 * features/i386/32bit-avx.c: Generated.
7876 * features/i386/32bit-avx512.c: Generated.
7877 * features/i386/32bit-core.c: Generated.
7878 * features/i386/32bit-linux.c: Generated.
7879 * features/i386/32bit-mpx.c: Generated.
7880 * features/i386/32bit-pkeys.c: Generated.
7881 * features/i386/32bit-sse.c: Generated.
7882 * target-descriptions.c: Include algorithm.
7883 (tdesc_element_visitor): Add method visit_end.
7884 (print_c_tdesc): Implement visit_end.
7885 (print_c_tdesc:: m_filename_after_features): Move it to
7886 protected.
7887 (print_c_feature): New class.
7888 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7889 name starts with "i386/32bit-".
7890
6eb1e6a8
YQ
78912017-07-26 Yao Qi <yao.qi@linaro.org>
7892
7893 * target-descriptions.c (tdesc_element_visitor): New class.
7894 (tdesc_element): New class.
7895 (tdesc_reg): Inherit from tdesc_element.
7896 (tdesc_reg::accept): New function.
7897 (tdesc_type): Inherit from tdesc_element.
7898 (tdesc_type::accept): New function.
7899 (tdesc_feature): Inherit from tdesc_element.
7900 (tdesc_feature::accept): New function.
7901 (target_desc): Inherit from tdesc_element.
7902 (target_desc::target_desc): New.
7903 (target_desc::~target_desc): New.
7904 (target_desc::accept): New.
7905 (allocate_target_description): Use new.
7906 (free_target_description): Use delete.
7907 (print_c_tdesc): New class.
7908 (maint_print_c_tdesc_cmd): Adjust.
7909
7910 * features/aarch64.c: Re-generated.
7911 * features/arc-arcompact.c: Re-generated.
7912 * features/arc-v2.c: Re-generated.
7913 * features/arm/arm-with-iwmmxt.c: Re-generated.
7914 * features/arm/arm-with-m.c: Re-generated.
7915 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7916 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7917 * features/arm/arm-with-neon.c: Re-generated.
7918 * features/arm/arm-with-vfpv2.c: Re-generated.
7919 * features/arm/arm-with-vfpv3.c: Re-generated.
7920 * features/i386/amd64-avx-avx512.c: Re-generated.
7921 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7922 * features/i386/amd64-avx.c: Re-generated.
7923 * features/i386/amd64-avx-linux.c: Re-generated.
7924 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7925 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7926 * features/i386/amd64-avx-mpx.c: Re-generated.
7927 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7928 * features/i386/amd64.c: Re-generated.
7929 * features/i386/amd64-linux.c: Re-generated.
7930 * features/i386/amd64-mpx.c: Re-generated.
7931 * features/i386/amd64-mpx-linux.c: Re-generated.
7932 * features/i386/i386-avx-avx512.c: Re-generated.
7933 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7934 * features/i386/i386-avx.c: Re-generated.
7935 * features/i386/i386-avx-linux.c: Re-generated.
7936 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7937 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7938 * features/i386/i386-avx-mpx.c: Re-generated.
7939 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7940 * features/i386/i386.c: Re-generated.
7941 * features/i386/i386-linux.c: Re-generated.
7942 * features/i386/i386-mmx.c: Re-generated.
7943 * features/i386/i386-mmx-linux.c: Re-generated.
7944 * features/i386/i386-mpx.c: Re-generated.
7945 * features/i386/i386-mpx-linux.c: Re-generated.
7946 * features/i386/x32-avx-avx512.c: Re-generated.
7947 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7948 * features/i386/x32-avx.c: Re-generated.
7949 * features/i386/x32-avx-linux.c: Re-generated.
7950 * features/i386/x32.c: Re-generated.
7951 * features/i386/x32-linux.c: Re-generated.
7952 * features/microblaze.c: Re-generated.
7953 * features/microblaze-with-stack-protect.c: Re-generated.
7954 * features/mips64-dsp-linux.c: Re-generated.
7955 * features/mips64-linux.c: Re-generated.
7956 * features/mips-dsp-linux.c: Re-generated.
7957 * features/mips-linux.c: Re-generated.
7958 * features/nds32.c: Re-generated.
7959 * features/nios2.c: Re-generated.
7960 * features/nios2-linux.c: Re-generated.
7961 * features/rs6000/powerpc-32.c: Re-generated.
7962 * features/rs6000/powerpc-32l.c: Re-generated.
7963 * features/rs6000/powerpc-403.c: Re-generated.
7964 * features/rs6000/powerpc-403gc.c : Re-generated.
7965 * features/rs6000/powerpc-405.c: Re-generated.
7966 * features/rs6000/powerpc-505.c: Re-generated.
7967 * features/rs6000/powerpc-601.c: Re-generated.
7968 * features/rs6000/powerpc-602.c: Re-generated.
7969 * features/rs6000/powerpc-603.c: Re-generated.
7970 * features/rs6000/powerpc-604.c: Re-generated.
7971 * features/rs6000/powerpc-64.c: Re-generated.
7972 * features/rs6000/powerpc-64l.c: Re-generated.
7973 * features/rs6000/powerpc-7400.c: Re-generated.
7974 * features/rs6000/powerpc-750.c: Re-generated.
7975 * features/rs6000/powerpc-860.c: Re-generated.
7976 * features/rs6000/powerpc-altivec32.c: Re-generated.
7977 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7978 * features/rs6000/powerpc-altivec64.c: Re-generated.
7979 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7980 * features/rs6000/powerpc-cell32l.c: Re-generated.
7981 * features/rs6000/powerpc-cell64l.c: Re-generated.
7982 * features/rs6000/powerpc-e500.c: Re-generated.
7983 * features/rs6000/powerpc-e500l.c: Re-generated.
7984 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7985 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7986 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7987 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7988 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7989 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7990 * features/rs6000/powerpc-vsx32.c: Re-generated.
7991 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7992 * features/rs6000/powerpc-vsx64.c: Re-generated.
7993 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7994 * features/rs6000/rs6000.c: Re-generated.
7995 * features/s390-linux32.c: Re-generated.
7996 * features/s390-linux32v1.c: Re-generated.
7997 * features/s390-linux32v2.c: Re-generated.
7998 * features/s390-linux64.c: Re-generated.
7999 * features/s390-linux64v1.c: Re-generated.
8000 * features/s390-linux64v2.c: Re-generated.
8001 * features/s390-te-linux64.c: Re-generated.
8002 * features/s390-tevx-linux64.c: Re-generated.
8003 * features/s390-vx-linux64.c: Re-generated.
8004 * features/s390x-linux64.c: Re-generated.
8005 * features/s390x-linux64v1.c: Re-generated.
8006 * features/s390x-linux64v2.c: Re-generated.
8007 * features/s390x-te-linux64.c: Re-generated.
8008 * features/s390x-tevx-linux64.c: Re-generated.
8009 * features/s390x-vx-linux64.c: Re-generated.
8010 * features/sparc/sparc32-solaris.c: Re-generated.
8011 * features/sparc/sparc64-solaris.c: Re-generated.
8012 * features/tic6x-c62x.c: Re-generated.
8013 * features/tic6x-c62x-linux.c: Re-generated.
8014 * features/tic6x-c64x.c: Re-generated.
8015 * features/tic6x-c64x-linux.c: Re-generated.
8016 * features/tic6x-c64xp.c: Re-generated.
8017 * features/tic6x-c64xp-linux.c: Re-generated.
8018
35b4818d
YQ
80192017-07-26 Yao Qi <yao.qi@linaro.org>
8020
8021 * i386-linux-tdep.c (i386_linux_read_description): New function.
8022 (i386_linux_core_read_description): Call
8023 i386_linux_read_description.
8024 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8025 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8026 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8027 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8028 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8029 * x86-linux-nat.c (x86_linux_read_description): Call
8030 i386_linux_read_description.
8031
8e2141c6
YQ
80322017-07-26 Yao Qi <yao.qi@linaro.org>
8033
8034 * NEWS: Mention it.
8035 * features/Makefile (%.c: %.xml): Pass the xml file name to
8036 command "maint print c-tdesc".
8037 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8038 name from 'arg'.
8039
b468ff4c
YQ
80402017-07-26 Yao Qi <yao.qi@linaro.org>
8041
8042 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8043 in-class initialization.
8044 (tdesc_create_feature): Call new instead of XCNEW.
8045 (free_target_description): Ue delete.
8046
b9c0e1b4
JB
80472017-07-25 John Baldwin <jhb@FreeBSD.org>
8048
8049 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8050
a04b5337
YQ
80512017-07-25 Yao Qi <yao.qi@linaro.org>
8052
8053 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8054 constant.
8055 (amd64_x32_init_abi): Likewise.
8056 * amd64-tdep.h (amd64_init_abi): Update declaration.
8057 (amd64_x32_init_abi): Likewise.
8058
02ad7fc2
YQ
80592017-07-25 Yao Qi <yao.qi@linaro.org>
8060
8061 PR tdep/21717
8062 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8063 condition for FPSCR.
8064 (arm_linux_store_inferior_registers): Likewise.
8065
b6f48cb0
TT
80662017-07-22 Tom Tromey <tom@tromey.com>
8067
8068 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8069 <syscalls_counts>: Now a std::vector.
8070 (get_catch_syscall_inferior_data): Use "new".
8071 (catch_syscall_inferior_data_cleanup): Use "delete".
8072 (insert_catch_syscall, remove_catch_syscall)
8073 (clear_syscall_counts): Update.
8074
e12c9b7a
TT
80752017-07-22 Tom Tromey <tom@tromey.com>
8076
8077 * break-catch-syscall.c (syscall_catchpoint)
8078 <syscalls_to_be_caught>: Now a std::vector<int>
8079 (~syscall_catchpoint): Remove.
8080 (insert_catch_syscall, remove_catch_syscall)
8081 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8082 (print_mention_catch_syscall, print_recreate_catch_syscall):
8083 Update.
8084 (create_syscall_event_catchpoint): Change type of "filter"
8085 parameter.
8086 (catch_syscall_split_args): Return a std::vector.
8087 (catch_syscall_command_1, catching_syscall_number_1): Update.
8088
4fa8aeac
TT
80892017-07-22 Tom Tromey <tom@tromey.com>
8090
8091 * break-catch-throw.c (struct exception_catchpoint)
8092 <exception_rx>: Now a std::string.
8093 (~exception_catchpoint): Remove.
8094 (print_one_detail_exception_catchpoint): Update.
8095 (handle_gnu_v3_exceptions): Change type of except_rx.
8096 (extract_exception_regexp): Return a std::string.
8097 (catch_exception_command_1): Update.
8098
f746a154
TT
80992017-07-22 Tom Tromey <tom@tromey.com>
8100
8101 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8102 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8103 std::vector.
8104 <catch_all>: Now a bool.
8105 (~signal_catchpoint): Remove.
8106 (signal_catchpoint_insert_location)
8107 (signal_catchpoint_remove_location)
8108 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8109 (signal_catchpoint_print_mention)
8110 (signal_catchpoint_print_recreate)
8111 (signal_catchpoint_explains_signal): Update.
8112 (create_signal_catchpoint): Change type of "filter" and
8113 "catch_all".
8114 (catch_signal_split_args): Return a std::vector. Change type of
8115 "catch_all".
8116 (catch_signal_command): Update.
8117
47e77640
PA
81182017-07-20 Pedro Alves <palves@redhat.com>
8119
8120 * ada-lang.c (ada_language_defn): Make extern.
8121 (_initialize_ada_language): Remove add_language call.
8122 * c-lang.c (c_language_defn, cplus_language_defn)
8123 (asm_language_defn, minimal_language_defn): Make extern.
8124 (_initialize_c_language): Delete.
8125 * completer.c (compare_cstrings): Delete, moved to utils.h.
8126 * d-lang.c (d_language_defn): Make extern.
8127 (_initialize_d_language): Remove add_language calls.
8128 * defs.h (enum language): Add comment.
8129 * f-lang.c (f_language_defn): Make extern.
8130 (_initialize_f_language): Remove add_language call.
8131 * go-lang.c (go_language_defn): Make extern.
8132 (_initialize_go_language): Remove add_language call.
8133 * language.c: Include <algorithm>.
8134 (languages): Redefine as const array.
8135 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8136 (set_language_command): Handle "local". Use for-range loop.
8137 (set_language): Remove loop.
8138 (language_enum): Rewrite.
8139 (language_def, language_str): Remove loops.
8140 (add_language): Delete.
8141 (add_set_language_command): New, based on add_languages.
8142 (skip_language_trampoline): Adjust.
8143 (local_language_defn): Delete.
8144 (language_gdbarch_post_init): Adjust.
8145 (_initialize_language): Remove add_language calls. Call
8146 add_set_language_command.
8147 * language.h (add_language): Delete.
8148 (auto_language_defn)
8149 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8150 (asm_language_defn, c_language_defn, cplus_language_defn)
8151 (d_language_defn, f_language_defn, go_language_defn)
8152 (m2_language_defn, objc_language_defn, opencl_language_defn)
8153 (pascal_language_defn, rust_language_defn): Declare.
8154 * m2-lang.c (m2_language_defn): Make extern.
8155 (_initialize_m2_language): Remove add_language call.
8156 * objc-lang.c (objc_language_defn): Make extern.
8157 (_initialize_objc_language): Remove add_language call.
8158 * opencl-lang.c (opencl_language_defn): Make extern.
8159 (_initialize_opencl_language): Remove add_language call.
8160 * p-lang.c (pascal_language_defn): Make extern.
8161 (_initialize_pascal_language): Delete.
8162 * rust-lang.c (rust_language_defn): Make extern.
8163 (_initialize_rust_language): Delete.
8164 * utils.h (compare_cstrings): New static inline function.
8165
edb0c9cb
PA
81662017-07-20 Pedro Alves <palves@redhat.com>
8167
8168 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8169 (get_var_value): Constify parameters.
8170 (get_int_var_value): Change prototype.
8171 (to_fixed_range_type): Adjust.
8172 * ada-lang.h (get_int_var_value): Change prototype.
8173
a778f165
PA
81742017-07-20 Pedro Alves <palves@redhat.com>
8175
8176 * dwarf2read.c (dw2_lookup_symbol): Use
8177 SYMBOL_MATCHES_SEARCH_NAME.
8178 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8179
42edd901
PA
81802017-07-20 Pedro Alves <palves@redhat.com>
8181
8182 * block.c (block_iter_name_step, block_iter_name_first)
8183 (block_iter_name_next): Delete.
8184 (block_lookup_symbol_primary): Adjust to use
8185 dict_iter_match_first/dict_iter_match_next.
8186 * block.h (block_iter_name_first, block_iter_name_next): Delete
8187 declarations.
8188 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8189 dict_iter_match_first/dict_iter_match_next.
8190
cf325299
PA
81912017-07-20 Pedro Alves <palves@redhat.com>
8192
8193 * cp-support.c (cp_find_first_component_aux): Add missing case for
8194 end of string.
8195
c5ed0576
DB
81962017-07-18 David Blaikie <dblaikie@gmail.com>
8197
8198 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8199 of dwo_cu's dwo_file.
8200
27841e76
YQ
82012017-07-18 Yao Qi <yao.qi@linaro.org>
8202
8203 * remote.c (store_registers_using_G): Remove one line comment.
8204
cfb7e58b
YQ
82052017-07-18 Yao Qi <yao.qi@linaro.org>
8206
8207 * regcache.c (regcache_cpy): Simplify it.
8208 (regcache::cpy_no_passthrough): Remove it.
8209 * regcache.h (cpy_no_passthrough): Remove it.
8210 (regcache_dup, regcache_cpy): Update comments.
8211
386535dd
PA
82122017-07-18 Pedro Alves <palves@redhat.com>
8213
8214 * remote-sim.c (sim_command_completer): Adjust to work with a
8215 completion_tracker instead of a VEC.
8216
c45ec17c
PA
82172017-07-17 Pedro Alves <palves@redhat.com>
8218
8219 * completer.c (complete_source_filenames): New function.
8220 (complete_address_and_linespec_locations): New function.
8221 (location_completer): Use complete_address_and_linespec_locations.
8222 (completion_tracker::build_completion_result): Honor the tracker's
8223 request to suppress append.
8224 * completer.h (completion_tracker::suppress_append_ws)
8225 (completion_tracker::set_suppress_append_ws): New methods.
8226 (completion_tracker::m_suppress_append_ws): New field.
8227 (complete_source_filenames): New declaration.
8228 * linespec.c (linespec_complete_what): New.
8229 (struct ls_parser) <complete_what, completion_word,
8230 completion_quote_char, completion_quote_end, completion_tracker>:
8231 New fields.
8232 (string_find_incomplete_keyword_at_end): New.
8233 (linespec_lexer_lex_string): Record quote char. If in completion
8234 mode, don't throw.
8235 (linespec_lexer_consume_token): Advance the completion word point.
8236 (linespec_lexer_peek_token): Save/restore completion info.
8237 (save_stream_and_consume_token): New.
8238 (set_completion_after_number): New.
8239 (linespec_parse_basic): Set what to complete next depending on
8240 token. Handle function and label completions specially.
8241 (parse_linespec): Disable objc shortcut in completion mode. Set
8242 what to complete next depending on token type. Skip keyword if in
8243 completion mode.
8244 (complete_linespec_component, linespec_complete): New.
8245 * linespec.h (linespec_complete): Declare.
8246
be966d42
PA
82472017-07-17 Pedro Alves <palves@redhat.com>
8248
8249 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8250 Handle 'operator<' / 'operator<<'.
8251
a2459270
PA
82522017-07-17 Pedro Alves <palves@redhat.com>
8253
8254 * completer.c (collect_explicit_location_matches): Handle
8255 MATCH_LABEL.
8256 (convert_explicit_location_to_linespec): New, factored out from
8257 ...
8258 (convert_explicit_location_to_sals): ... this.
8259 (complete_label): New.
8260 (linespec_complete_label, find_label_symbols_in_block): New.
8261 (find_label_symbols): Add completion_mode parameter and adjust to
8262 call find_label_symbols_in_block.
8263 * linespec.h (linespec_complete_label): Declare.
8264
c6756f62
PA
82652017-07-17 Pedro Alves <palves@redhat.com>
8266
8267 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8268 complete_symbol_mode parameter.
8269 * cli/cli-cmds.c (complete_command): Get the completion result out
8270 of the handle_brkchars tracker if used a custom word point.
8271 * completer.c: Include "linespec.h".
8272 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8273 (advance_to_expression_complete_word_point): New.
8274 (completion_tracker::completes_to_completion_word): New.
8275 (complete_files_symbols): Pass down
8276 complete_symbol_mode::EXPRESSION.
8277 (explicit_options, probe_options): New.
8278 (collect_explicit_location_matches): Complete on the
8279 explictit_loc->foo instead of word. Use
8280 linespec_complete_function. Handle MATCH_LINE. Handle offering
8281 keyword and options completions.
8282 (backup_text_ptr): Delete.
8283 (skip_keyword): New.
8284 (complete_explicit_location): Remove 'word' parameter. Add
8285 language, quoted_arg_start and quoted_arg_end parameters.
8286 Rewrite, parsing left to right.
8287 (location_completer): Rewrite.
8288 (location_completer_handle_brkchars): New function.
8289 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8290 (enum complete_line_internal_reason): Adjust comments.
8291 (completion_tracker::discard_completions): New.
8292 (completer_handle_brkchars_func_for_completer): Handle
8293 location_completer.
8294 (gdb_custom_word_point_brkchars)
8295 (gdb_org_rl_basic_quote_characters): New.
8296 (gdb_completion_word_break_characters_throw)
8297 (completion_find_completion_word): Handle trackers that use a
8298 custom word point.
8299 (completion_tracker::advance_custom_word_point_by): New.
8300 (completion_tracker::build_completion_result): Don't rely on
8301 readline appending the quote char.
8302 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8303 use a custom word point.
8304 (gdb_rl_attempted_completion_function): Restore
8305 rl_basic_quote_characters.
8306 * completer.h (class completion_tracker): Extend intro comment.
8307 (completion_tracker::set_quote_char)
8308 (completion_tracker::quote_char)
8309 (completion_tracker::set_use_custom_word_point)
8310 (completion_tracker::use_custom_word_point)
8311 (completion_tracker::custom_word_point)
8312 (completion_tracker::set_custom_word_point)
8313 (completion_tracker::advance_custom_word_point_by)
8314 (completion_tracker::completes_to_completion_word)
8315 (completion_tracker::discard_completions): New methods.
8316 (completion_tracker::m_quote_char)
8317 (completion_tracker::m_use_custom_word_point)
8318 (completion_tracker::m_custom_word_point): New fields.
8319 (advance_to_expression_complete_word_point): Declare.
8320 * f-lang.c (f_collect_symbol_completion_matches): Add
8321 complete_symbol_mode parameter.
8322 * language.h (struct language_defn)
8323 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8324 parameter.
8325 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8326 (linespec_complete_function): New function.
8327 (linespec_lexer_lex_keyword): Adjust.
8328 * linespec.h (linespec_keywords, linespec_complete_function): New
8329 declarations.
8330 * location.c (find_end_quote): New function.
8331 (explicit_location_lex_one): Add explicit_completion_info
8332 parameter. Save quoting info. Don't throw if being called for
8333 completion. Don't handle Ada operators here.
8334 (is_cp_operator, skip_op_false_positives, first_of)
8335 (explicit_location_lex_one_function): New function.
8336 (string_to_explicit_location): Replace 'dont_throw' parameter with
8337 an explicit_completion_info pointer parameter. Handle it. Don't
8338 use explicit_location_lex_one to lex function names. Use
8339 explicit_location_lex_one_function instead.
8340 * location.h (struct explicit_completion_info): New.
8341 (string_to_explicit_location): Replace 'dont_throw' parameter with
8342 an explicit_completion_info pointer parameter.
8343 * symtab.c (default_collect_symbol_completion_matches_break_on):
8344 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8345 (default_collect_symbol_completion_matches)
8346 (collect_symbol_completion_matches): Add complete_symbol_mode
8347 parameter.
8348 (collect_symbol_completion_matches_type): Pass down
8349 complete_symbol_mode::EXPRESSION.
8350 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8351 parameter. Handle LINESPEC mode.
8352 * symtab.h (complete_symbol_mode): New.
8353 (default_collect_symbol_completion_matches_break_on)
8354 (default_collect_symbol_completion_matches)
8355 (collect_symbol_completion_matches)
8356 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8357 parameter.
8358
1d550c82
PA
83592017-07-17 Pedro Alves <palves@redhat.com>
8360
8361 * utils.c (enum class strncmp_iw_mode): New.
8362 (strcmp_iw): Rename to ...
8363 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8364 parameters. Handle them.
8365 (strncmp_iw): New.
8366 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8367 * utils.h (strncmp_iw): Declare.
8368 (strcmp_iw): Move describing comments here.
8369
8090b426
PA
83702017-07-17 Pedro Alves <palves@redhat.com>
8371
8372 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8373 CP_OPERATOR_STR.
8374 * c-typeprint.c (is_type_conversion_operator): Use
8375 CP_OPERATOR_STR.
8376 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8377 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8378 CP_OPERATOR_LEN.
8379 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8380 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8381 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8382 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8383 CP_OPERATOR_STR.
8384 * location.c: Include "cp-support.h".
8385 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8386 CP_OPERATOR_STR.
8387 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8388 CP_OPERATOR_LEN.
8389
6a2c1b87
PA
83902017-07-17 Pedro Alves <palves@redhat.com>
8391
8392 * cli/cli-cmds.c (complete_command): Use a completion tracker
8393 along with completion_find_completion_word for handle_brkchars
8394 phase.
8395 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8396 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8397 (struct gdb_rl_completion_word_info): New.
8398 (gdb_rl_find_completion_word): New.
8399 (completion_find_completion_word): New.
8400 * completer.h (completion_find_completion_word): Declare.
8401
eb3ff9a5
PA
84022017-07-17 Pedro Alves <palves@redhat.com>
8403
8404 * ada-lang.c (symbol_completion_match): Adjust comments.
8405 (symbol_completion_add): Replace vector parameter with
8406 completion_tracker parameter. Use it.
8407 (ada_make_symbol_completion_list): Rename to...
8408 (ada_collect_symbol_completion_matches): ... this. Add
8409 completion_tracker parameter and use it.
8410 (ada_language_defn): Adjust.
8411 * break-catch-syscall.c (catch_syscall_completer): Adjust
8412 prototype and work with completion_tracker instead of VEC.
8413 * breakpoint.c (condition_completer): Adjust prototype and work
8414 with completion_tracker instead of VEC.
8415 * c-lang.c (c_language_defn, cplus_language_defn)
8416 (asm_language_defn, minimal_language_defn): Adjust to renames.
8417 * cli/cli-cmds.c (complete_command): Rework using
8418 completion_tracker. Catch exceptions when completing.
8419 * cli/cli-decode.c (integer_unlimited_completer)
8420 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8421 with completion_tracker instead of VEC.
8422 * command.h (struct completion_tracker): Forward declare.
8423 (completer_ftype, completer_handle_brkchars_ftype): Change
8424 types.
8425 (complete_on_cmdlist, complete_on_enum): Adjust.
8426 * completer.c: Include <algorithm>.
8427 (struct gdb_completer_state): New.
8428 (current_completion): New global.
8429 (readline_line_completion_function): Delete.
8430 (noop_completer, filename_completer)
8431 (filename_completer_handle_brkchars, complete_files_symbols)
8432 (linespec_location_completer): Adjust to work with a
8433 completion_tracker instead of a VEC.
8434 (string_or_empty): New.
8435 (collect_explicit_location_matches): Adjust to work with a
8436 completion_tracker instead of a VEC.
8437 (explicit_location_completer): Rename to ...
8438 (complete_explicit_location): ... this and adjust to work with a
8439 completion_tracker instead of a VEC.
8440 (location_completer): Adjust to work with a completion_tracker
8441 instead of a VEC.
8442 (add_struct_fields): Adjust to work with a completion_list instead
8443 of VEC.
8444 (expression_completer): Rename to ...
8445 (complete_expression): ... this and adjust to work with a
8446 completion_tracker instead of a VEC. Use complete_files_symbols.
8447 (expression_completer): Reimplement on top of complete_expression.
8448 (symbol_completer): Adjust to work with a completion_tracker
8449 instead of a VEC.
8450 (enum complete_line_internal_reason): Add describing comments.
8451 (complete_line_internal_normal_command): Adjust to work with a
8452 completion_tracker instead of a VEC.
8453 (complete_line_internal): Rename to ...
8454 (complete_line_internal_1): ... this and adjust to work with a
8455 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8456 handle_brkchars phase.
8457 (new_completion_tracker): Delete.
8458 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8459 complete_line_internal_1.
8460 (free_completion_tracker): Delete.
8461 (INITIAL_COMPLETION_HTAB_SIZE): New.
8462 (completion_tracker::completion_tracker)
8463 (completion_tracker::~completion_tracker): New.
8464 (maybe_add_completion): Delete.
8465 (completion_tracker::maybe_add_completion)
8466 (completion_tracker::add_completion)
8467 (completion_tracker::add_completions): New.
8468 (throw_max_completions_reached_error): Delete.
8469 (complete_line): Adjust to work with a completion_tracker instead
8470 of a VEC. Don't create a completion_tracker_t or check for max
8471 completions here.
8472 (command_completer, command_completer_handle_brkchars)
8473 (signal_completer, reg_or_group_completer_1)
8474 (reg_or_group_completer, default_completer_handle_brkchars):
8475 Adjust to work with a completion_tracker.
8476 (gdb_completion_word_break_characters_throw): New.
8477 (gdb_completion_word_break_characters): Reimplement.
8478 (line_completion_function): Delete.
8479 (completion_tracker::recompute_lowest_common_denominator)
8480 (expand_preserving_ws)
8481 (completion_tracker::build_completion_result)
8482 (completion_result::completion_result)
8483 (completion_result::completion_result)
8484 (completion_result::~completion_result)
8485 (completion_result::completion_result)
8486 (completion_result::release_match_list, compare_cstrings)
8487 (completion_result::sort_match_list)
8488 (completion_result::reset_match_list)
8489 (gdb_rl_attempted_completion_function_throw)
8490 (gdb_rl_attempted_completion_function): New.
8491 * completer.h (completion_list, struct completion_result)
8492 (class completion_tracker): New.
8493 (complete_line): Add completion_tracker parameter.
8494 (readline_line_completion_function): Delete.
8495 (gdb_rl_attempted_completion_function): New.
8496 (noop_completer, filename_completer, expression_completer)
8497 (location_completer, symbol_completer, command_completer)
8498 (signal_completer, reg_or_group_completer): Update prototypes.
8499 (completion_tracker_t, new_completion_tracker)
8500 (make_cleanup_free_completion_tracker): Delete.
8501 (enum maybe_add_completion_enum): Delete.
8502 (maybe_add_completion): Delete.
8503 (throw_max_completions_reached_error): Delete.
8504 * corefile.c (complete_set_gnutarget): Adjust to work with a
8505 completion_tracker instead of a VEC.
8506 * cp-abi.c (cp_abi_completer): Adjust to work with a
8507 completion_tracker instead of a VEC.
8508 * d-lang.c (d_language_defn): Adjust.
8509 * disasm.c (disassembler_options_completer): Adjust to work with a
8510 completion_tracker instead of a VEC.
8511 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8512 (f_collect_symbol_completion_matches): ... this. Adjust to work
8513 with a completion_tracker instead of a VEC.
8514 (f_language_defn): Adjust.
8515 * go-lang.c (go_language_defn): Adjust.
8516 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8517 Adjust to work with a completion_tracker instead of a VEC.
8518 * infrun.c (handle_completer): Likewise.
8519 * interps.c (interpreter_completer): Likewise.
8520 * interps.h (interpreter_completer): Likewise.
8521 * language.c (unknown_language_defn, auto_language_defn)
8522 (local_language_defn): Adjust.
8523 * language.h (language_defn::la_make_symbol_completion_list):
8524 Rename to ...
8525 (language_defn::la_collect_symbol_completion_matches): ... this
8526 and adjust to work with a completion_tracker instead of a VEC.
8527 * m2-lang.c (m2_language_defn): Adjust.
8528 * objc-lang.c (objc_language_defn): Adjust.
8529 * opencl-lang.c (opencl_language_defn): Adjust.
8530 * p-lang.c (pascal_language_defn): Adjust.
8531 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8532 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8533 with a completion_tracker.
8534 * rust-lang.c (rust_language_defn): Adjust.
8535 * symtab.c (free_completion_list, do_free_completion_list)
8536 (return_val, completion_tracker): Delete.
8537 (completion_list_add_name, completion_list_add_symbol)
8538 (completion_list_add_msymbol, completion_list_objc_symbol)
8539 (completion_list_add_fields, add_symtab_completions): Add
8540 completion_tracker parameter and use it.
8541 (default_make_symbol_completion_list_break_on_1): Rename to...
8542 (default_collect_symbol_completion_matches_break_on): ... this.
8543 Add completion_tracker parameter and use it instead of allocating
8544 a completion tracker here.
8545 (default_make_symbol_completion_list_break_on): Delete old
8546 implementation.
8547 (default_make_symbol_completion_list): Delete.
8548 (default_collect_symbol_completion_matches): New.
8549 (make_symbol_completion_list): Delete.
8550 (collect_symbol_completion_matches): New.
8551 (make_symbol_completion_type): Rename to ...
8552 (collect_symbol_completion_matches_type): ... this. Add
8553 completion_tracker parameter and use it instead of VEC.
8554 (make_file_symbol_completion_list_1): Rename to...
8555 (collect_file_symbol_completion_matches): ... this. Add
8556 completion_tracker parameter and use it instead of VEC.
8557 (make_file_symbol_completion_list): Delete.
8558 (add_filename_to_list): Use completion_list instead of a VEC.
8559 (add_partial_filename_data::list): Now a completion_list.
8560 (make_source_files_completion_list): Work with a completion_list
8561 instead of a VEC.
8562 * symtab.h: Include "completer.h".
8563 (default_make_symbol_completion_list_break_on)
8564 (default_make_symbol_completion_list, make_symbol_completion_list)
8565 (make_symbol_completion_type, make_file_symbol_completion_list)
8566 (make_source_files_completion_list): Delete.
8567 (default_collect_symbol_completion_matches_break_on)
8568 (default_collect_symbol_completion_matches)
8569 (collect_symbol_completion_matches)
8570 (collect_symbol_completion_matches_type)
8571 (collect_file_symbol_completion_matches)
8572 (make_source_files_completion_list): New.
8573 * top.c (init_main): Don't install a rl_completion_entry_function
8574 hook. Install a rl_attempted_completion_function hook instead.
8575 * tui/tui-layout.c (layout_completer): Adjust to work with a
8576 completion_tracker.
8577 * tui/tui-regs.c (tui_reggroup_completer):
8578 * tui/tui-win.c (window_name_completer, focus_completer)
8579 (winheight_completer): Adjust to work with a completion_tracker.
8580 * value.c: Include "completer.h".
8581 (complete_internalvar): Adjust to work with a completion_tracker.
8582 * value.h (complete_internalvar): Likewise.
8583
6e1dbf8c
PA
85842017-07-17 Pedro Alves <palves@redhat.com>
8585
8586 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8587 renames.
8588 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8589 comments to completer_ftype's declaration.
8590 <completer_handle_brkchars>: Change type to
8591 completer_handle_brkchars_ftype.
8592 * command.h (completer_ftype): Add describing comment and give
8593 names to parameters.
8594 (completer_ftype_void): Rename to ...
8595 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8596 (set_cmd_completer_handle_brkchars): Adjust.
8597 * completer.c (filename_completer_handle_brkchars): New function.
8598 (complete_line_internal_normal_command): New function, factored
8599 out from ...
8600 (complete_line_internal): ... here.
8601 (command_completer_handle_brkchars)
8602 (default_completer_handle_brkchars)
8603 (completer_handle_brkchars_func_for_completer): New functions.
8604 * completer.h (set_gdb_completion_word_break_characters): Delete
8605 declaration.
8606 (completer_handle_brkchars_func_for_completer): New declaration.
8607 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8608 completer_handle_brkchars_func_for_completer.
8609
78b13106
PA
86102017-07-17 Pedro Alves <palves@redhat.com>
8611
8612 * completer.c (symbol_completer): New function, based on
8613 make_symbol_completion_list_fn.
8614 * completer.h (symbol_completer): New declaration.
8615 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8616 * python/py-cmd.c (completers): Adjust.
8617 * symtab.c (make_symbol_completion_list_fn): Delete.
8618 * symtab.h (make_symbol_completion_list_fn): Delete.
8619 * cli/cli-decode.c (add_cmd): Adjust.
8620
bbf2f4df
PA
86212017-07-17 Pedro Alves <palves@redhat.com>
8622
8623 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8624 * dwarf2read.c: Include "filename-seen-cache.h".
8625 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8626 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8627 * filename-seen-cache.c: New file.
8628 * filename-seen-cache.h: New file.
8629 * symtab.c: Include "filename-seen-cache.h".
8630 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8631 (create_filename_seen_cache, clear_filename_seen_cache)
8632 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8633 to filename-seen-cache.h/filename-seen-cache.c.
8634 (output_source_filename, sources_info)
8635 (maybe_add_partial_symtab_filename)
8636 (make_source_files_completion_list): Adjust to use
8637 filename_seen_cache.
8638
330cdd98
PA
86392017-07-17 Pedro Alves <palves@redhat.com>
8640
8641 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8642 fields.
8643 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8644 dwarf2_debug_sections*)): New.
8645 (dwarf2_per_objfile::dwarf2_per_objfile(const
8646 dwarf2_per_objfile&)): Declare as deleted.
8647 (dwarf2_per_objfile::operator=): Declare as deleted.
8648 (dwarf2_per_objfile::dwarf2_per_objfile)
8649 (dwarf2_per_objfile::~dwarf2_per_objfile)
8650 (dwarf2_per_objfile::free_cached_comp_units): New.
8651 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8652 ctor. Call dwarf2_per_objfile's ctor manually.
8653 (dwarf2_locate_sections): Deleted/refactored as ...
8654 (dwarf2_per_objfile::locate_sections): ... this new method.
8655 (free_cached_comp_units): Defer to
8656 dwarf2_per_objfile::free_cached_comp_units.
8657 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8658
8880f2a9
TT
86592017-07-14 Tom Tromey <tom@tromey.com>
8660
8661 PR rust/21764:
8662 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8663 parameter.
8664 <UNOP_SIZEOF>: Split into separate case.
8665 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8666
65547233
TT
86672017-07-14 Tom Tromey <tom@tromey.com>
8668
8669 PR rust/21763:
8670 * symtab.c (symbol_matches_domain): Add language_rust to special
8671 case.
8672 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8673 treat LOC_TYPEDEF symbols as variables.
8674
8f14146e
PA
86752017-07-14 Pedro Alves <palves@redhat.com>
8676
8677 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8678 symtabs matching all symtabs with SRCFILE as file name instead of
8679 only considering the first hit, with lookup_symtab.
8680
2347965c
SM
86812017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8682
8683 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8684 operator_name parameters.
8685 (gen_expr): Update function call.
8686
40f4af28
SM
86872017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8688
8689 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8690 parameter.
8691 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8692 Likewise.
8693 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8694 parameter, use agent_expr::gdbarch instead, update function
8695 calls.
8696 (locexpr_tracepoint_var_ref): Likewise.
8697 (loclist_tracepoint_var_ref): Likewise.
8698 * ax-gdb.c (gen_trace_static_fields): Likewise.
8699 (gen_traced_pop): Likewise.
8700 (gen_frame_args_address): Likewise.
8701 (gen_frame_locals_address): Likewise.
8702 (gen_var_ref): Likewise.
8703 (gen_struct_ref_recursive): Likewise.
8704 (gen_static_field): Likewise.
8705 (gen_maybe_namespace_elt): Likewise.
8706 (gen_expr): Likewise.
8707 (gen_trace_for_var): Likewise.
8708 (gen_trace_for_expr): Likewise.
8709 (gen_trace_for_return_address): Likewise.
8710
053f8057
SM
87112017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8712
8713 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8714 parameter.
8715 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8716
6661ad48
SM
87172017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8718
8719 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8720 from ax, update calls.
8721 (gen_usual_arithmetic): Likewise.
8722 (gen_integral_promotions): Likewise.
8723 (gen_bitfield_ref): Likewise.
8724 (gen_primitive_field): Likewise.
8725 (gen_struct_ref_recursive): Likewise.
8726 (gen_struct_ref): Likewise.
8727 (gen_maybe_namespace_elt): Likewise.
8728 (gen_struct_elt_for_reference): Likewise.
8729 (gen_namespace_elt): Likewise.
8730 (gen_aggregate_elt_ref): Likewise.
8731 (gen_expr): Get gdbarch from ax, update calls.
8732 (gen_expr_binop_rest): Likewise.
8733
c55a47e7
PA
87342017-07-13 Pedro Alves <palves@redhat.com>
8735
8736 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8737 as default tdesc.
8738 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8739 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8740 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8741 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8742 tdep.
8743 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8744 Get final tdesc from the tdep.
8745 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8746 default tdesc.
8747 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8748 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8749 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8750 Use it as default tdesc.
8751 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8752 down to amd_init_abi. No longer handle fallback tdesc here.
8753 * amd64-tdep.h (tdesc_x32): Declare.
8754 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8755 parameter.
8756 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8757 as default tdesc.
8758
55efceab
AA
87592017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8760
8761 * s390-linux-tdep.c (s390_process_record): Add support for
8762 instructions new in arch12.
8763
0aa37b65
JB
87642017-07-11 John Baldwin <jhb@FreeBSD.org>
8765
8766 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8767 PT_GETFSBASE and PT_GETGSBASE.
8768 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8769 PT_SETGSBASE.
8770
48aeef91
JB
87712017-07-11 John Baldwin <jhb@FreeBSD.org>
8772
8773 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8774 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8775 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8776 those rules.
8777 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8778 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8779 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8780 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8781 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8782 * features/i386/amd64.xml: Add 64bit-segments.xml.
8783 * features/i386/amd64-avx-avx512.c: Regenerated.
8784 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8785 * features/i386/amd64-avx-mpx.c: Regenerated.
8786 * features/i386/amd64-avx.c: Regenerated.
8787 * features/i386/amd64-mpx.c: Regenerated.
8788 * features/i386/amd64.c: Regenerated.
8789 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8790 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8791 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8792 * regformats/i386/amd64-avx.dat: Regenerated.
8793 * regformats/i386/amd64-mpx.dat: Regenerated.
8794 * regformats/i386/amd64.dat: Regenerated.
8795
77c501bc
YQ
87962017-07-10 Yao Qi <yao.qi@linaro.org>
8797
8798 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8799 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8800
6dc8d757
AK
88012017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8802
8803 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8804 unsetenv.
8805 * gnulib/aclocal.m4: Regenerate.
8806 * gnulib/config.in: Regenerate.
8807 * gnulib/configure: Regenerate.
8808 * gnulib/import/Makefile.am: Regenerate.
8809 * gnulib/import/Makefile.in: Regenerate.
8810 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8811 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8812 * gnulib/import/m4/environ.m4: New file.
8813 * gnulib/import/m4/setenv.m4: New file.
8814 * gnulib/import/setenv.c: New file.
8815 * gnulib/import/unsetenv.c: New file.
8816
266934d1
SM
88172017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8818
8819 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8820 address when op is DW_OP_addr.
8821
03278692
TT
88222017-07-09 Tom Tromey <tom@tromey.com>
8823
8824 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8825 check and apply to outer type.
8826
4b654465
JB
88272017-07-07 John Baldwin <jhb@FreeBSD.org>
8828
8829 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8830 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8831 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8832 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8833
2af9fc44
JB
88342017-07-07 John Baldwin <jhb@FreeBSD.org>
8835
8836 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8837
382b69bb
JB
88382017-07-07 John Baldwin <jhb@FreeBSD.org>
8839
8840 * corelow.c (get_core_siginfo): Remove.
8841 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8842 instead of get_core_siginfo.
8843 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8844 * gdbarch.h: Re-generate.
8845 * gdbarch.c: Re-generate.
8846 * linux-tdep.c (linux_core_xfer_siginfo): New.
8847 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8848
6e5eab33
JB
88492017-07-07 John Baldwin <jhb@FreeBSD.org>
8850
8851 * corelow.c (thread_section_name): Move to ...
8852 * gdbcore.h (thread_section_name): ... here.
8853
929edea9
JB
88542017-07-07 John Baldwin <jhb@FreeBSD.org>
8855
8856 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8857 (struct siginfo32): New.
8858 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8859 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8860 via ptrace(PT_LWPINFO).
8861
762c974a
JB
88622017-07-07 John Baldwin <jhb@FreeBSD.org>
8863
8864 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8865 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8866 (fbsd_get_siginfo_type): New.
8867 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8868 (_initialize_fbsd_tdep): New.
8869
33c5cd75
DB
88702017-07-06 David Blaikie <dblaikie@gmail.com>
8871
8872 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8873 a singular dwo_unit*) to support multiple CUs in the same way that
8874 multiple TUs are supported.
8875 (create_cus_hash_table): Replace create_dwo_cu with a function for
8876 parsing multiple CUs from a DWO file.
8877 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8878 create_dwo_cu.
8879 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8880 htab_find, rather than comparing the signature to a singleton CU in
8881 the dwo_file.
8882
8455d262
PA
88832017-07-06 Pedro Alves <palves@redhat.com>
8884
8885 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8886
4da3eb35
PA
88872017-07-04 Pedro Alves <palves@redhat.com>
8888
8889 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8890 * gdbtypes.h (TYPE_STATIC): Delete.
8891 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8892 is_synchronized, is_native>: Delete.
8893 <dummy>: Bump.
8894 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8895 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8896 (TYPE_FN_FIELD_ABSTRACT): Delete.
8897
5bfd255c
SM
88982017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8899
8900 * buffer.h (buffer_finish): Fix spelling mistakes.
8901
25c54127
EZ
89022017-07-01 Eli Zaretskii <eliz@gnu.org>
8903
8904 * .dir-locals.el: Automatically switch to C-style comments in
8905 versions of Emacs that support the feature.
8906
dc4bde35
SDJ
89072017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8908 Pedro Alves <palves@redhat.com>
8909
8910 PR cli/21688
8911 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8912 (process_next_line): New variable 'inline_cmd'.
8913 Adjust 'if' clauses for "python", "compile" and "guile" to use
8914 'command_name_equals' and check for '!inline_cmd'.
8915
51ed89aa
SDJ
89162017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8917
8918 PR cli/21688
8919 * cli/cli-script.c (command_name_equals_not_inline): New function.
8920 (process_next_line): Adjust 'if' clauses for "python", "compile"
8921 and "guile" to use command_name_equals_not_inline.
8922
eb17d413
PA
89232017-06-29 Pedro Alves <palves@redhat.com>
8924
8925 * completer.c (expression_completer): Call
8926 linespec_location_completer instead of location_completer.
8927
195bcdd5
PA
89282017-06-29 Pedro Alves <palves@redhat.com>
8929
8930 * completer.c (expression_completer): Remove code that recomputes
8931 'text' from 'word'.
8932
adc764e7
YQ
89332017-06-29 Yao Qi <yao.qi@linaro.org>
8934
8935 * regformats/regdat.sh: Generate code with
8936 "ifndef IN_PROCESS_AGENT".
8937
6e75794e
PA
89382017-06-28 Pedro Alves <palves@redhat.com>
8939
8940 * command.h: Include "common/scoped_restore.h".
8941
bc491f2e
YQ
89422017-06-28 Yao Qi <yao.qi@linaro.org>
8943
8944 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8945 instead of obstack_grow.
8946
41664b45
DG
89472017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8948
8949 PR gdb/21337
8950 * symfile.c (reread_symbols): Call objfiles_changed just before
8951 read_symbols.
8952
6da67eb1
PA
89532017-06-27 Pedro Alves <palves@redhat.com>
8954
8955 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8956 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8957 (completion_list_add_symbol, completion_list_add_msymbol):
8958 ... these new functions.
8959 (add_symtab_completions)
8960 (default_make_symbol_completion_list_break_on_1): Adjust.
8961
23732b1e
PA
89622017-06-27 Pedro Alves <palves@redhat.com>
8963
8964 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8965 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8966 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8967 dtor.
8968 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8969 'storage_obstack' field an auto_obstack. In-class initialize all
8970 non-bitfield fields. Make minsyms_read bool.
8971 * symfile.c (read_symbols): Adjust.
8972
a4d1e79a
AH
89732017-06-27 Alan Hayward <alan.hayward@arm.com>
8974
8975 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8976 (gdbsim_store_register): Likewise.
8977
8268c778
PA
89782017-06-27 Pedro Alves <palves@redhat.com>
8979
8980 * c-exp.y (name_obstack): Now an auto_obstack.
8981 (yylex): Use auto_obstack::clear.
8982 (c_parse): Use auto_obstack::clear instead of reinitializing and
8983 freeing the obstack.
8984 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8985 * d-exp.y (name_obstack): Now an auto_obstack.
8986 (yylex): Use auto_obstack::clear.
8987 (d_parse): Use auto_obstack::clear instead of reinitializing and
8988 freeing the obstack.
8989 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8990 auto_obstack.
8991 * dwarf2read.c (create_addrmap_from_index)
8992 (dwarf2_build_psymtabs_hard)
8993 (update_enumeration_type_from_children): Likewise.
8994 * gdb_obstack.h (auto_obstack): New type.
8995 * go-exp.y (name_obstack): Now an auto_obstack.
8996 (build_packaged_name): Use auto_obstack::clear.
8997 (go_parse): Use auto_obstack::clear instead of reinitializing and
8998 freeing the obstack.
8999 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9000 auto_obstack.
9001 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9002 * rust-exp.y (work_obstack): Now an auto_obstack.
9003 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9004 reinitializing and freeing the obstack.
9005 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9006 (host_char_to_target): Use auto_obstack.
9007 * utils.h (make_cleanup_obstack_free): Delete declaration.
9008 * valprint.c (generic_emit_char, generic_printstr): Use
9009 auto_obstack.
9010
db665f42
SM
90112017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9012
9013 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9014 thread.
9015 (darwin_init_thread_list): Don't update dummy thread.
9016 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9017
873c0814
SM
90182017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9019
9020 * record-full.c (netorder16): Remove.
9021
8b5a7a6e
SM
90222017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9023
9024 * common/diagnostics.h: Define macros for GCC.
9025 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9026 * common/vec.h: Include diagnostics.h.
9027 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9028 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9029 warning.
9030
d1435379
SM
90312017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9032
9033 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9034 New macro.
9035 * ada-lex.l: Ignore deprecated register warnings.
9036
cc75e0fd
SM
90372017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9038
9039 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9040 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9041
07809eaf
SM
90422017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9043
9044 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9045 its own line.
9046
f076f034
SM
90472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9048
9049 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9050
0dd5cbc5
AH
90512017-06-23 Alan Hayward <alan.hayward@arm.com>
9052
9053 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9054 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9055 (xtensa_register_read_masked): Likewise.
9056
d4c6ce5b
SDJ
90572017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9058
9059 * common/environ.c (gdb_environ::unset): Update comment.
9060
16892a03
AH
90612017-06-22 Alan Hayward <alan.hayward@arm.com>
9062
9063 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9064 registers.
9065
d7dcbefc
AH
90662017-06-22 Alan Hayward <alan.hayward@arm.com>
9067
9068 * record-full.c (record_full_exec_insn): Use byte_vector.
9069
b30ff123
YQ
90702017-06-22 Yao Qi <yao.qi@linaro.org>
9071
9072 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9073 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9074
4fa847d7
AH
90752017-06-22 Alan Hayward <alan.hayward@arm.com>
9076
9077 * remote.c (cached_reg): Move from here...
9078 * regcache.h (cached_reg): ...to here.
9079 * python/py-unwind.c (struct reg_info): Remove.
9080 (cached_frame_info): Use cached_reg_t.
9081 (pyuw_prev_register): Likewise.
9082 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9083 (pyuw_dealloc_cache): Free all registers.
9084
f4906a9a
PA
90852017-06-22 Pedro Alves <palves@redhat.com>
9086 Simon Marchi <simon.marchi@ericsson.com>
9087
9088 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9089 warning.
9090 * common/diagnostics.h: New file.
9091
b45a1208
PA
90922017-06-22 Pedro Alves <palves@redhat.com>
9093
9094 * common/agent.h: Add include guards.
9095
e4da2c61
SM
90962017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9097
9098 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9099 talk about addressable units instead of bytes.
9100
96160d60
SDJ
91012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9102
9103 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9104 of '::const_iterator'.
9105
9a6c7d9c
SDJ
91062017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9107
9108 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9109 'unittests/environ-selftests.c'.
9110 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9111 * charset.c (find_charset_names): Declare object 'iconv_env'.
9112 Update code to use 'iconv_env' object. Remove call to
9113 'free_environ'.
9114 * common/environ.c: Include <utility>.
9115 (make_environ): Delete function.
9116 (free_environ): Delete function.
9117 (gdb_environ::clear): New function.
9118 (gdb_environ::operator=): New function.
9119 (gdb_environ::get): Likewise.
9120 (environ_vector): Delete function.
9121 (set_in_environ): Delete function.
9122 (gdb_environ::set): New function.
9123 (unset_in_environ): Delete function.
9124 (gdb_environ::unset): New function.
9125 (gdb_environ::envp): Likewise.
9126 * common/environ.h: Include <vector>.
9127 (struct gdb_environ): Delete; transform into...
9128 (class gdb_environ): ... this class.
9129 (free_environ): Delete prototype.
9130 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9131 environ_vector): Likewise.
9132 * infcmd.c (run_command_1): Update code to call
9133 'envp' from 'gdb_environ' class.
9134 (environment_info): Update code to call methods from 'gdb_environ'
9135 class.
9136 (unset_environment_command): Likewise.
9137 (path_info): Likewise.
9138 (path_command): Likewise.
9139 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9140 (inferior::inferior): Initialize 'environment' using the host's
9141 information.
9142 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9143 Include "environ.h".
9144 (class inferior) <environment>: Change type from 'struct
9145 gdb_environ' to 'gdb_environ'.
9146 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9147 methods from 'gdb_environ' class.
9148 * solib.c (solib_find_1): Likewise
9149 * unittests/environ-selftests.c: New file.
9150
75c554cf
YQ
91512017-06-20 Yao Qi <yao.qi@linaro.org>
9152
9153 * features/i386/i386-linux.xml: Exchange the order of including
9154 32bit-linux.xml and 32bit-sse.xml.
9155 * features/i386/i386-linux.c: Regenerated.
9156
72ddacb7
YQ
91572017-06-20 Yao Qi <yao.qi@linaro.org>
9158
9159 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9160 Delete copy ctor and assignment operator.
9161 (tdesc_type): Likewise.
9162 (tdesc_feature): Likewise.
9163 (tdesc_free_reg): Remove.
9164 (tdesc_create_reg): Use new.
9165 (tdesc_free_type): Remove.
9166 (tdesc_create_vector): Use new.
9167 (tdesc_create_union): Likewise.
9168 (tdesc_create_flags): Likewise.
9169 (tdesc_create_enum): Likewise.
9170 (tdesc_free_feature): Delete.
9171 (free_target_description): Use delete.
9172
325c9fd4
JB
91732017-06-19 John Baldwin <jhb@FreeBSD.org>
9174
9175 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9176 registers.
9177
16b7a719
PA
91782017-06-19 Pedro Alves <palves@redhat.com>
9179
9180 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9181 after gdb::unlinker.
9182
1c8e01c9
SDJ
91832017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9184
9185 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9186 gdb_environ to access an environment variable.
9187
ffce45d2
TP
91882017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9189
9190 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9191 gdb_byte*.
9192
1d4fbac9
SM
91932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9194
9195 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9196
8465943a
SM
91972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9198
9199 * configure: Re-generate.
9200 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9201
3e019bdc
SM
92022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9203
9204 * configure: Re-generate.
9205 * warning.m4: Pass -Werror to compiler when checking for
9206 supported warning flags.
9207
cf0dd6f0
SM
92082017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9209
9210 * Makefile.in (COMPILE.pre): Add "-x c++".
9211
6f98355c
YQ
92122017-06-16 Alan Hayward <alan.hayward@arm.com>
9213 Pedro Alves <palves@redhat.com>
9214 Yao Qi <yao.qi@linaro.org>
9215
9216 * defs.h (RequireLongest): New.
9217 (extract_integer): Declare function template.
9218 (extract_signed_integer): Remove the declaration, but define it
9219 static inline.
9220 (extract_unsigned_integer): Likewise.
9221 (store_integer): Declare function template.
9222 (store_signed_integer): Remove the declaration, but define it
9223 static inline.
9224 (store_unsigned_integer): Likewise.
9225 * findvar.c (extract_integer): New function template.
9226 (extract_signed_integer): Remove.
9227 (extract_unsigned_integer): Remove.
9228 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9229 instantiations.
9230 (store_integer): New function template.
9231 (store_signed_integer): Remove.
9232 (store_unsigned_integer): Remove.
9233 (store_integer): Explicit instantiations.
9234 * regcache.c (regcache_raw_read_signed): Update.
9235 (regcache::raw_read): New function.
9236 (regcache::raw_read_signed): Remove.
9237 (regcache::raw_read_unsigned): Remove.
9238 (regcache_raw_read_unsigned): Update.
9239 (regcache_raw_write_unsigned): Update.
9240 (regcache::raw_write_signed): Remove.
9241 (regcache::raw_write): New function.
9242 (regcache_cooked_read_signed): Update.
9243 (regcache::raw_write_unsigned): Remove.
9244 (regcache::cooked_read_signed): Remove.
9245 (regcache_cooked_read_unsigned): Update.
9246 (regcache::cooked_read_unsigned): Remove.
9247 (regcache_cooked_write_signed): Update.
9248 (regcache_cooked_write_unsigned): Update.
9249 * regcache.h (regcache) <raw_read_signed>: Remove.
9250 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9251 <raw_read, raw_write>: New.
9252 <cooked_read_signed, cooked_write_signed>: Remove.
9253 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9254 <cooked_read, cooked_write>: New.
9255 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9256 (sh64_pseudo_register_write): Update.
9257
a87dc45a
AK
92582017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9259
9260 * arc-tdep.c (arc_disassembler_options): New variable.
9261 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9262 of default_print_insn.
9263 (arc_delayed_print_insn): Set info->section when needed,
9264 use default_print_insn to retrieve a disassembler.
9265
45159d6a
SDJ
92662017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9267
9268 PR gdb/21574
9269 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9270 to mention $SHELL and startup-with-shell.
9271
b46c4cf0
MF
92722017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9273
9274 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9275
6394c606
YQ
92762017-06-14 Yao Qi <yao.qi@linaro.org>
9277
9278 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9279 default_print_insn instead of print_insn_aarch64.
9280 * arm-tdep.c (gdb_print_insn_arm): Call
9281 default_print_insn instead of print_insn_big_arm
9282 and print_insn_little_arm.
9283 * i386-tdep.c (i386_print_insn): Call default_print_insn
9284 instead of print_insn_i386.
9285 * ia64-tdep.c (ia64_print_insn): Call
9286 default_print_insn instead of print_insn_ia64.
9287 * mips-tdep.c (gdb_print_insn_mips): Call
9288 default_print_insn instead of print_insn_big_mips
9289 and print_insn_little_mips.
9290 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9291 instead of print_insn_spu.
9292
d5722aa2
PA
92932017-06-14 Pedro Alves <palves@redhat.com>
9294
9295 * ada-lang.c: Include "common/byte-vector.h".
9296 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9297 * charset.c (wchar_iterator::iterate): Resize the vector instead
9298 of reserving it.
9299 * common/byte-vector.h: Include "common/def-vector.h".
9300 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9301 * cli/cli-dump.c: Include "common/byte-vector.h".
9302 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9303 * common/byte-vector.h: New file.
9304 * common/def-vector.h: New file.
9305 * common/default-init-alloc.h: New file.
9306 * dwarf2loc.c: Include "common/byte-vector.h".
9307 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9308 instead of reserving it.
9309 * dwarf2read.c: Include "common/byte-vector.h".
9310 (data_buf::m_vec): Now a gdb::byte_vector.
9311 * gdb_regex.c: Include "common/def-vector.h".
9312 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9313 * mi/mi-main.c: Include "common/byte-vector.h".
9314 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9315 * printcmd.c: Include "common/byte-vector.h".
9316 (print_scalar_formatted): Use gdb::byte_vector.
9317 * valprint.c: Include "common/byte-vector.h".
9318 (maybe_negate_by_bytes, print_decimal_chars): Use
9319 gdb::byte_vector.
9320
01ec7a27
SM
93212017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9322
9323 * darwin-nat.c: Include "nat/fork-inferior.h".
9324
848d9074
SM
93252017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9326
9327 * configure.nat: Factor out Darwin bits that are not
9328 architecture-specific. Add fork-inferior.o.
9329
3b912944
SM
93302017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9331
9332 * configure.nat: Factor out AIX bits that are not
9333 architecture-specific. Add fork-inferior.o.
9334
55acdf22
AA
93352017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9336
9337 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9338 (read_pieced_value, write_pieced_value): ...here. Reduce to
9339 wrappers that just call rw_pieced_value.
9340
f65e2044
AA
93412017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9342
9343 * dwarf2loc.c (write_pieced_value): When writing the data for a
9344 memory piece, use write_memory_with_notification instead of
9345 write_memory.
9346
23f945bf
AA
93472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9348
9349 * valops.c (read_value_memory): Change embedded_offset to
9350 represent a bit offset instead of a byte offset.
9351 * value.h (read_value_memory): Adjust comment.
9352
f236533e
AA
93532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9354
9355 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9356 dest_offset_bits and source_offset_bits.
9357 (write_pieced_value): Likewise.
9358
65d84b76
AA
93592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9360
9361 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9362 given by DW_OP_bit_piece.
9363 (write_pieced_value): Likewise.
9364
242d31ab
AA
93652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9366
9367 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9368 some other preparations to the places where sufficient information
9369 is available.
9370 (write_pieced_value): Likewise.
9371
03c8af18
AA
93722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9373
9374 * dwarf2loc.c (bits_to_bytes): New function.
9375 (read_pieced_value): Fix offset calculations for register pieces
9376 on big-endian targets.
9377 (write_pieced_value): Likewise.
9378
840989c1
AA
93792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9380
9381 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9382 (write_pieced_value): Likewise.
9383
359b19bb
AA
93842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9385
9386 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9387 transfer the source value's least significant bits, instead of its
9388 lowest-addressed ones. Rename type_len to max_offset.
9389 (read_pieced_value): Mirror above changes to write_pieced_value as
9390 applicable.
9391
07c9ca3b
AA
93922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9393
9394 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9395 truncate full bytes from dest_offset_bits before using it as an
9396 offset into the buffer.
9397
f1cc9874
AA
93982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9399
9400 * dwarf2loc.c (write_pieced_value): Include transfer size in
9401 byte-wise check.
9402
cdaac320
AA
94032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9404
9405 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9406 calculation of this_size.
9407
af547a96
AA
94082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9409
9410 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9411 when targeting a bit-field.
9412 (write_pieced_value): Likewise.
9413
ddd7882a
AA
94142017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9415
9416 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9417 (allocate_piece_closure): Drop addr_size parameter.
9418 (dwarf2_evaluate_loc_desc_full): Adjust call to
9419 allocate_piece_closure.
9420
e9352324
AA
94212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9422
9423 PR gdb/21226
9424 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9425 the LSB end, independent of endianness.
9426
d5d1163e
AA
94272017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9428
9429 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9430 size capping.
9431
032bb6ea
YQ
94322017-06-13 Yao Qi <yao.qi@linaro.org>
9433
9434 * mips-linux-nat.c: Move include features/mips*-linux.c to
9435 mips-linux-tdep.c.
9436 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9437 to mips-linux-tdep.c.
9438 * mips-linux-tdep.c: Include features/mips*-linux.c
9439 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9440 functions.
9441 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9442 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9443 (tdesc_mips64_dsp_linux): Declare.
9444
f12f6bad
TT
94452017-06-12 Tom Tromey <tom@tromey.com>
9446
9447 * valprint.h (val_print_type_code_int): Remove.
9448 * valprint.c (generic_val_print_int): Always call
9449 val_print_scalar_formatted.
9450 (val_print_type_code_int): Remove.
9451 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9452 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9453 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9454 * ada-valprint.c (ada_val_print_num): Use
9455 val_print_scalar_formatted.
9456
d9109c80
TT
94572017-06-12 Tom Tromey <tom@tromey.com>
9458
9459 * printcmd.c (print_scalar_formatted): Unify the two switches.
9460 Don't convert scalars to LONGEST.
9461
4ac0cb1c
TT
94622017-06-12 Tom Tromey <tom@tromey.com>
9463
9464 PR exp/16225:
9465 * valprint.h (print_decimal_chars): Update.
9466 * valprint.c (maybe_negate_by_bytes): New function.
9467 (print_decimal_chars): Add "is_signed" argument.
9468 * printcmd.c (print_scalar_formatted): Update.
9469
30a25466
TT
94702017-06-12 Tom Tromey <tom@tromey.com>
9471
9472 PR exp/16225:
9473 * valprint.h (print_binary_chars, print_hex_chars): Update.
9474 * valprint.c (val_print_type_code_int): Update.
9475 (print_binary_chars): Add "zero_pad" argument.
9476 (emit_octal_digit): New function.
9477 (print_octal_chars): Don't zero-pad.
9478 (print_decimal_chars): Likewise.
9479 (print_hex_chars): Add "zero_pad" argument.
9480 * sh64-tdep.c (sh64_do_fp_register): Update.
9481 * regcache.c (regcache::dump): Update.
9482 * printcmd.c (print_scalar_formatted): Update.
9483 * infcmd.c (default_print_one_register_info): Update.
9484
b3464d03
PA
94852017-06-12 Pedro Alves <palves@redhat.com>
9486 Alan Hayward <alan.hayward@arm.com>
9487
9488 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9489 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9490 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9491 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9492 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9493
4b76cda9
PA
94942017-06-12 Pedro Alves <palves@redhat.com>
9495
9496 * dwarf2read.c (mapped_symtab::data): Now a vector of
9497 symtab_index_entry instead of vector of
9498 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9499 whether an element's name is NULL instead of checking whether the
9500 element itself is NULL.
9501 (find_slot): Change return type. Adjust.
9502 (hash_expand, , add_index_entry, uniquify_cu_indices)
9503 (write_hash_table): Adjust.
9504
e8f8bcb3
PA
95052017-06-12 Pedro Alves <palves@redhat.com>
9506
9507 * dwarf2read.c (recursively_count_psymbols): New function.
9508 (write_psymtabs_to_index): Call it to compute number of psyms and
9509 pass estimate size of psyms_seen to unordered_set's ctor.
9510
70a1152b
PA
95112017-06-12 Pedro Alves <palves@redhat.com>
9512
9513 * dwarf2read.c (write_hash_table): Check if key already exists
9514 before emplacing.
9515
c2f134ac
PA
95162017-06-12 Pedro Alves <palves@redhat.com>
9517
9518 * dwarf2read.c (data_buf::append_space): Rename to...
9519 (data_buf::grow): ... this, and make private. Adjust all callers.
9520 (data_buf::append_uint): New method.
9521 (add_address_entry, write_one_signatured_type)
9522 (write_psymtabs_to_index): Use it.
9523
a81e6d4d
PA
95242017-06-12 Pedro Alves <palves@redhat.com>
9525
9526 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9527 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9528 (data_buf::file_write): Call ::fwrite directly.
9529
6fd931f2
PA
95302017-06-12 Pedro Alves <palves@redhat.com>
9531
9532 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9533 std::vector::erase.
9534
bc8f2430
JK
95352017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9536
9537 Code cleanup: C++ify .gdb_index producer.
9538 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9539 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9540 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9541 (create_strtab, add_string): Remove.
9542 (file_write, data_buf): New.
9543 (struct symtab_index_entry): Use std::vector for cu_indices.
9544 (struct mapped_symtab): Use std::vector for data.
9545 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9546 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9547 Remove.
9548 (find_slot): Change return type. Update it to the new data structures.
9549 (hash_expand, add_index_entry): Update it to the new data structures.
9550 (offset_type_compare): Remove.
9551 (uniquify_cu_indices): Update it to the new data structures.
9552 (c_str_view, c_str_view_hasher, vector_hasher): New.
9553 (add_indices_to_cpool): Remove.
9554 (write_hash_table): Update it to the new data structures.
9555 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9556 (eq_psymtab_cu_index): Remove.
9557 (psym_index_map): New typedef.
9558 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9559 reference and std::unordered_map for cu_index_htab.
9560 (add_address_entry, add_address_entry_worker, write_address_map)
9561 (write_psymbols): Update it to the new data structures.
9562 (write_obstack): Remove.
9563 (struct signatured_type_index_data): Change types_list to a data_buf
9564 reference and psyms_seen to a std::unordered_set reference.
9565 (write_one_signatured_type, recursively_write_psymbols)
9566 (write_psymtabs_to_index): Update it to the new data structures.
9567
c4dcb155
SM
95682017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9569
9570 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9571 separate-debug-file commands.
9572 * symfile.h (separate_debug_file_debug): New global.
9573 * symfile.c (separate_debug_file_debug): New global.
9574 (separate_debug_file_exists, find_separate_debug_file): Add
9575 debug output.
9576 (_initialize_symfile): Add "set debug separate-debug-file"
9577 command.
9578 * build-id.c (build_id_to_debug_bfd,
9579 find_separate_debug_file_by_buildid): Add debug output.
9580
6d45d4b4
SM
95812017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9582
9583 * gdbarch.sh (displaced_step_free_closure): Remove.
9584 * gdbarch.h, gdbarch.c: Re-generate.
9585 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9586 displaced_step_free_closure.
9587 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9588 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9589 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9590 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9591 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9592 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9593 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9594 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9595 * infrun.c (displaced_step_clear): Call xfree instead of
9596 gdbarch_displaced_step_free_closure.
9597
2f91880f
SDJ
95982017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9599
9600 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9601 NULL".
9602
b8b6e72f
AH
96032017-06-08 Alan Hayward <alan.hayward@arm.com>
9604
9605 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9606 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9607 (mn10300_push_dummy_call): Likewise.
9608
5369082e
AH
96092017-06-08 Alan Hayward <alan.hayward@arm.com>
9610
9611 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9612
ff4ca5ac
AH
96132017-06-08 Alan Hayward <alan.hayward@arm.com>
9614
9615 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9616
aefd8b33
SDJ
96172017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9618
9619 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9620 able to start inferiors using a shell.
9621 (New remote packets): Announce new packet "QStartupWithShell".
9622 * remote.c: Add PACKET_QStartupWithShell.
9623 (extended_remote_create_inferior): Handle new
9624 PACKET_QStartupWithShell.
9625 (remote_protocol_features) <QStartupWithShell>: New entry for
9626 PACKET_QStartupWithShell.
9627 (_initialize_remote): Call "add_packet_config_cmd" for
9628 QStartupShell.
9629
2090129c
SDJ
96302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9631 Pedro Alves <palves@redhat.com>
9632
9633 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9634 and "nat/fork-inferior.h".
9635 * common/common-inferior.h: New file, with contents from
9636 "gdb/inferior.h".
9637 * commom/common-utils.c: Include "common-utils.h".
9638 (stringify_argv): New function.
9639 * common/common-utils.h (stringify_argv): New prototype.
9640 * configure.nat: Add "fork-inferior.o" as a dependency for
9641 "*linux*", "fbsd*" and "nbsd*" hosts.
9642 * corefile.c (get_exec_file): Update comment.
9643 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9644 instead of "startup_inferior".
9645 (darwin_create_inferior): Call "add_thread_silent" after
9646 "fork_inferior".
9647 * fork-child.c: Cleanup unnecessary includes.
9648 (SHELL_FILE): Move to "common/common-fork-child.c".
9649 (environ): Likewise.
9650 (exec_wrapper): Initialize.
9651 (get_exec_wrapper): New function.
9652 (breakup_args): Move to "common/common-fork-child.c"; rename to
9653 "breakup_args_for_exec".
9654 (escape_bang_in_quoted_argument): Move to
9655 "common/common-fork-child.c".
9656 (saved_ui): New variable.
9657 (prefork_hook): New function.
9658 (postfork_hook): Likewise.
9659 (postfork_child_hook): Likewise.
9660 (gdb_startup_inferior): Likewise.
9661 (fork_inferior): Move to "common/common-fork-child.c". Update
9662 function to support gdbserver.
9663 (startup_inferior): Likewise.
9664 * gdbcore.h (get_exec_file): Remove declaration.
9665 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9666 instead of "startup_inferior". Call "add_thread_silent" after
9667 "fork_inferior".
9668 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9669 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9670 instead of "startup_inferior". Call "add_thread_silent" after
9671 "fork_inferior".
9672 * inferior.h: Include "common-inferior.h".
9673 (trace_start_error): Move to "common/common-utils.h".
9674 (trace_start_error_with_name): Likewise.
9675 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9676 (startup_inferior): Likewise.
9677 (gdb_startup_inferior): New prototype.
9678 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9679 * nat/fork-inferior.h: New file.
9680 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9681 instead of "startup_inferior". Call "add_thread_silent" after
9682 "fork_inferior".
9683 * target.h (target_terminal_init): Move prototype to
9684 "target/target.h".
9685 (target_terminal_inferior): Likewise.
9686 (target_terminal_ours): Likewise.
9687 * target/target.h (target_terminal_init): New prototype, moved
9688 from "target.h".
9689 (target_terminal_inferior): Likewise.
9690 (target_terminal_ours): Likewise.
9691 * utils.c (gdb_flush_out_err): New function.
9692
043a4934
SDJ
96932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9694
9695 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9696 * common/common-gdbthread.h: New file, with parts from
9697 "gdb/gdbthread.h".
9698 * gdbthread.h: Include "common-gdbthread.h".
9699 (switch_to_thread): Moved to "common/common-gdbthread.h".
9700
15652511
SDJ
97012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9702
9703 * Makefile.in (SFILES): Add "common/job-control.c".
9704 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9705 (COMMON_OBS): Add "job-control.o".
9706 * common/job-control.c: New file, with contents from
9707 "gdb/inflow.c".
9708 * common/job-control.h: New file, with contents from "terminal.h".
9709 * fork-child.c: Include "job-control.h".
9710 * inflow.c: Include "job-control.h".
9711 (gdb_setpgid): Move to "common/common-inflow.c".
9712 (_initialize_inflow): Move setting of "job_control" to
9713 "handle_job_control".
9714 * terminal.h (job_control): Moved to "common/common-terminal.h".
9715 (gdb_setpgid): Likewise.
9716 * top.c: Include "job_control.h".
9717 * utils.c: Likewise.
9718 (job_control): Moved to "job-control.c".
9719
2d7cc5c7
PA
97202017-06-07 Pedro Alves <palves@redhat.com>
9721
9722 * Makefile.in (SFILES): Add gdb_regex.c.
9723 (COMMON_OBS): Add gdb_regex.o.
9724 * ada-lang.c (ada_add_standard_exceptions)
9725 (ada_add_exceptions_from_frame, name_matches_regex)
9726 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9727 parameter type to compiled_regex. Adjust.
9728 (ada_exceptions_list): Use compiled_regex.
9729 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9730 std::unique_ptr<compiled_regex>.
9731 (exception_catchpoint::~exception_catchpoint): Remove regfree
9732 call.
9733 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9734 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9735 * breakpoint.c (solib_catchpoint::compiled): Now a
9736 std::unique_ptr<compiled_regex>.
9737 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9738 (check_status_catch_solib): Adjust to use compiled_regex.
9739 (add_solib_catchpoint): Adjust to use compiled_regex.
9740 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9741 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9742 compiled_regex reference. Adjust to use it.
9743 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9744 declaration. Include "gdb_regex.h".
9745 (apropos_cmd): Change regex parameter to compiled_regex reference.
9746 * gdb_regex.c: New file.
9747 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9748 declarations.
9749 (class compiled_regex): New.
9750 * linux-tdep.c: Include "common/gdb_optional.h".
9751 (struct mapping_regexes): New, factored out from
9752 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9753 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9754 gdb::optional and remove cleanups. Adjust to compiled_regex.
9755 * probe.c: Include "common/gdb_optional.h".
9756 (collect_probes): Use compiled_regex and gdb::optional and remove
9757 cleanups.
9758 * skip.c: Include "common/gdb_optional.h".
9759 (skiplist_entry::compiled_function_regexp): Now a
9760 gdb::optional<compiled_regex>.
9761 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9762 (free_skiplist_entry): Remove regfree call.
9763 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9764 compiled_regex and gdb::optional.
9765 * symtab.c: Include "common/gdb_optional.h".
9766 (search_symbols): Use compiled_regex and gdb::optional.
9767 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9768 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9769 to gdb_regex.c.
9770
50d6adef
AH
97712017-06-07 Alan Hayward <alan.hayward@arm.com>
9772
9773 * regcache.c (regcache::save): Avoid buffer use.
9774 (regcache::dump): Likewise.
9775
4a8a33c8
AH
97762017-06-07 Alan Hayward <alan.hayward@arm.com>
9777
9778 * sh-tdep.c (sh_pseudo_register_read): Remove
9779 MAX_REGISTER_SIZE.
9780 (sh_pseudo_register_write): Likewise.
9781 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9782 (sh64_pseudo_register_write): Likewise
9783
d1be909e
AH
97842017-06-07 Alan Hayward <alan.hayward@arm.com>
9785
9786 * aarch64-tdep.c (aarch64_store_return_value): Use
9787 V_REGISTER_SIZE.
9788 (aarch64_pseudo_read_value): Likewise.
9789 (aarch64_pseudo_write): Likewise.
9790
f4a65042
YQ
97912017-06-06 Yao Qi <yao.qi@linaro.org>
9792
9793 * regformats/regdef.h (set_register_cache): Remove the
9794 declaration.
9795
9f7fb0aa
AH
97962017-06-06 Alan Hayward <alan.hayward@arm.com>
9797
9798 * frame.c (frame_unwind_register_signed): Use
9799 frame_unwind_register_value.
9800
e1e01040
PA
98012017-06-06 Pedro Alves <palves@redhat.com>
9802
9803 PR breakpoints/21553
9804 * breakpoint.c (create_breakpoints_sal_default)
9805 (init_breakpoint_sal, create_breakpoint_sal): Use
9806 gdb::unique_xmalloc_ptr for string parameters.
9807 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9808 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9809 (base_breakpoint_create_breakpoints_sal)
9810 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9811 (strace_marker_create_breakpoints_sal)
9812 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9813 string parameters.
9814 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9815 gdb::unique_xmalloc_ptr for string parameters.
9816 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9817 parameters.
9818
fbe654c8
AH
98192017-06-06 Alan Hayward <alan.hayward@arm.com>
9820
9821 * alpha-tdep.c (alpha_register_to_value): Use
9822 get_frame_register_value.
9823 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9824
ae0d01d6
AH
98252017-06-06 Alan Hayward <alan.hayward@arm.com>
9826
9827 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9828 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9829 (ia64_value_to_register): Likewise.
9830 (ia64_extract_return_value): Likewise.
9831 (ia64_store_return_value): Likewise.
9832 (ia64_push_dummy_call): Likewise.
9833
49cf576c
JB
98342017-06-04 Joel Brobecker <brobecker@adacore.com>
9835
9836 GDB 8.0 released.
9837
26b6a6ab
SM
98382017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9839
9840 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9841
22827c51
SM
98422017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9843
9844 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9845 parameter.
9846 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9847
0e05cf3a
SM
98482017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9849
9850 * event-loop.c (poll_timers): Unallocate timer using delete
9851 instead of xfree.
9852
c1fc2657
SM
98532017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9854
9855 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9856 (struct breakpoint) <~breakpoint>: New.
9857 (struct watchpoint): Inherit from breakpoint.
9858 <~watchpoint>: New.
9859 <base>: Remove.
9860 (struct tracepoint): Inherit from breakpoint.
9861 <base>: Remove.
9862 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9863 (struct longjmp_breakpoint): Inherit from breakpoint.
9864 <~longjmp_breakpoint>: New.
9865 <base>: Remove.
9866 (new_breakpoint_from_type): Remove casts.
9867 (watchpoint_in_thread_scope): Remove reference to base field.
9868 (watchpoint_del_at_next_stop): Likewise.
9869 (update_watchpoint): Likewise.
9870 (watchpoint_check): Likewise.
9871 (bpstat_check_watchpoint): Likewise.
9872 (set_longjmp_breakpoint): Likewise.
9873 (struct fork_catchpoint): Inherit from breakpoint.
9874 <base>: Remove.
9875 (struct solib_catchpoint): Inherit from breakpoint.
9876 <~solib_catchpoint>: New.
9877 <base>: Remove.
9878 (dtor_catch_solib): Change to ...
9879 (solib_catchpoint::~solib_catchpoint): ... this.
9880 (breakpoint_hit_catch_solib): Remove reference to base field.
9881 (add_solib_catchpoint): Likewise.
9882 (create_fork_vfork_event_catchpoint): Likewise.
9883 (struct exec_catchpoint): Inherit from breakpoint.
9884 <~exec_catchpoint>: New.
9885 <base>: Remove.
9886 (dtor_catch_exec): Change to ...
9887 (exec_catchpoint::~exec_catchpoint): ... this.
9888 (dtor_watchpoint): Change to ...
9889 (watchpoint::~watchpoint): ... this.
9890 (watch_command_1): Remove reference to base field.
9891 (catch_exec_command_1): Likewise.
9892 (base_breakpoint_dtor): Change to ...
9893 (breakpoint::~breakpoint): ... this.
9894 (base_breakpoint_ops): Remove dtor field value.
9895 (longjmp_bkpt_dtor): Change to ...
9896 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9897 (strace_marker_create_breakpoints_sal): Remove reference to base
9898 field.
9899 (delete_breakpoint): Don't manually call breakpoint destructor.
9900 (create_tracepoint_from_upload): Remove reference to base field.
9901 (trace_pass_set_count): Likewise.
9902 (initialize_breakpoint_ops): Don't initialize
9903 momentary_breakpoint_ops, don't set dtors.
9904 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9905 <~ada_catchpoint>: New.
9906 <base>: Remove.
9907 (create_excep_cond_exprs): Remove reference to base field.
9908 (dtor_exception): Change to ...
9909 (ada_catchpoint::~ada_catchpoint): ... this.
9910 (dtor_catch_exception): Remove.
9911 (dtor_catch_exception_unhandled): Remove.
9912 (dtor_catch_assert): Remove.
9913 (create_ada_exception_catchpoint): Remove reference to base
9914 field.
9915 (initialize_ada_catchpoint_ops): Don't set dtors.
9916 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9917 breakpoint.
9918 <~signal_catchpoint>: New.
9919 <base>: Remove.
9920 (signal_catchpoint_dtor): Change to ...
9921 (signal_catchpoint::~signal_catchpoint): ... this.
9922 (create_signal_catchpoint): Remove reference to base field.
9923 (initialize_signal_catchpoint_ops): Don't set dtor.
9924 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9925 from breakpoint.
9926 <~syscall_catchpoint>: New.
9927 <base>: Remove.
9928 (dtor_catch_syscall): Change to ...
9929 (syscall_catchpoint::~syscall_catchpoint): ... this.
9930 (create_syscall_event_catchpoint): Remove reference to base
9931 field.
9932 (initialize_syscall_catchpoint_ops): Don't set dtor.
9933 * break-catch-throw.c (struct exception_catchpoint): Inherit
9934 from breakpoint.
9935 <~exception_catchpoint>: New.
9936 <base>: Remove.
9937 (dtor_exception_catchpoint): Change to ...
9938 (exception_catchpoint::~exception_catchpoint): ... this.
9939 (handle_gnu_v3_exceptions): Remove reference to base field.
9940 (initialize_throw_catchpoint_ops): Don't set dtor.
9941 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9942 field.
9943 * remote.c (remote_get_tracepoint_status): Likewise.
9944 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9945 * tracefile.c (tracefile_fetch_registers): Likewise.
9946 * tracepoint.c (actions_command): Likewise.
9947 (validate_actionline): Likewise.
9948 (tfind_1): Likewise.
9949 (get_traceframe_location): Likewise.
9950 (find_matching_tracepoint_location): Likewise.
9951 (parse_tracepoint_status): Likewise.
9952 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9953
3b0871f4
SM
99542017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9955
9956 * breakpoint.c (struct longjmp_breakpoint): New struct.
9957 (is_tracepoint_type): Change return type to bool.
9958 (is_longjmp_type): New function.
9959 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9960 (set_raw_breakpoint_without_location): Use
9961 new_breakpoint_from_type.
9962 (set_raw_breakpoint): Likewise.
9963
a5e364af
SM
99642017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9965
9966 * breakpoint.c (new_breakpoint_from_type): New function.
9967 (create_breakpoint_sal): Use new_breakpoint_from_type and
9968 unique_ptr.
9969 (create_breakpoint): Likewise.
9970
ae3b3f34
SM
99712017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9972
9973 * memattr.c (mem_info_command): Rename to ...
9974 (info_mem_command): ... this.
9975 (mem_enable_command): Rename to ...
9976 (enable_mem_command): ... this.
9977 (mem_disable_command): Rename to ...
9978 (disable_mem_command): ... this.
9979 (mem_delete_command): Rename to ...
9980 (delete_mem_command): ... this.
9981 (_initialize_mem): Adjust function names.
9982
13ace077
MM
99832017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9984
9985 * btrace.c (handle_pt_insn_events): New.
9986 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9987 STATUS. Split into this and ...
9988 (handle_pt_insn_event_flags): ... this.
9989
c56ccc05
MM
99902017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9991
9992 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9993 and struct pt_insn.resynced.
9994 * configure: Regenerated.
9995 * config.in: Regenerated.
9996
08c3f6d2
TW
99972017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9998
9999 * btrace.c (ftrace_find_call_by_number): New function.
10000 (ftrace_new_function): Store objects, not pointers.
10001 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10002 ftrace_new_gap, ftrace_update_function,
10003 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10004 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10005 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10006 btrace_ends_with_single_insn, btrace_call_get): Account for
10007 btrace_thread_info::functions now storing objects.
10008 * btrace.h (struct btrace_thread_info): Add constructor.
10009 (struct btrace_thread_info) <functions>: Make std::vector.
10010 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10011 Initialize with default values.
10012 * record-btrace.c (record_btrace_frame_sniffer): Account for
10013 btrace_thread_info::functions now storing objects.
10014
8ffd39f2
TW
100152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10016
10017 * btrace.c: Remove typedef bfun_s.
10018 (ftrace_new_gap): Directly add gaps to the list of gaps.
10019 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10020 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10021 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10022 instead of gdb VEC.
10023
4aeb0dfc
TW
100242017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10025
10026 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10027 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10028 with btrace_thread_info::next_segment and
10029 btrace_thread_info::prev_segment.
10030 * btrace.h: Remove struct btrace_func_link.
10031 (struct btrace_function): Replace pair of function segment pointers
10032 with pair of indices.
10033 * python/py-record-btrace.c (btpy_call_prev_sibling,
10034 btpy_call_next_sibling): Replace references to
10035 btrace_thread_info::segment with btrace_thread_info::next_segment and
10036 btrace_thread_info::prev_segment.
10037 * record-btrace.c (record_btrace_frame_this_id): Use
10038 btrace_find_call_by_number.
10039
eb8f2b9c
TW
100402017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10041
10042 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10043 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10044 btrace_insn_next, btrace_insn_prev): Remove references to
10045 btrace_thread_info::flow.
10046 * btrace.h (struct btrace_function): Remove FLOW.
10047
42bfe59e
TW
100482017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10049
10050 * btrace.c (ftrace_find_call_by_number): New function.
10051 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10052 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10053 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10054 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10055 index.
10056 * btrace.h (struct btrace_function): Turn UP into an index.
10057 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10058 as an index.
10059 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10060 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10061 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10062
b54b03bd
TW
100632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10064
10065 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10066 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10067 ftrace_update_function, ftrace_compute_global_level_offset,
10068 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10069 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10070 btrace_insn_end, btrace_is_empty): Remove references to
10071 btrace_thread_info::begin and btrace_thread_info::end.
10072 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10073 (struct btrace_thread_info) <functions>: Adjust comment.
10074 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10075 btrace_thread_info::begin.
10076
8286623c
TW
100772017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10078
10079 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10080 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10081 ftrace_update_function): Remove arguments that implicitly were always
10082 BTINFO->END.
10083 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10084 Don't pass BTINFO->END.
10085
a0f1b963
TW
100862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10087
10088 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10089 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10090 btrace_find_insn_by_number): Replace function segment pointer with
10091 index.
10092 (btrace_insn_cmp): Simplify.
10093 * btrace.h: (struct btrace_insn_iterator) Rename index to
10094 insn_index. Replace function segment pointer with index into function
10095 segment vector.
10096 * record-btrace.c (record_btrace_call_history): Replace function
10097 segment pointer use with index.
10098 (record_btrace_frame_sniffer): Retrieve function call segment through
10099 vector.
10100 (record_btrace_set_replay): Remove defunc't safety check.
10101
f158f208
TW
101022017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10103
10104 * btrace.c (btrace_ends_with_single_insn): New function.
10105 (btrace_call_get, btrace_call_number, btrace_call_begin,
10106 btrace_call_end, btrace_call_next, btrace_call_prev,
10107 btrace_find_call_by_number): Use index into call segment vector
10108 instead of pointer.
10109 (btrace_call_cmp): Simplify.
10110 * btrace.h (struct btrace_call_iterator): Replace function call segment
10111 pointer with index into vector.
10112 * record-btrace.c (record_btrace_call_history): Use index instead of
10113 pointer.
10114
521103fd
TW
101152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10116
10117 * btrace.c (btrace_insn_begin, btrace_insn_end,
10118 btrace_find_insn_by_number): Add btinfo to iterator.
10119 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10120
17b89b34
TW
101212017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10122
10123 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10124 and save pointers directly.
10125 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10126 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10127 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10128 changed signature of functions.
10129 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10130 (btrace_fetch): Remove code that adds btrace_function pointers to
10131 vector of btrace_functions.
10132 (btrace_clear): Simplify freeing vector of btrace_functions.
10133
2b51eddc
TW
101342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10135
10136 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10137 Replace VEC_* with std::vector functions.
10138 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10139 (struct btrace_thread_info)<functions>: Change type to std::vector.
10140
db6be0d5
SM
101412017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10142
10143 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10144 "Removed targets and native configurations" up. Merge duplicate
10145 "New commands" sub-sections. Add "New options" sub-sections.
10146
b057297a
AH
101472017-05-26 Alan Hayward <alan.hayward@arm.com>
10148
10149 * defs.h (copy_integer_to_size): New declaration.
10150 * findvar.c (copy_integer_to_size): New function.
10151 (do_cint_test): New selftest function.
10152 (copy_integer_to_size_test): Likewise.
10153 (_initialize_findvar): Likewise.
10154 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10155 (mips_fbsd_collect_reg): Use raw_collect_integer.
10156 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10157 (mips64_fill_gregset): Use raw_collect_integer
10158 (mips64_fill_fpregset): Use raw_supply_integer.
10159 * regcache.c (regcache::raw_supply_integer): New function.
10160 (regcache::raw_collect_integer): Likewise.
10161 * regcache.h: (regcache::raw_supply_integer): New declaration.
10162 (regcache::raw_collect_integer): Likewise.
10163
b77b02a5
YQ
101642017-05-24 Yao Qi <yao.qi@linaro.org>
10165
10166 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10167 (COMMON_OBS): Add gdbarch-selftests.o.
10168 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10169 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10170 * gdbarch-selftests.c: New file.
10171 * regcache.h (regcache) <~regcache>: Mark it virtual if
10172 GDB_SELF_TEST.
10173 <raw_write>: Likewise.
10174
e521e87e
YQ
101752017-05-24 Yao Qi <yao.qi@linaro.org>
10176
10177 * regcache.c (current_regcache): Change it to
10178 regcache::current_regcache.
10179 (regcache_observer_target_changed): Update.
10180 (regcache_thread_ptid_changed): Make it a regcache static
10181 method.
10182 (regcache_thread_ptid_changed): Update.
10183 (class regcache_access): New.
10184 (current_regcache_test): Update.
10185 (_initialize_regcache): Update.
10186 * regcache.h: Include forward_list.
10187 (regcache): Declare regcache_thread_ptid_changed and declare
10188 registers_changed_ptid as friend.
10189
d8e07dda
YQ
101902017-05-24 Yao Qi <yao.qi@linaro.org>
10191
10192 * i387-tdep.c (i387_register_to_value): Use register_size
10193 instead of TYPE_LENGTH.
10194 * m68k-tdep.c (m68k_register_to_value): Likewise.
10195
8c8f9122
YQ
101962017-05-24 Yao Qi <yao.qi@linaro.org>
10197
10198 * i387-tdep.c (i387_convert_register_p): Return false if type
10199 code isn't TYPE_CODE_FLT.
10200
68fce50f
YQ
102012017-05-24 Yao Qi <yao.qi@linaro.org>
10202
10203 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10204 length is 4.
10205 (alpha_register_to_value): Remove type length check.
10206 (alpha_value_to_register): Likewise.
10207
88954b49
YQ
102082017-05-24 Yao Qi <yao.qi@linaro.org>
10209
10210 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10211 TYPE_CODE_FLT.
10212
e3ec9b69
YQ
102132017-05-24 Yao Qi <yao.qi@linaro.org>
10214
10215 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10216 TYPE_CODE_FLT or not.
10217
cdd238da
YQ
102182017-05-24 Yao Qi <yao.qi@linaro.org>
10219
10220 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10221 * avr-tdep.c (avr_gdbarch_init): Likewise.
10222 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10223 * cris-tdep.c (cris_gdbarch_init): Likewise.
10224 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10225 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10226 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10227 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10228 * mep-tdep.c (mep_gdbarch_init): Likewise.
10229 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10230 * mips-tdep.c (mips_gdbarch_init): Likewise.
10231 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10232 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10233 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10234 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10235 * v850-tdep.c (v850_gdbarch_init): Likewise.
10236
7a3929c4
YQ
102372017-05-24 Yao Qi <yao.qi@linaro.org>
10238
10239 * selftest-arch.c (tests_with_arch): Call registers_changed
10240 and reinit_frame_cache.
10241 * selftest.c (run_self_tests): Likewise.
10242
f4985dba
YQ
102432017-05-24 Yao Qi <yao.qi@linaro.org>
10244
10245 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10246 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10247
ab20fa4a
YQ
102482017-05-24 Yao Qi <yao.qi@linaro.org>
10249
10250 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10251 set_gdbarch_print_insn.
10252
f532ab94
YQ
102532017-05-24 Yao Qi <yao.qi@linaro.org>
10254
10255 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10256 set_gdbarch_print_insn.
10257
39503f82
YQ
102582017-05-24 Yao Qi <yao.qi@linaro.org>
10259
10260 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10261 set_gdbarch_print_insn.
10262 * arc-tdep.c (arc_gdbarch_init): Likewise.
10263 * arch-utils.c: include dis-asm.h.
10264 (default_print_insn): New function.
10265 * arch-utils.h (default_print_insn): Declare.
10266 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10267 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10268 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10269 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10270 * frv-tdep.c (frv_gdbarch_init): Likewise.
10271 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10272 * gdbarch.sh (print_insn): Use default_print_insn.
10273 * gdbarch.c: Regenerated.
10274 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10275 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10276 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10277 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10278 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10279 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10280 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10281 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10282 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10283 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10284 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10285 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10286 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10287 * mt-tdep.c (mt_gdbarch_init): Likewise.
10288 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10289 * nios2-tdep.c (nios2_print_insn): Remove.
10290 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10291 * rx-tdep.c (rx_gdbarch_init): Likewise.
10292 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10293 * score-tdep.c (score_print_insn): Remove.
10294 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10295 * sh-tdep.c (sh_gdbarch_init): Likewise.
10296 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10297 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10298 * tic6x-tdep.c (tic6x_print_insn): Remove.
10299 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10300 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10301 * v850-tdep.c (v850_gdbarch_init): Likewise.
10302 * vax-tdep.c (vax_gdbarch_init): Likewise.
10303 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10304 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10305
f7241d4f
JB
103062017-05-23 John Baldwin <jhb@FreeBSD.org>
10307
10308 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10309 (MIPS_FP0_REGNUM): Remove.
10310 (MIPS_FSR_REGNUM): Remove.
10311 (mips_fbsd_supply_fpregs): Use mips_regnum.
10312 (mips_fbsd_supply_gregs): Likewise.
10313 (mips_fbsd_collect_fpregs): Likewise.
10314 (mips_fbsd_collect_gregs): Likewise.
10315
d489d81d
JB
103162017-05-23 John Baldwin <jhb@FreeBSD.org>
10317
10318 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10319 (getpfpregs_supplies): New function.
10320 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10321 getfpregs_supplies.
10322 (mips_fbsd_store_inferior_registers): Likewise.
10323
e11b3cdc
PA
103242017-05-22 Pedro Alves <palves@redhat.com>
10325
10326 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10327 maintainer.
10328
0f068fb5
AH
103292017-05-22 Alan Hayward <alan.hayward@arm.com>
10330
10331 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10332 (store_register): Likewise.
10333 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10334 (get_decimal_float_return_value): Likewise.
10335 (do_ppc_sysv_return_value): Likewise.
10336 (ppc64_sysv_abi_push_integer): Likewise.
10337 (ppc64_sysv_abi_push_freg): Likewise.
10338 (ppc64_sysv_abi_return_value_base): Likewise.
10339 (ppc64_sysv_abi_return_value): Likewise.
10340 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10341 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10342 * rs6000-nat.c: Likewise.
10343 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10344 (rs6000_value_to_register): Likewise.
10345 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10346
e6cf65f2
TT
103472017-05-21 Tom Tromey <tom@tromey.com>
10348
10349 PR rust/21466:
10350 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10351 arrays as "[T]", not "[T; ]".
10352
43cc5389
TT
103532017-05-19 Tom Tromey <tom@tromey.com>
10354
10355 PR rust/21484:
10356 * rust-lang.c (exp_descriptor_rust): New function.
10357 (rust_language_defn): Use it.
10358 * p-lang.c (pascal_language_defn): Update.
10359 * opencl-lang.c (opencl_language_defn): Update.
10360 * objc-lang.c (objc_language_defn): Update.
10361 * m2-lang.c (m2_language_defn): Update.
10362 * language.h (struct language_defn)
10363 <la_watch_location_expression>: New member.
10364 * language.c (unknown_language_defn, auto_language_defn)
10365 (local_language_defn): Update.
10366 * go-lang.c (go_language_defn): Update.
10367 * f-lang.c (f_language_defn): Update.
10368 * d-lang.c (d_language_defn): Update.
10369 * c-lang.h (c_watch_location_expression): Declare.
10370 * c-lang.c (c_watch_location_expression): New function.
10371 (c_language_defn, cplus_language_defn, asm_language_defn)
10372 (minimal_language_defn): Use it.
10373 * breakpoint.c (watch_command_1): Call
10374 la_watch_location_expression.
10375 * ada-lang.c (ada_language_defn): Update.
10376
7a6e7fcc
RO
103772017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10378
6e7e1744
RO
10379 PR tui/21482
10380 * gdb_curses.h (NOMACROS): Define.
10381 (NCURSES_NOMACROS): Define.
10382
103832017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10384
10385 PR tui/21482
7a6e7fcc
RO
10386 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10387 arg to char *.
10388 * tui/tui-wingeneral.c (box_win): Likewise.
10389 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10390 (tui_show_source_line): Likewise.
10391 (tui_show_exec_info_content): Likewise.
10392
1933fd8e
VM
103932017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10394
10395 * sparc-tdep.c (sparc_structure_return_p)
10396 (sparc_arg_on_registers_p): New functions.
10397 (sparc32_store_arguments): Use them.
10398 * sparc64-tdep.c (sparc64_16_byte_align_p)
10399 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10400 Handle TYPE_CODE_ARRAY.
10401
21873064
YQ
104022017-05-17 Yao Qi <yao.qi@linaro.org>
10403
10404 * cli/cli-decode.c (add_alias_cmd): New function.
10405 * command.h (add_alias_cmd): Declare.
10406 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10407 instead call add_alias_cmd.
10408
2b351b19
PA
104092017-05-17 Pedro Alves <palves@redhat.com>
10410
10411 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10412 (nat_makefile_frag): ... this. All references updated.
10413 * configure.ac: Likewise.
10414 * configure.nat: Likewise. Enhance comments.
10415 * configure: Regenerate.
10416
5f2ad7a3
RO
104172017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10418
10419 * procfs.c (procfs_create_inferior): Change prototype to match
10420 definition.
10421
adf3dde5
EZ
104222017-05-13 Eli Zaretskii <eliz@gnu.org>
10423
10424 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10425 C++ compiler warning.
10426
6830f270
TT
104272017-05-12 Tom Tromey <tom@tromey.com>
10428
10429 PR rust/21483:
10430 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10431 recurse, just call value_struct_elt directly.
10432
68f2f2e3
TT
104332017-05-12 Tom Tromey <tom@tromey.com>
10434
10435 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10436 OP_RUST_ARRAY>: Fix.
10437
256afbc2
TT
104382017-05-12 Tom Tromey <tom@tromey.com>
10439
10440 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10441
94bb8dfe
YQ
104422017-05-09 Yao Qi <yao.qi@linaro.org>
10443
10444 * regcache.c: Include <forward_list>.
10445 (struct regcache_list): Remove.
10446 (current_regcache): Update.
10447 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10448 (regcache_thread_ptid_changed): Likewise.
10449 (registers_changed_ptid): Likewise.
10450 (current_regcache_size): Likewise.
10451
8248946c
YQ
104522017-05-09 Yao Qi <yao.qi@linaro.org>
10453
10454 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10455 (current_regcache_size): New function.
10456 (current_regcache_test): New function.
10457 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10458
313c5961
AH
104592017-05-08 Alan Hayward <alan.hayward@arm.com>
10460
10461 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10462 (print_gp_register_row): Use get_frame_register_value.
10463
27bfc1d1
AH
104642017-05-08 Alan Hayward <alan.hayward@arm.com>
10465
10466 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10467 (mips_supply_fpregset): Likewise.
10468 (mips64_supply_gregset): Likewise.
10469
146e6c5c
AH
104702017-05-08 Alan Hayward <alan.hayward@arm.com>
10471
10472 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10473 regcache->raw_supply_zeroed.
10474
e50f25ec
SDJ
104752017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10476
10477 * configure.nat: Rearrange 'case' statements to match
10478 host before cpu.
10479
21ea5acd
SDJ
104802017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10481
10482 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10483 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10484 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10485 "@nat_extra_makefile_frag@".
10486 (Makefile): Remove dependency on "@frags@".
10487 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10488 (data-directory/Makefile): Likewise.
10489 * config/aarch64/linux.mh: Deleted; moved contents to
10490 "gdb/configure.nat".
10491 * config/alpha/alpha-linux.mh: Likewise.
10492 * config/alpha/nbsd.mh: Likewise.
10493 * config/arm/linux.mh: Likewise.
10494 * config/arm/nbsdelf.mh: Likewise.
10495 * config/i386/cygwin.mh: Likewise.
10496 * config/i386/cygwin64.mh: Likewise.
10497 * config/i386/darwin.mh: Likewise.
10498 * config/i386/fbsd.mh: Likewise.
10499 * config/i386/fbsd64.mh: Likewise.
10500 * config/i386/go32.mh: Likewise.
10501 * config/i386/i386gnu.mh: Likewise.
10502 * config/i386/i386sol2.mh: Likewise.
10503 * config/i386/linux.mh: Likewise.
10504 * config/i386/linux64.mh: Likewise.
10505 * config/i386/mingw.mh: Likewise.
10506 * config/i386/mingw64.mh: Likewise.
10507 * config/i386/nbsd64.mh: Likewise.
10508 * config/i386/nbsdelf.mh: Likewise.
10509 * config/i386/nto.mh: Likewise.
10510 * config/i386/obsd.mh: Likewise.
10511 * config/i386/obsd64.mh: Likewise.
10512 * config/i386/sol2-64.mh: Likewise.
10513 * config/ia64/linux.mh: Likewise.
10514 * config/m32r/linux.mh: Likewise.
10515 * config/m68k/linux.mh: Likewise.
10516 * config/m68k/nbsdelf.mh: Likewise.
10517 * config/m68k/obsd.mh: Likewise.
10518 * config/m88k/obsd.mh: Likewise.
10519 * config/mips/fbsd.mh: Likewise.
10520 * config/mips/linux.mh: Likewise.
10521 * config/mips/nbsd.mh: Likewise.
10522 * config/mips/obsd64.mh: Likewise.
10523 * config/pa/linux.mh: Likewise.
10524 * config/pa/nbsd.mh: Likewise.
10525 * config/pa/obsd.mh: Likewise.
10526 * config/powerpc/aix.mh: Likewise.
10527 * config/powerpc/fbsd.mh: Likewise.
10528 * config/powerpc/linux.mh: Likewise.
10529 * config/powerpc/nbsd.mh: Likewise.
10530 * config/powerpc/obsd.mh: Likewise.
10531 * config/powerpc/ppc64-linux.mh: Likewise.
10532 * config/powerpc/spu-linux.mh: Likewise.
10533 * config/s390/linux.mh: Likewise.
10534 * config/sh/nbsd.mh: Likewise.
10535 * config/sparc/fbsd.mh: Likewise.
10536 * config/sparc/linux.mh: Likewise.
10537 * config/sparc/linux64.mh: Likewise.
10538 * config/sparc/nbsd64.mh: Likewise.
10539 * config/sparc/nbsdelf.mh: Likewise.
10540 * config/sparc/obsd64.mh: Likewise.
10541 * config/sparc/sol2.mh: Likewise.
10542 * config/tilegx/linux.mh: Likewise.
10543 * config/vax/nbsdelf.mh: Likewise.
10544 * config/vax/obsd.mh: Likewise.
10545 * config/xtensa/linux.mh: Likewise.
10546 * config/i386/i386gnu.mn: New file, with excerpts from
10547 "config/i386/i386gnu.mh".
10548 * configure: Regenerate.
10549 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10550 *.mh files under "gdb/config".
10551 * configure.nat: New file, with contents from the
10552 "gdb/config/*/*.mh" files.
10553
7ed1acaf
TW
105542017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10555
10556 * btrace.c (btrace_clear): Free insn vector.
10557
e13cb306
PA
105582017-05-05 Pedro Alves <palves@redhat.com>
10559
10560 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10561 * configure: Regenerate.
10562
5ed8105e
PA
105632017-05-04 Pedro Alves <palves@redhat.com>
10564
10565 * Makefile.in (SFILES): Add progspace-and-thread.c.
10566 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10567 (COMMON_OBS): Add progspace-and-thread.o.
10568 * breakpoint.c: Include "progspace-and-thread.h".
10569 (update_inserted_breakpoint_locations)
10570 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10571 Use scoped_restore_current_pspace_and_thread.
10572 (create_std_terminate_master_breakpoint): Use
10573 scoped_restore_current_program_space.
10574 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10575 (print_breakpoint_location): Use
10576 scoped_restore_current_program_space.
10577 (bp_loc_is_permanent): Use
10578 scoped_restore_current_pspace_and_thread.
10579 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10580 (download_tracepoint_locations): Use
10581 scoped_restore_current_pspace_and_thread.
10582 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10583 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10584 (enum step_over_calls_kind): Moved from inferior.h.
10585 (class scoped_restore_current_thread): New class.
10586 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10587 declaration.
10588 (scoped_restore_current_thread): New class.
10589 * infcmd.c: Include "common/gdb_optional.h".
10590 (continue_1, proceed_after_attach): Use
10591 scoped_restore_current_thread.
10592 (notice_new_inferior): Use scoped_restore_current_thread.
10593 * inferior.c: Include "progspace-and-thread.h".
10594 (restore_inferior, save_current_inferior): Delete.
10595 (add_inferior_command, clone_inferior_command): Use
10596 scoped_restore_current_pspace_and_thread.
10597 * inferior.h (scoped_restore_current_inferior): New class.
10598 * infrun.c: Include "progspace-and-thread.h" and
10599 "common/gdb_optional.h".
10600 (follow_fork_inferior): Use
10601 scoped_restore_current_pspace_and_thread.
10602 (scoped_restore_exited_inferior): New class.
10603 (handle_vfork_child_exec_or_exit): Use
10604 scoped_restore_exited_inferior,
10605 scoped_restore_current_pspace_and_thread,
10606 scoped_restore_current_thread and scoped_restore.
10607 (fetch_inferior_event): Use scoped_restore_current_thread.
10608 * linespec.c (decode_line_full, decode_line_1): Use
10609 scoped_restore_current_program_space.
10610 * mi/mi-main.c: Include "progspace-and-thread.h".
10611 (exec_continue): Use scoped_restore_current_thread.
10612 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10613 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10614 * proc-service.c (ps_pglobal_lookup): Use
10615 scoped_restore_current_program_space.
10616 * progspace-and-thread.c: New file.
10617 * progspace-and-thread.h: New file.
10618 * progspace.c (release_program_space, clone_program_space): Use
10619 scoped_restore_current_program_space.
10620 (restore_program_space, save_current_program_space)
10621 (save_current_space_and_thread): Delete.
10622 (switch_to_program_space_and_thread): Moved to
10623 progspace-and-thread.c.
10624 * progspace.h (save_current_program_space)
10625 (save_current_space_and_thread): Delete declarations.
10626 (scoped_restore_current_program_space): New class.
10627 * remote.c (remote_btrace_maybe_reopen): Use
10628 scoped_restore_current_thread.
10629 * symtab.c: Include "progspace-and-thread.h".
10630 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10631 * thread.c (print_thread_info_1): Use
10632 scoped_restore_current_thread.
10633 (struct current_thread_cleanup): Delete.
10634 (do_restore_current_thread_cleanup)
10635 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10636 (scoped_restore_current_thread::~scoped_restore_current_thread):
10637 ... this new dtor.
10638 (make_cleanup_restore_current_thread): Rename/convert to ...
10639 (scoped_restore_current_thread::scoped_restore_current_thread):
10640 ... this new ctor.
10641 (thread_apply_all_command): Use scoped_restore_current_thread.
10642 (thread_apply_command): Use scoped_restore_current_thread.
10643 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10644 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10645
f6223dbb
PA
106462017-05-04 Pedro Alves <palves@redhat.com>
10647
10648 * thread.c (make_cleanup_restore_current_thread): Move
10649 find_thread_ptid call before the is_stopped call. Assert that the
10650 thread is found. Replace is_stopped call by checking the thread's
10651 state directly. Remove unnecessary NULL-thread check.
10652
3c3ae77e
PA
106532017-05-04 Pedro Alves <palves@redhat.com>
10654
10655 * corelow.c (thread_section_name): New class.
10656 (get_core_register_section, get_core_siginfo): Use it.
10657
45eba0ab
AA
106582017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10659
10660 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10661 (get_core_register_section): Remove xfree of NULL pointer.
10662
f81fdd35
AH
106632017-05-03 Alan Hayward <alan.hayward@arm.com>
10664
10665 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10666 * regcache.c (regcache::raw_supply_zeroed): New function.
10667 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10668
35837774
SM
106692017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10670
10671 * gdbarch.sh: Remove commented out definition of
10672 TARGET_CHAR_BIT.
10673 * gdbarch.h: Re-generate.
10674
c94fee56
SDJ
106752017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10676
10677 * configure: Regenerate.
10678
d17f7b36
SM
106792017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10680
10681 * solib-target.c (solib_target_relocate_section_addresses):
10682 Remove num_section_bases, num_bases, segment_bases variables.
10683
b560ebd6
SM
106842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10685
10686 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10687
f2f46dfc
SM
106882017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10689
10690 * solib-target.c: Include <vector>
10691 (struct lm_info_target) <~lm_info_target>: Remove.
10692 <segment_bases, section_bases>: Change type to
10693 std::vector<CORE_ADDR>.
10694 (library_list_start_segment, library_list_start_section,
10695 library_list_end_library,
10696 solib_target_relocate_section_addresses): Adjust.
10697
a0ff9e1a
SM
106982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10699
10700 * gdbarch.sh (software_single_step): Change return type to
10701 std::vector<CORE_ADDR>.
10702 * gdbarch.c, gdbarch.h: Re-generate.
10703 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10704 Adjust.
10705 (arm_deal_with_atomic_sequence_raw): Adjust.
10706 (thumb_get_next_pcs_raw): Adjust.
10707 (arm_get_next_pcs_raw): Adjust.
10708 (arm_get_next_pcs): Adjust.
10709 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10710 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10711 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10712 (alpha_software_single_step): Adjust.
10713 * alpha-tdep.h (alpha_software_single_step): Adjust.
10714 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10715 * arm-tdep.c (arm_software_single_step): Adjust.
10716 (arm_breakpoint_kind_from_current_state): Adjust.
10717 * arm-tdep.h (arm_software_single_step): Adjust.
10718 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10719 * cris-tdep.c (cris_software_single_step): Adjust.
10720 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10721 (micromips_deal_with_atomic_sequence): Adjust.
10722 (deal_with_atomic_sequence): Adjust.
10723 (mips_software_single_step): Adjust.
10724 * mips-tdep.h (mips_software_single_step): Adjust.
10725 * moxie-tdep.c (moxie_software_single_step): Adjust.
10726 * nios2-tdep.c (nios2_software_single_step): Adjust.
10727 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10728 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10729 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10730 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10731 * sparc-tdep.c (sparc_software_single_step): Adjust.
10732 * spu-tdep.c (spu_software_single_step): Adjust.
10733 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10734
ea480a30
SM
107352017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10736
10737 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10738 * gdbarch.h: Re-generate.
10739
d050f7d7
TW
107402017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10741
10742 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10743 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10744 * python/py-instruction.c, python/py-instruction.h: New file.
10745 * python/py-record.c: Add py-instruction.h include.
10746 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10747 gdb.RecordInstruction.
10748 * python/python-internal.h: Add gdbpy_initialize_instruction
10749 declaration.
10750 * python/python.c (do_start_initialization): Add
10751 gdbpy_initialize_instruction.
10752
14f819c8
TW
107532017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10754
10755 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10756 Remove.
10757 (btrace_func_from_recpy_func): New function.
10758 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10759 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10760 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10761 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10762 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10763 Also, use new helper functions.
10764 (btpy_list_item): Use new helper functions.
10765 (recpy_bt_function_call_history): Use new type name.
10766 (btpy_call_getset): Remove.
10767 (gdbpy_initialize_btrace): Remove code to initialize
10768 gdb.BtraceFunctionCall.
10769 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10770 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10771 recpy_bt_func_prev, recpy_bt_func_next): New export.
10772 * python/py-record.c (recpy_func_type): New static object.
10773 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10774 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10775 recpy_func_next): New function.
10776 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10777 (recpy_func_getset): New static object.
10778 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10779 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10780
0ed5da75
TW
107812017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10782
10783 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10784 (btpy_object, btpy_insn_type, btpy_new): Remove.
10785 (btpy_list_object): Use gdb.RecordInstruction type instead of
10786 gdb.BtraceInstruction type.
10787 (btrace_insn_from_recpy_insn): New function.
10788 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10789 btpy_new.
10790 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10791 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10792 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10793 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10794 instead of btpy_object.
10795 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10796 btpy_insn_data, btpy_insn_decode): Rename to ...
10797 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10798 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10799 recpy_bt_insn_decode): This. Also, use new helper functions.
10800 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10801 recpy_insn_type.
10802 (btpy_insn_getset): Remove.
10803 (gdbpy_initialize_btrace): Remove code to initialize
10804 gdb.BtraceInstruction. Use recpy_element_object.
10805 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10806 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10807 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10808 * python/py-record.c (recpy_insn_type): New static object.
10809 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10810 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10811 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10812 New function.
10813 (recpy_insn_getset): New static object.
10814 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10815 * python/py-record.h (recpy_element_object): New typedef.
10816 (recpy_insn_type, recpy_insn_new): New export.
10817
913aeadd
TW
108182017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10819
10820 * py-record-btrace.c (btpy_insn_new): Removed.
10821 (btpy_insn_or_gap_new): New function.
10822 (btpy_insn_error): Removed.
10823 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10824 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10825 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10826 btpy_insn_or_gap_new instead of btpy_insn_new.
10827 (btpy_insn_getset): Remove btpy_insn_error.
10828 * py-record.c (recpy_gap_type): New static object.
10829 (recpy_gap_object): New typedef.
10830 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10831 recpy_gap_reason_string): New function.
10832 (recpy_gap_getset): New static object.
10833 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10834 * py-record.h (recpy_gap_new): New export.
10835
a3be24ad
TW
108362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10837
10838 * python/py-record.c (recpy_ptid): Remove.
10839 (recpy_record_getset): Remove recpy_ptid.
10840
ae20e79a
TW
108412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10842
10843 * btrace.c (btrace_fetch): Set inferior_ptid.
10844 * python/py-record-btrace.c: Add "py-record.h" include.
10845 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10846 recpy_bt_end, recpy_bt_instruction_history,
10847 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10848 in gdb.Record object instead of current ptid.
10849 * python/py-record.c: Include new "py-record.h" file.
10850 (recpy_record_object): Moved to py-record.h.
10851 * python/py-record.h: New file.
10852
8d0050ea
TW
108532017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10854
10855 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10856 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10857 indentation.
10858
3f380b50
JB
108592017-05-01 Joel Brobecker <brobecker@adacore.com>
10860
10861 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10862 the past maintainers section.
10863
07495424
YQ
108642017-04-28 Yao Qi <yao.qi@linaro.org>
10865
10866 * infcmd.c (get_return_value): Use regcache ctor, and remove
10867 cleanup.
10868
deb1fa3e
YQ
108692017-04-28 Yao Qi <yao.qi@linaro.org>
10870 Pedro Alves <palves@redhat.com>
10871
10872 * regcache.c (regcache::regcache): New tag dispatch ctor.
10873 (do_cooked_read): Moved above.
10874 (regcache_dup): Use the tag dispatch ctor..
10875 * regcache.h (regcache): Declare ctor, delete copy ctor and
10876 assignment operator, remove friend regcache_dup.
10877
b421c83c
YQ
108782017-04-28 Yao Qi <yao.qi@linaro.org>
10879
10880 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10881 call method save instead of regcache_cpy.
10882 * regcache.h (struct regcache): Make regcache_dup a friend.
10883
ef79d9a3
YQ
108842017-04-28 Yao Qi <yao.qi@linaro.org>
10885
10886 * regcache.c (struct regcache): Move to regcache.h
10887 (regcache::arch): New method.
10888 (regcache_get_ptid): Update.
10889 (get_regcache_arch): Call arch method.
10890 (get_regcache_aspace): Call method aspace.
10891 (register_buffer): Change it to method.
10892 (regcache_save): Change it to regcache::save.
10893 (regcache_restore): Likewise.
10894 (regcache_cpy_no_passthrough): Remove the declaration.
10895 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10896 (regcache_cpy_no_passthrough): Change it to method
10897 cpy_no_passthrough.
10898 (regcache_register_status): Change it to method
10899 get_register_status.
10900 (regcache_invalidate): Change it to method invalidate.
10901 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10902 (regcache_raw_update): Change it to method raw_update.
10903 (regcache_raw_read): Likewise.
10904 (regcache_raw_read_signed): Likewise.
10905 (regcache_raw_read_unsigned): Likewise.
10906 (regcache_raw_write_signed): Likewise.
10907 (regcache_raw_write_unsigned): Likewise.
10908 (regcache_cooked_read): Likewise.
10909 (regcache_cooked_read_value): Likewise.
10910 (regcache_cooked_read_signed): Likewise.
10911 (regcache_cooked_read_unsigned): Likewise.
10912 (regcache_cooked_write_signed): Likewise.
10913 (regcache_cooked_write_unsigned): Likewise.
10914 (regcache_raw_set_cached_value): Likewise.
10915 (regcache_raw_write): Likewise.
10916 (regcache_cooked_write): Likewise.
10917 (regcache_xfer_part): Likewise.
10918 (regcache_raw_read_part): Likewise.
10919 (regcache_raw_write_part): Likewise.
10920 (regcache_cooked_read_part): Likewise.
10921 (regcache_cooked_write_part): Likewise.
10922 (regcache_raw_supply): Likewise.
10923 (regcache_raw_collect): Likewise.
10924 (regcache_transfer_regset): Likewise.
10925 (regcache_supply_regset): Likewise.
10926 (regcache_collect_regset): Likewise.
10927 (regcache_debug_print_register): Likewise.
10928 (enum regcache_dump_what): Move it to regcache.h.
10929 (regcache_dump): Change it to method dump.
10930 * regcache.h (enum regcache_dump_what): New.
10931 (class regcache): New.
10932 * target.c (target_fetch_registers): Call method
10933 debug_print_register.
10934 (target_store_registers): Likewise.
10935
f8fdb78e
SM
109362017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10937
10938 * windows-nat.c (struct lm_info_windows): Initialize field.
10939 (windows_make_so): Allocate lm_info_windows with new.
10940 (windows_free_so): Free lm_info_windows with delete.
10941
9ccbfd7b
SM
109422017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10943
10944 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10945 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10946 cleanup.
10947 (darwin_free_so): Free lm_info_darwin with delete.
10948
76e75227
SM
109492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10950
10951 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10952 <l_addr_p>: Change type to bool.
10953 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10954 (svr4_free_so): Free lm_info_svr4 with delete.
10955 (svr4_copy_library_list): Replace memcpy with call to copy
10956 constructor.
10957 (library_list_start_library, svr4_default_sos): Allocate
10958 lm_info_svr4 with new.
10959
51046d9e
SM
109602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10961
10962 * solib-target.c (struct lm_info_target): Add destructor,
10963 initialize fields.
10964 <name>: Change type to std::string.
10965 (library_list_start_library): Allocate lm_info_target with new.
10966 (solib_target_free_library_list): Free lm_info_target with
10967 delete.
10968 (solib_target_current_sos): Adapt to std::string.
10969 (solib_target_free_so): Free lm_info_target with delete.
10970
4023ae76
SM
109712017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10972
10973 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10974 fields.
10975 (frv_current_sos): Allocate lm_info_frv with new.
10976 (frv_relocate_main_executable): Free lm_info_frv with delete,
10977 allocate with new.
10978 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10979
af43057b
SM
109802017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10981
10982 * solib-frv.c (struct lm_info_frv): Fix indentation.
10983
b0911207
SM
109842017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10985
10986 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10987 map field.
10988 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10989 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10990 and allocate with new.
10991 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10992
6c401f72
SM
109932017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10994
10995 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10996 <filename, member_name>: Change type to std::string.
10997 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10998 (library_list_start_library): Allocate lm_info_aix with new.
10999 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11000 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11001 with copy constructor.
11002
d0e449a1
SM
110032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11004
11005 * solist.h (struct lm_info): Remove.
11006 (struct lm_info_base): New class.
11007 (struct so_list) <lm_info>: Change type to lm_info_base *.
11008 * nto-tdep.c (struct lm_info): Remove.
11009 (lm_addr): Adjust.
11010 * solib-aix.c (struct lm_info): Rename to ...
11011 (struct lm_info_aix): ... this. Extend lm_info_base.
11012 (lm_info_p): Rename to ...
11013 (lm_info_aix_p): ... this, and adjust.
11014 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11015 solib_aix_parse_libraries, library_list_start_library,
11016 solib_aix_free_library_list, solib_aix_parse_libraries,
11017 solib_aix_get_library_list,
11018 solib_aix_relocate_section_addresses, solib_aix_free_so,
11019 solib_aix_get_section_offsets,
11020 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11021 Adjust.
11022 (struct solib_aix_inferior_data) <library_list>: Adjust.
11023 * solib-darwin.c (struct lm_info): Rename to ...
11024 (struct lm_info_darwin): ... this. Extend lm_info_base.
11025 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11026 * solib-dsbt.c (struct lm_info): Rename to ...
11027 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11028 (struct dsbt_info) <main_executable_lm_info): Adjust.
11029 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11030 dsbt_relocate_section_addresses): Adjust.
11031 * solib-frv.c (struct lm_info): Rename to ...
11032 (struct lm_info_frv): ... this. Extend lm_info_base.
11033 (main_executable_lm_info): Adjust.
11034 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11035 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11036 find_canonical_descriptor_in_load_object,
11037 frv_fdpic_find_canonical_descriptor): Adjust.
11038 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11039 to lm_info_svr4.
11040 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11041 svr4_clear_so, svr4_copy_library_list,
11042 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11043 svr4_current_sos, svr4_fetch_objfile_link_map,
11044 solist_update_incremental): Adjust.
11045 * solib-svr4.h (struct lm_info_svr4): Move here from
11046 solib-svr4.c.
11047 * solib-target.c (struct lm_info): Rename to ...
11048 (struct lm_info_target): ... this. Extend lm_info_base.
11049 (lm_info_p): Rename to ...
11050 (lm_info_target_p): ... this.
11051 (solib_target_parse_libraries, library_list_start_segment,
11052 library_list_start_section, library_list_start_library,
11053 library_list_end_library, solib_target_free_library_list,
11054 solib_target_current_sos, solib_target_free_so,
11055 solib_target_relocate_section_addresses): Adjust.
11056 * windows-nat.c (struct lm_info): Rename to ...
11057 (struct lm_info_windows): ... this. Extend lm_info_base.
11058 (windows_make_so, handle_load_dll, handle_unload_dll,
11059 windows_xfer_shared_libraries): Adjust.
11060
434a4023
SM
110612017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11062
11063 * solib-darwin.c (struct darwin_so_list): Remove.
11064 (darwin_current_sos): Allocate an so_list object instead of a
11065 darwin_so_list, separately allocate an lm_info object.
11066 (darwin_free_so): Free lm_info.
11067
428544e8
JB
110682017-04-28 John Baldwin <jhb@FreeBSD.org>
11069
11070 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11071 with fprintf_filtered.
11072
4621115f
YQ
110732017-04-28 Yao Qi <yao.qi@linaro.org>
11074
11075 * regcache.c (regcache::regcache): New function.
11076 (regcache::~regcache): New function.
11077 (regcache_xmalloc_1): Remove.
11078 (regcache_xmalloc): Call new regcache.
11079 (regcache_xfree): Call delete regcache.
11080 (get_thread_arch_aspace_regcache): Call new regcache.
11081
339053c2
YQ
110822017-04-28 Yao Qi <yao.qi@linaro.org>
11083
11084 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11085 lwp instead of ptid_get_lwp.
11086
7974a605
YQ
110872017-04-28 Yao Qi <yao.qi@linaro.org>
11088
11089 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11090 lwp_info instead of getting from inferior_ptid.
11091
e15c3eb4
KS
110922017-04-27 Keith Seitz <keiths@redhat.com>
11093
11094 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11095 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11096 (CV_CONVERSION_BADNESS): Define.
11097 (rank_one_type): Remove overly restrictive rvalue reference
11098 rank checks.
11099 Add cv-qualifier checks and subranks for type equality.
11100 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11101 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11102 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11103
72bc1d24
SM
111042017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11105
11106 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11107 count when creating the object.
11108
55bcecda
UW
111092017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11110 Ulrich Weigand <uweigand@de.ibm.com>
11111
11112 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11113 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11114 is used in AIX.
11115 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11116 (process_xcoff_symbol): Likewise.
11117 (scan_xcoff_symtab): Likewise.
11118
5c99fcf8
AH
111192017-04-26 Alan Hayward <alan.hayward@arm.com>
11120
11121 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11122 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11123 (ia64_access_reg): Use get_frame_register_unsigned.
11124 (ia64_access_rse_reg): Likewise.
11125 (ia64_libunwind_frame_prev_register): Likewise.
11126
b41c5a85
JW
111272017-04-26 Jiong Wang <jiong.wang@arm.com>
11128
11129 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11130 * gdbarch.c: Regenerated.
11131 * gdbarch.h: Regenerated.
11132 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11133 visibility external.
11134 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11135 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11136 (enum cfa_how_kind): Move to ...
11137 (struct dwarf2_frame_state_reg_info): Likewise.
11138 (struct dwarf2_frame_state): Likewise.
11139 * dwarf2-frame.h: ... here.
11140 (dwarf2_frame_state_alloc_regs): New declaration.
11141 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11142 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11143
c185f580
AH
111442017-04-26 Alan Hayward <alan.hayward@arm.com>
11145
11146 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11147 regcache_raw_read_unsigned.
11148 (xtensa_pseudo_register_write): Likewise.
11149
19c45594
AH
111502017-04-26 Alan Hayward <alan.hayward@arm.com>
11151
11152 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11153 (nds32_pseudo_register_write): Likewise.
11154
4658f12e
YQ
111552017-04-25 Yao Qi <yao.qi@linaro.org>
11156
11157 * regcache.c (struct regcache) <readonly_p>: Change its type
11158 to bool.
11159 (regcache_xmalloc_1): Update parameter type and callers update.
11160
d581dda8
YQ
111612017-04-25 Yao Qi <yao.qi@linaro.org>
11162
11163 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11164 set_gdbarch_wchar_bit.
11165 * arm-tdep.c (arm_gdbarch_init): Likewise.
11166
debed3db
PA
111672017-04-25 Pedro Alves <palves@redhat.com>
11168
11169 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11170 (BothAreRelocatable, memcopy, memmove): Don't define.
11171 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11172 macros.
11173
b0b92aeb
PA
111742017-04-25 Pedro Alves <palves@redhat.com>
11175
11176 * common/common-defs.h: Include "common/poison.h".
11177 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11178 and adjust.
11179 * common/poison.h: New file.
11180 * common/traits.h: Include <type_traits>.
11181 (Not, Or, Requires): New, moved from common/function-view.h.
11182
16c4d54a
PA
111832017-04-25 Pedro Alves <palves@redhat.com>
11184
11185 * breakpoint.h (struct breakpoint): In-class initialize all
11186 fields. Make boolean fields "bool".
11187 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11188 memset call and initializations no longer necessary.
11189
b5c36682
PA
111902017-04-25 Pedro Alves <palves@redhat.com>
11191
11192 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11193 reference.
11194 (pt_btrace_insn): New function.
11195 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11196
5625a286
PA
111972017-04-25 Pedro Alves <palves@redhat.com>
11198
11199 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11200 "base" field and inherit from "bp_location" instead. Add
11201 non-default ctor.
11202 (allocate_location_exception): Use new non-default ctor.
11203 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11204 (init_bp_location): Convert to ...
11205 (bp_location::bp_location): ... this new ctor, and remove memset
11206 call.
11207 (base_breakpoint_allocate_location): Use the new non-default ctor.
11208 * breakpoint.h (bp_location): Now a class. Declare default and
11209 non-default ctors. In-class initialize all members.
11210 (init_bp_location): Remove declaration.
11211
23bcc18f
PA
112122017-04-25 Pedro Alves <palves@redhat.com>
11213
11214 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11215 assignment operator.
11216
e1ba3053
YQ
112172017-04-24 Yao Qi <yao.qi@linaro.org>
11218
11219 * doublest.c (convert_doublest_to_floatformat): Call
11220 floatformat_totalsize_bytes.
11221
10f489e5
TT
112222017-04-22 Tom Tromey <tom@tromey.com>
11223
11224 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11225 ui_out_emit_list.
11226 * stack.c (print_frame): Use ui_out_emit_list.
11227 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11228 ui_out_emit_list.
11229 * mi/mi-main.c (print_one_inferior)
11230 (mi_cmd_data_list_register_names)
11231 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11232 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11233 ui_out_emit_list.
11234 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11235 (mi_output_solib_attribs): Use ui_out_emit_list,
11236 ui_out_emit_tuple.
11237 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11238 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11239 (mi_cmd_stack_list_args, list_args_or_locals): Use
11240 ui_out_emit_list.
11241 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11242 * breakpoint.c (print_solib_event, output_thread_groups): Use
11243 ui_out_emit_list.
11244
0092b74d
TT
112452017-04-22 Tom Tromey <tom@tromey.com>
11246
11247 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11248 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11249 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11250
a14a62dd
TT
112512017-04-22 Tom Tromey <tom@tromey.com>
11252
11253 * tracepoint.c (tvariables_info_1)
11254 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11255
46b9c129
TT
112562017-04-22 Tom Tromey <tom@tromey.com>
11257
11258 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11259 annotate_arg_emitter.
11260 * breakpoint.c (print_mention_watchpoint)
11261 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11262 * annotate.h (struct annotate_arg_emitter): New.
11263
2e783024
TT
112642017-04-22 Tom Tromey <tom@tromey.com>
11265
11266 * record-btrace.c (record_btrace_insn_history)
11267 (record_btrace_insn_history_range, record_btrace_call_history)
11268 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11269 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11270 ui_out_emit_tuple.
11271 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11272 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11273 * skip.c (skip_info): Use ui_out_emit_tuple.
11274 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11275 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11276 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11277 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11278 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11279 ui_out_emit_tuple.
11280 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11281 (output_register, mi_cmd_data_read_memory)
11282 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11283 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11284 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11285 Use ui_out_emit_tuple.
11286 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11287 ui_out_emit_tuple.
11288 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11289 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11290 * linux-thread-db.c (info_auto_load_libthread_db): Use
11291 ui_out_emit_tuple.
11292 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11293 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11294 * disasm.c (do_mixed_source_and_assembly_deprecated)
11295 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11296 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11297 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11298 * breakpoint.c (print_one_breakpoint_location)
11299 (print_one_breakpoint): Use ui_out_emit_tuple.
11300 * auto-load.c (print_script, info_auto_load_cmd): Use
11301 ui_out_emit_tuple.
11302 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11303
9be21bb4
SM
113042017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11305
11306 * thread.c (print_thread_info_1): Remove dead code.
11307
0d4c07af
JK
113082017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11309
11310 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11311 GDB_SELF_TEST.
11312 * arm-tdep.c (selftests::arm_record_test): Likewise.
11313
4daf993d
YQ
113142017-04-21 Yao Qi <yao.qi@linaro.org>
11315
11316 * regcache.c (regcache_restore): Remove argument 2. Replace
11317 argument 3 with regcache. Get register status from
11318 src->register_status and get register contents from
11319 register_buffer (src, regnum).
11320 (regcache_cpy): Update.
11321
a6c21d4a
PA
113222017-04-19 Pedro Alves <palves@redhat.com>
11323
11324 * gdbthread.h (thread): Add missing closing parenthesis in
11325 comment.
11326
3a3fd0fd
PA
113272017-04-19 Pedro Alves <palves@redhat.com>
11328
11329 * common/refcounted-object.h: New file.
11330 * gdbthread.h: Include "common/refcounted-object.h".
11331 (thread_info): Inherit from refcounted_object and add comments.
11332 (thread_info::incref, thread_info::decref)
11333 (thread_info::m_refcount): Delete.
11334 (thread_info::deletable): Use the refcounted_object::refcount()
11335 method.
11336 * inferior.c (current_inferior_): Add comment.
11337 (set_current_inferior): Increment/decrement refcounts.
11338 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11339 not-deletable instead of comparing with the current inferior.
11340 (initialize_inferiors): Increment the initial inferior's refcount.
11341 * inferior.h (struct inferior): Forward declare.
11342 Include "common/refcounted-object.h".
11343 (current_inferior, set_current_inferior): Move declaration to
11344 before struct inferior's definition, and fix comment.
11345 (inferior): Inherit from refcounted_object. Add comments.
11346 * thread.c (switch_to_thread_no_regs): Reference the thread's
11347 inferior pointer directly instead of doing a ptid lookup.
11348 (switch_to_no_thread): New function.
11349 (switch_to_thread(thread_info *)): New function, factored out
11350 from ...
11351 (switch_to_thread(ptid_t)): ... this.
11352 (restore_current_thread): Delete.
11353 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11354 fields, and add 'inf' field.
11355 (do_restore_current_thread_cleanup): Check whether old->inf is
11356 alive instead of looking up an inferior by ptid. Use
11357 switch_to_thread and switch_to_no_thread.
11358 (restore_current_thread_cleanup_dtor): Use old->inf directly
11359 instead of lookup up an inferior by id. Decref the inferior.
11360 Don't restore 'removable'.
11361 (make_cleanup_restore_current_thread): Same the inferior pointer
11362 in old, instead of the inferior number. Incref the inferior.
11363 Don't save/clear 'removable'.
11364
9bcb1f16
PA
113652017-04-19 Pedro Alves <palves@redhat.com>
11366
11367 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11368 unittests/scoped_restore-selftests.c.
11369 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11370 * common/scoped_restore.h (scoped_restore_base): Make "class".
11371 (scoped_restore_base::release): New public method.
11372 (scoped_restore_base::scoped_restore_base): New protected ctor.
11373 (scoped_restore_base::m_saved_var): New protected field.
11374 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11375 scoped_restore_base base class instead of m_saved_var directly.
11376 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11377 (scoped_restore_tmpl::scoped_restore_tmpl(const
11378 scoped_restore_tmpl<T>&)): Likewise.
11379 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11380 method.
11381 (scoped_restore_tmpl::saved_var): New method.
11382 (scoped_restore_tmpl::m_saved_var): Delete.
11383 * inferior.h (inferior::detaching): Now a bool.
11384 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11385 cleanup.
11386 * unittests/scoped_restore-selftests.c: New file.
11387
26fcd539
PA
113882017-04-19 Pedro Alves <palves@redhat.com>
11389
11390 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11391 Re-sort in alphabetic order.
11392
fdd243b0
PA
113932017-04-18 Pedro Alves <palves@redhat.com>
11394
11395 * xml-support.c (obstack_xml_printf): Delete.
11396 * xml-support.h (obstack_xml_printf): Delete.
11397
4895cde2
PA
113982017-04-18 Pedro Alves <palves@redhat.com>
11399
11400 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11401 vdebug, verror, body_text, start_element, end_element, name,
11402 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11403 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11404 is_xinclude>: Make private and add m_ prefix.
11405 (gdb_xml_parser::body_text): New method, based on ...
11406 (gdb_xml_body_text): ... this. Adjust.
11407 (gdb_xml_parser::vdebug): New method, based on ...
11408 (gdb_xml_debug): ... this. Adjust.
11409 (gdb_xml_parser::verror): New method, based on ...
11410 (gdb_xml_error): ... this. Adjust.
11411 (gdb_xml_parser::start_element): New method, based on ...
11412 (gdb_xml_start_element): ... this. Adjust.
11413 (gdb_xml_start_element_wrapper): Defer to
11414 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11415 (gdb_xml_parser::end_element): New method, based on ...
11416 (gdb_xml_end_element_wrapper): ... this. Adjust.
11417 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11418 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11419 (gdb_xml_parser::use_dtd): New method, based on ...
11420 (gdb_xml_use_dtd): ... this. Adjust.
11421 (gdb_xml_parser::parse): New method, based on ...
11422 (gdb_xml_parse): ... this. Adjust.
11423 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11424 (xinclude_start_include): Adjust to call the parser's name method.
11425 (xml_xinclude_default, xml_xinclude_start_doctype)
11426 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11427 method.
11428 (xml_process_xincludes): Adjust to call parser methods.
11429 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11430 declarations.
11431
bd8a901f
PA
114322017-04-18 Pedro Alves <palves@redhat.com>
11433
11434 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11435 gdb::optional<std::string>.
11436 * xml-support.c: Include <string>.
11437 (scope_level::scope_level(scope_level &&))
11438 (scope_level::~scope_level): Delete.
11439 (scope_level::body): Now a std::string.
11440 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11441 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11442 parameter.
11443 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11444 (xinclude_parsing_data::output): Now a std::string reference.
11445 (xinclude_start_include): Adjust.
11446 (xml_xinclude_default): Adjust.
11447 (xml_process_xincludes): Add 'output' parameter, and return bool.
11448 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11449 and return bool.
11450 * xml-tdesc.c: Include <unordered_map> and <string>.
11451 (tdesc_xml_cache): Delete.
11452 (tdesc_xml_cache_s): Delete.
11453 (xml_cache): Now an std::unordered_map.
11454 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11455 (target_fetch_description_xml): Change return type to
11456 gdb::optional<std::string>, and adjust.
11457 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11458 (target_fetch_description_xml): Change return type to
11459 gdb::optional<std::string>.
11460
d35d1958
PA
114612017-04-18 Pedro Alves <palves@redhat.com>
11462
11463 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11464 unittests/optional-selftests.c.
11465 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11466 * unittests/optional-selftests.c: New file.
11467 * unittests/optional/assignment/1.cc: New file.
11468 * unittests/optional/assignment/2.cc: New file.
11469 * unittests/optional/assignment/3.cc: New file.
11470 * unittests/optional/assignment/4.cc: New file.
11471 * unittests/optional/assignment/5.cc: New file.
11472 * unittests/optional/assignment/6.cc: New file.
11473 * unittests/optional/assignment/7.cc: New file.
11474 * unittests/optional/cons/copy.cc: New file.
11475 * unittests/optional/cons/default.cc: New file.
11476 * unittests/optional/cons/move.cc: New file.
11477 * unittests/optional/cons/value.cc: New file.
11478 * unittests/optional/in_place.cc: New file.
11479 * unittests/optional/observers/1.cc: New file.
11480 * unittests/optional/observers/2.cc: New file.
11481
22796e97
PA
114822017-04-18 Pedro Alves <palves@redhat.com>
11483
11484 * common/gdb_optional.h: Include common/traits.h.
11485 (in_place_t): New type.
11486 (in_place): New constexpr variable.
11487 (optional::optional): Remove member initialization of
11488 m_instantiated.
11489 (optional::optional(in_place_t...)): New constructor.
11490 (optional::~optional): Use reset.
11491 (optional::optional(const optional&)): New.
11492 (optional::optional(const optional&&)): New.
11493 (optional::optional(T &)): New.
11494 (optional::optional(T &&)): New.
11495 (operator::operator=(const optional &)): New.
11496 (operator::operator=(optional &&)): New.
11497 (operator::operator= (const T &))
11498 (operator::operator= (T &&))
11499 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11500 (operator::reset): New.
11501 (operator::m_instantiated):: Add in-class initializer.
11502 * common/traits.h: Include <type_traits>.
11503 (struct And): New types.
11504
a7fc9b61
PA
115052017-04-18 Pedro Alves <palves@redhat.com>
11506
11507 * xml-support.c: Include <vector>.
11508 (scope_level::scope_level(const gdb_xml_element *))
11509 (scope_level::scope_level(scope_level&&)): New.
11510 (scope_level::~scope_level): New.
11511 (scope_level_s): Delete.
11512 (gdb_xml_parser::scopes): Now a std::vector.
11513 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11514 Use std::vector.
11515 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11516 scope cleanup code.
11517 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11518 of the scopes member. Use std::vector::emplace_back.
11519
010151c9
PA
115202017-04-18 Pedro Alves <palves@redhat.com>
11521
11522 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11523 a bool.
11524 (gdb_xml_end_element): Change type of first parameter.
11525 (gdb_xml_cleanup): Rename to ...
11526 (gdb_xml_parser::~gdb_xml_parser): ... this.
11527 (gdb_xml_create_parser_and_cleanup): Delete with ...
11528 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11529 to this new ctor.
11530 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11531 using gdb_xml_create_parser_and_cleanup.
11532 (xinclude_parsing_data): Add ctor/dtor.
11533 (xml_xinclude_cleanup): Delete.
11534 (xml_process_xincludes): Create a local xinclude_parsing_data
11535 instead of heap-allocating one. Create a local gdb_xml_parser
11536 instead of heap-allocating one with
11537 gdb_xml_create_parser_and_cleanup.
11538
d56060f0
JB
115392017-04-18 John Baldwin <jhb@FreeBSD.org>
11540
11541 PR threads/20743
11542 * fbsd-nat.c (resume_one_thread_cb): Remove.
11543 (resume_all_threads_cb): Remove.
11544 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11545 iterate_over_threads.
11546
305d16a9
JB
115472017-04-17 Joel Brobecker <brobecker@adacore.com>
11548
11549 * NEWS: Create a new section for the next release branch.
11550 Rename the section of the current branch, now that it has
11551 been cut.
11552
8bb57231
JB
115532017-04-17 Joel Brobecker <brobecker@adacore.com>
11554
11555 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11556 * version.in: Bump version to 8.0.50.DATE-git.
11557
096c92dd
SDJ
115582017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11559
11560 PR gdb/21385
11561 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11562 independently of the host, and fix build breakage on Cygwin.
11563
0550c955
PA
115642017-04-13 Pedro Alves <palves@redhat.com>
11565
11566 * inferior.c (free_inferior): Convert to ...
11567 (inferior::~inferior): ... this dtor.
11568 (inferior::inferior): New ctor, factored out from ...
11569 (add_inferior_silent): ... here. Allocate the inferior with a new
11570 expression.
11571 (delete_inferior): Call delete instead of free_inferior.
11572 * inferior.h (gdb_environ, continuation): Forward declare.
11573 (inferior): Now a class. Add in-class initialization to all
11574 members. Make boolean fields bool, except 'detaching'.
11575 (inferior::inferior): New explicit ctor.
11576 (inferior::~inferior): New.
11577
e3d60dfc
PA
115782017-04-13 Pedro Alves <palves@redhat.com>
11579
11580 * inferior.c (init_inferior_list): Delete.
11581 * inferior.h (init_inferior_list): Delete.
11582
5fd69d0a
PA
115832017-04-13 Pedro Alves <palves@redhat.com>
11584
11585 PR threads/13217
11586 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11587 (top level): Call it twice, with different thread sets.
11588
c6609450
PA
115892017-04-13 Pedro Alves <palves@redhat.com>
11590
11591 * thread.c: Include <algorithm>.
11592 (thread_array_cleanup): Delete.
11593 (scoped_inc_dec_ref): New class.
11594 (live_threads_count): New function.
11595 (set_thread_refcount): Delete.
11596 (tp_array_compar_ascending): Now a bool.
11597 (tp_array_compar): Convert to a std::sort comparison function.
11598 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11599 and live_threads_count.
11600
2a00d7ce
PA
116012017-04-13 Pedro Alves <palves@redhat.com>
11602
11603 * infrun.c (follow_fork_inferior): Also switch the current
11604 inferior.
11605
441d7c93
PA
116062017-04-13 Pedro Alves <palves@redhat.com>
11607
11608 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11609 before calling create_internal_breakpoint.
11610
808480f6
PA
116112017-04-13 Pedro Alves <palves@redhat.com>
11612
11613 * fork-child.c (execv_argv): New class.
11614 (breakup_args): Refactored as ...
11615 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11616 Copy arguments to storage and replace separators with NULL
11617 terminators in place.
11618 (escape_bang_in_quoted_argument): Adjust to return bool.
11619 (execv_argv::execv_argv): New ctor.
11620 (execv_argv::init_for_shell): New method, factored out from
11621 fork_inferior. Don't strdup strings into the vector.
11622 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11623 Remove free_vector_argv call.
11624
ad3d022a
YQ
116252017-04-13 Yao Qi <yao.qi@linaro.org>
11626
11627 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11628 tdep->rx_psw_type.
11629
e6ddc3bf
YQ
116302017-04-13 Yao Qi <yao.qi@linaro.org>
11631
11632 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11633 * rx-tdep.c (rx_gdbarch_init): Likewise.
11634
bfb8cf90
PA
116352017-04-13 Pedro Alves <palves@redhat.com>
11636
11637 * breakpoint.h (struct breakpoint): Reindent.
11638
f5336ca5
PA
116392017-04-13 Pedro Alves <palves@redhat.com>
11640
11641 * breakpoint.c (bp_location): Rename to ...
11642 (bp_locations): ... this. All references updated.
11643 (bp_location_count): Rename to ...
11644 (bp_locations_count): ... this. All references updated.
11645 (bp_location_placed_address_before_address_max): Rename to ...
11646 (bp_locations_placed_address_before_address_max): ... this. All
11647 references updated.
11648 (bp_location_shadow_len_after_address_max): Rename to ...
11649 (bp_locations_shadow_len_after_address_max): ... this. All
11650 references updated.
11651 (bp_location_compare_addrs): Rename to ...
11652 (bp_locations_compare_addrs): ... this. All references updated.
11653 (bp_location_compare):Rename to ...
11654 (bp_locations_compare): ... this. All references updated.
11655 (bp_location_target_extensions_update): Rename to ...
11656 (bp_locations_target_extensions_update): ... this. All references
11657 updated.
11658
be628ab8
SDJ
116592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11660
11661 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11662 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11663 'sgtty.h'.
11664 * common/gdb_termios.h: New file, with parts of "terminal.h".
11665 * inflow.c: Include "gdb_termios.h".
11666 * ser-unix.c: Include "gdb_termios.h".
11667 * terminal.h: Move terminal-related defines to
11668 "common/gdb_termios.h".
11669
8e9e35b1
TT
116702017-04-12 Tom Tromey <tom@tromey.com>
11671
11672 * probe.c (parse_probes): Update.
11673 * location.h (delete_event_location): Don't declare.
11674 (event_location_deleter::operator()): Update.
11675 * location.c (event_location_deleter::operator()): Rename from
11676 delete_event_location.
11677 * linespec.h (linespec_result) <location>: Change type to
11678 event_location_up.
11679 * linespec.c (canonicalize_linespec, event_location_to_sals)
11680 (decode_objc): Update.
11681 (linespec_result): Don't call delete_event_location.
11682 * breakpoint.c (create_breakpoints_sal)
11683 (bkpt_probe_create_sals_from_location)
11684 (strace_marker_create_sals_from_location): Update.
11685
16e802b9
TT
116862017-04-12 Tom Tromey <tom@tromey.com>
11687
11688 * linespec.h (struct linespec_result): Add constructor and
11689 destructor.
11690 (init_linespec_result, destroy_linespec_result)
11691 (make_cleanup_destroy_linespec_result): Don't declare.
11692 * linespec.c (init_linespec_result): Remove.
11693 (linespec_result::~linespec_result): Rename from
11694 destroy_linespec_result. Update.
11695 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11696 Remove.
11697 * breakpoint.c (create_breakpoint, break_range_command)
11698 (decode_location_default): Update.
11699 * ax-gdb.c (agent_command_1): Update.
11700
d28cd78a
TT
117012017-04-12 Tom Tromey <tom@tromey.com>
11702
11703 * remote.c (remote_download_tracepoint): Update.
11704 * python/py-breakpoint.c (bppy_get_location): Update.
11705 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11706 (gdbscm_breakpoint_location): Update.
11707 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11708 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11709 Change type to event_location_up.
11710 * breakpoint.c (create_overlay_event_breakpoint)
11711 (create_longjmp_master_breakpoint)
11712 (create_std_terminate_master_breakpoint)
11713 (create_exception_master_breakpoint)
11714 (breakpoint_event_location_empty_p, print_breakpoint_location)
11715 (print_one_breakpoint_location, create_thread_event_breakpoint)
11716 (init_breakpoint_sal, create_breakpoint)
11717 (print_recreate_ranged_breakpoint, break_range_command)
11718 (init_ada_exception_breakpoint, say_where): Update.
11719 (base_breakpoint_dtor): Don't call delete_event_location.
11720 (bkpt_print_recreate, tracepoint_print_recreate)
11721 (dprintf_print_recreate, update_static_tracepoint)
11722 (breakpoint_re_set_default): Update.
11723
711799d5
TT
117242017-04-12 Tom Tromey <tom@tromey.com>
11725
11726 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11727 type of "to_do". Update.
11728 (compute_stack_depth): Use std::vector.
11729
52d214d3
TT
117302017-04-12 Tom Tromey <tom@tromey.com>
11731
11732 * printcmd.c (find_instruction_backward): Use std::vector.
11733
4c404b8b
TT
117342017-04-12 Tom Tromey <tom@tromey.com>
11735
11736 * symfile.c (objfilep): Remove typedef.
11737 (reread_symbols): Use a std::vector.
11738
156d9eab
TT
117392017-04-12 Tom Tromey <tom@tromey.com>
11740
11741 * mi/mi-main.c (exec_direction_forward): Remove.
11742 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11743 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11744 scoped_restore.
11745 * guile/guile.c (guile_repl_command, guile_command)
11746 (gdbscm_execute_gdb_command): Use scoped_restore.
11747 * go-exp.y (go_parse): Use scoped_restore.
11748 * d-exp.y (d_parse): Use scoped_restore.
11749 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11750 * c-exp.y (c_parse): Use scoped_restore.
11751
4d89769a
TT
117522017-04-12 Tom Tromey <tom@tromey.com>
11753
11754 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11755 (mi_parse): Update return type.
11756 (mi_parse_free): Remove.
11757 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11758 (mi_parse::~mi_parse): Rename from mi_parse_free.
11759 (mi_parse_cleanup): Remove.
11760 (mi_parse): Return a unique_ptr. Use new.
11761 * mi/mi-main.c (mi_execute_command): Update.
11762
4b217cc7
TT
117632017-04-12 Tom Tromey <tom@tromey.com>
11764
11765 * location.c (explicit_location_lex_one): Return a
11766 unique_xmalloc_ptr.
11767 (string_to_explicit_location): Update. Remove cleanups.
11768
59d3651b
TT
117692017-04-12 Tom Tromey <tom@tromey.com>
11770
11771 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11772 (compare_value_and_voffset): Change type. Update.
11773 (compute_vtable_size): Change type of "offset_vec".
11774 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11775 (gnuv3_get_typeid): Remove extraneous declaration.
11776
b24b0d6c
TT
117772017-04-12 Tom Tromey <tom@tromey.com>
11778
11779 * charset.h (wchar_iterator): Fix comment.
11780
80a3b8c5
TT
117812017-04-12 Tom Tromey <tom@tromey.com>
11782
11783 * charset.c (iconv_wrapper): New class.
11784 (cleanup_iconv): Remove.
11785 (convert_between_encodings): Use it.
11786
c83dd867
TT
117872017-04-12 Tom Tromey <tom@tromey.com>
11788
11789 * symfile.h (increment_reading_symtab): Update type.
11790 * symfile.c (decrement_reading_symtab): Remove.
11791 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11792 * psymtab.c (psymtab_to_symtab): Update.
11793 * dwarf2read.c (dw2_instantiate_symtab): Update.
11794
0e8621a0
TT
117952017-04-12 Tom Tromey <tom@tromey.com>
11796
11797 * jit.c (struct jit_reader): Declare separately. Add constructor
11798 and destructor. Change type of "handle".
11799 (loaded_jit_reader): Define separately.
11800 (jit_reader_load): Update. New "new".
11801 (jit_reader_unload_command): Use "delete".
11802 * gdb-dlfcn.h (struct dlclose_deleter): New.
11803 (gdb_dlhandle_up): New typedef.
11804 (gdb_dlopen, gdb_dlsym): Update types.
11805 (gdb_dlclose): Remove.
11806 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11807 (gdb_dlsym): Change type of "handle".
11808 (make_cleanup_dlclose): Remove.
11809 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11810 * compile/compile-c-support.c (load_libcc): Update.
11811
67d89901
TT
118122017-04-12 Tom Tromey <tom@tromey.com>
11813
11814 * symtab.h (find_pcs_for_symtab_line): Change return type.
11815 * symtab.c (find_pcs_for_symtab_line): Change return type.
11816 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11817 type of "vec". Update.
11818 (ltpy_get_pcs_for_line): Update.
11819 * linespec.c (decode_digits_ordinary): Update.
11820
93921405
TT
118212017-04-12 Tom Tromey <tom@tromey.com>
11822
11823 * tracepoint.c (actions_command): Update.
11824 * python/python.c (python_command, python_interactive_command):
11825 Update.
11826 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11827 * guile/guile.c (guile_command): Update.
11828 * defs.h (read_command_lines, read_command_lines_1): Return
11829 command_line_up.
11830 (command_lines_deleter): New struct.
11831 (command_line_up): New typedef.
11832 * compile/compile.c (compile_code_command)
11833 (compile_print_command): Update.
11834 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11835 command_line_up.
11836 (make_cleanup_free_command_lines): Remove.
11837 * cli/cli-script.c (get_command_line, read_command_lines_1)
11838 (copy_command_lines): Return command_line_up.
11839 (while_command, if_command, read_command_lines, define_command)
11840 (document_command): Update.
11841 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11842 Remove.
11843 * breakpoint.h (breakpoint_set_commands): Change type of
11844 "commands".
11845 * breakpoint.c (breakpoint_set_commands): Change type of
11846 "commands". Update.
11847 (do_map_commands_command, update_dprintf_command_list)
11848 (create_tracepoint_from_upload): Update.
11849
ffc2605c
TT
118502017-04-12 Tom Tromey <tom@tromey.com>
11851
11852 * tracepoint.c (scope_info): Update.
11853 * spu-tdep.c (spu_catch_start): Update.
11854 * python/python.c (gdbpy_decode_line): Update.
11855 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11856 * python/py-breakpoint.c (bppy_init): Update.
11857 * probe.c (parse_probes): Update.
11858 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11859 * location.h (event_location_deleter): New struct.
11860 (event_location_up): New typedef.
11861 (new_linespec_location, new_address_location, new_probe_location)
11862 (new_explicit_location, copy_event_location)
11863 (string_to_event_location, string_to_event_location_basic)
11864 (string_to_explicit_location): Update return type.
11865 (make_cleanup_delete_event_location): Remove.
11866 * location.c (new_linespec_location, new_address_location)
11867 (new_probe_location, new_explicit_location, copy_event_location):
11868 Return event_location_up.
11869 (delete_event_location_cleanup)
11870 (make_cleanup_delete_event_location): Remove.
11871 (string_to_explicit_location, string_to_event_location_basic)
11872 (string_to_event_location): Return event_location_up.
11873 * linespec.c (canonicalize_linespec, event_location_to_sals)
11874 (decode_line_with_current_source)
11875 (decode_line_with_last_displayed, decode_objc): Update.
11876 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11877 * completer.c (location_completer): Update.
11878 * cli/cli-cmds.c (edit_command, list_command): Update.
11879 * breakpoint.c (create_overlay_event_breakpoint)
11880 (create_longjmp_master_breakpoint)
11881 (create_std_terminate_master_breakpoint)
11882 (create_exception_master_breakpoint)
11883 (create_thread_event_breakpoint): Update.
11884 (init_breakpoint_sal): Update. Remove some dead code.
11885 (create_breakpoint_sal): Change type of "location". Update.
11886 (create_breakpoints_sal, create_breakpoint, break_command_1)
11887 (dprintf_command, break_range_command, until_break_command)
11888 (init_ada_exception_breakpoint)
11889 (strace_marker_create_sals_from_location)
11890 (update_static_tracepoint, trace_command, ftrace_command)
11891 (strace_command, create_tracepoint_from_upload): Update.
11892 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11893 * ax-gdb.c (agent_command_1): Update.
11894
8f10c932
PA
118952017-04-12 Pedro Alves <palves@redhat.com>
11896
11897 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11898 * configure.tgt: Handle i[34567]86-*-go32* and
11899 i[34567]86-*-msdosdjgpp*.
11900 * i386-tdep.c (i386_svr4_reg_to_regnum):
11901 Make extern.
11902 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11903 i386-go32-tdep.c.
11904 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11905 * i386-go32-tdep.c: New file.
11906 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11907 declarations.
11908
0a31ccfb
SM
119092017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11910
11911 * aix-thread.c (pd_status2str): Change return type to const char *.
11912
e9bb3fbb
PA
119132017-04-12 Pedro Alves <palves@redhat.com>
11914
11915 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11916 calls to set_gdbarch_gnu_triplet_regexp.
11917
53375380
PA
119182017-04-12 Pedro Alves <palves@redhat.com>
11919
11920 PR gdb/21323
11921 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11922 New enum value.
11923 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11924 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11925 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11926 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11927 * gdbarch.h, gdbarch.c: Regenerate.
11928 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11929 gdbarch_wchar_bit and gdbarch_wchar_signed.
11930 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11931 * arm-tdep.c (arm_gdbarch_init): Likewise.
11932 * avr-tdep.c (avr_gdbarch_init): Likewise.
11933 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11934 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11935 * i386-tdep.c (i386_go32_init_abi): Likewise.
11936 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11937 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11938 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11939 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11940 * sh-tdep.c (sh_gdbarch_init): Likewise.
11941 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11942 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11943 * windows-tdep.c (windows_init_abi): Likewise.
11944 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11945
53e710ac
PA
119462017-04-12 Pedro Alves <palves@redhat.com>
11947
11948 PR c++/21323
11949 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11950 cplus_primitive_type_char32_t>: New enum values.
11951 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11952 and cplus_primitive_type_char32_t.
11953 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11954 32, use the archtecture's built-in type for char16_t and char32_t,
11955 respectively. Otherwise, fallback to init_integer_type as before,
11956 but make the type unsigned, and issue a complaint.
11957 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11958
ab0538b8
AH
119592017-04-12 Alan Hayward <alan.hayward@arm.com>
11960
5e0e0422 11961 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
11962 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11963
5430098f
SDJ
119642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11965
11966 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11967 'const char *'.
11968
7c5ded6a
SDJ
119692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11970
11971 * common/common-utils.c (free_vector_argv): New function.
11972 * common/common-utils.h: Include <vector>.
11973 (free_vector_argv): New prototype.
11974 * darwin-nat.c (darwin_create_inferior): Rewrite function
11975 prototype in order to constify "exec_file" and accept a
11976 "std::string" for "allargs".
11977 * fork-child.c: Include <vector>.
11978 (breakup_args): Rewrite function, using C++.
11979 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11980 and accept "std::string" for "allargs". Update the code to
11981 calculate "argv" based on "allargs". Update calls to "exec_fun"
11982 and "execvp".
11983 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11984 order to constify "exec_file" and accept a "std::string" for
11985 "allargs".
11986 * go32-nat.c (go32_create_inferior): Likewise.
11987 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11988 * infcmd.c (run_command_1): Constify "exec_file". Use
11989 "std::string" for inferior arguments.
11990 * inferior.h (fork_inferior): Update prototype.
11991 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11992 prototype in order to constify "exec_file" and accept a
11993 "std::string" for "allargs".
11994 * nto-procfs.c (procfs_create_inferior): Likewise.
11995 * procfs.c (procfs_create_inferior): Likewise.
11996 * remote-sim.c (gdbsim_create_inferior): Likewise.
11997 * remote.c (extended_remote_run): Update code to accept
11998 "std::string" as argument.
11999 (extended_remote_create_inferior): Rewrite function prototype in
12000 order to constify "exec_file" and accept a "std::string" for
12001 "allargs".
12002 * rs6000-nat.c (super_create_inferior): Likewise.
12003 (rs6000_create_inferior): Likewise.
12004 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12005 * windows-nat.c (windows_create_inferior): Likewise.
12006
ae0eee42
PA
120072017-04-11 Pedro Alves <palves@redhat.com>
12008
12009 * thread.c: Fix whitespace throughout.
12010
a6acac06
PR
120112017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12012
12013 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12014
64403bd1
AH
120152017-04-11 Alan Hayward <alan.hayward@arm.com>
12016
12017 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12018
a5bef50f
SDJ
120192017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12020
12021 PR gdb/21364
12022 * osdata.c (info_osdata): Check if 'type' is an empty string
12023 instead of NULL.
12024
9295a5a9
PA
120252017-04-10 Pedro Alves <palves@redhat.com>
12026
12027 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12028 (ptid_to_global_thread_id, in_thread_list)
12029 (do_captured_list_thread_ids, set_resumed, set_running)
12030 (set_executing, set_stop_requested, finish_thread_state)
12031 (validate_registers_access, can_access_registers_ptid)
12032 (print_thread_info_1, switch_to_thread)
12033 (do_restore_current_thread_cleanup)
12034 (make_cleanup_restore_current_thread, thread_command)
12035 (thread_name_command): Use operator== instead of ptid_equal.
12036
996812e3
PA
120372017-04-10 Pedro Alves <palves@redhat.com>
12038
12039 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12040 (current_thread_cleanup_chain): Delete.
12041 (restore_current_thread_cleanup_dtor)
12042 (make_cleanup_restore_current_thread): Remove references to
12043 current_thread_cleanup_chain.
12044
845b344f
AH
120452017-04-10 Alan Hayward <alan.hayward@arm.com>
12046
12047 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12048 REG_UNKNOWN.
12049
803bdfe4
YQ
120502017-04-10 Yao Qi <yao.qi@linaro.org>
12051
12052 PR gdb/19942
12053 * gdbthread.h (thread_info::deletable): New method.
12054 (thread_info::incref): New method.
12055 (thread_info::decref): New method.
12056 (thread_info::refcount): Move it to private.
12057 * infrun.c (save_stop_context): Call inc_refcount.
12058 (release_stop_context_cleanup): Likewise.
12059 * thread.c (set_thread_exited): New function.
12060 (init_thread_list): Delete "tp" only it is deletable, otherwise
12061 call set_thread_exited.
12062 (delete_thread_1): Call set_thread_exited.
12063 (current_thread_cleanup) <inferior_pid>: Remove.
12064 <thread>: New field.
12065 (restore_current_thread_ptid_changed): Removed.
12066 (do_restore_current_thread_cleanup): Adjust.
12067 (restore_current_thread_cleanup_dtor): Don't call
12068 find_thread_ptid.
12069 (set_thread_refcount): Use dec_refcount.
12070 (make_cleanup_restore_current_thread): Adjust.
12071 (thread_apply_all_command): Call inc_refcount.
12072 (_initialize_thread): Don't call
12073 observer_attach_thread_ptid_changed.
12074
8c25b497
YQ
120752017-04-10 Yao Qi <yao.qi@linaro.org>
12076
12077 * thread.c (delete_thread_1): Hoist code on marking thread as
12078 exited.
12079
8473b447
SM
120802017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12081
12082 * windows-nat.c (windows_detach): Initialize ptid with
12083 minus_one_ptid.
12084
6670ec13
SM
120852017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12086
12087 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12088
ba2f91bb
AH
120892017-04-07 Alan Hayward <alan.hayward@arm.com>
12090
12091 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12092 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12093 (bfin_pseudo_register_write): Likewise
12094
436252de
SM
120952017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12096
12097 * common/ptid.h (struct ptid): Change to...
12098 (class ptid_t): ... this.
12099 <ptid_t>: New constructors.
12100 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12101 matches>: New methods.
12102 <make_null, make_minus_one>: New static methods.
12103 <pid>: Rename to...
12104 <m_pid>: ...this.
12105 <lwp>: Rename to...
12106 <m_lwp>: ...this.
12107 <tid>: Rename to...
12108 <m_tid>: ...this.
12109 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12110 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12111 as references, move comment to class ptid_t.
12112 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12113 ptid_t static methods.
12114 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12115 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12116 Take ptid arguments as references, implement using ptid_t methods.
12117 * unittests/ptid-selftests.c: New file.
12118 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12119 unittests/ptid-selftests.c.
12120 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12121
0dedf377
TP
121222017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12123
12124 * python/python.c (python_run_simple_file): Cast mode literal to
12125 non-const char pointer as expected by PyFile_FromString.
12126
4e9868d4
SM
121272017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12128
12129 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12130 minus_one_ptid and null_ptid.
12131
9bf2a700
PA
121322017-04-05 Pedro Alves <palves@redhat.com>
12133
12134 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12135 * configure: Regenerate.
12136
a121b7c1
PA
121372017-04-05 Pedro Alves <palves@redhat.com>
12138
12139 * ada-exp.y (yyerror): Constify.
12140 * ada-lang.c (bound_name, get_selections)
12141 (ada_variant_discrim_type)
12142 (ada_variant_discrim_name, ada_value_struct_elt)
12143 (ada_lookup_struct_elt_type, is_unchecked_variant)
12144 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12145 (catch_ada_exception_command_split)
12146 (catch_ada_assert_command_split, catch_assert_command)
12147 (ada_op_name): Constify.
12148 * ada-lang.h (ada_yyerror, get_selections)
12149 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12150 * arc-tdep.c (arc_print_frame_cache): Constify.
12151 * arm-tdep.c (arm_skip_stub): Constify.
12152 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12153 (gen_aggregate_elt_ref): Constify.
12154 * bcache.c (print_bcache_statistics): Constify.
12155 * bcache.h (print_bcache_statistics): Constify.
12156 * break-catch-throw.c (catch_exception_command_1):
12157 * breakpoint.c (struct ep_type_description::description):
12158 Constify.
12159 (add_solib_catchpoint): Constify.
12160 (catch_fork_command_1): Add cast.
12161 (add_catch_command): Constify.
12162 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12163 Constify.
12164 * bsd-uthread.c (bsd_uthread_state): Constify.
12165 * buildsym.c (patch_subfile_names): Constify.
12166 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12167 Constify.
12168 * c-exp.y (yyerror): Constify.
12169 (token::oper): Constify.
12170 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12171 * c-varobj.c (cplus_describe_child): Constify.
12172 * charset.c (find_charset_names): Add cast.
12173 (find_charset_names): Constify array and add const_cast.
12174 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12175 (edit_command): Constify.
12176 * cli/cli-decode.c (lookup_cmd): Constify.
12177 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12178 Constify.
12179 (struct dump_context): Constify.
12180 (add_dump_command, restore_command): Constify.
12181 * cli/cli-script.c (get_command_line): Constify.
12182 * cli/cli-script.h (get_command_line): Constify.
12183 * cli/cli-utils.c (check_for_argument): Constify.
12184 * cli/cli-utils.h (check_for_argument): Constify.
12185 * coff-pe-read.c (struct read_pe_section_data): Constify.
12186 * command.h (lookup_cmd): Constify.
12187 * common/print-utils.c (decimal2str): Constify.
12188 * completer.c (gdb_print_filename): Constify.
12189 * corefile.c (set_gnutarget): Constify.
12190 * cp-name-parser.y (yyerror): Constify.
12191 * cp-valprint.c (cp_print_class_member): Constify.
12192 * cris-tdep.c (cris_register_name, crisv32_register_name):
12193 Constify.
12194 * d-exp.y (yyerror): Constify.
12195 (struct token::oper): Constify.
12196 * d-lang.h (d_yyerror): Constify.
12197 * dbxread.c (struct header_file_location::name): Constify.
12198 (add_old_header_file, add_new_header_file, last_function_name)
12199 (dbx_next_symbol_text, add_bincl_to_list)
12200 (find_corresponding_bincl_psymtab, set_namestring)
12201 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12202 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12203 * defs.h (command_line_input, print_address_symbolic)
12204 (deprecated_readline_begin_hook): Constify.
12205 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12206 Constify.
12207 * event-top.c (handle_line_of_input): Constify and add cast.
12208 * exceptions.c (catch_errors): Constify.
12209 * exceptions.h (catch_errors): Constify.
12210 * expprint.c (print_subexp_standard, op_string, op_name)
12211 (op_name_standard, dump_raw_expression, dump_raw_expression):
12212 * expression.h (op_name, op_string, dump_raw_expression):
12213 Constify.
12214 * f-exp.y (yyerror): Constify.
12215 (struct token::oper): Constify.
12216 (struct f77_boolean_val::name): Constify.
12217 * f-lang.c (f_word_break_characters): Constify.
12218 * f-lang.h (f_yyerror): Constify.
12219 * fork-child.c (fork_inferior): Add cast.
12220 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12221 (new_variant): Constify.
12222 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12223 * gdbarch.c: Regenerate.
12224 * gdbcore.h (set_gnutarget): Constify.
12225 * go-exp.y (yyerror): Constify.
12226 (token::oper): Constify.
12227 * go-lang.h (go_yyerror): Constify.
12228 * go32-nat.c (go32_sysinfo): Constify.
12229 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12230 * guile/scm-cmd.c (cmdscm_function): Constify.
12231 * guile/scm-param.c (pascm_param_value): Constify.
12232 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12233 (h8300sx_register_name): Constify.
12234 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12235 Constify.
12236 * ia64-tdep.c (ia64_register_names): Constify.
12237 * infcmd.c (construct_inferior_arguments): Constify.
12238 (path_command, attach_post_wait): Constify.
12239 * language.c (show_range_command, show_case_command)
12240 (unk_lang_error): Constify.
12241 * language.h (language_defn::la_error)
12242 (language_defn::la_name_of_this): Constify.
12243 * linespec.c (decode_line_2): Constify.
12244 * linux-thread-db.c (thread_db_err_str): Constify.
12245 * lm32-tdep.c (lm32_register_name): Constify.
12246 * m2-exp.y (yyerror): Constify.
12247 * m2-lang.h (m2_yyerror): Constify.
12248 * m32r-tdep.c (m32r_register_names): Constify and make static.
12249 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12250 * m88k-tdep.c (m88k_register_name): Constify.
12251 * macroexp.c (appendmem): Constify.
12252 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12253 (upgrade_type, parse_external, parse_partial_symbols)
12254 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12255 (new_symbol): Constify.
12256 * memattr.c (mem_info_command): Constify.
12257 * mep-tdep.c (register_name_from_keyword): Constify.
12258 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12259 Constify.
12260 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12261 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12262 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12263 cast.
12264 (mi_execute_async_cli_command): Constify.
12265 * mips-tdep.c (mips_register_name): Constify.
12266 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12267 (am33_register_name, am33_2_register_name)
12268 * moxie-tdep.c (moxie_register_names): Constify.
12269 * nat/linux-osdata.c (osdata_type): Constify fields.
12270 * nto-tdep.c (nto_parse_redirection): Constify.
12271 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12272 (lookup_child_selector): Constify.
12273 (objc_methcall::name): Constify.
12274 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12275 (lookup_struct_typedef): Constify.
12276 * objfiles.c (pc_in_section): Constify.
12277 * objfiles.h (pc_in_section): Constify.
12278 * p-exp.y (struct token::oper): Constify.
12279 (yyerror): Constify.
12280 * p-lang.h (pascal_yyerror): Constify.
12281 * parser-defs.h (op_name_standard): Constify.
12282 (op_print::string): Constify.
12283 (exp_descriptor::op_name): Constify.
12284 * printcmd.c (print_address_symbolic): Constify.
12285 * psymtab.c (print_partial_symbols): Constify.
12286 * python/py-breakpoint.c (stop_func): Constify.
12287 (bppy_get_expression): Constify.
12288 * python/py-cmd.c (cmdpy_completer::name): Constify.
12289 (cmdpy_function): Constify.
12290 * python/py-event.c (evpy_add_attribute)
12291 (gdbpy_initialize_event_generic): Constify.
12292 * python/py-event.h (evpy_add_attribute)
12293 (gdbpy_initialize_event_generic): Constify.
12294 * python/py-evts.c (add_new_registry): Constify.
12295 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12296 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12297 * python/py-inferior.c (get_buffer): Add cast.
12298 * python/py-param.c (parm_constant::name): Constify.
12299 * python/py-unwind.c (fprint_frame_id): Constify.
12300 * python/python.c (gdbpy_parameter_value): Constify.
12301 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12302 * remote.c (memory_packet_config::name): Constify.
12303 (show_packet_config_cmd, remote_write_bytes)
12304 (remote_buffer_add_string):
12305 * reverse.c (exec_reverse_once): Constify.
12306 * rs6000-tdep.c (variant::name, variant::description): Constify.
12307 * rust-exp.y (rustyyerror): Constify.
12308 * rust-lang.c (rust_op_name): Constify.
12309 * rust-lang.h (rustyyerror): Constify.
12310 * serial.h (serial_ops::name): Constify.
12311 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12312 (sh_sh3e_register_name, sh_sh2e_register_name)
12313 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12314 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12315 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12316 (sh_sh4al_dsp_register_name): Constify.
12317 * sh64-tdep.c (sh64_register_name): Constify.
12318 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12319 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12320 * stabsread.c (patch_block_stabs, read_type_number)
12321 (ref_map::stabs, ref_add, process_reference)
12322 (symbol_reference_defined, define_symbol, define_symbol)
12323 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12324 (read_one_struct_field, read_struct_fields, read_baseclasses)
12325 (read_tilde_fields, read_struct_type, read_array_type)
12326 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12327 (read_huge_number, read_range_type, read_args, common_block_start)
12328 (find_name_end): Constify.
12329 * stabsread.h (common_block_start, define_symbol)
12330 (process_one_symbol, symbol_reference_defined, ref_add):
12331 * symfile.c (get_section_index, add_symbol_file_command):
12332 * symfile.h (get_section_index): Constify.
12333 * target-descriptions.c (tdesc_type::name): Constify.
12334 (tdesc_free_type): Add cast.
12335 * target.c (find_default_run_target):
12336 (add_deprecated_target_alias, find_default_run_target)
12337 (target_announce_detach): Constify.
12338 (do_option): Constify.
12339 * target.h (add_deprecated_target_alias): Constify.
12340 * thread.c (print_thread_info_1): Constify.
12341 * top.c (deprecated_readline_begin_hook, command_line_input):
12342 Constify.
12343 (init_main): Add casts.
12344 * top.h (handle_line_of_input): Constify.
12345 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12346 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12347 (tfind_command): Rename to ...
12348 (tfind_command_1): ... this and constify.
12349 (tfind_command): New function.
12350 (tfind_end_command, tfind_start_command): Adjust.
12351 (encode_source_string): Constify.
12352 * tracepoint.h (encode_source_string): Constify.
12353 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12354 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12355 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12356 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12357 * tui/tui-win.c (parse_scrolling_args): Constify.
12358 * tui/tui-windata.c (tui_erase_data_content): Constify.
12359 * tui/tui-windata.h (tui_erase_data_content): Constify.
12360 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12361 * tui/tui.c (tui_enable): Add cast.
12362 * utils.c (defaulted_query): Constify.
12363 (init_page_info): Add cast.
12364 (puts_debug, subset_compare): Constify.
12365 * utils.h (subset_compare): Constify.
12366 * varobj.c (varobj_format_string): Constify.
12367 * varobj.h (varobj_format_string): Constify.
12368 * vax-tdep.c (vax_register_name): Constify.
12369 * windows-nat.c (windows_detach): Constify.
12370 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12371 * xml-support.c (gdb_xml_end_element): Constify.
12372 * xml-tdesc.c (tdesc_start_reg): Constify.
12373 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12374 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12375 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12376
995816ba
PA
123772017-04-05 Pedro Alves <palves@redhat.com>
12378
12379 * proc-api.c (struct trans): Constify.
12380 (procfs_note): Constify.
12381 * proc-events.c (struct trans, syscall_table):
12382 * proc-flags.c (struct trans): Constify.
12383 * proc-utils.h (procfs_note): Constify.
12384 * proc-why.c (struct trans): Constify.
12385 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12386 (procfs_detach): Constify.
12387 * sol-thread.c (struct string_map): Constify.
12388 (td_err_string, td_state_string): Constify.
12389
3e83a920
PA
123902017-04-05 Pedro Alves <palves@redhat.com>
12391
12392 * proc-api.c (procfs_filename): Don't initialize
12393 procfs_filename.
12394 (prepare_to_trace): Assume procfs_filename is non-NULL.
12395 (_initialize_proc_api): Give procfs_filename a default value here.
12396
63160a43
PA
123972017-04-05 Pedro Alves <palves@redhat.com>
12398
12399 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12400 'cond_string' parameter.
12401 (extract_exception_regexp): Constify 'string' parameter.
12402 (catch_exception_command_1): Constify.
12403 * breakpoint.c (init_catchpoint)
12404 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12405 parameter.
12406 (ep_parse_optional_if_clause, catch_fork_command_1)
12407 (catch_exec_command_1): Constify.
12408 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12409 parameter.
12410 (ep_parse_optional_if_clause): Constify.
12411 * cli/cli-utils.c (remove_trailing_whitespace)
12412 (check_for_argument): Constify.
12413 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12414 non-const overload.
12415 (check_for_argument): Likewise.
12416
9b2eba3d
PA
124172017-04-05 Pedro Alves <palves@redhat.com>
12418
12419 * event-top.c (command_line_handler): Add cast to execute_command
12420 call.
12421 * record-btrace.c (cmd_record_btrace_bts_start)
12422 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12423 (cmd_record_btrace_start): Add cast to execute_command call.
12424 * record-full.c (record_full_goto_insn):
12425 * record.c (record_start, record_stop): Add cast to
12426 execute_command_to_string calls.
12427 (cmd_record_start): Add cast to execute_command calls.
12428
2adadf51
PA
124292017-04-05 Pedro Alves <palves@redhat.com>
12430
12431 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12432 static inline function.
12433 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12434 array and use gdb_PyArg_ParseTupleAndKeywords.
12435 * python/py-cmd.c (cmdpy_init): Likewise.
12436 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12437 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12438 (infpy_search_memory): Likewise.
12439 * python/py-objfile.c (objfpy_add_separate_debug_file)
12440 (gdbpy_lookup_objfile): Likewise.
12441 * python/py-symbol.c (gdbpy_lookup_symbol)
12442 (gdbpy_lookup_global_symbol): Likewise.
12443 * python/py-type.c (gdbpy_lookup_type): Likewise.
12444 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12445 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12446 Likewise.
12447
0d1f4ceb
PA
124482017-04-05 Pedro Alves <palves@redhat.com>
12449
12450 * python/python-internal.h (gdb_PyGetSetDef): New type.
12451 * python/py-block.c (block_object_getset)
12452 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12453 * python/py-event.c (event_object_getset)
12454 (finish_breakpoint_object_getset): Likewise.
12455 * python/py-inferior.c (inferior_object_getset): Likewise.
12456 * python/py-infthread.c (thread_object_getset): Likewise.
12457 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12458 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12459 * python/py-objfile.c (objfile_getset): Likewise.
12460 * python/py-progspace.c (pspace_getset): Likewise.
12461 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12462 Likewise.
12463 * python/py-record.c (recpy_record_getset): Likewise.
12464 * python/py-symbol.c (symbol_object_getset): Likewise.
12465 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12466 Likewise.
12467 * python/py-type.c (type_object_getset, field_object_getset):
12468 Likewise.
12469 * python/py-value.c (value_object_getset): Likewise.
12470
4d759979
PA
124712017-04-05 Pedro Alves <palves@redhat.com>
12472
12473 * python/python-internal.h (gdb_PyObject_CallMethod)
12474 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12475 New functions.
12476 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12477 (PySys_GetObject, PySys_SetPath): New macros.
12478
fdf9e36f
PA
124792017-04-05 Pedro Alves <palves@redhat.com>
12480
12481 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12482 info_osdata_command.
12483 * osdata.c (info_osdata_command): Rename to ...
12484 (info_osdata): ... this. Constify 'type' parameter, and remove
12485 the 'from_tty' parameter. Accept NULL TYPE.
12486 (info_osdata_command): New function.
12487 * osdata.h (info_osdata_command): Remove declaration.
12488 (info_osdata): New declaration.
12489
9f33b8b7
PA
124902017-04-05 Pedro Alves <palves@redhat.com>
12491
12492 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12493 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12494 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12495 parameter.
12496 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12497 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12498 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12499 parameter.
12500 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12501 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12502 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12503 (mi_cmd_file_list_exec_source_files)
12504 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12505 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12506 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12507 parameter.
12508 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12509 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12510 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12511 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12512 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12513 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12514 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12515 'command' parameter.
12516 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12517 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12518 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12519 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12520 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12521 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12522 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12523 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12524 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12525 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12526 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12527 parameter.
12528 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12529 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12530 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12531 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12532 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12533 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12534 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12535 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12536 (mi_cmd_data_list_changed_registers)
12537 (mi_cmd_data_write_register_values)
12538 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12539 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12540 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12541 (mi_cmd_list_features, mi_cmd_list_target_features)
12542 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12543 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12544 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12545 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12546 (mi_cmd_trace_frame_collected): Constify 'command'
12547 parameter.
12548 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12549 'command' parameter.
12550
67cb5b2d
PA
125512017-04-05 Pedro Alves <palves@redhat.com>
12552
12553 * ada-lang.c (ada_completer_word_break_characters): Now a const
12554 array.
12555 (ada_get_gdb_completer_word_break_characters): Constify.
12556 * completer.c (gdb_completer_command_word_break_characters)
12557 (gdb_completer_file_name_break_characters)
12558 (gdb_completer_quote_characters): Now const arrays.
12559 (get_gdb_completer_quote_characters): Constify.
12560 (set_rl_completer_word_break_characters): New function.
12561 (set_gdb_completion_word_break_characters)
12562 (complete_line_internal): Use it.
12563 * completer.h (get_gdb_completer_quote_characters): Constify.
12564 (set_rl_completer_word_break_characters): Declare.
12565 * f-lang.c (f_word_break_characters): Constify.
12566 * language.c (default_word_break_characters): Constify.
12567 * language.h (language_defn::la_word_break_characters): Constify.
12568 (default_word_break_characters): Constify.
12569 * top.c (init_main): Use set_rl_completer_word_break_characters.
12570
7a114964
PA
125712017-04-05 Pedro Alves <palves@redhat.com>
12572
12573 * aix-thread.c (aix_thread_pid_to_str)
12574 (aix_thread_extra_thread_info): Constify.
12575 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12576 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12577 (bsd_uthread_pid_to_str): Constify.
12578 * corelow.c (core_pid_to_str): Constify.
12579 * darwin-nat.c (darwin_pid_to_str): Constify.
12580 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12581 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12582 Constify.
12583 * gnu-nat.c (gnu_pid_to_str): Constify.
12584 * go32-nat.c (go32_pid_to_str): Constify.
12585 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12586 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12587 * inferior.c (inferior_pid_to_str): Constify.
12588 * linux-nat.c (linux_nat_pid_to_str): Constify.
12589 * linux-tdep.c (linux_core_pid_to_str): Constify.
12590 * linux-thread-db.c (thread_db_pid_to_str)
12591 (thread_db_extra_thread_info): Constify.
12592 * nto-tdep.c (nto_extra_thread_info): Constify.
12593 * nto-tdep.h (nto_extra_thread_info): Constify.
12594 * obsd-nat.c (obsd_pid_to_str): Constify.
12595 * procfs.c (procfs_pid_to_str): Constify.
12596 * ravenscar-thread.c (ravenscar_extra_thread_info)
12597 (ravenscar_pid_to_str): Constify.
12598 * remote-sim.c (gdbsim_pid_to_str): Constify.
12599 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12600 Constify.
12601 * sol-thread.c (solaris_pid_to_str): Constify.
12602 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12603 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12604 * target.c (default_pid_to_str, target_pid_to_str)
12605 (normal_pid_to_str, default_pid_to_str): Constify.
12606 * target.h (target_ops::to_pid_to_str)
12607 (target_ops::to_extra_thread_info): Constify.
12608 (target_pid_to_str, normal_pid_to_str): Constify.
12609 * windows-nat.c (windows_pid_to_str): Constify.
12610 * gdbarch.sh (core_pid_to_str): Constify.
12611 * target-delegates.c: Regenerate.
12612 * gdbarch.h, gdbarch.c: Regenerate.
12613
69bbf465
PA
126142017-04-05 Pedro Alves <palves@redhat.com>
12615
12616 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12617 the memory of the temporary warning_pre_print override.
12618 * utils.c (warning_pre_print): Constify.
12619 * utils.h (warning_pre_print): Constify.
12620
be47f9e8
PA
126212017-04-05 Pedro Alves <palves@redhat.com>
12622
12623 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12624 (shell_command): New function.
12625 (make_command): Use std::string.
12626 (init_cli_cmds): Register shell_command instead of shell_escape.
12627
bde6261a
PA
126282017-04-05 Pedro Alves <palves@redhat.com>
12629
12630 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12631 * tracepoint.c (default_collect): Don't initialize.
12632
b38ef47f
PA
126332017-04-05 Pedro Alves <palves@redhat.com>
12634
12635 * macroexp.c (macro_buffer::shared): Now a bool.
12636 (init_buffer): Update.
12637 (init_shared_buffer): Constify 'addr' parameter.
12638 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12639 casts.
12640
f995bbe8
PA
126412017-04-05 Pedro Alves <palves@redhat.com>
12642
12643 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12644 * disasm.c (set_disassembler_options): Constify local.
12645 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12646
4a596fe2
SDJ
126472017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12648
12649 PR gdb/21352
12650 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12651 option.
12652
2cad08ea
YQ
126532017-04-05 Yao Qi <yao.qi@linaro.org>
12654
12655 * frame.c (frame_unwind_register_unsigned): Call
12656 frame_unwind_register_value.
12657
55a98976
YQ
126582017-04-05 Yao Qi <yao.qi@linaro.org>
12659
12660 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12661 Use gdb_test_multiple, and don't match anchor.
12662
4ac40124
PA
126632017-04-05 Pedro Alves <palves@redhat.com>
12664
12665 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12666 (Write After Approval): Remove Simon Marchi.
12667
c053b654
PA
126682017-04-05 Pedro Alves <palves@redhat.com>
12669
12670 * common/gdb_optional.h (optional::optional): Make constexpr and
12671 initialize m_dummy.
12672
4c7bf4f9
JB
126732017-04-04 John Baldwin <jhb@FreeBSD.org>
12674
12675 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12676 (amd64fbsd_jmp_buf_reg_offset): Remove.
12677 (amd64fbsd_supply_uthread): Remove function.
12678 (amd64fbsd_collect_uthread): Remove function.
12679 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12680 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12681 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12682 (fbsd-nat.c): Update comment.
12683 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12684 (i386fbsd_jmp_buf_reg_offset): Remove.
12685 (i386fbsd_supply_uthread): Remove function.
12686 (i386fbsd_collect_uthread): Remove function.
12687 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12688
1e1a8bef
JB
126892017-04-04 John Baldwin <jhb@FreeBSD.org>
12690
12691 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12692 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12693 * NEWS: Mention that support for FreeBSD/alpha was removed.
12694 * alpha-fbsd-tdep.c: Delete file.
12695 * config/alpha/fbsd.mh: Delete file.
12696 * configure.host: Delete alpha*-*-freebsd* and
12697 alpha*-*-kfreebsd*-gnu.
12698 * configure.tgt: Delete alpha*-*-freebsd* and
12699 alpha*-*-kfreebsd*-gnu.
12700
49907934
JB
127012017-04-04 John Baldwin <jhb@FreeBSD.org>
12702
12703 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12704 amd64bsd_store_inferior_registers): Use ptid from regcache.
12705
6f77053d
PA
127062017-04-04 Pedro Alves <palves@redhat.com>
12707
12708 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12709 data fields, make them private and add "m_" prefixes.
12710 (lnp_state_machine::lnp_state_machine): New ctor.
12711 (record_line, check_line_address, handle_set_discriminator)
12712 (handle_set_address, handle_advance_pc, handle_special_opcode)
12713 (handle_advance_line, handle_set_file, handle_negate_stmt)
12714 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12715 (end_sequence, advance_line): New methods.
12716 (m_gdbarch, m_record_lines_p): New fields.
12717 (lnp_reader_state): Delete.
12718 (dwarf_record_line): Rename to ...
12719 (lnp_state_machine::record_line): ... adjust.
12720 (init_lnp_state_machine): Delete.
12721 (lnp_state_machine::lnp_state_machine): New.
12722 (check_line_address): Rename to ...
12723 (lnp_state_machine::check_line_address): This.
12724 (dwarf_decode_lines_1): Remove reference to "reader_state".
12725 Adjust lnp_state_machine having a non-default ctor. Use bool.
12726 State machine internal state manipulation moved to
12727 lnp_state_machine methods.
12728
9c541725
PA
127292017-04-04 Pedro Alves <palves@redhat.com>
12730
12731 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12732 unittests/offset-type-selftests.c.
12733 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12734 * common/offset-type.h: New file.
12735 * common/preprocessor.h: New file.
12736 * common/traits.h: New file.
12737 * common/valid-expr.h: New file.
12738 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12739 sect_offset and cu_offset strong typedefs throughout.
12740 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12741 typedefs throughout.
12742 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12743 sect_offset and cu_offset strong typedefs throughout.
12744 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12745 typedefs throughout.
12746 * gdbtypes.h: Include "common/offset-type.h".
12747 (cu_offset): Now an offset type (strong typedef) instead of a
12748 struct.
12749 (sect_offset): Likewise.
12750 (union call_site_parameter_u): Rename "param_offset" field to
12751 "param_cu_off".
12752 * unittests/offset-type-selftests.c: New file.
12753
ecfb656c
PA
127542017-04-04 Pedro Alves <palves@redhat.com>
12755
12756 * common/underlying.h: New file.
12757 * dwarf2read.c: Include "common/gdb_optional.h" and
12758 "common/underlying.h".
12759 (dir_index, file_name_index): New types.
12760 (file_entry): Use them.
12761 (file_entry::include): Use to_underlying.
12762 (line_header::add_file_name): Use dir_index.
12763 (read_formatted_entries): Use gdb::optional. Read form before
12764 writting to file_entry.
12765 (dwarf_decode_line_header): Use dir_index.
12766 (lnp_state_machine::current_file): Use to_underlying.
12767 (lnp_state_machine::file): Change type to file_name_index.
12768 (dwarf_record_line): Use to_underlying.
12769 (init_lnp_state_machine): Use file_name_index.
12770 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12771
d194f1fe
PA
127722017-04-04 Pedro Alves <palves@redhat.com>
12773
12774 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12775 operator bool, has_value and get methods.
12776
fff8551c
PA
127772017-04-04 Pedro Alves <palves@redhat.com>
12778
12779 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12780 fields.
12781 (line_header): Initialize all data fields. Change type of
12782 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12783 Change type of include_dirs to std::vector<const char *>. Remove
12784 num_include_dirs, include_dirs_size. Change type of file_names to
12785 std::vector<file_entry>. Remove num_file_names, file_names_size.
12786 (line_header::line_header): New.
12787 (line_header::add_include_dir, line_header::add_file_name): New
12788 methods.
12789 (line_header::include_dir_at): Remove NULL check.
12790 (line_header::file_name_at): Add const overload.
12791 (line_header_up): New unique_ptr typedef.
12792 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12793 std::vector. Remove free_line_header call.
12794 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12795 free_line_header call.
12796 (free_cu_line_header): Delete.
12797 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12798 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12799 Adjust to use std::vector.
12800 (free_line_header): Delete.
12801 (free_line_header_voidp): Use delete.
12802 (add_include_dir): Replace with ...
12803 (line_header::add_include_dir): ... this method. Use std::vector.
12804 (add_file_name): Replace with ...
12805 (line_header::add_file_name): ... this method. Use std::vector.
12806 (add_include_dir_stub): Delete.
12807 (read_formatted_entries): Remove memset.
12808 (dwarf_decode_line_header): Return a line_header_up instead of a
12809 raw pointer. Remove cleanup handling. Pass lambdas to
12810 read_formatted_entries. Adjust to use line_header methods.
12811 (dwarf_decode_lines_1): Adjust to use line_header methods.
12812 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12813 use std::vector.
12814
d62a8ae2
SM
128152017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12816
12817 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12818 instead of struct ptid.
12819
db3a1dc7
AH
128202017-05-04 Alan Hayward <alan.hayward@arm.com>
12821
12822 * frame.c (get_frame_register_bytes): Unwind using value.
12823 (put_frame_register_bytes): Likewise.
12824
b1b45502
IB
128252017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12826
12827 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12828 aggregate-like.
12829
ec13808e
JK
128302017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12831
12832 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12833
12316564
YQ
128342017-03-29 Yao Qi <yao.qi@linaro.org>
12835
12836 * gdbthread.h (struct thread_info): Declare constructor and
12837 destructor. Add some in-class member initializers.
12838 * thread.c (free_thread): Remove.
12839 (init_thread_list): Call delete instead of free_thread.
12840 (new_thread): Call thread_info constructor.
12841 (thread_info::thread_info): New function.
12842 (thread_info::~thread_info): New function.
12843 (delete_thread_1): Call delete instead of free_thread.
12844 (make_cleanup_restore_current_thread): Move tp and frame to
12845 inner block.
12846
fe5f7374
AK
128472017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12848
12849 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12850 (arc_skip_prologue): Likewise.
12851 (arc_make_frame_cache): Likewise.
12852 (arc_pv_get_operand): New function.
12853 (arc_is_in_prologue): Likewise.
12854 (arc_analyze_prologue): Likewise.
12855 (arc_print_frame_cache): Likewise.
12856 (MAX_PROLOGUE_LENGTH): New constant.
12857
eea78757
AK
128582017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12859
12860 * configure.tgt: Add arc-insn.o.
12861 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12862 (dump_arc_instruction_command): New function.
12863 (arc_fprintf_disasm): Likewise.
12864 (arc_disassemble_info): Likewise.
12865 (arc_insn_get_operand_value): Likewise.
12866 (arc_insn_get_operand_value_signed): Likewise.
12867 (arc_insn_get_memory_base_reg): Likewise.
12868 (arc_insn_get_memory_offset): Likewise.
12869 (arc_insn_get_branch_target): Likewise.
12870 (arc_insn_dump): Likewise.
12871 (arc_insn_get_linear_next_pc): Likewise.
12872 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12873 (arc_disassemble_info): Likewise.
12874 (arc_insn_get_branch_target): Likewise.
12875 (arc_insn_get_linear_next_pc): Likewise.
12876 * NEWS: Mention new "maint print arc arc-instruction".
12877
3be78afd
AK
128782017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12879
12880 * arc-tdep (maintenance_print_arc_list): New variable.
12881 (maintenance_print_arc_command): New function.
12882
296ec4fa
AK
128832017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12884
12885 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12886 Add "limm" and "reserved".
12887 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12888 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12889 * arc-tdep.h (arc_regnum): Likewise.
12890
f74f865e
MF
128912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12892
12893 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12894 for THREADPTR register.
12895 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12896 register.
12897 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12898 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12899 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12900
0d0bf81a
MF
129012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12902
12903 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12904 registers above gdbarch_num_regs (gdbarch) as privileged in
12905 call0 ABI.
12906
0ce4291e
MF
129072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12908
12909 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12910 for a single specified register or for all registers in
12911 a0_base..a0_base + C0_NREGS range.
12912 (supply_gregset_reg): Call regcache_raw_supply for a single
12913 specified register or for all registers in a0_base..a0_base +
12914 C0_NREGS range.
12915
c56054f9
MF
129162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12917
12918 * arch/xtensa.h (C0_NREGS): Add definition.
12919 * xtensa-tdep.c (C0_NREGS): Remove definition.
12920
a4398628
MF
129212017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12922
12923 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12924 Drop xtensa_default_isa initialization.
12925 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12926
8c43009f
PA
129272017-03-27 Pedro Alves <palves@redhat.com>
12928
12929 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12930 (file_entry::include_dir): New method.
12931 (line_header::include_dir_at, line_header::file_name_at): New
12932 methods.
12933 (setup_type_unit_groups, setup_type_unit_groups)
12934 (psymtab_include_file_name): Simplify using the new methods.
12935 (lnp_state_machine) <the_line_header>: New field.
12936 <file>: Add comment.
12937 (lnp_state_machine::current_file): New method.
12938 (dwarf_record_line): Simplify using the new methods.
12939 (init_lnp_state_machine): Initialize the "the_line_header" field.
12940 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12941 Simplify using the new methods.
12942
a7e80b9e
PA
129432017-03-27 Pedro Alves <palves@redhat.com>
12944
12945 * cp-name-parser.y (make_empty): Delete.
12946 (demangler_special, nested_name, ptr_operator, array_indicator)
12947 (direct_declarator, declarator_1): Use fill_comp instead of
12948 make_empty.
12949
21047726
PA
129502017-03-27 Pedro Alves <palves@redhat.com>
12951
12952 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12953 to ATTRIBUTE_PRINTF.
12954 * solib-target.c (library_list_start_list): Print "string" not
12955 "version".
12956 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12957 gdb_xml_error call.
12958
d721ba37
PA
129592017-03-27 Pedro Alves <palves@redhat.com>
12960
12961 * dwarf2read.c (struct file_and_directory): New.
12962 (dwarf2_get_dwz_file): Adjust to use std::string.
12963 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12964 (find_file_and_directory): Adjust to return a file_and_directory
12965 object.
12966 (read_file_scope): Adjust to use file_and_directory. Remove
12967 make_cleanup/do_cleanups calls.
12968 (open_and_init_dwp_file): Adjust to use std::string. Remove
12969 make_cleanup/do_cleanups calls.
12970 * python/python.c (do_start_initialization): Adjust to ldirname
12971 returning a std::string.
12972 * utils.c (ldirname): Now returns a std::string.
12973 * utils.h (ldirname): Change return type to std::string.
12974 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12975 returning a std::string.
12976 * xml-tdesc.c (file_read_description_xml): Likewise.
12977
ed771251
AH
129782017-03-24 Alan Hayward <alan.hayward@arm.com>
12979
12980 * regcache.c (regcache_debug_print_register): New function.
12981 * regcache.h (regcache_debug_print_register): New declaration.
12982 * target.c (debug_print_register): Remove.
12983 (target_fetch_registers): Call regcache_debug_print_register.
12984 (target_store_registers): Likewise.
12985
568c1b9f
PB
129862017-03-24 Pádraig Brady <pbrady@fb.com>
12987
12988 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12989 reference beyond the 'lh->include_dirs' array before accessing to
12990 it.
12991 (psymtab_include_file_name): Likewise.
12992 (dwarf_decode_lines_1): Likewise.
12993 (dwarf_decode_lines): Likewise.
12994 (file_file_name): Likewise.
12995
3e00d44f
SM
129962017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12997
12998 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12999 inferior_ptid.
13000 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13001 ps_lsetfpregs): Likewise.
13002 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13003 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13004 ps_lsetfpregs): Likewise.
13005 * target.c (target_fetch_registers, target_store_registers):
13006 Remove asserts.
13007
077ae656
AH
130082017-03-23 Alan Hayward <alan.hayward@arm.com>
13009
13010 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13011
1e2b521d
YQ
130122017-03-23 Yao Qi <yao.qi@linaro.org>
13013
13014 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13015 (_initialize_aarch64_tdep): Register it.
13016 (aarch64_record_load_store): Handle PRFM instruction.
13017 (aarch64_process_record_test): New function.
13018
33877125
YQ
130192017-03-23 Yao Qi <yao.qi@linaro.org>
13020
13021 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13022 indentation.
13023
a0eef940
YQ
130242017-03-23 Yao Qi <yao.qi@linaro.org>
13025
13026 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13027
3f2a3564
PR
130282017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13029
13030 python/python.c (do_start_initialization): Fix memory leak.
13031
b67aeab0
SM
130322017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13033
13034 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13035 using get_ptrace_pid.
13036 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13037 inferior_ptid.
13038 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13039 inferior_ptid instead of pid.
13040
ffdbe864
YQ
130412017-03-22 Yao Qi <yao.qi@linaro.org>
13042
13043 * aarch64-tdep.c: Wrap locally used classes in anonymous
13044 namespace.
13045 * arm-tdep.c: Likewise.
13046 * linespec.c: Likewise.
13047 * ui-out.c: Likewise.
13048
9d736fbf
JG
130492017-03-22 Jonah Graham <jonah@kichwacoders.com>
13050
13051 PR gdb/19637
13052 * python/lib/gdb/printer/bound_registers.py: Import sys.
13053
3de88e9a
SM
130542017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13055
13056 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13057 windows_thread_info parameter and use it instead of
13058 current_thread.
13059 (windows_fetch_inferior_registers): Don't set current_thread,
13060 pass the thread to do_windows_fetch_inferior_registers. Use
13061 ptid from regcache instead of inferior_ptid.
13062 (do_windows_store_inferior_registers): Add windows_thread_info
13063 parameter and use it instead of current_thread.
13064 (windows_store_inferior_registers): Don't set current_thread,
13065 pass the thread to do_windows_store_inferior_registers. Use
13066 ptid from regcache instead of inferior_ptid.
13067
0e7b8f61
SM
130682017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13069
13070 * ser-mingw.c (ser_windows_raw): Remove reference to
13071 struct serial::current_timeout.
13072
5badf10a
IR
130732017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13074
13075 PR tdep/20928
13076 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13077 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13078 (sparc64_fsr_type): Fix %fsr decoding.
13079
cee59b3f
TW
130802017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13081
13082 * python/py-record-btrace.c (btpy_insn_data): Change return type
13083 for Python 2.
13084
639a9038
SM
130852017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13086
13087 * spu-linux-nat.c (spu_fetch_inferior_registers,
13088 spu_store_inferior_registers): Use ptid from regcache, set and
13089 restore inferior_ptid.
13090 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13091 Likewise.
13092
bcc0c096
SM
130932017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13094
13095 * i386-linux-nat.c (fetch_register, store_register,
13096 i386_linux_fetch_inferior_registers,
13097 i386_linux_store_inferior_registers): Use ptid from regcache.
13098 * ia64-linux-nat.c (ia64_linux_fetch_register,
13099 ia64_linux_store_register): Likewise.
13100 * inf-ptrace.c (inf_ptrace_fetch_register,
13101 inf_ptrace_store_register): Likewise.
13102 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13103 m32r_linux_store_inferior_registers): Likewise.
13104 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13105 m68kbsd_store_inferior_registers): Likewise.
13106 * m68k-linux-nat.c (fetch_register, store_register,
13107 m68k_linux_fetch_inferior_registers,
13108 m68k_linux_store_inferior_registers): Likewise.
13109 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13110 m88kbsd_store_inferior_registers): Likewise.
13111 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13112 mips_fbsd_store_inferior_registers): Likewise.
13113 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13114 mips64_linux_regsets_store_registers): Likewise.
13115 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13116 mipsnbsd_store_inferior_registers): Likewise.
13117 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13118 mips64obsd_store_inferior_registers): Likewise.
13119 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13120 Likewise.
13121 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13122 ppcfbsd_store_inferior_registers): Likewise.
13123 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13124 ppc_linux_store_inferior_registers): Likewise.
13125 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13126 ppcnbsd_store_inferior_registers): Likewise.
13127 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13128 ppcobsd_store_registers): Likewise.
13129 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13130 Likewise.
13131 * ravenscar-thread.c (ravenscar_fetch_registers,
13132 ravenscar_store_registers, ravenscar_prepare_to_store):
13133 Likewise.
13134 * record-btrace.c (record_btrace_fetch_registers,
13135 record_btrace_store_registers, record_btrace_prepare_to_store):
13136 Likewise.
13137 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13138 Lookup inferior using ptid from regcache, instead of
13139 current_inferior.
13140 * remote.c (remote_fetch_registers, remote_store_registers): Use
13141 ptid from regcache.
13142 * rs6000-nat.c (fetch_register, store_register): Likewise.
13143 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13144 s390_linux_store_inferior_registers): Likewise.
13145 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13146 shnbsd_store_inferior_registers): Likewise.
13147 * sol-thread.c (sol_thread_fetch_registers,
13148 sol_thread_store_registers): Likewise.
13149 * sparc-nat.c (sparc_fetch_inferior_registers,
13150 sparc_store_inferior_registers): Likewise.
13151 * tilegx-linux-nat.c (fetch_inferior_registers,
13152 store_inferior_registers): Likewise.
13153 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13154 vaxbsd_store_inferior_registers): Likewise.
13155 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13156 store_xtregs): Likewise.
13157
c0f55cc6
AV
131582017-03-20 Artemiy Volkov <artemiyv@acm.org>
13159
13160 PR gdb/14441
13161 * NEWS: Mention support for rvalue references in GDB and python.
13162 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13163 supports both lvalue and rvalue references.
13164
15c0a2a9
AV
131652017-03-20 Artemiy Volkov <artemiyv@acm.org>
13166
13167 PR gdb/14441
13168 * gdbtypes.c (rank_one_type): Implement overloading
13169 resolution rules regarding rvalue references.
13170
aa006118
AV
131712017-03-20 Artemiy Volkov <artemiyv@acm.org>
13172
13173 PR gdb/14441
13174 * aarch64-tdep.c (aarch64_type_align)
13175 (aarch64_extract_return_value, aarch64_store_return_value): Change
13176 lvalue reference type checks to general reference type checks.
13177 * amd64-tdep.c (amd64_classify): Likewise.
13178 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13179 Likewise.
13180 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13181 (arm_store_return_value): Likewise.
13182 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13183 * c-typeprint.c (c_print_type): Likewise.
13184 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13185 (cplus_number_of_children, cplus_describe_child): Likewise.
13186 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13187 * completer.c (expression_completer): Likewise.
13188 * cp-support.c (make_symbol_overload_list_adl_namespace):
13189 Likewise.
13190 * darwin-nat-info.c (info_mach_region_command): Likewise.
13191 * dwarf2loc.c (entry_data_value_coerce_ref)
13192 (value_of_dwarf_reg_entry): Likewise.
13193 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13194 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13195 Likewise.
13196 * findvar.c (extract_typed_address, store_typed_address):
13197 Likewise.
13198 * gdbtypes.c (rank_one_type): Likewise.
13199 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13200 * infcall.c (value_arg_coerce): Likewise.
13201 * language.c (pointer_type): Likewise.
13202 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13203 Likewise.
13204 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13205 * mn10300-tdep.c (mn10300_type_align): Likewise.
13206 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13207 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13208 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13209 Likewise.
13210 * printcmd.c (print_formatted, x_command): Likewise.
13211 * python/py-type.c (typy_get_composite, typy_template_argument):
13212 Likewise.
13213 * python/py-value.c (valpy_referenced_value)
13214 (valpy_get_dynamic_type, value_has_field): Likewise.
13215 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13216 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13217 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13218 * spu-tdep.c (spu_scalar_value_p): Likewise.
13219 * symtab.c (lookup_symbol_aux): Likewise.
13220 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13221 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13222 Likewise.
13223 * valops.c (value_cast_pointers, value_cast)
13224 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13225 (value_struct_elt, value_struct_elt_bitpos)
13226 (value_find_oload_method_list, find_overload_match)
13227 (value_rtti_indirect_type): Likewise.
13228 * valprint.c (val_print_scalar_type_p, generic_val_print):
13229 Likewise.
13230 * value.c (value_actual_type, value_as_address, unpack_long)
13231 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13232 (coerce_ref): Likewise.
13233 * varobj.c (varobj_get_value_type): Likewise.
13234
3fcf899d
AV
132352017-03-20 Artemiy Volkov <artemiyv@acm.org>
13236
13237 PR gdb/14441
13238 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13239 table of constants.
13240 * python/lib/gdb/command/explore.py: Support exploring values
13241 of rvalue reference types.
13242 * python/lib/gdb/types.py: Implement get_basic_type() for
13243 rvalue reference types.
13244 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13245 constant.
13246 * python/py-value.c (valpy_getitem): Add an rvalue reference
13247 check.
13248 (valpy_reference_value): Add new parameter "refcode".
13249 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13250 New wrappers for valpy_reference_value().
13251 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13252 (gdbpy_invoke_xmethod): Likewise.
13253
4297a3f0
AV
132542017-03-20 Artemiy Volkov <artemiyv@acm.org>
13255
13256 PR gdb/14441
13257 * dwarf2read.c (process_die, read_type_die_1): Handle the
13258 DW_TAG_rvalue_reference_type DIE.
13259 (read_tag_reference_type): Add new parameter "refcode".
13260
e1cb3213
AV
132612017-03-20 Artemiy Volkov <artemiyv@acm.org>
13262
13263 PR gdb/14441
13264 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13265 (c_type_print_modifier, c_type_print_varspec_suffix)
13266 (c_type_print_base): Support printing rvalue reference types.
13267 * c-valprint.c (c_val_print, c_value_print): Support printing
13268 rvalue reference values.
13269
e4347c89
AV
132702017-03-20 Artemiy Volkov <artemiyv@acm.org>
13271
13272 PR gdb/14441
13273 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13274 typename.
13275 * cp-support.c (replace_typedefs): Handle
13276 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13277 * python/py-type.c (typy_lookup_type): Likewise.
13278
53cc15f5
AV
132792017-03-20 Artemiy Volkov <artemiyv@acm.org>
13280
13281 PR gdb/14441
13282 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13283 * parse.c (insert_type): Change assert statement.
13284 (follow_types): Handle rvalue reference types.
13285 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13286 constant.
13287
a65cfae5
AV
132882017-03-20 Artemiy Volkov <artemiyv@acm.org>
13289
13290 PR gdb/14441
13291 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13292 value_ref() interface.
13293 * c-valprint.c (c_value_print): Likewise.
13294 * infcall.c (value_arg_coerce): Likewise.
13295 * python/py-value.c (valpy_reference_value): Likewise.
13296 * valops.c (value_cast, value_reinterpret_cast)
13297 (value_dynamic_cast, typecmp): Likewise.
13298 (value_ref): Parameterize by kind of return value reference type.
13299 * value.h (value_ref): Add new parameter "refcode".
13300
3b224330
AV
133012017-03-20 Artemiy Volkov <artemiyv@acm.org>
13302
13303 PR gdb/14441
13304 * dwarf2read.c (read_tag_reference_type): Use
13305 lookup_lvalue_reference_type() instead of lookup_reference_type().
13306 * eval.c (evaluate_subexp_standard): Likewise.
13307 * f-exp.y: Likewise.
13308 * gdbtypes.c (make_reference_type, lookup_reference_type):
13309 Generalize with rvalue reference types.
13310 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13311 convenience wrappers for lookup_reference_type().
13312 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13313 reference kind parameter.
13314 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13315 wrappers for lookup_reference_type().
13316 * guile/scm-type.c (gdbscm_type_reference): Use
13317 lookup_lvalue_reference_type() instead of lookup_reference_type().
13318 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13319 * parse.c (follow_types): Likewise.
13320 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13321 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13322 Likewise.
13323 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13324 (gdbpy_invoke_xmethod): Likewise.
13325 * stabsread.c: Provide extra argument to make_reference_type()
13326 call.
13327 * valops.c (value_ref, value_rtti_indirect_type): Use
13328 lookup_lvalue_reference_type() instead of lookup_reference_type().
13329
f9aeb8d4
AV
133302017-03-20 Artemiy Volkov <artemiyv@acm.org>
13331
13332 PR gdb/14441
13333 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13334 (TYPE_IS_REFERENCE): New macro.
13335 (struct type): Add rvalue_reference_type field.
13336 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13337
51457a05
MAL
133382017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13339
13340 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13341 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13342 New function definition.
13343 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13344 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13345 New function declaration.
13346 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13347 * mi/mi-interp.h: New file.
13348 * solib.c (info_sharedlibrary_command): Replace for loop with
13349 ALL_SO_LIBS macro
13350 * solib.h (update_solib_list): New function declaration.
13351 (so_list_head): Move macro.
13352 * solist.h (ALL_SO_LIBS): New macro.
13353
e696b3ad
MAL
133542017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13355
13356 * infcmd.c (post_create_inferior): Remove unused argument in
13357 call to solib_add.
13358 * remote.c (remote_start_remote): Likewise.
13359 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13360 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13361 (enable_break): Likewise.
13362 * solib.c (update_solib_list): Remove unused target argument
13363 and its documentation.
13364 (solib_add): Remove unused target argument. Remove unused
13365 argument in call to update_solib_list.
13366 (info_sharedlibrary_command): Remove unused argument in call
13367 to update_solib_list.
13368 (sharedlibrary_command): Remove unused argument in call to
13369 solib_add.
13370 (handle_solib_event): Likewise.
13371 (reload_shared_libraries): Likewise.
13372 * solib.h (solib_add): Remove unused target argument.
13373
dcb84eda
AA
133742017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13375
13376 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13377 (s390_displaced_step_fixup): Cover relative branches with the
13378 default fixup handling. This fixes lack of support for some
13379 relative branch instructions.
13380
d9cb6cdc
SM
133812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13382
13383 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13384 ptid from regcache.
13385
1afaf9f4
SM
133862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13387
13388 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13389 i386_darwin_store_inferior_registers): Use ptid from regcache.
13390
aac12e24
SM
133912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13392
13393 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13394 i386bsd_store_inferior_registers): Use ptid from regcache.
13395
bbe1eef1
SM
133962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13397
13398 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13399 hppaobsd_store_registers): Use ptid from regcache.
13400
10799020
SM
134012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13402
13403 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13404 hppanbsd_store_registers): Use ptid from regcache.
13405
00204cf7
SM
134062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13407
13408 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13409 from regcache. Use get_ptrace_pid.
13410
11a33714
SM
134112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13412
13413 * corelow.c (get_core_register_section): Use ptid from regcache,
13414 update doc.
13415
317cd492
SM
134162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13417
13418 * bsd-uthread.c (bsd_uthread_fetch_registers,
13419 bsd_uthread_store_registers): Use ptid from regcache, set and
13420 restore inferior_ptid.
13421
9ac8a7c2
SM
134222017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13423
13424 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13425 fetch_fp_regs, store_register, store_regs, store_fp_register,
13426 store_fp_regs): Use ptid from regcache.
13427
4ac4bb6a
SM
134282017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13429
13430 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13431 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13432 store_vfp_regs): Use ptid from regcache.
13433
9bcbdca8
PA
134342017-03-17 Pedro Alves <palves@redhat.com>
13435
13436 PR remote/21188
13437 * ser-base.c (ser_base_wait_for): Add comment.
13438 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13439 version.
13440 * ser-unix.c (hardwire_raw): Remove reference to
13441 scb->current_timeout.
13442 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13443 (hardwire_ops): Install ser_base_readchar instead of
13444 hardwire_readchar.
13445 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13446 Remove fields.
13447
7503099f
JG
134482017-03-17 Jonah Graham <jonah@kichwacoders.com>
13449
13450 PR gdb/19637
13451 * python/lib/gdb/printer/bound_registers.py: Add support for
13452 Python 3.
13453
7942e96e
AA
134542017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13455
13456 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13457 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13458 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13459 byte_offset to subobj_byte_offset. Fix the handling of
13460 DWARF_VALUE_STACK on big-endian targets when coming via an
13461 implicit pointer.
13462 (dwarf2_evaluate_loc_desc): Adjust call to
13463 dwarf2_evaluate_loc_desc_full.
13464 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13465 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13466
ba14f379
YQ
134672017-03-16 Yao Qi <yao.qi@linaro.org>
13468
13469 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13470 and REVSH instructions.
13471
b121eeb9
YQ
134722017-03-16 Yao Qi <yao.qi@linaro.org>
13473
13474 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13475 (arm_record_test): Declare.
13476 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13477 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13478 align with the manual.
13479 (thumb_record_misc): Adjust the code order to align with the
13480 manual.
13481 (thumb2_record_decode_insn_handler): Fix instruction matching.
13482 (instruction_reader_thumb): New class.
13483 (arm_record_test): New function.
13484
728a7913
YQ
134852017-03-16 Yao Qi <yao.qi@linaro.org>
13486
13487 * arm-tdep.c (abstract_memory_reader): New class.
13488 (instruction_reader): New class.
13489 (extract_arm_insn): Add argument 'reader'. Callers updated.
13490 (decode_insn): Likewise.
13491
34b43320
DE
134922017-03-16 Doug Evans <dje@google.com>
13493
a7c0469f
DE
13494 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13495 member. Change type of TYPE member to SCM. All uses updated.
13496 (lsscm_make_lazy_string_smob): Add assert.
13497 (lsscm_make_lazy_string): Flag bad length values.
13498 (lsscm_elt_type): New function.
13499 (gdbscm_lazy_string_to_value): Rewrite to use
13500 lsscm_safe_lazy_string_to_value.
13501 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13502 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13503 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13504 in incoming type.
13505 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13506 * guile/scm-type.c (tyscm_scm_to_type): New function.
13507
135082017-03-15 Doug Evans <dje@google.com>
13509
34b43320
DE
13510 PR python/17728, python/18439, python/18779
13511 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13512 member. Change type of TYPE member to PyObject *. All uses updated.
13513 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13514 (gdbpy_create_lazy_string_object): Flag bad length values.
13515 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13516 Handle typedefs in incoming type.
13517 (stpy_lazy_string_elt_type): New function.
13518 (gdbpy_extract_lazy_string): Call it.
13519 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13520 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13521 typedefs in incoming type.
13522
a3a5fecc
DE
135232017-03-16 Doug Evans <dje@google.com>
13524
13525 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13526 * guile/scm-type.c (tyscm_scm_to_type): New function.
13527
28f1c605
JW
135282017-03-16 Jiong Wang <jiong.wang@arm.com>
13529
13530 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13531 "ULONGEST" for "skip".
13532
87c336f6
AA
135332017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13534
13535 PR gdb/21220
13536 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13537 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13538 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13539 over ptrace peek/poke until end of buffer or error.
13540
cf81cf60
SM
135412017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13542
13543 * parse.c (length_of_subexp): Make static.
13544 * parser-defs.h (length_of_subexp): Remove.
13545
a379284a
AA
135462017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13547
13548 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13549 as well.
13550
8a6200ba
PA
135512017-03-14 Pedro Alves <palves@redhat.com>
13552
13553 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13554 (main): Use std::unique_ptr. Remove calls to
13555 cp_demangled_name_parse_free.
13556
f79ec206
SM
135572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13558
13559 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13560 alphabsd_store_inferior_registers): Use regcache->ptid instead
13561 of inferior_ptid.
13562
edb5fb00
SM
135632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13564
13565 * aix-thread.c (aix_thread_fetch_registers,
13566 aix_thread_store_registers): Use regcache->ptid instead of
13567 inferior_ptid.
13568
55119686
SM
135692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13570
13571 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13572 store_gregs_to_thread, fetch_fpregs_from_thread,
13573 store_fpregs_to_thread): Use regcache->ptid instead of
13574 inferior_ptid.
13575
6a06fbb7
SM
135762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13577
13578 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13579 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13580 instead of inferior_ptid.
13581
c6386875
SM
135822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13583
13584 * target.c (target_fetch_registers, target_store_registers): Add
13585 assert.
13586
ddaaf0fb
SM
135872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13588
13589 * regcache.h (regcache_get_ptid): New function.
13590 * regcache.c (regcache_get_ptid): New function.
13591
b9da89d1 135922017-03-13 Mark Wielaard <mark@klomp.org>
13593
13594 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13595
5f4d1085
KS
135962017-03-10 Keith Seitz <keiths@redhat.com>
13597
13598 PR c++/8218
13599 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13600
c65d6b55
PA
136012017-03-08 Pedro Alves <palves@redhat.com>
13602
13603 PR gdb/18360
13604 * infrun.c (start_step_over, do_target_resume, resume)
13605 (restart_threads): Assert we're not resuming a thread that is
13606 meant to be stopped.
13607 (infrun_thread_stop_requested_callback): Delete.
13608 (infrun_thread_stop_requested): If the thread is internally
13609 stopped, queue a pending stop event and clear the thread's
13610 inline-frame state.
13611 (handle_stop_requested): New function.
13612 (handle_syscall_event, handle_inferior_event_1): Use
13613 handle_stop_requested.
13614 (handle_stop_requested): New function.
13615 (handle_signal_stop): Set the thread's stop_signal here instead of
13616 at caller.
13617 (finish_step_over): Clear step over info unconditionally.
13618 (handle_signal_stop): If the user had interrupted the event
13619 thread, consider the stop a random signal.
13620 (handle_signal_stop) <signal arrived while stepping over
13621 breakpoint>: Don't restart threads here.
13622 (stop_waiting): Don't clear step-over info here.
13623
15c22686
PA
136242017-03-08 Pedro Alves <palves@redhat.com>
13625
13626 PR 21206
13627 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13628 goes to argument 2, not 1.
13629
6e5d74e7
PA
136302017-03-08 Pedro Alves <palves@redhat.com>
13631
13632 PR cli/21218
13633 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13634 display_gdb_prompt.
13635 (command_line_input): Add comment.
13636
9753a2f6
PA
136372017-03-08 Pedro Alves <palves@redhat.com>
13638
13639 PR tui/21216
13640 * tui/tui-file.c (tui_file::write): New.
13641 * tui/tui-file.h (tui_file): Override "write".
13642 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13643 factored out from ...
13644 (tui_puts): ... here.
13645 (tui_putc): Use them.
13646 (tui_write): New function.
13647 * tui/tui-io.h (tui_write): Declare.
13648
1672e0d9
SDJ
136492017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13650
13651 * Makefile.in (SFILES): Replace "environ.c" with
13652 "common/environ.c".
13653 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13654 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13655 to...
13656 * common/environ.c: ... here.
13657 * environ.h: Moved to...
13658 * common/environ.h: ... here.
13659
f7bb4e3a
PB
136602017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13661
13662 * gdbarch.sh (pstring_ptr): New static function.
13663 (gdbarch_disassembler_options): Use it.
13664 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13665 not valid_disassembler_option->name.
13666 * gdbarch.c: Regenerate.
13667
e45ced6c
PB
136682017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13669
13670 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13671
5f6fd321
PA
136722017-03-07 Pedro Alves <palves@redhat.com>
13673
13674 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13675
6dbb839a 136762017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
13677
13678 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13679 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13680 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 13681 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 13682
d274ecf4
SM
136832017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13684
13685 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13686
df97be55
SM
136872017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13688
13689 * remote.c (remote_add_target_side_commands): Use range-based
13690 for loop.
13691
7d45f3df
YQ
136922017-03-03 Yao Qi <yao.qi@linaro.org>
13693
13694 PR gdb/21165
13695 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13696 value is lazy.
13697 * valprint.c (common_val_print): Likewise.
13698
65b48a81
PB
136992017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13700
13701 * NEWS: Mention new set/show disassembler-options commands.
13702 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13703 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13704 (prospective_options): New static variable.
13705 (gdb_disassembler::gdb_disassembler): Initialize
13706 m_di.disassembler_options.
13707 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13708 (get_disassembler_options): New function.
13709 (set_disassembler_options): Likewise.
13710 (set_disassembler_options_sfunc): Likewise.
13711 (show_disassembler_options_sfunc): Likewise.
13712 (disassembler_options_completer): Likewise.
13713 (_initialize_disasm): Likewise.
13714 * disasm.h (get_disassembler_options): New prototype.
13715 (set_disassembler_options): Likewise.
13716 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13717 (gdbarch_verify_disassembler_options): Likewise.
13718 * gdbarch.c: Regenerate.
13719 * gdbarch.h: Likewise.
13720 * arm-tdep.c (num_disassembly_options): Delete.
13721 (set_disassembly_style): Likewise.
13722 (arm_disassembler_options): New static variable.
13723 (set_disassembly_style_sfunc): Convert short style name into long
13724 option name. Call set_disassembler_options.
13725 (show_disassembly_style_sfunc): New function.
13726 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13727 set_gdbarch_verify_disassembler_options.
13728 (_initialize_arm_tdep): Delete regnames variable and update callers.
13729 (arm_disassembler_options): Initialize.
13730 (disasm_options): New variable.
13731 (num_disassembly_options): Rename from this...
13732 (num_disassembly_styles): ...to this. Compute by scanning through
13733 disasm_options.
13734 (valid_disassembly_styles): Initialize using disasm_options.
13735 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13736 set_arm_regname_option.
13737 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13738 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13739 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13740 set_gdbarch_verify_disassembler_options.
13741 * s390-tdep.c (s390_disassembler_options): New static variable.
13742 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13743 set_gdbarch_verify_disassembler_options.
13744
d538e36d
SM
137452017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13746
13747 * remote.c (remote_add_target_side_condition): Remove "struct"
13748 keyword from range-based for loop.
13749
83621223
SM
137502017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13751
13752 * remote.c (remote_add_target_side_condition): Use range-based
13753 for loop. Update comment.
13754
2123df0e
YQ
137552017-02-27 Yao Qi <yao.qi@linaro.org>
13756
13757 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13758
8e368124
AH
137592017-02-26 Alan Hayward <alan.hayward@arm.com>
13760
13761 * regcache.c (regcache_raw_update): New function.
13762 (regcache_raw_read): Move code to regcache_raw_update.
13763 * regcache.h (regcache_raw_update): New declaration.
13764 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13765
a49dd8dd
JK
137662017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13767
13768 * dwarf2read.c (create_debug_type_hash_table): Initialize
13769 header.signature and header.type_offset_in_tu.
13770
34e4bae9
PA
137712017-02-24 Pedro Alves <palves@redhat.com>
13772
13773 * symtab.c (make_file_symbol_completion_list_1): Use
13774 add_symtab_completions.
13775
b0e4b369
AH
137762017-02-24 Alan Hayward <alan.hayward@arm.com>
13777
13778 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13779
975c21ab
AH
137802017-02-24 Alan Hayward <alan.hayward@arm.com>
13781
13782 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13783 I386_MAX_REGISTER_SIZE.
13784 (i386_pseudo_register_write): Likewise.
13785 (i386_process_record): Likewise.
13786 * i387-tdep.c (i387_supply_xsave): Likewise.
13787 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13788 (store_register): Likewise.
13789
14bc53a8
PA
137902017-02-23 Pedro Alves <palves@redhat.com>
13791
13792 * ada-lang.c: Include "common/function-view.h".
13793 (ada_iterate_over_symbols): Adjust to use function_view as
13794 callback type.
13795 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13796 (ada_make_symbol_completion_list): Use a lambda.
13797 (ada_exc_search_name_matches): Delete.
13798 (name_matches_regex): New.
13799 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13800 * compile/compile-c-support.c: Include "common/function-view.h".
13801 (print_one_macro): Change prototype to accept a ui_file pointer.
13802 (write_macro_definitions): Use a lambda.
13803 * dwarf2read.c: Include "common/function-view.h".
13804 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13805 (dw2_expand_symtabs_matching): Adjust to use function_view as
13806 callback type.
13807 * language.h: Include "common/function-view.h".
13808 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13809 function_view as callback type.
13810 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13811 * linespec.c: Include "common/function-view.h".
13812 (collect_info::add_symbol): New method.
13813 (struct symbol_and_data_callback, iterate_inline_only, struct
13814 symbol_matcher_data, iterate_name_matcher): Delete.
13815 (iterate_over_all_matching_symtabs): Adjust to use function_view
13816 as callback type and lambdas.
13817 (iterate_over_file_blocks): Adjust to use function_view as
13818 callback type.
13819 (decode_compound_collector): Now a class with private fields.
13820 (decode_compound_collector::release_symbols): New method.
13821 (collect_one_symbol): Rename to...
13822 (decode_compound_collector::operator()): ... this and adjust.
13823 (lookup_prefix_sym): decode_compound_collector construction bits
13824 move to decode_compound_collector ctor. Pass the
13825 decode_compound_collector object directly as callback. Remove
13826 cleanups and use decode_compound_collector::release_symbols
13827 instead.
13828 (symtab_collector): Now a class with private fields.
13829 (symtab_collector::release_symtabs): New method.
13830 (add_symtabs_to_list): Rename to...
13831 (symtab_collector::operator()): ... this and adjust.
13832 (collect_symtabs_from_filename): symtab_collector construction
13833 bits move to symtab_collector ctor. Pass the symtab_collector
13834 object directly as callback. Remove cleanups and use
13835 symtab_collector::release_symtabs instead.
13836 (collect_symbols): Delete.
13837 (add_matching_symbols_to_info): Use lambdas.
13838 * macrocmd.c (print_macro_callback): Delete.
13839 (info_macro_command): Use a lambda.
13840 (info_macros_command): Pass print_macro_definition as callable
13841 directly.
13842 (print_one_macro): Remove 'ignore' parameter.
13843 (macro_list_command): Adjust.
13844 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13845 (macro_for_each_data::user_data): Delete field.
13846 (foreach_macro): Adjust to call the function_view.
13847 (macro_for_each): Adjust to use function_view as callback type.
13848 (foreach_macro_in_scope): Adjust to call the function_view.
13849 (macro_for_each_in_scope): Adjust to use function_view as callback
13850 type.
13851 * macrotab.h: Include "common/function-view.h".
13852 (macro_callback_fn): Declare a prototype instead of a pointer.
13853 Remove "user_data" parameter.
13854 (macro_for_each, macro_for_each_in_scope): Adjust to use
13855 function_view as callback type.
13856 * psymtab.c (partial_map_expand_apply)
13857 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13858 Adjust to use function_view as callback type and to return bool.
13859 (psym_expand_symtabs_matching): Adjust to use function_view as
13860 callback types.
13861 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13862 to use function_view as callback type and to return bool.
13863 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13864 callback types.
13865 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13866 as callback types.
13867 * symfile.h: Include "common/function-view.h".
13868 (expand_symtabs_file_matcher_ftype)
13869 (expand_symtabs_symbol_matcher_ftype)
13870 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13871 return bool.
13872 (quick_symbol_functions::map_symtabs_matching_filename)
13873 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13874 function_view as callback type and return bool.
13875 (expand_symtabs_matching): Adjust to use function_view as callback
13876 type.
13877 (maintenance_expand_name_matcher)
13878 (maintenance_expand_file_matcher): Delete.
13879 (maintenance_expand_symtabs): Use lambdas.
13880 * symtab.c (iterate_over_some_symtabs): Adjust to use
13881 function_view as callback types and return bool.
13882 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13883 of a cleanup.
13884 (lookup_symtab_callback): Delete.
13885 (lookup_symtab): Use a lambda.
13886 (iterate_over_symbols): Adjust to use function_view as callback
13887 type.
13888 (struct search_symbols_data, search_symbols_file_matches)
13889 (search_symbols_name_matches): Delete.
13890 (search_symbols): Use a pair of lambdas.
13891 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13892 (symtab_expansion_callback): Delete.
13893 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13894 * symtab.h: Include "common/function-view.h".
13895 (iterate_over_some_symtabs): Adjust to use function_view as
13896 callback type and return bool.
13897 (iterate_over_symtabs): Adjust to use function_view as callback
13898 type.
13899 (symbol_found_callback_ftype): Remove 'data' parameter and return
13900 bool.
13901 (iterate_over_symbols): Adjust to use function_view as callback
13902 type.
13903
07e253aa
PA
139042017-02-23 Pedro Alves <palves@redhat.com>
13905
13906 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13907 (%.o) <unittests/%.c>: New pattern.
13908 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13909 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13910 * common/function-view.h: New file.
13911 * unittests/function-view-selftests.c: New file.
13912 * configure: Regenerate.
13913
8eaf5320
SM
139142017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13915
13916 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13917 inferior_ptid.
13918 * go32-nat.c (go32_thread_alive): Likewise.
13919
38768751
YQ
139202017-02-23 Yao Qi <yao.qi@linaro.org>
13921
13922 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13923 delete.
13924
0a8beaba
YQ
139252017-02-23 Yao Qi <yao.qi@linaro.org>
13926
13927 * varobj.c (varobj_clear_saved_item): Use delete instead of
13928 xfree.
13929 (update_dynamic_varobj_children): Likewise.
13930
58fdfd2c
JK
139312017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13932
13933 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13934
1b90b139
SM
139352017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13936
13937 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13938 m_enum_value to 0 in default constructor.
13939
2039d74e
EBM
139402017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13941
13942 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13943 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13944 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13945 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13946 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13947 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13948 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13949 IS_STORE_CONDITIONAL_INSN.
13950
7814882a
JK
139512017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13952
13953 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13954
0ae60b63
JK
139552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13956
13957 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13958
0224619f
JK
139592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13960
13961 * dwarf2read.c (skip_one_die, read_attribute_value)
13962 (dwarf2_const_value_attr, dump_die_shallow)
13963 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13964 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13965
0af92d60
JK
139662017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13967
13968 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13969 (dwarf_parse_macro_header): Accept DWARF version 5.
13970 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13971
216f72a1
JK
139722017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13973
13974 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13975 DW_AT_GNU_*.
13976 * common/common-exceptions.h (enum errors): Likewise.
13977 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13978 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13979 (dwarf_expr_context::execute_stack_op): Likewise.
13980 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13981 Likewise.
13982 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13983 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13984 (show_entry_values_debug, call_site_to_target_addr)
13985 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13986 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13987 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13988 (value_of_dwarf_block_entry, indirect_pieced_value)
13989 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13990 (disassemble_dwarf_expression): Likewise.
13991 * dwarf2read.c (process_die, inherit_abstract_dies)
13992 (read_call_site_scope): Likewise.
13993 * gdbtypes.h (struct func_type, struct call_site_parameter)
13994 (struct call_site): Likewise.
13995 * stack.c (read_frame_arg): Likewise.
13996 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13997
43988095
JK
139982017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13999
14000 * defs.h (read_unsigned_leb128): New declaration.
14001 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14002 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14003 (dwarf2_find_location_expression): Call also
14004 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14005 * dwarf2loc.h (dwarf2_version): New declaration.
14006 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14007 rnglists.
14008 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14009 .debug_rnglists.
14010 (struct dwop_section_names): Add loclists_dwo.
14011 (dwop_section_names): Add .debug_loclists.dwo.
14012 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14013 (struct dwarf2_per_cu_data): Add dwarf_version.
14014 (struct dwo_sections): Add loclists.
14015 (struct attr_abbrev): Add implicit_const.
14016 (read_indirect_line_string): New declaration.
14017 (read_unsigned_leb128): Delete declaration.
14018 (rcuh_kind): New definition.
14019 (read_and_check_comp_unit_head): Change parameter
14020 is_debug_types_section to section_kind.
14021 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14022 (read_comp_unit_head): Change parameter abfd to section, add parameter
14023 section_kind. Handle DWARF-5.
14024 (error_check_comp_unit_head): Accept also DWARF version 5.
14025 (read_and_check_comp_unit_head): Change parameter
14026 is_debug_types_section to section_kind.
14027 (read_and_check_type_unit_head): Delete function.
14028 (read_abbrev_offset): Handle DWARF-5.
14029 (create_debug_type_hash_table): Add parameter section_kind. Process
14030 only DW_UT_type. Use signature and type_offset_in_tu from struct
14031 comp_unit_head.
14032 (create_debug_types_hash_table): Update create_debug_type_hash_table
14033 caller.
14034 (create_all_type_units): Call create_debug_type_hash_table.
14035 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14036 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14037 caller.
14038 (skip_one_die): Handle DW_FORM_implicit_const.
14039 (dwarf2_rnglists_process): New function.
14040 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14041 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14042 (read_attribute_value): Handle DW_FORM_implicit_const,
14043 DW_FORM_line_strp.
14044 (read_attribute): Handle DW_FORM_implicit_const.
14045 (read_indirect_string_at_offset_from): New function from
14046 read_indirect_string_at_offset.
14047 (read_indirect_string_at_offset): Call
14048 read_indirect_string_at_offset_from.
14049 (read_indirect_line_string_at_offset): New function.
14050 (read_indirect_string): New function comment.
14051 (read_indirect_line_string): New function.
14052 (read_unsigned_leb128): Make it global.
14053 (dwarf2_string_attr): Handle DWARF-5.
14054 (add_include_dir_stub, read_formatted_entries): New functions.
14055 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14056 Handle DWARF-5.
14057 (per_cu_header_read_in): Update read_comp_unit_head caller.
14058 (dwarf2_version): New function.
14059 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14060 rnglists.
14061 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14062 fields.
14063
22d2f3ab
JK
140642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14065
14066 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14067
5f46c5a5
JK
140682017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14069
14070 * dwarf2read.c (dwarf2_ranges_process): New function from
14071 dwarf2_ranges_read.
14072 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14073 dwarf2_ranges_process.
14074
78d4d2c5
JK
140752017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14076
14077 * dwarf2read.c (create_debug_type_hash_table): New function from
14078 create_debug_types_hash_table.
14079 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14080 (create_all_type_units, open_and_init_dwo_file): Update
14081 create_debug_types_hash_table callers.
14082
1b076f25
SDJ
140832017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14084
14085 PR gdb/16188
14086 * fork-child.c (trace_start_error): Fix thinko. va_end should
14087 refer to 'ap', not 'args'.
14088
0db8980c
SDJ
140892017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14090 Pedro Alves <palves@redhat.com>
14091
14092 PR gdb/16188
14093 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14094 calls succeeded.
14095 * fork-child.c (trace_start_error): New function.
14096 (trace_start_error_with_name): Likewise.
14097 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14098 * inf-ptrace.c (inf_ptrace_me): Likewise.
14099 * inferior.h (trace_start_error): New prototype.
14100 (trace_start_error_with_name): Likewise.
14101
99e8a4f9
SDJ
141022017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14103
14104 PR gdb/21164
14105 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14106 NULL before using it.
14107 * symmisc.c (maintenance_print_symbols): Likewise.
14108 (maintenance_print_msymbols): Likewise.
14109
4e746bb6
TW
141102017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14111
14112 * NEWS: Add record Python bindings entry.
14113
141142017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14115
14116 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14117 py-record-full.o.
14118 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14119 * python/py-record-btrace.c, python/py-record-btrace.h,
14120 python/py-record-full.c, python/py-record-full.h: New file.
14121 * python/py-record.c: Add include for py-record-btrace.h and
14122 py-record-full.h.
14123 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14124 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14125 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14126 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14127 New definition.
14128 (gdbpy_initialize_btrace): New export.
14129 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14130
141312017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14132
14133 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14134 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14135 * python/py-record.c: New file.
14136 * python/python-internal.h (gdbpy_start_recording,
14137 gdbpy_current_recording, gdpy_stop_recording,
14138 gdbpy_initialize_record): New export.
14139 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14140 (python_GdbMethods): Add gdbpy_start_recording,
14141 gdbpy_current_recording and gdbpy_stop_recording.
14142
141432017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14144
14145 * record-btrace.c (record_btrace_record_method): New function.
14146 (init_record_btrace_ops): Initialize to_record_method.
14147 * record-full.c (record_full_record_method): New function.
14148 (init_record_full_ops, init_record_full_core_ops): Add
14149 record_full_record_method.
14150 * record.h (enum record_method): New enum.
14151 * target-debug.h (target_debug_print_enum_record_method: New define.
14152 * target-delegates.c: Regenerate.
14153 * target.c (target_record_method): New function.
14154 * target.h: Include record.h.
14155 (struct target_ops) <to_record_method>: New field.
14156 (target_record_method): New export.
14157
141582017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14159
14160 * record.h (record_start, record_stop): New export.
14161 * record.c (record_start, record_stop): New function.
14162
141632017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14164
14165 * btrace.c (btrace_fetch): Copy function call segments pointer
14166 into a vector.
14167 (btrace_clear): Clear the vector.
14168 (btrace_find_insn_by_number): Use binary search to find the correct
14169 function call segment.
14170 * btrace.h (brace_fun_p): New typedef.
14171 (struct btrace_thread_info) <functions>: New field.
14172
141732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14174
14175 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14176 * btrace.c (btrace_decode_error): ... here. New function.
14177 * btrace.h (btrace_decode_error): New export.
14178
141792017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14180
14181 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14182 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14183 btrace_find_insn_by_number): Remove special case for gaps.
14184 * btrace.h (btrace_insn_get_error): New export.
14185 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14186 * record-btrace.c (btrace_insn_history): Print number for gaps.
14187 (record_btrace_info, record_btrace_goto): Handle gaps.
14188
3f77c769
TT
141892017-02-14 Tom Tromey <tom@tromey.com>
14190
14191 PR python/13598:
14192 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14193 event.
14194 * python/py-evts.c (gdbpy_initialize_py_events): Add
14195 before_prompt registry.
14196 * python/py-events.h (events_object) <before_prompt>: New field.
14197
4c2c7ac6
MM
141982017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14199
14200 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14201
5cf30ebf
LM
142022017-02-13 Luis Machado <lgustavo@codesourcery.com>
14203
14204 * symfile (_initialize_symfile): Add usage text to the load command's
14205 help text.
14206
26a06916
SM
142072017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14208
14209 * utils.c (defaulted_query): Don't query on secondary UIs.
14210
0b145e37
TT
142112017-02-10 Tom Tromey <tom@tromey.com>
14212
14213 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14214
2d8365c4
TT
142152017-02-10 Tom Tromey <tom@tromey.com>
14216
14217 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14218 "cleanup" local.
14219 * python/py-type.c (typy_legacy_template_argument): Remove
14220 unnecessary "cleanup" local.
14221
2bb8f231
TT
142222017-02-10 Tom Tromey <tom@tromey.com>
14223
14224 * python/python.c (do_start_initialization): New function, from
14225 _initialize_python.
14226 (_initialize_python): Call do_start_initialization.
14227 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14228 goto.
14229
1bdfaf42
TT
142302017-02-10 Tom Tromey <tom@tromey.com>
14231
14232 * python/py-prettyprint.c (pretty_print_one_value): Use
14233 gdbpy_ref.
14234
88b6faea
TT
142352017-02-10 Tom Tromey <tom@tromey.com>
14236
14237 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14238 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14239 gdbpy_ref.
14240 * python/py-type.c (field_new): Use gdbpy_ref.
14241 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14242 gdbpy_ref.
14243 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14244 (py_free_pspace): Likewise.
14245 (pspace_to_pspace_object): Likewise.
14246 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14247 (py_free_objfile): Likewise.
14248 (objfile_to_objfile_object): Likewise.
14249 * python/py-inferior.c (delete_thread_object): Use
14250 gdbpy_ref.
14251 (infpy_read_memory): Likewise.
14252 (py_free_inferior): Likewise.
14253 * python/py-evtregistry.c (create_eventregistry_object): Use
14254 gdbpy_ref.
14255 * python/py-event.c (create_event_object): Use gdbpy_ref.
14256
7780f186
TT
142572017-02-10 Tom Tromey <tom@tromey.com>
14258
14259 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14260 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14261 used.
14262 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14263 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14264 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14265 python/py-framefilter.c, python/py-function.c,
14266 python/py-inferior.c, python/py-infevents.c,
14267 python/py-linetable.c, python/py-newobjfileevent.c,
14268 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14269 python/py-signalevent.c, python/py-stopevent.c,
14270 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14271 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14272 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14273 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14274
d4b0bb18
TT
142752017-02-10 Tom Tromey <tom@tromey.com>
14276
14277 * ui-out.h (ui_out_emit_type): New class.
14278 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14279 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14280 and ui_out_emit_tuple.
14281 (enumerate_locals): Likewise.
14282 (py_mi_print_variables, py_print_locals, py_print_args): Use
14283 ui_out_emit_list.
14284 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14285 ui_out_emit_list.
14286 * common/gdb_optional.h: New file.
14287
f67f945c
MG
142882017-02-10 Martin Galvan <martingalvan@sourceware.org>
14289
14290 * MAINTAINERS (Write After Approval): Update my e-mail address.
14291
18da0c51
MG
142922017-02-10 Martin Galvan <martingalvan@sourceware.org>
14293
14294 PR gdb/21122
14295 * breakpoint.c (_initialize_breakpoint): Update the help description
14296 of the 'commands' command to indicate that it takes a list argument.
14297
62c14536
SM
142982017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14299
14300 * interps.c (current_interp_set_logging): Remove "return".
14301
ff6fa247
GB
143022017-02-09 Gary Benson <gbenson@redhat.com>
14303
14304 * symtab.c (add_symtab_completions): Prevent NULL pointer
14305 dereference.
14306
a474bd8e
PA
143072017-02-08 Pedro Alves <palves@redhat.com>
14308
14309 * interps.c (interp::interp): Remove reference to quiet_p.
14310 (interp_set): Make static. Remove dead "Switching to" output
14311 code.
14312 (interp_quiet_p, interp_set_quiet): Delete.
14313 (interpreter_exec_cmd): Don't set the interpreter quiet.
14314 * interps.h (interp_quiet_p): Make static.
14315 (class interp) <quiet_p>: Remove field
14316
3d7b173c
JG
143172017-02-08 Jerome Guitton <guitton@adacore.com>
14318
604c4576
JG
14319 * cli/cli-decode.c (find_command_name_length): Make it extern.
14320 * cli/cli-decode.h (find_command_name_length): Declare.
14321 * cli/cli-script.c (command_name_equals, line_first_arg):
14322 New functions.
14323 (process_next_line): Use cli-decode to parse command names.
14324 (build_command_line): Make args a constant pointer.
14325
143262017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 14327
3d7b173c
JG
14328 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14329 Remove case-insensitive search.
14330
1291063d
JM
143312017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14332
14333 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14334 at the end of the line. Avoids an ARI warning.
14335
20b477a7
LM
143362017-02-06 Luis Machado <lgustavo@codesourcery.com>
14337
14338 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14339 rdseed instructions.
14340 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14341
3f7b46f2
IR
143422017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14343
14344 PR tdep/20936
14345 Provide and use sparc32 and sparc64 target description XML files.
14346 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14347 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14348 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14349 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14350 * features/sparc/sparc32-solaris.xml: New file.
14351 * features/sparc/sparc64-solaris.xml: New file.
14352 * features/sparc/sparc32-solaris.c: Generated.
14353 * features/sparc/sparc64-solaris.c: Generated.
14354 * sparc-tdep.h: Account for differences in target descriptions.
14355 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14356 (sparc32_register_type): Use target provided registers.
14357 (validate_tdesc_registers): New function.
14358 (sparc32_gdbarch_init): Use tdesc_has_registers.
14359 Set pseudoregister functions.
14360 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14361 (sparc64_register_type): Use target provided registers.
14362 (sparc64_init_abi): Set pseudoregister functions.
14363
f0fd41c1
TT
143642017-02-03 Tom Tromey <tom@tromey.com>
14365
14366 PR rust/21097:
14367 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14368 with a single member.
14369
d6f9b0fb
PA
143702017-02-03 Pedro Alves <palves@redhat.com>
14371
14372 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14373 (cli_interp_base::~cli_interp_base): New.
14374 (cli_interp): New struct.
14375 (as_cli_interp): Cast the interp itself to cli_interp.
14376 (cli_interpreter_pre_command_loop): Rename to ...
14377 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14378 parameter.
14379 (cli_interpreter_init): Rename to ...
14380 (cli_interp::init): ... this. Remove 'self' parameter. Use
14381 boolean. Make extern.
14382 (cli_interpreter_resume): Rename to ...
14383 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14384 extern.
14385 (cli_interpreter_suspend): Rename to ...
14386 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14387 extern.
14388 (cli_interpreter_exec): Rename to ...
14389 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14390 extern.
14391 (cli_interpreter_supports_command_editing): Rename to ...
14392 (cli_interp_base::supports_command_editing): ... this. Remove
14393 'interp' parameter. Make extern.
14394 (cli_ui_out): Rename to ...
14395 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14396 Make extern.
14397 (cli_set_logging): Rename to ...
14398 (cli_interp_base::set_logging): ... this. Remove 'interp'
14399 parameter. Make extern.
14400 (cli_interp_procs): Delete.
14401 (cli_interp_factory): Adjust to use "new".
14402 * cli/cli-interp.h: Include "interps.h".
14403 (struct cli_interp_base): New struct.
14404 * interps.c (struct interp): Delete. Fields moved to interps.h.
14405 (interp_new): Delete.
14406 (interp::interp, interp::~interp): New.
14407 (interp_set): Use bool, and return void. Assume the interpreter
14408 has suspend, init and resume methods, and that the all return
14409 void.
14410 (set_top_level_interpreter): interp_set returns void.
14411 (interp_ui_out): Adapt.
14412 (current_interp_set_logging): Adapt.
14413 (interp_data): Delete.
14414 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14415 (interp_exec): Adapt.
14416 (top_level_interpreter_data): Delete.
14417 * interps.h (interp_init_ftype, interp_resume_ftype)
14418 (interp_suspend_ftype, interp_exec_ftype)
14419 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14420 (class interp): New.
14421 (interp_new): Delete.
14422 (interp_set): Now returns void. Use bool.
14423 (interp_data, top_level_interpreter_data): Delete.
14424 * mi/mi-common.h: Include interps.h.
14425 (class mi_interp): Inherit from interp. Define a ctor. Declare
14426 init, resume, suspect, exec, interp_ui_out, set_logging and
14427 pre_command_loop methods.
14428 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14429 (mi_interpreter_init): Rename to ...
14430 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14431 bool, return void and make extern. Adjust.
14432 (mi_interpreter_resume): ... Rename to ...
14433 (mi_interp::resume): ... this. Remove the 'data' parameter,
14434 return void and make extern. Adjust.
14435 (mi_interpreter_suspend): ... Rename to ...
14436 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14437 return void and make extern. Adjust.
14438 (mi_interpreter_exec): ... Rename to ...
14439 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14440 extern. Adjust.
14441 (mi_interpreter_pre_command_loop): ... Rename to ...
14442 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14443 parameter and make extern.
14444 (mi_on_normal_stop_1): Adjust.
14445 (mi_ui_out): Rename to ...
14446 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14447 parameter and make extern. Adjust.
14448 (mi_set_logging): Rename to ...
14449 (mi_interp::set_logging): ... this. Remove the 'interp'
14450 parameter and make extern. Adjust.
14451 (mi_interp_procs): Delete.
14452 (mi_interp_factory): Adjust to use 'new'.
14453 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14454 (mi_print_exception, mi_execute_command, mi_load_progress):
14455 Adjust.
14456 * tui/tui-interp.c (tui_interp): New class.
14457 (as_tui_interp): Return a tui_interp pointer.
14458 (tui_on_normal_stop, tui_on_signal_received)
14459 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14460 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14461 to use interp::interp_ui_out.
14462 (tui_init): Rename to ...
14463 (tui_interp::init): ... this. Remove the 'self' parameter, use
14464 bool, return void and make extern. Adjust.
14465 (tui_resume): Rename to ...
14466 (tui_interp::resume): ... this. Remove the 'data' parameter,
14467 return void and make extern. Adjust.
14468 (tui_suspend): Rename to ...
14469 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14470 return void and make extern. Adjust.
14471 (tui_ui_out): Rename to ...
14472 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14473 parameter, and make extern. Adjust.
14474 (tui_exec): Rename to ...
14475 (tui_interp::exec): ... this. Remove the 'data' parameter and
14476 make extern.
14477 (tui_interp_procs): Delete.
14478 (tui_interp_factory): Use "new".
14479
65c40c95
TT
144802017-02-02 Tom Tromey <tom@tromey.com>
14481
14482 * rust-exp.y (ends_raw_string, space_then_number)
14483 (rust_identifier_start_p): Return bool.
14484 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14485 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14486 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14487 (rust_chartype_p): Return bool.
14488 (val_print_struct, rust_print_struct_def, rust_print_type):
14489 Update.
14490 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14491 Return bool.
14492
b50f188d
TT
144932017-02-02 Tom Tromey <tom@tromey.com>
14494
14495 * rust-lang.c: Reindent.
14496
03c85b11
TT
144972017-02-02 Tom Tromey <tom@tromey.com>
14498
14499 * rust-lang.h (rust_crate_for_block): Update.
14500 * rust-lang.c (rust_crate_for_block): Return std::string.
14501 (rust_get_disr_info): Use std:;string, not
14502 gdb::unique_xmalloc_ptr.
14503 * rust-exp.y (crate_name): Update.
14504
9b6da501
PA
145052017-02-02 Pedro Alves <palves@redhat.com>
14506
14507 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14508 field out of gdb_disassembler_test and make it static.
14509
ec4cb20b
PA
145102017-02-02 Pedro Alves <palves@redhat.com>
14511
14512 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14513 mi1_interp and mi_interp fields.
14514
5be5dbf0
PA
145152017-02-02 Pedro Alves <palves@redhat.com>
14516
616268b6
PA
14517 * cli/cli-interp.c (struct saved_output_files, saved_output):
14518 Moved from cli/cli-logging.c.
14519 (cli_set_logging): New function.
14520 (cli_interp_procs): Install cli_set_logging.
14521 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14522 Declare.
14523 * cli/cli-logging.c (struct saved_output_files, saved_output):
14524 Moved to cli/cli-interp.c.
14525 (pop_output_files): Don't save outputs here.
14526 (make_logging_output): New function.
14527 (handle_redirections): Don't build tee nor save previous outputs
14528 here.
14529 * interps.c (current_interp_set_logging): Change prototype.
14530 Assume there's always a set_logging_proc method installed.
14531 * interps.h (interp_set_logging_ftype): Change prototype.
14532 (current_interp_set_logging): Change prototype and adjust comment.
14533 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14534 use make_logging_output.
14535 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
145362017-02-02 Pedro Alves <palves@redhat.com>
14537
5be5dbf0
PA
14538 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14539 from ...
14540 (set_logging_overwrite): ... here.
14541 (logging_no_redirect_file): Delete.
14542 (set_logging_redirect): Don't handle redirection on the fly.
14543 Instead warn that "logging off" / "logging on" is necessary.
14544 (pop_output_files): Delete references to logging_no_redirect_file.
14545 (show_logging_command): Always speak in terms of what will happen
14546 once logging is reenabled.
14547
c99cc448
PA
145482017-02-02 Pedro Alves <palves@redhat.com>
14549
14550 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14551
8b172ce7
PA
145522017-02-02 Pedro Alves <palves@redhat.com>
14553
14554 * disasm.c (gdb_pretty_print_insn): Rename to ...
14555 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14556 Remove gdbarch parameter. Adapt to clear the object's buffers
14557 instead of allocating new buffers, and to print using the object's
14558 gdb_disassembler instead of calling gdb_print_insn.
14559 (dump_insns): Use gdb_pretty_print_disassembler.
14560 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14561 (gdb_pretty_print_disassembler): New class.
14562 * record-btrace.c (btrace_insn_history): Use
14563 gdb_pretty_print_disassembler.
14564
d7e74731
PA
145652017-02-02 Pedro Alves <palves@redhat.com>
14566
14567 * ada-lang.c (type_as_string): Use string_file.
14568 * ada-valprint.c (ada_print_floating): Use string_file.
14569 * ada-varobj.c (ada_varobj_scalar_image)
14570 (ada_varobj_get_value_image): Use string_file.
14571 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14572 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14573 * breakpoint.c (update_inserted_breakpoint_locations)
14574 (insert_breakpoint_locations, reattach_breakpoints)
14575 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14576 (print_it_watchpoint): Use string_file.
14577 (save_breakpoints): Use stdio_file.
14578 * c-exp.y (oper): Use string_file.
14579 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14580 tee_file.
14581 (pop_output_files): Use delete.
14582 (handle_redirections): Use stdio_file and tee_file.
14583 * cli/cli-setshow.c (do_show_command): Use string_file.
14584 * compile/compile-c-support.c (c_compute_program): Use
14585 string_file.
14586 * compile/compile-c-symbols.c (generate_vla_size): Take a
14587 'string_file &' instead of a 'ui_file *'.
14588 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14589 of a 'ui_file *'. Use string_file.
14590 (generate_c_for_variable_locations): Take a 'string_file &'
14591 instead of a 'ui_file *'.
14592 * compile/compile-internal.h (generate_c_for_for_one_variable):
14593 Take a 'string_file &' instead of a 'ui_file *'.
14594 * compile/compile-loc2c.c (push, pushf, unary, binary)
14595 (print_label, pushf_register_address, pushf_register)
14596 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14597 'ui_file *'. Adjust.
14598 * compile/compile.c (compile_to_object): Use string_file.
14599 * compile/compile.h (compile_dwarf_expr_to_c)
14600 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14601 'ui_file *'.
14602 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14603 (replace_typedefs_qualified_name): Use string_file and
14604 obstack_copy0.
14605 * disasm.c (gdb_pretty_print_insn): Use string_file.
14606 (gdb_disassembly): Adjust reference the null_stream global.
14607 (do_ui_file_delete): Delete.
14608 (gdb_insn_length): Use null_stream.
14609 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14610 * dwarf2loc.c (dwarf2_compile_property_to_c)
14611 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14612 'string_file &' instead of a 'ui_file *'.
14613 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14614 * dwarf2read.c (do_ui_file_peek_last): Delete.
14615 (dwarf2_compute_name): Use string_file.
14616 * event-top.c (gdb_setup_readline): Use stdio_file.
14617 * gdbarch.sh (verify_gdbarch): Use string_file.
14618 * gdbtypes.c (safe_parse_type): Use null_stream.
14619 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14620 string_file.
14621 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14622 'string_file *' instead of a 'ui_file *'.
14623 (gdbscm_arch_disassemble): Use string_file.
14624 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14625 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14626 inherits from ui_file.
14627 (ioscm_file_port_delete, ioscm_file_port_rewind)
14628 (ioscm_file_port_put): Delete.
14629 (ioscm_file_port_write): Rename to ...
14630 (ioscm_file_port::write): ... this. Remove file_port_magic
14631 checks.
14632 (ioscm_file_port_new): Delete.
14633 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14634 ui_file_up.
14635 * guile/scm-type.c (tyscm_type_name): Use string_file.
14636 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14637 Use string_file.
14638 * infcmd.c (print_return_value_1): Use string_file.
14639 * infrun.c (print_target_wait_results): Use string_file.
14640 * language.c (add_language): Use string_file.
14641 * location.c (explicit_to_string_internal): Use string_file.
14642 * main.c (captured_main_1): Use null_file.
14643 * maint.c (maintenance_print_architecture): Use stdio_file.
14644 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14645 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14646 event_channel>: Change type to mi_console_file pointer.
14647 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14648 (mi_console_file_delete): Delete.
14649 (struct mi_console_file): Delete.
14650 (mi_console_file_magic): Delete.
14651 (mi_console_file_new): Delete.
14652 (mi_console_file::mi_console_file): New.
14653 (mi_console_file_delete): Delete.
14654 (mi_console_file_fputs): Delete.
14655 (mi_console_file::write): New.
14656 (mi_console_raw_packet): Delete.
14657 (mi_console_file::flush): New.
14658 (mi_console_file_flush): Delete.
14659 (mi_console_set_raw): Rename to ...
14660 (mi_console_file::set_raw): ... this.
14661 * mi/mi-console.h (class mi_console_file): New class.
14662 (mi_console_file_new, mi_console_set_raw): Delete.
14663 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14664 (mi_set_logging): Use delete and tee_file. Adjust.
14665 * mi/mi-main.c (output_register): Use string_file.
14666 (mi_cmd_data_evaluate_expression): Use string_file.
14667 (mi_cmd_data_read_memory): Use string_file.
14668 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14669 * mi/mi-out.c (mi_ui_out::main_stream): New.
14670 (mi_ui_out::rewind): Use main_stream and
14671 string_file.
14672 (mi_ui_out::put): Use main_stream and string_file.
14673 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14674 Allocate a 'string_file' instead.
14675 (mi_out_new): Don't allocate a mem_fileopen stream here.
14676 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14677 (mi_ui_out::main_stream): Declare method.
14678 * printcmd.c (eval_command): Use string_file.
14679 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14680 * python/py-arch.c (archpy_disassemble): Use string_file.
14681 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14682 * python/py-frame.c (frapy_str): Use string_file.
14683 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14684 Use string_file.
14685 * python/py-type.c (typy_str): Use string_file.
14686 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14687 * python/py-value.c (valpy_str): Use string_file.
14688 * record-btrace.c (btrace_insn_history): Use string_file.
14689 * regcache.c (regcache_print): Use stdio_file.
14690 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14691 * remote.c (escape_buffer): Use string_file.
14692 * rust-lang.c (rust_get_disr_info): Use string_file.
14693 * serial.c (serial_open_ops_1): Use stdio_file.
14694 (do_serial_close): Use delete.
14695 * stack.c (print_frame_arg): Use string_file.
14696 (print_frame_args): Remove local mem_fileopen stream, not used.
14697 (print_frame): Use string_file.
14698 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14699 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14700 Take a 'string_file *' instead of a 'ui_file *'.
14701 * top.c (new_ui): Use stdio_file and stderr_file.
14702 (free_ui): Use delete.
14703 (execute_command_to_string): Use string_file.
14704 (quit_confirm): Use string_file.
14705 * tracepoint.c (collection_list::append_exp): Use string_file.
14706 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14707 * tui/tui-file.c: Don't include "ui-file.h".
14708 (enum streamtype, struct tui_stream): Delete.
14709 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14710 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14711 (tui_file::tui_file): New method.
14712 (tui_file_fputs): Delete.
14713 (tui_file_get_strbuf): Delete.
14714 (tui_file::puts): New method.
14715 (tui_file_adjust_strbuf): Delete.
14716 (tui_file_flush): Delete.
14717 (tui_file::flush): New method.
14718 * tui/tui-file.h: Tweak intro comment.
14719 Include ui-file.h.
14720 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14721 (tui_file_adjust_strbuf): Delete declarations.
14722 (class tui_file): New class.
14723 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14724 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14725 (tui_register_format): Use string_stream.
14726 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14727 (tui_get_function_from_frame): Use string_file.
14728 * typeprint.c (type_to_string): Use string_file.
14729 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14730 (null_stream): New global.
14731 (ui_file_delete): Delete.
14732 (ui_file::ui_file): New.
14733 (null_file_isatty): Delete.
14734 (ui_file::~ui_file): New.
14735 (null_file_rewind): Delete.
14736 (ui_file::printf): New.
14737 (null_file_put): Delete.
14738 (null_file_flush): Delete.
14739 (ui_file::putstr): New.
14740 (null_file_write): Delete.
14741 (ui_file::putstrn): New.
14742 (null_file_read): Delete.
14743 (ui_file::putc): New.
14744 (null_file_fputs): Delete.
14745 (null_file_write_async_safe): Delete.
14746 (ui_file::vprintf): New.
14747 (null_file_delete): Delete.
14748 (null_file::write): New.
14749 (null_file_fseek): Delete.
14750 (null_file::puts): New.
14751 (ui_file_data): Delete.
14752 (null_file::write_async_safe): New.
14753 (gdb_flush, ui_file_isatty): Adjust.
14754 (ui_file_put, ui_file_rewind): Delete.
14755 (ui_file_write): Adjust.
14756 (ui_file_write_for_put): Delete.
14757 (ui_file_write_async_safe, ui_file_read): Adjust.
14758 (ui_file_fseek): Delete.
14759 (fputs_unfiltered): Adjust.
14760 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14761 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14762 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14763 (set_ui_file_data): Delete.
14764 (string_file::~string_file, string_file::write)
14765 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14766 (do_ui_file_as_string, ui_file_as_string): Delete.
14767 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14768 (struct mem_file): Delete.
14769 (mem_file_new): Delete.
14770 (stdio_file::stdio_file): New.
14771 (mem_file_delete): Delete.
14772 (stdio_file::stdio_file): New.
14773 (mem_fileopen): Delete.
14774 (stdio_file::~stdio_file): New.
14775 (mem_file_rewind): Delete.
14776 (stdio_file::set_stream): New.
14777 (mem_file_put): Delete.
14778 (stdio_file::open): New.
14779 (mem_file_write): Delete.
14780 (stdio_file_magic, struct stdio_file): Delete.
14781 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14782 (stdio_file::flush): New.
14783 (stdio_file_read): Rename to ...
14784 (stdio_file::read): ... this. Adjust.
14785 (stdio_file_write): Rename to ...
14786 (stdio_file::write): ... this. Adjust.
14787 (stdio_file_write_async_safe): Rename to ...
14788 (stdio_file::write_async_safe) ... this. Adjust.
14789 (stdio_file_fputs): Rename to ...
14790 (stdio_file::puts) ... this. Adjust.
14791 (stdio_file_isatty): Delete.
14792 (stdio_file_fseek): Delete.
14793 (stdio_file::isatty): New.
14794 (stderr_file_write): Rename to ...
14795 (stderr_file::write) ... this. Adjust.
14796 (stderr_file_fputs): Rename to ...
14797 (stderr_file::puts) ... this. Adjust.
14798 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14799 (stderr_file::stderr_file): New.
14800 (tee_file_magic): Delete.
14801 (struct tee_file): Delete.
14802 (tee_file::tee_file): New.
14803 (tee_file_new): Delete.
14804 (tee_file::~tee_file): New.
14805 (tee_file_delete): Delete.
14806 (tee_file_flush): Rename to ...
14807 (tee_file::flush): ... this. Adjust.
14808 (tee_file_write): Rename to ...
14809 (tee_file::write): ... this. Adjust.
14810 (tee_file::write_async_safe): New.
14811 (tee_file_fputs): Rename to ...
14812 (tee_file::puts): ... this. Adjust.
14813 (tee_file_isatty): Rename to ...
14814 (tee_file::isatty): ... this. Adjust.
14815 * ui-file.h (struct obstack, struct ui_file): Don't
14816 forward-declare.
14817 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14818 (ui_file_write_ftype)
14819 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14820 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14821 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14822 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14823 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14824 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14825 (set_ui_file_fseek): Delete.
14826 (ui_file_data, ui_file_delete, ui_file_rewind)
14827 (struct ui_file): New.
14828 (ui_file_up): New.
14829 (class null_file): New.
14830 (null_stream): Declare.
14831 (ui_file_write_for_put, ui_file_put): Delete.
14832 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14833 Delete.
14834 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14835 (gdb_fopen, tee_file_new): Delete.
14836 (struct string_file): New.
14837 (struct stdio_file): New.
14838 (stdio_file_up): New.
14839 (struct stderr_file): New.
14840 (class tee_file): New.
14841 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14842 of a 'ui_file *'. Adjust.
14843 * ui-out.h (class ui_out) <field_stream>: Likewise.
14844 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14845 (null_stream): Delete.
14846 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14847 Adjust.
14848 * utils.h (struct ui_file): Delete forward declaration..
14849 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14850 (error_stream): Take a 'string_file &' instead of a
14851 'ui_file *'.
14852 * varobj.c (varobj_value_get_print_value): Use string_file.
14853 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14854 * gdbarch.c: Regenerate.
14855
187808b0
PA
148562017-02-02 Pedro Alves <palves@redhat.com>
14857
14858 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14859 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14860 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14861 Adjust to call gdb_print_insn instead of
14862 gdb_disassembler::print_insn.
14863 (dump_insns, do_mixed_source_and_assembly_deprecated)
14864 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14865 'gdbarch' parameter. Remove gdb_disassembler parameter.
14866 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14867 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14868 declaration.
14869 (gdb_pretty_print_insn): Re-add declaration.
14870 * record-btrace.c (btrace_insn_history): Don't allocate a
14871 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14872
7a8eb317
SM
148732017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14874
14875 * disasm.h (gdb_disassembly): Remove file_string parameter.
14876 * disasm.c (gdb_disassembly): Likewise.
14877 * cli/cli-cmds.c (print_disassembly): Adapt.
14878 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14879 * stack.c (do_gdb_disassembly): Likewise.
14880
7346ef59
AA
148812017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14882
14883 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14884 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14885 targets. And if the implicit value is longer than needed, extract
14886 the first bytes instead of the "least significant" ones.
14887
cd4007e4
MM
148882017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14889
14890 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14891 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14892 (btrace_fetch): Assert can_access_registers_ptid.
14893 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14894 validate_registers_access.
14895
cf77c34e
MM
148962017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14897
14898 * gdbthread.h (can_access_registers_ptid): New.
14899 * thread.c (can_access_registers_ptid): New.
14900
be85ce7d
PA
149012017-02-01 Pedro Alves <palves@redhat.com>
14902
14903 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14904
29b0b251
PA
149052017-01-31 Pedro Alves <palves@redhat.com>
14906
14907 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14908 Fix typos.
14909
289b5b24
PA
149102017-01-31 Pedro Alves <palves@redhat.com>
14911
14912 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14913 not used.
14914
b47413b4
PA
149152017-01-31 Pedro Alves <palves@redhat.com>
14916
14917 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14918
60adb36c
PA
149192017-01-31 Pedro Alves <palves@redhat.com>
14920
14921 * common/scoped_restore.h
14922 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14923 change the value's parameter type to T2.
14924 (make_scoped_restore): Likewise.
14925
2735833d
WT
149262017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14927 Richard Henderson <rth@redhat.com>
14928
14929 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14930 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14931 GS_BASE for older kernels.
14932 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14933 GS_BASE for older kernels.
14934 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14935 and GS_BASE to the offset table.
14936 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14937 system register group.
14938 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14939 for older kernels.
14940 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14941 amd64 ABI.
14942 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14943 AMD64_GSBASE_REGNUM.
14944 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14945 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14946 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14947 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14948 i386/64bit-segments.xml in those rules.
14949 * features/i386/64bit-segments.xml: New file.
14950 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14951 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14952 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14953 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14954 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14955 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14956 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14957 * features/i386/amd64-avx-linux.c: Regenerated.
14958 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14959 * features/i386/amd64-avx-mpx.c: Regenerated.
14960 * features/i386/amd64-avx512-linux.c: Regenerated.
14961 * features/i386/amd64-linux.c: Regenerated.
14962 * features/i386/amd64-mpx-linux.c: Regenerated.
14963 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14964 * features/i386/i386-avx-mpx.c: Regenerated.
14965 * features/i386/x32-avx-linux.c: Regenerated.
14966 * features/i386/x32-avx512-linux.c: Regenerated.
14967 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14968 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14969 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14970 * regformats/i386/amd64-linux.dat: Regenerated.
14971 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14972 * regformats/i386/x32-avx-linux.dat: Regenerated.
14973 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14974 * regformats/i386/x32-linux.dat: Regenerated.
14975
8884e97e
WT
149762017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14977
14978 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14979 Set to AMD64_NUM_REGS.
14980
7005d26a
WT
149812017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14982
14983 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14984 that checks validity of a register number.
14985
4bd2e1b2
KC
149862017-01-27 Kees Cook <keescook@google.com>
14987
14988 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14989 fetch_fpregs if target has fpa registers.
14990 (arm_linux_store_inferior_registers): Call store_fpregs if target
14991 has fpa registers.
14992
7cf1de6c
AA
149932017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14994
14995 * cris-tdep.c (cris_gdbarch_init): Remove check for
14996 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14997
874a1c8c
AT
149982017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14999
15000 * corelow.c (get_core_register_section): Check for regset
15001 existence before checking for REGSET_VARIABLE_SIZE.
15002
d8b49cf0
YQ
150032017-01-26 Yao Qi <yao.qi@linaro.org>
15004 Pedro Alves <palves@redhat.com>
15005
15006 PR gdb/20939
15007 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15008 call memory_error, save memaddr instead.
15009 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15010 negative, cal memory_error.
15011 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15012
658ca58c
YQ
150132017-01-26 Yao Qi <yao.qi@linaro.org>
15014
15015 * disasm-selftests.c (memory_error_test): New function.
15016 (_initialize_disasm_selftests): Register memory_error_test.
15017
79843d45
YQ
150182017-01-26 Yao Qi <yao.qi@linaro.org>
15019
15020 * Makefile.in (SFILES): Add disasm-selftests.c and
15021 selftest-arch.c.
15022 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15023 * disasm-selftests.c: New file.
15024 * selftest-arch.c: New file.
15025 * selftest-arch.h: New file.
15026
8cafda32
YQ
150272017-01-26 Yao Qi <yao.qi@linaro.org>
15028
15029 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15030 to bfd_arch_mep. Don't return 0 if section is not
15031 found. Call print_insn_mep.
15032
e47ad6c0
YQ
150332017-01-26 Pedro Alves <palves@redhat.com>
15034 Yao Qi <yao.qi@linaro.org>
15035
15036 * arm-tdep.c: Include "disasm.h".
15037 (gdb_print_insn_arm): Update code to get gdbarch.
15038 * disasm.c (dis_asm_read_memory): Change it to
15039 gdb_disassembler::dis_asm_read_memory.
15040 (dis_asm_memory_error): Likewise.
15041 (dis_asm_print_address): Likewise.
15042 (gdb_pretty_print_insn): Change it to
15043 gdb_disassembler::pretty_print_insn.
15044 (dump_insns): Add one argument gdb_disassemlber. All
15045 callers updated.
15046 (do_mixed_source_and_assembly_deprecated): Likewise.
15047 (do_mixed_source_and_assembly): Likewise.
15048 (do_assembly_only): Likewise.
15049 (gdb_disassembler::gdb_disassembler): New.
15050 (gdb_disassembler::print_insn): New.
15051 * disasm.h (class gdb_disassembler): New.
15052 (gdb_pretty_print_insn): Remove declaration.
15053 (gdb_disassemble_info): Likewise.
15054 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15055 (gdbscm_disasm_read_memory_worker): Update.
15056 (gdbscm_disasm_read_memory): Update.
15057 (gdbscm_disasm_memory_error): Remove.
15058 (gdbscm_disasm_print_address): Remove.
15059 (gdbscm_disassembler::gdbscm_disassembler): New.
15060 (gdbscm_print_insn_from_port): Update.
15061 * mips-tdep.c: Include disasm.h.
15062 (gdb_print_insn_mips): Update code to get gdbarch.
15063 * record-btrace.c (btrace_insn_history): Update.
15064 * spu-tdep.c: Include disasm.h.
15065 (struct spu_dis_asm_data): Remove.
15066 (struct spu_dis_asm_info): New.
15067 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15068 SPU id.
15069 (gdb_print_insn_spu): Cast disassemble_info to
15070 spu_dis_asm_info.
15071
80d75874
YQ
150722017-01-26 Yao Qi <yao.qi@linaro.org>
15073
15074 * disasm.c (do_ui_file_delete): Delete.
15075 (gdb_insn_length): Move code creating stream to ...
15076 * utils.c (null_stream): ... here. New function.
15077 * utils.h (null_stream): Declare.
15078
60685cd0
SM
150792017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15080
15081 * python/py-inferior.c (find_thread_object): Return directly
15082 from the loop. Remove "found" variable.
15083
eb1cdb62
JB
150842017-01-21 Joel Brobecker <brobecker@adacore.com>
15085
15086 GDB 7.12.1 released.
15087
b1ce6568
SM
150882017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15089
15090 * python/py-function.c (fnpy_call): Reorder declarations to have
15091 the gdbpy_enter object declared first.
15092 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15093
6f8b0407
SM
150942017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15095
fec93fb1 15096 PR python/21068
6f8b0407
SM
15097 * python/python-internal.h (PyMem_RawMalloc): Define for
15098 Python < 3.4.
15099 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15100 PyMem_RawMalloc instead of PyMem_Malloc.
15101
78cbbba8
LM
151022017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15103 Luis Machado <lgustavo@codesourcery.com>
15104
15105 * NEWS (New commands): Mention flash-erase.
15106 (New MI commands): Mention target-flash-erase.
15107 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15108 command.
15109 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15110 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15111 * target.c (flash_erase_command): New function.
15112 (initialize_targets): Add new flash-erase command.
15113 * target.h (flash_erase_command): New declaration.
15114
2132fe85
JB
151152017-01-20 Joel Brobecker <brobecker@adacore.com>
15116
15117 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15118 HAVE_SYS_PROCFS_H is defined.
15119
d1dff226
AH
151202017-01-18 Alan Hayward <alan.hayward@arm.com>
15121
15122 * remote.c (struct cached_reg): Change data into a pointer.
15123 * (stop_reply_dtr): Free data pointers before deleting vector.
15124 (process_stop_reply): Likewise.
15125 (remote_parse_stop_reply): Allocate space for data
15126
9890e433
AH
151272017-01-18 Alan Hayward <alan.hayward@arm.com>
15128
15129 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15130 MAX_REGISTER_SIZE.
15131 (amd64_pseudo_register_read_value): Likewise.
15132 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15133 (store_register_using_P): Likewise.
15134 * regcache.c (regcache_xfer_part): Likewise.
15135
7a36499a
IR
151362017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15137
15138 Split real and pseudo registers.
15139 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15140 (sparc32_pseudo_regnum): New enum.
15141 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15142 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15143 (SPARC32_CP0_REGISTERS): New macro.
15144 (sparc32_pseudo_register_name): New function.
15145 (sparc32_register_name): Use sparc32_pseudo_register_name.
15146 (sparc32_pseudo_register_type): New function.
15147 (sparc32_register_type): Use sparc32_pseudo_register_type.
15148 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15149 pseudo register numbers.
15150 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15151 (SPARC64_CP0_REGISTERS): New macro.
15152 (sparc64_pseudo_register_name): New function.
15153 (sparc64_register_name): Use sparc64_pseudo_register_name.
15154 (sparc64_pseudo_register_type): New function.
15155 (sparc64_register_type): Use sparc64_pseudo_register_type.
15156 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15157 pseudo register numbers.
15158 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15159 sparc64_store_arguments): Handle pseudo register numbers.
15160
6f8976bf
YQ
151612017-01-13 Yao Qi <yao.qi@linaro.org>
15162
15163 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15164 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15165 output.
15166 (getpkt_or_notif_sane_1): Likewise.
15167
e4241ace
YQ
151682017-01-13 Yao Qi <yao.qi@linaro.org>
15169
15170 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15171 of CC. Pass "-x c++-header" instead of "-x c".
15172
3015c064
SM
151732017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15174
15175 * remote.c (remote_can_async_p): Update comment.
15176
fde1b17d
SM
151772017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15178
15179 * linux-nat.c (linux_nat_can_async_p): Update comment.
15180
ca1ca08b
SM
151812017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15182
15183 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15184
4ad2da73
SM
151852017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15186
15187 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15188
c8b23b3f
TT
151892017-01-10 Tom Tromey <tom@tromey.com>
15190
15191 * python/py-type.c (typy_legacy_template_argument): Update.
15192 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15193 ~demangle_parse_info): Declare new members.
15194 (cp_demangled_name_to_comp): Return unique_ptr.
15195 (cp_demangled_name_parse_free)
15196 (make_cleanup_cp_demangled_name_parse_free)
15197 (cp_new_demangle_parse_info): Remove.
15198 * cp-support.c (do_demangled_name_parse_free_cleanup)
15199 (make_cleanup_cp_demangled_name_parse_free): Remove.
15200 (inspect_type, cp_canonicalize_string_full)
15201 (cp_canonicalize_string): Update.
15202 (mangled_name_to_comp): Change return type.
15203 (cp_class_name_from_physname, method_name_from_physname)
15204 (cp_func_name, cp_remove_params): Update.
15205 * cp-name-parser.y (demangle_parse_info): New constructor, from
15206 cp_new_demangle_parse_info.
15207 (~demangle_parse_info): New destructor, from
15208 cp_demangled_name_parse_free.
15209 (cp_merge_demangle_parse_infos): Update.
15210 (cp_demangled_name_to_comp): Change return type.
15211
1ac32117
TT
152122017-01-10 Tom Tromey <tom@tromey.com>
15213
15214 * top.c (prevent_dont_repeat): Change return type.
15215 * python/python.c (execute_gdb_command): Use std::string.
15216 Update.
15217 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15218 * command.h (prevent_dont_repeat): Change return type.
15219 * breakpoint.c (bpstat_do_actions_1): Update.
15220
0cf08227
TT
152212017-01-10 Tom Tromey <tom@tromey.com>
15222
15223 * value.h (scoped_value_mark::~scoped_value_mark): Call
15224 free_to_mark.
15225 (scoped_value_mark::free_to_mark): New method.
15226 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15227 scoped_value_mark.
15228
eb115069
TT
152292017-01-10 Tom Tromey <tom@tromey.com>
15230
15231 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15232 (valpy_reference_value, valpy_const_value, valpy_get_address)
15233 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15234 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15235 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15236 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15237 scoped_value_mark.
15238 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15239 * value.h (scoped_value_mark): New class.
15240
906768f9
TT
152412017-01-10 Tom Tromey <tom@tromey.com>
15242
15243 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15244 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15245 * psymtab.c (discard_psymtabs_upto): Remove.
15246 (make_cleanup_discard_psymtabs): Remove.
15247 (struct psymtab_state): Remove.
15248
bef155c3
TT
152492017-01-10 Tom Tromey <tom@tromey.com>
15250
15251 * record-full.c (record_full_save_cleanups): Remove.
15252 (record_full_save): Use gdb::unlinker.
15253 * gcore.c (do_bfd_delete_cleanup): Remove.
15254 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15255 cleanups.
15256 * dwarf2read.c (unlink_if_set): Remove.
15257 (write_psymtabs_to_index): Use gdb::unlinker.
15258 * common/gdb_unlinker.h: New file.
15259
192b62ce
TT
152602017-01-10 Tom Tromey <tom@tromey.com>
15261
15262 * windows-tdep.c (windows_xfer_shared_library): Update.
15263 * windows-nat.c (windows_make_so): Update.
15264 * utils.h (make_cleanup_bfd_unref): Remove.
15265 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15266 * symfile.h (symfile_bfd_open)
15267 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15268 * symfile.c (read_symbols, symbol_file_add)
15269 (separate_debug_file_exists): Update.
15270 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15271 (generic_load, reread_symbols): Update.
15272 * symfile-mem.c (symbol_file_add_from_memory): Update.
15273 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15274 (spu_symbol_file_add_from_memory): Update.
15275 * solist.h (struct target_so_ops) <bfd_open>: Return
15276 gdb_bfd_ref_ptr.
15277 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15278 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15279 gdb_bfd_ref_ptr.
15280 (solib_map_sections, reload_shared_libraries_1): Update.
15281 * solib-svr4.c (enable_break): Update.
15282 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15283 * solib-frv.c (enable_break2): Update.
15284 * solib-dsbt.c (enable_break): Update.
15285 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15286 gdb_bfd_ref_ptr.
15287 (darwin_solib_get_all_image_info_addr_at_init): Update.
15288 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15289 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15290 * record-full.c (record_full_save): Update.
15291 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15292 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15293 * minidebug.c (find_separate_debug_file_in_section): Return
15294 gdb_bfd_ref_ptr.
15295 * machoread.c (macho_add_oso_symfile): Change abfd to
15296 gdb_bfd_ref_ptr.
15297 (macho_symfile_read_all_oso): Update.
15298 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15299 (macho_symfile_read): Update.
15300 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15301 (jit_bfd_try_read_symtab): Update.
15302 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15303 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15304 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15305 gdb_bfd_ref_ptr.
15306 (gdb_bfd_ref_policy): New struct.
15307 (gdb_bfd_ref_ptr): New typedef.
15308 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15309 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15310 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15311 gdb_bfd_ref_ptr.
15312 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15313 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15314 (gcore_command): Update.
15315 * exec.c (exec_file_attach): Update.
15316 * elfread.c (elf_symfile_read): Update.
15317 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15318 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15319 (open_and_init_dwo_file): Update.
15320 (open_dwp_file): Return gdb_bfd_ref_ptr.
15321 (open_and_init_dwp_file): Update.
15322 * corelow.c (core_open): Update.
15323 * compile/compile-object-load.c (compile_object_load): Update.
15324 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15325 * coffread.c (coff_symfile_read): Update.
15326 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15327 gdb_bfd_ref_ptr. Rename.
15328 (dump_bfd_file, restore_command): Update.
15329 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15330 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15331 (find_separate_debug_file_by_buildid): Update.
15332
50315b21
TT
153332017-01-10 Tom Tromey <tom@tromey.com>
15334
15335 * common/gdb_ref_ptr.h: New file.
15336 * python/py-ref.h (struct gdbpy_ref_policy): New.
15337 (gdbpy_ref): Now a typedef.
15338
fc4007c9
TT
153392017-01-10 Tom Tromey <tom@tromey.com>
15340
15341 * utils.h (make_cleanup_htab_delete): Don't declare.
15342 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15343 Remove.
15344 * linespec.c (decode_compound_collector): Add constructor,
15345 destructor.
15346 (lookup_prefix_sym): Remove cleanup.
15347 (symtab_collector): Add constructor, destructor.
15348 (collect_symtabs_from_filename): Remove cleanup.
15349 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15350 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15351 Use htab_up.
15352 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15353 * dwarf2read.c (dw2_expand_symtabs_matching)
15354 (dw2_map_symbol_filenames, dwarf_decode_macros)
15355 (write_psymtabs_to_index): Use htab_up.
15356 * dwarf2loc.c (func_verify_no_selftailcall)
15357 (call_site_find_chain_1, func_verify_no_selftailcall)
15358 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15359 std::vector, gdb::unique_xmalloc_ptr.
15360 (call_sitep): Remove typedef.
15361 (dwarf2_locexpr_baton_eval): Remove unused variable.
15362
8dbcee67
TT
153632017-01-10 Tom Tromey <tom@tromey.com>
15364
15365 * python/python-internal.h (make_cleanup_py_decref)
15366 (make_cleanup_py_xdecref): Don't declare.
15367 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15368 (py_xdecref, make_cleanup_py_xdecref): Remove.
15369
13df46cc
TT
153702017-01-10 Tom Tromey <tom@tromey.com>
15371
15372 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15373 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15374
06fc9bf7
TT
153752017-01-10 Tom Tromey <tom@tromey.com>
15376
15377 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15378
830a4934
TT
153792017-01-10 Tom Tromey <tom@tromey.com>
15380
15381 * python/py-utils.c (unicode_to_encoded_string)
15382 (python_string_to_target_string)
15383 (python_string_to_target_python_string)
15384 (python_string_to_host_string, gdbpy_obj_to_string)
15385 (get_addr_from_python): Use gdbpy_ref.
15386
4586d543
TT
153872017-01-10 Tom Tromey <tom@tromey.com>
15388
15389 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15390 gdbpy_ref.
15391
59876f8f
TT
153922017-01-10 Tom Tromey <tom@tromey.com>
15393
15394 * python/python.c (eval_python_command, gdbpy_decode_line)
15395 (gdbpy_run_events, gdbpy_start_type_printers)
15396 (gdbpy_apply_type_printers): Use gdbpy_ref.
15397
97d83487
TT
153982017-01-10 Tom Tromey <tom@tromey.com>
15399
15400 * python/py-param.c (get_doc_string, compute_enum_values): Use
15401 gdbpy_ref.
15402
9205649a
TT
154032017-01-10 Tom Tromey <tom@tromey.com>
15404
15405 * python/py-inferior.c (find_thread_object, build_inferior_list):
15406 Use gdbpy_ref.
15407
74c49d45
TT
154082017-01-10 Tom Tromey <tom@tromey.com>
15409
15410 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15411
16361ffb
TT
154122017-01-10 Tom Tromey <tom@tromey.com>
15413
15414 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15415 gdbpy_ref.
15416
905f2cca
TT
154172017-01-10 Tom Tromey <tom@tromey.com>
15418
15419 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15420 extra incref.
15421 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15422 Use gdbpy_ref.
15423
64081434
TT
154242017-01-10 Tom Tromey <tom@tromey.com>
15425
15426 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15427 gdbpy_ref.
15428
59e9e831
TT
154292017-01-10 Tom Tromey <tom@tromey.com>
15430
15431 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15432 decref results of PyArg_ParseTupleAndKeywords.
15433
9de10f6d
TT
154342017-01-10 Tom Tromey <tom@tromey.com>
15435
15436 * python/python.c (python_run_simple_file): Use
15437 unique_xmalloc_ptr, gdbpy_ref.
15438
2bd5759d
TT
154392017-01-10 Tom Tromey <tom@tromey.com>
15440
15441 * python/py-prettyprint.c (print_stack_unless_memory_error)
15442 (print_string_repr, print_children): Use gdbpy_ref.
15443 (dummy_python_frame): New class.
15444 (dummy_python_frame::dummy_python_frame): Rename from
15445 push_dummy_python_frame.
15446 (py_restore_tstate): Remove.
15447
3b4e0e01
TT
154482017-01-10 Tom Tromey <tom@tromey.com>
15449
15450 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15451
17a22718
TT
154522017-01-10 Tom Tromey <tom@tromey.com>
15453
15454 * python/python.c (ensure_python_env, restore_python_env):
15455 Remove.
15456 * python/python-internal.h (ensure_python_env): Don't declare.
15457 * varobj.h (varobj_ensure_python_env): Don't declare.
15458 * varobj.c (varobj_ensure_python_env): Remove.
15459
68cdc557
TT
154602017-01-10 Tom Tromey <tom@tromey.com>
15461
15462 * varobj.c (varobj_value_get_print_value): Use
15463 gdbpy_enter_varobj.
15464
1eba6383
TT
154652017-01-10 Tom Tromey <tom@tromey.com>
15466
15467 * python/py-prettyprint.c (print_string_repr, print_children):
15468 Update.
15469 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15470 of "encoding".
15471 * varobj.c (varobj_value_get_print_value): Update.
15472 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15473
bde7b3e3
TT
154742017-01-10 Tom Tromey <tom@tromey.com>
15475
15476 * varobj.c (varobj_get_display_hint)
15477 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15478 (varobj_set_visualizer, free_variable): Use
15479 gdbpy_enter_varobj.
15480
a7785f8c
TT
154812017-01-10 Tom Tromey <tom@tromey.com>
15482
15483 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15484 (do_finish_initialization): New function. Use gdbpy_ref.
15485 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15486 do_finish_initialization.
15487
2865bfce
TT
154882017-01-10 Tom Tromey <tom@tromey.com>
15489
15490 * python/py-param.c (get_set_value, get_show_value): Use
15491 gdbpy_enter, gdbpy_ref.
15492
0e9dcc75
TT
154932017-01-10 Tom Tromey <tom@tromey.com>
15494
15495 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15496
12a5cedd
TT
154972017-01-10 Tom Tromey <tom@tromey.com>
15498
15499 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15500
788f2586
TT
155012017-01-10 Tom Tromey <tom@tromey.com>
15502
15503 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15504 Use gdbpy_enter_varobj.
15505
6cd67bea
TT
155062017-01-10 Tom Tromey <tom@tromey.com>
15507
15508 * varobj.c (gdbpy_enter_varobj): New constructor.
15509 * python/python-internal.h (gdbpy_enter_varobj): New class.
15510 * python/py-varobj.c (py_varobj_get_iterator): Use
15511 gdbpy_enter_varobj.
15512
14b122bf
TT
155132017-01-10 Tom Tromey <tom@tromey.com>
15514
15515 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15516 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15517 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15518 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15519 unique_xmalloc_ptr.
15520 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15521
bf1ca3b9
TT
155222017-01-10 Tom Tromey <tom@tromey.com>
15523
15524 * python/py-xmethods.c (invoke_match_method): Use
15525 gdbpy_ref.
15526
572a5524
TT
155272017-01-10 Tom Tromey <tom@tromey.com>
15528
15529 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15530 gdbpy_enter, gdbpy_ref.
15531
396a78b6
TT
155322017-01-10 Tom Tromey <tom@tromey.com>
15533
15534 * python/python.c (python_interactive_command): Use gdbpy_enter.
15535
a88b13c7
TT
155362017-01-10 Tom Tromey <tom@tromey.com>
15537
15538 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15539 gdbpy_ref.
15540
e9f0c363
TT
155412017-01-10 Tom Tromey <tom@tromey.com>
15542
15543 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15544 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15545
6349f452
TT
155462017-01-10 Tom Tromey <tom@tromey.com>
15547
15548 * utils.h (htab_deleter): New struct.
15549 (htab_up): New typedef.
15550 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15551 gdbpy_enter, gdbpy_ref, htab_up.
15552
c0171de6
TT
155532017-01-10 Tom Tromey <tom@tromey.com>
15554
15555 * python/py-unwind.c (pending_frame_invalidate): Remove.
15556 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15557
f18e226f
TT
155582017-01-10 Tom Tromey <tom@tromey.com>
15559
15560 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15561 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15562
c57af3f1
TT
155632017-01-10 Tom Tromey <tom@tromey.com>
15564
15565 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15566
60e600ec
TT
155672017-01-10 Tom Tromey <tom@tromey.com>
15568
15569 * python/python.c (gdbpy_eval_from_control_command)
15570 (gdbpy_source_script, gdbpy_run_events)
15571 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15572 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15573 gdbpy_enter.
15574
bf7da5b0
TT
155752017-01-10 Tom Tromey <tom@tromey.com>
15576
15577 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15578
2d38bced
TT
155792017-01-10 Tom Tromey <tom@tromey.com>
15580
15581 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15582
07bc7329
TT
155832017-01-10 Tom Tromey <tom@tromey.com>
15584
15585 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15586 (python_on_inferior_call_pre, python_on_inferior_call_post)
15587 (python_on_memory_change, python_on_register_change)
15588 (python_inferior_exit, python_new_objfile, add_thread_object)
15589 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15590
6e7c365e
TT
155912017-01-10 Tom Tromey <tom@tromey.com>
15592
15593 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15594 (bpfinishpy_handle_exit): Use gdbpy_enter.
15595
6ba0cd40
TT
155962017-01-10 Tom Tromey <tom@tromey.com>
15597
15598 * python/py-cmd.c (cmdpy_destroyer)
15599 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15600 gdbpy_enter.
15601
de2dc875
TT
156022017-01-10 Tom Tromey <tom@tromey.com>
15603
15604 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15605 gdbpy_enter.
15606 (gdbpy_breakpoint_has_cond): Likewise.
15607
4ecee2c4
TT
156082017-01-10 Tom Tromey <tom@tromey.com>
15609
15610 * python/python.c (gdbpy_enter): New constructor.
15611 (~gdbpy_enter): New destructor.
15612 (restore_python_env, ensure_python_env): Rewrite.
15613 * python/python-internal.h (gdbpy_enter): New class.
15614
37fce74f
TT
156152017-01-10 Tom Tromey <tom@tromey.com>
15616
15617 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15618
53a0cca3
TT
156192017-01-10 Tom Tromey <tom@tromey.com>
15620
15621 * python/py-value.c (value_has_field, get_field_flag)
15622 (get_field_type, valpy_getitem, convert_value_from_python): Use
15623 gdbpy_ref.
15624
ff3724f5
TT
156252017-01-10 Tom Tromey <tom@tromey.com>
15626
15627 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15628 gdbpy_ref.
15629
0700aea5
TT
156302017-01-10 Tom Tromey <tom@tromey.com>
15631
15632 * python/py-prettyprint.c (search_pp_list)
15633 (find_pretty_printer_from_objfiles)
15634 (find_pretty_printer_from_progspace)
15635 (find_pretty_printer_from_gdb, find_pretty_printer)
15636 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15637 gdbpy_ref.
15638
1bb44c9f
TT
156392017-01-10 Tom Tromey <tom@tromey.com>
15640
15641 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15642
87ce03fd
TT
156432017-01-10 Tom Tromey <tom@tromey.com>
15644
15645 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15646 (ltpy_get_all_source_lines): Use gdbpy_ref.
15647
ee0a3fb8
TT
156482017-01-10 Tom Tromey <tom@tromey.com>
15649
15650 * python/py-framefilter.c (extract_sym, extract_value)
15651 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15652 gdbpy_ref.
15653
bf2a52fa
TT
156542017-01-10 Tom Tromey <tom@tromey.com>
15655
15656 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15657
f59fe7f8
TT
156582017-01-10 Tom Tromey <tom@tromey.com>
15659
15660 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15661
80bd970a
TT
156622017-01-10 Tom Tromey <tom@tromey.com>
15663
15664 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15665 gdbpy_ref.
15666
d1b3de2e
TT
156672017-01-10 Tom Tromey <tom@tromey.com>
15668
15669 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15670
3bb43384
TT
156712017-01-10 Tom Tromey <tom@tromey.com>
15672
15673 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15674 (typy_range): Use gdbpy_ref.
15675
abf5651e
TT
156762017-01-10 Tom Tromey <tom@tromey.com>
15677
15678 * python/py-threadevent.c (create_thread_event_object): Use
15679 gdbpy_ref.
15680 * python/py-stopevent.c (create_stop_event_object): Simplify.
15681 (emit_stop_event): Use gdbpy_ref.
15682 * python/py-signalevent.c (create_signal_event_object): Use
15683 gdbpy_ref.
15684 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15685 (emit_new_objfile_event, create_clear_objfiles_event_object)
15686 (emit_clear_objfiles_event): Use gdbpy_ref.
15687 * python/py-infevents.c (create_inferior_call_event_object)
15688 (create_register_changed_event_object)
15689 (create_memory_changed_event_object, emit_inferior_call_event)
15690 (emit_memory_changed_event, emit_register_changed_event): Use
15691 gdbpy_ref.
15692 * python/py-exitedevent.c (create_exited_event_object)
15693 (emit_exited_event): Use gdbpy_ref.
15694 * python/py-event.h (evpy_emit_event): Remove
15695 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15696 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15697 * python/py-continueevent.c (emit_continue_event): Use
15698 gdbpy_ref.
15699 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15700 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15701 gdbpy_ref.
15702 * python/py-bpevent.c (create_breakpoint_event_object): Use
15703 gdbpy_ref.
15704
a68ff33e
TT
157052017-01-10 Tom Tromey <tom@tromey.com>
15706
15707 * python/py-ref.h: New file.
15708
7becfd03
SM
157092017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15710
15711 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15712 void.
15713 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15714 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15715 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15716 * ui-out.c (ui_out::redirect): Likewise.
15717 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15718 * cli/cli-logging.c (set_logging_redirect): Update call site of
15719 ui_out::redirect.
15720 (handle_redirections): Likewise.
15721 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15722 * top.c (execute_command_to_string): Likewise.
15723 * utils.c (do_ui_out_redirect_pop): Likewise.
15724
df294654
SM
157252017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15726
15727 * stack.c (_initialize_stack): Update "frame" command help message.
15728
f5e6296e
IB
157292017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15730
15731 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15732
0e2d6fa6
YQ
157332017-01-06 Yao Qi <yao.qi@linaro.org>
15734
15735 * x86-linux-nat.h: Include gdb_proc_service.h.
15736
44d6d3f9
YQ
157372017-01-06 Yao Qi <yao.qi@linaro.org>
15738
15739 * ser-base.h: Include serial.h.
15740
656731fe
YQ
157412017-01-06 Yao Qi <yao.qi@linaro.org>
15742
15743 * ppc-linux-tdep.h: Include ppc-tdep.h.
15744
1ca8f924
YQ
157452017-01-06 Yao Qi <yao.qi@linaro.org>
15746
15747 * nat/amd64-linux-siginfo.h: Include signal.h.
15748
bc3008c4
YQ
157492017-01-06 Yao Qi <yao.qi@linaro.org>
15750
15751 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15752
66c80d03
YQ
157532017-01-06 Yao Qi <yao.qi@linaro.org>
15754
15755 * mi/mi-parse.h: Include mi-cmds.h.
15756
051d2dda
YQ
157572017-01-06 Yao Qi <yao.qi@linaro.org>
15758
15759 * inf-loop.c: Don't include "target.h".
15760 * inf-loop.h: Include it here.
15761
8018d34f
YQ
157622017-01-06 Yao Qi <yao.qi@linaro.org>
15763
15764 * dfp.h: Include "dboulest.h" and "expression.h".
15765
c0b8369c
YQ
157662017-01-06 Yao Qi <yao.qi@linaro.org>
15767
15768 * ax-gdb.h: Include "ax.h".
15769
ad5cba2a
YQ
157702017-01-06 Yao Qi <yao.qi@linaro.org>
15771
15772 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15773 with nat/gdb_ptrace.h.
15774
1c33cd7f
YQ
157752017-01-05 Yao Qi <yao.qi@linaro.org>
15776
15777 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15778 new line.
15779 (mips64_fbsd_sigframe_init): Likewise.
15780
c988ac1d
JB
157812017-01-04 John Baldwin <jhb@FreeBSD.org>
15782
15783 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15784 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15785
b268007c
JB
157862017-01-04 John Baldwin <jhb@FreeBSD.org>
15787
15788 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15789 * NEWS: Mention new FreeBSD/mips native configuration.
15790 * config/mips/fbsd.mh: New file.
15791 * configure.host: Add mips*-*-freebsd*.
15792 * mips-fbsd-nat.c: New file.
15793
387360da
JB
157942017-01-04 John Baldwin <jhb@FreeBSD.org>
15795
15796 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15797 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15798 * NEWS: Mention new FreeBSD/mips target.
15799 * configure.tgt: Add mips*-*-freebsd*.
15800 * mips-fbsd-tdep.c: New file.
15801 * mips-fbsd-tdep.h: New file.
15802
2aaaf250
YQ
158032017-01-04 Yao Qi <yao.qi@linaro.org>
15804
15805 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15806 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15807
61baf725
JB
158082017-01-01 Joel Brobecker <brobecker@adacore.com>
15809
6dbb839a 15810 Update copyright year range in all GDB files.
61baf725 15811
c113e7ff 158122017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 15813
c113e7ff 15814 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 15815
c113e7ff 15816For older changes see ChangeLog-2016.
c906108c
SS
15817\f
15818Local Variables:
15819mode: change-log
15820left-margin: 8
15821fill-column: 74
15822version-control: never
57da7796 15823coding: utf-8
c906108c 15824End:
This page took 2.793877 seconds and 4 git commands to generate.