]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Fix testcase for PR ld/22471
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
75059544
JB
12017-11-29 John Baldwin <jhb@FreeBSD.org>
2
3 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
4
f5a91472
JB
52017-11-29 Joel Brobecker <brobecker@adacore.com>
6
7 * ada-lang.c (to_fixed_range_type): Make sure that the size
8 of the range type being returned is the same as the size
9 of the range type being fixed.
10
bd69330d
PA
112017-11-29 Pedro Alves <palves@redhat.com>
12
13 PR c++/19436
14 * NEWS: Mention setting breakpoints on functions with C++ ABI
15 tags.
16 * completer.h (completion_match_for_lcd) <match,
17 mark_ignored_range>: New methods.
18 <finish>: Consider ignored ranges.
19 <clear>: Clear ignored ranges.
20 <m_ignored_ranges, m_finished_storage>: New fields.
21 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
22 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
23 completion_match_for_lcd pointer to strncmp_iw_with_mode.
24 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
25 * language.c (default_symbol_name_matcher): Pass the
26 completion_match_for_lcd pointer to strncmp_iw_with_mode.
27 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
28 * utils.c (skip_abi_tag): New function.
29 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
30 Handle ABI tags.
31 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
32 parameter.
33
342017-11-29 Pedro Alves <palves@redhat.com>
35
36 PR c++/19436
37 * NEWS: Mention setting breakpoints on functions with C++ ABI
38 tags.
39 * completer.h (completion_match_for_lcd) <match,
40 mark_ignored_range>: New methods.
41 <finish>: Consider ignored ranges.
42 <clear>: Clear ignored ranges.
43 <m_ignored_ranges, m_finished_storage>: New fields.
44 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
45 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
46 completion_match_for_lcd pointer to strncmp_iw_with_mode.
47 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
48 * language.c (default_symbol_name_matcher): Pass the
49 completion_match_for_lcd pointer to strncmp_iw_with_mode.
50 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
51 * utils.c (skip_abi_tag): New function.
52 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
53 Handle ABI tags.
54 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
55 parameter.
56
a20714ff
PA
572017-11-29 Pedro Alves <palves@redhat.com>
58
59 * NEWS: Mention that breakpoints on C++ functions are now set on
60 on all namespaces/classes by default, and mention "break
61 -qualified".
62 * ax-gdb.c (agent_command_1): Adjust to pass a
63 symbol_name_match_type to new_linespec_location.
64 * breakpoint.c (parse_breakpoint_sals): Adjust to
65 get_linespec_location's return type change.
66 (strace_marker_create_sals_from_location): Adjust to pass a
67 symbol_name_match_type to new_linespec_location.
68 (strace_marker_decode_location): Adjust to get_linespec_location's
69 return type change.
70 (strace_command): Adjust to pass a symbol_name_match_type to
71 new_linespec_location.
72 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
73 mention "-qualified".
74 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
75 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
76 enumerator.
77 (complete_address_and_linespec_locations): New parameter
78 'match_type'. Pass it down.
79 (explicit_options): Add "-qualified".
80 (collect_explicit_location_matches): Pass the requested match type
81 to the linespec completers. Handle MATCH_QUALIFIED.
82 (location_completer): Handle "-qualified" combined with linespecs.
83 * cp-support.c (cp_search_name_hash): New.
84 (cp_symbol_name_matches_1): Implement wild matching for C++.
85 (cp_fq_symbol_name_matches): Reimplement.
86 (cp_get_symbol_name_matcher): Return different matchers depending
87 on the lookup name's match type.
88 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
89 * cp-support.h (cp_search_name_hash): New declaration.
90 * dwarf2read.c
91 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
92 symbols.
93 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
94 tests.
95 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
96 pass a symbol_name_match_type to new_linespec_location.
97 * linespec.c (linespec_parse_basic): Lookup function symbols using
98 the parser's symbol name match type.
99 (convert_explicit_location_to_linespec): New
100 symbol_name_match_type parameter. Pass it down to
101 find_linespec_symbols.
102 (convert_explicit_location_to_sals): Pass the location's name
103 match type to convert_explicit_location_to_linespec.
104 (parse_linespec): New match_type parameter. Save it in the
105 parser.
106 (linespec_parser_new): Default to symbol_name_match_type::WILD.
107 (linespec_complete_function): New symbol_name_match_type
108 parameter. Use it.
109 (complete_linespec_component): Pass down the parser's recorded
110 name match type.
111 (linespec_complete_label): New symbol_name_match_type parameter.
112 Use it.
113 (linespec_complete): New symbol_name_match_type parameter. Save
114 it in the parser and pass it down. Adjust to
115 get_linespec_location's prototype change.
116 (find_function_symbols, find_linespec_symbols): New
117 symbol_name_match_type parameter. Pass it down instead of
118 assuming symbol_name_match_type::WILD.
119 * linespec.h (linespec_complete, linespec_complete_function)
120 (linespec_complete_label): New symbol_name_match_type parameter.
121 * location.c (event_location::linespec_location): Now a struct
122 linespec_location.
123 (EL_LINESPEC): Adjust.
124 (initialize_explicit_location): Default to
125 symbol_name_match_type::WILD.
126 (new_linespec_location): New symbol_name_match_type parameter.
127 Record it in the location.
128 (get_linespec_location): Now returns a struct linespec_location.
129 (new_explicit_location): Also copy func_name_match_type.
130 (explicit_to_string_internal)
131 (string_to_explicit_location): Handle "-qualified".
132 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
133 Copy symbol_name_match_type fields.
134 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
135 type change.
136 (event_location_to_string): Adjust to LINESPEC_LOCATION type
137 change. Handle "-qualfied".
138 (string_to_explicit_location): Handle "-qualified".
139 (string_to_event_location_basic): New symbol_name_match_type
140 parameter. Pass it down.
141 (string_to_event_location): Handle "-qualified".
142 * location.h (struct linespec_location): New.
143 (explicit_location::func_name_match_type): New field.
144 (new_linespec_location): Now returns a const linespec_location *.
145 (string_to_event_location_basic): New symbol_name_match_type
146 parameter.
147 (explicit_completion_info::saw_explicit_location_option): New
148 field.
149 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
150 symbol_name_match_type to new_linespec_location.
151 * python/py-breakpoint.c (bppy_init): Likewise.
152 * python/python.c (gdbpy_decode_line): Likewise.
153
a207cff2
PA
1542017-11-29 Pedro Alves <palves@redhat.com>
155
156 * ada-lang.c (ada_lookup_name_info::matches): Change type of
157 parameter from completion_match to completion_match_result.
158 Adjust.
159 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
160 * completer.c (completion_tracker::maybe_add_completion): Add
161 match_for_lcd parameter and use it.
162 (completion_tracker::add_completion): Likewise.
163 * completer.h (class completion_match_for_lcd): New class.
164 (completion_match_result::match_for_lcd): New field.
165 (completion_match_result::set_match): New method.
166 (completion_tracker): Add comments.
167 (completion_tracker::add_completion): Add match_for_lcd parameter.
168 (completion_tracker::reset_completion_match_result): Reset
169 match_for_lcd too.
170 (completion_tracker::maybe_add_completion): Add match_for_lcd
171 parameter.
172 (completion_tracker::m_lowest_common_denominator_unique): Extend
173 comments.
174 * cp-support.c (cp_symbol_name_matches_1)
175 (cp_fq_symbol_name_matches): Change type of parameter from
176 completion_match to completion_match_result. Adjust.
177 * language.c (default_symbol_name_matcher): Change type of
178 parameter from completion_match to completion_match_result.
179 Adjust.
180 * language.h (completion_match_for_lcd): Forward declare.
181 (default_symbol_name_matcher): Change type of parameter from
182 completion_match to completion_match_result.
183 * symtab.c (compare_symbol_name): Adjust.
184 (completion_list_add_name): Pass the match_for_lcd to the tracker.
185 * symtab.h (ada_lookup_name_info::matches): Change type of
186 parameter from completion_match to completion_match_result.
187 (symbol_name_matcher_ftype): Likewise, and update comments.
188
4024cf2b
PA
1892017-11-29 Pedro Alves <palves@redhat.com>
190
191 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
192 * minsyms.c (msymbol_is_text): Delete.
193 (msymbol_is_function): New function.
194 * minsyms.h (msymbol_is_text): Delete.
195 (msymbol_is_function): New declaration.
196 * symtab.c (find_function_alias_target): Use msymbol_is_function.
197
5dcf52c1
TT
1982017-11-29 Tom Tromey <tom@tromey.com>
199
200 * Makefile.in (distclean): Handle the case where rmdir fails.
201
8ca2f0b9
TT
2022017-11-29 Tom Tromey <tom@tromey.com>
203
204 * symfile.c (_initialize_symfile): Update usage text for
205 add-symbol-file, symbol-file, load.
206
02ca603a
TT
2072017-11-29 Tom Tromey <tom@tromey.com>
208
209 * symfile.c (add_symbol_file_command): Error if some arguments to
210 -s are missing. Change unrecognized-argument error message.
211 (_initialize_symfile): Fix usage text for add-symbol-file.
212
18ca7347
TT
2132017-11-27 Tom Tromey <tom@tromey.com>
214
215 * Makefile.in (REMOTE_OBS): Remove.
216 (SFILES): Remove remote sources.
217 (COMMON_SFILES): Add remote sources.
218 (ALLDEPFILES): Remove dcache.c.
219
66599a7d
TT
2202017-11-27 Tom Tromey <tom@tromey.com>
221
222 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
223 variables.
224 (SFILES): Use SUBDIR_TARGET_SRCS.
225 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
226 (CONFIG_SRC_SUBDIR): Add target.
227 (%.o): Remove target rule.
228
4f04fba8
TT
2292017-11-27 Tom Tromey <tom@tromey.com>
230
231 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
232 registry.o, thread-fsm.o, debug.o.
233 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
234 thread-fsm.c, debug.c.
235
b5adff3b
TT
2362017-11-27 Tom Tromey <tom@tromey.com>
237
238 * Makefile.in (COMMON_SFILES): New.
239 (SFILES): Move some entries to COMMON_SFILES.
240 (COMMON_OBS): Use COMMON_SFILES.
241
afa0a411
TT
2422017-11-27 Tom Tromey <tom@tromey.com>
243
244 * Makefile.in (YYFILES): Update comment.
245 (YYOBJ): Redefine.
246
8fd8d003
TT
2472017-11-27 Tom Tromey <tom@tromey.com>
248
249 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
250 (CONFIG_SRC_SUBDIR): Add python.
251 (%.o): Remove python rule.
252 (python/%.o): New rule.
253 * configure: Rebuild.
254 * configure.ac (CONFIG_OBS): Refer to python/python.o
255
bd810fff
TT
2562017-11-27 Tom Tromey <tom@tromey.com>
257
258 * configure: Rebuild.
259 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
260 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
261 (CONFIG_SRC_SUBDIR): Add guile.
262 (%.o): Remove guile rule.
263
75787ac1
TT
2642017-11-27 Tom Tromey <tom@tromey.com>
265
266 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
267 (%.o): Remove unittests rule.
268 (CONFIG_SRC_SUBDIR): Add unittests.
269
5c8a9431
TT
2702017-11-27 Tom Tromey <tom@tromey.com>
271
272 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
273 (CONFIG_SRC_SUBDIR): Add tui.
274 (%.o): Remove tui rule.
275
a26aa30c
TT
2762017-11-27 Tom Tromey <tom@tromey.com>
277
278 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
279 (%.o): Remove compile rule.
280 (CONFIG_SRC_SUBDIR): Add compile.
281
6f3cdf9a
TT
2822017-11-27 Tom Tromey <tom@tromey.com>
283
284 * Makefile.in (SUBDIR_MI_OBS): Redefine.
285 (%.o): Remove mi rule.
286 (CONFIG_SRC_SUBDIR): Add mi.
287 (COMMON_OBS): Use mi/mi-common.o
288
f06afa53
TT
2892017-11-27 Tom Tromey <tom@tromey.com>
290
291 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
292 (%.o): Remove cli rule.
293 (CONFIG_SRC_SUBDIR): Add cli.
294
b22c88c2
TT
2952017-11-27 Tom Tromey <tom@tromey.com>
296
297 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
298 * configure: Rebuild.
299 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
300 (CONFIG_DEP_SUBDIR): New variable.
301 (%.o): Add order-only dependency.
302 ($(CONFIG_DEP_SUBDIR)): New target.
303
ee9a09e9
DC
3042017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
305
306 PR gdb/21945
307 * findcmd.c (_initialize_mem_search): Update find command help
308 text.
309
e8e7d10c
SM
3102017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
311
312 * python/python.c (do_start_initialization): Change progname
313 type to gdb::unique_xmalloc_ptr. Release the pointer when using
314 Python 2.
315
6a997029
TT
3162017-11-26 Tom Tromey <tom@tromey.com>
317
318 * common/format.h: Add include guards.
319
41272101
TT
3202017-11-26 Tom Tromey <tom@tromey.com>
321
322 * nat/linux-personality.h (class
323 maybe_disable_address_space_randomization): New class.
324 (maybe_disable_address_space_randomization): Don't declare
325 function.
326 * nat/linux-personality.c (restore_personality)
327 (make_disable_asr_cleanup): Remove.
328 (maybe_disable_address_space_randomization): Now a constructor.
329 (~maybe_disable_address_space_randomization): New destructor.
330 * linux-nat.c (linux_nat_create_inferior): Update.
331
44287fd8
TT
3322017-11-26 Tom Tromey <tom@tromey.com>
333
334 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
335
5ffd2cb7
UW
3362017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
337
338 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
339 "cooked" register. Access only first four bytes of branch target
340 registers.
341
0e5457dc
SDJ
3422017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
343
344 PR gdb/22491
345 * stap-probe.c (relocate_address): New function.
346 (stap_probe::get_relocated_address): Use 'relocate_address'.
347 (stap_probe::set_semaphore): Use 'relocate_address' and pass
348 'm_sem_addr'.
349 (stap_probe::clear_semaphore): Likewise.
350
deeeba55
PA
3512017-11-25 Pedro Alves <palves@redhat.com>
352
353 * dictionary.c: Include "safe-ctype.h".
354 * minsyms.c: Include "safe-ctype.h".
355 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
356
a81aaca0
PA
3572017-11-25 Pedro Alves <palves@redhat.com>
358
359 * completer.c (complete_line_internal_1): Skip spaces until the
360 start of the command.
361
0662b6a7
PA
3622017-11-24 Pedro Alves <palves@redhat.com>
363
364 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
365 cp_fq_symbol_name_matches. Pass language_cplus to
366 strncmp_with_mode.
367 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
368 (selftests::test_cp_symbol_name_cmp): New.
369 (_initialize_cp_support): Register "cp_symbol_name_matches"
370 selftests.
371 * language.c (default_symbol_name_matcher): Pass language_minimal
372 to strncmp_iw_with_mode.
373 * utils.c: Include "cp-support.h" and <algorithm>.
374 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
375 (cp_is_operator): New functions.
376 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
377 skip whitespace in the symbol name when the lookup name doesn't
378 have spaces, and vice versa.
379 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
380 * utils.h (strncmp_iw_with_mode): Add language parameter.
381
e547c119
JB
3822017-11-24 Joel Brobecker <brobecker@adacore.com>
383
384 * ada-lang.c (ada_exception_message_1, ada_exception_message):
385 New functions.
386 (print_it_exception): If available, display the exception
387 message as well.
388 * NEWS: Document new feature.
389
d7fcdff9
UW
3902017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
391
392 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
393
30649c14
PR
3942017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
395
396 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
397 (dtrace_probe::is_enabled, dtrace_probe::enable)
398 (dtrace_probe::disable): Remove keyword 'struct' at for-range
399 variable
400 * probe.c (gen_ui_out_table_header_info)
401 (print_ui_out_not_applicables): Remove keyword 'struct' at
402 for-range variable
403
7696f5c9
AH
4042017-11-24 Alan Hayward <alan.hayward@arm.com>
405
406 * configure.tgt: Add arch/aarch64.o
407
8172f16b
SM
4082017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
409
410 * common/common-utils.h: Include poison.h.
411 (xfree): Remove declaration, add definition with static_assert.
412 * common/common-utils.c (xfree): Remove.
413 * common/poison.h (IsMallocatable): Define.
414 (IsFreeable): Define.
415 (free): Delete for non-freeable types.
416 (xnew): New.
417 (XNEW): Undef and redefine.
418 (xcnew): New.
419 (XCNEW): Undef and redefine.
420 (xdelete): New.
421 (XDELETE): Undef and redefine.
422 (xnewvec): New.
423 (XNEWVEC): Undef and redefine.
424 (xcnewvec): New.
425 (XCNEWVEC): Undef and redefine.
426 (xresizevec): New.
427 (XRESIZEVEC): Undef and redefine.
428 (xdeletevec): New.
429 (XDELETEVEC): Undef and redefine.
430 (xnewvar): New.
431 (XNEWVAR): Undef and redefine.
432 (xcnewvar): New.
433 (XCNEWVAR): Undef and redefine.
434 (xresizevar): New.
435 (XRESIZEVAR): Undef and redefine.
436
7aabaf9d
SM
4372017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
438
439 * gdbthread.h (private_thread_info): Define structure type, add
440 virtual pure destructor.
441 (thread_info) <priv>: Change type to unique_ptr.
442 <private_dtor>: Remove.
443 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
444 (private_thread_info::~private_thread_info): Provide default
445 implementation.
446 (thread_info::~thread_info): Don't call private_dtor nor
447 manually free priv.
448 * aix-thread.c (private_thread_info): Rename to ...
449 (aix_thread_info): ... this.
450 (get_aix_thread_info): New.
451 (sync_threadlists): Adjust.
452 (iter_tid): Adjust.
453 (aix_thread_resume): Adjust.
454 (aix_thread_fetch_registers): Adjust.
455 (aix_thread_store_registers): Adjust.
456 (aix_thread_extra_thread_info): Adjust.
457 * darwin-nat.h (private_thread_info): Rename to ...
458 (darwin_thread_info): ... this.
459 (get_darwin_thread_info): New.
460 * darwin-nat.c (darwin_init_thread_list): Adjust.
461 (darwin_check_new_threads): Adjust.
462 (thread_info_from_private_thread_info): Adjust.
463 * linux-thread-db.c (private_thread_info): Rename to ...
464 (thread_db_thread_info): ... this, initialize fields.
465 (get_thread_db_thread_info): New.
466 <dying>: Change type to bool.
467 (update_thread_state): Adjust to type rename.
468 (record_thread): Adjust to type rename an use of unique_ptr.
469 (thread_db_pid_to_str): Likewise.
470 (thread_db_extra_thread_info): Likewise.
471 (thread_db_thread_handle_to_thread_info): Likewise.
472 (thread_db_get_thread_local_address): Likewise.
473 * nto-tdep.h (private_thread_info): Rename to ...
474 (nto_thread_info): ... this, initialize fields.
475 (get_nto_thread_info): New.
476 <name>: Change type to std::string.
477 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
478 use of unique_ptr.
479 * nto-procfs.c (update_thread_private_data_name): Adjust to
480 std::string change, allocate nto_private_thread_info with new.
481 (update_thread_private_data): Adjust to unique_ptr.
482 * remote.c (private_thread_info): Rename to ...
483 (remote_thread_info): ... this, initialize data members with
484 default values.
485 <extra, name>: Change type to std::string.
486 <thread_handle>: Change type to non-pointer.
487 (free_private_thread_info): Remove.
488 (get_private_info_thread): Rename to...
489 (get_remote_thread_info): ... this, change return type, adjust to
490 use of unique_ptr, use remote_thread_info constructor.
491 (remote_add_thread): Adjust.
492 (get_private_info_ptid): Rename to...
493 (get_remote_thread_info): ...this, change return type.
494 (remote_thread_name): Use get_remote_thread_info, adjust to
495 change to std::string.
496 (struct thread_item) <~thread_item>: Remove.
497 <thread_handle>: Make non pointer.
498 (start_thread): Adjust to thread_item::thread_handle type
499 change.
500 (remote_update_thread_list): Adjust to type name change, move
501 strings from temporary to long-lived object instead of
502 duplicating.
503 (remote_threads_extra_info): Use get_remote_thread_info.
504 (process_initial_stop_replies): Likewise.
505 (resume_clear_thread_private_info): Likewise.
506 (remote_resume): Adjust to type name change.
507 (remote_commit_resume): Use get_remote_thread_info.
508 (process_stop_reply): Adjust to type name change.
509 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
510 (remote_stopped_by_hw_breakpoint): Likewise.
511 (remote_stopped_by_watchpoint): Likewise.
512 (remote_stopped_data_address): Likewise.
513 (remote_core_of_thread): Likewise.
514 (remote_thread_handle_to_thread_info): Use
515 get_private_info_thread, adjust to thread_handle field type
516 change.
517
21fe1c75
SM
5182017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
519
520 * remote.c (struct thread_item): Add constructor, disable copy
521 construction and copy assignment, define default move
522 construction and move assignment.
523 <extra, name>: Change type to std::string.
524 <core>: Initialize.
525 <thread_handle>: Make non-pointer.
526 (thread_item_t): Remove typedef.
527 (DEF_VEC_O(thread_item_t)): Remove.
528 (threads_listing_context) <contains_thread>: New method.
529 <remove_thread>: New method.
530 <items>: Change type to std::vector.
531 (clear_threads_listing_context): Remove.
532 (threads_listing_context_remove): Remove.
533 (remote_newthread_step): Use thread_item constructor, adjust to
534 change to std::vector.
535 (start_thread): Use thread_item constructor, adjust to change to
536 std::vector.
537 (end_thread): Adjust to change to std::vector and std::string.
538 (remote_get_threads_with_qthreadinfo): Use thread_item
539 constructor, adjust to std::vector.
540 (remote_update_thread_list): Adjust to change to std::vector and
541 std::string, use threads_listing_context methods.
542 (remove_child_of_pending_fork): Adjust.
543 (remove_new_fork_children): Adjust.
544 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
545 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
546 * unittests/rsp-low-selftests.c: New file.
547 * common/rsp-low.h: Include common/byte-vector.h.
548 (hex2bin): New overload.
549 * common/rsp-low.c (hex2bin): New overload.
550
089354bb
SM
5512017-11-24 Simon Marchi <simon.marchi@ericsson.com>
552
553 * inferior.h (private_inferior): Define structure type, add
554 virtual pure destructor.
555 (inferior) <priv>: Change type to unique_ptr.
556 * inferior.c (private_inferior::~private_inferior): Provide
557 default implementation.
558 (inferior::~inferior): Don't free priv field.
559 (exit_inferior_1): Likewise.
560 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
561 (darwin_exception_info): Remove typedef.
562 (DEF_VEC_O (darwin_thread_t)); Remove.
563 (private_inferior): Rename to ...
564 (darwin_private_inferior): ... this, extend private_inferior.
565 (get_darwin_inferior): New.
566 <threads>: Change type to std::vector of darwin_thread_t pointers.
567 * darwin-nat.c (darwin_check_new_threads): Adjust.
568 (find_inferior_task_it): Adjust.
569 (darwin_find_thread); Adjust.
570 (darwin_suspend_inferior): Adjust.
571 (darwin_resume_inferior): Adjust.
572 (darwin_find_new_inferior): Adjust.
573 (darwin_decode_notify_message): Adjust.
574 (darwin_send_reply): Adjust.
575 (darwin_resume_inferior_threads): Adjust.
576 (darwin_suspend_inferior_threads): Adjust.
577 (darwin_decode_message): Adjust.
578 (darwin_wait): Adjust.
579 (darwin_interrupt): Adjust.
580 (darwin_deallocate_threads): Adjust.
581 (darwin_mourn_inferior): Adjust, don't free private data.
582 (darwin_reply_to_all_pending_messages): Adjust.
583 (darwin_stop_inferior): Adjust.
584 (darwin_setup_exceptions): Adjust.
585 (darwin_kill_inferior): Adjust.
586 (darwin_setup_request_notification): Adjust.
587 (darwin_attach_pid): Adjust.
588 (darwin_init_thread_list): Adjust.
589 (darwin_setup_fake_stop_event): Adjust.
590 (darwin_attach): Adjust.
591 (darwin_detach): Adjust.
592 (darwin_xfer_partial): Adjust.
593 (set_enable_mach_exceptions): Adjust.
594 (darwin_pid_to_exec_file): Adjust.
595 (darwin_get_ada_task_ptid): Adjust.
596 * darwin-nat-info.c (get_task_from_args): Adjust.
597 (info_mach_ports_command): Adjust.
598 (info_mach_region_command): Adjust.
599 (info_mach_exceptions_command): Adjust.
600 * remote.c (private_inferior): Rename to ...
601 (remote_private_inferior): ... this, initialize fields.
602 (get_remote_inferior); New.
603 (remote_commit_resume): Use get_remote_inferior.
604 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
605
d044bac8
PA
6062017-11-24 Pedro Alves <palves@redhat.com>
607
608 * NEWS: Mention linespecs and explicit locations, and completion
609 improvements.
610
e8d58cba
YQ
6112017-11-24 Yao Qi <yao.qi@linaro.org>
612
613 * regcache.c (regcache::dump): Remove footnote_register_size.
614
a63f2d2f
YQ
6152017-11-24 Yao Qi <yao.qi@linaro.org>
616
617 * regcache.c (cooked_read_test): Add more test for readonly
618 regcache.
619
1b30aaa5
YQ
6202017-11-24 Yao Qi <yao.qi@linaro.org>
621
622 * gdbarch-selftests.c (test_target_has_registers): Move it to
623 target.c.
624 (test_target_has_stack): Likewise.
625 (test_target_has_memory): Likewise.
626 (test_target_prepare_to_store): Likewise.
627 (test_target_store_registers): Likewise.
628 (test_target_ops): Likewise.
629 * regcache.c: Include selftest-arch.h and gdbthread.h.
630 (target_ops_no_register): New class.
631 (test_target_fetch_registers): New.
632 (test_target_store_registers): New.
633 (test_target_xfer_partial): New.
634 (readwrite_regcache): New.
635 (cooked_read_test): New.
636 (_initialize_regcache): Register the test.
637 * target.c: (test_target_has_registers): Moved from
638 gdbarch-selftests.c.
639 (test_target_has_stack): Likewise.
640 (test_target_has_memory): Likewise.
641 (test_target_prepare_to_store): Likewise.
642 (test_target_store_registers): Likewise.
643 * target.h (test_target_ops): New class.
644
6654d750
AH
6452017-11-24 Alan Hayward <alan.hayward@arm.com>
646
647 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
648 selftest.
649
49bdb7ee
AH
6502017-11-24 Alan Hayward <alan.hayward@arm.com>
651
652 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
653 * arch/aarch64.c (aarch64_create_target_description): Create
654 new target description.
655 * features/Makefile: Add new files.
656 * features/aarch64.c: Remove file.
657 * features/aarch64-core.c: New autogenerated file.
658 * features/aarch64-fpu.c: New autogenerated file.
659 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
660
6612017-11-24 Alan Hayward <alan.hayward@arm.com>
662
663 * Makefile.in: Add new files.
664 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
665 aarch64_read_description.
666 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
667 Call aarch64_read_description.
668 * aarch64-tdep.c (aarch64_read_description): New function.
669 (aarch64_gdbarch_init): Call aarch64_read_description.
670 * aarch64-tdep.h (aarch64_read_description): New function.
671 * arch/aarch64.c: New file.
672 * configure.tgt: Add new files.
673
98ead37e
YQ
6742017-11-24 Yao Qi <yao.qi@linaro.org>
675
676 * mi/mi-main.c (register_changed_p): Update.
677 * value.c (value_contents_bits_eq): Change return type.
678 (value_contents_eq): Likewise.
679 * value.h: Update comments.
680
62ad7ce7
YQ
6812017-11-24 Yao Qi <yao.qi@linaro.org>
682
683 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
684 local 'changed'. Remove error.
685 (register_changed_p): Change return type to bool.
686
506fe5f4
YQ
6872017-11-24 Yao Qi <yao.qi@linaro.org>
688
689 * arch/tic6x.c: New file.
690 * arch/tic6x.h: New file.
691 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
692 tic6x-core.xml and tic6x-gp.xml.
693 * features/tic6x-c6xp.c: Generated.
694 * features/tic6x-core.c: Generated.
695 * features/tic6x-gp.c: Generated.
696 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
697 "tic6x-".
698
00ea2e2a
SM
6992017-11-23 Simon Marchi <simon.marchi@ericsson.com>
700
701 * mi/mi-main.c (list_available_thread_groups): Change map value
702 type to std::vector.
703
f45e2a77
SM
7042017-11-23 Simon Marchi <simon.marchi@ericsson.com>
705
706 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
707
bd046f64
SM
7082017-11-23 Simon Marchi <simon.marchi@ericsson.com>
709
710 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
711 back to...
712 <children_requested>: ... this.
713 (varobj_get_num_children, varobj_update): Adjust.
714
4c37490d
SM
7152017-11-23 Simon Marchi <simon.marchi@ericsson.com>
716
717 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
718 (ada_value_has_mutated): Likewise.
719 * c-varobj.c (varobj_is_anonymous_child): Likewise.
720 (c_is_path_expr_parent): Likewise.
721 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
722 (mi_cmd_var_set_frozen): Likewise.
723 (mi_cmd_var_update_iter): Likewise.
724 (mi_cmd_var_update): Likewise.
725 * varobj.c (pretty_printing): Likewise.
726 (varobj_enable_pretty_printing): Likewise.
727 (struct varobj_root) <floating, is_valid>: Likewise.
728 (struct varobj_dynamic) <children_requested>: Likewise.
729 (delete_variable): Likewise.
730 (delete_variable_1): Likewise.
731 (install_variable): Likewise.
732 (update_type_if_necessary): Likewise.
733 (install_new_value): Likewise.
734 (value_of_root): Likewise.
735 (is_root_p): Likewise.
736 (varobj_create): Likewise.
737 (varobj_delete): Likewise.
738 (varobj_has_more): Likewise.
739 (varobj_set_frozen): Likewise.
740 (varobj_get_frozen): Likewise.
741 (install_dynamic_child): Likewise.
742 (dynamic_varobj_has_child_method): Likewise.
743 (update_dynamic_varobj_children): Likewise.
744 (varobj_get_num_children): Likewise.
745 (varobj_list_children): Likewise.
746 (is_path_expr_parent): Likewise.
747 (varobj_default_is_path_expr_parent): Likewise.
748 (varobj_is_dynamic_p): Likewise.
749 (varobj_set_value): Likewise.
750 (varobj_value_has_mutated): Likewise.
751 (varobj_update): Likewise.
752 (check_scope): Likewise.
753 (value_of_root_1): Likewise.
754 (varobj_value_get_print_value): Likewise.
755 (varobj_editable_p): Likewise.
756 (varobj_value_is_changeable_p): Likewise.
757 (varobj_floating_p): Likewise.
758 (varobj_default_value_is_changeable_p): Likewise.
759 (varobj_invalidate_iter): Likewise.
760 * varobj.h (struct varobj_update_result) <type_changed,
761 children_changed, changed, value_installed>: Likewise.
762 (struct varobj) <updated, frozen, not_fetched>: Likewise.
763 (struct lang_varobj_ops) <value_is_changeable_p,
764 value_has_mutated, is_path_expr_parent>: Likewise.
765 (varobj_delete): Likewise.
766 (varobj_set_frozen): Likewise.
767 (varobj_get_frozen): Likewise.
768 (varobj_set_value): Likewise.
769 (varobj_update): Likewise.
770 (varobj_editable_p): Likewise.
771 (varobj_floating_p): Likewise.
772 (varobj_has_more): Likewise.
773 (varobj_is_dynamic_p): Likewise.
774 (varobj_default_value_is_changeable_p): Likewise.
775 (varobj_value_is_changeable_p): Likewise.
776 (varobj_is_anonymous_child): Likewise.
777 (varobj_default_is_path_expr_parent): Likewise.
778
9c23b42f
SDJ
7792017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
780
781 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
782 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
783 <type_str>: Convert to 'std::string'.
784 <expr>: Convert to 'expression_up'.
785 (dtrace_probe_arg_s): Delete type and VEC.
786 (dtrace_probe_enabler_s): Likewise.
787 (struct dtrace_probe): Replace by...
788 (class dtrace_static_probe_ops): ...this and...
789 (class dtrace_probe): ...this.
790 (dtrace_probe_is_linespec): Rename to...
791 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
792 to reflect change.
793 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
794 Adjust code. Create new instance of 'dtrace_probe'.
795 (dtrace_build_arg_exprs): Rename to...
796 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
797 reflect change.
798 (dtrace_get_probes): Rename to...
799 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
800 to reflect change.
801 (dtrace_get_arg): Rename to...
802 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
803 reflect change.
804 (dtrace_probe_is_enabled): Rename to...
805 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
806 change.
807 (dtrace_get_probe_address): Rename to...
808 (dtrace_probe::get_relocated_address): ...this. Adjust code
809 to reflect change.
810 (dtrace_get_probe_argument_count): Rename to...
811 (dtrace_probe::get_argument_count): ...this. Adjust code to
812 reflect change.
813 (dtrace_can_evaluate_probe_arguments): Rename to...
814 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
815 to reflect change.
816 (dtrace_evaluate_probe_argument): Rename to...
817 (dtrace_probe::evaluate_argument): ...this. Adjust code to
818 reflect change.
819 (dtrace_compile_to_ax): Rename to...
820 (dtrace_probe::compile_to_ax): ...this. Adjust code to
821 reflect change.
822 (dtrace_probe_destroy): Delete.
823 (dtrace_type_name): Rename to...
824 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
825 reflect change.
826 (dtrace_probe::get_static_ops): New method.
827 (dtrace_gen_info_probes_table_header): Rename to...
828 (dtrace_static_probe_ops::gen_info_probes_table_header):
829 ...this. Adjust code to reflect change.
830 (dtrace_gen_info_probes_table_values): Rename to...
831 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
832 code to reflect change.
833 (dtrace_enable_probe): Rename to...
834 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
835 change.
836 (dtrace_disable_probe): Rename to...
837 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
838 change.
839 (struct probe_ops dtrace_probe_ops): Delete.
840 (info_probes_dtrace_command): Call 'info_probes_for_spops'
841 instead of 'info_probes_for_ops'.
842 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
843 of 'all_probe_ops'.
844
0e9ae10f
SDJ
8452017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
846 Simon Marchi <simark@simark.ca>
847
848 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
849 variable.
850 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
851 <aexpr>: Change type to 'expression_up'.
852 (stap_probe_arg_s): Delete type and VEC.
853 (struct stap_probe): Delete. Replace by...
854 (class stap_static_probe_ops): ...this and...
855 (class stap_probe): ...this. Rename variables to add 'm_'
856 prefix. Do not use 'union' for arguments anymore.
857 (stap_get_expected_argument_type): Receive probe name instead
858 of 'struct stap_probe'. Adjust code.
859 (stap_parse_probe_arguments): Rename to...
860 (stap_probe::parse_arguments): ...this. Adjust code to
861 reflect change.
862 (stap_get_probe_address): Rename to...
863 (stap_probe::get_relocated_address): ...this. Adjust code
864 to reflect change.
865 (stap_get_probe_argument_count): Rename to...
866 (stap_probe::get_argument_count): ...this. Adjust code
867 to reflect change.
868 (stap_get_arg): Rename to...
869 (stap_probe::get_arg_by_number'): ...this. Adjust code to
870 reflect change.
871 (can_evaluate_probe_arguments): Rename to...
872 (stap_probe::can_evaluate_arguments): ...this. Adjust code
873 to reflect change.
874 (stap_evaluate_probe_argument): Rename to...
875 (stap_probe::evaluate_argument): ...this. Adjust code
876 to reflect change.
877 (stap_compile_to_ax): Rename to...
878 (stap_probe::compile_to_ax): ...this. Adjust code to
879 reflect change.
880 (stap_probe_destroy): Delete.
881 (stap_modify_semaphore): Adjust comment.
882 (stap_set_semaphore): Rename to...
883 (stap_probe::set_semaphore): ...this. Adjust code to reflect
884 change.
885 (stap_clear_semaphore): Rename to...
886 (stap_probe::clear_semaphore): ...this. Adjust code to
887 reflect change.
888 (stap_probe::get_static_ops): New method.
889 (handle_stap_probe): Adjust code to create instance of
890 'stap_probe'.
891 (stap_get_probes): Rename to...
892 (stap_static_probe_ops::get_probes): ...this. Adjust code to
893 reflect change.
894 (stap_probe_is_linespec): Rename to...
895 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
896 reflect change.
897 (stap_type_name): Rename to...
898 (stap_static_probe_ops::type_name): ...this. Adjust code to
899 reflect change.
900 (stap_gen_info_probes_table_header): Rename to...
901 (stap_static_probe_ops::gen_info_probes_table_header):
902 ...this. Adjust code to reflect change.
903 (stap_gen_info_probes_table_values): Rename to...
904 (stap_probe::gen_info_probes_table_values): ...this. Adjust
905 code to reflect change.
906 (struct probe_ops stap_probe_ops): Delete.
907 (info_probes_stap_command): Use 'info_probes_for_spops'
908 instead of 'info_probes_for_ops'.
909 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
910 of 'all_probe_ops'.
911
935676c9
SDJ
9122017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
913
914 * break-catch-throw.c (fetch_probe_arguments): Use
915 'probe.prob' instead of 'probe.probe'.
916 * breakpoint.c (create_longjmp_master_breakpoint): Call
917 'can_evaluate_arguments' and 'get_relocated_address' methods
918 from probe.
919 (create_exception_master_breakpoint): Likewise.
920 (add_location_to_breakpoint): Use 'sal->prob' instead of
921 'sal->probe'.
922 (bkpt_probe_insert_location): Call 'set_semaphore' method from
923 probe.
924 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
925 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
926 of 'probe_ops'.
927 (probe_key_free): Call 'delete' on probe.
928 (check_exception_resume): Use 'probe.prob' instead of
929 'probe.probe'.
930 * location.c (string_to_event_location_basic): Call
931 'probe_linespec_to_static_ops'.
932 * probe.c (class any_static_probe_ops): New class.
933 (any_static_probe_ops any_static_probe_ops): New variable.
934 (parse_probes_in_pspace): Receive 'static_probe_ops' as
935 argument. Adjust code to reflect change.
936 (parse_probes): Use 'static_probe_ops' instead of
937 'probe_ops'. Adjust code to reflect change.
938 (find_probes_in_objfile): Call methods to get name and
939 provider from probe.
940 (find_probe_by_pc): Use 'result.prob' instead of
941 'result.probe'. Call 'get_relocated_address' method from
942 probe.
943 (collect_probes): Adjust comment and argument list to receive
944 'static_probe_ops' instead of 'probe_ops'. Adjust code to
945 reflect change. Call necessary methods from probe.
946 (compare_probes): Call methods to get name and provider from
947 probes.
948 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
949 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
950 adjust code accordingly.
951 (print_ui_out_not_applicables): Likewise.
952 (info_probes_for_ops): Rename to...
953 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
954 as argument instead of 'probe_ops'. Adjust code. Call
955 necessary methods from probe.
956 (info_probes_command): Use 'info_probes_for_spops'.
957 (enable_probes_command): Pass correct argument to
958 'collect_probes'. Call methods from probe.
959 (disable_probes_command): Likewise.
960 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
961 (get_probe_argument_count): Move to
962 'any_static_probe_ops::get_argument_count'.
963 (can_evaluate_probe_arguments): Move to
964 'any_static_probe_ops::can_evaluate_arguments'.
965 (evaluate_probe_argument): Move to
966 'any_static_probe_ops::evaluate_argument'.
967 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
968 'probe.probe'.
969 (probe_linespec_to_ops): Rename to...
970 (probe_linespec_to_static_ops): ...this. Adjust code.
971 (probe_any_is_linespec): Rename to...
972 (any_static_probe_ops::is_linespec): ...this.
973 (probe_any_get_probes): Rename to...
974 (any_static_probe_ops::get_probes): ...this.
975 (any_static_probe_ops::type_name): New method.
976 (any_static_probe_ops::gen_info_probes_table_header): New
977 method.
978 (compute_probe_arg): Use 'pc_probe.prob' instead of
979 'pc_probe.probe'. Call methods from probe.
980 (compile_probe_arg): Likewise.
981 (std::vector<const probe_ops *> all_probe_ops): Delete.
982 (std::vector<const static_probe_ops *> all_static_probe_ops):
983 New variable.
984 (_initialize_probe): Use 'all_static_probe_ops' instead of
985 'all_probe_ops'.
986 * probe.h (struct info_probe_column) <field_name>: Delete
987 extraneous newline
988 (info_probe_column_s): Delete type and VEC.
989 (struct probe_ops): Delete. Replace with...
990 (class static_probe_ops): ...this and...
991 (clas probe): ...this.
992 (struct bound_probe) <bound_probe>: Delete extraneous
993 newline. Adjust constructor to receive 'probe' instead of
994 'struct probe'.
995 <probe>: Rename to...
996 <prob>: ...this. Delete extraneous newline.
997 <objfile>: Delete extraneous newline.
998 (register_probe_ops): Delete unused prototype.
999 (info_probes_for_ops): Rename to...
1000 (info_probes_for_spops): ...this. Adjust comment.
1001 (get_probe_address): Move to 'probe::get_address'.
1002 (get_probe_argument_count): Move to
1003 'probe::get_argument_count'.
1004 (can_evaluate_probe_arguments): Move to
1005 'probe::can_evaluate_arguments'.
1006 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1007 * solib-svr4.c (struct svr4_info): Adjust comment.
1008 (struct probe_and_action) <probe>: Rename to...
1009 <prob>: ...this.
1010 (register_solib_event_probe): Receive 'probe' instead of
1011 'struct probe' as argument. Use 'prob' instead of 'probe'
1012 when applicable.
1013 (solib_event_probe_action): Call 'get_argument_count' method
1014 from probe. Adjust comment.
1015 (svr4_handle_solib_event): Adjust comment. Call
1016 'evaluate_argument' method from probe.
1017 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1018 from probe.
1019 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1020 'struct probe'. Call 'can_evaluate_arguments' from probe.
1021 * symfile.h: Forward declare 'class probe' instead of 'struct
1022 probe'.
1023 * symtab.h: Likewise.
1024 (struct symtab_and_line) <probe>: Rename to...
1025 <prob>: ...this.
1026 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1027 Call probe methods.
1028 (stop_tracing): Likewise.
1029
8f6cb6c3
JB
10302017-11-22 Joel Brobecker <brobecker@adacore.com>
1031
1032 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1033 trailing newline at end of string in call to warning.
1034
479f8de1
SM
10352017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1036
1037 * osdata.h: Include vector isntead of vec.h.
1038 (osdata_column_s): Remove typedef.
1039 (struct osdata_column): Add constructor.
1040 <name, value>: Change type to std::string.
1041 (DEF_VEC_O (osdata_column_s)): Remove.
1042 (osdata_item_s): Remove typedef.
1043 (struct osdata_item) <columns>: Change type to std::vector.
1044 (DEF_VEC_O (osdata_item_s)): Remove.
1045 (struct osdata): Add constructor.
1046 <type>: Change type to std::string.
1047 <items>: Change type to std::vector.
1048 (osdata_p): Remove typedef.
1049 (DEF_VEC_P (osdata_p)): Remove.
1050 (osdata_parse): Return a unique_ptr.
1051 (osdata_free): Remove.
1052 (make_cleanup_osdata_free): Remove.
1053 (get_osdata): Return a unique_ptr.
1054 (get_osdata_column): Return pointer to std::string, take a
1055 reference to osdata_item as parameter.
1056 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1057 unique_ptr.
1058 <property_name>: Change type to std::string.
1059 (osdata_start_osdata): Allocate osdata with new and adjust.
1060 (osdata_start_item): Adjust.
1061 (osdata_start_column): Adjust.
1062 (osdata_end_column): Adjust.
1063 (clear_parsing_data): Remove.
1064 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1065 (osdata_item_clear): Remove.
1066 (get_osdata): return a unique_ptr and adjust.
1067 (get_osdata_column): Return a pointer to std::string and adjust.
1068 (info_osdata): Adjust.
1069 * mi/mi-main.c: Include <map>.
1070 (free_vector_of_osdata_items): Remove.
1071 (list_available_thread_groups): Adjust, use std::map instead of
1072 splay tree.
1073
41bd68f5
SM
10742017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1075
1076 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1077 case in switch.
1078
7e2fd2f4
SM
10792017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1080
1081 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1082
0604393c
SM
10832017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1084
1085 * varobj.h (struct varobj_update_result): Add constructor, add
1086 move constructor, disable copy and assign, initialize fields.
1087 <newobj>: Change type to std::vector.
1088 (varobj_update): Return std::vector.
1089 * varobj.c (install_dynamic_child): Change VEC parameters to
1090 std::vector and adjust.
1091 (update_dynamic_varobj_children): Likewise.
1092 (varobj_update): Return std::vector and adjust.
1093 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1094
ddf0ea08
SM
10952017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * varobj.h (struct varobj) <parent>: Remove const.
1098 <children>: Change type to std::vector.
1099 (varobj_list_children): Return std::vector const reference.
1100 (varobj_restrict_range): Change parameter type to std::vector
1101 const reference.
1102 * varobj.c (varobj_has_more): Adjust.
1103 (varobj_restrict_range): Change parameter type to std::vector
1104 const reference and adjust.
1105 (install_dynamic_child): Adjust.
1106 (update_dynamic_varobj_children): Adjust.
1107 (varobj_list_children): Return std::vector const reference and
1108 adjust.
1109 (varobj_add_child): Adjust.
1110 (update_type_if_necessary): Adjust.
1111 (varobj_update): Adjust.
1112 (delete_variable_1): Adjust.
1113 * ada-varobj.c (ada_value_has_mutated): Adjust.
1114 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1115
9e5b9d2b
SM
11162017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1117
1118 * varobj.h (struct varobj): Add constructor and destructor,
1119 initialize fields.
1120 * varobj.c (struct varobj_root): Initialize fields.
1121 (struct varobj_dynamic): Initialize fields.
1122 (varobj_create): Use unique_ptr instead of cleanup. Create
1123 varobj with new instead of new_root_variable.
1124 (delete_variable_1): Free variable with delete instead of
1125 free_variable.
1126 (create_child_with_value): Create variable with new instead of
1127 new_variable.
1128 (varobj::varobj): New.
1129 (varobj::~varobj): New (body mostly coming from free_variable).
1130 (new_variable): Remove.
1131 (free_variable): Remove.
1132 (do_free_variable_cleanup): Remove.
1133 (make_cleanup_free_variable): Remove.
1134
fc35dab1
UW
11352017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1136
1137 * core-regset.c: Remove file.
1138 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1139
2400729e
UW
11402017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1141
1142 * NEWS: Document use of GNU MPFR.
1143 * README: Likewise.
1144
1145 * Makefile.in (LIBMPFR): Add define.
1146 (CLIBS): Add $(LIBMPFR).
1147 * configure.ac: Add --with-mpfr configure option.
1148 * configure: Regenerate.
1149 * config.in: Regenerate.
1150
1151 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1152 (class mpfr_float_ops): New type.
1153 (mpfr_float_ops::from_target): Two new overloaded functions.
1154 (mpfr_float_ops::to_target): Likewise.
1155 (mpfr_float_ops::to_string): New function.
1156 (mpfr_float_ops::from_string): Likewise.
1157 (mpfr_float_ops::to_longest): Likewise.
1158 (mpfr_float_ops::from_longest): Likewise.
1159 (mpfr_float_ops::from_ulongest): Likewise.
1160 (mpfr_float_ops::to_host_double): Likewise.
1161 (mpfr_float_ops::from_host_double): Likewise.
1162 (mpfr_float_ops::convert): Likewise.
1163 (mpfr_float_ops::binop): Likewise.
1164 (mpfr_float_ops::compare): Likewise.
1165 (get_target_float_ops): Use mpfr_float_ops if available.
1166
7a26362d
UW
11672017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1168
1169 * target-float.c: Do not include <math.h>.
1170 Include <cmath> and <limits>.
1171 (DOUBLEST): Do not define.
1172 (class target_float_ops): New type.
1173 (class host_float_ops): New templated type.
1174 (class decimal_float_ops): New type.
1175
1176 (floatformat_to_doublest): Rename to ...
1177 (host_float_ops<T>::from_target): ... this. Use template type T
1178 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1179 (host_float_ops<T>::from_target): New overload using a type argument.
1180 (floatformat_from_doublest): Rename to ...
1181 (host_float_ops<T>::to_target): ... this. Use template type T
1182 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1183 (host_float_ops<T>::to_target): New overload using a type argument.
1184 (floatformat_printf_format): New function.
1185 (struct printf_length_modifier): New templated type.
1186 (floatformat_to_string): Rename to ...
1187 (host_float_ops<T>::to_string): ... this. Use type instead of
1188 floatformat argument. Use floatformat_printf_format and
1189 printf_length_modifier. Remove special handling of invalid numbers,
1190 infinities and NaN (moved to target_float_to_string).
1191 (struct scanf_length_modifier): New templated type.
1192 (floatformat_from_string): Rename to ...
1193 (host_float_ops<T>::from_string): ... this. Use type instead of
1194 floatformat argument. Use scanf_length_modifier.
1195 (floatformat_to_longest): Rename to ...
1196 (host_float_ops<T>::to_longest): ... this. Use type instead of
1197 floatformat argument. Handle out-of-range values deterministically.
1198 (floatformat_from_longest): Rename to ...
1199 (host_float_ops<T>::from_longest): ... this. Use type instead of
1200 floatformat argument.
1201 (floatformat_from_ulongest): Rename to ...
1202 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1203 floatformat argument.
1204 (floatformat_to_host_double): Rename to ...
1205 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1206 floatformat argument.
1207 (floatformat_from_host_double): Rename to ...
1208 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1209 floatformat argument.
1210 (floatformat_convert): Rename to ...
1211 (host_float_ops<T>::convert): ... this. Use type instead of
1212 floatformat arguments. Remove handling of no-op conversions.
1213 (floatformat_binop): Rename to ...
1214 (host_float_ops<T>::binop): ... this. Use type instead of
1215 floatformat arguments.
1216 (floatformat_compare): Rename to ...
1217 (host_float_ops<T>::compare): ... this. Use type instead of
1218 floatformat arguments.
1219
1220 (match_endianness): Use type instead of length/byte_order arguments.
1221 (set_decnumber_context): Likewise.
1222 (decimal_from_number): Likewise. Update calls.
1223 (decimal_to_number): Likewise.
1224 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1225 (decimal_float_ops::to_host_double): New dummy function.
1226 (decimal_float_ops::from_host_double): Likewise.
1227 (decimal_to_string): Rename to ...
1228 (decimal_float_ops::to_string): ... this. Use type instead of
1229 length/byte_order arguments. Update calls.
1230 (decimal_from_string): Rename to ...
1231 (decimal_float_ops::from_string): ... this. Use type instead of
1232 length/byte_order arguments. Update calls.
1233 (decimal_from_longest): Rename to ...
1234 (decimal_float_ops::from_longest): ... this. Use type instead of
1235 length/byte_order arguments. Update calls.
1236 (decimal_from_ulongest): Rename to ...
1237 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1238 length/byte_order arguments. Update calls.
1239 (decimal_to_longest): Rename to ...
1240 (decimal_float_ops::to_longest): ... this. Use type instead of
1241 length/byte_order arguments. Update calls.
1242 (decimal_binop): Rename to ...
1243 (decimal_float_ops::binop): ... this. Use type instead of
1244 length/byte_order arguments. Update calls.
1245 (decimal_compare): Rename to ...
1246 (decimal_float_ops::compare): ... this. Use type instead of
1247 length/byte_order arguments. Update calls.
1248 (decimal_convert): Rename to ...
1249 (decimal_float_ops::convert): ... this. Use type instead of
1250 length/byte_order arguments. Update calls.
1251
1252 (target_float_same_category_p): New function.
1253 (target_float_same_format_p): Likewise.
1254 (target_float_format_length): Likewise.
1255 (enum target_float_ops_kind): New type.
1256 (get_target_float_ops_kind): New function.
1257 (get_target_float_ops): Three new overloaded functions.
1258
1259 (target_float_is_zero): Update call.
1260 (target_float_to_string): Add special handling of invalid numbers,
1261 infinities and NaN (moved from floatformat_to_string). Use
1262 target_float_ops callback.
1263 (target_float_from_string): Use target_float_ops callback.
1264 (target_float_to_longest): Likewise.
1265 (target_float_from_longest): Likewise.
1266 (target_float_from_ulongest): Likewise.
1267 (target_float_to_host_double): Likewise.
1268 (target_float_from_host_double): Likewise.
1269 (target_float_convert): Add special case for no-op conversions.
1270 Use target_float_ops callback.
1271 (target_float_binop): Use target_float_ops callback.
1272 (target_float_compare): Likewise.
1273
a9f26f60
YQ
12742017-11-22 Yao Qi <yao.qi@linaro.org>
1275
1276 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1277
29f9a567
YQ
12782017-11-22 Yao Qi <yao.qi@linaro.org>
1279
1280 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1281 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1282
3b1b69bf
JG
12832017-11-21 Jerome Guitton <guitton@adacore.com>
1284
1285 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1286 with event ptid from the lower layer before doing the
1287 ravenscar-specific update.
1288
54aa6c67
JB
12892017-11-21 Joel Brobecker <brobecker@adacore.com>
1290
1291 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1292 the ptid's TID is nonzero.
1293
cf3fbed4
JB
12942017-11-21 Joel Brobecker <brobecker@adacore.com>
1295
1296 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1297 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1298 Make non-static. Change return type to char *. Adjust code
1299 accordingly. Rewrite the function's documentation.
1300 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1301 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1302 we have enough debugging information in the runtime to support
1303 Ada task debugging before we enable the ravenscar-thread layer.
1304
9edcc12f
JB
13052017-11-21 Joel Brobecker <brobecker@adacore.com>
1306
1307 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1308 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1309 * ravenscar-thread.c: Add into comment.
1310 (base_magic_null_ptid): Delete.
1311 (base_ptid): Change documentation.
1312 (ravenscar_active_task): Renames ravenscar_running_thread.
1313 All callers updated throughout.
1314 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1315 (ravenscar_task_is_currently_active): Likewise.
1316 (get_base_thread_from_ravenscar_task): Ditto.
1317 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1318 (ravenscar_runtime_initialized): Likewise.
1319 (get_running_thread_id): Add new parameter "cpu". Adjust
1320 implementation to handle this new parameter.
1321 (ravenscar_fetch_registers): Small adjustment to use
1322 is_ravenscar_task and ravenscar_task_is_currently_active in
1323 order to decide whether to use the target beneath or this
1324 module's arch_ops.
1325 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1326 (ravenscar_stopped_by_sw_breakpoint): Use
1327 get_base_thread_from_ravenscar_task to get the underlying
1328 thread, rather than using base_ptid.
1329 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1330 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1331 Likewise.
1332 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1333
65d40437
JB
13342017-11-21 Joel Brobecker <brobecker@adacore.com>
1335
1336 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1337 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1338 (get_tcb_types_info): Set fieldnos.base_cpu.
1339 (read_atcb): Set task_info->base_cpu.
1340 (info_task): Print "Base CPU" info if set by runtime.
1341
e02544b2
JB
13422017-11-21 Joel Brobecker <brobecker@adacore.com>
1343
1344 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1345 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1346 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1347 New functions.
1348 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1349 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1350 to_stopped_data_address and to_core_of_thread fields of
1351 ravenscar_ops.
1352
ed0f4273
UW
13532017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1354
1355 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1356 (struct gdbarch_tdep): New member long_double_abi.
1357 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1358 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1359 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1360 format depending on long_double_abi tdep member.
1361 (ppc_floatformat_for_type): Handle __ibm128 type.
1362
0fc76421
SM
13632017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1364
1365 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1366
e6b2f5ef
PA
13672017-11-21 Pedro Alves <palves@redhat.com>
1368
1369 * dwarf2read.c (mapped_index::find_name_components_bounds)
1370 <completion mode, upper bound>: Use std::lower_bound instead of
1371 std::upper_bound.
1372 (test_mapped_index_find_name_component_bounds): Remove incorrect
1373 "t1_fund" from expected symbols.
1374
5c58de74
PA
13752017-11-21 Pedro Alves <palves@redhat.com>
1376
1377 * dwarf2read.c (mapped_index::name_components_casing): New field.
1378 (mapped_index) <build_name_components,
1379 find_name_components_bounds): Declare new methods.
1380 (mapped_index::find_name_components_bounds)
1381 (mapped_index::build_name_components): New methods, factored out
1382 from dw2_expand_symtabs_matching_symbol.
1383 (check_find_bounds_finds)
1384 (test_mapped_index_find_name_component_bounds): New.
1385 (run_test): Rename to ...
1386 (test_dw2_expand_symtabs_matching_symbol): ... this.
1387 (run_test): Reimplement.
1388
e1ef7d7a
PA
13892017-11-21 Pedro Alves <palves@redhat.com>
1390
1391 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1392 (symbol_end): Use cp_ident_is_alnum.
1393 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1394 * dwarf2read.c (make_sort_after_prefix_name): New function.
1395 (dw2_expand_symtabs_matching_symbol): Use it.
1396 (test_symbols): Add more symbols.
1397 (run_test): Add tests.
1398
cf724bc9
TT
13992017-11-17 Tom Tromey <tom@tromey.com>
1400
1401 * symtab.h (enum symbol_subclass_kind): New.
1402 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1403 Remove.
1404 <subclass>: New member.
1405 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1406 * rust-lang.c (rust_get_trait_object_pointer): Update.
1407 * dwarf2read.c (read_func_scope): Update.
1408 (read_variable): Update.
1409
68e745e3
TT
14102017-11-17 Tom Tromey <tom@tromey.com>
1411
1412 * dwarf2read.c (read_func_scope): Update.
1413 * symtab.h (struct template_symbol): Derive from symbol.
1414 <base>: Remove.
1415
71a3c369
TT
14162017-11-17 Tom Tromey <tom@tromey.com>
1417
1418 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1419 (struct rust_vtable_symbol): New.
1420 (find_symbol_at_address): Declare.
1421 * symtab.c (find_symbol_at_address): New function.
1422 * symfile.h (struct quick_symbol_functions)
1423 <find_compunit_symtab_by_address>: New member.
1424 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1425 function.
1426 (debug_sym_quick_functions): Link to
1427 debug_qf_find_compunit_symtab_by_address.
1428 * rust-lang.c (rust_get_trait_object_pointer): New function.
1429 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1430 rust_get_trait_object_pointer.
1431 * psymtab.c (psym_relocate): Clear psymbol_map.
1432 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1433 functions.
1434 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1435 * objfiles.h (struct objfile) <psymbol_map>: New member.
1436 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1437 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1438 (rust_containing_type, read_variable): New functions.
1439
7468702d
SM
14402017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1441
1442 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1443
37269bc9
SM
14442017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1445
1446 * common/filestuff.c: Include <algorithm>.
1447 (open_fds): Change type to std::vector<int>.
1448 (do_mark_open_fd): Adjust.
1449 (unmark_fd_no_cloexec): Adjust.
1450 (do_close): Adjust.
1451
5c632425
SM
14522017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * breakpoint.c (output_thread_groups): Take an std::vector.
1455 (print_one_breakpoint_location): Adjust.
1456
ced9779b
JB
14572017-11-17 Joel Brobecker <brobecker@adacore.com>
1458
1459 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1460 (ada_evaluate_subexp_for_cast): New function.
1461 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1462 ada_evaluate_subexp_for_cast.
1463 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1464 eval_skip_value.
1465 * eval.c (evaluate_var_value): Make non-static.
1466 (evaluate_var_msym_value, eval_skip_value): Likewise.
1467 * value.h (evaluate_var_value, evaluate_var_msym_value)
1468 (eval_skip_value): Declare.
1469
b7e22850
JB
14702017-11-16 Joel Brobecker <brobecker@adacore.com>
1471
1472 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1473 Update all callers.
1474
9ccabccd
PA
14752017-11-16 Pedro Alves <palves@redhat.com>
1476
1477 * python/py-unwind.c (pyuw_sniffer): Translate
1478 PyExc_KeyboardInterrupt to a GDB Quit exception.
1479
d930703d
PA
14802017-11-16 Pedro Alves <palves@redhat.com>
1481
1482 * infrun.c (resume_cleanups): Delete.
1483 (resume): No longer install a resume_cleanups cleanup nor call
1484 QUIT.
1485 (proceed): Pass the terminal to the inferior.
1486 (keep_going_pass_signal): No longer install a resume_cleanups
1487 cleanup.
1488
38dc2859
PA
14892017-11-16 Pedro Alves <palves@redhat.com>
1490
1491 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1492 if the prompt is blocked.
1493
688fca4f
PA
14942017-11-16 Pedro Alves <palves@redhat.com>
1495
1496 * breakpoint.c (insert_bp_location): Replace bp_err and
1497 bp_err_message locals by a gdb_exception local.
1498
e2c33ac7
PA
14992017-11-16 Pedro Alves <palves@redhat.com>
1500
1501 * inflow.c (scoped_ignore_sigttou): New class.
1502 (child_terminal_ours_1, new_tty): Use it.
1503
d7236961
UW
15042017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1505
1506 * target-float.c (decimal_from_number): Add byte_order argument and
1507 call match_endianness. Error if unknown floating-point type.
1508 (decimal_to_number): Add byte_order argument and call match_endianness.
1509 (decimal_from_longest): Update call. Do not call match_endianness.
1510 (decimal_from_ulongest): Likewise.
1511 (decimal_binop): Likewise.
1512 (decimal_is_zero): Likewise.
1513 (decimal_compare): Likewise.
1514 (decimal_convert): Likewise.
1515
d8ae99a7
PM
15162017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1517
1518 * python/python.c (gdbpy_rbreak): New function.
1519 * NEWS: Document Python rbreak feature.
1520
c632b645
YQ
15212017-11-16 Yao Qi <yao.qi@linaro.org>
1522
1523 * features/tic6x-c62x.xml: Remove.
1524 * features/tic6x-c64x.xml: Remove.
1525 * features/tic6x-c64xp.xml: Remove.
1526
a014b87a
JB
15272017-11-15 John Baldwin <jhb@FreeBSD.org>
1528
1529 * symtab.h: Include <array>.
1530
94765011
JB
15312017-11-15 John Baldwin <jhb@FreeBSD.org>
1532
1533 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1534 (bsd_kvm_proc_cmd): Likewise.
1535
625ad440
SM
15362017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1537
1538 * tui/tui-win.c (window_name_completer): Replace VEC with
1539 std::vector.
1540
c0c11fa9
AC
15412017-11-15 Andrew Cagney <cagney@gnu.org>
1542
1543 * MAINTAINERS: Remove no-longer applicable entries.
1544
34a7ebaf
AC
15452017-11-15 Andrew Cagney <cagney@gnu.org>
1546
1547 * MAINTAINERS: Move self to Past Maintainers.
1548
5334ef39
YQ
15492017-11-15 Yao Qi <yao.qi@linaro.org>
1550
1551 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1552 * features/nios2-linux.c: Remove.
1553 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1554 initialize_tdesc_nios2_linux.
1555
a714b0d6
YQ
15562017-11-15 Yao Qi <yao.qi@linaro.org>
1557
1558 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1559 M68HC11_LAST_HARD_REG + 1.
1560
92ffd475
PC
15612017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1562
1563 PR gdb/22388
1564 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1565 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1566 Return TARGET_XFER_EOF if size of returned data is 0.
1567
07431908
SM
15682017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1569
1570 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1571 memory-map-selftests.c.
1572 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1573 * memory-map.c (memory_map_start_memory): Fix computation of hi
1574 address.
1575 * unittests/memory-map-selftests.c: New file.
1576
31432a67
JB
15772017-11-09 Joel Brobecker <brobecker@adacore.com>
1578
1579 * ada-lang.c: Fix some typos in the general command documenting
1580 how Ada expressions are being evaluated and how their result
1581 is printed.
1582
e793c052
TT
15832017-11-09 Tom Tromey <tom@tromey.com>
1584
1585 * psymtab.c (psymbol_hash): Do not hash string contents.
1586 (psymbol_compare): Add comment.
1587
7e8835c5
TT
15882017-11-09 Tom Tromey <tom@tromey.com>
1589
1590 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1591
286acbb5
JB
15922017-11-08 Joel Brobecker <brobecker@adacore.com>
1593
1594 * ada-exp.y (write_var_from_sym): Remove parameter
1595 "orig_left_context". Update all callers.
1596
b44ec619
SM
15972017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * tracepoint.h (class collection_list) <stringify>: Return
1600 std::vector<std::string>.
1601 (encode_actions_rsp): Change parameters to
1602 std::vector<std::string> *.
1603 * tracepoint.c (collection_list::stringify): Return
1604 std::vector<std::string> and adjust accordingly.
1605 (encode_actions_rsp): Changee parameters to
1606 std::vector<std::string> and adjust accordingly.
1607 * remote.c (free_actions_list),
1608 free_actions_list_cleanup_wrapper): Remove.
1609 (remote_download_tracepoint): Adjust to std::vector.
1610
2f4732b0
TT
16112017-11-08 Tom Tromey <tom@tromey.com>
1612
1613 * dwarf2read.c (symbolp): Remove typedef.
1614 (read_func_scope): Use std::vector.
1615 (process_structure_scope): Use std::vector.
1616
f9d67a22
PA
16172017-11-08 Pedro Alves <palves@redhat.com>
1618
1619 * ada-lang.c (ada_make_symbol_completion_list): Use
1620 completion_skip_symbol.
1621 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1622 (symbol_is_function_or_method(symbol*)): New.
1623 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1624 completion_skip_symbol.
1625 (default_collect_symbol_completion_matches_break_on): Use
1626 completion_skip_symbol. Pass down mode.
1627 (collect_file_symbol_completion_matches): Pass down mode.
1628 * symtab.h (symbol_is_function_or_method): New declarations.
1629 (completion_skip_symbol): New template function.
1630
56d87ef7
PA
16312017-11-08 Pedro Alves <palves@redhat.com>
1632
1633 * linespec.c (iterate_over_all_matching_symtabs): Add
1634 search_domain parameter. Pass it down to expand_symtabs_matching.
1635 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1636 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1637 search_domain.
1638 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1639 Pass it down.
1640 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1641 symbols.
1642 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1643 it down.
1644
1b026119
PA
16452017-11-08 Pedro Alves <palves@redhat.com>
1646
1647 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1648 text_len locals and don't pass them down.
1649 * symtab.c (completion_list_add_name): Remove
1650 sym_text/sym_text_len parameters and adjust.
1651 (completion_list_add_symbol, completion_list_add_msymbol)
1652 (completion_list_objc_symbol, completion_list_add_fields)
1653 (add_symtab_completions): Likewise.
1654 (default_collect_symbol_completion_matches_break_on)
1655 (collect_file_symbol_completion_matches): Remove sym_text_len
1656 local and don't pass it down.
1657 * symtab.h (completion_list_add_name): Remove
1658 sym_text/sym_text_len parameters.
1659
c62446b1
PA
16602017-11-08 Pedro Alves <palves@redhat.com>
1661
1662 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1663 unittests/lookup_name_info-selftests.c.
1664 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1665 * cp-support.c: Include "selftest.h".
1666 (cp_remove_params_1): Rename from cp_remove_params. Add
1667 'require_param' parameter, and handle it.
1668 (cp_remove_params): Reimplement.
1669 (cp_remove_params_if_any): New.
1670 (selftests::quote): New.
1671 (selftests::check_remove_params): New.
1672 (selftests::test_cp_remove_params): New.
1673 (_initialize_cp_support): Install
1674 selftests::test_cp_remove_params.
1675 * cp-support.h (cp_remove_params_if_any): Declare.
1676 * dwarf2read.c :Include "selftest.h".
1677 (dw2_expand_symtabs_matching_symbol): Use
1678 lookup_name_info::make_ignore_params.
1679 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1680 (selftests::dw2_expand_symtabs_matching::string_or_null)
1681 (selftests::dw2_expand_symtabs_matching::check_match)
1682 (selftests::dw2_expand_symtabs_matching::test_symbols)
1683 (selftests::dw2_expand_symtabs_matching::run_test): New.
1684 (_initialize_dwarf2_read): Register
1685 selftests::dw2_expand_symtabs_matching::run_test.
1686 * psymtab.c (psym_expand_symtabs_matching): Use
1687 lookup_name_info::make_ignore_params.
1688 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1689 If the lookup name wants to ignore parameters, strip them.
1690 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1691 code handling '('.
1692 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1693 (default_collect_symbol_completion_matches_break_on): Don't try to
1694 strip parameters.
1695 * symtab.h (lookup_name_info::lookup_name_info): Add
1696 'ignore_parameters' parameter.
1697 (lookup_name_info::ignore_parameters)
1698 (lookup_name_info::make_ignore_params): New methods.
1699 (lookup_name_info::m_ignore_parameters): New field.
1700 * unittests/lookup_name_info-selftests.c: New file.
1701
61920122
PA
17022017-11-08 Pedro Alves <palves@redhat.com>
1703
1704 * dwarf2read.c (dw2_expand_marked_cus)
1705 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1706 (dw2_expand_symtabs_matching): Move further below.
1707 (dw2_expand_marked_cus): Reindent.
1708
3f563c84
PA
17092017-11-08 Pedro Alves <palves@redhat.com>
1710
1711 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1712 (struct name_component): New.
1713 (mapped_index::name_components): New field.
1714 (mapped_index::symbol_name_at): New method.
1715 (dwarf2_read_index): Call mapped_index ctor.
1716 (dw2_map_matching_symbols): Add comment about name_components
1717 table.
1718 (dw2_expand_symtabs_matching): Factor part to...
1719 (dw2_expand_symtabs_matching_symbol): ... this new function.
1720 Build name components table, and lookup symbols in it before
1721 calling the name matcher.
1722 (dw2_expand_marked_cus): New, factored out from
1723 dw2_expand_symtabs_matching.
1724 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1725
b5ec771e
PA
17262017-11-08 Pedro Alves <palves@redhat.com>
1727
1728 * ada-lang.c (ada_encode): Rename to ..
1729 (ada_encode_1): ... this. Add throw_errors parameter and handle
1730 it.
1731 (ada_encode): Reimplement.
1732 (match_name): Delete, folded into full_name.
1733 (resolve_subexp): No longer pass the encoded name to
1734 ada_lookup_symbol_list.
1735 (should_use_wild_match): Delete.
1736 (name_match_type_from_name): New.
1737 (ada_lookup_simple_minsym): Use lookup_name_info and the
1738 language's symbol_name_matcher_ftype.
1739 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1740 (ada_add_block_renamings): Adjust to use lookup_name_info.
1741 (ada_lookup_name): New.
1742 (add_nonlocal_symbols, ada_add_all_symbols)
1743 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1744 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1745 (ada_name_for_lookup): Delete.
1746 (ada_lookup_encoded_symbol): Construct a verbatim name.
1747 (wild_match): Reverse sense of return type. Use bool.
1748 (full_match): Reverse sense of return type. Inline bits of old
1749 match_name here.
1750 (ada_add_block_symbols): Adjust to use lookup_name_info.
1751 (symbol_completion_match): Delete, folded into...
1752 (ada_lookup_name_info::matches): ... .this new method.
1753 (symbol_completion_add): Delete.
1754 (ada_collect_symbol_completion_matches): Add name_match_type
1755 parameter. Adjust to use lookup_name_info and
1756 completion_list_add_name.
1757 (get_var_value, ada_add_global_exceptions): Adjust to use
1758 lookup_name_info.
1759 (ada_get_symbol_name_cmp): Delete.
1760 (do_wild_match, do_full_match): New functions.
1761 (ada_lookup_name_info::ada_lookup_name_info): New method.
1762 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1763 functions.
1764 (ada_language_defn): Install ada_get_symbol_name_matcher.
1765 * ada-lex.l (processId): If name starts with '<', copy it
1766 verbatim.
1767 * block.c (block_iter_match_step, block_iter_match_first)
1768 (block_iter_match_next, block_lookup_symbol)
1769 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1770 lookup_name_info.
1771 * block.h (block_iter_match_first, block_iter_match_next)
1772 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1773 * c-lang.c (c_language_defn, cplus_language_defn)
1774 (asm_language_defn, minimal_language_defn): Adjust comments to
1775 refer to la_get_symbol_name_matcher.
1776 * completer.c (complete_files_symbols)
1777 (collect_explicit_location_matches, symbol_completer): Pass a
1778 symbol_name_match_type down.
1779 * completer.h (class completion_match, completion_match_result):
1780 New classes.
1781 (completion_tracker::reset_completion_match_result): New method.
1782 (completion_tracker::m_completion_match_result): New field.
1783 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1784 lookup_name_info.
1785 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1786 functions.
1787 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1788 * d-lang.c: Adjust comments to refer to
1789 la_get_symbol_name_matcher.
1790 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1791 Adjust to use lookup_name_info.
1792 (dict_iter_match_first, dict_iter_match_next)
1793 (iter_match_first_hashed, iter_match_next_hashed)
1794 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1795 with a lookup_name_info.
1796 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1797 Likewise.
1798 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1799 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1800 (gdb_index_symbol_name_matcher): New class.
1801 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1802 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1803 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1804 with a symbol_name_match_type.
1805 (f_language_defn): Adjust comments to refer to
1806 la_get_symbol_name_matcher.
1807 * go-lang.c (go_language_defn): Adjust comments to refer to
1808 la_get_symbol_name_matcher.
1809 * language.c (default_symbol_name_matcher)
1810 (language_get_symbol_name_matcher): New functions.
1811 (unknown_language_defn, auto_language_defn): Adjust comments to
1812 refer to la_get_symbol_name_matcher.
1813 * language.h (symbol_name_cmp_ftype): Delete.
1814 (language_defn) <la_collect_symbol_completion_matches>: Add match
1815 type parameter.
1816 <la_get_symbol_name_cmp>: Delete field.
1817 <la_get_symbol_name_matcher>: New field.
1818 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1819 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1820 Declare.
1821 * linespec.c (iterate_over_all_matching_symtabs)
1822 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1823 (find_methods): Add language parameter, and use lookup_name_info
1824 and the language's symbol_name_matcher_ftype.
1825 (linespec_complete_function): Adjust.
1826 (lookup_prefix_sym): Use lookup_name_info.
1827 (add_all_symbol_names_from_pspace): Adjust.
1828 (find_superclass_methods): Add language parameter and pass it
1829 down.
1830 (find_method): Pass symbol language down.
1831 (find_linespec_symbols): Don't demangle or Ada encode here.
1832 (search_minsyms_for_name): Add lookup_name_info parameter.
1833 (add_matching_symbols_to_info): Add name_match_type parameter.
1834 Use lookup_name_info.
1835 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1836 la_get_symbol_name_matcher.
1837 * minsyms.c: Include <algorithm>.
1838 (add_minsym_to_demangled_hash_table): Remove table parameter and
1839 add objfile parameter. Use search_name_hash, and add language to
1840 demangled languages vector.
1841 (struct found_minimal_symbols): New struct.
1842 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1843 New functions.
1844 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1845 input names here. Use lookup_name_info instead. Lookup up
1846 demangled names once for each language in the demangled names
1847 vector.
1848 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1849 demangled names once for each language in the demangled names
1850 vector.
1851 (build_minimal_symbol_hash_tables): Adjust.
1852 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1853 lookup_name_info.
1854 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1855 la_get_symbol_name_matcher.
1856 * objfiles.h: Include <vector>.
1857 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1858 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1859 la_get_symbol_name_matcher.
1860 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1861 la_get_symbol_name_matcher.
1862 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1863 (match_partial_symbol): Use symbol_name_match_type,
1864 lookup_name_info and psymbol_name_matches.
1865 (lookup_partial_symbol): Use lookup_name_info.
1866 (map_block): Use symbol_name_match_type and lookup_name_info.
1867 (psym_map_matching_symbols): Use symbol_name_match_type.
1868 (psymbol_name_matches): New.
1869 (recursively_search_psymtabs): Use lookup_name_info and
1870 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1871 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1872 'kind' parameter to 'domain'.
1873 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1874 la_get_symbol_name_matcher.
1875 * symfile-debug.c (debug_qf_map_matching_symbols)
1876 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1877 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1878 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1879 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1880 Adjust to use symbol_name_match_type.
1881 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1882 (expand_symtabs_matching): Adjust to use lookup_name_info.
1883 * symmisc.c (maintenance_expand_symtabs): Use
1884 lookup_name_info::match_any ().
1885 * symtab.c (symbol_matches_search_name): New.
1886 (eq_symbol_entry): Adjust to use lookup_name_info and the
1887 language's matcher.
1888 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1889 (lookup_name_info::match_any): New.
1890 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1891 (compare_symbol_name): Add language, lookup_name_info and
1892 completion_match_result parameters, and use them.
1893 (completion_list_add_name): Make extern. Add language and
1894 lookup_name_info parameters. Use them.
1895 (completion_list_add_symbol, completion_list_add_msymbol)
1896 (completion_list_objc_symbol): Add lookup_name_info parameters and
1897 adjust. Pass down language.
1898 (completion_list_add_fields): Add lookup_name_info parameters and
1899 adjust. Pass down language.
1900 (add_symtab_completions): Add lookup_name_info parameters and
1901 adjust.
1902 (default_collect_symbol_completion_matches_break_on): Add
1903 name_match_type parameter, and use it. Use lookup_name_info.
1904 (default_collect_symbol_completion_matches)
1905 (collect_symbol_completion_matches): Add name_match_type
1906 parameter, and pass it down.
1907 (collect_symbol_completion_matches_type): Adjust.
1908 (collect_file_symbol_completion_matches): Add name_match_type
1909 parameter, and use lookup_name_info.
1910 * symtab.h: Include <string> and "common/gdb_optional.h".
1911 (enum class symbol_name_match_type): New.
1912 (class ada_lookup_name_info): New.
1913 (struct demangle_for_lookup_info): New.
1914 (class lookup_name_info): New.
1915 (symbol_name_matcher_ftype): New.
1916 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1917 (symbol_matches_search_name): Declare.
1918 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1919 (default_collect_symbol_completion_matches)
1920 (collect_symbol_completion_matches)
1921 (collect_file_symbol_completion_matches): Add name_match_type
1922 parameter.
1923 (iterate_over_symbols): Use lookup_name_info.
1924 (completion_list_add_name): Declare.
1925 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1926 (strncmp_iw_with_mode): Now extern.
1927 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1928 (strncmp_iw_with_mode): Declare.
1929
5ffa0793
PA
19302017-11-08 Keith Seitz <keiths@redhat.com>
1931 Pedro Alves <palves@redhat.com>
1932
1933 * ada-lang.c (ada_language_defn): Install
1934 default_search_name_hash.
1935 * buildsym.c (struct buildsym_compunit): <language>: New field.
1936 (finish_block_internal): Pass language when creating dictionaries.
1937 (start_buildsym_compunit, start_symtab): New language parameters.
1938 Use them.
1939 (restart_symtab): Pass down compilation unit's language.
1940 * buildsym.h (enum language): Forward declare.
1941 (start_symtab): New 'language' parameter.
1942 * c-lang.c (c_language_defn, cplus_language_defn)
1943 (asm_language_defn, minimal_language_defn): Install
1944 default_search_name_hash.
1945 * coffread.c (coff_start_symtab): Adjust.
1946 * d-lang.c (d_language_defn): Install default_search_name_hash.
1947 * dbxread.c (struct symloc): Add 'pst_language' field.
1948 (PST_LANGUAGE): Define.
1949 (start_psymtab, read_ofile_symtab): Use it.
1950 (process_one_symbol): New 'language' parameter. Pass it down.
1951 * dictionary.c (struct dictionary) <language>: New field.
1952 (DICT_LANGUAGE): Define.
1953 (dict_create_hashed, dict_create_hashed_expandable)
1954 (dict_create_linear, dict_create_linear_expandable): New parameter
1955 'language'. Set the dictionary's language.
1956 (iter_match_first_hashed): Adjust to rename.
1957 (insert_symbol_hashed): Assert we don't see mismatching
1958 languages. Adjust to rename.
1959 (dict_hash): Rename to ...
1960 (default_search_name_hash): ... this and make extern.
1961 * dictionary.h (struct language_defn): Forward declare.
1962 (dict_create_hashed): New parameter 'language'.
1963 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1964 * f-lang.c (f_language_defn): Install default_search_name_hash.
1965 * go-lang.c (go_language_defn): Install default_search_name_hash.
1966 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1967 creation.
1968 * language.c (unknown_language_defn, auto_language_defn):
1969 * language.h (language_defn::la_search_name_hash): New field.
1970 (default_search_name_hash): Declare.
1971 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1972 * mdebugread.c (new_block): New parameter 'language'.
1973 * mdebugread.c (parse_symbol): Pass symbol language to block
1974 allocation.
1975 (psymtab_to_symtab_1): Pass down language.
1976 (new_symtab): Pass compunit's language to block allocation.
1977 * objc-lang.c (objc_language_defn): Install
1978 default_search_name_hash.
1979 * opencl-lang.c (opencl_language_defn):
1980 * p-lang.c (pascal_language_defn): Install
1981 default_search_name_hash.
1982 * rust-lang.c (rust_language_defn): Install
1983 default_search_name_hash.
1984 * stabsread.h (enum language): Forward declare.
1985 (process_one_symbol): Add 'language' parameter.
1986 * symtab.c (search_name_hash): New function.
1987 * symtab.h (search_name_hash): Declare.
1988 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1989
2a1dde5d
PA
19902017-11-08 Pedro Alves <palves@redhat.com>
1991
1992 * cp-name-parser.y (main): Don't initialize extra_chars.
1993
95a6b0a1
TT
19942017-11-07 Tom Tromey <tom@tromey.com>
1995
1996 * event-top.h (command_handler): Constify.
1997 * record-full.c (cmd_record_full_start): Update.
1998 * thread.c (thread_apply_all_command): Update.
1999 * printcmd.c (eval_command): Update.
2000 * mi/mi-main.c (mi_execute_cli_command): Update.
2001 (mi_execute_async_cli_command): Update.
2002 * tui/tui-stack.c (tui_update_command): Update.
2003 * cli/cli-interp.c (safe_execute_command): Constify.
2004 * record.c (record_start): Update.
2005 (record_start, record_stop, cmd_record_start): Update.
2006 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2007 (cmd_record_btrace_pt_start): Update.
2008 (cmd_record_btrace_start): Update.
2009 (cmd_record_btrace_start): Update.
2010 * reverse.c (exec_reverse_once): Update.
2011 * python/python.c (execute_gdb_command): Don't copy the command.
2012 * event-top.c (command_line_handler): Update.
2013 (command_handler): Constify.
2014 * defs.h (deprecated_call_command_hook): Constify.
2015 * cli/cli-script.h (execute_user_command): Constify.
2016 * cli/cli-script.c (execute_user_command): Constify.
2017 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2018 (enum command_control_type): Update.
2019 * main.c (catch_command_errors): Remove non-const overload.
2020 (catch_command_errors_ftype): Remove.
2021 * python/py-cmd.c (cmdpy_function): Constify.
2022 * guile/scm-cmd.c (cmdscm_function): Constify.
2023 * cli/cli-dump.c (call_dump_func): Constify.
2024 * cli/cli-decode.c (do_const_cfunc): Constify.
2025 (do_sfunc): Constify.
2026 (cmd_func): Constify.
2027 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2028 * top.h (execute_command): Constify.
2029 * top.c (execute_command): Constify.
2030 (execute_command_to_string): Constify.
2031 (deprecated_call_command_hook): Constify.
2032 * command.h (cmd_func): Constify.
2033 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2034
eb4c3f4a
TT
20352017-11-07 Tom Tromey <tom@tromey.com>
2036
2037 * ada-lang.c (catch_ada_exception_command): Constify.
2038 (catch_assert_command): Constify.
2039 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2040 (catch_rethrow_command): Constify.
2041 (catch_exception_command_1): Constify.
2042 * breakpoint.h (add_catch_command): Constify.
2043 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2044 (catch_syscall_split_args): Constify.
2045 * break-catch-sig.c (catch_signal_command): Constify.
2046 (catch_signal_split_args): Constify.
2047 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2048 cmd_const_sfunc_ftype.
2049 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2050 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2051 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2052 (add_setshow_string_cmd, struct cmd_list_element)
2053 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2054 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2055 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2056 Constify.
2057 (set_cmd_sfunc): Constify.
2058 (empty_sfunc): Constify.
2059 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2060 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2061 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2062 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2063 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2064 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2065 Constify.
2066 (set_cmd_sfunc): Constify.
2067 (cmd_sfunc_ftype): Remove.
2068 * compile/compile.c (set_compile_args): Constify.
2069 * infrun.c (set_disable_randomization): Constify.
2070 * infcmd.c (set_args_command, set_cwd_command): Constify.
2071 * breakpoint.c (set_condition_evaluation_mode): Constify.
2072 (add_catch_command): Constify.
2073 (catch_fork_command_1, catch_exec_command_1)
2074 (catch_load_command_1, catch_unload_command_1): Constify.
2075 (catch_load_or_unload): Constify.
2076 * guile/scm-param.c (pascm_set_func): Constify.
2077 (add_setshow_generic): Constify.
2078 * python/py-param.c (get_set_value): Constify.
2079 * top.h (set_verbose): Constify.
2080 * tui/tui-win.c (tui_set_var_cmd): Constify.
2081 * mi/mi-main.c (set_mi_async_command): Constify.
2082 * cli/cli-logging.c (set_logging_overwrite)
2083 (set_logging_redirect): Constify.
2084 * value.c (set_max_value_size): Constify.
2085 * valprint.c (set_input_radix, set_output_radix): Constify.
2086 * utils.c (set_width_command, set_height_command): Constify.
2087 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2088 * tracepoint.c (set_disconnected_tracing)
2089 (set_circular_trace_buffer, set_trace_buffer_size)
2090 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2091 * top.c (set_history_size_command, set_verbose, set_editing)
2092 (set_gdb_datadir, set_history_filename): Constify.
2093 * target.c (set_targetdebug, maint_set_target_async_command)
2094 (maint_set_target_non_stop_command, set_target_permissions)
2095 (set_write_memory_permission): Constify.
2096 (open_target): Constify.
2097 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2098 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2099 * symtab.c (set_symbol_cache_size_handler): Constify.
2100 * symfile.c (set_ext_lang_command): Constify.
2101 * symfile-debug.c (set_debug_symfile): Constify.
2102 * source.c (set_directories_command): Constify.
2103 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2104 * serial.c (set_parity): Constify.
2105 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2106 * remote.c (set_remote_exec_file, set_remotebreak)
2107 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2108 * record.c (set_record_insn_history_size)
2109 (set_record_call_history_size): Constify.
2110 * record-full.c (set_record_full_insn_max_num): Constify.
2111 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2112 * osabi.c (set_osabi): Constify.
2113 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2114 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2115 * maint.c (maintenance_set_profile_cmd): Constify.
2116 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2117 * language.c (set_language_command, set_range_command)
2118 (set_case_command): Constify.
2119 * infrun.c (set_non_stop, set_observer_mode)
2120 (set_stop_on_solib_events, set_schedlock_func)
2121 (set_exec_direction_func): Constify.
2122 * infcmd.c (set_inferior_tty_command): Constify.
2123 * disasm.c (set_disassembler_options_sfunc): Constify.
2124 * demangle.c (set_demangling_command): Constify.
2125 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2126 * cris-tdep.c (set_cris_version, set_cris_mode)
2127 (set_cris_dwarf2_cfi): Constify.
2128 * corefile.c (set_gnutarget_command): Constify.
2129 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2130 (set_target_wide_charset_sfunc): Constify.
2131 * breakpoint.c (update_dprintf_commands): Constify.
2132 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2133 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2134 (set_disassembly_style_sfunc): Constify.
2135 * arch-utils.c (set_endian, set_architecture): Constify.
2136 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2137 * agent.c (set_can_use_agent): Constify.
2138
5fed81ff
TT
21392017-11-07 Tom Tromey <tom@tromey.com>
2140
2141 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2142 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2143 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2144 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2145 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2146 (parse_int_arg, show_thread_default_detach_sc_cmd)
2147 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2148 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2149 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2150 (show_task_pause_cmd, set_task_detach_sc_cmd)
2151 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2152 (set_noninvasive_cmd, set_thread_pause_cmd)
2153 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2154 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2155 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2156 * windows-nat.c (display_selectors): Constify.
2157 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2158 non-const "cfunc".
2159 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2160 (cmd_cfunc_eq): Likewise.
2161 (struct cmd_list_element): Likewise.
2162 (do_cfunc): Remove.
2163 (cli_user_command_p): Update.
2164 * command.h (add_cmd): Remove non-const overload.
2165 (cmd_cfunc_ftype): Remove typedef.
2166 (cmd_cfunc_eq): Remove non-const overload.
2167 * value.c (show_values): Constify.
2168 * thread.c (thread_apply_all_command): Constify.
2169 * symfile.c (load_command): Constify.
2170 * source.c (directory_command): Constify.
2171 * maint.c (maintenance_internal_error)
2172 (maintenance_demangler_warning, maintenance_space_display)
2173 (maintenance_print_architecture, maintenance_translate_address)
2174 (maintenance_info_selftests, maintenance_internal_warning):
2175 Constify.
2176 * breakpoint.c (disable_trace_command, enable_trace_command):
2177 Constify.
2178 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2179 Constify.
2180 (add_auto_load_safe_path): Constify.
2181 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2182 * top.h (show_commands): Constify.
2183 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2184 * sparc64-tdep.c (adi_examine_command): Constify.
2185 (adi_assign_command): Constify.
2186
1d12d88f
TT
21872017-11-07 Tom Tromey <tom@tromey.com>
2188
2189 * frame.h (info_locals_command, info_args_command): Constify.
2190 * auto-load.h (auto_load_info_scripts): Constify.
2191 * inferior.h (registers_info): Constify.
2192 * copying.c: Rebuild.
2193 * copying.awk: Constify generated commands.
2194 * auto-load.c (auto_load_info_scripts)
2195 (info_auto_load_gdb_scripts): Constify.
2196 * cli/cli-decode.c (struct cmd_list_element): Take a
2197 cmd_const_cfunc_ftype.
2198 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2199 * tui/tui-win.c (tui_all_windows_info): Constify.
2200 * python/py-auto-load.c (info_auto_load_python_scripts):
2201 Constify.
2202 * cli/cli-cmds.c (show_command): Remove non-const overload.
2203 * tracepoint.c (info_tvariables_command, info_scope_command):
2204 Constify.
2205 (info_static_tracepoint_markers_command): Constify.
2206 * thread.c (info_threads_command): Constify.
2207 (print_thread_info_1): Constify.
2208 * target.c (info_target_command): Constify.
2209 * symtab.c (info_sources_command, info_functions_command)
2210 (info_types_command): Constify.
2211 (info_variables_command): Remove non-const overload.
2212 * symfile.c (info_ext_lang_command): Constify.
2213 * stack.c (info_frame_command, info_locals_command)
2214 (info_args_command): Constify.
2215 (backtrace_command): Remove non-const overload.
2216 * source.c (info_source_command, info_line_command): Constify.
2217 * solib.c (info_sharedlibrary_command): Constify.
2218 * skip.c (info_skip_command): Constify.
2219 * ser-go32.c (info_serial_command): Constify.
2220 * reverse.c (info_bookmarks_command): Constify.
2221 * printcmd.c (info_symbol_command, info_address_command)
2222 (info_display_command): Constify.
2223 * osdata.c (info_osdata_command): Constify.
2224 * objc-lang.c (info_selectors_command, info_classes_command):
2225 Constify.
2226 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2227 * memattr.c (info_mem_command): Constify.
2228 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2229 * linux-fork.c (info_checkpoints_command): Constify.
2230 * infrun.c (info_signals_command): Constify.
2231 * inflow.c (info_terminal_command): Constify.
2232 * inferior.c (info_inferiors_command): Constify.
2233 (print_inferior): Constify.
2234 * infcmd.c (info_program_command, info_all_registers_command)
2235 (info_registers_command, info_vector_command)
2236 (info_float_command): Constify.
2237 (registers_info): Constify.
2238 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2239 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2240 Constify.
2241 * f-valprint.c (info_common_command): Constify.
2242 * dcache.c (info_dcache_command): Constify.
2243 (dcache_info_1): Constify.
2244 * darwin-nat-info.c (info_mach_tasks_command)
2245 (info_mach_task_command, info_mach_ports_command)
2246 (info_mach_port_command, info_mach_threads_command)
2247 (info_mach_thread_command, info_mach_regions_command)
2248 (info_mach_regions_recurse_command, info_mach_region_command)
2249 (info_mach_exceptions_command): Constify.
2250 (get_task_from_args): Constify.
2251 * cp-support.c (info_vtbl_command): Constify.
2252 * breakpoint.c (info_watchpoints_command)
2253 (info_tracepoints_command): Constify.
2254 (info_breakpoints_command): Remove non-const overload.
2255 * avr-tdep.c (avr_io_reg_read_command): Constify.
2256 * auxv.c (info_auxv_command): Constify.
2257 * ada-tasks.c (info_tasks_command): Constify.
2258 (info_task): Constify.
2259 * ada-lang.c (info_exceptions_command): Constify.
2260
0b39b52e
TT
22612017-11-07 Tom Tromey <tom@tromey.com>
2262
2263 * solib.h (no_shared_libraries): Constify.
2264 * frame.h (return_command): Constify.
2265 * cli/cli-cmds.h (quit_command): Constify.
2266 * top.h (quit_command, execute_command): Constify.
2267 * target.h (flash_erase_command): Constify.
2268 * inferior.h (set_inferior_args, attach_command): Constify.
2269 * tracepoint.h (start_tracing, stop_tracing): Constify.
2270 * breakpoint.h (break_command, tbreak_command)
2271 (hbreak_command_wrapper, thbreak_command_wrapper)
2272 (rbreak_command_wrapper, watch_command_wrapper)
2273 (awatch_command_wrapper, rwatch_command_wrapper)
2274 (get_tracepoint_by_number): Constify.
2275 * symtab.c (info_variables_command, rbreak_command)
2276 (symtab_symbol_info): Constify.
2277 (info_variables_command): Add non-const overload.
2278 * top.c (dont_repeat_command): Constify.
2279 * breakpoint.c (ignore_command, commands_command)
2280 (condition_command, tbreak_command, hbreak_command)
2281 (thbreak_command, clear_command, break_command)
2282 (info_breakpoints_command, watch_command, rwatch_command)
2283 (awatch_command, trace_command, ftrace_command, strace_command)
2284 (trace_pass_command, break_range_command, dprintf_command)
2285 (agent_printf_command, get_tracepoint_by_number)
2286 (watch_maybe_just_location, trace_pass_command): Constify.
2287 (info_breakpoints_command): Add non-const overload.
2288 * tracefile.c (tsave_command): Constify.
2289 * infcmd.c (attach_command, disconnect_command, signal_command)
2290 (queue_signal_command, stepi_command, nexti_command)
2291 (finish_command, next_command, step_command, until_command)
2292 (advance_command, jump_command, continue_command, run_command)
2293 (start_command, starti_command, interrupt_command)
2294 (run_command_1, set_inferior_args, step_1): Constify.
2295 * inferior.c (add_inferior_command, remove_inferior_command)
2296 (clone_inferior_command): Constify.
2297 * linux-fork.c (checkpoint_command, restart_command): Constify.
2298 * windows-nat.c (signal_event_command): Constify.
2299 * guile/guile.c (guile_repl_command, guile_command): Constify.
2300 * printcmd.c (x_command, display_command, printf_command)
2301 (output_command, set_command, call_command, print_command)
2302 (eval_command): Constify.
2303 (non_const_set_command): Remove.
2304 (_initialize_printcmd): Update.
2305 * source.c (forward_search_command, reverse_search_command):
2306 Constify.
2307 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2308 Constify.
2309 * infrun.c (handle_command): Constify.
2310 * memattr.c (mem_command): Constify.
2311 * stack.c (return_command, up_command, up_silently_command)
2312 (down_command, down_silently_command, frame_command)
2313 (backtrace_command, func_command, backtrace_command_1): Constify.
2314 (backtrace_command): Add non-const overload.
2315 * remote-sim.c (simulator_command): Constify.
2316 * exec.c (set_section_command): Constify.
2317 * tracepoint.c (tdump_command, trace_variable_command)
2318 (tstatus_command, tstop_command, tstart_command)
2319 (end_actions_pseudocommand, while_stepping_pseudocommand)
2320 (collect_pseudocommand, teval_pseudocommand, actions_command)
2321 (start_tracing, stop_tracing): Constify.
2322 * value.c (init_if_undefined_command): Constify.
2323 * tui/tui-stack.c (tui_update_command): Constify.
2324 * tui/tui-win.c (tui_refresh_all_command)
2325 (tui_set_tab_width_command, tui_set_win_height_command)
2326 (tui_set_focus_command, tui_scroll_forward_command)
2327 (tui_scroll_backward_command, tui_scroll_left_command)
2328 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2329 (tui_set_win_height): Constify.
2330 * tui/tui-layout.c (tui_layout_command): Constify.
2331 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2332 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2333 (proc_untrace_sysexit_cmd): Constify.
2334 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2335 (threadset_test_cmd, threadlist_update_test_cmd)
2336 (threadalive_test): Constify.
2337 * objc-lang.c (print_object_command): Constify.
2338 * command.h (add_com): Constify.
2339 * cli/cli-dump.c (restore_command): Constify.
2340 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2341 (help_command, complete_command, shell_command, edit_command)
2342 (list_command, disassemble_command, make_command)
2343 (apropos_command, alias_command): Constify.
2344 * cli/cli-script.c (document_command, define_command)
2345 (while_command, if_command, validate_comname): Constify.
2346 * cli/cli-decode.c (struct cmd_list_element): Change type of
2347 "fun".
2348 * target.c (do_monitor_command, flash_erase_command): Constify.
2349 * regcache.c (reg_flush_command): Constify.
2350 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2351 (reverse_nexti, reverse_continue, reverse_finish)
2352 (save_bookmark_command, goto_bookmark_command)
2353 (exec_reverse_once): Constify.
2354 * python/python.c (python_interactive_command, python_command):
2355 Constify.
2356 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2357 Constify.
2358 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2359 * gcore.c (gcore_command): Constify.
2360
85c4be7c
TT
23612017-11-07 Tom Tromey <tom@tromey.com>
2362
2363 * printcmd.c (x_command): Call set_repeat_arguments.
2364 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2365 * top.c (repeat_arguments): New global.
2366 (set_repeat_arguments): New function.
2367 (execute_command): Handle repeat_arguments.
2368 (show_commands): Calls set_repeat_arguments.
2369 * command.h (set_repeat_arguments): Declare.
2370
022643b4
TT
23712017-11-07 Tom Tromey <tom@tromey.com>
2372
2373 * stack.c (backtrace_command): Use std::string.
2374 (backtrace_command_1): Make "count_exp" const.
2375
5614fb77
TT
23762017-11-07 Tom Tromey <tom@tromey.com>
2377
2378 * source.c (directory_switch, mod_path, add_path): Constify.
2379 * defs.h (add_path, mod_path, directory_switch): Constify.
2380 * mi/mi-cmd-env.c (env_mod_path): Constify.
2381
6be9a197
TT
23822017-11-07 Tom Tromey <tom@tromey.com>
2383
2384 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2385 (run_command_1, continue_command, step_1, jump_command)
2386 (signal_command, until_command, advance_command, finish_command)
2387 (attach_command): Update.
2388
c2252c0d
TT
23892017-11-07 Tom Tromey <tom@tromey.com>
2390
2391 * command.h (set_cmd_cfunc): Don't declare.
2392 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2393
1ee870c5
TT
23942017-11-07 Tom Tromey <tom@tromey.com>
2395
2396 * stack.c (select_frame_command): Constify.
2397 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2398 * command.h (add_com_suppress_notification): Constify.
2399
ee7ddd71
TT
24002017-11-07 Tom Tromey <tom@tromey.com>
2401
2402 * breakpoint.c (stop_command): Constify.
2403 * cli/cli-decode.c (struct cmd_list_element): Constify.
2404 * command.h (add_abbrev_prefix_cmd): Constify.
2405
95e95a6d
PA
24062017-11-07 Pedro Alves <palves@redhat.com>
2407
2408 * breakpoint.c (extract_bp_kind): New enum.
2409 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2410 factored out from ...
2411 (extract_bp_number_and_location): ... here.
2412 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2413
cc638e86
PA
24142017-11-07 Pedro Alves <palves@redhat.com>
2415
2416 * breakpoint.c (extract_bp_number_and_location): Change return
2417 type to void. Throw error instead of warning.
2418 (enable_disable_command): Adjust.
2419
d0fe4701
XR
24202017-11-07 Xavier Roirand <roirand@adacore.com>
2421 Pedro Alves <palves@redhat.com>
2422
2423 * breakpoint.c (map_breakpoint_number_range): New, factored out
2424 from ...
2425 (map_breakpoint_numbers): ... here.
2426 (find_location_by_number): Change parameters from string to
2427 breakpoint number and location.
2428 (extract_bp_number_and_location): New function.
2429 (enable_disable_bp_num_loc)
2430 (enable_disable_breakpoint_location_range)
2431 (enable_disable_command): New functions, factored out ...
2432 (enable_command, disable_command): ... these functions, and
2433 adjusted to support ranges.
2434 * NEWS: Document enable/disable breakpoint location range feature.
2435
635dc5b2
LM
24362017-11-06 Luis Machado <luis.machado@linaro.org>
2437
2438 * MAINTAINERS (Write After Approval): Update my e-mail address.
2439
556e5da5
PA
24402017-11-06 Pedro Alves <palves@redhat.com>
2441
2442 * gnu-nat.c (gnu_terminal_init): Delete.
2443 (gnu_target): Don't install gnu_terminal_init.
2444 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2445 (child_terminal_init): ... this function.
2446
d1928160
PA
24472017-11-06 Pedro Alves <palves@redhat.com>
2448
2449 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2450 sgtty.h.
2451 * config.in, configure: Regenerate.
2452
6aa899ce
PA
24532017-11-06 Pedro Alves <palves@redhat.com>
2454
2455 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2456 (async_init_signals): Adjust.
2457 (handle_stop_sig): Rename to ...
2458 (handle_sigtstp): ... this.
2459 (async_stop_sig): Rename to ...
2460 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2461 SIGTSTP path.
2462 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2463 instead of STOP_SIGNAL thoughout.
2464 (handle_stop_sig): Rename to ...
2465 (handle_sigtstp): ... this.
2466 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2467
a94799ac
PA
24682017-11-06 Pedro Alves <palves@redhat.com>
2469
2470 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2471 longer set flags twice in row.
2472
726e1356
PA
24732017-11-06 Pedro Alves <palves@redhat.com>
2474
2475 * Makefile.in (SER_HARDWIRE): Update comment.
2476 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2477 * common/gdb_termios.h: Delete file.
2478 * common/job-control.c: Include termios.h and unistd.h instead of
2479 gdb_termios.h.
2480 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2481 check.
2482 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2483 Remove sgtty code.
2484 * configure.ac: No longer check for termio.h and sgtty.h.
2485 * configure: Regenerate.
2486 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2487 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2488 Replace PROCESS_GROUP_TYPE references with pid_t references
2489 throughout.
2490 (gdb_getpgrp): Delete.
2491 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2492 (child_terminal_inferior): Remove comment. Remove sgtty code.
2493 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2494 gdb_getpgrp. Use serial_set_tty_state instead aof
2495 serial_noflush_set_tty_state. Remove sgtty code.
2496 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2497 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2498 (inferior_process_group): Now returns pid_t.
2499 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2500 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2501 * ser-event.c (serial_event_ops): Update.
2502 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2503 (dos_ops): Update.
2504 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2505 * ser-pipe.c (pipe_ops): Update.
2506 * ser-tcp.c (tcp_ops): Update.
2507 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2508 HAVE_TERMIOS checks.
2509 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2510 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2511 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2512 assume termios.
2513 (hardwire_noflush_set_tty_state): Delete.
2514 (hardwire_print_tty_state, hardwire_drain_output)
2515 (hardwire_flush_output, hardwire_flush_input)
2516 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2517 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2518 code, and assume termios.
2519 (hardwire_ops): Update.
2520 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2521 * serial.c (serial_noflush_set_tty_state): Delete.
2522 * serial.h (serial_noflush_set_tty_state): Delete.
2523 (serial_ops::noflush_set_tty_state): Delete.
2524
1cfb73db
UW
25252017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2526
2527 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2528 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2529 (COMMON_OBS): Remove doublest.o and dfp.o.
2530 Do not build target-float.c (instead of doublest.c)
2531 with -Wformat-nonliteral.
2532
2533 * doublest.c: Remove file.
2534 * doublest.h: Remove file.
2535 * dfp.c: Remove file.
2536 * dfp.h: Remove file.
2537
2538 * target-float.c: Do not include "doublest.h" and "dfp.h".
2539 (DOUBLEST): Move here from doublest.h.
2540 (enum float_kind): Likewise.
2541 (FLOATFORMAT_CHAR_BIT): Likewise.
2542 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2543 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2544 (floatformat_precision): Likewise.
2545 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2546 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2547 Likewise.
2548 (host_float_format, host_double_format, host_long_double_format):
2549 Likewise.
2550 (floatformat_to_string, floatformat_from_string): Likewise.
2551 (floatformat_to_doublest): Likewise. Also, inline the original
2552 convert_floatformat_to_doublest.
2553 (floatformat_from_doublest): Likewise. Also, inline the original
2554 convert_floatformat_from_doublest.
2555
2556 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2557 (MAX_DECIMAL_STRING): Move here from dfp.c.
2558 (match_endianness): Likewise.
2559 (set_decnumber_context, decimal_check_errors): Likewise.
2560 (decimal_from_number, decimal_to_number): Likewise.
2561 (decimal_to_string, decimal_from_string): Likewise. Make static.
2562 (decimal_from_longest, decimal_from_ulongest): Likewise.
2563 (decimal_to_longest): Likewise.
2564 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2565 (decimal_convert): Likewise.
2566
b07e9c46
UW
25672017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2568
2569 * doublest.c: Do not include "gdbtypes.h".
2570 (extract_typed_floating): Remove.
2571 (store_typed_floating): Remove.
2572 (convert_typed_floating): Remove.
2573 * doublest.h (struct type): Remove.
2574 (DOUBLEST_PRINT_FORMAT): Remove.
2575 (DOUBLEST_SCAN_FORMAT): Remove.
2576 (extract_typed_floating): Remove.
2577 (store_typed_floating): Remove.
2578 (convert_typed_floating): Remove.
2579
2580 * dfp.c (decimal_from_doublest): Remove.
2581 (decimal_to_doublest): Remove.
2582 * dfp.h: Do not include "doublest.h".
2583 (decimal_from_doublest): Remove.
2584 (decimal_to_doublest): Remove.
2585
2586 * value.c: Do not include "doublest.h" and "dfp.h".
2587 (value_as_double): Remove.
2588 (unpack_double): Remove.
2589 (value_from_double): Remove.
2590 (value_from_decfloat): Remove.
2591 * value.h: Do not include "doublest.h".
2592 (value_as_double): Remove.
2593 (unpack_double): Remove.
2594 (value_from_double): Remove.
2595 (value_from_decfloat): Remove.
2596
3b2ca824
UW
25972017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2598
2599 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2600 (i386_extract_return_value): Use target_float_convert.
2601 (i386_store_return_value): Likewise.
2602 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2603 (i387_value_to_register): Likewise.
2604 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2605 (ia64_register_to_value): Use target_float_convert.
2606 (ia64_value_to_register): Likewise.
2607 (ia64_extract_return_value): Likewise.
2608 (ia64_store_return_value): Likewise.
2609 (ia64_push_dummy_call): Likewise.
2610 * m68k-tdep.c: Include "target-float.h".
2611 (m68k_register_to_value): Use target_float_convert.
2612 (m68k_value_to_register): Likewise.
2613 (m68k_svr4_extract_return_value): Likewise.
2614 (m68k_svr4_store_return_value): Likewise.
2615 * ppc-sysv-tdep.c: Include "target-float.h".
2616 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2617 (do_ppc_sysv_return_value): Likewise.
2618 (ppc64_sysv_abi_push_freg): Likewise.
2619 (ppc64_sysv_abi_return_value_base): Likewise.
2620 * rs6000-aix-tdep.c: Include "target-float.h".
2621 (rs6000_push_dummy_call): Use target_float_convert.
2622 (rs6000_return_value): Likewise.
2623 * rs6000-lynx178-tdep.c: Include "target-float.h".
2624 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2625 (rs6000_lynx178_return_value): Likewise.
2626 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2627 (rs6000_register_to_value): Use target_float_convert.
2628 (rs6000_value_to_register): Likewise.
2629 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2630 (arm_extract_return_value): Use target_float_convert.
2631 (arm_store_return_value): Likewise.
2632 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2633 (sh_register_convert_to_virtual): Use target_float_convert.
2634 (sh_register_convert_to_raw): Likewise.
2635 * sh64-tdep.c: Include "target-float.h".
2636 (sh64_extract_return_value): Use target_float_convert.
2637 (sh64_register_convert_to_virtual): Likewise.
2638 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2639
14ad9311
UW
26402017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2641
2642 * target-float.c (floatformat_to_host_double): New function.
2643 (floatformat_from_host_double): Likewise.
2644 (target_float_to_host_double): Likewise.
2645 (target_float_from_host_double): Likewise.
2646 * target-float.h (target_float_to_host_double): Add prototype.
2647 (target_float_from_host_double): Likewise.
2648
2649 * guile/scm-value.c: Include "target-float.h".
2650 (gdbscm_value_to_real): Use target_float_to_host_double.
2651 Handle integer source values via value_as_long.
2652 * guile/scm-math.c: Include "target-float.h". Do not include
2653 "doublest.h", "dfp.h", and "expression.h".
2654 (vlscm_convert_typed_number): Use target_float_from_host_double.
2655 (vlscm_convert_number): Likewise.
2656
2657 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2658 (convert_value_from_python): Use target_float_from_host_double.
2659
50eff16b
UW
26602017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2661
2662 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2663 (cast_from_fixed): Likewise.
2664 (ada_scaling_type): New function.
2665 (ada_delta): Return value instead of DOUBLEST. Perform target
2666 arithmetic instead of host arithmetic.
2667 (scaling_factor): Rename to ...
2668 (ada_scaling_factor) ... this. Make non-static. Return value instead
2669 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2670 (ada_fixed_to_float): Remove.
2671 (ada_float_to_fixed): Remove.
2672 * ada-lang.h (ada_fixed_to_float): Remove.
2673 (ada_float_to_fixed): Remove.
2674 (ada_delta): Return value instead of DOUBLEST.
2675 (ada_scaling_factor): Add prototype.
2676
2677 * ada-typeprint.c: Include "target-float.h".
2678 (print_fixed_point_type): Perform target arithmetic instead of
2679 host arithmetic.
2680 * ada-valprint.c: Include "target-float.h".
2681 (ada_val_print_num): Perform target arithmetic instead of
2682 host arithmetic for fixed-point types.
2683
66c02b9e
UW
26842017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2685
2686 * target-float.c: Include <math.h>.
2687 (floatformat_binop): New function.
2688 (floatformat_compare): Likewise.
2689 (target_float_binop): Likewise.
2690 (target_float_compare): Likewise.
2691 * target-float.h: Include "expression.h".
2692 (target_float_binop): Add prototype.
2693 (target_float_compare): Likewise.
2694
2695 * valarith.c: Do not include "doublest.h" and "dfp.h".
2696 Include "common/byte-vector.h".
2697 (value_args_as_decimal): Remove, replace by ...
2698 (value_args_as_target_float): ... this function. Handle both
2699 binary and decimal target floating-point formats.
2700 (scalar_binop): Handle both binary and decimal FP using
2701 value_args_as_target_float and target_float_binop.
2702 (value_equal): Handle both binary and decimal FP using
2703 value_args_as_target_float and target_float_compare.
2704 (value_less): Likewise.
2705 (value_pos): Handle all scalar types as simple copy.
2706 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2707 * dfp.c (decimal_binop): Throw error instead of internal_error
2708 when called with an unsupported operation code.
2709
f69fdf9b
UW
27102017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2711
2712 * target-float.c (target_float_to_string): New function.
2713 (target_float_from_string): New function.
2714 * target-float.h (target_float_to_string): Add prototype.
2715 (target_float_from_string): Add prototype.
2716
2717 * valprint.c: Include "target-float.h". Do not include
2718 "doublest.h" and "dfp.h".
2719 (print_floating): Use target_float_to_string.
2720 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2721 (printf_floating): Use target_float_to_string.
2722 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2723 (print_i387_value): Use target_float_to_string.
2724 * mips-tdep.c: Include "target-float.h".
2725 (mips_print_fp_register): Use target_float_to_string.
2726 * sh64-tdep.c: Include "target-float.h".
2727 (sh64_do_fp_register): Use target_float_to_string.
2728
2729 * parse.c: Include "target-float.h". Do not include
2730 "doublest.h" and "dfp.h".
2731 (parse_float): Use target_float_from_string.
2732 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2733 (define_symbol): Use target_float_from_string.
2734 * gdbarch-selftests.c: Include "target-float.h".
2735 (register_to_value_test): Use target_float_from_string.
2736
70100014
UW
27372017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2738
2739 * Makefile.c (SFILES): Add target-float.c.
2740 (HFILES_NO_SRCDIR): Add target-float.h.
2741 (COMMON_OBS): Add target-float.o.
2742 * target-float.h: New file.
2743 * target-float.c: New file.
2744
2745 * doublest.c (floatformat_classify): Fix detection of float_zero.
2746
2747 * gdbtypes.c (is_floating_type): New function.
2748 * gdbtypes.h (is_floating_type): Add prototype.
2749
2750 * value.c: Do not include "floatformat.h".
2751 (unpack_double): Use target_float_is_valid.
2752 (is_floating_value): New function.
2753 * value.h (is_floating_value): Add prototype-
2754
2755 * valarith.c: Include "target-float.h".
2756 (value_logical_not): Use target_float_is_zero.
2757
2758 * python/py-value.c: Include "target-float.h".
2759 (valpy_nonzero): Use target_float_is_zero.
2760
ab4b1c46
TT
27612017-11-04 Tom Tromey <tom@tromey.com>
2762
2763 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2764
454dafbd
TT
27652017-11-04 Tom Tromey <tom@tromey.com>
2766
2767 * breakpoint.c (set_momentary_breakpoint): Return
2768 breakpoint_up.
2769 (until_break_command): Update.
2770 (new_until_break_fsm): Change argument types to
2771 breakpoint_up.
2772 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2773 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2774 Remove.
2775 * infcmd.c (finish_forward): Update.
2776 * breakpoint.h (set_momentary_breakpoint)
2777 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2778 (make_cleanup_delete_breakpoint): Remove.
2779 (struct breakpoint_deleter): New.
2780 (breakpoint_up): New typedef.
2781 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2782 (insert_exception_resume_breakpoint): Update.
2783 (insert_exception_resume_from_probe): Update.
2784 (insert_longjmp_resume_breakpoint): Update.
2785 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2786 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2787 * infcall.c (call_function_by_hand_dummy): Update
2788
331b71e5
TT
27892017-11-04 Tom Tromey <tom@tromey.com>
2790
2791 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2792
9f584b37
TT
27932017-11-04 Tom Tromey <tom@tromey.com>
2794
2795 * linux-tdep.c (linux_core_info_proc_mappings): Use
2796 gdb::def_vector.
2797 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2798 "size" argument.
2799 (linux_corefile_thread): Update.
2800 (linux_make_corefile_notes): Remove unused variable.
2801
779bc38e
TT
28022017-11-04 Tom Tromey <tom@tromey.com>
2803
2804 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2805 gdb::byte_vector.
2806
ed2b3126
TT
28072017-11-04 Tom Tromey <tom@tromey.com>
2808
2809 * objfiles.c (do_free_objfile_cleanup): Remove.
2810 * compile/compile-object-load.c (compile_object_load): Update.
2811 * objfiles.h (make_cleanup_free_objfile): Remove.
2812
7f6743fd
TT
28132017-11-04 Tom Tromey <tom@tromey.com>
2814
2815 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2816 (adi_read_versions): Change "tags" to "gdb_byte *".
2817 (adi_print_versions): Likewise.
2818
c80049d3
TT
28192017-11-04 Tom Tromey <tom@tromey.com>
2820
2821 * breakpoint.c
2822 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2823 from start_rbreak_breakpoints.
2824 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2825 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2826 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2827 * symtab.c (do_end_rbreak_breakpoints): Remove.
2828 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2829
167b0be1
TT
28302017-11-04 Tom Tromey <tom@tromey.com>
2831
2832 * cp-namespace.c (reset_directive_searched): Remove.
2833 (cp_lookup_symbol_via_imports): Use scoped_restore.
2834 * cp-support.c (reset_directive_searched): Remove.
2835 (make_symbol_overload_list_using): Use scoped_restore.
2836 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2837 (reset_directive_searched): Remove.
2838
5eae7aea
TT
28392017-11-04 Tom Tromey <tom@tromey.com>
2840
2841 * symfile.c (find_separate_debug_file_by_debuglink): Use
2842 unique_xmalloc_ptr.
2843
c6bcad5f
TT
28442017-11-04 Tom Tromey <tom@tromey.com>
2845
2846 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2847 type of "info".
2848 (compute_stack_depth): Likewise.
2849 (do_compile_dwarf_expr_to_c): Use std::vector.
2850
20dcd8ca
TT
28512017-11-04 Tom Tromey <tom@tromey.com>
2852
2853 * compile/compile-object-load.c (link_callbacks_einfo): Use
2854 std::string.
2855
33c7c59d
TT
28562017-11-04 Tom Tromey <tom@tromey.com>
2857
2858 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2859 Use scoped_free_pendings.
2860 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2861 scoped_free_pendings.
2862 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2863 (xcoff_initial_scan): Likewise.
2864 * buildsym.c (reset_symtab_globals): Update comment.
2865 (scoped_free_pendings): Rename from really_free_pendings.
2866 (prepare_for_building): Update comment.
2867 (buildsym_init): Likewise.
2868 * buildsym.h (class scoped_free_pendings): New class.
2869 (really_free_pendings): Don't declare.
2870
67fa57cf
UW
28712017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2872
2873 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2874 output when converting a zero value to a special byteorder format.
2875
f26ae15b
YQ
28762017-11-02 Yao Qi <yao.qi@linaro.org>
2877
2878 * frame.c (do_frame_register_read): Remove aspace.
2879 * jit.c (jit_frame_sniffer): Likwise.
2880 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2881 * regcache.c (regcache::regcache): Pass nullptr.
2882 (regcache_print): Caller updated.
2883 * regcache.h (regcache::regcache): Remove one constructor
2884 parameter aspace.
2885
6c6e9412
YQ
28862017-11-02 Yao Qi <yao.qi@linaro.org>
2887
2888 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2889
8b86c959
YQ
28902017-11-02 Yao Qi <yao.qi@linaro.org>
2891
2892 * breakpoint.c (insert_single_step_breakpoints): Update.
2893 * frame.c (struct frame_info) <aspace>: Add const.
2894 (frame_save_as_regcache): Add const.
2895 (get_frame_address_space): Return const address_space *.
2896 * frame.h (get_frame_address_space): Update declaration.
2897 * infrun.c (struct step_over_info) <aspace>: Add const.
2898 (set_step_over_info): Make aspace const.
2899 (displaced_step_prepare_throw): Change variable const.
2900 (resume): Likewise.
2901 (proceed): Likewise.
2902 (adjust_pc_after_break): Likewise.
2903 (save_waitstatus): Likewise.
2904 (handle_signal_stop): Likewise.
2905 (keep_going_pass_signal): Likewise.
2906 * jit.c (jit_frame_sniffer): Add const.
2907 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2908 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2909 * record-full.c (record_full_wait_1): Likewise.
2910 * regcache.c (regcache::regcache): Change parameter to const.
2911 * regcache.h (regcache::regcache): Likewise.
2912 (regcache::aspace): Return const address_space *.
2913 (regcache) <m_aspace>: Add const.
2914
a01bda52
YQ
29152017-11-02 Yao Qi <yao.qi@linaro.org>
2916
2917 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2918 * frame.c (create_sentinel_frame): Likewise.
2919 * infrun.c (displaced_step_prepare_throw): Likewise.
2920 (resume): Likewise.
2921 (thread_still_needs_step_over_bp): Likewise.
2922 (proceed): Likewise.
2923 (do_target_wait): Likewise.
2924 (adjust_pc_after_break): Likewise.
2925 (handle_syscall_event): Likewise.
2926 (save_waitstatus): Likewise.
2927 (handle_inferior_event_1): Likewise.
2928 (handle_signal_stop): Likewise.
2929 (keep_going_pass_signal): Likewise.
2930 * linux-nat.c (status_callback): Likewise.
2931 (save_stop_reason): Likewise.
2932 (resume_stopped_resumed_lwps): Likewise.
2933 * record-full.c (record_full_exec_insn): Likewise.
2934 (record_full_wait_1): Likewise.
2935 * regcache.c (get_regcache_aspace): Remove.
2936 * regcache.h (get_regcache_aspace): Remove.
2937
d999647b
YQ
29382017-11-02 Yao Qi <yao.qi@linaro.org>
2939
2940 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2941 (init_regcache_descr): Use gdbarch_num_regs.
2942 (regcache::regcache): Likewise.
2943 (regcache::get_register_status): Likewise.
2944 (regcache::assert_raw_regnum): Likewise.
2945 (regcache::cooked_read): Likewise.
2946 (regcache::cooked_read_value): Likewise.
2947 (regcache::cooked_write): Likewise.
2948 (regcache::dump): Likewise.
2949 (regcache::num_raw_registers): New method.
2950 * regcache.h (class regcache) <num_raw_registers>: New.
2951
4e888c28
YQ
29522017-11-02 Yao Qi <yao.qi@linaro.org>
2953
2954 * regcache.c (regcache::assert_regnum): New method.
2955 (regcache::invalidate): Call assert_regnum.
2956 (regcache::raw_update): Likewise.
2957 (regcache::raw_write): Likewise.
2958 (regcache::raw_read_part): Likewise.
2959 (regcache::raw_write_part): Likewise.
2960 (regcache::raw_supply): Likewise.
2961 (regcache::raw_supply_integer): Likewise.
2962 (regcache::raw_supply_zeroed): Likewise.
2963 (regcache::raw_collect): Likewise.
2964 (regcache::raw_collect_integer): Likewise.
2965 * regcache.h (regcache::assert_regnum): Declare.
2966
2e1b49b3
YQ
29672017-11-02 Yao Qi <yao.qi@linaro.org>
2968
2969 * regcache.c (regcache::dump): Remove code.
2970
6c5218df
YQ
29712017-11-02 Yao Qi <yao.qi@linaro.org>
2972
2973 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2974 Remove.
2975 <sizeof_cooked_register_status>: Remove.
2976 (init_regcache_descr): Update.
2977 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2978 (regcache::save): Likewise.
2979 (regcache::dump): Likewise.
2980
dcc31d28
JB
29812017-11-01 James Bowman <james.bowman@ftdichip.com>
2982
2983 * ft32-tdep.c (ft32_fetch_instruction): New function.
2984 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2985
3a87ae65
SM
29862017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2987
2988 * cli/cli-script.c (execute_control_command): Rename to ...
2989 (execute_control_command_1): ... this.
2990 (execute_control_command): New function.
2991
09b847f3
SM
29922017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2993
2994 * tracepoint.c (tfind_command): Remove const_cast.
2995
f871c485
MG
29962017-10-30 Mike Gulick <mgulick@mathworks.com>
2997
2998 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2999
b020ff80
SM
30002017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3001
3002 * common/common-utils.h (in_inclusive_range): New function.
3003 * arm-tdep.c (arm_record_extension_space): Use
3004 in_inclusive_range.
3005 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3006 * cris-tdep.c (cris_spec_reg_applicable): Use
3007 in_inclusive_range.
3008
1b81856f
PA
30092017-10-30 Pedro Alves <palves@redhat.com>
3010 Simon Marchi <simon.marchi@ericsson.com>
3011
3012 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3013 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3014
31b833b3
PA
30152017-10-30 Pedro Alves <palves@redhat.com>
3016
3017 * common/common-utils.c (string_appendf, string_vappendf): New
3018 functions.
3019 * common/common-utils.h (string_appendf, string_vappendf): New
3020 declarations.
3021 * unittests/common-utils-selftests.c (string_appendf_func)
3022 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3023 (string_vappendf_tests): New functions.
3024 (_initialize_common_utils_selftests): Register "string_appendf" and
3025 "string_vappendf tests".
3026
4a250334
PA
30272017-10-30 Pedro Alves <palves@redhat.com>
3028
3029 * unittests/common-utils-selftests.c (format_func): New typedef.
3030 (string_printf_tests, string_vprintf_tests): Tests factored out
3031 and merged to ...
3032 (test_format_func): ... this new function.
3033 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3034 test_format_func.
3035
16c5c17e
SM
30362017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3037
3038 * darwin-nat.c: Remove include of gdb.h.
3039
7ca51576
SM
30402017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3041
3042 * xtensa-xtregs.c: Fix formatting issues.
3043
c1342859
SM
30442017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3045
3046 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3047
484d8d36
MD
30482017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3049
3050 PR python/21213
3051 * python/py-infthread.c (thpy_get_inferior): Increment reference
3052 of inferior before returning it.
3053
b5540b5f
SM
30542017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3055
3056 * unittests/common-utils-selftests.c (format): Add
3057 ATTRIBUTE_PRINTF.
3058
5a9dcda1
SM
30592017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3060
3061 * xml-syscall.c (struct syscall_desc): Add constructor.
3062 <name>: Change type to std::string.
3063 (syscall_desc_up): New typedef.
3064 (syscall_desc_p): Remove typeder.
3065 (DEF_VEC_P(syscall_desc_p)): Remove.
3066 (struct syscall_group_desc): Add constructor.
3067 <name>: Change type to std::string.
3068 <syscalls>: Change type to std::vector.
3069 (syscall_group_desc_up): New typedef.
3070 (syscall_group_desc_p): Remove typedef.
3071 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3072 (struct syscalls_info) <syscalls>: Change type to std::vector of
3073 unique_ptr.
3074 <groups>: Likewise.
3075 <my_gdb_datadir>: Change type to std::string.
3076 (syscalls_info_up): New typedef.
3077 (allocate_syscalls_info): Remove.
3078 (syscalls_info_free_syscalls_desc): Remove.
3079 (syscalls_info_free_syscall_group_desc): Remove.
3080 (free_syscalls_info): Remove.
3081 (make_cleanup_free_syscalls_info): Remove.
3082 (syscall_group_create_syscall_group_desc): Adjust.
3083 (syscall_group_add_syscall): Adjust.
3084 (syscall_create_syscall_desc): Adjust.
3085 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3086 (init_syscalls_info): Adjust.
3087 (syscall_group_get_group_by_name): Adjust.
3088 (xml_get_syscall_number): Adjust.
3089 (xml_get_syscall_name): Adjust.
3090 (xml_list_of_syscalls): Adjust.
3091 (xml_list_syscalls_by_group): Adjust.
3092 (xml_list_of_groups): Adjust.
3093
45461e0d
SM
30942017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3095
3096 * probe.h: Don't include gdb_vecs.h.
3097 (DEF_VEC_P (probe_p)): Remove.
3098 (find_probes_in_objfile): Return an std::vector.
3099 * probe.c (find_probes_in_objfile): Likewise.
3100 * breakpoint.c (breakpoint_objfile_data)
3101 <longjmp_probes>: Change type to std::vector.
3102 <exception_probes>: Likewise.
3103 (free_breakpoint_probes): Don't manually free vectors.
3104 (create_longjmp_master_breakpoint): Adjust.
3105 (create_exception_master_breakpoint): Adjust.
3106 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3107 parameter type, adjust.
3108 (svr4_create_solib_event_breakpoints): Adjust.
3109
43dce439
SM
31102017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3111
3112 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3113 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3114 with new.
3115 (free_breakpoint_probes): Rename to ...
3116 (free_breakpoint_objfile_data): ... this, and call delete on
3117 bp_objfile_data..
3118
6a1b9516
SM
31192017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3120
3121 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3122 (loaded_script_ptr): Remove typedef.
3123 (DEF_VEC_P (loaded_script_ptr)): Remove.
3124 (struct collect_matching_scripts_data): Add constructor.
3125 <scripts_p>: Change type to (pointer to) std::vector.
3126 (collect_matching_scripts_data): Adjust.
3127 (sort_scripts_by_name): Make suitable for std::sort.
3128 (print_scripts): Don't sort vector, adjust to std::vector.
3129 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3130
593e3209
SM
31312017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3132
3133 * symfile.c (filename_language): Make struct, not typedef. Add
3134 constructor.
3135 <ext>: Change type to std::string.
3136 (DEF_VEC_O (filename_language)): Remove.
3137 (filename_language_table): Change type to std::vector.
3138 (add_filename_language): Adjust.
3139 (set_ext_lang_command): Adjust.
3140 (info_ext_lang_command): Adjust.
3141 (deduce_language_from_filename): Adjust.
3142 (class scoped_restore_filename_language_table): Remove.
3143 (test_filename_language): Use scoped_restore.
3144 (test_set_ext_lang_command): Use scoped_restore, adjust to
3145 std::vector change.
3146
32fa66eb
SM
31472017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3148
3149 * symfile.c: Include selftest.h.
3150 (class scoped_restore_filename_language_table): New.
3151 (test_filename_language): New test.
3152 (test_set_ext_lang_command): New test.
3153 (_initialize_symfile): Register tests.
3154
4a27f119
KS
31552017-10-27 Keith Seitz <keiths@redhat.com>
3156
3157 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3158 in the bp_location, falling back to find_pc_sect_function when
3159 needed.
3160 (add_location_to_breakpoint): Save sal->symbol.
3161 * breakpoint.h (struct bp_location) <symbol>: New field.
3162 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3163 * symtab.h (struct symtab_and_line) <symbol>: New field.
3164
a43f3893
PF
31652017-10-26 Patrick Frants <osscontribute@gmail.com>
3166
7453e6b2 3167 PR gdb/13669
a43f3893
PF
3168 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3169 to rewind obstack.
3170
23cc4e1b
PA
31712017-10-26 Pedro Alves <palves@redhat.com>
3172
3173 * remote.c (remote_async_terminal_ours_p): Delete.
3174 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3175 Remove references to 'remote_async_terminal_ours_p'.
3176
6abc18bb
YQ
31772017-10-26 Yao Qi <yao.qi@linaro.org>
3178
3179 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3180
bd522513
YQ
31812017-10-26 Yao Qi <yao.qi@linaro.org>
3182
3183 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3184 aspace const.
3185 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3186 Likewise.
3187 * breakpoint.c (bpstat_check_location): Remove cast.
3188 (breakpoint_hit_catch_fork): Make aspce const.
3189 (breakpoint_hit_catch_solib): Likewise.
3190 (breakpoint_hit_catch_exec): Likewise.
3191 (breakpoint_hit_ranged_breakpoint): Likewise.
3192 (breakpoint_hit_watchpoint): Likewise.
3193 (base_breakpoint_breakpoint_hit): Likewise.
3194 (bkpt_breakpoint_hit): Likewise.
3195 (dprintf_breakpoint_hit): Likewise.
3196 (tracepoint_breakpoint_hit): Likewise.
3197 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3198
accd0bcd
YQ
31992017-10-26 Yao Qi <yao.qi@linaro.org>
3200
3201 * breakpoint.c (breakpoint_location_address_match): Change
3202 "struct address_space *" to "const address_space".
3203 (breakpoint_location_address_range_overlap): Likewise.
3204 (breakpoint_here_p): Likewise.
3205 (breakpoint_in_range_p): Likewise.
3206 (moribund_breakpoint_here_p): Likewise.
3207 (bp_location_inserted_here_p): Likewise.
3208 (software_breakpoint_inserted_here_p): Likewise.
3209 (hardware_breakpoint_inserted_here_p): Likewise.
3210 (hardware_watchpoint_inserted_in_range): Likewise.
3211 (bpstat_check_location): Likewise.
3212 (bpstat_stop_status): Likewise.
3213 (breakpoint_address_match): Likewise.
3214 (breakpoint_address_match_range): Likewise.
3215 (breakpoint_location_address_match): Likewise.
3216 (breakpoint_location_address_range_overlap): Likewise.
3217 (insert_single_step_breakpoint): Likewise.
3218 (breakpoint_has_location_inserted_here): Likewise.
3219 (single_step_breakpoint_inserted_here_p): Likewise.
3220 (pc_at_non_inline_function): Likewise.
3221 * breakpoint.h (bpstat_stop_status): Update declaration.
3222 (breakpoint_here_p): Likewise.
3223 (breakpoint_in_range_p): Likewise.
3224 (moribund_breakpoint_here_p): Likewise.
3225 (breakpoint_inserted_here_p): Likewise.
3226 (software_breakpoint_inserted_here_p): Likewise.
3227 (hardware_breakpoint_inserted_here_p): Likewise.
3228 (breakpoint_has_location_inserted_here): Likewise.
3229 (single_step_breakpoint_inserted_here_p): Likewise.
3230 (hardware_watchpoint_inserted_in_range): Likewise.
3231 (breakpoint_address_match): Likewise.
3232 (insert_single_step_breakpoint): Likewise.
3233 (pc_at_non_inline_function): Likewise.
3234 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3235 * record.c (record_check_stopped_by_breakpoint): Likewise.
3236 * record.h (record_check_stopped_by_breakpoint): Likewise.
3237 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3238
ac7936df
YQ
32392017-10-25 Yao Qi <yao.qi@linaro.org>
3240
3241 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3242 regcache->arch () instead get_regcache_arch.
3243 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3244 Likewise.
3245 (aarch64_fbsd_store_inferior_registers): Likewise.
3246 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3247 (store_gregs_to_thread): Likewise.
3248 (fetch_fpregs_from_thread): Likewise.
3249 (store_fpregs_to_thread): Likewise.
3250 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3251 (aarch64_store_return_value): Likewise.
3252 (aarch64_software_single_step): Likewise.
3253 * aix-thread.c (aix_thread_wait): Likewise.
3254 (supply_reg32): Likewise.
3255 (supply_sprs64): Likewise.
3256 (supply_sprs32): Likewise.
3257 (fill_gprs64): Likewise.
3258 (fill_gprs32): Likewise.
3259 (fill_sprs64): Likewise.
3260 (fill_sprs32): Likewise.
3261 (store_regs_user_thread): Likewise.
3262 (store_regs_kernel_thread): Likewise.
3263 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3264 (alphabsd_store_inferior_registers): Likewise.
3265 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3266 (alpha_store_return_value): Likewise.
3267 (alpha_deal_with_atomic_sequence): Likewise.
3268 (alpha_next_pc): Likewise.
3269 (alpha_software_single_step): Likewise.
3270 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3271 (amd64bsd_store_inferior_registers): Likewise.
3272 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3273 Likewise.
3274 (amd64_linux_store_inferior_registers): Likewise.
3275 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3276 (amd64_collect_native_gregset): Likewise.
3277 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3278 (amd64obsd_collect_uthread): Likewise.
3279 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3280 (amd64_collect_fpregset): Likewise.
3281 (amd64_supply_fxsave): Likewise.
3282 (amd64_supply_xsave): Likewise.
3283 (amd64_collect_fxsave): Likewise.
3284 (amd64_collect_xsave): Likewise.
3285 * arc-tdep.c (arc_write_pc): Likewise.
3286 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3287 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3288 (arm_fbsd_store_inferior_registers): Likewise.
3289 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3290 (store_vfp_regs): Likewise.
3291 (arm_linux_fetch_inferior_registers): Likewise.
3292 (arm_linux_store_inferior_registers): Likewise.
3293 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3294 (arm_linux_sigreturn_next_pc): Likewise.
3295 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3296 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3297 (fetch_register): Likewise.
3298 (store_register): Likewise.
3299 * arm-tdep.c (arm_is_thumb): Likewise.
3300 (displaced_in_arm_mode): Likewise.
3301 (bx_write_pc): Likewise.
3302 (arm_get_next_pcs_addr_bits_remove): Likewise.
3303 (arm_software_single_step): Likewise.
3304 (arm_extract_return_value): Likewise.
3305 (arm_store_return_value): Likewise.
3306 (arm_write_pc): Likewise.
3307 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3308 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3309 (bsd_uthread_store_registers): Likewise.
3310 * core-regset.c (fetch_core_registers): Likewise.
3311 * corelow.c (get_core_registers): Likewise.
3312 * cris-tdep.c (cris_store_return_value): Likewise.
3313 (cris_extract_return_value): Likewise.
3314 (find_step_target): Likewise.
3315 (find_step_target): Likewise.
3316 (cris_software_single_step): Likewise.
3317 * ctf.c (ctf_fetch_registers): Likewise.
3318 * darwin-nat.c (cancel_breakpoint): Likewise.
3319 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3320 * frv-tdep.c (frv_extract_return_value): Likewise.
3321 * ft32-tdep.c (ft32_store_return_value): Likewise.
3322 (ft32_extract_return_value): Likewise.
3323 * go32-nat.c (fetch_register): Likewise.
3324 (go32_fetch_registers): Likewise.
3325 (go32_store_registers): Likewise.
3326 (store_register): Likewise.
3327 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3328 (h8300_store_return_value): Likewise.
3329 * hppa-linux-nat.c (fetch_register): Likewise.
3330 (store_register): Likewise.
3331 (hppa_linux_fetch_inferior_registers): Likewise.
3332 (hppa_linux_store_inferior_registers): Likewise.
3333 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3334 (i386_darwin_store_inferior_registers): Likewise.
3335 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3336 (gnu_store_registers): Likewise.
3337 * i386-linux-nat.c (fetch_register): Likewise.
3338 (store_register): Likewise.
3339 (supply_gregset): Likewise.
3340 (fill_gregset): Likewise.
3341 (i386_linux_fetch_inferior_registers): Likewise.
3342 (i386_linux_store_inferior_registers): Likewise.
3343 (i386_linux_resume): Likewise.
3344 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3345 Likewise.
3346 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3347 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3348 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3349 (i386obsd_collect_uthread): Likewise.
3350 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3351 (i386_supply_gregset): Likewise.
3352 (i386_collect_gregset): Likewise.
3353 (i386_supply_fpregset): Likewise.
3354 (i386_collect_fpregset): Likewise.
3355 (i386_mpx_bd_base): Likewise.
3356 * i386-v4-nat.c (supply_fpregset): Likewise.
3357 (fill_fpregset): Likewise.
3358 * i387-tdep.c (i387_supply_fsave): Likewise.
3359 (i387_collect_fsave): Likewise.
3360 (i387_supply_fxsave): Likewise.
3361 (i387_collect_fxsave): Likewise.
3362 (i387_supply_xsave): Likewise.
3363 (i387_collect_xsave): Likewise.
3364 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3365 (ia64_linux_store_registers): Likewise.
3366 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3367 (ia64_extract_return_value): Likewise.
3368 (ia64_store_return_value): Likewise.
3369 (find_func_descr): Likewise.
3370 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3371 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3372 (inf_ptrace_store_registers): Likewise.
3373 * infrun.c (use_displaced_stepping): Likewise.
3374 (displaced_step_prepare_throw): Likewise.
3375 (resume): Likewise.
3376 (proceed): Likewise.
3377 (do_target_wait): Likewise.
3378 (adjust_pc_after_break): Likewise.
3379 (handle_inferior_event_1): Likewise.
3380 (handle_signal_stop): Likewise.
3381 (save_infcall_suspend_state): Likewise.
3382 (restore_infcall_suspend_state): Likewise.
3383 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3384 * jit.c (jit_frame_prev_register): Likewise.
3385 * linux-nat.c (save_stop_reason): Likewise.
3386 (linux_nat_wait_1): Likewise.
3387 (resume_stopped_resumed_lwps): Likewise.
3388 * linux-record.c (record_linux_sockaddr): Likewise.
3389 (record_linux_msghdr): Likewise.
3390 (record_linux_system_call): Likewise.
3391 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3392 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3393 (lm32_store_return_value): Likewise.
3394 * m32c-tdep.c (m32c_read_flg): Likewise.
3395 (m32c_pseudo_register_read): Likewise.
3396 (m32c_pseudo_register_write): Likewise.
3397 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3398 (m32r_linux_collect_gregset): Likewise.
3399 * m32r-tdep.c (m32r_store_return_value): Likewise.
3400 (m32r_extract_return_value): Likewise.
3401 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3402 (m68kbsd_collect_fpregset): Likewise.
3403 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3404 * m68k-linux-nat.c (fetch_register): Likewise.
3405 (old_fetch_inferior_registers): Likewise.
3406 (old_store_inferior_registers): Likewise.
3407 (store_regs): Likewise.
3408 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3409 (m68k_svr4_store_return_value): Likewise.
3410 * m88k-tdep.c (m88k_store_arguments): Likewise.
3411 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3412 (mi_cmd_data_write_register_values): Likewise.
3413 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3414 (mips_fbsd_store_inferior_registers): Likewise.
3415 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3416 (mips_fbsd_supply_gregs): Likewise.
3417 (mips_fbsd_collect_fpregs): Likewise.
3418 (mips_fbsd_collect_gregs): Likewise.
3419 (mips_fbsd_supply_fpregset): Likewise.
3420 (mips_fbsd_collect_fpregset): Likewise.
3421 (mips_fbsd_supply_gregset): Likewise.
3422 (mips_fbsd_collect_gregset): Likewise.
3423 * mips-linux-nat.c (supply_gregset): Likewise.
3424 (fill_gregset): Likewise.
3425 (supply_fpregset): Likewise.
3426 (fill_fpregset): Likewise.
3427 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3428 (mips_fill_gregset): Likewise.
3429 (mips_supply_fpregset): Likewise.
3430 (mips_fill_fpregset): Likewise.
3431 (mips64_supply_gregset): Likewise.
3432 (micromips_linux_sigframe_validate): Likewise.
3433 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3434 (mipsnbsd_fetch_inferior_registers): Likewise.
3435 (mipsnbsd_store_inferior_registers): Likewise.
3436 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3437 (mipsnbsd_supply_gregset): Likewise.
3438 (mipsnbsd_iterate_over_regset_sections): Likewise.
3439 (mipsnbsd_supply_reg): Likewise.
3440 (mipsnbsd_supply_fpreg): Likewise.
3441 * mips-tdep.c (mips_in_frame_stub): Likewise.
3442 (mips_dummy_id): Likewise.
3443 (is_octeon_bbit_op): Likewise.
3444 (micromips_bc1_pc): Likewise.
3445 (extended_mips16_next_pc): Likewise.
3446 (mips16_next_pc): Likewise.
3447 (deal_with_atomic_sequence): Likewise.
3448 * moxie-tdep.c (moxie_process_readu): Likewise.
3449 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3450 * nto-procfs.c (procfs_store_registers): Likewise.
3451 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3452 (ppcfbsd_store_inferior_registers): Likewise.
3453 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3454 (fetch_altivec_register): Likewise.
3455 (get_spe_registers): Likewise.
3456 (fetch_spe_register): Likewise.
3457 (fetch_altivec_registers): Likewise.
3458 (fetch_all_gp_regs): Likewise.
3459 (fetch_all_fp_regs): Likewise.
3460 (store_vsx_register): Likewise.
3461 (store_altivec_register): Likewise.
3462 (set_spe_registers): Likewise.
3463 (store_spe_register): Likewise.
3464 (store_altivec_registers): Likewise.
3465 (store_all_gp_regs): Likewise.
3466 (store_all_fp_regs): Likewise.
3467 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3468 (ppc_linux_collect_gregset): Likewise.
3469 (ppc_canonicalize_syscall): Likewise.
3470 (ppc_linux_record_signal): Likewise.
3471 (ppu2spu_prev_register): Likewise.
3472 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3473 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3474 (ppcobsd_store_registers): Likewise.
3475 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3476 Likewise.
3477 (ppc_ravenscar_generic_store_registers): Likewise.
3478 * procfs.c (procfs_fetch_registers): Likewise.
3479 (procfs_store_registers): Likewise.
3480 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3481 (ravenscar_store_registers): Likewise.
3482 (ravenscar_prepare_to_store): Likewise.
3483 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3484 * record-full.c (record_full_wait_1): Likewise.
3485 (record_full_registers_change): Likewise.
3486 (record_full_store_registers): Likewise.
3487 (record_full_core_fetch_registers): Likewise.
3488 (record_full_save): Likewise.
3489 (record_full_goto_insn): Likewise.
3490 * regcache.c (regcache_register_size): Likewise.
3491 (get_regcache_arch): Remove.
3492 (regcache_read_pc): Likewise.
3493 * regcache.h (get_regcache_arch): Remove.
3494 * remote-sim.c (gdbsim_fetch_register): Likewise.
3495 (gdbsim_store_register): Likewise.
3496 * remote.c (fetch_register_using_p): Likewise.
3497 (send_g_packet): Likewise.
3498 (remote_prepare_to_store): Likewise.
3499 (store_registers_using_G): Likewise.
3500 * reverse.c (save_bookmark_command): Likewise.
3501 (goto_bookmark_command): Likewise.
3502 * rs6000-aix-tdep.c (branch_dest): Likewise.
3503 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3504 (fetch_register): Likewise.
3505 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3506 (ppc_collect_reg): Likewise.
3507 (ppc_collect_gregset): Likewise.
3508 (ppc_collect_fpregset): Likewise.
3509 (ppc_collect_vsxregset): Likewise.
3510 (ppc_collect_vrregset): Likewise.
3511 (ppc_displaced_step_hw_singlestep): Likewise.
3512 (rs6000_pseudo_register_read): Likewise.
3513 (rs6000_pseudo_register_write): Likewise.
3514 * s390-linux-nat.c (supply_gregset): Likewise.
3515 (fill_gregset): Likewise.
3516 (s390_linux_fetch_inferior_registers): Likewise.
3517 * s390-linux-tdep.c (s390_write_pc): Likewise.
3518 (s390_software_single_step): Likewise.
3519 (s390_all_but_pc_registers_record): Likewise.
3520 (s390_linux_syscall_record): Likewise.
3521 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3522 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3523 (shnbsd_store_inferior_registers): Likewise.
3524 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3525 (sh_extract_return_value_fpu): Likewise.
3526 (sh_store_return_value_nofpu): Likewise.
3527 (sh_corefile_supply_regset): Likewise.
3528 (sh_corefile_collect_regset): Likewise.
3529 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3530 (sh64_store_return_value): Likewise.
3531 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3532 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3533 (sparc_store_inferior_registers): Likewise.
3534 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3535 (sparc_ravenscar_prepare_to_store): Likewise.
3536 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3537 (sparc_analyze_control_transfer): Likewise.
3538 (sparc_step_trap): Likewise.
3539 (sparc_software_single_step): Likewise.
3540 (sparc32_gdbarch_init): Likewise.
3541 (sparc_supply_rwindow): Likewise.
3542 (sparc_collect_rwindow): Likewise.
3543 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3544 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3545 (sparc64nbsd_collect_gregset): Likewise.
3546 (sparc64nbsd_supply_fpregset): Likewise.
3547 (sparc64nbsd_collect_fpregset): Likewise.
3548 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3549 (sparc64_supply_gregset): Likewise.
3550 (sparc64_collect_gregset): Likewise.
3551 (sparc64_supply_fpregset): Likewise.
3552 (sparc64_collect_fpregset): Likewise.
3553 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3554 * spu-tdep.c (spu_unwind_sp): Likewise.
3555 (spu2ppu_prev_register): Likewise.
3556 (spu_memory_remove_breakpoint): Likewise.
3557 * stack.c (return_command): Likewise.
3558 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3559 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3560 * tracefile.c (trace_save_ctf): Likewise.
3561 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3562 (do_windows_store_inferior_registers): Likewise.
3563 (windows_resume): Likewise.
3564 * xtensa-linux-nat.c (fill_gregset): Likewise.
3565 (supply_gregset_reg): Likewise.
3566 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3567 (xtensa_register_read_masked): Likewise.
3568 (xtensa_supply_gregset): Likewise.
3569 (xtensa_extract_return_value): Likewise.
3570 (xtensa_store_return_value): Likewise.
3571
edd079d9
UW
35722017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3573
3574 * doublest.c (floatformat_from_string): New function.
3575 * doublest.h (floatformat_from_string): Add prototype.
3576
3577 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3578 (OP_FLOAT): ... this.
3579 * expression.h: Do not include "doublest.h".
3580 (union exp_element): Replace doubleconst and decfloatconst by
3581 new element floatconst.
3582 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3583 (ada_evaluate_subexp): Likewise.
3584 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3585 OP_DOUBLE and OP_DECFLOAT.
3586 * expprint.c (print_subexp_standard): Likewise.
3587 (dump_subexp_body_standard): Likewise.
3588 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3589
3590 * parse.c: Include "dfp.h".
3591 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3592 (write_exp_elt_floatcst): New function.
3593 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3594 and OP_DECFLOAT.
3595 (operator_check_standard): Likewise.
3596 (parse_float): Do not accept suffix. Take type as input. Return bool.
3597 Return target format buffer instead of host DOUBLEST.
3598 Use floatformat_from_string and decimal_from_string to parse
3599 either binary or decimal floating-point types.
3600 (parse_c_float): Remove.
3601 * parser-defs.h: Do not include "doublest.h".
3602 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3603 (write_exp_elt_floatcst): Add prototype.
3604 (parse_float): Update prototype.
3605 (parse_c_float): Remove.
3606
3607 * c-exp.y: Do not include "dfp.h".
3608 (typed_val_float): Use byte buffer instead of DOUBLEST.
3609 (typed_val_decfloat): Remove.
3610 (DECFLOAT): Remove.
3611 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3612 (parse_number): Update to new parse_float interface.
3613 Parse suffixes and determine type before calling parse_float.
3614 Handle decimal and binary FP types the same way.
3615
3616 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3617 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3618 (parse_number): Update to new parse_float interface.
3619 Parse suffixes and determine type before calling parse_float.
3620
3621 * f-exp.y: Replace dval by typed_val_float.
3622 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3623 (parse_number): Use parse_float instead of atof.
3624
3625 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3626 (parse_go_float): Remove.
3627 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3628 (parse_number): Call parse_float instead of parse_go_float.
3629 Parse suffixes and determine type before calling parse_float.
3630
3631 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3632 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3633 (parse_number): Update to new parse_float interface.
3634 Parse suffixes and determine type before calling parse_float.
3635
3636 * m2-exp.y: Replace dval by byte buffer val.
3637 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3638 (parse_number): Call parse_float instead of atof.
3639
3640 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3641 (lex_number): Call parse_float instead of strtod.
3642 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3643 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3644 Use write_exp_elt_floatcst.
3645 (unit_testing): Remove static variable.
3646 (rust_type): Do not check unit_testing.
3647 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3648
3649 * ada-exp.y (type_float, type_double): Remove.
3650 (typed_val_float): Use byte buffer instead of DOUBLEST.
3651 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3652 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3653
cc628f3d
AH
36542017-10-25 Alan Hayward <alan.hayward@arm.com>
3655
3656 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3657 * arch/aarch64.h: New file.
3658
09a7c6aa
UW
36592017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3660
3661 * dfp.h (decimal_from_string): Use const reference for argument.
3662 * dfp.c (decimal_from_string): Likewise.
3663
8ba0dd51
UW
36642017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3665
3666 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3667 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3668 * mips-tdep.c (mips_print_fp_register): Likewise.
3669
16e812b2
UW
36702017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3671
3672 * common/format.h (enum argclass): Replace decfloat_arg by
3673 dec32float_arg, dec64float_arg, and dec128float_arg.
3674 * common/format.c (parse_format_string): Update to return
3675 new decimal float argument classes.
3676
3677 * printcmd.c (printf_decfloat): Rename to ...
3678 (printf_floating): ... this. Add argclass argument, and use it
3679 instead of parsing the format string again. Add support for
3680 binary floating-point values, using floatformat_to_string.
3681 Convert value to the target format if it doesn't already match.
3682 (ui_printf): Call printf_floating instead of printf_decfloat,
3683 also for double_arg / long_double_arg. Pass argclass.
3684
3685 * dfp.c (decimal_to_string): Add format string argument.
3686 * dfp.h (decimal_to_string): Likewise.
3687
3688 * doublest.c (floatformat_to_string): Add format string argument.
3689 * doublest.h (floatformat_to_string): Likewise.
3690
fdf0cbc2
UW
36912017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3692
3693 * doublest.c (floatformat_precision): New routine.
3694 (floatformat_to_string): Likewise.
3695 * doublest.c (floatformat_to_string): Add prototype.
3696
3697 * printcmd.c (print_scalar_formatted): Only call print_floating
3698 on floating-point types.
3699 * valprint.c: Do not include "floatformat.h".
3700 (generic_val_print_decfloat): Remove.
3701 (generic_val_print): Call generic_val_print_float for both
3702 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3703 (print_floating): Use floatformat_to_string. Handle decimal float.
3704 (print_decimal_floating): Remove, merge into floatformat_to_string.
3705 * value.h (print_decimal_floating): Remove.
3706
3707 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3708
5033013f
UW
37092017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3710
3711 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3712
a664f67e
SM
37132017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3714
3715 * memattr.h: Don't include vec.h.
3716 (struct mem_attrib): Initialize fields.
3717 <unknown>: New static method.
3718 (struct mem_region): Add constructors, operator<, initialize
3719 fields.
3720 * memattr.c: Include algorithm.
3721 (default_mem_attrib, unknown_mem_attrib): Remove.
3722 (user_mem_region_list): New global.
3723 (target_mem_region_list, mem_region_list): Change type to
3724 std::vector<mem_region>.
3725 (mem_use_target): Now a function.
3726 (target_mem_regions_valid): Change type to bool.
3727 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3728 (require_user_regions): Adjust.
3729 (require_target_regions): Adjust.
3730 (create_mem_region): Adjust.
3731 (lookup_mem_region): Adjust.
3732 (invalidate_target_mem_regions): Adjust.
3733 (mem_clear): Rename to...
3734 (user_mem_clear): ... this, and adjust.
3735 (mem_command): Adjust.
3736 (info_mem_command): Adjust.
3737 (mem_enable, enable_mem_command, mem_disable,
3738 disable_mem_command): Adjust.
3739 (mem_delete): Adjust.
3740 (delete_mem_command): Adjust.
3741 * memory-map.h (parse_memory_map): Return an std::vector.
3742 * memory-map.c (parse_memory_map): Likewise.
3743 (struct memory_map_parsing_data): Add constructor.
3744 <memory_map>: Point to std::vector.
3745 (memory_map_start_memory): Adjust.
3746 (memory_map_end_memory): Adjust.
3747 (memory_map_end_property): Adjust.
3748 (clear_result): Remove.
3749 * remote.c (remote_memory_map): Return an std::vector.
3750 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3751 Remove.
3752 (target_debug_print_mem_region_vector): New.
3753 * target-delegates.c: Regenerate.
3754 * target.h (mem_region_vector): New typedef.
3755 (to_memory_map): Return mem_region_vector.
3756 (target_memory_map): Return an std::vector.
3757 * target.c (target_memory_map): Return an std::vector.
3758 (flash_erase_command): Adjust.
3759
6e17c565
SM
37602017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3761
3762 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3763 Change type to std::string.
3764 (memory_map_start_property): Adjust.
3765 (memory_map_end_property): Adjust.
3766
cfba9872
SM
37672017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3768
3769 * infrun.h: Include common/byte-vector.h.
3770 (struct displaced_step_closure): New struct.
3771 (struct buf_displaced_step_closure): New struct.
3772 * infrun.c (displaced_step_closure::~displaced_step_closure):
3773 Provide default implementation.
3774 (displaced_step_clear): Deallocate step closure with delete.
3775 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3776 (aarch64_displaced_step_closure): ... this, extend
3777 displaced_step_closure.
3778 (aarch64_displaced_step_data) <dsc>: Change type to
3779 aarch64_displaced_step_closure.
3780 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3781 unique_ptr.
3782 (aarch64_displaced_step_fixup): Add cast for displaced step
3783 closure.
3784 * amd64-tdep.c (displaced_step_closure): Rename to ...
3785 (amd64_displaced_step_closure): ... this, extend
3786 displaced_step_closure.
3787 <insn_buf>: Change type to std::vector<gdb_byte>.
3788 <max_len>: Remove.
3789 (fixup_riprel): Change type of DSC parameter, adjust to type
3790 change of insn_buf.
3791 (fixup_displaced_copy): Change type of DSC parameter.
3792 (amd64_displaced_step_copy_insn): Instantiate
3793 amd64_displaced_step_closure.
3794 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3795 to type change of insn_buf.
3796 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3797 parameter DSC.
3798 (arm_linux_copy_svc): Likewise.
3799 (cleanup_kernel_helper_return): Likewise.
3800 (arm_catch_kernel_helper_return): Likewise.
3801 (arm_linux_displaced_step_copy_insn): Instantiate
3802 arm_displaced_step_closure.
3803 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3804 (displaced_read_reg): Change type of parameter DSC.
3805 (branch_write_pc): Likewise.
3806 (load_write_pc): Likewise.
3807 (alu_write_pc): Likewise.
3808 (displaced_write_reg): Likewise.
3809 (arm_copy_unmodified): Likewise.
3810 (thumb_copy_unmodified_32bit): Likewise.
3811 (thumb_copy_unmodified_16bit): Likewise.
3812 (cleanup_preload): Likewise.
3813 (install_preload): Likewise.
3814 (arm_copy_preload): Likewise.
3815 (thumb2_copy_preload): Likewise.
3816 (install_preload_reg): Likewise.
3817 (arm_copy_preload_reg): Likewise.
3818 (cleanup_copro_load_store): Likewise.
3819 (install_copro_load_store): Likewise.
3820 (arm_copy_copro_load_store) Likewise.
3821 (thumb2_copy_copro_load_store): Likewise.
3822 (cleanup_branch): Likewise.
3823 (install_b_bl_blx): Likewise.
3824 (arm_copy_b_bl_blx): Likewise.
3825 (thumb2_copy_b_bl_blx): Likewise.
3826 (thumb_copy_b): Likewise.
3827 (install_bx_blx_reg): Likewise.
3828 (arm_copy_bx_blx_reg): Likewise.
3829 (thumb_copy_bx_blx_reg): Likewise.
3830 (cleanup_alu_imm): Likewise.
3831 (arm_copy_alu_imm): Likewise.
3832 (thumb2_copy_alu_imm): Likewise.
3833 (cleanup_alu_reg): Likewise.
3834 (install_alu_reg): Likewise.
3835 (arm_copy_alu_reg): Likewise.
3836 (thumb_copy_alu_reg): Likewise.
3837 (cleanup_alu_shifted_reg): Likewise.
3838 (install_alu_shifted_reg): Likewise.
3839 (arm_copy_alu_shifted_reg): Likewise.
3840 (cleanup_load): Likewise.
3841 (cleanup_store): Likewise.
3842 (arm_copy_extra_ld_st): Likewise.
3843 (install_load_store): Likewise.
3844 (thumb2_copy_load_literal): Likewise.
3845 (thumb2_copy_load_reg_imm): Likewise.
3846 (arm_copy_ldr_str_ldrb_strb): Likewise.
3847 (cleanup_block_load_all): Likewise.
3848 (cleanup_block_store_pc): Likewise.
3849 (cleanup_block_load_pc): Likewise.
3850 (arm_copy_block_xfer): Likewise.
3851 (thumb2_copy_block_xfer): Likewise.
3852 (cleanup_svc): Likewise.
3853 (install_svc): Likewise.
3854 (arm_copy_svc): Likewise.
3855 (thumb_copy_svc): Likewise.
3856 (arm_copy_undef): Likewise.
3857 (thumb_32bit_copy_undef): Likewise.
3858 (arm_copy_unpred): Likewise.
3859 (arm_decode_misc_memhint_neon): Likewise.
3860 (arm_decode_unconditional): Likewise.
3861 (arm_decode_miscellaneous): Likewise.
3862 (arm_decode_dp_misc): Likewise.
3863 (arm_decode_ld_st_word_ubyte): Likewise.
3864 (arm_decode_media): Likewise.
3865 (arm_decode_b_bl_ldmstm): Likewise.
3866 (arm_decode_ext_reg_ld_st): Likewise.
3867 (thumb2_decode_dp_shift_reg): Likewise.
3868 (thumb2_decode_ext_reg_ld_st): Likewise.
3869 (arm_decode_svc_copro): Likewise.
3870 (thumb2_decode_svc_copro): Likewise.
3871 (install_pc_relative): Likewise.
3872 (thumb_copy_pc_relative_16bit): Likewise.
3873 (thumb_decode_pc_relative_16bit): Likewise.
3874 (thumb_copy_pc_relative_32bit): Likewise.
3875 (thumb_copy_16bit_ldr_literal): Likewise.
3876 (thumb_copy_cbnz_cbz): Likewise.
3877 (thumb2_copy_table_branch): Likewise.
3878 (cleanup_pop_pc_16bit_all): Likewise.
3879 (thumb_copy_pop_pc_16bit): Likewise.
3880 (thumb_process_displaced_16bit_insn): Likewise.
3881 (decode_thumb_32bit_ld_mem_hints): Likewise.
3882 (thumb_process_displaced_32bit_insn): Likewise.
3883 (thumb_process_displaced_insn): Likewise.
3884 (arm_process_displaced_insn): Likewise.
3885 (arm_displaced_init_closure): Likewise.
3886 (arm_displaced_step_fixup): Add cast for closure.
3887 * arm-tdep.h: Include infrun.h.
3888 (displaced_step_closure): Rename to ...
3889 (arm_displaced_step_closure): ... this, extend
3890 displaced_step_closure.
3891 <u::svc::copy_svc_os>: Change type of parameter DSC.
3892 <cleanup>: Likewise.
3893 (arm_process_displaced_insn): Likewise.
3894 (arm_displaced_init_closure): Likewise.
3895 (displaced_read_reg): Likewise.
3896 (displaced_write_reg): Likewise.
3897 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3898 Adjust.
3899 * i386-tdep.h: Include infrun.h.
3900 (i386_displaced_step_closure): New typedef.
3901 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3902 i386_displaced_step_closure.
3903 (i386_displaced_step_fixup): Adjust.
3904 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3905 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3906 and unique_ptr.
3907 (ppc_displaced_step_fixup): Adjust.
3908 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3909 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3910 and unique_ptr.
3911 (s390_displaced_step_fixup): Adjust.
3912
b392b304
SM
39132017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3914
3915 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3916 Remove declarations.
3917
d5833c62
TT
39182017-10-20 Tom Tromey <tom@tromey.com>
3919
3920 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3921 std::vector.
3922 (gdb_bfd_record_inclusion): Update.
3923 (bfdp): Remove typedef.
3924
06d5bbc8
TT
39252017-10-20 Tom Tromey <tom@tromey.com>
3926
3927 * gdb_bfd.c (gdb_bfd_ref): Use new.
3928 (struct gdb_bfd_data): Add constructor, destructor, and member
3929 initializers.
3930 (gdb_bfd_unref): Use delete.
3931
2712ce2e
TT
39322017-10-20 Tom Tromey <tom@tromey.com>
3933
3934 * exec.c (exec_file_attach): Use new_bfd_ref.
3935 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3936 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3937 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3938 new_bfd_ref.
3939 * gdb_bfd.h (new_bfd_ref): New function.
3940
fcc8fb2f
PA
39412017-10-20 Pedro Alves <palves@redhat.com>
3942
3943 * main.c (captured_command_loop): Add attribute noinline.
3944
4c2287b0
SM
39452017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3946
3947 * interps.c (struct interp_factory): Add constructor.
3948 (interp_factory_p): Remove typedef.
3949 (DEF_VEC_P(interp_factory_p)): Remove.
3950 (interpreter_factories): Change type to std::vector.
3951 (interp_factory_register): Adjust.
3952 (interp_lookup): Adjust.
3953 (interpreter_completer): Adjust.
3954
3d415c26
TT
39552017-10-19 Tom Tromey <tom@tromey.com>
3956
3957 * break-catch-syscall.c (catch_syscall_completer): Use
3958 std::string, gdb::unique_xmalloc_ptr.
3959
395423c4
TT
39602017-10-19 Tom Tromey <tom@tromey.com>
3961
3962 * infcall.c (call_function_by_hand_dummy): Use std::string.
3963
54f70bc1
TT
39642017-10-19 Tom Tromey <tom@tromey.com>
3965
3966 * mi/mi-main.c (mi_cmd_execute): Update.
3967 * top.h (prepare_execute_command): Return scoped_value_mark.
3968 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3969 Add move constructor.
3970 * top.c (prepare_execute_command): Return scoped_value_mark.
3971 (execute_command): Update.
3972
63929e84
PA
39732017-10-19 Pedro Alves <palves@redhat.com>
3974
3975 * xml-support.c (xml_fetch_content_from_file): Check fread's
3976 return.
3977
a75868f5
PA
39782017-10-19 Pedro Alves <palves@redhat.com>
3979
3980 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3981 async.
3982 (handle_error_fd): New function.
3983 (ser_base_async): Add/delete an event loop file handler for
3984 error_fd.
3985
2edf834e
PA
39862017-10-19 Pedro Alves <palves@redhat.com>
3987
3988 * xml-support.c (xml_fetch_content_from_file): Don't read in
3989 chunks. Instead use fseek to determine the file's size, and read
3990 it in one go.
3991
c8ba13ad
KS
39922017-11-18 Keith Seitz <keiths@redhat.com>
3993
3994 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3995 types.
3996 Add whitespace to front of type name.
3997
37534686
KS
39982017-10-18 Keith Seitz <keiths@redhat.com>
3999
4000 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4001 DW_AT_accessibility.
4002
28c7c158
YQ
40032017-10-18 Yao Qi <yao.qi@linaro.org>
4004
4005 * features/tic6x-c62x-linux.c: Remove.
4006
30f0b101
TT
40072017-10-17 Tom Tromey <tom@tromey.com>
4008
4009 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4010 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4011 (do_mixed_source_and_assembly): Likewise.
4012
57e12da9
TT
40132017-10-17 Tom Tromey <tom@tromey.com>
4014
4015 * regcache.c (regcache::xfer_part): Remove assertion.
4016
7b700999
PA
40172017-10-17 Pedro Alves <palves@redhat.com>
4018
4019 * xml-support.c (xml_fetch_content_from_file): Call
4020 unique_ptr::release() instead unique_ptr::get() when passing
4021 through xrealloc.
4022
d3037ba6
YQ
40232017-10-17 Yao Qi <yao.qi@linaro.org>
4024
4025 * regcache.c (regcache::xfer_part): Remove parameters read and
4026 write, add parameter is_raw. All callers are updated.
4027
83d5a34d
KS
40282017-10-16 Keith Seitz <keiths@redhat.com>
4029
4030 * c-typeprint.c (enum access_specifier): Moved here from
4031 c_type_print_base.
4032 (output_access_specifier): New function.
4033 (c_type_print_base): Consider typedefs when assessing
4034 whether access labels are needed.
4035 Use output_access_specifier as needed.
4036 Output access specifier for typedefs, if needed.
4037 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4038 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4039 fields.
4040 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4041 accessor macros.
4042
87028b87
TT
40432017-10-16 Tom Tromey <tom@tromey.com>
4044
4045 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4046 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4047 * target.c (target_fileio_read_stralloc): Update.
4048 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4049 * target.h (target_fileio_read_stralloc): Return
4050 unique_xmalloc_ptr.
4051
b7b030ad
TT
40522017-10-16 Tom Tromey <tom@tromey.com>
4053
4054 * xml-syscall.c (xml_init_syscalls_info): Update.
4055 * xml-support.c (xinclude_start_include): Update.
4056 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4057 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4058 (xml_fetch_content_from_file): Likewise.
4059 * osdata.c (get_osdata): Update.
4060 * target.h (target_read_stralloc, target_get_osdata): Return
4061 unique_xmalloc_ptr.
4062 * solib-aix.c (solib_aix_get_library_list): Update.
4063 * solib-target.c (solib_target_current_sos): Update.
4064 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4065 * xml-tdesc.c (fetch_available_features_from_target): Update.
4066 (target_fetch_description_xml): Update.
4067 (file_read_description_xml): Update.
4068 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4069 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4070 (remote_pid_to_exec_file): Update.
4071 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4072 (target_get_osdata): Likewise.
4073
b80406ac
TT
40742017-10-16 Tom Tromey <tom@tromey.com>
4075
4076 * remote.c (remote_register_number_and_offset): Use std::vector.
4077 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4078 (putpkt_binary): Use gdb::def_vector.
4079 (compare_sections_command): Use gdb::byte_vector.
4080
a90ecff8
TT
40812017-10-16 Tom Tromey <tom@tromey.com>
4082
4083 * ppc-linux-nat.c (hwdebug_insert_point): Use
4084 gdb::unique_xmalloc_ptr, XDUP.
4085
2dc0e219
TT
40862017-10-16 Tom Tromey <tom@tromey.com>
4087
4088 * probe.c (parse_probes): Use std::string.
4089 (info_probes_for_ops, enable_probes_command)
4090 (disable_probes_command): Remove cleanups.
4091
b05628f0
TT
40922017-10-16 Tom Tromey <tom@tromey.com>
4093
4094 * buildsym.c (block_compar): Remove.
4095 (end_symtab_get_static_block): Use std::vector.
4096
a79b1bc6
SM
40972017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4098
4099 * memrange.h (struct mem_range): Define operator< and operator==.
4100 (mem_range_s): Remove.
4101 (DEF_VEC_O (mem_range_s)): Remove.
4102 (normalize_mem_ranges): Change parameter type to std::vector.
4103 * memrange.c (compare_mem_ranges): Remove.
4104 (normalize_mem_ranges): Change parameter type to std::vector,
4105 adjust to vector change.
4106 * exec.c (section_table_available_memory): Return vector, remove
4107 parameter.
4108 (section_table_read_available_memory): Adjust to std::vector
4109 change.
4110 * remote.c (remote_read_bytes): Adjust to std::vector
4111 change.
4112 * tracepoint.h (traceframe_available_memory): Change parameter
4113 type to std::vector.
4114 * tracepoint.c (traceframe_available_memory): Change parameter
4115 type to std::vector, adjust.
4116 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4117 std::vector change.
4118 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4119 unittests/memrange-selftests.c.
4120 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4121 * gdb/unittests/memrange-selftests.c: New file.
4122
63f0e930
PA
41232017-10-16 Pedro Alves <palves@redhat.com>
4124
4125 * elfread.c (probe_key_free): Rename range-for variable.
4126 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4127 (find_probe_by_pc, collect_probes): Rename range-for variable.
4128
c40c7bfc
YQ
41292017-10-16 Yao Qi <yao.qi@linaro.org>
4130
4131 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4132 * features/tic6x-c62x.c: Remove.
4133 * features/tic6x-c64x-linux.c: Remove.
4134 * features/tic6x-c64x.c: Remove.
4135 * features/tic6x-c64xp-linux.c: Remove.
4136 * features/tic6x-c64xp.c: Remove.
4137 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4138 initialize_tdesc_tic6x_*_linux functions.
4139 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4140 initialize_tdesc_tic6x_* functions.
4141
df27ae6a
YQ
41422017-10-16 Yao Qi <yao.qi@linaro.org>
4143
4144 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4145 tic6x-c62x.
4146 * regformats/tic6x-c62x.dat: Remove.
4147 * regformats/tic6x-c64x.dat: Remove.
4148 * regformats/tic6x-c64xp.dat: Remove.
4149
86766165
SM
41502017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4151
4152 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4153 (the !HAVE_LIBEXPAT version).
4154
824dfcc3
SM
41552017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4156
4157 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4158 const.
4159
2098b393
SM
41602017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4161
4162 * target.h: Include tracepoint.h.
4163 (enum trace_find_type): Move to tracepoint.h.
4164 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4165 * tracepoint.h: Don't include target.h
4166 (enum trace_find_type): Move from target.h.
4167 (parse_traceframe_info): Return a unique ptr.
4168 * tracepoint.c (current_traceframe_info): Change type to unique
4169 ptr.
4170 (free_traceframe_info): Remove.
4171 (clear_traceframe_info): Don't manually free
4172 current_traceframe_info.
4173 (free_result): Remove.
4174 (parse_traceframe_info): Return a unique ptr.
4175 (get_traceframe_info): Adjust to unique ptr.
4176 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4177 * remote.c (remote_traceframe_info): Return a unique ptr.
4178 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4179 ptr.
4180 * target-debug.h (target_debug_print_traceframe_info_up): New
4181 macro.
4182 * target-delegates.c: Regenerate.
4183
4cdd21a8
SM
41842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4185
4186 * memrange.h (struct mem_range): Add constructors.
4187 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4188 std::vector<mem_range>.
4189 * tracepoint.c (free_traceframe_info): Don't manually free
4190 vector.
4191 (traceframe_info_start_memory): Adjust to vector change.
4192 (traceframe_available_memory): Likewise.
4193 * tracefile-tfile.c (build_traceframe_info): Likewise.
4194 * ctf.c (ctf_traceframe_info): Likewise.
4195
d0d292a2
SM
41962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4197
4198 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4199 std::vector<int>.
4200 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4201 (traceframe_info_start_tvar): Adjust to vector change.
4202 (parse_traceframe_info): Allocate with new.
4203 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4204 vector change.
4205 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4206 change.
4207 tfile_traceframe_info): Allocate with new.
4208 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4209 change.
4210
8d3c73ef
SM
42112017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4212
4213 * tracepoint.c (traceframe_info): Rename to...
4214 (current_traceframe_info): ...this.
4215 (clear_traceframe_info): Adjust.
4216 (get_traceframe_info): Adjust.
4217
b129dcac
SM
42182017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4219
4220 * nat/linux-osdata.c: Include algorithm.
4221 (compare_processes): Remove.
4222 (struct pid_pgid_entry): New struct.
4223 (linux_xfer_osdata_processgroups): Use std::vector instead of
4224 XNEWVEC.
4225
af5bf4ad
SM
42262017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4227
4228 * objfiles.h: Don't include symfile.h.
4229 (struct partial_symbol): Remove forward-declaration.
4230 (struct objfile) <global_psymbols, static_psymbols>: Change type
4231 to std::vector<partial_symbol *>.
4232 * objfiles.c (objfile::objfile): Don't memset those fields.
4233 (objfile::~objfile): Don't free those fields.
4234 * psympriv.h (struct psymbol_allocation_list): Remove
4235 forward-declaration.
4236 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4237 to std::vector.
4238 (start_psymtab_common): Change parameters to std::vector.
4239 * psymtab.c: Include algorithm.
4240 (require_partial_symbols): Call shrink_to_fit.
4241 (find_pc_sect_psymbol): Adjust to vector change.
4242 (match_partial_symbol): Likewise.
4243 (lookup_partial_symbol): Likewise.
4244 (psym_relocate): Likewise.
4245 (dump_psymtab): Likewise.
4246 (recursively_search_psymtabs): Likewise.
4247 (compare_psymbols): Remove.
4248 (sort_pst_symbols): Adjust to vector change.
4249 (start_psymtab_common): Likewise.
4250 (end_psymtab_common): Likewise.
4251 (psymbol_bcache_full): De-constify return value.
4252 (add_psymbol_to_bcache): Likewise.
4253 (extend_psymbol_list): Remove.
4254 (append_psymbol_to_list): Adjust to vector change.
4255 (add_psymbol_to_list): Likewise.
4256 (init_psymbol_list): Likewise.
4257 (maintenance_info_psymtabs): Likewise.
4258 (maintenance_check_psymtabs): Likewise.
4259 * symfile.h (struct psymbol_allocation_list): Remove.
4260 * symfile.c (reread_symbols): Adjust to vector change.
4261 * dbxread.c (start_psymtab): Change type of parameters.
4262 (dbx_symfile_read): Adjust to vector change.
4263 (read_dbx_symtab): Likewise.
4264 (start_psymtab): Change type of parameters.
4265 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4266 (create_partial_symtab): Likewise.
4267 (add_partial_symbol): Likewise.
4268 (write_one_signatured_type): Likewise.
4269 (recursively_write_psymbols): Likewise.
4270 * mdebugread.c (parse_partial_symbols): Likewise.
4271 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4272 (scan_xcoff_symtab): Adjust to vector change.
4273 (xcoff_initial_scan): Likewise.
4274
3ec5942f
SM
42752017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4276
4277 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4278
2399fe6a
YQ
42792017-10-13 Yao Qi <yao.qi@linaro.org>
4280
4281 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4282 Remove s390x-*-expedite, add s390x-expedite.
4283
4bf3f4a8
YQ
42842017-10-13 Yao Qi <yao.qi@linaro.org>
4285
4286 * features/s390-gs-linux64.c: Regenerated.
4287 * features/s390x-gs-linux64.c: Regenerated.
4288
9e86da07
TT
42892017-10-13 Tom Tromey <tom@tromey.com>
4290
4291 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4292 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4293 delete.
4294 * symfile.c (symbol_file_add_with_addrs): Use new.
4295 (symbol_file_add_separate): Update comment.
4296 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4297 * jit.c (jit_object_close_impl): Use new.
4298 (jit_unregister_code): Use delete.
4299 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4300 (~objfile): Rename from free_objfile.
4301 (free_objfile_separate_debug, do_free_objfile_cleanup)
4302 (free_all_objfiles, objfile_purge_solibs): Use delete.
4303 * objfiles.h (struct objfile): Add constructor and destructor.
4304 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4305 (allocate_objfile, free_objfile): Don't declare.
4306 (struct objstats): Add initializers.
4307
c2508e90
SM
43082017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4309
4310 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4311 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4312 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4313 * gdbarch.h: Regenerate.
4314 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4315 Adjust comment.
4316 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4317 (i386_displaced_step_fixup): Adjust comment.
4318 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4319
a900ff72
TT
43202017-10-12 Tom Tromey <tom@tromey.com>
4321
4322 * prologue-value.h (pv_area::store_would_trash): Return bool.
4323 (pv_area::find_reg): Likewise.
4324 * prologue-value.c (pv_area::store_would_trash): Return bool.
4325 (pv_area::find_reg): Likewise.
4326
f7b7ed97
TT
43272017-10-12 Tom Tromey <tom@tromey.com>
4328
4329 * s390-linux-tdep.c (s390_store, s390_load)
4330 (s390_check_for_saved, s390_analyze_prologue): Update.
4331 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4332 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4333 * prologue-value.h (class pv_area): Move from prologue-value.c.
4334 Change names of members. Add constructor, destructor, member
4335 functions.
4336 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4337 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4338 (pv_area_fetch, pv_area_scan): Don't declare.
4339 * prologue-value.c (struct pv_area::area_entry): Now member of
4340 pv_area.
4341 (struct pv_area): Move to prologue-value.h.
4342 (pv_area::pv_area): Rename from make_pv_area.
4343 (pv_area::~pv_area): Rename from free_pv_area.
4344 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4345 (clear_entries, find_entry, overlaps, store_would_trash, store)
4346 (fetch, find_reg, scan): Now member of pv_area.
4347 Remove "area" argument. Update.
4348 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4349 Update.
4350 * mn10300-tdep.c (push_reg, check_for_saved)
4351 (mn10300_analyze_prologue): Update.
4352 * mep-tdep.c (is_arg_spill, check_for_saved)
4353 (mep_analyze_prologue): Update.
4354 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4355 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4356 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4357 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4358 Update.
4359 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4360 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4361
466eecee
SM
43622017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4363
4364 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4365 * linux-nat.c (linux_nat_delete_thread): New variable.
4366 (lwp_free): Invoke linux_nat_delete_thread if set.
4367 (linux_nat_set_delete_thread): New function.
4368 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4369 thread delete callback.
4370 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4371 (_initialize_arm_linux_nat): Assign thread delete callback.
4372 * s390-linux-nat.c (s390_delete_thread): New function.
4373 (_initialize_s390_nat): Assign thread delete callback.
4374 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4375 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4376 function.
4377 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4378 declaration.
4379 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4380 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4381
f71c8822
TT
43822017-10-09 Tom Tromey <tom@tromey.com>
4383
4384 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4385 std::string.
4386 * tui/tui-layout.c (enum tui_status): Use std::string.
4387
981a3fb3
TT
43882017-10-11 Tom Tromey <tom@tromey.com>
4389
4390 * gdbthread.h (thread_command): Constify.
4391 * inferior.h (detach_command): Constify.
4392 * top.h (set_history, show_history): Constify.
4393 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4394 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4395 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4396 * printcmd.c (set_command): Constify.
4397 (non_const_set_command): New function.
4398 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4399 * breakpoint.c (enable_command, disable_command, delete_command)
4400 (catch_command, tcatch_command, set_breakpoint_cmd)
4401 (show_breakpoint_cmd): Constify.
4402 * macrocmd.c (macro_command): Constify.
4403 * infcmd.c (unset_command, kill_command, detach_command)
4404 (info_proc_cmd): Constify.
4405 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4406 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4407 (info_auto_load_cmd): Constify.
4408 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4409 (unset_tdesc_cmd): Constify.
4410 * ada-lang.c (set_ada_command, show_ada_command)
4411 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4412 * guile/guile.c (set_guile_command, show_guile_command)
4413 (info_guile_command): Constify.
4414 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4415 Constify.
4416 * skip.c (skip_command): Constify.
4417 * compile/compile.c (_initialize_compile): Constify.
4418 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4419 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4420 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4421 (maint_btrace_pt_show_cmd): Constify.
4422 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4423 Constify.
4424 * python/python.c (user_show_python, user_set_python): Constify.
4425 * mips-tdep.c (set_mips_command, show_mips_command)
4426 (set_mipsfpu_command): Constify.
4427 * record-btrace.c (cmd_record_btrace_start)
4428 (cmd_set_record_btrace, cmd_show_record_btrace)
4429 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4430 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4431 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4432 Constify.
4433 * symfile.c (overlay_command): Constify.
4434 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4435 * cli/cli-logging.c (set_logging_command, show_logging_command):
4436 Constify.
4437 * cli/cli-dump.c (dump_command, append_command)
4438 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4439 (tekhex_dump_command, binary_dump_command)
4440 (binary_append_command): Constify.
4441 * cli/cli-decode.c (struct cmd_list_element): Change type of
4442 "fun".
4443 * cli/cli-cmds.c (info_command, show_command, set_debug)
4444 (show_debug): Constify.
4445 (show_command): Add non-const overload.
4446 * top.c (set_history, show_history): Constify.
4447 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4448 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4449 * target.c (target_command): Constify.
4450 * sparc64-tdep.c (info_adi_command): Constify.
4451 * record-full.c (cmd_record_full_start): Constify.
4452 (set_record_full_command): Constify. Fix typo.
4453 (show_record_full_command): Constify.
4454 * thread.c (thread_command, thread_apply_command): Constify.
4455 * memattr.c (dummy_cmd): Constify.
4456 * value.c (function_command): Constify.
4457 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4458 * probe.c (info_probes_command): Constify.
4459 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4460 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4461 (show_thread_cmd, set_thread_default_cmd)
4462 (show_thread_default_cmd): Constify.
4463 (check_empty): Constify.
4464 * tracepoint.c (tfind_command): Constify.
4465 * cp-support.c (maint_cplus_command): Constify.
4466 * windows-tdep.c (info_w32_command): Constify.
4467 * record.c (cmd_record_start, set_record_command)
4468 (show_record_command, info_record_command, cmd_record_goto):
4469 Constify.
4470 * ravenscar-thread.c (set_ravenscar_command)
4471 (show_ravenscar_command): Constify.
4472 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4473 Constify.
4474 (add_internal_problem_command): Remove casts.
4475 * arc-tdep.c (maintenance_print_arc_command): Constify.
4476 * valprint.c (set_print, show_print, set_print_raw)
4477 (show_print_raw): Constify.
4478 * maint.c (maintenance_command, maintenance_info_command)
4479 (maintenance_print_command, maintenance_set_cmd)
4480 (maintenance_show_cmd, set_per_command_cmd)
4481 (show_per_command_cmd, maintenance_check_command): Constify.
4482 * language.c (set_check, show_check): Constify.
4483 * typeprint.c (show_print_type, set_print_type): Constify.
4484 * go32-nat.c (go32_info_dos_command): Constify.
4485
fdf44873
TT
44862017-10-11 Tom Tromey <tom@tromey.com>
4487
4488 * breakpoint.c (prepare_re_set_context): Remove.
4489 (breakpoint_re_set_one): Update. Don't use cleanups.
4490 (breakpoint_re_set): Use scoped_restore, std::string, and
4491 scoped_restore_current_language.
4492
81b1e71c
TT
44932017-10-11 Tom Tromey <tom@tromey.com>
4494
4495 * breakpoint.c (commands_command_1): Use std::string.
4496 (cleanup_executing_breakpoints): Remove.
4497 (bpstat_do_actions_1): Use scoped_restore.
4498 (bpstat_check_watchpoint): Use std::string.
4499 (decode_static_tracepoint_spec): Likewise.
4500 (break_range_command): Likewise.
4501 (watch_command_1): Likewise.
4502 (compare_breakpoints): Change argument types.
4503 (clear_command): Use std::vector.
4504 (cleanup_executing_breakpoints): Remove.
4505 (update_global_location_list): Use unique_xmalloc_ptr.
4506 (strace_command): Remove unused declaration.
4507
4f9d9906
JB
45082017-10-11 John Baldwin <jhb@FreeBSD.org>
4509
4510 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4511 * NEWS: Mention new FreeBSD/arm native configuration.
4512 * configure.host: Add arm*-*-freebsd*.
4513 * configure.nat: Likewise.
4514 * arm-fbsd-nat.c: New file.
4515
7176dfd2
JB
45162017-10-11 John Baldwin <jhb@FreeBSD.org>
4517
4518 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4519 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4520 * NEWS: Mention new FreeBSD/arm target.
4521 * configure.tgt: Add arm*-*-freebsd*.
4522 * arm-fbsd-tdep.c: New file.
4523 * arm-fbsd-tdep.h: New file.
4524
fe220226
MR
45252017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4526
4527 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4528 `gdbarch_elfcore_write_linux_prpsinfo'.
4529 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4530 method.
4531 (elf_internal_linux_prpsinfo): Remove declaration.
4532 * gdbarch.h: Regenerate.
4533 * gdbarch.c: Regenerate.
4534
a2f63b2e
MR
45352017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4536
4537 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4538 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4539
458ca1d0
PA
45402017-10-11 Pedro Alves <palves@redhat.com>
4541
4542 * breakpoint.c (reattach_breakpoints): Delete.
4543 * breakpoint.h (reattach_breakpoints): Delete.
4544
905014d7
SM
45452017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4546
4547 * symfile.c (registered_sym_fns): Make struct, not typedef.
4548 (DEF_VEC_O (registered_sym_fns)): Remove.
4549 (symtab_fns): Change type to std::vector.
4550 (add_symtab_fns): Adjust.
4551 (find_sym_fns): Adjust.
4552
56d704da
AK
45532017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4554
4555 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4556 * arc-tdep.h (arc_arch_is_em): New function.
4557 (arc_arch_is_hs): Likewise.
4558
7fa29be9
EB
45592017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4560
4561 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4562 parentheses in the declaration.
4563 (macro_lookup_inclusion): Likewise.
4564 (macro_lookup_definition): Likewise.
4565 * p-lang.h (pascal_builtin_types): Likewise.
4566 * tui/tui-data.c (tui_win_list): Likewise.
4567 * tui/tui-data.h (tui_win_list): Likewise.
4568 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4569
d9b477e3
KB
45702017-10-11 Mark Rages <markrages@gmail.com>
4571
4572 * target-memory.c (block_boundaries): Fix for block address not
4573 aligned on block size.
4574
65630365
PA
45752017-10-10 Pedro Alves <palves@redhat.com>
4576 Tom Tromey <tom@tromey.com>
4577
4578 * breakpoint.c (struct captured_breakpoint_query_args)
4579 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4580 (print_breakpoint): New.
4581 * breakpoint.h (print_breakpoint): Declare.
4582 * common/common-exceptions.h (enum return_reason): Remove
4583 references to catch_exceptions.
4584 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4585 Delete.
4586 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4587 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4588 * gdb.h: Delete.
4589 * gdbthread.h (thread_select): Declare.
4590 * mi/mi-cmd-break.c: Don't include gdb.h.
4591 (breakpoint_notify): Use print_breakpoint.
4592 * mi/mi-cmd-catch.c: Don't include gdb.h.
4593 * mi/mi-interp.c: Don't include gdb.h.
4594 (mi_print_breakpoint_for_event): New.
4595 (mi_breakpoint_created, mi_breakpoint_modified): Use
4596 mi_print_breakpoint_for_event.
4597 * mi/mi-main.c: Don't include gdb.h.
4598 (mi_cmd_thread_select): Parse the global thread ID here. Use
4599 thread_select instead of gdb_thread_select.
4600 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4601 of using gdb_list_thread_ids.
4602 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4603 FILEIO_ENOSYS here.
4604 (remote_fileio_request): Use TRY/CATCH instead of
4605 catch_exceptions.
4606 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4607 (symbol_file_add_from_memory_wrapper): Delete.
4608 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4609 * thread.c: Don't include gdb.h.
4610 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4611 (thread_alive): Use thread_select.
4612 (do_captured_thread_select): Delete, parts salvaged as ...
4613 (thread_select): ... this new function.
4614 (gdb_thread_select): Delete.
4615
bf469271
PA
46162017-10-10 Pedro Alves <palves@redhat.com>
4617 Tom Tromey <tom@tromey.com>
4618
4619 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4620 and reverse logic.
4621 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4622 No longer macros. Instead ...
4623 (enum wp_check_result): They're now values of this new
4624 enumeration.
4625 (watchpoint_check): Change return type to wp_check_result and
4626 parameter type to bpstat.
4627 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4628 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4629 catch_errors. Reverse logic of watchpoint_check call.
4630 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4631 pointer as parameter.
4632 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4633 * common/common-exceptions.c (throw_exception_sjlj): Update
4634 comments to avoid mentioning catch_errors.
4635 * exceptions.c (catch_errors): Delete.
4636 * exceptions.h: Update comments to avoid mentioning catch_errors.
4637 (catch_errors_ftype, catch_errors): Delete.
4638 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4639 (hook_stop_stub): Delete.
4640 (restore_selected_frame): Change return type to void, and
4641 parameter type to const frame_id &.
4642 (restore_infcall_control_state): Use TRY/CATCH instead of
4643 catch_errors.
4644 * main.c (captured_command_loop): Return void and remove
4645 parameter. Remove references to catch_errors.
4646 (captured_main): Use TRY/CATCH instead of catch_errors.
4647 * objc-lang.c (objc_submethod_helper_data)
4648 (find_objc_msgcall_submethod_helper): Delete.
4649 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4650 catch_errors.
4651 * record-full.c (record_full_message): Return void.
4652 (record_full_message_args, record_full_message_wrapper): Delete.
4653 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4654 instead of catch_errors.
4655 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4656 parameter type to int.
4657 * solib-darwin.c (open_symbol_file_object): Ditto.
4658 * solib-dsbt.c (open_symbol_file_object): Ditto.
4659 * solib-frv.c (open_symbol_file_object): Ditto.
4660 * solib-svr4.c (open_symbol_file_object): Ditto.
4661 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4662 * solib.c (update_solib_list): Use TRY/CATCH instead of
4663 catch_errors.
4664 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4665 Change type.
4666 * symmisc.c (struct print_symbol_args): Remove.
4667 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4668 (print_symbol): Change type.
4669 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4670 and remove parameters.
4671 (catch_errors): New.
4672 (get_windows_debug_event): Adjust.
4673
1a56bfa5
TT
46742017-10-09 Tom Tromey <tom@tromey.com>
4675
4676 * mi/mi-main.c (free_splay_tree): Remove.
4677 (list_available_thread_groups): Use splay_tree_up.
4678 * common/gdb_splay_tree.h: New file.
4679
0c478e2d
TT
46802017-10-09 Tom Tromey <tom@tromey.com>
4681
4682 * mi/mi-main.c (do_nothing): Remove.
4683 (list_available_thread_groups): Update.
4684
cbd2b4e3
PA
46852017-10-09 Pedro Alves <palves@redhat.com>
4686
4687 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4688 reading registers when switching context.
4689
a181c0bf
JB
46902017-10-09 John Baldwin <jhb@FreeBSD.org>
4691
4692 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4693 (fbsd_convert_siginfo): Likewise.
4694 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4695
6e66f753
SM
46962017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4697
4698 * configure.ac (try_guile_versions): Remove guile-2.2.
4699 * configure: Regenerate.
4700
890e9790
TT
47012017-10-09 Tom Tromey <tom@tromey.com>
4702
4703 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4704 (COMPILE.pre): Use $(CXX).
4705
109483d9
PA
47062017-10-09 Pedro Alves <palves@redhat.com>
4707
4708 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4709 Use bool.
4710 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4711 * cp-support.h (cp_remove_params): Now returns a
4712 gdb::unique_xmalloc_ptr.
4713 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4714 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4715 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4716 returning a gdb::unique_xmalloc_ptr.
4717 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4718 * stack.c (find_frame_funname): Adjust to cp_remove_params
4719 returning a gdb::unique_xmalloc_ptr.
4720
791afaa2
TT
47212017-10-08 Tom Tromey <tom@tromey.com>
4722
4723 * dwarf2read.c (dwarf2_get_dwz_file): Use
4724 gdb::unique_xmalloc_ptr.
4725 (find_slot_in_mapped_hash): Likewise.
4726 (dwarf2_physname): Likewise.
4727 (create_dwo_unit_in_dwp_v1): Use std::string.
4728 (create_dwo_unit_in_dwp_v2): Likewise.
4729 (lookup_dwo_cutu): Likewise.
4730 (inherit_abstract_dies): Use std::vector.
4731 (read_array_type): Likewise.
4732 (dwarf_decode_macros): Remove unused declaration.
4733 (unsigned_int_compar): Remove.
4734 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4735 (psymtabs_addrmap_cleanup): Remove.
4736
30a9c02f
TT
47372017-10-08 Tom Tromey <tom@tromey.com>
4738
4739 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4740 * frame.h (frame_cleanup_after_sniffer): Declare.
4741 (frame_prepare_for_sniffer): Return void.
4742 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4743 type of argument.
4744 (frame_prepare_for_sniffer): Return void.
4745
757325a3
TT
47462017-10-08 Tom Tromey <tom@tromey.com>
4747
4748 * utils.h (make_cleanup_value_free): Remove.
4749 * utils.c (do_value_free, struct cleanup): Remove.
4750 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4751 Use gdb_value_up.
4752 * value.h (struct value_deleter): New.
4753 (gdb_value_up): New typedef.
4754
b9c04fb2
TT
47552017-10-08 Tom Tromey <tom@tromey.com>
4756
4757 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4758 (make_cleanup_free_search_symbols): Remove.
4759 (search_symbols): Return std::vector.
4760 (symbol_search::compare_search_syms): Now member of
4761 symbol_search. Change arguments.
4762 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4763 (symtab_symbol_info, rbreak_command): Update.
4764 * symtab.h (struct symbol_search) <next>: Remove.
4765 Add constructors.
4766 (symbol_search::operator<): New function.
4767 (symbol_search::operator==): New function.
4768 (search_symbols): Remove std::vector.
4769 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4770 (symbol_search::compare_search_syms): Declare.
4771
0d28b0a5
YQ
47722017-10-06 Yao Qi <yao.qi@linaro.org>
4773
4774 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4775 arch/aarch64-insn.o.
4776 Remove one rule.
4777 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4778
71917808
YQ
47792017-10-06 Yao Qi <yao.qi@linaro.org>
4780
4781 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4782 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4783 arch/arm-linux.o respectively.
4784 * configure.tgt: Likewise.
4785
2081b2b2
YQ
47862017-10-06 Yao Qi <yao.qi@linaro.org>
4787
4788 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4789 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4790
a1b85d28
PA
47912017-10-06 Pedro Alves <palves@redhat.com>
4792
4793 * windows-nat.c: Include <algorithm>.
4794
d97987e2
YQ
47952017-10-06 Yao Qi <yao.qi@linaro.org>
4796
4797 * configure.tgt (i386_tobjs): New variable.
4798 (amd64_tobjs): New variable.
4799 Set $cpu_obs and $os_obs.
4800
f38307f5
YQ
48012017-10-06 Yao Qi <yao.qi@linaro.org>
4802
4803 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4804 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4805 (clean): Remove object files and dependency files.
4806 (distclean): Remove the directory.
4807 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4808 * configure: Re-generated.
4809 * configure.tgt: Replace amd64.o with arch/amd64.o.
4810
2f924de6
JM
48112017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4812
4813 PR build/22188
4814 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4815 and SETEND.
4816
2fd9d7ca
PA
48172017-10-05 Pedro Alves <palves@redhat.com>
4818
4819 * linux-nat.c (linux_child_follow_fork): When following the parent
4820 and detaching the child, consult the parent thread's architecture
4821 instead of the child's.
4822
d13b8493
UW
48232017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4824
4825 * ax.h: Do not include "doublest.h".
4826 (union agent_val): Remove.
4827
3b4b2f16
UW
48282017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4829
4830 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4831 (decimal_to_string): Return std::string object.
4832 (decimal_from_string): Accept std::string object. Return bool.
4833 (decimal_from_integral, decimal_from_doublest): Remove.
4834 (decimal_from_longest): Add prototype.
4835 (decimal_from_ulongest): Likewise.
4836 (decimal_to_longest): Likewise.
4837 (decimal_from_doublest): Likewise.
4838 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4839 (MAX_DECIMAL_STRING): Move here.
4840 (decimal_to_string): Return std::string object.
4841 (decimal_from_string): Accept std::string object. Return bool.
4842 (decimal_from_integral): Remove, replace by ...
4843 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4844 (decimal_to_longest): New function.
4845 (decimal_from_floating): Remove, replace by ...
4846 (decimal_from_doublest): ... this new function.
4847 (decimal_to_doublest): Update to new decimal_to_string interface.
4848
4849 * value.c (unpack_long): Use decimal_to_longest.
4850 * valops.c (value_cast): Use decimal_from_doublest instead of
4851 decimal_from_floating. Use decimal_from_[u]longest isntead of
4852 decimal_from_integral.
4853 * valarith.c (value_args_as_decimal): Likewise.
4854 * valprint.c (print_decimal_floating): Update to new
4855 decimal_to_string interface.
4856 * printcmd.c (printf_decfloat): Likewise.
4857 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4858
1841ee5d
UW
48592017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4860
4861 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4862 * gdbtypes.c: Include "floatformat.h".
4863 * value.c: Likewise.
4864 * m68k-tdep.c: Likewise.
4865
4866 * findvar.c: Do not include "floatformat.h".
4867 * amd64-darwin-tdep.c: Likewise.
4868 * arm-linux-tdep.c: Likewise.
4869 * i386-darwin-tdep.c: Likewise.
4870 * i387-tdep.c: Likewise.
4871 * m68k-linux-tdep.c: Likewise.
4872 * mep-tdep.c: Likewise.
4873 * mips-tdep.c: Likewise.
4874 * nios2-tdep.c: Likewise.
4875 * s390-linux-tdep.c: Likewise.
4876 * sparc-obsd-tdep.c: Likewise.
4877 * sparc-tdep.c: Likewise.
4878 * sparc64-tdep.c: Likewise.
4879 * spu-tdep.c: Likewise.
4880 * tic6x-tdep.c: Likewise.
4881 * tilegx-tdep.c: Likewise.
4882 * vax-tdep.c: Likewise.
4883 * xstormy16-tdep.c: Likewise.
4884 * xtensa-tdep.c: Likewise.
4885
4886 * top.c: Do not include "doublest.h".
4887 * aarch64-tdep.c: Likewise.
4888 * alpha-tdep.c: Likewise.
4889 * arm-linux-tdep.c: Likewise.
4890 * m68k-linux-tdep.c: Likewise.
4891 * tilegx-tdep.c: Likewise.
4892 * xstormy16-tdep.c: Likewise.
4893
a80a6471
JB
48942017-10-05 John Baldwin <jhb@FreeBSD.org>
4895
4896 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4897 (mipsn32_fbsd_sigframe): Define.
4898 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4899 for FreeBSD/mipsn32.
4900
12c4bd7f
JB
49012017-10-05 John Baldwin <jhb@FreeBSD.org>
4902
4903 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4904 AT_HWCAP.
4905
c91933e9
TG
49062017-10-05 Tristan Gingold <tgingold@free.fr>
4907
4908 * MAINTAINERS (Misc): Update my email address.
4909
5cd63fda
PA
49102017-10-04 Pedro Alves <palves@redhat.com>
4911
4912 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4913 it instead of target_gdbarch.
4914 (get_remote_state, get_remote_packet_size): Adjust
4915 get_remote_arch_state calls, passing down target_gdbarch
4916 explicitly.
4917 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4918 'gdbarch' and use it instead of target_gdbarch.
4919 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4920 passing down target_gdbarch explicitly.
4921 (struct stop_reply) <arch>: New field.
4922 (remote_parse_stop_reply): Use the stopped thread's architecture,
4923 not the current inferior's. Save the architecture in the
4924 stop_reply.
4925 (process_stop_reply): Use the stop reply's architecture.
4926 (process_g_packet, remote_fetch_registers)
4927 (remote_prepare_to_store, store_registers_using_G)
4928 (remote_store_registers): Adjust get_remote_arch_state calls,
4929 using the regcache's architecture.
4930 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4931 passing down target_gdbarch explicitly.
4932 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4933 beneath instead of calling target_gdbarch.
4934 * target.c (default_thread_architecture): Use the specified
4935 inferior's architecture, instead of the current inferior's
4936 architecture (via target_gdbarch).
4937
ed4227b7
PA
49382017-10-04 Pedro Alves <palves@redhat.com>
4939
4940 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4941 case.
4942 (regcache_print): Handle !target_has_registers here instead.
4943
55b11ddf
PA
49442017-10-04 Pedro Alves <palves@redhat.com>
4945
4946 * frame.c (create_test_frame): Delete.
4947 * frame.h (create_test_frame): Delete.
4948 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4949 (class regcache_test): Delete.
4950 (test_target_has_registers, test_target_has_stack)
4951 (test_target_has_memory, test_target_prepare_to_store)
4952 (test_target_store_registers): New functions.
4953 (test_target_ops): New class.
4954 (register_to_value_test): Error out if there's already a
4955 process_stratum (or higher) target pushed. Create a fuller mock
4956 environment, with mock target_ops, inferior, address space, thread
4957 and inferior_ptid.
4958 * progspace.c (struct address_space): Move to ...
4959 * progspace.h (struct address_space): ... here.
4960 * regcache.h (regcache::~regcache, regcache::raw_write)
4961 [GDB_SELF_TEST]: No longer virtual.
4962
4c71c105
SM
49632017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4964
4965 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4966
73dcd72d
PA
49672017-10-04 Pedro Alves <palves@redhat.com>
4968
4969 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4970 out of 'between TRY and CATCH'.
4971
44704526
PA
49722017-10-04 Pedro Alves <palves@redhat.com>
4973
4974 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4975 * common/common-exceptions.h (TRY): Open an outermost scope.
4976 Expand intro comment.
4977 (CATCH): Reindent.
4978 (END_CATCH): Close the outermost scope.
4979 * completer.c (complete_line_internal): Add missing END_CATCH.
4980
bc3b087d
SDJ
49812017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4982
4983 * NEWS (Changes since GDB 8.0): Add entry about new
4984 'set-cwd-on-gdbserver' feature.
4985 (New remote packets): Add entry for QSetWorkingDir.
4986 * common/common-inferior.h (set_inferior_cwd): New prototype.
4987 * infcmd.c (set_inferior_cwd): Remove "static".
4988 (show_cwd_command): Expand text to include remote debugging.
4989 * remote.c: Add PACKET_QSetWorkingDir.
4990 (remote_protocol_features) <QSetWorkingDir>: New entry for
4991 PACKET_QSetWorkingDir.
4992 (extended_remote_set_inferior_cwd): New function.
4993 (extended_remote_create_inferior): Call
4994 "extended_remote_set_inferior_cwd".
4995 (_initialize_remote): Call "add_packet_config_cmd" for
4996 QSetWorkingDir.
4997
d092c5a2
SDJ
49982017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4999
5000 * NEWS (New commands): Mention "set/show cwd".
5001 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5002 "cd" command's help text.
5003 * common/common-inferior.h (get_inferior_cwd): New prototype.
5004 * infcmd.c (inferior_cwd_scratch): New global variable.
5005 (set_inferior_cwd): New function.
5006 (get_inferior_cwd): Likewise.
5007 (set_cwd_command): Likewise.
5008 (show_cwd_command): Likewise.
5009 (_initialize_infcmd): Add "set/show cwd" commands.
5010 * inferior.h (class inferior) <cwd>: New field.
5011 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5012 (fork_inferior): Change inferior's cwd before its execution.
5013 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5014 to CreateProcess.
5015
7da0a886
SDJ
50162017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5017
5018 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5019 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5020 (COMMON_OBS): Add gdb_tilde_expand.o.
5021 * common/gdb_tilde_expand.c: New file.
5022 * common/gdb_tilde_expand.h: Likewise.
5023
db8dd160
MR
50242017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5025
5026 * gdbarch.sh (objfile): Remove duplicate declaration.
5027 * gdbarch.h: Regenerate.
5028
f8bfbf22
TT
50292017-10-03 Tom Tromey <tom@tromey.com>
5030
5031 * utils.c (internal_vproblem): Use string_vprintf.
5032
5178ed48
TT
50332017-10-03 Tom Tromey <tom@tromey.com>
5034
5035 * printcmd.c (info_symbol_command): Use std::string.
5036
8cff8730
TT
50372017-10-03 Tom Tromey <tom@tromey.com>
5038
5039 * top.c (gdb_safe_append_history): Use std::string.
5040
895b8f30
TT
50412017-10-03 Tom Tromey <tom@tromey.com>
5042
5043 * event-top.c (stdin_event_handler): Update.
5044 * main.c (captured_main_1): Update.
5045 * top.h (make_delete_ui_cleanup): Remove.
5046 (struct ui): Add constructor and destructor.
5047 (new_ui, delete_ui): Remove.
5048 * top.c (make_delete_ui_cleanup): Remove.
5049 (new_ui_command): Use std::unique_ptr.
5050 (delete_ui_cleanup): Remove.
5051 (ui::ui): Rename from new_ui. Update.
5052 (free_ui): Remove.
5053 (ui::~ui): Rename from delete_ui. Update.
5054
0efef640
TT
50552017-10-03 Tom Tromey <tom@tromey.com>
5056
5057 * symfile.c (load_progress): Use gdb::byte_vector.
5058
245ad7d3
TT
50592017-10-03 Tom Tromey <tom@tromey.com>
5060
5061 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5062 declaration.
5063 * printcmd.c (x_command): Remove unused declaration.
5064 * symfile.c (symbol_file_command): Remove unused declaration.
5065
e05550d7
TT
50662017-10-03 Tom Tromey <tom@tromey.com>
5067
5068 * utils.c (internal_vproblem): Use std::string.
5069 (defaulted_query): Likewise.
5070
b95de2b7
TT
50712017-10-03 Tom Tromey <tom@tromey.com>
5072
5073 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5074 * top.c (execute_command_to_string): Update.
5075 * utils.c (make_cleanup_restore_page_info): Remove.
5076 (do_restore_page_info_cleanup): Remove.
5077 (set_batch_flag_and_restore_page_info):
5078 New.
5079 (make_cleanup_restore_page_info): Remove.
5080 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5081 (~set_batch_flag_and_restore_page_info): New
5082 (make_cleanup_restore_uinteger): Remove.
5083 (make_cleanup_restore_integer): Remove.
5084 (struct restore_integer_closure): Remove.
5085 (restore_integer): Remove.
5086 * utils.h (struct set_batch_flag_and_restore_page_info): New
5087 class.
5088 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5089 (make_cleanup_restore_page_info): Remove.
5090 (make_cleanup_restore_uinteger) Remove.
5091 (make_cleanup_restore_integer) Remove.
5092
07036511
TT
50932017-10-03 Tom Tromey <tom@tromey.com>
5094
5095 * record-full.h (record_full_gdb_operation_disable_set): Return
5096 scoped_restore_tmpl<int>.
5097 * infrun.c (adjust_pc_after_break): Update.
5098 (handle_signal_stop): Update.
5099 * record-full.c (record_full_gdb_operation_disable_set): Return
5100 scoped_restore_tmpl<int>.
5101 (record_full_wait_1, record_full_insert_breakpoint)
5102 (record_full_remove_breakpoint, record_full_save)
5103 (record_full_goto_insn): Update.
5104
45320ffa
TT
51052017-10-02 Tom Tromey <tom@tromey.com>
5106
5107 PR rust/22236:
5108 * rust-lang.c (rust_val_print_str): New function.
5109 (val_print_struct): Call it.
5110 (rust_subscript): Preserve name of slice type.
5111
b3e3859b
TT
51122017-10-02 Tom Tromey <tom@tromey.com>
5113
5114 * rust-lang.c (rust_subscript): Handle slices in
5115 EVAL_AVOID_SIDE_EFFECTS case.
5116
01af5e0d
TT
51172017-10-02 Tom Tromey <tom@tromey.com>
5118
5119 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5120
888e3ddb
TT
51212017-10-02 Tom Tromey <tom@tromey.com>
5122
5123 * rust-lang.h (rust_slice_type): Add "extern".
5124
cc536b21
PA
51252017-10-02 Tom Tromey <tom@tromey.com>
5126 Pedro Alves <palves@redhat.com>
5127
5128 * ada-lang.h (ada_exc_info::operator<): Make const.
5129 (ada_exc_info::operator==): Make const.
5130 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5131 Make const.
5132
386c8614
TT
51332017-09-29 Tom Tromey <tom@tromey.com>
5134
5135 * target.c (read_whatever_is_readable): Change type of "result".
5136 Update.
5137 (free_memory_read_result_vector): Remove.
5138 (read_memory_robust): Change return type. Update.
5139 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5140 bin2hex, std::string.
5141 * target.h (memory_read_result_s): Remove typedef.
5142 (free_memory_read_result_vector): Remove.
5143 (read_memory_robust): Return std::vector.
5144
789c4b5e
TT
51452017-09-29 Tom Tromey <tom@tromey.com>
5146
5147 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5148
ab816a27
TT
51492017-09-29 Tom Tromey <tom@tromey.com>
5150
5151 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5152 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5153 operator< and operator==.
5154 (ada_exceptions_list): Return a std::vector.
5155 * ada-lang.c (ada_exc_info::operator<): Rename from
5156 compare_ada_exception_info.
5157 (ada_exc_info::operator==): New.
5158 (sort_remove_dups_ada_exceptions_list): Change type of
5159 "exceptions".
5160 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5161 (ada_add_global_exceptions): Likewise.
5162 (ada_exceptions_list_1): Return a std::vector.
5163 (ada_exceptions_list): Likewise.
5164
52f9abe4
TT
51652017-09-29 Tom Tromey <tom@tromey.com>
5166
5167 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5168 'std::set *'.
5169 (print_one_inferior): Update.
5170 (free_vector_of_ints): Remove.
5171 (list_available_thread_groups): Change "ids" to std::set.
5172 (mi_cmd_list_thread_groups): Update.
5173 (struct collect_cores_data) <core>: Now a std::set.
5174 (collect_cores): Update.
5175 (unique): Remove.
5176 (print_one_inferior): Update.
5177
dcd5ddcc
TT
51782017-09-29 Tom Tromey <tom@tromey.com>
5179
5180 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5181 (mi_execute_async_cli_command): Likewise.
5182 (mi_cmd_trace_frame_collected): Use field_fmt.
5183
45d288cc
TT
51842017-09-29 Tom Tromey <tom@tromey.com>
5185
5186 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5187 gdb::byte_vector.
5188
6afe2f4a
TT
51892017-09-29 Tom Tromey <tom@tromey.com>
5190
5191 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5192
9813429a
TT
51932017-09-29 Tom Tromey <tom@tromey.com>
5194
5195 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5196
2d6960b4
TT
51972017-09-29 Tom Tromey <tom@tromey.com>
5198
5199 * varobj.h (varobj_gen_name): Return std::string.
5200 * varobj.c (varobj_gen_name): Return std::string.
5201 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5202 (mi_cmd_var_delete): Don't copy "name".
5203
784c453a
TT
52042017-09-29 Tom Tromey <tom@tromey.com>
5205
5206 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5207 (mi_cmd_break_insert_1): Update.
5208
a9bc57b9
TT
52092017-09-29 Tom Tromey <tom@tromey.com>
5210
5211 * target.h (make_scoped_defer_target_commit_resume): Update.
5212 * target.c (make_scoped_defer_target_commit_resume): Rename from
5213 make_cleanup_defer_target_commit_resume. Return a
5214 scoped_restore.
5215 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5216
9754d8c4
TT
52172017-09-29 Tom Tromey <tom@tromey.com>
5218
5219 * main.c (captured_main_1): Remove unused declaration.
5220 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5221
99ef965c
TT
52222017-09-29 Tom Tromey <tom@tromey.com>
5223
5224 * symtab.c (search_symbols): Remove unused outer cleanup.
5225 (make_source_files_completion_list): Remove unused declaration.
5226
42518ba7
TT
52272017-09-29 Tom Tromey <tom@tromey.com>
5228
5229 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5230
726b2169
TT
52312017-09-29 Tom Tromey <tom@tromey.com>
5232
5233 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5234 gdb::byte_vector.
5235
55b06432
TT
52362017-09-29 Tom Tromey <tom@tromey.com>
5237
5238 * complaints.c (vcomplaint): Use std::string.
5239
8abcee91
TT
52402017-09-29 Tom Tromey <tom@tromey.com>
5241
5242 * tracepoint.c (trace_variable_command): Use std::string.
5243 (encode_actions_1): Remove unused declarations.
5244 (create_tsv_from_upload): Use std::string.
5245
6ad94bc7
TT
52462017-09-29 Tom Tromey <tom@tromey.com>
5247
5248 * cp-support.c (gdb_demangle): Use std::string.
5249
2003f3d8
TT
52502017-09-29 Tom Tromey <tom@tromey.com>
5251
5252 * stack.c (parse_frame_specification): Use std::string
5253 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5254
8f8accb5
TT
52552017-09-29 Tom Tromey <tom@tromey.com>
5256
5257 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5258
200aa7b1
TT
52592017-09-29 Tom Tromey <tom@tromey.com>
5260
5261 * utils.c (vfprintf_maybe_filtered): Use std::string.
5262 (vfprintf_unfiltered): Likewise.
5263
606aae8a
TT
52642017-09-29 Tom Tromey <tom@tromey.com>
5265
5266 * event-top.c (top_level_prompt): Return std::string.
5267 (display_gdb_prompt): Update.
5268
bd413795
TT
52692017-09-29 Tom Tromey <tom@tromey.com>
5270
5271 * unittests/common-utils-selftests.c (format): New function.
5272 (string_vprintf_tests): New function.
5273 (_initialize_common_utils_selftests): Register new tests.
5274 * common/common-utils.c (string_vprintf): New function.
5275 * common/common-utils.h (string_vprintf): Declare.
5276
256642e8
PA
52772017-09-29 Pedro Alves <palves@redhat.com>
5278
5279 * common/rsp-low.c (unpack_varlen_hex): Constify.
5280 * common/rsp-low.h (unpack_varlen_hex): Constify.
5281 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5282 Constify.
5283 * remote.c (remote_set_permissions, read_ptid)
5284 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5285 (remote_static_tracepoint_marker_at)
5286 (remote_static_tracepoint_markers_by_strid)
5287 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5288 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5289 (parse_tracepoint_definition, parse_tsv_definition)
5290 (parse_static_tracepoint_marker_definition): Constify.
5291 * tracepoint.h (parse_static_tracepoint_marker_definition)
5292 (parse_trace_status, parse_tracepoint_status)
5293 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5294
b6bb3468
PA
52952017-09-29 Pedro Alves <palves@redhat.com>
5296
5297 * remote.c (target_buf, target_buf_size): Delete.
5298 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5299 Use the connection's packet buffer instead.
5300 All callers adjusted.
5301 (_initialize_remote): Remove references to target_buf and
5302 target_buf_size.
5303
b2f8eb7a
PA
53042017-09-28 Pedro Alves <palves@redhat.com>
5305
5306 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5307 unittests/common-utils-selftests.c.
5308 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5309 (COMMON_OBS): Remove utils-selftests.o.
5310 * utils-selftests.c: Move to ...
5311 * unittests/common-utils-selftests.c: ... here and rename self
5312 test to "string_printf".
5313
08302ed2
DE
53142017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5315
5316 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5317 having NULL cus or tus.
5318
96a5a1d3
UW
53192017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5320
5321 * arm-tdep.c: (convert_from_extended): Remove.
5322 (convert_to_extended): Likewise.
5323 (arm_extract_return_value): Use convert_typed_floating.
5324 (arm_store_return_value): Likewise.
5325
5326 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5327 * sh-tdep.c: Do not include "floatformat.h".
5328 (sh_littlebyte_bigword_type): New function.
5329 (sh_register_convert_to_virtual): Use convert_typed_floating.
5330 (sh_register_convert_to_raw): Likewise.
5331 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5332 (sh64_littlebyte_bigword_type): New function.
5333 (sh64_extract_return_value): Use convert_typed_floating.
5334 (sh64_register_convert_to_virtual): Likewise.
5335 (sh64_register_convert_to_raw): Likewise.
5336
0db7851f
UW
53372017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5338
5339 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5340 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5341
5342 * gdbtypes.h (union type_specific): Make field floatformat hold
5343 just a single struct floatformat, not an array.
5344 (floatformat_from_type): Move here.
5345 * gdbtypes.c (floatformat_from_type): Move here. Update to
5346 changed TYPE_FLOATFORMAT definition.
5347 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5348 (recursive_dump_type): Likewise.
5349 (init_float_type): Install correct floatformat for byte order.
5350 (arch_float_type): Likewise.
5351
77b7c781
UW
53522017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5353
5354 * gdbtypes.c (init_type): Change incoming argument from
5355 length-in-bytes to length-in-bits. Assert length is a
5356 multiple of TARGET_CHAR_BITS.
5357 (arch_type, arch_flags_type): Likewise.
5358 (init_integer_type): Update call to init_type.
5359 (init_character_type): Likewise.
5360 (init_boolean_type): Likewise.
5361 (init_float_type): Likewise.
5362 (init_decfloat_type): Likewise.
5363 (init_complex_type): Likewise.
5364 (init_pointer_type): Likewise.
5365 (objfile_type): Likewise.
5366 (arch_integer_type): Update call to arch_type.
5367 (arch_character_type): Likewise.
5368 (arch_boolean_type): Likewise.
5369 (arch_float_type): Likewise.
5370 (arch_decfloat_type): Likewise.
5371 (arch_complex_type): Likewise.
5372 (arch_pointer_type): Likewise.
5373 (gdbtypes_post_init): Likewise.
5374
5375 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5376 (read_base_type): Likewise.
5377 * mdebugread.c (basic_type): Likewise.
5378 * stabsread.c (dbx_init_float_type): Likewise.
5379 (rs6000_builtin_type): Likewise.
5380 (read_range_type): Likewise. Also, fix call to init_integer_type
5381 with erroneous length argument.
5382
5383 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5384 * d-lang.c (build_d_types): Likewise.
5385 * f-lang.c (build_fortran_types): Likewise.
5386 * go-lang.c (build_go_types): Likewise.
5387 * opencl-lang.c (build_opencl_types): Likewise.
5388 * jit.c (finalize_symtab): Likewise.
5389 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5390 (build_std_type_info_type): Likewise.
5391 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5392 update call to arch_flags_type.
5393
5394 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5395 arch_type.
5396 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5397 * windows-tdep.c (windows_get_tlb_type): Likewise.
5398
5399 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5400 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5401 * m32c-tdep.c (make_types): Likewise.
5402 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5403 (rl78_psw_type): Update call to arch_flags_type.
5404 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5405 * rx-tdep.c (rx_psw_type): Likewise.
5406 (rx_fpsw_type): Likewise.
5407 * sparc-tdep.c (sparc_psr_type): Likewise.
5408 (sparc_fsr_type): Likewise.
5409 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5410 (sparc64_ccr_type): Likewise.
5411 (sparc64_fsr_type): Likewise.
5412 (sparc64_fprs_type): Likewise.
5413
f21b4d5c
TT
54142017-09-27 Tom Tromey <tom@tromey.com>
5415
5416 * findcmd.c (find_command): Constify.
5417
643c2ffa
TT
54182017-09-27 Tom Tromey <tom@tromey.com>
5419
5420 * ada-tasks.c (task_command_1, task_command): Constify.
5421
510e5e56
TT
54222017-09-27 Tom Tromey <tom@tromey.com>
5423
5424 * symtab.c (maintenance_print_symbol_cache)
5425 (maintenance_flush_symbol_cache)
5426 (maintenance_print_symbol_cache_statistics): Constify.
5427
e503b191
TT
54282017-09-27 Tom Tromey <tom@tromey.com>
5429
5430 * inferior.c (detach_inferior_command, kill_inferior_command)
5431 (inferior_command): Constify.
5432
4e001312
TT
54332017-09-27 Tom Tromey <tom@tromey.com>
5434
5435 * regcache.c (regcache_print, maintenance_print_registers)
5436 (maintenance_print_raw_registers)
5437 (maintenance_print_cooked_registers)
5438 (maintenance_print_register_groups)
5439 (maintenance_print_remote_registers): Constify.
5440
77763700
TT
54412017-09-27 Tom Tromey <tom@tromey.com>
5442
5443 * printcmd.c (map_display_numbers, undisplay_command)
5444 (enable_disable_display_command, enable_display_command)
5445 (disable_display_command): Constify.
5446
4495129a
TT
54472017-09-27 Tom Tromey <tom@tromey.com>
5448
5449 * breakpoint.h (delete_command): Don't declare.
5450 * breakpoint.c (delete_command, enable_once_command)
5451 (enable_count_command, enable_delete_command, breakpoint_1)
5452 (maintenance_info_breakpoints, stopin_command, stopat_command)
5453 (delete_command, delete_trace_command, save_breakpoints)
5454 (save_breakpoints_command, save_tracepoints_command): Constify.
5455
3088cf40
TT
54562017-09-27 Tom Tromey <tom@tromey.com>
5457
5458 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5459 (skip_ws, extract_identifier, macro_define_command)
5460 (macro_undef_command, macro_list_command): Constify.
5461
69f476a3
TT
54622017-09-27 Tom Tromey <tom@tromey.com>
5463
5464 * infcmd.c (environment_info, set_environment_command)
5465 (unset_environment_command, path_info, info_proc_cmd_1)
5466 (info_proc_cmd_mappings, info_proc_cmd_stat)
5467 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5468 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5469
c4a3e68e
TT
54702017-09-27 Tom Tromey <tom@tromey.com>
5471
5472 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5473 Constify.
5474
c9d31bd6
TT
54752017-09-27 Tom Tromey <tom@tromey.com>
5476
5477 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5478
1f3f85eb
TT
54792017-09-27 Tom Tromey <tom@tromey.com>
5480
5481 * demangle.c (demangle_command): Constify.
5482
9c504b5d
TT
54832017-09-27 Tom Tromey <tom@tromey.com>
5484
5485 * progspace.c (maintenance_info_program_spaces_command):
5486 Constify.
5487
6663cf91
TT
54882017-09-27 Tom Tromey <tom@tromey.com>
5489
5490 * compile/compile.c (check_raw_argument, compile_file_command)
5491 (compile_code_command, compile_print_command): Constify.
5492
34e5fa26
TT
54932017-09-27 Tom Tromey <tom@tromey.com>
5494
5495 * reggroups.c (maintenance_print_reggroups): Constify.
5496
8384c356
TT
54972017-09-27 Tom Tromey <tom@tromey.com>
5498
5499 * dwarf2read.c (save_gdb_index_command): Constify.
5500
884beb0c
TT
55012017-09-27 Tom Tromey <tom@tromey.com>
5502
5503 * stap-probe.c (info_probes_stap_command): Constify.
5504
e0b2930c
TT
55052017-09-27 Tom Tromey <tom@tromey.com>
5506
5507 * fork-child.c (unset_exec_wrapper_command): Constify.
5508
f938677d
TT
55092017-09-27 Tom Tromey <tom@tromey.com>
5510
5511 * btrace.c (get_uint, get_context_size, no_chunk)
5512 (maint_btrace_packet_history_cmd)
5513 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5514 (maint_info_btrace_cmd): Constify.
5515
8949cb87
TT
55162017-09-27 Tom Tromey <tom@tromey.com>
5517
5518 * reverse.c (delete_bookmark_command): Constify.
5519
ac88e2de
TT
55202017-09-27 Tom Tromey <tom@tromey.com>
5521
5522 * remote.c (set_memory_packet_size)
5523 (set_memory_write_packet_size, show_memory_write_packet_size)
5524 (set_memory_read_packet_size, show_memory_read_packet_size)
5525 (compare_sections_command, packet_command, remote_put_command)
5526 (remote_get_command, remote_delete_command): Constify.
5527
bd4c9dfe
TT
55282017-09-27 Tom Tromey <tom@tromey.com>
5529
5530 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5531 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5532 (set_mipsfpu_auto_command): Constify.
5533
5e93d4c6
TT
55342017-09-27 Tom Tromey <tom@tromey.com>
5535
5536 * cli/cli-cmds.h (cd_command): Constify.
5537 * cli/cli-cmds.c (cd_command): Constify.
5538
fc41a75b
TT
55392017-09-27 Tom Tromey <tom@tromey.com>
5540
5541 * thread.c (thread_name_command, thread_find_command): Constify.
5542
67810076
TT
55432017-09-27 Tom Tromey <tom@tromey.com>
5544
5545 * probe.c (enable_probes_command, disable_probes_command):
5546 Constify.
5547
1d8b34a7
TT
55482017-09-27 Tom Tromey <tom@tromey.com>
5549
5550 * symfile.c (symbol_file_command): Constify.
5551 * gdbcore.h (deprecated_file_changed_hook): Constify.
5552 * exec.c (deprecated_file_changed_hook, exec_file_command)
5553 (file_command): Constify.
5554 * defs.h (symbol_file_command): Constify.
5555
442019e1
TT
55562017-09-27 Tom Tromey <tom@tromey.com>
5557
5558 * remote-fileio.c (set_system_call_allowed)
5559 (show_system_call_allowed): Constify.
5560
2983f7cb
TT
55612017-09-27 Tom Tromey <tom@tromey.com>
5562
5563 * tracepoint.c (delete_trace_variable_command)
5564 (tfind_end_command, tfind_start_command, tfind_pc_command)
5565 (tfind_tracepoint_command, tfind_line_command)
5566 (tfind_range_command, tfind_outside_command): Constify.
5567
4fd41b24
TT
55682017-09-27 Tom Tromey <tom@tromey.com>
5569
5570 * ax-gdb.c (maint_agent_printf_command, agent_command)
5571 (agent_eval_command): Constify.
5572
f2fc3015
TT
55732017-09-27 Tom Tromey <tom@tromey.com>
5574
5575 * tracepoint.c (info_scope_command): Constify.
5576 * python/python.c (gdbpy_decode_line): Constify.
5577 * python/py-breakpoint.c (bppy_init): Constify.
5578 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5579 * location.h: (new_linespec_location)
5580 (string_to_event_location_basic, string_to_event_location):
5581 Constify.
5582 * location.c (new_linespec_location)
5583 (string_to_event_location_basic, string_to_event_location):
5584 Constify.
5585 * linespec.h (decode_line_with_current_source)
5586 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5587 * linespec.c (linespec_lex_to_end)
5588 (decode_line_with_current_source)
5589 (decode_line_with_last_displayed): Constify.
5590 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5591 Constify.
5592 * cli/cli-cmds.c (edit_command, list_command): Constify.
5593 * breakpoint.h (until_break_command, watch_command_wrapper)
5594 (awatch_command_wrapper, rwatch_command_wrapper)
5595 (init_ada_exception_breakpoint): Constify.
5596 * breakpoint.c (break_command_1, dprintf_command)
5597 (break_range_command, watch_command_wrapper)
5598 (rwatch_command_wrapper, awatch_command_wrapper)
5599 (until_break_command, init_ada_exception_breakpoint)
5600 (strace_marker_create_sals_from_location, trace_command)
5601 (ftrace_command, strace_command, struct tracepoint): Constify.
5602 * ax-gdb.c (agent_command_1): Constify.
5603 * ada-lang.c (ada_exception_sal): Constify.
5604
8c2f95f4
TT
56052017-09-27 Tom Tromey <tom@tromey.com>
5606
5607 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5608 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5609 (get_context_size, no_chunk, get_insn_history_modifiers)
5610 (cmd_record_insn_history, get_call_history_modifiers)
5611 (cmd_record_call_history): Constify.
5612
a0d65762
TT
56132017-09-27 Tom Tromey <tom@tromey.com>
5614
5615 * source.c (show_substitute_path_command)
5616 (unset_substitute_path_command, set_substitute_path_command):
5617 Constify.
5618
58971144
TT
56192017-09-27 Tom Tromey <tom@tromey.com>
5620
5621 * typeprint.c (maintenance_print_type): Constify.
5622 * maint.c (maintenance_dump_me, maintenance_demangle)
5623 (maintenance_time_display, maintenance_info_sections)
5624 (maintenance_print_statistics, maintenance_deprecate)
5625 (maintenance_undeprecate): Constify.
5626 (maintenance_do_deprecate): Constify. Use std::string.
5627 (maintenance_selftest): Constify.
5628 * gdbtypes.h (maintenance_print_type): Constify.
5629
c482f52c
TT
56302017-09-27 Tom Tromey <tom@tromey.com>
5631
5632 * hppa-tdep.c (unwind_command): Constify.
5633
e100df1a
TT
56342017-09-27 Tom Tromey <tom@tromey.com>
5635
5636 * target-descriptions.c (unset_tdesc_filename_cmd)
5637 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5638 Constify.
5639
31d56ade
TT
56402017-09-27 Tom Tromey <tom@tromey.com>
5641
5642 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5643
b961da0b
TT
56442017-09-27 Tom Tromey <tom@tromey.com>
5645
5646 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5647
e2d8ae16
TT
56482017-09-27 Tom Tromey <tom@tromey.com>
5649
5650 * tui/tui-regs.c (tui_reg_command): Constify.
5651
863779b0
TT
56522017-09-27 Tom Tromey <tom@tromey.com>
5653
5654 * skip.c (skip_file_command, skip_function_command)
5655 (skip_enable_command, skip_disable_command, skip_delete_command):
5656 Constify.
5657
cdb34d4a
TT
56582017-09-27 Tom Tromey <tom@tromey.com>
5659
5660 * record-btrace.c (cmd_record_btrace_bts_start)
5661 (cmd_record_btrace_pt_start): Constify.
5662
e99c83e7
TT
56632017-09-27 Tom Tromey <tom@tromey.com>
5664
5665 * symmisc.c (maintenance_print_symbols)
5666 (maintenance_print_msymbols, maintenance_print_objfiles)
5667 (maintenance_info_symtabs, maintenance_check_symtabs)
5668 (maintenance_expand_symtabs, maintenance_info_line_tables):
5669 Constify.
5670
32faf971
TT
56712017-09-27 Tom Tromey <tom@tromey.com>
5672
5673 * top.c (new_ui_command): Constify.
5674
2cf311eb
TT
56752017-09-27 Tom Tromey <tom@tromey.com>
5676
5677 * symfile.c (add_symbol_file_command)
5678 (remove_symbol_file_command, list_overlays_command)
5679 (map_overlay_command, unmap_overlay_command)
5680 (overlay_auto_command, overlay_manual_command)
5681 (overlay_off_command, overlay_load_command): Constify.
5682
e6738699
TT
56832017-09-27 Tom Tromey <tom@tromey.com>
5684
5685 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5686 (info_spu_mailbox_command, info_spu_dma_command)
5687 (info_spu_proxydma_command): Constify.
5688
aa360cd5
TT
56892017-09-27 Tom Tromey <tom@tromey.com>
5690
5691 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5692
898241a5
TT
56932017-09-27 Tom Tromey <tom@tromey.com>
5694
5695 * cli/cli-script.c (user_defined_command): Constify.
5696
2d0ac106
TT
56972017-09-27 Tom Tromey <tom@tromey.com>
5698
5699 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5700 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5701 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5702 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5703 (dump_binary_value, append_binary_memory, append_binary_value):
5704 Constify.
5705 (struct dump_context) <func>: Constify.
5706 (add_dump_command): Update.
5707
dede02ce
TT
57082017-09-27 Tom Tromey <tom@tromey.com>
5709
5710 * cli/cli-cmds.c (show_version, show_configuration)
5711 (source_command, show_user): Constify.
5712
d3cb6b99
TT
57132017-09-27 Tom Tromey <tom@tromey.com>
5714
5715 * target.c (maintenance_print_target_stack): Constify.
5716
1970a12f
TT
57172017-09-27 Tom Tromey <tom@tromey.com>
5718
5719 * interps.c (interpreter_exec_cmd): Constify.
5720
41243651
TT
57212017-09-27 Tom Tromey <tom@tromey.com>
5722
5723 * record-full.c (cmd_record_full_restore): Constify.
5724
4465d9db
TT
57252017-09-27 Tom Tromey <tom@tromey.com>
5726
5727 * memattr.c (enable_mem_command, disable_mem_command)
5728 (delete_mem_command): Constify.
5729
ad25e423
TT
57302017-09-27 Tom Tromey <tom@tromey.com>
5731
5732 * value.c (show_convenience): Constify.
5733
d64097b1
TT
57342017-09-27 Tom Tromey <tom@tromey.com>
5735
5736 * gdbcore.h (core_file_command): Update.
5737 * corefile.c (core_file_command): Constify.
5738
4d4589ef
TT
57392017-09-27 Tom Tromey <tom@tromey.com>
5740
5741 * user-regs.c (maintenance_print_user_registers): Constify.
5742
32a7bf17
TT
57432017-09-27 Tom Tromey <tom@tromey.com>
5744
5745 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5746
4a475551
TT
57472017-09-27 Tom Tromey <tom@tromey.com>
5748
5749 * cp-support.c (first_component_command): Constify.
5750
990b9f9f
TT
57512017-09-27 Tom Tromey <tom@tromey.com>
5752
5753 * psymtab.c (maintenance_print_psymbols)
5754 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5755 Constify.
5756
c281872e
TT
57572017-09-27 Tom Tromey <tom@tromey.com>
5758
5759 * windows-tdep.c (display_tib): Constify.
5760
5b64bf74
TT
57612017-09-27 Tom Tromey <tom@tromey.com>
5762
5763 * linux-fork.c (delete_checkpoint_command)
5764 (detach_checkpoint_command): Constify.
5765
4ada038f
TT
57662017-09-27 Tom Tromey <tom@tromey.com>
5767
5768 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5769
57f5a81b
TT
57702017-09-27 Tom Tromey <tom@tromey.com>
5771
5772 * arc-tdep.c (dump_arc_instruction_command): Constify.
5773
b0a8e6c4
TT
57742017-09-27 Tom Tromey <tom@tromey.com>
5775
5776 * valprint.c (set_radix, show_radix): Constify.
5777
8d97dc1c
TT
57782017-09-27 Tom Tromey <tom@tromey.com>
5779
5780 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5781
eb7c454d
TT
57822017-09-27 Tom Tromey <tom@tromey.com>
5783
5784 * command.h (not_just_help_class_command): Update.
5785 * cli/cli-decode.h (not_just_help_class_command): Update.
5786 * cli/cli-decode.c (not_just_help_class_command): Constify.
5787
e4e33335
TT
57882017-09-27 Tom Tromey <tom@tromey.com>
5789
5790 * gdb_bfd.c (maintenance_info_bfds): Constify.
5791
0450cc4c
TT
57922017-09-27 Tom Tromey <tom@tromey.com>
5793
5794 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5795 overloads.
5796 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5797 (do_const_cfunc): New function.
5798 (cmd_cfunc_eq): New overload.
5799 (cli_user_command_p): Check do_const_cfunc.
5800 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5801 const_cfunc.
5802 * command.h (add_cmd): Add const overload and no-function
5803 overload.
5804 (set_cmd_cfunc): Add const overload.
5805 (cmd_const_cfunc_ftype): Declare.
5806 (cmd_cfunc_eq): Add const overload.
5807 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5808 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5809 overload.
5810
a9bbfbd8
TT
58112017-09-27 Tom Tromey <tom@tromey.com>
5812
5813 * macroexp.c (get_next_token_for_substitution): New function.
5814 (substitute_args): Call it. Check for __VA_OPT__.
5815
5230b05a
WT
58162017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5817 Pedro Alves <palves@redhat.com>
5818
5819 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5820 producer_is_icc_lt_14.
5821 (producer_is_icc_lt_14): New function.
5822 (check_producer): Add code for checking version of ICC.
5823 (producer_is_icc): Move to producer.c.
5824 (read_structure_type): Restrict ICC workaround to ICC<14.
5825 * producer.c: Include selftest.h.
5826 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5827 New functions.
5828 * producer.h (producer_is_icc): New declaration.
5829
b32b108a
WT
58302017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5831
5832 * Makefile.in (SFILES): Add producer.c.
5833 (COMMON_OBS): Add producer.o
5834 * amd64-tdep.c (producer.h): Add new include.
5835 * dwarf2read.c (producer.h): Add new include.
5836 * producer.c: New file.
5837 * producer.h: New file.
5838 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5839 producer.c.
5840 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5841 producer.h.
5842
5007d765
MK
58432017-09-26 Matthias Klose <doko@ubuntu.com>
5844
5845 * configure.ac: Search ncursesw before ncurses.
5846 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5847 * gdb_curses.h: Include <ncursesw/ncurses.h>
5848 * config.in, configure: Regenerate.
5849
281c4447
RO
58502017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5851
5852 PR gdb/22185
5853 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5854 obsolete.
5855 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5856 Remove i386sol2 support.
5857 * configure.nat <i386sol2>: Remove.
5858 <sol2-64>: Fold into ...
5859 <sol2>: ... this.
5860 Move common settings to default section.
5861 Add sol-thread.o.
5862 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5863 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5864 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5865 <i[34567]86-*-solaris*>: Remove.
5866 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5867
5868 * configure.ac: Remove wctype in libw check.
5869 (_MSE_INT_H): Don't define on Solaris 7-9.
5870 <solaris*>: Remove libthread_db.so.1 check.
5871 * configure: Regenerate.
5872 * config.in: Regenerate.
5873
5874 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5875 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5876 (gdb_ps_size_t): Remove.
5877 Use base types in users.
5878 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5879
5880 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5881
39b06c20
RO
58822017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5883
5884 PR build/22206
5885 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5886 (adi_is_addr_mapped): Likewise.
5887 (PSR_ICC): Don't redefine.
5888 (PSR_IMPL): Likewise.
5889
6c3e20f1
TT
58902017-09-25 Tom Tromey <tom@tromey.com>
5891
5892 * regcache.c (regcache::dump): Use string_printf.
5893
b292235f
TT
58942017-09-25 Tom Tromey <tom@tromey.com>
5895
5896 * regcache.c (class regcache_invalidator): New.
5897 (struct register_to_invalidate): Remove.
5898 (make_cleanup_regcache_invalidate): Remove.
5899 (regcache::raw_write): Use regcache_invalidator.
5900
9ac86b52
TT
59012017-09-25 Tom Tromey <tom@tromey.com>
5902
5903 * spu-tdep.c (spu2ppu_sniffer): Update.
5904 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5905 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5906 Remove.
5907 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5908 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5909 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5910 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5911 (frame_pop): Update.
5912
c0e383c6
TT
59132017-09-25 Tom Tromey <tom@tromey.com>
5914
5915 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5916 * regcache.h (regcache_xfree): Don't declare.
5917 * regcache.c (regcache_xfree): Remove.
5918 (do_regcache_xfree): Use delete.
5919 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5920 * linux-fork.c (free_fork): Use delete.
5921 (fork_save_infrun_state): Likewise.
5922 * jit.c (jit_dealloc_cache): Use delete.
5923 * infrun.c (discard_infcall_suspend_state): Use delete.
5924
791199cc
TT
59252017-09-25 Tom Tromey <tom@tromey.com>
5926
5927 * regcache.h (regcache_xmalloc): Don't declare.
5928 (regcache_raw_set_cached_value): Update comment.
5929 * regcache.c (regcache_xmalloc): Remove.
5930 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5931 * jit.c (jit_frame_sniffer): Use new.
5932 * frame.c (frame_save_as_regcache): Use new.
5933
289e23aa
AA
59342017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5935
5936 * NEWS: Advertise support for guarded-storage registers on IBM z.
5937
1b63490c
AA
59382017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5939
5940 * s390-linux-nat.c (have_regset_gs): New static variable.
5941 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5942 control block and guarded-storage broadcast control regsets.
5943 (s390_read_description): Detect whether the target has
5944 guarded-storage support, return appropriate tdesc.
5945 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5946 (features/s390x-gs-linux64.c): Likewise.
5947 (struct gdbarch_tdep) <have_gs>: New field.
5948 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5949 (s390_gsbc_regset): New variables.
5950 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5951 and s390_gsbc_regset, if applicable.
5952 (s390_core_read_description): Check whether core file was from a
5953 target with guarded-storage support; include appropriate regsets.
5954 (s390_gdbarch_init): Add registers for guarded-storage support.
5955 (_initialize_s390_tdep): Initialize new target descriptions that
5956 include registers for guarded-storage support.
5957 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5958 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5959 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5960 (S390_NUM_REGS): Adjust macro definition.
5961 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5962 (tdesc_s390x_gs_linux64): New declarations.
5963
96235dc1
AA
59642017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5965
5966 * features/s390-gs-linux64.xml: New file.
5967 * features/s390-gs.xml: New file.
5968 * features/s390-gsbc.xml: New file.
5969 * features/s390x-gs-linux64.xml: New file.
5970 * features/Makefile (WHICH): Add s390-gs-linux64 and
5971 s390x-gs-linux64.
5972 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5973 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5974 * features/s390-gs-linux64.c: New generated file.
5975 * features/s390x-gs-linux64.c: New file.
5976 * regformats/s390-gs-linux64.dat: New file.
5977 * regformats/s390x-gs-linux64.dat: New file.
5978
b4a7c699
TT
59792017-09-23 Tom Tromey <tom@tromey.com>
5980
5981 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5982
c2f97536
TT
59832017-09-22 Tom Tromey <tom@tromey.com>
5984
5985 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5986 type to scoped_restore_tmpl.
5987 <scoped_input_handler>: Initialize m_quit_handler directly.
5988
43573013
SDJ
59892017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5990
5991 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5992 (cd_command): Likewise. Free "current_directory" before
5993 assigning to it.
5994 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5995 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5996 * top.c (gdb_dirbuf): Remove global declaration.
5997 * top.h (gdb_dirbuf): Likewise.
5998
6ec2e0f5
SDJ
59992017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6000
6001 * gnulib/aclocal.m4: Regenerate.
6002 * gnulib/config.in: Regenerate.
6003 * gnulib/configure: Regenerate.
6004 * gnulib/import/Makefile.am: Regenerate.
6005 * gnulib/import/Makefile.in: Regenerate.
6006 * gnulib/import/assure.h: New file.
6007 * gnulib/import/at-func.c: Likewise
6008 * gnulib/import/chdir-long.c: New file.
6009 * gnulib/import/chdir-long.h: New file.
6010 * gnulib/import/cloexec.c: New file.
6011 * gnulib/import/cloexec.h: New file.
6012 * gnulib/import/close.c: New file.
6013 * gnulib/import/closedir.c: New file.
6014 * gnulib/import/dirent-private.h: New file.
6015 * gnulib/import/dup-safer.c: New file.
6016 * gnulib/import/dup.c: New file.
6017 * gnulib/import/dup2.c: New file.
6018 * gnulib/import/error.c: New file.
6019 * gnulib/import/error.h: New file.
6020 * gnulib/import/exitfail.c: New file.
6021 * gnulib/import/exitfail.h: New file.
6022 * gnulib/import/fchdir.c: New file.
6023 * gnulib/import/fcntl.c: New file.
6024 * gnulib/import/fcntl.in.h: New file.
6025 * gnulib/import/fd-hook.c: New file.
6026 * gnulib/import/fd-hook.h: New file.
6027 * gnulib/import/fd-safer.c: New file.
6028 * gnulib/import/fdopendir.c: New file.
6029 * gnulib/import/filename.h: New file.
6030 * gnulib/import/filenamecat-lgpl.c: New file.
6031 * gnulib/import/filenamecat.h: New file.
6032 * gnulib/import/fstat.c: New file.
6033 * gnulib/import/fstatat.c: New file.
6034 * gnulib/import/getcwd-lgpl.c: New file.
6035 * gnulib/import/getcwd.c: New file.
6036 * gnulib/import/getdtablesize.c: New file.
6037 * gnulib/import/getlogin_r.c: New file.
6038 * gnulib/import/getprogname.c: New file.
6039 * gnulib/import/getprogname.h: New file.
6040 * gnulib/import/gettext.h: New file.
6041 * gnulib/import/glob-libc.h: New file.
6042 * gnulib/import/glob.c: New file.
6043 * gnulib/import/glob.in.h: New file.
6044 * gnulib/import/intprops.h: New file.
6045 * gnulib/import/m4/chdir-long.m4: New file.
6046 * gnulib/import/m4/close.m4: New file.
6047 * gnulib/import/m4/closedir.m4: New file.
6048 * gnulib/import/m4/d-ino.m4: New file.
6049 * gnulib/import/m4/d-type.m4: New file.
6050 * gnulib/import/m4/dup.m4: New file.
6051 * gnulib/import/m4/dup2.m4: New file.
6052 * gnulib/import/m4/error.m4: New file.
6053 * gnulib/import/m4/fchdir.m4: New file.
6054 * gnulib/import/m4/fcntl.m4: New file.
6055 * gnulib/import/m4/fcntl_h.m4: New file.
6056 * gnulib/import/m4/fdopendir.m4: New file.
6057 * gnulib/import/m4/filenamecat.m4: New file.
6058 * gnulib/import/m4/fstat.m4: New file.
6059 * gnulib/import/m4/fstatat.m4: New file.
6060 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6061 * gnulib/import/m4/getcwd-path-max.m4: New file.
6062 * gnulib/import/m4/getcwd.m4: New file.
6063 * gnulib/import/m4/getdtablesize.m4: New file.
6064 * gnulib/import/m4/getlogin_r.m4: New file.
6065 * gnulib/import/m4/getprogname.m4: New file.
6066 * gnulib/import/m4/glob.m4: New file.
6067 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6068 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6069 * gnulib/import/m4/mempcpy.m4: New file.
6070 * gnulib/import/m4/memrchr.m4: New file.
6071 * gnulib/import/m4/mode_t.m4: New file.
6072 * gnulib/import/m4/msvc-inval.m4: New file.
6073 * gnulib/import/m4/msvc-nothrow.m4: New file.
6074 * gnulib/import/m4/open.m4: New file.
6075 * gnulib/import/m4/openat.m4: New file.
6076 * gnulib/import/m4/opendir.m4: New file.
6077 * gnulib/import/m4/readdir.m4: New file.
6078 * gnulib/import/m4/realloc.m4: New file.
6079 * gnulib/import/m4/rewinddir.m4: New file.
6080 * gnulib/import/m4/save-cwd.m4: New file.
6081 * gnulib/import/m4/strdup.m4: New file.
6082 * gnulib/import/m4/strerror.m4: New file.
6083 * gnulib/import/m4/unistd-safer.m4: New file.
6084 * gnulib/import/mempcpy.c: New file.
6085 * gnulib/import/memrchr.c: New file.
6086 * gnulib/import/msvc-inval.c: New file.
6087 * gnulib/import/msvc-inval.h: New file.
6088 * gnulib/import/msvc-nothrow.c: New file.
6089 * gnulib/import/msvc-nothrow.h: New file.
6090 * gnulib/import/open.c: New file.
6091 * gnulib/import/openat-die.c: New file.
6092 * gnulib/import/openat-priv.h: New file.
6093 * gnulib/import/openat-proc.c: New file.
6094 * gnulib/import/openat.c: New file.
6095 * gnulib/import/openat.h: New file.
6096 * gnulib/import/opendir.c: New file.
6097 * gnulib/import/pipe-safer.c: New file.
6098 * gnulib/import/readdir.c: New file.
6099 * gnulib/import/realloc.c: New file.
6100 * gnulib/import/rewinddir.c: New file.
6101 * gnulib/import/save-cwd.c: New file.
6102 * gnulib/import/save-cwd.h: New file.
6103 * gnulib/import/strdup.c: New file.
6104 * gnulib/import/strerror-override.c: New file.
6105 * gnulib/import/strerror-override.h: New file.
6106 * gnulib/import/strerror.c: New file.
6107 * gnulib/import/unistd--.h: New file.
6108 * gnulib/import/unistd-safer.h: New file.
6109 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6110 "getcwd" and "glob".
6111 * ser-tcp.c: Undefine "close" before redefining it.
6112
432ae719
SM
61132017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6114
6115 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6116 get rid of res_val.
6117
4fa7574e
RO
61182017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6119
6120 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6121 <sol2,sparc>: Likewise.
6122 <sol2-64,i386>: Likewise.
6123
6124 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6125 -Wdeprecated-declarations on *-*-solaris*.
6126 * configure: Regenerate.
6127
6128 * procfs.c: Include "nat/inferior.h".
6129 (procfs_info_proc): Fix typo.
6130
f6327dcb
KB
61312017-09-21 Kevin Buettner <kevinb@redhat.com>
6132
6133 * remote.c (vector): Include.
6134 (struct private_thread_info): Add field, thread_handle.
6135 (free_private_thread_info): Deallocate storage associated with
6136 thread handle.
6137 (get_private_info_thread): Initialize `thread_handle' field.
6138 (struct thread_item): Add field, thread_handle.
6139 (clear_threads_listing_context): Deallocate storage associated
6140 with thread handle.
6141 (start_thread): Add support for "handle" attribute.
6142 (thread_attributes): Add "handle".
6143 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6144 field.
6145 (remote_update_thread_list): Update thread_handle.
6146 (remote_thread_handle_to_thread_info): New function.
6147 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6148
fbbe5337
KB
61492017-09-21 Kevin Buettner <kevinb@redhat.com>
6150
6151 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6152 function.
6153 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6154 * python/python-internal.h (thread_object_type): Declare.
6155
e04ee09e
KB
61562017-09-21 Kevin Buettner <kevinb@redhat.com>
6157
6158 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6159 (target_thread_handle_to_thread_info): Declare.
6160 * target.c (target_thread_handle_to_thread_info): New function.
6161 * target-delegates.c: Regenerate.
6162 * gdbthread.h (find_thread_by_handle): Declare.
6163 * thread.c (find_thread_by_handle): New function.
6164 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6165 function.
6166 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6167
1e5b66ed
SM
61682017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6169
6170 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6171
ebe48ba0
SM
61722017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6173
6174 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6175
0a0bf5dc
YQ
61762017-09-21 Yao Qi <yao.qi@linaro.org>
6177
6178 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6179 to gdb_target_obs.
6180
d1b0a7bf
TT
61812017-09-20 Tom Tromey <tom@tromey.com>
6182
6183 * breakpoint.c (struct counted_command_line): Remove.
6184 (breakpoint_commands): Update.
6185 (alloc_counted_command_line, incref_counted_command_line)
6186 (decref_counted_command_line, do_cleanup_counted_command_line)
6187 (make_cleanup_decref_counted_command_line): Remove.
6188 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6189 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6190 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6191 (save_breakpoints): Update.
6192 * breakpoint.h (counted_command_line): Now a typedef to
6193 shared_ptr.
6194 (struct breakpoint) <commands>: Now a counted_command_line.
6195 (struct bpstats) <command>: Likewise.
6196
48649e1b
TT
61972017-09-20 Tom Tromey <tom@tromey.com>
6198
6199 * breakpoint.c (struct commands_info, do_map_commands_command):
6200 Remove.
6201 (commands_command_1): Update.
6202 (iterate_over_related_breakpoints): Take a function_view.
6203 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6204 (delete_command): Update.
6205 (map_breakpoint_numbers): Take a function_view.
6206 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6207 (disable_command): Update.
6208 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6209 (enable_command): Update.
6210 (struct disp_data, do_enable_breakpoint_disp)
6211 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6212 (do_map_enable_delete_breakpoint): Remove.
6213 (enable_once_command, enable_count_command, enable_delete_command)
6214 (delete_trace_variable_command): Update.
6215
04afa70c
TT
62162017-09-20 Tom Tromey <tom@tromey.com>
6217
6218 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6219 (bpstat_clear): Use delete.
6220 (bpstats): New constructors.
6221 (bpstat_copy, bpstat_stop_status): Use new.
6222 (dprintf_after_condition_true): Update.
6223 * breakpoint.h (bpstats::bpstats): Add constructors.
6224 (bpstats::~bpstats): Add destructor.
6225
c83833f4
PA
62262017-09-20 Pedro Alves <palves@redhat.com>
6227
6228 * eval.c (make_params): Delete, refactored as ...
6229 (class fake_method): ... this new type's ctor.
6230 (fake_method::~fake_method): New.
6231 (evaluate_subexp_standard): Use 'fake_method'.
6232
223ffa71
TT
62332017-09-20 Tom Tromey <tom@tromey.com>
6234
6235 * windows-nat.c (get_windows_debug_event, windows_wait)
6236 (do_initial_windows_stuff, windows_attach): Update.
6237 * utils.c (vwarning, internal_vproblem): Update.
6238 (ui_unregister_input_event_handler_cleanup)
6239 (prepare_to_handle_input): Remove.
6240 (class scoped_input_handler): New.
6241 (defaulted_query, prompt_for_continue): Update.
6242 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6243 Update.
6244 * top.c (undo_terminal_modifications_before_exit): Update.
6245 * target/target.h (target_terminal_init, target_terminal_inferior)
6246 (target_terminal_ours): Don't declare.
6247 (class target_terminal): New.
6248 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6249 (target_terminal_ours_for_output)
6250 (make_cleanup_restore_target_terminal): Don't declare.
6251 (target_terminal_info): Remove.
6252 * target.c (enum terminal_state, terminal_state): Remove.
6253 (target_terminal::terminal_state): Define.
6254 (target_terminal::init): Rename from target_terminal_init.
6255 (target_terminal::inferior): Rename from
6256 target_terminal_inferior.
6257 (target_terminal::ours): Rename from target_terminal_ours.
6258 (target_terminal::ours_for_output): Rename from
6259 target_terminal_ours_for_output.
6260 (target_terminal::info): New method.
6261 (cleanup_restore_target_terminal)
6262 (make_cleanup_restore_target_terminal): Remove.
6263 * solib.c (handle_solib_event): Update.
6264 * remote.c (remote_serial_quit_handler): Update.
6265 (remote_terminal_inferior, remote_wait_as): Update.
6266 * record-full.c (record_full_wait_1): Update.
6267 * nto-procfs.c (procfs_create_inferior): Update.
6268 * nat/fork-inferior.c (startup_inferior): Update.
6269 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6270 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6271 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6272 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6273 (mi_breakpoint_created, mi_breakpoint_deleted)
6274 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6275 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6276 (mi_user_selected_context_changed, report_initial_inferior):
6277 Update.
6278 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6279 (linux_nat_terminal_inferior): Update.
6280 * infrun.c (follow_fork_inferior)
6281 (handle_vfork_child_exec_or_exit, do_target_resume)
6282 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6283 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6284 Update.
6285 * inflow.c (child_terminal_init, info_terminal_command): Update.
6286 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6287 (attach_command): Update.
6288 * infcall.c (call_thread_fsm_should_stop): Update.
6289 * gnu-nat.c (gnu_attach): Update.
6290 * extension.c (struct active_ext_lang_state)
6291 (restore_active_ext_lang): Update.
6292 * exceptions.c (print_flush): Update.
6293 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6294 (struct quit_handler_cleanup_data, restore_quit_handler)
6295 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6296 Remove.
6297 * cp-support.c (gdb_demangle): Update.
6298 * breakpoint.c (update_inserted_breakpoint_locations)
6299 (insert_breakpoint_locations, handle_jit_event)
6300 (disable_breakpoints_in_unloaded_shlib): Update.
6301 * annotate.c (annotate_breakpoints_invalid)
6302 (annotate_frames_invalid): Update.
6303
013af3fc
TT
63042017-09-20 Tom Tromey <tom@tromey.com>
6305
6306 * main.c (catch_command_errors): Rename from
6307 catch_command_errors_const.
6308 (captured_main_1): Update.
6309
06871ae8
PA
63102017-09-20 Pedro Alves <palves@redhat.com>
6311
6312 * cli/cli-cmds.c (list_command): Use print_sal_location.
6313 (print_sal_location): New function.
6314 (ambiguous_line_spec): Use print_sal_location.
6315 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6316 * symtab.c (find_function_start_sal): Likewise.
6317 * symtab.h (symtab_and_line::symbol): New field.
6318
e5f25bc5
PA
63192017-09-20 Pedro Alves <palves@redhat.com>
6320
6321 * linespec.c (minsym_found): Handle non-text minsyms.
6322 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6323
1b7fa39e
WT
63242017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6325
6326 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6327 backslash.
6328
37dd0825
WT
63292017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6330
6331 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6332 vmovups instead vmovaps.
6333 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6334
4e5a4f58
JB
63352017-09-19 John Baldwin <jhb@FreeBSD.org>
6336
6337 * NEWS (Changes since GDB 8.0): Add starti.
6338 * infcmd.c (enum run_break): New.
6339 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6340 case.
6341 (run_command): Use enum run_how.
6342 (start_command): Likewise.
6343 (starti_command): New function.
6344 (RUN_ARGS_HELP): New macro.
6345 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6346 commands. Add starti command.
6347
aa70c9f1
YQ
63482017-09-19 Yao Qi <yao.qi@linaro.org>
6349
6350 * Makefile.in (monitor.o): Remove the rule.
6351
d6541620
YQ
63522017-09-19 Yao Qi <yao.qi@linaro.org>
6353
6354 * annotate.h (struct annotate_arg_emitter): Use
6355 DISABLE_COPY_AND_ASSIGN.
6356 * common/refcounted-object.h (refcounted_object): Likewise.
6357 * completer.h (struct completion_result): Likewise.
6358 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6359 * filename-seen-cache.h (filename_seen_cache): Likewise.
6360 * gdbcore.h (thread_section_name): Likewise.
6361 * gdb_regex.h (compiled_regex): Likewise.
6362 * gdbthread.h (scoped_restore_current_thread): Likewise.
6363 * inferior.h (scoped_restore_current_inferior): Likewise.
6364 * jit.c (jit_reader): Likewise.
6365 * linespec.h (struct linespec_result): Likewise.
6366 * mi/mi-parse.h (struct mi_parse): Likewise.
6367 * nat/fork-inferior.c (execv_argv): Likewise.
6368 * progspace.h (scoped_restore_current_program_space): Likewise.
6369 * python/python-internal.h (class gdbpy_enter): Likewise.
6370 * regcache.h (regcache): Likewise.
6371 * target-descriptions.c (struct tdesc_reg): Likewise.
6372 (struct tdesc_type): Likewise.
6373 (struct tdesc_feature): Likewise.
6374 * ui-out.h (ui_out_emit_type): Likewise.
6375
0615127c
SM
63762017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6377
6378 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6379 label abort_expression.
6380
5e187554
SM
63812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6382
6383 * common/buffer.c (buffer_xml_printf): Adjust.
6384 * common/xml-utils.c (xml_escape_text): Change return type to
6385 std::string, update code accordingly.
6386 * common/xml-utils.h (xml_escape_text): Change return type to
6387 std::string.
6388 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6389 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6390 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6391 Adjust.
6392
c3d7b541
SM
63932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6394
6395 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6396 (SUBDIR_UNITTESTS_OBS): Add new object file.
6397 * unittests/xml-utils-selftests.c: New file.
6398
1526853e
SM
63992017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6400
6401 * common/selftest.h (selftest): New struct/interface.
6402 (register_test): Add name parameter, add new overload.
6403 (run_tests): Add filter parameter.
6404 (for_each_selftest_ftype): New typedef.
6405 (for_each_selftest): New declaration.
6406 * common/selftest.c (tests): Change type to
6407 map<string, unique_ptr<selftest>>.
6408 (simple_selftest): New struct.
6409 (register_test): New function.
6410 (register_test): Add name parameter and use it.
6411 (run_tests): Add filter parameter and use it. Add prints.
6412 Adjust to vector -> map change.
6413 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6414 registering selftests.
6415 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6416 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6417 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6418 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6419 * findvar.c (_initialize_findvar): Likewise.
6420 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6421 * maint.c (maintenance_selftest): Update call to run_tests.
6422 (maintenance_info_selftests): New function.
6423 (_initialize_maint_cmds): Register "maintenance info selftests"
6424 command. Update "maintenance selftest" doc.
6425 * regcache.c (_initialize_regcache): Add names when registering
6426 selftests.
6427 * rust-exp.y (_initialize_rust_exp): Likewise.
6428 * selftest-arch.c (gdbarch_selftest): New struct.
6429 (gdbarch_tests): Remove.
6430 (register_test_foreach_arch): Add name parameter. Call
6431 register_test.
6432 (tests_with_arch): Remove, move most content to
6433 gdbarch_selftest::operator().
6434 (_initialize_selftests_foreach_arch): Remove.
6435 * selftest-arch.h (register_test_foreach_arch): Add name
6436 parameter.
6437 (run_tests_with_arch): New declaration.
6438 * utils-selftests.c (_initialize_utils_selftests): Add names
6439 when registering selftests.
6440 * utils.c (_initialize_utils): Likewise.
6441 * unittests/array-view-selftests.c
6442 (_initialize_array_view_selftests): Likewise.
6443 * unittests/environ-selftests.c (_initialize_environ_selftests):
6444 Likewise.
6445 * unittests/function-view-selftests.c
6446 (_initialize_function_view_selftests): Likewise.
6447 * unittests/offset-type-selftests.c
6448 (_initialize_offset_type_selftests): Likewise.
6449 * unittests/optional-selftests.c
6450 (_initialize_optional_selftests): Likewise.
6451 * unittests/scoped_restore-selftests.c
6452 (_initialize_scoped_restore_selftests): Likewise.
6453 * NEWS: Document "maintenance selftest" and "maint info
6454 selftests".
6455
5846367a
SM
64562017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6457
6458 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6459 scoped_restore.
6460
bd77e8ff
SM
64612017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6462
6463 * mi/mi-main.c (mi_load_progress): Make uiout variable
6464 a unique_ptr.
6465
26a67918
PA
64662017-09-15 Pedro Alves <palves@redhat.com>
6467
6468 * compile/compile-c-types.c (convert_enum, convert_int)
6469 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6470
3f8a7804
SM
64712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6472
6473 * dwarf2read.c (copy_string): Remove.
6474 (parse_macro_definition): Replace copy_string with savestring.
6475
8d200706
YQ
64762017-09-15 Yao Qi <yao.qi@linaro.org>
6477
6478 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6479 gdb_target_obs.
6480 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6481 Likewise.
6482 (i[34567]86-*-linux*): Likewise.
6483
d185219d
SM
64842017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6485
6486 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6487 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6488 <stack>: Change type to std::vector.
6489 <stack_len, stack_allocated>: Remove.
6490 <grow_stack>: Remove.
6491 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6492 (dwarf_expr_context::~dwarf_expr_context): Remove.
6493 (dwarf_expr_context::grow_stack): Remove.
6494 (dwarf_expr_context::push): Adjust.
6495 (dwarf_expr_context::pop): Adjust.
6496 (dwarf_expr_context::fetch): Adjust.
6497 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6498 (dwarf_expr_context::stack_empty_p): Adjust.
6499 (dwarf_expr_context::execute_stack_op): Adjust.
6500
eccd80d6
SM
65012017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6502
6503 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6504 return type to bool.
6505 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6506
69009882
SM
65072017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6508
6509 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6510 Change type to bool.
6511 (dwarf_stack_value) <in_stack_memory>: Likewise.
6512 (dwarf_expr_context) <push_address>: Change parameter type to
6513 bool.
6514 <fetch_in_stack_memory>: Change return type to bool.
6515 <push>: Change parameter type to bool.
6516 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6517 to bool.
6518 (dwarf_expr_context::push_address): Likewise.
6519 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6520 to bool.
6521 (dwarf_expr_context::execute_stack_op): Adjust.
6522 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6523
1e467161
SM
65242017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6525
6526 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6527 (struct dwarf_expr_context) <n_pieces>: Remove.
6528 <pieces>: Change type to std::vector.
6529 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6530 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6531 pieces.
6532 (dwarf_expr_context::add_piece): Adjust.
6533 * dwarf2loc.c (struct piece_closure): Initialize fields.
6534 <n_pieces>: Remove.
6535 <pieces>: Change type to std::vector.
6536 (allocate_piece_closure): Adjust, change parameter to
6537 std::vector rvalue and std::move it to piece_closure.
6538 (rw_pieced_value): Adjust.
6539 (check_pieced_synthetic_pointer): Adjust.
6540 (indirect_synthetic_pointer): Adjust.
6541 (coerce_pieced_ref): Adjust.
6542 (free_pieced_value_closure): Adjust. Use delete to free
6543 piece_closure.
6544 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6545 to allocate_piece_closure.
6546 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6547
0782db84
SM
65482017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6549
6550 * probe.h (probe_ops_cp): Remove typedef.
6551 (DEF_VEC_P (probe_ops_cp)): Remove.
6552 (all_probe_ops): Change type to std::vector.
6553 * probe.c (info_probes_for_ops): Adjust to vector change.
6554 (probe_linespec_to_ops): Likewise.
6555 (all_probe_ops): Change type to std::vector.
6556 (_initialize_probe): Adjust to vector change.
6557 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6558 * elfread.c (elf_get_probes): Likewise.
6559 * stap-probe.c (_initialize_stap_probe): Likewise.
6560
1eac6bea
SM
65612017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6562
6563 * probe.h (struct bound_probe): Define constructors.
6564 * probe.c (bound_probe_s): Remove typedef.
6565 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6566 (collect_probes): Change return type to std::vector, remove
6567 cleanup.
6568 (compare_probes): Return bool, change parameter type. Change
6569 semantic to "less than".
6570 (gen_ui_out_table_header_info): Change parameter to std::vector
6571 and update.
6572 (exists_probe_with_pops): Likewise.
6573 (info_probes_for_ops): Update to std::vector change.
6574 (enable_probes_command): Likewise.
6575 (disable_probes_command): Likewise.
6576
aaa63a31
SM
65772017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6578
6579 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6580 vec to std::vector.
6581 * probe.c (parse_probes_in_pspace): Update.
6582 (find_probes_in_objfile): Update.
6583 (find_probe_by_pc): Update.
6584 (collect_probes): Update.
6585 (probe_any_get_probes): Update.
6586 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6587 return type to reference to std::vector.
6588 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6589 std::vector and update.
6590 (dtrace_process_dof): Likewise.
6591 (dtrace_get_probes): Likewise.
6592 * elfread.c (elf_get_probes): Change return type to std::vector,
6593 store an std::vector in bfd_data.
6594 (probe_key_free): Update to std::vector.
6595 * stap-probe.c (handle_stap_probe): Change parameter to
6596 std::vector and update.
6597 (stap_get_probes): Likewise.
6598 * symfile-debug.c (debug_sym_get_probes): Change return type to
6599 std::vector and update.
6600
cb85b21b
TT
66012017-09-11 Tom Tromey <tom@tromey.com>
6602
6603 * breakpoint.c (program_breakpoint_here_p): Update.
6604 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6605 from make_show_memory_breakpoints_cleanup. Return a
6606 scoped_restore_tmpl<int>.
6607 (restore_show_memory_breakpoints): Remove.
6608 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6609 * mem-break.c (memory_validate_breakpoint): Update.
6610 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6611 (ia64_memory_remove_breakpoint): Update.
6612 (ia64_breakpoint_from_pc): Update.
6613 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6614 from make_show_memory_breakpoints_cleanup.
6615
8fbc99ef
TT
66162017-09-11 Tom Tromey <tom@tromey.com>
6617
6618 * d-namespace.c (d_lookup_symbol): Use std::string.
6619 (find_symbol_in_baseclass): Likewise.
6620
50feb4bd
TT
66212017-09-11 Tom Tromey <tom@tromey.com>
6622
6623 * ctf.c (ctf_start): Use std::string.
6624
c6dc63a1
TT
66252017-09-11 Tom Tromey <tom@tromey.com>
6626
6627 * ada-lang.c (is_known_support_routine): Update.
6628 (ada_unhandled_exception_name_addr_from_raise): Update.
6629 * guile/scm-frame.c (gdbscm_frame_name): Update.
6630 * python/py-frame.c (frapy_name): Update.
6631 (frapy_function): Update.
6632 * stack.h (find_frame_funname): Update.
6633 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6634 (print_frame): Update.
6635
d6b9b80f
TT
66362017-09-11 Tom Tromey <tom@tromey.com>
6637
6638 * findcmd.c (put_bits): Take a gdb::byte_vector.
6639 (parse_find_args): Return gdb::byte_vector. "args" now const.
6640 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6641 cleanups.
6642 (find_command): Update.
6643
a9921622
TT
66442017-09-11 Tom Tromey <tom@tromey.com>
6645
6646 * cli/cli-script.c (class scoped_restore_hook_in): New.
6647 (clear_hook_in_cleanup): Remove.
6648 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6649 scoped_restore_hook_in.
6650
be0d7abb
TT
66512017-09-11 Tom Tromey <tom@tromey.com>
6652
6653 * cli/cli-script.c (restore_interp): Remove.
6654 (read_command_lines): Use scoped_restore_interp.
6655 * interps.c (scoped_restore_interp::set_temp): Rename from
6656 interp_set_temp.
6657 * interps.h (class scoped_restore_interp): New.
6658 (interp_set_temp): Remove.
6659
00f675ff
TT
66602017-09-11 Tom Tromey <tom@tromey.com>
6661
6662 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6663 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6664 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6665 scoped_restore.
6666 (mi_cmd_break_insert_1): Update.
6667 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6668 scoped_restore.
6669
cb791d59
TT
66702017-09-11 Tom Tromey <tom@tromey.com>
6671
6672 * demangle.c (demangle_command): Update.
6673 * breakpoint.c (disable_command): Update.
6674 (enable_command): Update.
6675 (find_location_by_number): Make "number" const. Use
6676 get_number_trailer.
6677 * cli/cli-utils.c (extract_arg): Return std::string.
6678 * probe.c (parse_probe_linespec): Update. Change types.
6679 (collect_probes): Take string arguments.
6680 (parse_probe_linespec): Likewise.
6681 (info_probes_for_ops): Update.
6682 (enable_probes_command): Update.
6683 (disable_probes_command): Update.
6684 * break-catch-sig.c (catch_signal_split_args): Update.
6685 * mi/mi-parse.c (mi_parse): Update.
6686
2039bd9f
TT
66872017-09-11 Tom Tromey <tom@tromey.com>
6688
6689 * language.h (language_enum): Make argument const.
6690 * language.c (language_enum): Make argument const.
6691
f1735a53
TT
66922017-09-11 Tom Tromey <tom@tromey.com>
6693
6694 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6695 as function.
6696 (skip_to_space): Rename from skip_to_space_const.
6697 * common/common-utils.c (skip_to_space): New function.
6698 (skip_to_space): Rename from skip_to_space_const.
6699 * cli/cli-utils.h (get_number): Rename from get_number_const.
6700 (extract_arg): Rename from extract_arg_const.
6701 * cli/cli-utils.c (get_number): Rename from get_number_const.
6702 (extract_arg): Rename from extract_arg_const.
6703 (number_or_range_parser::get_number): Use ::get_number.
6704 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6705 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6706 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6707 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6708 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6709 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6710 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6711 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6712
7d221d74
TT
67132017-09-11 Tom Tromey <tom@tromey.com>
6714
6715 * python/python.c (do_start_initialization): Use
6716 py-event-types.def to initialize types.
6717 Define all object type structures.
6718 * python/python-internal.h: Don't declare event initialization
6719 functions.
6720 * python/py-threadevent.c (thread_event_object_type): Don't
6721 define.
6722 * python/py-stopevent.c (stop_event_object_type): Don't define.
6723 * python/py-signalevent.c (signal_event_object_type): Don't
6724 declare or define.
6725 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6726 (clear_objfiles_event_object_type): Don't declare or define.
6727 * python/py-infevents.c (inferior_call_pre_event_object_type)
6728 (inferior_call_post_event_object_type)
6729 (register_changed_event_object_type)
6730 (memory_changed_event_object_type): Don't declare or define.
6731 * python/py-inferior.c (new_thread_event_object_type)
6732 (new_inferior_event_object_type)
6733 (inferior_deleted_event_object_type): Don't declare or define.
6734 * python/py-exitedevent.c (exited_event_object_type): Don't
6735 declare or define.
6736 * python/py-evts.c (gdbpy_initialize_py_events): Use
6737 py-all-events.def.
6738 * python/py-events.h (thread_event_object_type): Don't declare.
6739 (events_object): Use py-all-events.def.
6740 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6741 py-event-types.def.
6742 * python/py-event-types.def: New file.
6743 * python/py-continueevent.c (create_continue_event_object): Don't
6744 declare or define.
6745 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6746 declare or define.
6747 * python/py-all-events.def: New file.
6748
35c61a1d
TT
67492017-09-11 Tom Tromey <tom@tromey.com>
6750
6751 * python/py-threadevent.c (create_thread_event_object): Return
6752 gdbpy_ref.
6753 * python/py-stopevent.h (create_stop_event_object)
6754 (create_breakpoint_event_object, create_signal_event_object):
6755 Update.
6756 * python/py-stopevent.c (create_stop_event_object): Return
6757 gdbpy_ref.
6758 (emit_stop_event): Update.
6759 * python/py-signalevent.c (create_signal_event_object): Return
6760 gdbpy_ref.
6761 * python/py-infevents.c (create_inferior_call_event_object):
6762 Update.
6763 * python/py-event.h (create_event_object)
6764 (create_thread_event_object): Update.
6765 * python/py-event.c (create_event_object): Return gdbpy_ref.
6766 * python/py-continueevent.c: Return gdbpy_ref.
6767 * python/py-bpevent.c (create_breakpoint_event_object): Return
6768 gdbpy_ref.
6769
7c96f8c1
TT
67702017-09-11 Tom Tromey <tom@tromey.com>
6771
6772 PR python/15622:
6773 * NEWS: Add entry.
6774 * python/python.c (do_start_initialization): Initialize new event
6775 types.
6776 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6777 (gdbpy_initialize_inferior_deleted_event)
6778 (gdbpy_initialize_new_thread_event): Declare.
6779 * python/py-threadevent.c (create_thread_event_object): Add option
6780 "thread" parameter.
6781 * python/py-inferior.c (new_thread_event_object_type)
6782 (new_inferior_event_object_type)
6783 (inferior_deleted_event_object_type): Declare.
6784 (python_new_inferior, python_inferior_deleted): New functions.
6785 (add_thread_object): Emit new_thread event.
6786 (gdbpy_initialize_inferior): Attach new functions to corresponding
6787 observers.
6788 (new_thread, new_inferior, inferior_deleted): Define new event
6789 types.
6790 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6791 registries.
6792 * python/py-events.h (events_object) <new_inferior,
6793 inferior_deleted, new_thread>: New fields.
6794 * python/py-event.h (create_thread_event_breakpoint): Add optional
6795 "thread" parameter.
6796
72542b8e
AB
67972017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6798
6799 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6800 check current_ui instead.
6801 (internal_vproblem): Likewise.
6802
0d64823e
SM
68032017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6804
6805 * thread.c (print_thread_info_1): Remove unnecessary calls to
6806 uiout->is_mi_like_p.
6807
eb1e02fd
TT
68082017-09-09 Tom Tromey <tom@tromey.com>
6809
6810 * namespace.h (add_using_directive): Update.
6811 * namespace.c (add_using_directive): Change type of excludes to
6812 std::vector.
6813 * dwarf2read.c (read_import_statement): Use std::vector.
6814 (read_namespace): Update.
6815 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6816
0fc21fd8
TT
68172017-09-09 Tom Tromey <tom@tromey.com>
6818
6819 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6820
49663d05
TT
68212017-09-09 Tom Tromey <tom@tromey.com>
6822
6823 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6824
0b868b60
TT
68252017-09-09 Tom Tromey <tom@tromey.com>
6826
6827 * stack.c (func_command): Use gdb::def_vector.
6828
c0470d48
TT
68292017-09-09 Tom Tromey <tom@tromey.com>
6830
6831 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6832 ui_out_emit_list, ui_out_emit_tuple.
6833 (mi_cmd_var_update): Likewise.
6834
ca5909c7
TT
68352017-09-09 Tom Tromey <tom@tromey.com>
6836
6837 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6838 ui_out_redirect_pop.
6839 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6840 ui_out_redirect_pop.
6841 * utils.c (do_ui_out_redirect_pop)
6842 (make_cleanup_ui_out_redirect_pop): Remove.
6843 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6844 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6845 * ui-out.h (ui_out_redirect_pop): New class.
6846
e6a2252a
TT
68472017-09-09 Tom Tromey <tom@tromey.com>
6848
6849 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6850 (list_available_thread_groups, mi_cmd_list_thread_groups)
6851 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6852 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6853 Likewise.
6854
393702cd
TT
68552017-09-09 Tom Tromey <tom@tromey.com>
6856
6857 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6858 ui_out_emit_tuple.
6859
76f9c9cf
TT
68602017-09-09 Tom Tromey <tom@tromey.com>
6861
6862 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6863 * stack.c (print_frame): Use ui_out_emit_tuple.
6864 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6865 (info_spu_mailbox_command, info_spu_dma_command)
6866 (info_spu_proxydma_command): Likewise.
6867 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6868 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6869 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6870 ui_out_emit_tuple.
6871 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6872
dc9fe180
TT
68732017-09-09 Tom Tromey <tom@tromey.com>
6874
6875 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6876 (class ui_out_emit_table): Update comment.
6877 * ui-out.c (do_cleanup_table_end)
6878 (make_cleanup_ui_out_table_begin_end): Remove.
6879 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6880 (info_spu_dma_cmdlist): Likewise.
6881 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6882 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6883 ui_out_emit_table.
6884
f8cc3da6
TT
68852017-09-09 Tom Tromey <tom@tromey.com>
6886
6887 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6888 ui_out_emit_list, gdb::optional.
6889
481695ed
JB
68902017-09-09 John Baldwin <jhb@FreeBSD.org>
6891
6892 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6893 prototype.
6894 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6895 prototype.
6896 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6897 prototype.
6898 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6899 * ada-exp.y: Remove _initialize_ada_exp prototype.
6900 * ada-lang.c: Remove _initialize_ada_language prototype.
6901 * ada-tasks.c: Remove _initialize_tasks prototype.
6902 * addrmap.c: Remove _initialize_addrmap prototype.
6903 * agent.c: Remove _initialize_agent prototype.
6904 * aix-thread.c: Remove _initialize_aix_thread prototype.
6905 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6906 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6907 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6908 prototype.
6909 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6910 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6911 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6912 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6913 prototype.
6914 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6915 prototype.
6916 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6917 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6918 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6919 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6920 prototype.
6921 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6922 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6923 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6924 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6925 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6926 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6927 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6928 prototype.
6929 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6930 prototype.
6931 * annotate.c: Remove _initialize_annotate prototype.
6932 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6933 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6934 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6935 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6936 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6937 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6938 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6939 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6940 prototype.
6941 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6942 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6943 * auto-load.c: Remove _initialize_auto_load prototype.
6944 * auxv.c: Remove _initialize_auxv prototype.
6945 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6946 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6947 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6948 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6949 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6950 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6951 prototype.
6952 * break-catch-throw.c: Remove _initialize_break_catch_throw
6953 prototype.
6954 * breakpoint.c: Remove _initialize_breakpoint prototype.
6955 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6956 * btrace.c: Remove _initialize_btrace prototype.
6957 * charset.c: Remove _initialize_charset prototype.
6958 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6959 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6960 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6961 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6962 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6963 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6964 * coffread.c: Remove _initialize_coffread prototype.
6965 * compile/compile.c: Remove _initialize_compile prototype.
6966 * complaints.c: Remove _initialize_complaints prototype.
6967 * completer.c: Remove _initialize_completer prototype.
6968 * copying.awk: Remove _initialize_copying prototype.
6969 * copying.c: Regenerate.
6970 * core-regset.c: Remove _initialize_core_regset prototype.
6971 * corefile.c: Remove _initialize_core prototype.
6972 * corelow.c: Remove _initialize_corelow prototype.
6973 * cp-abi.c: Remove _initialize_cp_abi prototype.
6974 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6975 * cp-support.c: Remove _initialize_cp_support prototype.
6976 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6977 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6978 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6979 * ctf.c: Remove _initialize_ctf prototype.
6980 * d-lang.c: Remove _initialize_d_language prototype.
6981 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6982 prototype.
6983 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6984 * dbxread.c: Remove _initialize_dbxread prototype.
6985 * dcache.c: Remove _initialize_dcache prototype.
6986 * demangle.c: Remove _initialize_demangler prototype.
6987 * disasm-selftests.c: Remove _initialize_disasm_selftests
6988 prototype.
6989 * disasm.c: Remove _initialize_disasm prototype.
6990 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6991 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6992 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6993 prototype.
6994 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6995 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6996 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6997 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6998 * elfread.c: Remove _initialize_elfread prototype.
6999 * exec.c: Remove _initialize_exec prototype.
7000 * extension.c: Remove _initialize_extension prototype.
7001 * f-lang.c: Remove _initialize_f_language prototype.
7002 * f-valprint.c: Remove _initialize_f_valprint prototype.
7003 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7004 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7005 * filesystem.c: Remove _initialize_filesystem prototype.
7006 * findcmd.c: Remove _initialize_mem_search prototype.
7007 * fork-child.c: Remove _initialize_fork_child prototype.
7008 * frame-base.c: Remove _initialize_frame_base prototype.
7009 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7010 * frame.c: Remove _initialize_frame prototype.
7011 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7012 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7013 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7014 * gcore.c: Remove _initialize_gcore prototype.
7015 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7016 * gdbarch.c: Regenerate.
7017 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7018 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7019 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7020 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7021 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7022 * go-lang.c: Remove _initialize_go_language prototype.
7023 * go32-nat.c: Remove _initialize_go32_nat prototype.
7024 * guile/guile.c: Remove _initialize_guile prototype.
7025 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7026 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7027 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7028 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7029 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7030 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7031 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7032 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7033 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7034 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7035 prototype.
7036 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7037 prototype.
7038 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7039 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7040 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7041 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7042 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7043 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7044 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7045 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7046 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7047 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7048 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7049 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7050 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7051 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7052 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7053 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7054 prototype.
7055 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7056 prototype.
7057 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7058 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7059 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7060 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7061 * infcall.c: Remove _initialize_infcall prototype.
7062 * infcmd.c: Remove _initialize_infcmd prototype.
7063 * inferior.c: Remove _initialize_inferiors prototype.
7064 * inflow.c: Remove _initialize_inflow prototype.
7065 * infrun.c: Remove _initialize_infrun prototype.
7066 * interps.c: Remove _initialize_interpreter prototype.
7067 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7068 * jit.c: Remove _initialize_jit prototype.
7069 * language.c: Remove _initialize_language prototype.
7070 * linux-fork.c: Remove _initialize_linux_fork prototype.
7071 * linux-nat.c: Remove _initialize_linux_nat prototype.
7072 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7073 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7074 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7075 * m2-lang.c: Remove _initialize_m2_language prototype.
7076 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7077 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7078 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7079 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7080 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7081 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7082 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7083 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7084 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7085 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7086 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7087 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7088 * machoread.c: Remove _initialize_machoread prototype.
7089 * macrocmd.c: Remove _initialize_macrocmd prototype.
7090 * macroscope.c: Remove _initialize_macroscope prototype.
7091 * maint.c: Remove _initialize_maint_cmds prototype.
7092 * mdebugread.c: Remove _initialize_mdebugread prototype.
7093 * memattr.c: Remove _initialize_mem prototype.
7094 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7095 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7096 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7097 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7098 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7099 * microblaze-linux-tdep.c: Remove
7100 _initialize_microblaze_linux_tdep prototype.
7101 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7102 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7103 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7104 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7105 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7106 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7107 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7108 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7109 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7110 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7111 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7112 prototype.
7113 * mipsread.c: Remove _initialize_mipsread prototype.
7114 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7115 prototype.
7116 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7117 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7118 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7119 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7120 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7121 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7122 prototype.
7123 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7124 * nto-procfs.c: Remove _initialize_procfs prototype.
7125 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7126 * objc-lang.c: Remove _initialize_objc_language prototype.
7127 * objfiles.c: Remove _initialize_objfiles prototype.
7128 * observer.c: Remove observer_test_first_notification_function,
7129 observer_test_second_notification_function,
7130 observer_test_third_notification_function, and
7131 _initialize_observer prototypes.
7132 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7133 * osabi.c: Remove _initialize_gdb_osabi prototype.
7134 * osdata.c: Remove _initialize_osdata prototype.
7135 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7136 * parse.c: Remove _initialize_parse prototype.
7137 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7138 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7139 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7140 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7141 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7142 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7143 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7144 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7145 * printcmd.c: Remove _initialize_printcmd prototype.
7146 * probe.c: Remove _initialize_probe prototype.
7147 * proc-api.c: Remove _initialize_proc_api prototype.
7148 * proc-events.c: Remove _initialize_proc_events prototype.
7149 * proc-service.c: Remove _initialize_proc_service prototype.
7150 * procfs.c: Remove _initialize_procfs prototype.
7151 * psymtab.c: Remove _initialize_psymtab prototype.
7152 * python/python.c: Remove _initialize_python prototype.
7153 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7154 * record-btrace.c: Remove _initialize_record_btrace prototype.
7155 * record-full.c: Remove _initialize_record_full prototype.
7156 * record.c: Remove _initialize_record prototype.
7157 * regcache.c: Remove _initialize_regcache prototype.
7158 * reggroups.c: Remove _initialize_reggroup prototype.
7159 * remote-notif.c: Remove _initialize_notif prototype.
7160 * remote-sim.c: Remove _initialize_remote_sim prototype.
7161 * remote.c: Remove _initialize_remote prototype.
7162 * reverse.c: Remove _initialize_reverse prototype.
7163 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7164 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7165 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7166 prototype.
7167 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7168 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7169 * rust-exp.y: Remove _initialize_rust_exp prototype.
7170 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7171 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7172 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7173 * score-tdep.c: Remove _initialize_score_tdep prototype.
7174 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7175 prototype.
7176 * ser-go32.c: Remove _initialize_ser_dos prototype.
7177 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7178 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7179 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7180 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7181 * serial.c: Remove _initialize_serial prototype.
7182 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7183 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7184 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7185 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7186 * skip.c: Remove _initialize_step_skip prototype.
7187 * sol-thread.c: Remove _initialize_sol_thread prototype.
7188 * solib-aix.c: Remove _initialize_solib_aix prototype.
7189 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7190 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7191 * solib-frv.c: Remove _initialize_frv_solib prototype.
7192 * solib-spu.c: Remove _initialize_spu_solib prototype.
7193 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7194 * solib-target.c: Remove _initialize_solib_target prototype.
7195 * solib.c: Remove _initialize_solib prototype.
7196 * source.c: Remove _initialize_source prototype.
7197 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7198 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7199 prototype.
7200 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7201 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7202 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7203 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7204 prototype.
7205 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7206 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7207 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7208 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7209 prototype.
7210 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7211 prototype.
7212 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7213 prototype.
7214 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7215 prototype.
7216 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7217 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7218 prototype.
7219 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7220 prototype.
7221 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7222 prototype.
7223 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7224 prototype.
7225 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7226 prototype.
7227 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7228 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7229 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7230 * stabsread.c: Remove _initialize_stabsread prototype.
7231 * stack.c: Remove _initialize_stack prototype.
7232 * stap-probe.c: Remove _initialize_stap_probe prototype.
7233 * std-regs.c: Remove _initialize_frame_reg prototype.
7234 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7235 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7236 * symfile.c: Remove _initialize_symfile prototype.
7237 * symmisc.c: Remove _initialize_symmisc prototype.
7238 * symtab.c: Remove _initialize_symtab prototype.
7239 * target-dcache.c: Remove _initialize_target_dcache prototype.
7240 * target-descriptions.c: Remove _initialize_target_descriptions
7241 prototype.
7242 * thread.c: Remove _initialize_thread prototype.
7243 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7244 prototype.
7245 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7246 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7247 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7248 prototype.
7249 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7250 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7251 * tracefile.c: Remove _initialize_tracefile prototype.
7252 * tracepoint.c: Remove _initialize_tracepoint prototype.
7253 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7254 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7255 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7256 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7257 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7258 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7259 * tui/tui.c: Remove _initialize_tui prototype.
7260 * typeprint.c: Remove _initialize_typeprint prototype.
7261 * user-regs.c: Remove _initialize_user_regs prototype.
7262 * utils.c: Remove _initialize_utils prototype.
7263 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7264 * valarith.c: Remove _initialize_valarith prototype.
7265 * valops.c: Remove _initialize_valops prototype.
7266 * valprint.c: Remove _initialize_valprint prototype.
7267 * value.c: Remove _initialize_values prototype.
7268 * varobj.c: Remove _initialize_varobj prototype.
7269 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7270 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7271 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7272 * windows-nat.c: Remove _initialize_windows_nat,
7273 _initialize_check_for_gdb_ini, and _initialize_loadable
7274 prototypes.
7275 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7276 * xcoffread.c: Remove _initialize_xcoffread prototype.
7277 * xml-support.c: Remove _initialize_xml_support prototype.
7278 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7279 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7280 prototype.
7281 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7282 prototype.
7283 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7284
a611b5cb
KS
72852017-09-08 Keith Seitz <keiths@redhat.com>
7286
7287 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7288 field.
7289
469412dd
CW
72902017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7291
7292 * f-valprint.c (f_val_print): Remove check for one byte
7293 sized integers. Remove printing of character type.
7294
a5ad232b
FP
72952017-09-08 Frank Penczek <frank.penczek@intel.com>
7296 Christoph Weinmann <christoph.t.weinmann@intel.com>
7297 Bernhard Heckel <bernhard.heckel@intel.com>
7298
7299 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7300 to maintain proper indentation when printing pointers/refs.
7301
e5014227
JB
73022017-09-07 Joel Brobecker <brobecker@adacore.com>
7303
7304 GDB 8.0.1 released.
7305
63c99141
JB
73062017-09-07 Joel Brobecker <brobecker@adacore.com>
7307
7308 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7309
69c1e056
TT
73102017-09-05 Tom Tromey <tom@tromey.com>
7311
7312 * parse.c (funcall_chain): Now a std::vector.
7313 (start_arglist, end_arglist): Simplify.
7314 (free_funcalls): Remove.
7315 (parse_exp_in_context_1): Remove cleanup.
7316
fef704bf
TT
73172017-09-05 Tom Tromey <tom@tromey.com>
7318
7319 * go-exp.y (go_parse): Don't create a cleanup.
7320
5613c585
TT
73212017-09-05 Tom Tromey <tom@tromey.com>
7322
7323 * d-exp.y (PrimaryExpression): Use std::string.
7324 (d_parse): Don't create a cleanup.
7325
eae49211
TT
73262017-09-05 Tom Tromey <tom@tromey.com>
7327
7328 * utils.c (do_clear_parser_state): Remove.
7329 (make_cleanup_clear_parser_state): Remove.
7330 * p-exp.y (pascal_parse): Use scoped_restore.
7331 * m2-exp.y (m2_parse): Use scoped_restore.
7332 * f-exp.y (f_parse): Use scoped_restore.
7333 * d-exp.y (d_parse): Use scoped_restore.
7334 * c-exp.y (c_parse): Use scoped_restore.
7335 * ada-exp.y (ada_parse): Use scoped_restore.
7336 * utils.h (make_cleanup_clear_parser_state): Remove.
7337
73b9be8b
KS
73382017-09-06 Keith Seitz <keiths@redhat.com>
7339
7340 * dwarf2read.c (dw2_linkage_name_attr): New function.
7341 (dw2_linkage_name): New function.
7342 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7343 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7344 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7345
a102602b
KR
73462017-09-06 Kamil Rytarowski <n54@gmx.com>
7347
7348 * config/djgpp/djconfig.sh: Correct shell portability issue.
7349
28ad437d
KR
73502017-09-06 Kamil Rytarowski <n54@gmx.com>
7351
7352 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7353
351787dd
JB
73542017-09-06 John Baldwin <jhb@FreeBSD.org>
7355
7356 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7357 * NEWS: Mention new FreeBSD/mips native configuration.
7358 * configure.host: Add aarch64*-*-freebsd*.
7359 * configure.nat: Likewise.
7360 * aarch64-fbsd-nat.c: New file.
7361
c0f84956
JB
73622017-09-06 John Baldwin <jhb@FreeBSD.org>
7363
7364 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7365 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7366 * NEWS: Mention new FreeBSD/aarch64 target.
7367 * configure.tgt: Add aarch64*-*-freebsd*.
7368 * aarch64-fbsd-tdep.c: New file.
7369 * aarch64-fbsd-tdep.h: New file.
7370
7610297a
KR
73712017-09-06 Kamil Rytarowski <n54@gmx.com>
7372
7373 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7374
fbd1b771
JK
73752017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7376
7377 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7378 of TLS symbols.
7379
5ca79eae
PW
73802017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7381
7382 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7383 call.
7384
bf93d7ba
SM
73852017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7386
7387 * infrun.c (follow_exec): Call add_thread after
7388 target_find_description.
7389
1bb7c059
SM
73902017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7391
7392 * infrun.c (handle_inferior_event_1): When exec'ing, read
7393 stop_pc after follow_exec.
7394
fc809827
SM
73952017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7396
7397 * remote.c (process_g_packet): Update error message.
7398
d2fcdd85
YQ
73992017-09-05 Yao Qi <yao.qi@linaro.org>
7400
7401 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7402 targets.
7403
e69570ee
PA
74042017-09-05 Pedro Alves <palves@redhat.com>
7405
7406 * eval.c (eval_call, evaluate_funcall): New functions, factored
7407 out from ...
7408 (evaluate_subexp_standard): ... this.
7409
22916b07
YQ
74102017-09-05 Yao Qi <yao.qi@linaro.org>
7411
7412 * amd64-tdep.c (amd64_target_description): Create target
7413 descriptions.
7414 (_initialize_amd64_tdep): Don't call functions
7415 initialize_tdesc_amd64_*. Add self tests.
7416 * arch/amd64.c (amd64_create_target_description): Add parameter
7417 is_linux. Call set_tdesc_osabi if is_linux is true.
7418 * arch/amd64.h (amd64_create_target_description): Update the
7419 declaration.
7420 * arch/i386.c (i386_create_target_description): Add parameter
7421 is_linux. Call set_tdesc_osabi if is_linux is true.
7422 * arch/i386.h (i386_create_target_description): Update
7423 declaration.
7424 * configure.tgt: Add i386.o to gdb_target_obs.
7425 * features/Makefile (XMLTOC): Remove i386/*.xml.
7426 * features/i386/amd64-avx-avx512.c: Remove.
7427 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7428 * features/i386/amd64-avx-mpx.c: Remove.
7429 * features/i386/amd64-avx.c: Remove.
7430 * features/i386/amd64-mpx.c: Remove.
7431 * features/i386/amd64.c: Remove.
7432 * features/i386/i386-avx-avx512.c: Remove.
7433 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7434 * features/i386/i386-avx-mpx.c: Remove.
7435 * features/i386/i386-avx.c: Remove.
7436 * features/i386/i386-mmx.c: Remove.
7437 * features/i386/i386-mpx.c: Remove.
7438 * features/i386/i386.c: Remove.
7439 * i386-tdep.c: Don't include features/i386/i386*.c., include
7440 target-descriptions.h and arch/i386.h.
7441 (i386_target_description): Create target descriptions.
7442 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7443 functions. Do self tests.
7444
0854b7b1
YQ
74452017-09-05 Yao Qi <yao.qi@linaro.org>
7446
7447 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7448 * features/i386/amd64-avx-avx512-linux.c: Removed.
7449 * features/i386/amd64-avx-linux.c: Removed.
7450 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7451 * features/i386/amd64-avx-mpx-linux.c: Removed.
7452 * features/i386/amd64-linux.c: Removed.
7453 * features/i386/amd64-mpx-linux.c: Removed.
7454 * features/i386/x32-avx-avx512-linux.c: Removed.
7455 * features/i386/x32-avx-linux.c: Removed.
7456 * features/i386/x32-linux.c: Removed.
7457
b4570e4b
YQ
74582017-09-05 Yao Qi <yao.qi@linaro.org>
7459
7460 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7461 features/i386/*.c.
7462 (amd64_linux_read_description): Call
7463 amd64_create_target_description.
7464 * arch/amd64.c: New file.
7465 * arch/amd64.h: New file.
7466 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7467 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7468
6c73f67f
YQ
74692017-09-05 Yao Qi <yao.qi@linaro.org>
7470
7471 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7472 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7473 (amd64_linux_read_description): Create target descriptions.
7474 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7475 functions. Add unit tests.
7476 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7477 x32-core.xml.
7478 * features/i386/64bit-avx.c: Generated.
7479 * features/i386/64bit-avx512.c: Generated.
7480 * features/i386/64bit-core.c: Generated.
7481 * features/i386/64bit-linux.c: Generated.
7482 * features/i386/64bit-mpx.c: Generated.
7483 * features/i386/64bit-pkeys.c: Generated.
7484 * features/i386/64bit-segments.c: Generated.
7485 * features/i386/64bit-sse.c: Generated.
7486 * features/i386/x32-core.c: Generated.
7487 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7488 c files for amd64-linux and x32-linux.
7489
9d3d478b
YQ
74902017-09-05 Yao Qi <yao.qi@linaro.org>
7491
7492 * amd64-linux-tdep.c (amd64_linux_read_description): New
7493 function.
7494 (amd64_linux_core_read_description): Call
7495 amd64_linux_read_description.
7496 (amd64_linux_init_abi): Likewise.
7497 (amd64_x32_linux_init_abi): Likewise.
7498 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7499 * x86-linux-nat.c (x86_linux_read_description): Call
7500 amd64_linux_read_description.
7501
b9f1d50f
YQ
75022017-09-05 Yao Qi <yao.qi@linaro.org>
7503
7504 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7505 comments.
7506
188c9e6d
YQ
75072017-09-05 Yao Qi <yao.qi@linaro.org>
7508
7509 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7510 * features/i386/i386-avx-avx512-linux.c: Remove.
7511 * features/i386/i386-avx-linux.c: Remove.
7512 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7513 * features/i386/i386-avx-mpx-linux.c: Remove.
7514 * features/i386/i386-linux.c: Remove.
7515 * features/i386/i386-mmx-linux.c: Remove.
7516 * features/i386/i386-mpx-linux.c: Remove.
7517
5f035c07
YQ
75182017-09-05 Yao Qi <yao.qi@linaro.org>
7519
7520 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7521 (SFILES): Add arch/i386.c.
7522 (HFILES_NO_SRCDIR): Add arch/i386.h.
7523 * arch/i386.c: New file.
7524 * arch/i386.h: New file.
7525 * arch/tdesc.h (allocate_target_description): Declare.
7526 (set_tdesc_architecture): Declare.
7527 (set_tdesc_osabi): Declare.
7528 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7529 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7530 include arch/i386.h.
7531 (i386_linux_read_description): Remove code and call
7532 i386_create_target_description.
7533 (set_tdesc_architecture): New function.
7534 (set_tdesc_osabi): New function.
7535 * target-descriptions.h (allocate_target_description): Remove.
7536
0abe8a89
YQ
75372017-09-05 Yao Qi <yao.qi@linaro.org>
7538
7539 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7540 * target-descriptions.c (tdesc_create_feature): Likewise, and
7541 adjust code.
7542 * features/i386/32bit-avx.c: Re-generated.
7543 * features/i386/32bit-avx512.c: Re-generated.
7544 * features/i386/32bit-core.c: Re-generated.
7545 * features/i386/32bit-linux.c: Re-generated.
7546 * features/i386/32bit-mpx.c: Re-generated.
7547 * features/i386/32bit-pkeys.c: Re-generated.
7548 * features/i386/32bit-sse.c: Re-generated.
7549
0a188386
YQ
75502017-09-05 Yao Qi <yao.qi@linaro.org>
7551
7552 * regformats/regdef.h (struct reg): Override operator == and !=.
7553
f49ff000
YQ
75542017-09-05 Yao Qi <yao.qi@linaro.org>
7555
7556 * arch/tdesc.h: New file.
7557 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7558 * target-descriptions.c: Update comments.
7559 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7560 declarations.
7561 * features/i386/32bit-avx.c: Re-generated.
7562 * features/i386/32bit-avx512.c: Re-generated.
7563 * features/i386/32bit-core.c: Re-generated.
7564 * features/i386/32bit-linux.c: Re-generated.
7565 * features/i386/32bit-mpx.c: Re-generated.
7566 * features/i386/32bit-pkeys.c: Re-generated.
7567 * features/i386/32bit-sse.c: Re-generated.
7568
f7000548
YQ
75692017-09-05 Yao Qi <yao.qi@linaro.org>
7570
7571 * regformats/regdat.sh: Update generated code.
7572
c9a5e2a5
YQ
75732017-09-05 Yao Qi <yao.qi@linaro.org>
7574
7575 * regformats/regdat.sh: Adjust code order.
7576
d6b687ac
SM
75772017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7578
7579 * expprint.c (dump_subexp_body_standard): Use constant format
7580 string in fprintf_filtered call.
7581
a379bfd0
JB
75822017-09-04 John Baldwin <jhb@FreeBSD.org>
7583
7584 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7585 NetBSD/i386.
7586 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7587
f7efc967
JB
75882017-09-04 John Baldwin <jhb@FreeBSD.org>
7589
7590 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7591
c49fbc6c
JB
75922017-09-04 John Baldwin <jhb@FreeBSD.org>
7593
7594 * bsd-kvm.o: Define _KMEMUSER.
7595 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7596 * configure: Regenerate.
7597
26562e73
JB
75982017-09-04 John Baldwin <jhb@FreeBSD.org>
7599
7600 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7601 * i386-fbsd-nat.c: Likewise.
7602
31cf1487
JB
76032017-09-04 John Baldwin <jhb@FreeBSD.org>
7604
7605 * unittests/array-view-selftests.c: Add include of <array>.
7606
5b9f8a7c
JB
76072017-09-04 John Baldwin <jhb@FreeBSD.org>
7608
7609 * spu-tdep.c (flush_ea_cache): Add missing argument to
7610 call_function_by_hand.
7611
d69cf9b2
PA
76122017-09-04 Pedro Alves <palves@redhat.com>
7613
7614 * NEWS (Safer support for debugging with no debug info): New.
7615
3693fdb3
PA
76162017-09-04 Pedro Alves <palves@redhat.com>
7617
7618 * c-exp.y (function_method, function_method_void): Add current
7619 instance flags to TYPE_INSTANCE.
7620 * dwarf2read.c (check_modifier): New.
7621 (compute_delayed_physnames): Assert that only C++ adds delayed
7622 physnames. Mark fn_fields as const/volatile depending on
7623 physname.
7624 * eval.c (make_params): New type_instance_flags parameter. Use
7625 it as the new type's instance flags.
7626 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7627 flags element and pass it to make_params.
7628 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7629 instance flags element.
7630 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7631 * gdbtypes.h: Include "enum-flags.h".
7632 (type_instance_flags): New enum-flags type.
7633 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7634 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7635 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7636 (follow_type_instance_flags): New function.
7637 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7638 * parser-defs.h (follow_type_instance_flags): Declare.
7639 * valops.c (value_struct_elt_for_reference): const/volatile must
7640 match too.
7641
e68cb8e0
PA
76422017-09-04 Pedro Alves <palves@redhat.com>
7643
7644 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7645 function/method scopes; lookup the nested name as a function local
7646 static variable.
7647
858be34c
PA
76482017-09-04 Pedro Alves <palves@redhat.com>
7649
7650 (%type <voidval>): Add function_method.
7651 * c-exp.y (exp): New production for calls with no arguments.
7652 (function_method, function_method_void_or_typelist): New
7653 productions.
7654 (exp): New production for "method()::static_var".
7655 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7656 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7657 Handle OP_FUNC_STATIC_VAR.
7658 * parse.c (operator_length_standard):
7659 Handle OP_FUNC_STATIC_VAR.
7660
dd5901a6
PA
76612017-09-04 Pedro Alves <palves@redhat.com>
7662
7663 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7664 handling.
7665 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7666 Ditto.
7667 * parse.c (operator_length_standard, operator_check_standard):
7668 Ditto.
7669 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7670
46a4882b
PA
76712017-09-04 Pedro Alves <palves@redhat.com>
7672
7673 * ax-gdb.c: Include "typeprint.h".
7674 (gen_expr_for_cast): New function.
7675 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7676 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7677 type is unknown.
7678 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7679 nodebug_data_symbol.
7680 * eval.c: Include "typeprint.h".
7681 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7682 Error out if symbol has unknown type.
7683 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7684 evaluate_subexp_for_cast.
7685 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7686 OP_VAR_MSYM_VALUE.
7687 (evaluate_subexp_for_cast): New function.
7688 * gdbtypes.c (init_nodebug_var_type): New function.
7689 (objfile_type): Use it to initialize types of variables with no
7690 debug info.
7691 * typeprint.c (error_unknown_type): New.
7692 * typeprint.h (error_unknown_type): New declaration.
7693 * compile/compile-c-types.c (convert_type_basic): Handle
7694 TYPE_CODE_ERROR; warn and fallback to int for variables with
7695 unknown type.
7696
fe13dfec
PA
76972017-09-04 Pedro Alves <palves@redhat.com>
7698
7699 * eval.c (evaluate_var_value): New function, factored out from ...
7700 (evaluate_subexp_standard): ... here.
7701
d008ee21
PA
77022017-09-04 Pedro Alves <palves@redhat.com>
7703
7704 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7705 Remove useless assignments to 'op'.
7706
827d0c51
PA
77072017-09-04 Pedro Alves <palves@redhat.com>
7708
7709 * eval.c (eval_skip_value): New function.
7710 (evaluate_subexp_standard): Use it.
7711
2c5a2be1
PA
77122017-09-04 Pedro Alves <palves@redhat.com>
7713
7714 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7715 function name from symbol/minsym and pass it to
7716 error_call_unknown_return_type.
7717
74ea4be4
PA
77182017-09-04 Pedro Alves <palves@redhat.com>
7719
7720 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7721 * ax-gdb.c (gen_msym_var_ref): New function.
7722 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7723 * eval.c (evaluate_var_msym_value): New function.
7724 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7725 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7726 to call_function_by_hand.
7727 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7728 Handle OP_VAR_MSYM_VALUE.
7729 (union exp_element) <msymbol>: New field.
7730 * minsyms.h (struct type): Forward declare.
7731 (find_minsym_type_and_address): Declare.
7732 * parse.c (write_exp_elt_msym): New function.
7733 (write_exp_msymbol): Delete, refactored as ...
7734 (find_minsym_type_and_address): ... this new function.
7735 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7736 (operator_length_standard, operator_check_standard): Handle
7737 OP_VAR_MSYM_VALUE.
7738 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7739
7022349d
PA
77402017-09-04 Pedro Alves <palves@redhat.com>
7741
7742 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7743 TYPE_GNU_IFUNC specially here. Throw error if return type is
7744 unknown.
7745 * ada-typeprint.c (print_func_type): Handle functions with unknown
7746 return type.
7747 * c-typeprint.c (c_type_print_base): Handle functions and methods
7748 with unknown return type.
7749 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7750 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7751 * compile/compile-c-types.c: Include "objfiles.h".
7752 (convert_func): For functions with unknown return type, warn and
7753 default to int.
7754 * compile/compile-object-run.c (compile_object_run): Adjust call
7755 to call_function_by_hand_dummy.
7756 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7757 call_function_by_hand.
7758 * eval.c (evaluate_subexp_standard): Adjust calls to
7759 call_function_by_hand. Handle functions and methods with unknown
7760 return type. Pass expect_type to call_function_by_hand.
7761 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7762 return type.
7763 * gcore.c (call_target_sbrk): Adjust call to
7764 call_function_by_hand.
7765 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7766 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7767 an integer address type instead of nodebug.
7768 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7769 call_function_by_hand.
7770 * infcall.c (error_call_unknown_return_type): New function.
7771 (call_function_by_hand): New "default_return_type" parameter.
7772 Pass it down.
7773 (call_function_by_hand_dummy): New "default_return_type"
7774 parameter. Use it instead of defaulting to int. If there's no
7775 default and the return type is unknown, throw an error. If
7776 there's a default return type, and the called function has no
7777 debug info, then assume the function is prototyped.
7778 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7779 New "default_return_type" parameter.
7780 (error_call_unknown_return_type): New declaration.
7781 * linux-fork.c (call_lseek): Cast return type of lseek.
7782 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7783 call_function_by_hand.
7784 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7785 calls to call_function_by_hand.
7786 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7787 return type.
7788 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7789 (value_nsstring, print_object_command): Adjust calls to
7790 call_function_by_hand.
7791 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7792 functions with unknown return type.
7793 (pascal_type_print_func_varspec_suffix): New function.
7794 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7795 TYPE_CODE_METHOD>: Use it.
7796 * python/py-value.c (valpy_call): Adjust call to
7797 call_function_by_hand.
7798 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7799 call_function_by_hand.
7800 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7801 call_function_by_hand.
7802 * valops.c (value_allocate_space_in_inferior): Adjust call to
7803 call_function_by_hand.
7804 * typeprint.c (type_print_unknown_return_type): New function.
7805 * typeprint.h (type_print_unknown_return_type): New declaration.
7806
54990598
PA
78072017-09-04 Pedro Alves <palves@redhat.com>
7808
7809 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7810 types with more than one parameter as prototyped.
7811
9a24775b
PA
78122017-09-04 Pedro Alves <palves@redhat.com>
7813
7814 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7815 (disassemble_command): Use gdb_disassembly_flags instead of bare
7816 int.
7817 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7818 (dump_insns, do_mixed_source_and_assembly_deprecated)
7819 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7820 Use gdb_disassembly_flags instead of bare int.
7821 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7822 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7823 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7824 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7825 (enum gdb_disassembly_flag): ... values of this new enumeration.
7826 (gdb_disassembly_flags): Define.
7827 (gdb_disassembly)
7828 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7829 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7830 gdb_disassembly_flags instead of bare int.
7831 * record-btrace.c (btrace_insn_history)
7832 (record_btrace_insn_history, record_btrace_insn_history_range)
7833 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7834 instead of bare int.
7835 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7836 Use gdb_disassembly_flags instead of bare int.
7837 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7838 Define.
7839 * target-delegates.c: Regenerate.
7840 * target.c (target_insn_history, target_insn_history_from)
7841 (target_insn_history_range): Use gdb_disassembly_flags instead of
7842 bare int.
7843 * target.h: Include "disasm.h".
7844 (struct target_ops) <to_insn_history, to_insn_history_from,
7845 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7846 int.
7847 (target_insn_history, target_insn_history_from)
7848 (target_insn_history_range): Use gdb_disassembly_flags instead of
7849 bare int.
7850
80a65e9b
SM
78512017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7852
7853 * cli/cli-script.c (build_command_line): For if/while commands,
7854 check whether args is empty.
7855
6b66338c
SM
78562017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7857
7858 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7859 (enum command_control_type): Likewise.
7860 (struct command_line): Likewise.
7861 (free_command_lines): Likewise.
7862 (struct command_lines_deleter): Likewise.
7863 (command_line_up): Likewise.
7864 (read_command_lines): Likewise.
7865 (read_command_lines_1): Likewise.
7866 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7867 (enum command_control_type): Likewise.
7868 (struct command_line): Likewise.
7869 (free_command_lines): Likewise.
7870 (struct command_lines_deleter): Likewise.
7871 (command_line_up): Likewise.
7872 (read_command_lines): Likewise.
7873 (read_command_lines_1): Likewise.
7874 * breakpoint.h: Include cli/cli-script.h.
7875 * extension-priv.h: Likewise.
7876 * gdbcmd.h: Likewise.
7877
51abb421
PA
78782017-09-04 Pedro Alves <palves@redhat.com>
7879
7880 * ada-lang.c (is_known_support_routine): Move sal declaration to
7881 where it is initialized.
7882 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7883 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7884 (clear_command, update_static_tracepoint): Remove init_sal
7885 references. Move declarations closer to initializations.
7886 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7887 initializations.
7888 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7889 references. Move sal declarations closer to initializations.
7890 * frame.c (find_frame_sal): Return a symtab_and_line via function
7891 return instead of output parameter. Remove init_sal references.
7892 * frame.h (find_frame_sal): Return a symtab_and_line via function
7893 return instead of output parameter.
7894 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7895 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7896 instead of memset.
7897 (gdbscm_find_pc_line): Remove init_sal reference.
7898 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7899 references. Move declarations closer to initializations.
7900 * infcmd.c (set_step_frame): Update. Move declarations closer to
7901 initializations.
7902 (finish_backward): Remove init_sal references. Move declarations
7903 closer to initializations.
7904 * infrun.c (process_event_stop_test, handle_step_into_function)
7905 (insert_hp_step_resume_breakpoint_at_frame)
7906 (insert_step_resume_breakpoint_at_caller): Likewise.
7907 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7908 (symbol_to_sal): Likewise.
7909 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7910 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7911 to its initialization.
7912 * reverse.c (save_bookmark_command): Use new/delete. Remove
7913 init_sal references. Move declarations closer to initializations.
7914 * source.c (get_current_source_symtab_and_line): Remove brace
7915 initialization.
7916 (set_current_source_symtab_and_line): Now takes the sal by const
7917 reference. Remove brace initialization.
7918 (line_info): Remove init_sal reference.
7919 * source.h (set_current_source_symtab_and_line): Now takes a
7920 symtab_and_line via const reference.
7921 * stack.c (set_current_sal_from_frame): Adjust.
7922 (print_frame_info): Adjust.
7923 (get_last_displayed_sal): Return the sal via function return
7924 instead of via output parameter. Simplify.
7925 (frame_info): Adjust.
7926 * stack.h (get_last_displayed_sal): Return the sal via function
7927 return instead of via output parameter.
7928 * symtab.c (init_sal): Delete.
7929 (find_pc_sect_line): Remove init_sal references. Move
7930 declarations closer to initializations.
7931 (find_function_start_sal): Remove init_sal references. Move
7932 declarations closer to initializations.
7933 * symtab.h (struct symtab_and_line): In-class initialize all
7934 fields.
7935 * tracepoint.c (set_traceframe_context)
7936 (print_one_static_tracepoint_marker): Remove init_sal references.
7937 Move declarations closer to initializations.
7938 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7939 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7940 declarations closer to initializations.
7941 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7942 init_sal references. Adjust.
7943
6c5b2ebe
PA
79442017-09-04 Pedro Alves <palves@redhat.com>
7945
7946 * ax-gdb.c (agent_command_1): Use range-for.
7947 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7948 * breakpoint.c: Include "common/array-view.h".
7949 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7950 parameter from struct symtabs_and_lines to
7951 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7952 (breakpoint_sals_to_pc): Change sals parameter from struct
7953 symtabs_and_lines to std::vector reference.
7954 (check_fast_tracepoint_sals): Change sals parameter from struct
7955 symtabs_and_lines to std::array_view. Use range-for.
7956 (decode_static_tracepoint_spec): Return a std::vector instead of
7957 symtabs_and_lines. Update.
7958 (create_breakpoint): Update.
7959 (break_range_command, until_break_command, clear_command): Update.
7960 (base_breakpoint_decode_location, bkpt_decode_location)
7961 (bkpt_probe_create_sals_from_location)
7962 (bkpt_probe_decode_location, tracepoint_decode_location)
7963 (tracepoint_probe_decode_location)
7964 (strace_marker_create_sals_from_location): Return a std::vector
7965 instead of symtabs_and_lines.
7966 (strace_marker_create_breakpoints_sal): Update.
7967 (strace_marker_decode_location): Return a std::vector instead of
7968 symtabs_and_lines. Update.
7969 (update_breakpoint_locations): Change struct symtabs_and_lines
7970 parameters to gdb::array_view. Adjust.
7971 (location_to_sals): Return a std::vector instead of
7972 symtabs_and_lines. Update.
7973 (breakpoint_re_set_default): Use std::vector instead of struct
7974 symtabs_and_lines.
7975 (decode_location_default): Return a std::vector instead of
7976 symtabs_and_lines. Update.
7977 * breakpoint.h: Include "common/array-view.h".
7978 (struct breakpoint_ops) <decode_location>: Now returns a
7979 std::vector instead of returning a symtabs_and_lines via output
7980 parameter.
7981 (update_breakpoint_locations): Change sals parameters to use
7982 gdb::array_view.
7983 * cli/cli-cmds.c (edit_command, list_command): Update to use
7984 std::vector and gdb::array_view.
7985 (ambiguous_line_spec): Adjust to use gdb::array_view and
7986 range-for.
7987 (compare_symtabs): Rename to ...
7988 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7989 const reference and adjust.
7990 (filter_sals): Rewrite using std::vector and standard algorithms.
7991 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7992 (jump_command): Update to use std::vector.
7993 * linespec.c (struct linespec_state) <canonical_names>: Update
7994 comment.
7995 (add_sal_to_sals_basic): Delete.
7996 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7997 (decode_line_2, create_sals_line_offset)
7998 (convert_address_location_to_sals, convert_linespec_to_sals)
7999 (convert_explicit_location_to_sals, parse_linespec)
8000 (event_location_to_sals, decode_line_full, decode_line_1)
8001 (decode_line_with_current_source)
8002 (decode_line_with_last_displayed, decode_objc)
8003 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8004 (linespec_result::~linespec_result): Adjust to use std::vector
8005 instead of symtabs_and_lines.
8006 * linespec.h (linespec_sals::sals): Now a std::vector.
8007 (struct linespec_result): Use std::vector, bool, and in-class
8008 initialization.
8009 (decode_line_1, decode_line_with_current_source)
8010 (decode_line_with_last_displayed): Return std::vector.
8011 * macrocmd.c (info_macros_command): Use std::vector.
8012 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8013 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8014 std::vector.
8015 * probe.h (parse_probes): Return a std::vector.
8016 * python/python.c (gdbpy_decode_line): Use std::vector and
8017 gdb::array_view.
8018 * source.c (select_source_symtab, line_info): Use std::vector.
8019 * stack.c (func_command): Use std::vector.
8020 * symtab.h (struct symtabs_and_lines): Delete.
8021 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8022
7c44b49c
PA
80232017-09-04 Pedro Alves <palves@redhat.com>
8024
8025 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8026 unittests/array-view-selftests.c.
8027 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8028 * common/array-view.h: New file.
8029 * unittests/array-view-selftests.c: New file.
8030
e439fa14
PA
80312017-09-04 Pedro Alves <palves@redhat.com>
8032
8033 * cli/cli-cmds.c (edit_command): Pass message to
8034 ambiguous_line_spec.
8035 (list_command): Pass message to ambiguous_line_spec. Say
8036 "first"/"last" instead of "start" and "end" to be consistent with
8037 the manual.
8038 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8039 them to print formatted message.
8040
7525b645
PA
80412017-09-04 Pedro Alves <palves@redhat.com>
8042
8043 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8044 ftrace_update_insns by reference instead of pointer.
8045
badc0020
YQ
80462017-09-04 Yao Qi <yao.qi@linaro.org>
8047
8048 * i386-go32-tdep.c: Include x86-xstate.h.
8049 (i386_go32_init_abi): Call i386_target_description.
8050 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8051 if xcr0 is X86_XSTATE_X87_MASK.
8052 * i386-tdep.h (tdesc_i386): Remove the declaration.
8053 (tdesc_i386_mmx): Likewise.
8054
d78bdb54
YQ
80552017-09-04 Yao Qi <yao.qi@linaro.org>
8056
8057 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8058 X86_XSTATE_SSE_MASK instead of 0.
8059
ca1fa5ee
YQ
80602017-09-04 Yao Qi <yao.qi@linaro.org>
8061
8062 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8063 i386_target_description.
8064 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8065 i386_target_description.
8066 * i386-tdep.c (i386_gdbarch_init): Likewise.
8067
2434b019
YQ
80682017-09-04 Yao Qi <yao.qi@linaro.org>
8069
8070 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8071 (x86_darwin_init_abi_64): Call amd64_target_description.
8072 * amd64-dicos-tdep.c: Likewise.
8073 * amd64-fbsd-nat.c: Likewise.
8074 * amd64-fbsd-tdep.c: Likewise.
8075 * amd64-nbsd-tdep.c: Likewise.
8076 * amd64-obsd-tdep.c: Likewise.
8077 * amd64-sol2-tdep.c: Likewise.
8078 * amd64-windows-tdep.c: Likewise.
8079 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8080
0860c437
SM
80812017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8082
8083 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8084 (btrace_function) <insn>: Change type to use std::vector.
8085 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8086 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8087 ftrace_update_insns, ftrace_compute_global_level_offset,
8088 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8089 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8090 change to std::vector.
8091 (ftrace_update_insns): Adjust to change to std::vector, change
8092 type of INSN parameter.
8093 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8094 * record-btrace.c (btrace_call_history_insn_range,
8095 btrace_compute_src_line_range,
8096 record_btrace_frame_prev_register): Adjust to change to
8097 std::vector.
8098 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8099 to change to std::vector.
8100
0638b7f9
TT
81012017-09-03 Tom Tromey <tom@tromey.com>
8102
8103 * corefile.c (reopen_exec_file): Use std::string.
8104
8f84fb0e
TT
81052017-09-03 Tom Tromey <tom@tromey.com>
8106
8107 * compile/compile.c (compile_register_name_mangled): Return
8108 std::string.
8109 * compile/compile-loc2c.c (pushf_register_address): Update.
8110 (pushf_register): Update.
8111 * compile/compile-c-types.c (convert_array): Update.
8112 * compile/compile-c-symbols.c (generate_vla_size): Update.
8113 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8114 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8115 (convert_one_symbol): Update.
8116 (generate_c_for_for_one_variable): Update.
8117 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8118 std::string.
8119 (generate_register_struct): Update.
8120 * compile/compile-internal.h (c_get_range_decl_name): Return a
8121 std::string.
8122 (compile_register_name_mangled): Return std::string.
8123
18e9961f
TT
81242017-09-03 Tom Tromey <tom@tromey.com>
8125
8126 * utils.c (perror_string): Return a std::string.
8127 (throw_perror_with_name, perror_warning_with_name): Update.
8128
45343786
TT
81292017-09-03 Tom Tromey <tom@tromey.com>
8130
8131 * demangle.c (demangle_command): Use std::string,
8132 unique_xmalloc_ptr.
8133
b57af503
TT
81342017-09-03 Tom Tromey <tom@tromey.com>
8135
8136 * cli/cli-setshow.c (do_set_command): Use std::string.
8137
6eecf35f
TT
81382017-09-03 Tom Tromey <tom@tromey.com>
8139
8140 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8141
56496dd4
TT
81422017-09-03 Tom Tromey <tom@tromey.com>
8143
8144 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8145
e91a1fa7
TT
81462017-09-03 Tom Tromey <tom@tromey.com>
8147
8148 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8149 gdb::unique_xmalloc_ptr.
8150
7ffd83d7
TT
81512017-09-03 Tom Tromey <tom@tromey.com>
8152
8153 * thread.c (print_thread_info_1): Use string_printf.
8154 (thread_apply_command, thread_apply_all_command): Use
8155 std::string.
8156
1ccbe998
TT
81572017-09-03 Tom Tromey <tom@tromey.com>
8158
8159 * valprint.c (val_print_string): Update.
8160 * gdbcore.h (memory_error_message): Return std::string.
8161 * corefile.c (memory_error_message): Return std::string.
8162 (memory_error): Update.
8163 * breakpoint.c (insert_bp_location): Update.
8164
23fdd69e
SM
81652017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8166
8167 * target/waitstatus.h (target_waitstatus_to_string): Change
8168 return type to std::string.
8169 * target/waitstatus.c (target_waitstatus_to_string): Return
8170 std::string.
8171 * target.h (target_waitstatus_to_string): Remove declaration.
8172 * infrun.c (resume, clear_proceed_status_thread,
8173 print_target_wait_results, do_target_wait, save_waitstatus,
8174 stop_all_threads): Adjust.
8175 * record-btrace.c (record_btrace_wait): Adjust.
8176 * target-debug.h
8177 (target_debug_print_struct_target_waitstatus_p): Adjust.
8178
5c811d30
JK
81792017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8180
8181 PR gdb/22046
8182 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8183 detection.
8184
0a2dde4a
SDJ
81852017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8186
8187 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8188 for setting/unsetting environment variables on the remote target.
8189 (New remote packets): Add entries for QEnvironmentHexEncoded,
8190 QEnvironmentUnset and QEnvironmentReset.
8191 * common/environ.c (gdb_environ::operator=): Extend method to
8192 handle m_user_set_env_list and m_user_unset_env_list.
8193 (gdb_environ::clear): Likewise.
8194 (match_var_in_string): Change type of first parameter from 'char
8195 *' to 'const char *'.
8196 (gdb_environ::set): Extend method to handle
8197 m_user_set_env_list and m_user_unset_env_list.
8198 (gdb_environ::unset): Likewise.
8199 (gdb_environ::clear_user_set_env): New method.
8200 (gdb_environ::user_set_envp): Likewise.
8201 (gdb_environ::user_unset_envp): Likewise.
8202 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8203 m_user_unset_env_list on move constructor/assignment.
8204 (unset): Add new default parameter 'update_unset_list = true'.
8205 (clear_user_set_env): New method.
8206 (user_set_envp): Likewise.
8207 (user_unset_envp): Likewise.
8208 (m_user_set_env_list): New std::set.
8209 (m_user_unset_env_list): Likewise.
8210 * common/rsp-low.c (hex2str): New function.
8211 (bin2hex): New overload for bin2hex function.
8212 * common/rsp-low.c (hex2str): New prototype.
8213 (str2hex): New overload prototype.
8214 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8215 QEnvironmentUnset and QEnvironmentReset.
8216 (remote_protocol_features): Add QEnvironmentHexEncoded,
8217 QEnvironmentUnset and QEnvironmentReset packets.
8218 (send_environment_packet): New function.
8219 (extended_remote_environment_support): Likewise.
8220 (extended_remote_create_inferior): Call
8221 extended_remote_environment_support.
8222 (_initialize_remote): Add QEnvironmentHexEncoded,
8223 QEnvironmentUnset and QEnvironmentReset packet configs.
8224 * unittests/environ-selftests.c (gdb_selftest_env_var):
8225 New variable.
8226 (test_vector_initialization): New function.
8227 (test_init_from_host_environ): Likewise.
8228 (test_reinit_from_host_environ): Likewise.
8229 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8230 Likewise.
8231 (test_unset_set_empty_vector): Likewise.
8232 (test_vector_clear): Likewise.
8233 (test_std_move): Likewise.
8234 (test_move_constructor):
8235 (test_self_move): Likewise.
8236 (test_set_unset_reset): Likewise.
8237 (run_tests): Rewrite in terms of the functions above.
8238
654670a4
WP
82392017-08-31 Weimin Pan <weimin.pan@oracle.com>
8240
8241 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8242 (adi_available): Use a temp variable of type CORE_ADDR as argument
8243 3 when calling target_auxv_search.
8244 (adi_normalize_address): Use masks and xor operators to calculate
8245 normalized address.
8246 (adi_read_versions, adi_write_versions, adi_print_versions)
8247 (do_examine, do_assign): Use paddress.
8248
7755ddb7
JB
82492017-08-29 John Baldwin <jhb@FreeBSD.org>
8250
8251 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8252 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8253 out of loop and add supply of FIR.
8254 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8255 add collect of FIR.
8256
fd437cbc
SM
82572017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8258
3804a343 8259 PR gdb/21827
fd437cbc
SM
8260 * cli/cli-script.c (define_command): Don't convert command name
8261 to lower case.
8262
988f6b3d
JB
82632017-08-25 Joel Brobecker <brobecker@adacore.com>
8264
8265 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8266 Update all callers accordingly. Remove all code blocks handling
8267 the case where DISPP is not NULL.
8268
663c44ac
JK
82692017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8270
8271 PR symtab/22003
8272 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8273 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8274 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8275
f1902523
JK
82762017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8277
8278 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8279 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8280 (read_comp_units_from_section): New parameter abbrev_section, use
8281 read_and_check_comp_unit_head, allocate signatured_type if needed.
8282 (create_all_comp_units): Update read_comp_units_from_section caller.
8283
87215ad1
SDJ
82842017-08-23 Pedro Alves <palves@redhat.com>
8285
8286 PR remote/21852
8287 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8288 to null_ptid and switch to thread without reading the registers
8289 after adding the inferior.
8290
6e41ddec
JK
82912017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8292
8293 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8294 compile-gcc.
8295 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8296 (compile_to_object): Implement compile_gcc.
8297 (_initialize_compile): Install "set compile-gcc". Initialize
8298 compile_gcc.
8299
e68c32d5
JK
83002017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8301
8302 * compile/compile.c (compile_to_object): Conditionally call
8303 set_verbose. Conditionally call compile or compile_v0.
8304
58afddc6
WP
83052017-08-07 Weimin Pan <weimin.pan@oracle.com>
8306
8307 * sparc64-tdep.h: (adi_normalize_address): New export.
8308 * sparc-nat.h: (open_adi_tag_fd): New export.
8309 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8310 * sparc64-linux-tdep.c:
8311 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8312 (sparc64_linux_handle_segmentation_fault): New function.
8313 (sparc64_linux_init_abi): Register
8314 sparc64_linux_handle_segmentation_fault
8315 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8316 (sparc64_addr_bits_remove): New function.
8317 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8318 (MAX_PROC_NAME_SIZE): New macro.
8319 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8320 (sparc64adilist): New variable.
8321 (adi_proc_list): New variable.
8322 (find_adi_info): New function.
8323 (add_adi_info): New function.
8324 (get_adi_info_proc): New function.
8325 (get_adi_info): New function.
8326 (info_adi_command): New function.
8327 (read_maps_entry): New function.
8328 (adi_available): New function.
8329 (adi_normalize_address): New function.
8330 (adi_align_address): New function.
8331 (adi_convert_byte_count): New function.
8332 (adi_tag_fd): New function.
8333 (adi_is_addr_mapped): New function.
8334 (adi_read_versions): New function.
8335 (adi_write_versions): New function.
8336 (adi_print_versions): New function.
8337 (do_examine): New function.
8338 (do_assign): New function.
8339 (adi_examine_command): New function.
8340 (adi_assign_command): New function.
8341 (_initialize_sparc64_adi_tdep): New function.
8342
11db9430
SM
83432017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8344
8345 * breakpoint.c (breakpoints_info): Rename to ...
8346 (info_breakpoints_command): ... this.
8347 (watchpoints_info): Rename to ...
8348 (info_watchpoints_command): ... this.
8349 (tracepoints_info): Rename to ...
8350 (info_tracepoints_command): ... this.
8351 (_initialize_breakpoint): Adjust.
8352 * dcache.c (dcache_info): Rename to ...
8353 (info_display_command): ... this.
8354 (_initialize_dcache): Adjust.
8355 * frame.h (args_info): Rename to ...
8356 (info_args_command): ... this.
8357 (locals_info): Rename to ...
8358 (info_locals_command): ... this.
8359 * infcmd.c (nofp_registers_info): Rename to ...
8360 (info_registers_command): ... this.
8361 (float_info): Rename to ...
8362 (info_float_command): ... this.
8363 (program_info): Rename to ...
8364 (info_program_command): ... this.
8365 (all_registers_info): Rename to ...
8366 (info_all_registers_command): ... this.
8367 (vector_info): Rename to ...
8368 (info_vector_command): ... this.
8369 (float_info): Rename to ...
8370 (info_float_command): ... this.
8371 (_initialize_infcmd): Adjust.
8372 * inferior.h (term_info): Rename to ...
8373 (info_terminal_command): ... this.
8374 * inflow.c (term_info): Rename to ...
8375 (info_terminal_command): ... this.
8376 (_initialize_inflow): Adjust.
8377 * infrun.c (signals_info): Rename to ...
8378 (info_signals_command): ... this.
8379 (_initialize_infrun): Adjust.
8380 * objc-lang.c (classes_info): Rename to ...
8381 (info_classes_command): ... this.
8382 (selectors_info): Rename to ...
8383 (info_selectors_command): ... this.
8384 (_initialize_objc_language): Adjust.
8385 * printcmd.c (sym_info): Rename to ...
8386 (info_symbol_command): ... this.
8387 (address_info): Rename to ...
8388 (info_address_command): ... this.
8389 (display_info): Rename to ...
8390 (info_display_command): ... this.
8391 (_initialize_printcmd): Adjust.
8392 * reverse.c (bookmarks_info): Rename to ...
8393 (info_breakpoints_command): ... this.
8394 (_initialize_reverse): Adjust.
8395 * ser-go32.c (dos_info): Rename to ...
8396 (info_serial_command): ... this.
8397 (_initialize_ser_dos): Adjust.
8398 * skip.c (skip_info): Rename to ...
8399 (info_skip_command): ... this.
8400 (_initialize_step_skip): Adjust.
8401 * source.c (line_info): Rename to ...
8402 (info_line_command): ... this.
8403 (source_info): Rename to ...
8404 (info_source_command)
8405 * stack.c (frame_info): Rename to ...
8406 (info_frame_command): ... this.
8407 (locals_info): Rename to ...
8408 (info_locals_command): ... this.
8409 (args_info): Rename to ...
8410 (info_args_command): ... this.
8411 (_initialize_stack): Adjust.
8412 * symtab.c (sources_info): Rename to ...
8413 (info_sources_command): ... this.
8414 (variables_info): Rename to ...
8415 (info_variables_command): ... this.
8416 (functions_info): Rename to ...
8417 (info_functions_command): ... this.
8418 (types_info): Rename to ...
8419 (info_types_command): ... this.
8420 (_initialize_symtab): Adjust.
8421 * target.c (target_info): Rename to ...
8422 (info_target_command): ... this.
8423 (initialize_targets): Adjust.
8424 * tracepoint.c (tvariables_info): Rename to ...
8425 (info_tvariables_command): ... this.
8426 (scope_info): Rename to ...
8427 (info_scope_command): ... this.
8428 (trace_dump_actions): Adjust.
8429 (_initialize_tracepoint): Adjust.
8430
b270e6f9
TT
84312017-08-22 Tom Tromey <tom@tromey.com>
8432
8433 * breakpoint.h (install_breakpoint): Update.
8434 * breakpoint.c (add_solib_catchpoint): Update.
8435 (install_breakpoint): Change argument to a std::unique_ptr.
8436 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8437 (create_breakpoint_sal, create_breakpoint): Update.
8438 (watch_command_1, catch_exec_command_1)
8439 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8440 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8441 Return the breakpoint.
8442 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8443 (new_single_step_breakpoint): Update.
8444 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8445 std::unique_ptr.
8446 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8447 std::unique_ptr.
8448 * break-catch-sig.c (create_signal_catchpoint): Use
8449 std::unique_ptr.
8450 * ada-lang.c (create_ada_exception_catchpoint): Use
8451 std::unique_ptr.
8452
36bd8eaa
TT
84532017-08-22 Tom Tromey <tom@tromey.com>
8454
8455 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8456
56f37645
TT
84572017-08-22 Tom Tromey <tom@tromey.com>
8458
8459 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8460 (lookup_partial_symbol): Update.
8461
0b581c69
TT
84622017-08-22 Tom Tromey <tom@tromey.com>
8463
8464 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8465 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8466 (find_and_open_source, symtab_to_fullname): Update.
8467 * psymtab.c (psymtab_to_fullname): Update.
8468
14278e1f
TT
84692017-08-22 Tom Tromey <tom@tromey.com>
8470
8471 * exec.c (exec_file_attach): Update.
8472 * linux-thread-db.c (try_thread_db_load): Update.
8473 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8474 * utils.c (gdb_realpath): Change return type.
8475 (gdb_realpath_keepfile): Update.
8476 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8477 (_initialize_utils): Register the new self test.
8478 * source.c (openp): Update.
8479 (find_and_open_source): Update.
8480 * nto-tdep.c (nto_find_and_open_solib): Update.
8481 * main.c (set_gdb_data_directory): Update.
8482 (captured_main_1): Update.
8483 * dwarf2read.c (dwarf2_get_dwz_file): Update
8484 (dw2_map_symbol_filenames): Update.
8485 * auto-load.c (auto_load_safe_path_vec_update): Update.
8486 (filename_is_in_auto_load_safe_path_vec): Change type of
8487 "filename_realp".
8488 (auto_load_objfile_script): Update.
8489 (file_is_auto_load_safe): Update. Use std::string.
8490 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8491
4971c9a7
TT
84922017-08-22 Tom Tromey <tom@tromey.com>
8493
8494 * utils.c (gdb_realpath_keepfile): Return a
8495 gdb::unique_xmalloc_ptr.
8496 * exec.c (exec_file_attach): Update.
8497 * utils.h (gdb_realpath_keepfile): Return a
8498 gdb::unique_xmalloc_ptr.
8499
e3e41d58
TT
85002017-08-22 Tom Tromey <tom@tromey.com>
8501
8502 * compile/compile.c (compile_file_command): Use
8503 gdb::unique_xmalloc_ptr, std::string.
8504 * utils.c (gdb_abspath): Change return type.
8505 * source.c (openp): Update.
8506 * objfiles.c (allocate_objfile): Update.
8507 * main.c (set_gdb_data_directory): Update.
8508 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8509
0d999a6e
ZZ
85102017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8511
8512 * cli-cmds.c (list_commands): List actual code around more than
8513 one location.
8514
329d5e7e
JB
85152017-08-21 John Baldwin <jhb@FreeBSD.org>
8516
8517 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8518
bf223d3e
PA
85192017-08-21 Pedro Alves <palves@redhat.com>
8520
8521 PR gdb/19487
8522 * c-exp.y (variable production): Handle function aliases.
8523 * minsyms.c (msymbol_is_text): New function.
8524 * minsyms.h (msymbol_is_text): Declare.
8525 * symtab.c (find_function_alias_target): New function.
8526 * symtab.h (find_function_alias_target): Declare.
8527
c973d0aa
PA
85282017-08-21 Pedro Alves <palves@redhat.com>
8529
8530 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8531 typedefs.
8532 * typeprint.c (whatis_exp): If handling "whatis", and expression
8533 is OP_TYPE, strip one typedef level. Otherwise don't strip
8534 typedefs here.
8535 * valops.c (value_cast): Save "to" type before resolving
8536 stubs/typedefs. Use that type as resulting value's type.
8537
2989a365
TT
85382017-08-18 Tom Tromey <tom@tromey.com>
8539 Pedro Alves <palves@redhat.com>
8540
8541 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8542 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8543 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8544 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8545 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8546 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8547 (linux_get_siginfo_data): Add "thread" argument. Use
8548 scoped_restore.
8549 * linux-nat.c (linux_child_follow_fork)
8550 (check_stopped_by_watchpoint): Use scoped_restore.
8551 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8552 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8553 (restore_inferior_ptid, save_inferior_ptid): Remove.
8554 * btrace.c (btrace_fetch): Use scoped_restore.
8555 * bsd-uthread.c (bsd_uthread_fetch_registers)
8556 (bsd_uthread_store_registers): Use scoped_restore.
8557 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8558 scoped_restore.
8559 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8560 (aix_thread_xfer_partial): Use scoped_restore.
8561 * inferior.h (save_inferior_ptid): Remove.
8562
e60eb288
YQ
85632017-08-18 Yao Qi <yao.qi@linaro.org>
8564
8565 PR tdep/21818
8566 * arm-tdep.c (gdb_print_insn_arm): Mark
8567 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8568
6d580b63
YQ
85692017-08-18 Yao Qi <yao.qi@linaro.org>
8570
8571 * NEWS: Mention GDBserver's new option "--selftest".
8572 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8573 * selftest.c: Move it to common/selftest.c.
8574 * selftest.h: Move it to common/selftest.h.
8575 * selftest-arch.c (reset): New function.
8576 (tests_with_arch): Call reset.
8577
86dcbf50
YQ
85782017-08-18 Yao Qi <yao.qi@linaro.org>
8579
8580 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8581 instead of exception_fprintf and printf_filtered.
8582
7649770c
YQ
85832017-08-18 Yao Qi <yao.qi@linaro.org>
8584
8585 * selftest.c (register_self_test): Rename it to
8586 selftests::register_test.
8587 (run_self_tests): selftest::run_tests.
8588 * selftest.h: Update declarations.
8589 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8590 selftests::register_test_foreach_arch.
8591 * selftest-arch.h: Update declaration.
8592 * aarch64-tdep.c: Update.
8593 * arm-tdep.c: Likewise.
8594 * disasm-selftests.c: Likewise.
8595 * dwarf2loc.c: Likewise.
8596 * dwarf2-frame.c: Likewise.
8597 * findvar.c: Likewise.
8598 * gdbarch-selftests.c: Likewise.
8599 * maint.c (maintenance_selftest): Likewise.
8600 * regcache.c: Likewise.
8601 * rust-exp.y: Likewise.
8602 * selftest-arch.c: Likewise.
8603 * unittests/environ-selftests.c: Likewise.
8604 * unittests/function-view-selftests.c: Likewise.
8605 * unittests/offset-type-selftests.c: Likewise.
8606 * unittests/optional-selftests.c: Likewise.
8607 * unittests/scoped_restore-selftests.c: Likewise.
8608 * utils-selftests.c: Likewise.
8609
b0cba12e
PA
86102017-08-17 Pedro Alves <palves@redhat.com>
8611
8612 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8613 local.
8614
4c8aa72d
PA
86152017-08-17 Pedro Alves <palves@redhat.com>
8616
8617 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8618 field.
8619 (reset_die_in_process): Delete, replaced by ...
8620 (process_die_scope): ... this new class. Make it responsible for
8621 freeing cu->line_header too.
8622 (process_die): Use process_die_scope.
8623 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8624 cu->line_header_die_owner. Don't release the line header if it's
8625 owned by the CU.
8626 (setup_type_unit_groups): Make the CU/DIE own the line header.
8627 Don't release the line header here.
8628
ba713918
AL
86292017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8630
8631 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8632
44d0fb3a
RK
86332017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8634
8635 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8636 Single-Key mode
8637
a5afdb16
RK
86382017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8639
8640 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8641 mode command list.
8642
47613aeb
SH
86432017-08-15 Stafford Horne <shorne@gmail.com>
8644
8645 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8646
9c3cc999
SH
86472017-08-15 Stafford Horne <shorne@gmail.com>
8648
8649 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8650
206726fb
SDJ
86512017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8652
8653 PR gdb/21954
8654 * infcmd.c (unset_environment_command): Use the 'clear' method on
8655 the environment instead of resetting it.
8656
0335ac6d
JB
86572017-08-15 John Baldwin <jhb@FreeBSD.org>
8658
8659 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8660 platforms.
8661
d3abe1c8
TT
86622017-08-14 Tom Tromey <tom@tromey.com>
8663
8664 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8665 (print_binary_chars): Likewise.
8666 (BITS_IN_BYTES): Remove.
8667
d6382fff
TT
86682017-08-14 Tom Tromey <tom@tromey.com>
8669
8670 PR gdb/21675
8671 * valprint.c (LOW_ZERO): Change value to 034.
8672 (print_octal_chars): Add static_asserts for octal constants.
8673 * printcmd.c (print_scalar_formatted): Add 'd' case.
8674
f978cb06
TT
86752017-08-11 Tom Tromey <tom@tromey.com>
8676
8677 * symfile.c (add_symbol_file_command): Use std::vector.
8678
2f5404b3
TT
86792017-08-14 Tom Tromey <tom@tromey.com>
8680
8681 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8682 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8683 std::move.
8684 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8685
de7985c3
PA
86862017-08-11 Pedro Alves <palves@redhat.com>
8687
8688 * infrun.c (process_event_stop_test): Adjust
8689 function_name_is_marked_for_skip call.
8690 * skip.c: Include <list>.
8691 (skiplist_entry): Make it a class with private fields, and
8692 getters/setters.
8693 (skiplist_entry_chain): Delete.
8694 (skiplist_entries): New.
8695 (skiplist_entry_count): Delete.
8696 (highest_skiplist_entry_num): New.
8697 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8698 (add_skiplist_entry): Delete.
8699 (skiplist_entry::skiplist_entry): New.
8700 (skiplist_entry::add_entry): New.
8701 (skip_file_command, skip_function): Adjust.
8702 (compile_skip_regexp): Delete.
8703 (skip_command): Don't compile regexp here. Adjust to use
8704 skiplist_entry::add_entry.
8705 (skip_info): Adjust to use range-for and getters.
8706 (skip_enable_command, skip_disable_command): Adjust to use
8707 range-for and setters.
8708 (skip_delete_command): Adjust to use std::list.
8709 (add_skiplist_entry): Delete.
8710 (skip_file_p): Delete, refactored as ...
8711 (skiplist_entry::do_skip_file_p): ... this new method.
8712 (skip_gfile_p): Delete, refactored as ...
8713 (skiplist_entry::do_gskip_file_p): ... this new method.
8714 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8715 (skiplist_entry::skip_function_p): ... this new method.
8716 (function_name_is_marked_for_skip): Now returns bool, and takes
8717 the function sal by const reference. Adjust to use range-for and
8718 skiplist_entry methods.
8719 (_initialize_step_skip): Remove references to
8720 skiplist_entry_chain, skiplist_entry_count.
8721 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8722 takes the function sal by const reference.
8723
be7d3cd5
YQ
87242017-08-11 Yao Qi <yao.qi@linaro.org>
8725
8726 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8727 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8728 (dwarf2_frame_cache):
8729 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8730 RETURN_MASK_ALL and set *this_case to NULL.
8731 * frame-unwind.h: Update comments.
8732
1c90d9f0
YQ
87332017-08-11 Yao Qi <yao.qi@linaro.org>
8734
8735 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8736 (dwarf2_frame_state_copy_regs): Remove.
8737 (dwarf2_frame_state_free_regs): Remove.
8738 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8739 (dwarf2_restore_rule): Call method .alloc_regs instead of
8740 dwarf2_frame_state_alloc_regs.
8741 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8742 constructor. Call std::move.
8743 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8744 (dwarf2_frame_cache): Likewise.
8745
8746 [GDB_SELF_TEST]: Include selftest.h and
8747 selftest-arch.h.
8748 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8749 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8750 execute_cfa_program_test.
8751
8752 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8753 copy ctor, assignment operator, move assignment.
8754 <alloc_regs>: New method.
8755 <swap>: New method.
8756 (struct dwarf2_frame_state): Delete dtor.
8757 (dwarf2_frame_state_alloc_regs): Remove declaration.
8758 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8759 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8760
afe37d6b
YQ
87612017-08-11 Yao Qi <yao.qi@linaro.org>
8762
8763 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8764 (dwarf2_frame_state::dwarf2_frame_state): New.
8765 (dwarf2_frame_state::~dwarf2_frame_state): New.
8766 (dwarf2_fetch_cfa_info): Update.
8767 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8768 rather than a pointer. Update code.
8769 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8770 dtor.
8771 <data_align, code_align, retaddr_column>: Change them to const.
8772 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8773 to bool.
8774
b348037f
YQ
87752017-08-11 Yao Qi <yao.qi@linaro.org>
8776
8777 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8778 <loc.exp>: New field.
8779 * dwarf2-frame.c (execute_cfa_program): Update.
8780 (dwarf2_frame_prev_register): Update.
8781
e7c9de26
PA
87822017-08-10 Pedro Alves <palves@redhat.com>
8783
8784 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8785
e8c6b620
JB
87862017-08-09 John Baldwin <jhb@FreeBSD.org>
8787
8788 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8789 (fbsd_pending_children): Use std::list.
8790 (fbsd_remember_child): Likewise.
8791 (fbsd_is_child_pending): Likewise.
8792 (fbsd_pending_vfork_done): Use std::forward_list.
8793 (fbsd_add_vfork_done): Likewise.
8794 (fbsd_is_vfork_done_pending): Likewise.
8795 (fbsd_next_vfork_done): Likewise.
8796
e4a26669
JB
87972017-08-09 John Baldwin <jhb@FreeBSD.org>
8798
8799 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8800 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8801 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8802 for `mapfilename'.
8803 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8804 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8805
142311d3
JB
88062017-08-09 John Baldwin <jhb@FreeBSD.org>
8807
8808 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8809 "filestuff.h".
8810 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8811
42fa2e0e
TT
88122017-08-09 Tom Tromey <tom@tromey.com>
8813
8814 * skip.c (skiplist_entry): New constructor.
8815 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8816 (skiplist_entry::file_is_glob): Now bool.
8817 (skiplist_entry::file, skiplist_entry::function): Now
8818 std::string.
8819 (make_skip_entry): Return a unique_ptr. Use new.
8820 (free_skiplist_entry, free_skiplist_entry_cleanup)
8821 (make_free_skiplist_entry_cleanup): Remove.
8822 (skip_command, skip_disable_command, add_skiplist_entry)
8823 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8824 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8825 (function_name_is_marked_for_skip): Update.
8826 (skip_delete_command): Update. Use delete.
8827
cd3af38d
JW
88282017-08-09 Jiong Wang <jiong.wang@arm.com>
8829
8830 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8831 (aarch64_linux_core_read_description): New function.
8832 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8833
29592bde
PA
88342017-08-09 Pedro Alves <palves@redhat.com>
8835
8836 * cp-name-parser.y (cp_comp_to_string): Return a
8837 gdb::unique_xmalloc_ptr<char>.
8838 * cp-support.c (replace_typedefs_qualified_name)
8839 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8840 (cp_canonicalize_string_full): Use op= instead of explicit
8841 convertion.
8842 (cp_class_name_from_physname, method_name_from_physname)
8843 (cp_func_name, cp_remove_params): Adjust to use
8844 gdb::unique_xmalloc_ptr<char>.
8845 * cp-support.h (cp_comp_to_string): Return a
8846 gdb::unique_xmalloc_ptr<char>.
8847 * python/py-type.c (typy_lookup_type): Adjust to use
8848 gdb::unique_xmalloc_ptr<char>.
8849
b3340438
L
88502017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8851
8852 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8853
e88e8651
YQ
88542017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8855 Yao Qi <yao.qi@linaro.org>
8856
8857 * cp-support.c (cp_canonicalize_string_full): Use
8858 gdb::unique_xmalloc_ptr<char>.
8859 (cp_canonicalize_string): Likewise.
8860
f5a29eb0
YQ
88612017-08-09 Yao Qi <yao.qi@linaro.org>
8862
8863 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8864 * regformats/i386/amd64-avx-avx512.dat: Remove.
8865 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8866 * regformats/i386/amd64-avx-mpx.dat:Remove.
8867 * regformats/i386/amd64-avx.dat: Remove.
8868 * regformats/i386/amd64-mpx.dat: Remove.
8869 * regformats/i386/i386-avx-avx512.dat: Remove.
8870 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8871 * regformats/i386/i386-avx-mpx.dat: Remove.
8872 * regformats/i386/i386-mmx.dat: Remove.
8873 * regformats/i386/i386-mpx.dat: Remove.
8874
57757c2f
YQ
88752017-08-09 Yao Qi <yao.qi@linaro.org>
8876
8877 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8878 * amd64-tdep.c: Don't include features/i386/x32*.c.
8879 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8880 functions.
8881 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8882 and i386/x32-avx-avx512.
8883 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8884 and i386/x32.xml.
8885 * features/i386/x32-avx-avx512.c: Removed.
8886 * features/i386/x32-avx-avx512.xml: Removed.
8887 * features/i386/x32-avx.c: Removed.
8888 * features/i386/x32-avx.xml: Removed.
8889 * features/i386/x32.c: Removed.
8890 * features/i386/x32.xml: Removed.
8891 * regformats/i386/x32-avx-avx512.dat: Removed.
8892 * regformats/i386/x32-avx.dat: Removed.
8893 * regformats/i386/x32.dat: Removed.
8894
ba7b109b
MR
88952017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8896
8897 PR breakpoints/21886
8898 * mem-break.c (default_memory_insert_breakpoint): Use
8899 `->placed_address' rather than `->reqstd_address' for the
8900 breakpoint location.
8901
e347efc3
MR
89022017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8903
8904 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8905 assertions.
8906
0dba2a6c
MR
89072017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8908
8909 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8910 a union of `tdep_info', `tdesc_data' and `id'.
8911 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8912 rather than `info.tdep_info'.
8913 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8914 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8915 * i386-tdep.c (i386_gdbarch_init): Likewise.
8916 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8917 * mips-tdep.c (mips_gdbarch_init): Likewise.
8918 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8919 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8920 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8921 `info.tdep_info'.
8922 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8923 `info.tdep_info'.
8924 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8925 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8926 `info.tdep_info'.
8927 * spu-tdep.c (spu_gdbarch_init): Likewise.
8928 * gdbarch.h: Regenerate.
8929
16eb6b2d
LS
89302017-08-07 Leszek Swirski <leszeks@google.com>
8931
7b005726 8932 PR symtab/20899
16eb6b2d
LS
8933 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8934
74cbb09e
SM
89352017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8936
8937 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8938 (gdbsim_open): Rename gdb_argv args object to argv.
8939
ee0c3293
TT
89402017-08-05 Tom Tromey <tom@tromey.com>
8941
8942 * compile/compile-object-load.c (compile_object_load): Use
8943 gdb::unique_xmalloc_ptr.
8944 * cli/cli-dump.c (scan_filename): Rename from
8945 scan_filename_with_cleanup. Change return type.
8946 (scan_expression): Rename from scan_expression_with_cleanup.
8947 Change return type.
8948 (dump_memory_to_file, dump_value_to_file, restore_command):
8949 Use gdb::unique_xmalloc_ptr. Update.
8950 * cli/cli-cmds.c (find_and_open_script): Use
8951 gdb::unique_xmalloc_ptr.
8952 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8953 * symmisc.c (maintenance_print_symbols)
8954 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8955 * symfile.c (symfile_bfd_open, generic_load)
8956 (add_symbol_file_command, remove_symbol_file_command): Use
8957 gdb::unique_xmalloc_ptr.
8958 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8959 * psymtab.c (maintenance_print_psymbols): Use
8960 gdb::unique_xmalloc_ptr.
8961 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8962 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8963 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8964 (reload_shared_libraries_1): Likewise.
8965
3232fabd
TT
89662017-08-05 Tom Tromey <tom@tromey.com>
8967
8968 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8969 (rust_op_vector, rust_set_vector): New typedefs.
8970 (current_parser): New global.
8971 (work_obstack): Change to pointer type. Update all users.
8972 (rust_ast, pstate): Remove globals.
8973 (struct rust_parser): New.
8974 (%union) <params, field_inits>: Change type.
8975 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8976 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8977 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8978 (convert_params_to_types, convert_params_to_expression): Change
8979 type of "params".
8980 (ast_string): Change type of "fields".
8981 (rust_parse): Make a rust_parser. Remove cleanups.
8982 (rust_lex_tests): Make and install an auto_obstack.
8983
f02fd774
YQ
89842017-08-04 Yao Qi <yao.qi@linaro.org>
8985
8986 * configure.srv (ipa_x32_linux_regobj): New.
8987 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8988 instead of X86_TDESC_AVX512.
8989 (initialize_low_tracepoint): Call
8990 init_registers_x32_avx_avx512_linux.
8991
91975afd
YQ
89922017-08-04 Yao Qi <yao.qi@linaro.org>
8993
8994 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8995
2331fa3a
RK
89962017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8997
8998 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8999
744e4fe1
TT
90002017-08-03 Tom Tromey <tom@tromey.com>
9001
9002 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9003 Remove.
9004 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9005
1c034b67
TT
90062017-08-03 Tom Tromey <tom@tromey.com>
9007
9008 * python/py-param.c (compute_enum_values): Use gdb_argv.
9009
773a1edc
TT
90102017-08-03 Tom Tromey <tom@tromey.com>
9011
9012 * utils.h (struct gdb_argv_deleter): New.
9013 (gdb_argv): New class.
9014 * utils.c (gdb_argv::reset): New method.
9015 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9016 * tracefile.c (tsave_command): Use gdb_argv.
9017 * top.c (new_ui_command): Use gdb_argv.
9018 * symmisc.c (maintenance_print_symbols)
9019 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9020 * symfile.c (symbol_file_command, generic_load)
9021 (remove_symbol_file_command): Use gdb_argv.
9022 * stack.c (backtrace_command): Use gdb_argv.
9023 * source.c (add_path, show_substitute_path_command)
9024 (unset_substitute_path_command, set_substitute_path_command):
9025 Use gdb_argv.
9026 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9027 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9028 * remote.c (extended_remote_run, remote_put_command)
9029 (remote_get_command, remote_delete_command): Use gdb_argv.
9030 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9031 (gdbsim_open): Use gdb_argv.
9032 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9033 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9034 * procfs.c (procfs_info_proc): Use gdb_argv.
9035 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9036 * infrun.c (handle_command): Use gdb_argv.
9037 * inferior.c (add_inferior_command, clone_inferior_command):
9038 Use gdb_argv.
9039 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9040 * exec.c (exec_file_command): Use gdb_argv.
9041 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9042 * compile/compile.c (build_argc_argv): Use gdb_argv.
9043
0d50bde3
TT
90442017-08-03 Tom Tromey <tom@tromey.com>
9045
9046 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9047
7f968c89
TT
90482017-08-03 Tom Tromey <tom@tromey.com>
9049
9050 * python/python.c (compute_python_string): Return std::string.
9051 (gdbpy_eval_from_control_command): Update.
9052 (do_start_initialization): Use std::string.
9053 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9054 xstrprintf.
9055 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9056 xstrprintf.
9057
3c9ebddd
TT
90582017-08-03 Tom Tromey <tom@tromey.com>
9059
9060 * top.h (do_restore_instream_cleanup): Remove.
9061 * top.c (do_restore_instream_cleanup): Remove.
9062 (read_command_file): Use scoped_restore.
9063 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9064
b51b225e
TT
90652017-08-03 Tom Tromey <tom@tromey.com>
9066
9067 * cli/cli-script.c (execute_user_command)
9068 (execute_control_command): Use scoped_restore.
9069
ac991630
TT
90702017-08-03 Tom Tromey <tom@tromey.com>
9071
9072 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9073 (execute_user_command): Remove user_call_depth; use
9074 user_args_stack's size instead.
9075
898e0c8e
TT
90762017-08-03 Tom Tromey <tom@tromey.com>
9077
9078 * top.h (in_user_command): Remove.
9079 * top.c (in_user_command): Remove.
9080 * cli/cli-script.c (do_restore_user_call_depth)
9081 (execute_user_command): Update.
9082
26fcd5d7
TT
90832017-08-03 Tom Tromey <tom@tromey.com>
9084
9085 * valops.c (search_struct_method): Use gdb::byte_vector.
9086 * valarith.c (value_concat): Use std::vector.
9087 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9088 (simple_search_memory): Likewise.
9089 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9090 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9091 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9092 * elfread.c (elf_rel_plt_read): Use std::string.
9093 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9094 * cli/cli-dump.c (restore_section_callback): Use
9095 gdb::byte_vector.
9096
7c218e6c
TT
90972017-08-03 Tom Tromey <tom@tromey.com>
9098
9099 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9100
31b68d4a
TT
91012017-08-03 Tom Tromey <tom@tromey.com>
9102
9103 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9104 (tui_register_format): Use scoped_restore.
9105
2ec845e7
TT
91062017-08-03 Tom Tromey <tom@tromey.com>
9107
9108 * reverse.c (exec_direction_default): Remove.
9109 (exec_reverse_once): Use scoped_restore.
9110 * remote.c (restore_remote_timeout): Remove.
9111 (remote_flash_erase, remote_flash_write, remote_flash_done)
9112 (readchar, remote_serial_write): Use scoped_restore.
9113 * cli/cli-script.c (struct source_cleanup_lines_args)
9114 (source_cleanup_lines): Remove.
9115 (script_from_file): Use scoped_restore.
9116 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9117 (source_command): Use scoped_restore.
9118
b3bc8453
TT
91192017-08-03 Tom Tromey <tom@tromey.com>
9120
9121 * utils.h (make_cleanup_free_so): Remove.
9122 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9123 * solist.h (struct so_deleter): New.
9124 (so_list_up): New typedef.
9125 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9126
e3ad2841
TT
91272017-08-03 Tom Tromey <tom@tromey.com>
9128
9129 * utils.h (make_cleanup_restore_current_language): Remove.
9130 * utils.c (do_restore_current_language)
9131 (make_cleanup_restore_current_language): Remove.
9132 * parse.c (parse_exp_in_context_1)
9133 (parse_expression_with_language): Use
9134 scoped_restore_current_language.
9135 * mi/mi-main.c (mi_cmd_execute): Use
9136 scoped_restore_current_language.
9137 * language.h (scoped_restore_current_language): New class.
9138
b80cf838
TT
91392017-08-03 Tom Tromey <tom@tromey.com>
9140
9141 * compile/compile.c (cleanup_unlink_file): Remove.
9142 (compile_to_object): Use gdb::unlinker.
9143 (eval_compile_command): Likewise.
9144
fad0444a
TT
91452017-08-03 Tom Tromey <tom@tromey.com>
9146
9147 * utils.h (make_cleanup_fclose): Remove.
9148 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9149
6e7bc05c
TT
91502017-08-03 Tom Tromey <tom@tromey.com>
9151
9152 * top.c (open_terminal_stream): Return gdb_file_up.
9153 (new_ui_command): Update.
9154
4a45905b
TT
91552017-08-03 Tom Tromey <tom@tromey.com>
9156
9157 * source.c (print_source_lines_base, forward_search_command)
9158 (reverse_search_command): Use gdb_file_up.
9159
7cd06d6e
TT
91602017-08-03 Tom Tromey <tom@tromey.com>
9161
9162 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9163
ed166945
TT
91642017-08-03 Tom Tromey <tom@tromey.com>
9165
9166 * cli/cli-cmds.c (find_and_open_script): Change return type.
9167 Remove "streamp" and "full_path" parameters.
9168 (source_script_with_search): Update.
9169 * auto-load.c (source_script_file): Update.
9170 * cli/cli-cmds.h (find_and_open_script): Change type.
9171 (open_script): New struct.
9172
d419f42d
TT
91732017-08-03 Tom Tromey <tom@tromey.com>
9174
9175 * xml-support.c (xml_fetch_content_from_file): Update.
9176 * ui-file.c (stdio_file::open): Update.
9177 * tracefile-tfile.c (tfile_start): Update.
9178 * remote.c (remote_file_put, remote_file_get): Update.
9179 * nat/linux-procfs.c (linux_proc_get_int)
9180 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9181 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9182 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9183 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9184 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9185 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9186 * linux-nat.c (linux_proc_pending_signals): Update.
9187 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9188 (file_closer): Remove.
9189 * compile/compile.c (compile_to_object): Update.
9190 * common/filestuff.h (struct gdb_file_deleter): New.
9191 (gdb_file_up): New typedef.
9192 (gdb_fopen_cloexec): Change return type.
9193 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9194 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9195 (dump_binary_file, restore_binary_file): Update.
9196 * auto-load.c (auto_load_objfile_script_1): Update.
9197
4a2b031d
TT
91982017-08-03 Tom Tromey <tom@tromey.com>
9199
9200 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9201 (info_static_tracepoint_markers_command): Likewise.
9202 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9203 * skip.c (skip_info): Use ui_out_emit_table.
9204 * progspace.c (print_program_space): Use ui_out_emit_table.
9205 * osdata.c (info_osdata): Use ui_out_emit_table.
9206 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9207 ui_out_emit_table.
9208 * linux-thread-db.c (info_auto_load_libthread_db): Use
9209 ui_out_emit_table.
9210 * inferior.c (print_inferior): Use ui_out_emit_table.
9211 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9212 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9213 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9214 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9215 * ui-out.h (class ui_out_emit_table): New.
9216
a4f320fd
MR
92172017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9218
9219 * mips-tdep.c (mips_fpu_type_str): New function.
9220 (mips_dump_tdep): Call it.
9221
a2f1f308
MR
92222017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9223
9224 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9225 `->mips_fpu_type'.
9226
7e5ed83b
XR
92272017-07-31 Xavier Roirand <roirand@adacore.com>
9228
9229 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9230
4c9dc811
XR
92312017-07-27 Xavier Roirand <roirand@adacore.com>
9232
9233 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9234
27d41eac
YQ
92352017-07-26 Yao Qi <yao.qi@linaro.org>
9236
9237 * cli/cli-cmds.c (maintenancechecklist): New variable.
9238 * gdbcmd.h (maintenancechecklist): Declare it.
9239 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9240 Call i386_linux_read_description with different masks.
9241 * maint.c (maintenance_check_command): New function.
9242 (_initialize_maint_cmds): Call add_prefix_cmd.
9243 * target-descriptions.c (tdesc_reg): override operator != and ==.
9244 (tdesc_type): Likewise.
9245 (tdesc_feature): Likewise.
9246 (target_desc): Likewise.
9247 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9248 (maintenance_check_xml_descriptions): New function.
9249 (_initialize_target_descriptions) Add command "xml-descriptions".
9250 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9251
ea03d0d3
YQ
92522017-07-26 Yao Qi <yao.qi@linaro.org>
9253
9254 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9255 Include features/i386/32bit-*.c.
9256 (i386_linux_read_description): Generate target description if it
9257 doesn't exist.
9258 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9259 functions.
9260 * features/i386/32bit-linux.c: Re-generated.
9261 * features/i386/32bit-sse.c: Likewise.
9262 * target-descriptions.c (print_c_feature::visit): Print code to
9263 set register number if needed.
9264 (print_c_feature) <m_next_regnum>: New field.
9265
25aa13e5
YQ
92662017-07-26 Yao Qi <yao.qi@linaro.org>
9267
9268 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9269 (FEATURE_XMLFILES): New.
9270 (FEATURE_CFILES): New.
9271 New rules.
9272 (clean-cfiles): Remove generated c files.
9273 * features/i386/32bit-avx.c: Generated.
9274 * features/i386/32bit-avx512.c: Generated.
9275 * features/i386/32bit-core.c: Generated.
9276 * features/i386/32bit-linux.c: Generated.
9277 * features/i386/32bit-mpx.c: Generated.
9278 * features/i386/32bit-pkeys.c: Generated.
9279 * features/i386/32bit-sse.c: Generated.
9280 * target-descriptions.c: Include algorithm.
9281 (tdesc_element_visitor): Add method visit_end.
9282 (print_c_tdesc): Implement visit_end.
9283 (print_c_tdesc:: m_filename_after_features): Move it to
9284 protected.
9285 (print_c_feature): New class.
9286 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9287 name starts with "i386/32bit-".
9288
6eb1e6a8
YQ
92892017-07-26 Yao Qi <yao.qi@linaro.org>
9290
9291 * target-descriptions.c (tdesc_element_visitor): New class.
9292 (tdesc_element): New class.
9293 (tdesc_reg): Inherit from tdesc_element.
9294 (tdesc_reg::accept): New function.
9295 (tdesc_type): Inherit from tdesc_element.
9296 (tdesc_type::accept): New function.
9297 (tdesc_feature): Inherit from tdesc_element.
9298 (tdesc_feature::accept): New function.
9299 (target_desc): Inherit from tdesc_element.
9300 (target_desc::target_desc): New.
9301 (target_desc::~target_desc): New.
9302 (target_desc::accept): New.
9303 (allocate_target_description): Use new.
9304 (free_target_description): Use delete.
9305 (print_c_tdesc): New class.
9306 (maint_print_c_tdesc_cmd): Adjust.
9307
9308 * features/aarch64.c: Re-generated.
9309 * features/arc-arcompact.c: Re-generated.
9310 * features/arc-v2.c: Re-generated.
9311 * features/arm/arm-with-iwmmxt.c: Re-generated.
9312 * features/arm/arm-with-m.c: Re-generated.
9313 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9314 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9315 * features/arm/arm-with-neon.c: Re-generated.
9316 * features/arm/arm-with-vfpv2.c: Re-generated.
9317 * features/arm/arm-with-vfpv3.c: Re-generated.
9318 * features/i386/amd64-avx-avx512.c: Re-generated.
9319 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9320 * features/i386/amd64-avx.c: Re-generated.
9321 * features/i386/amd64-avx-linux.c: Re-generated.
9322 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9323 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9324 * features/i386/amd64-avx-mpx.c: Re-generated.
9325 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9326 * features/i386/amd64.c: Re-generated.
9327 * features/i386/amd64-linux.c: Re-generated.
9328 * features/i386/amd64-mpx.c: Re-generated.
9329 * features/i386/amd64-mpx-linux.c: Re-generated.
9330 * features/i386/i386-avx-avx512.c: Re-generated.
9331 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9332 * features/i386/i386-avx.c: Re-generated.
9333 * features/i386/i386-avx-linux.c: Re-generated.
9334 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9335 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9336 * features/i386/i386-avx-mpx.c: Re-generated.
9337 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9338 * features/i386/i386.c: Re-generated.
9339 * features/i386/i386-linux.c: Re-generated.
9340 * features/i386/i386-mmx.c: Re-generated.
9341 * features/i386/i386-mmx-linux.c: Re-generated.
9342 * features/i386/i386-mpx.c: Re-generated.
9343 * features/i386/i386-mpx-linux.c: Re-generated.
9344 * features/i386/x32-avx-avx512.c: Re-generated.
9345 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9346 * features/i386/x32-avx.c: Re-generated.
9347 * features/i386/x32-avx-linux.c: Re-generated.
9348 * features/i386/x32.c: Re-generated.
9349 * features/i386/x32-linux.c: Re-generated.
9350 * features/microblaze.c: Re-generated.
9351 * features/microblaze-with-stack-protect.c: Re-generated.
9352 * features/mips64-dsp-linux.c: Re-generated.
9353 * features/mips64-linux.c: Re-generated.
9354 * features/mips-dsp-linux.c: Re-generated.
9355 * features/mips-linux.c: Re-generated.
9356 * features/nds32.c: Re-generated.
9357 * features/nios2.c: Re-generated.
9358 * features/nios2-linux.c: Re-generated.
9359 * features/rs6000/powerpc-32.c: Re-generated.
9360 * features/rs6000/powerpc-32l.c: Re-generated.
9361 * features/rs6000/powerpc-403.c: Re-generated.
9362 * features/rs6000/powerpc-403gc.c : Re-generated.
9363 * features/rs6000/powerpc-405.c: Re-generated.
9364 * features/rs6000/powerpc-505.c: Re-generated.
9365 * features/rs6000/powerpc-601.c: Re-generated.
9366 * features/rs6000/powerpc-602.c: Re-generated.
9367 * features/rs6000/powerpc-603.c: Re-generated.
9368 * features/rs6000/powerpc-604.c: Re-generated.
9369 * features/rs6000/powerpc-64.c: Re-generated.
9370 * features/rs6000/powerpc-64l.c: Re-generated.
9371 * features/rs6000/powerpc-7400.c: Re-generated.
9372 * features/rs6000/powerpc-750.c: Re-generated.
9373 * features/rs6000/powerpc-860.c: Re-generated.
9374 * features/rs6000/powerpc-altivec32.c: Re-generated.
9375 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9376 * features/rs6000/powerpc-altivec64.c: Re-generated.
9377 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9378 * features/rs6000/powerpc-cell32l.c: Re-generated.
9379 * features/rs6000/powerpc-cell64l.c: Re-generated.
9380 * features/rs6000/powerpc-e500.c: Re-generated.
9381 * features/rs6000/powerpc-e500l.c: Re-generated.
9382 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9383 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9384 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9385 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9386 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9387 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9388 * features/rs6000/powerpc-vsx32.c: Re-generated.
9389 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9390 * features/rs6000/powerpc-vsx64.c: Re-generated.
9391 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9392 * features/rs6000/rs6000.c: Re-generated.
9393 * features/s390-linux32.c: Re-generated.
9394 * features/s390-linux32v1.c: Re-generated.
9395 * features/s390-linux32v2.c: Re-generated.
9396 * features/s390-linux64.c: Re-generated.
9397 * features/s390-linux64v1.c: Re-generated.
9398 * features/s390-linux64v2.c: Re-generated.
9399 * features/s390-te-linux64.c: Re-generated.
9400 * features/s390-tevx-linux64.c: Re-generated.
9401 * features/s390-vx-linux64.c: Re-generated.
9402 * features/s390x-linux64.c: Re-generated.
9403 * features/s390x-linux64v1.c: Re-generated.
9404 * features/s390x-linux64v2.c: Re-generated.
9405 * features/s390x-te-linux64.c: Re-generated.
9406 * features/s390x-tevx-linux64.c: Re-generated.
9407 * features/s390x-vx-linux64.c: Re-generated.
9408 * features/sparc/sparc32-solaris.c: Re-generated.
9409 * features/sparc/sparc64-solaris.c: Re-generated.
9410 * features/tic6x-c62x.c: Re-generated.
9411 * features/tic6x-c62x-linux.c: Re-generated.
9412 * features/tic6x-c64x.c: Re-generated.
9413 * features/tic6x-c64x-linux.c: Re-generated.
9414 * features/tic6x-c64xp.c: Re-generated.
9415 * features/tic6x-c64xp-linux.c: Re-generated.
9416
35b4818d
YQ
94172017-07-26 Yao Qi <yao.qi@linaro.org>
9418
9419 * i386-linux-tdep.c (i386_linux_read_description): New function.
9420 (i386_linux_core_read_description): Call
9421 i386_linux_read_description.
9422 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9423 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9424 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9425 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9426 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9427 * x86-linux-nat.c (x86_linux_read_description): Call
9428 i386_linux_read_description.
9429
8e2141c6
YQ
94302017-07-26 Yao Qi <yao.qi@linaro.org>
9431
9432 * NEWS: Mention it.
9433 * features/Makefile (%.c: %.xml): Pass the xml file name to
9434 command "maint print c-tdesc".
9435 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9436 name from 'arg'.
9437
b468ff4c
YQ
94382017-07-26 Yao Qi <yao.qi@linaro.org>
9439
9440 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9441 in-class initialization.
9442 (tdesc_create_feature): Call new instead of XCNEW.
9443 (free_target_description): Ue delete.
9444
b9c0e1b4
JB
94452017-07-25 John Baldwin <jhb@FreeBSD.org>
9446
9447 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9448
a04b5337
YQ
94492017-07-25 Yao Qi <yao.qi@linaro.org>
9450
9451 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9452 constant.
9453 (amd64_x32_init_abi): Likewise.
9454 * amd64-tdep.h (amd64_init_abi): Update declaration.
9455 (amd64_x32_init_abi): Likewise.
9456
02ad7fc2
YQ
94572017-07-25 Yao Qi <yao.qi@linaro.org>
9458
9459 PR tdep/21717
9460 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9461 condition for FPSCR.
9462 (arm_linux_store_inferior_registers): Likewise.
9463
b6f48cb0
TT
94642017-07-22 Tom Tromey <tom@tromey.com>
9465
9466 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9467 <syscalls_counts>: Now a std::vector.
9468 (get_catch_syscall_inferior_data): Use "new".
9469 (catch_syscall_inferior_data_cleanup): Use "delete".
9470 (insert_catch_syscall, remove_catch_syscall)
9471 (clear_syscall_counts): Update.
9472
e12c9b7a
TT
94732017-07-22 Tom Tromey <tom@tromey.com>
9474
9475 * break-catch-syscall.c (syscall_catchpoint)
9476 <syscalls_to_be_caught>: Now a std::vector<int>
9477 (~syscall_catchpoint): Remove.
9478 (insert_catch_syscall, remove_catch_syscall)
9479 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9480 (print_mention_catch_syscall, print_recreate_catch_syscall):
9481 Update.
9482 (create_syscall_event_catchpoint): Change type of "filter"
9483 parameter.
9484 (catch_syscall_split_args): Return a std::vector.
9485 (catch_syscall_command_1, catching_syscall_number_1): Update.
9486
4fa8aeac
TT
94872017-07-22 Tom Tromey <tom@tromey.com>
9488
9489 * break-catch-throw.c (struct exception_catchpoint)
9490 <exception_rx>: Now a std::string.
9491 (~exception_catchpoint): Remove.
9492 (print_one_detail_exception_catchpoint): Update.
9493 (handle_gnu_v3_exceptions): Change type of except_rx.
9494 (extract_exception_regexp): Return a std::string.
9495 (catch_exception_command_1): Update.
9496
f746a154
TT
94972017-07-22 Tom Tromey <tom@tromey.com>
9498
9499 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9500 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9501 std::vector.
9502 <catch_all>: Now a bool.
9503 (~signal_catchpoint): Remove.
9504 (signal_catchpoint_insert_location)
9505 (signal_catchpoint_remove_location)
9506 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9507 (signal_catchpoint_print_mention)
9508 (signal_catchpoint_print_recreate)
9509 (signal_catchpoint_explains_signal): Update.
9510 (create_signal_catchpoint): Change type of "filter" and
9511 "catch_all".
9512 (catch_signal_split_args): Return a std::vector. Change type of
9513 "catch_all".
9514 (catch_signal_command): Update.
9515
47e77640
PA
95162017-07-20 Pedro Alves <palves@redhat.com>
9517
9518 * ada-lang.c (ada_language_defn): Make extern.
9519 (_initialize_ada_language): Remove add_language call.
9520 * c-lang.c (c_language_defn, cplus_language_defn)
9521 (asm_language_defn, minimal_language_defn): Make extern.
9522 (_initialize_c_language): Delete.
9523 * completer.c (compare_cstrings): Delete, moved to utils.h.
9524 * d-lang.c (d_language_defn): Make extern.
9525 (_initialize_d_language): Remove add_language calls.
9526 * defs.h (enum language): Add comment.
9527 * f-lang.c (f_language_defn): Make extern.
9528 (_initialize_f_language): Remove add_language call.
9529 * go-lang.c (go_language_defn): Make extern.
9530 (_initialize_go_language): Remove add_language call.
9531 * language.c: Include <algorithm>.
9532 (languages): Redefine as const array.
9533 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9534 (set_language_command): Handle "local". Use for-range loop.
9535 (set_language): Remove loop.
9536 (language_enum): Rewrite.
9537 (language_def, language_str): Remove loops.
9538 (add_language): Delete.
9539 (add_set_language_command): New, based on add_languages.
9540 (skip_language_trampoline): Adjust.
9541 (local_language_defn): Delete.
9542 (language_gdbarch_post_init): Adjust.
9543 (_initialize_language): Remove add_language calls. Call
9544 add_set_language_command.
9545 * language.h (add_language): Delete.
9546 (auto_language_defn)
9547 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9548 (asm_language_defn, c_language_defn, cplus_language_defn)
9549 (d_language_defn, f_language_defn, go_language_defn)
9550 (m2_language_defn, objc_language_defn, opencl_language_defn)
9551 (pascal_language_defn, rust_language_defn): Declare.
9552 * m2-lang.c (m2_language_defn): Make extern.
9553 (_initialize_m2_language): Remove add_language call.
9554 * objc-lang.c (objc_language_defn): Make extern.
9555 (_initialize_objc_language): Remove add_language call.
9556 * opencl-lang.c (opencl_language_defn): Make extern.
9557 (_initialize_opencl_language): Remove add_language call.
9558 * p-lang.c (pascal_language_defn): Make extern.
9559 (_initialize_pascal_language): Delete.
9560 * rust-lang.c (rust_language_defn): Make extern.
9561 (_initialize_rust_language): Delete.
9562 * utils.h (compare_cstrings): New static inline function.
9563
edb0c9cb
PA
95642017-07-20 Pedro Alves <palves@redhat.com>
9565
9566 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9567 (get_var_value): Constify parameters.
9568 (get_int_var_value): Change prototype.
9569 (to_fixed_range_type): Adjust.
9570 * ada-lang.h (get_int_var_value): Change prototype.
9571
a778f165
PA
95722017-07-20 Pedro Alves <palves@redhat.com>
9573
9574 * dwarf2read.c (dw2_lookup_symbol): Use
9575 SYMBOL_MATCHES_SEARCH_NAME.
9576 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9577
42edd901
PA
95782017-07-20 Pedro Alves <palves@redhat.com>
9579
9580 * block.c (block_iter_name_step, block_iter_name_first)
9581 (block_iter_name_next): Delete.
9582 (block_lookup_symbol_primary): Adjust to use
9583 dict_iter_match_first/dict_iter_match_next.
9584 * block.h (block_iter_name_first, block_iter_name_next): Delete
9585 declarations.
9586 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9587 dict_iter_match_first/dict_iter_match_next.
9588
cf325299
PA
95892017-07-20 Pedro Alves <palves@redhat.com>
9590
9591 * cp-support.c (cp_find_first_component_aux): Add missing case for
9592 end of string.
9593
c5ed0576
DB
95942017-07-18 David Blaikie <dblaikie@gmail.com>
9595
9596 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9597 of dwo_cu's dwo_file.
9598
27841e76
YQ
95992017-07-18 Yao Qi <yao.qi@linaro.org>
9600
9601 * remote.c (store_registers_using_G): Remove one line comment.
9602
cfb7e58b
YQ
96032017-07-18 Yao Qi <yao.qi@linaro.org>
9604
9605 * regcache.c (regcache_cpy): Simplify it.
9606 (regcache::cpy_no_passthrough): Remove it.
9607 * regcache.h (cpy_no_passthrough): Remove it.
9608 (regcache_dup, regcache_cpy): Update comments.
9609
386535dd
PA
96102017-07-18 Pedro Alves <palves@redhat.com>
9611
9612 * remote-sim.c (sim_command_completer): Adjust to work with a
9613 completion_tracker instead of a VEC.
9614
c45ec17c
PA
96152017-07-17 Pedro Alves <palves@redhat.com>
9616
9617 * completer.c (complete_source_filenames): New function.
9618 (complete_address_and_linespec_locations): New function.
9619 (location_completer): Use complete_address_and_linespec_locations.
9620 (completion_tracker::build_completion_result): Honor the tracker's
9621 request to suppress append.
9622 * completer.h (completion_tracker::suppress_append_ws)
9623 (completion_tracker::set_suppress_append_ws): New methods.
9624 (completion_tracker::m_suppress_append_ws): New field.
9625 (complete_source_filenames): New declaration.
9626 * linespec.c (linespec_complete_what): New.
9627 (struct ls_parser) <complete_what, completion_word,
9628 completion_quote_char, completion_quote_end, completion_tracker>:
9629 New fields.
9630 (string_find_incomplete_keyword_at_end): New.
9631 (linespec_lexer_lex_string): Record quote char. If in completion
9632 mode, don't throw.
9633 (linespec_lexer_consume_token): Advance the completion word point.
9634 (linespec_lexer_peek_token): Save/restore completion info.
9635 (save_stream_and_consume_token): New.
9636 (set_completion_after_number): New.
9637 (linespec_parse_basic): Set what to complete next depending on
9638 token. Handle function and label completions specially.
9639 (parse_linespec): Disable objc shortcut in completion mode. Set
9640 what to complete next depending on token type. Skip keyword if in
9641 completion mode.
9642 (complete_linespec_component, linespec_complete): New.
9643 * linespec.h (linespec_complete): Declare.
9644
be966d42
PA
96452017-07-17 Pedro Alves <palves@redhat.com>
9646
9647 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9648 Handle 'operator<' / 'operator<<'.
9649
a2459270
PA
96502017-07-17 Pedro Alves <palves@redhat.com>
9651
9652 * completer.c (collect_explicit_location_matches): Handle
9653 MATCH_LABEL.
9654 (convert_explicit_location_to_linespec): New, factored out from
9655 ...
9656 (convert_explicit_location_to_sals): ... this.
9657 (complete_label): New.
9658 (linespec_complete_label, find_label_symbols_in_block): New.
9659 (find_label_symbols): Add completion_mode parameter and adjust to
9660 call find_label_symbols_in_block.
9661 * linespec.h (linespec_complete_label): Declare.
9662
c6756f62
PA
96632017-07-17 Pedro Alves <palves@redhat.com>
9664
9665 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9666 complete_symbol_mode parameter.
9667 * cli/cli-cmds.c (complete_command): Get the completion result out
9668 of the handle_brkchars tracker if used a custom word point.
9669 * completer.c: Include "linespec.h".
9670 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9671 (advance_to_expression_complete_word_point): New.
9672 (completion_tracker::completes_to_completion_word): New.
9673 (complete_files_symbols): Pass down
9674 complete_symbol_mode::EXPRESSION.
9675 (explicit_options, probe_options): New.
9676 (collect_explicit_location_matches): Complete on the
9677 explictit_loc->foo instead of word. Use
9678 linespec_complete_function. Handle MATCH_LINE. Handle offering
9679 keyword and options completions.
9680 (backup_text_ptr): Delete.
9681 (skip_keyword): New.
9682 (complete_explicit_location): Remove 'word' parameter. Add
9683 language, quoted_arg_start and quoted_arg_end parameters.
9684 Rewrite, parsing left to right.
9685 (location_completer): Rewrite.
9686 (location_completer_handle_brkchars): New function.
9687 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9688 (enum complete_line_internal_reason): Adjust comments.
9689 (completion_tracker::discard_completions): New.
9690 (completer_handle_brkchars_func_for_completer): Handle
9691 location_completer.
9692 (gdb_custom_word_point_brkchars)
9693 (gdb_org_rl_basic_quote_characters): New.
9694 (gdb_completion_word_break_characters_throw)
9695 (completion_find_completion_word): Handle trackers that use a
9696 custom word point.
9697 (completion_tracker::advance_custom_word_point_by): New.
9698 (completion_tracker::build_completion_result): Don't rely on
9699 readline appending the quote char.
9700 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9701 use a custom word point.
9702 (gdb_rl_attempted_completion_function): Restore
9703 rl_basic_quote_characters.
9704 * completer.h (class completion_tracker): Extend intro comment.
9705 (completion_tracker::set_quote_char)
9706 (completion_tracker::quote_char)
9707 (completion_tracker::set_use_custom_word_point)
9708 (completion_tracker::use_custom_word_point)
9709 (completion_tracker::custom_word_point)
9710 (completion_tracker::set_custom_word_point)
9711 (completion_tracker::advance_custom_word_point_by)
9712 (completion_tracker::completes_to_completion_word)
9713 (completion_tracker::discard_completions): New methods.
9714 (completion_tracker::m_quote_char)
9715 (completion_tracker::m_use_custom_word_point)
9716 (completion_tracker::m_custom_word_point): New fields.
9717 (advance_to_expression_complete_word_point): Declare.
9718 * f-lang.c (f_collect_symbol_completion_matches): Add
9719 complete_symbol_mode parameter.
9720 * language.h (struct language_defn)
9721 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9722 parameter.
9723 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9724 (linespec_complete_function): New function.
9725 (linespec_lexer_lex_keyword): Adjust.
9726 * linespec.h (linespec_keywords, linespec_complete_function): New
9727 declarations.
9728 * location.c (find_end_quote): New function.
9729 (explicit_location_lex_one): Add explicit_completion_info
9730 parameter. Save quoting info. Don't throw if being called for
9731 completion. Don't handle Ada operators here.
9732 (is_cp_operator, skip_op_false_positives, first_of)
9733 (explicit_location_lex_one_function): New function.
9734 (string_to_explicit_location): Replace 'dont_throw' parameter with
9735 an explicit_completion_info pointer parameter. Handle it. Don't
9736 use explicit_location_lex_one to lex function names. Use
9737 explicit_location_lex_one_function instead.
9738 * location.h (struct explicit_completion_info): New.
9739 (string_to_explicit_location): Replace 'dont_throw' parameter with
9740 an explicit_completion_info pointer parameter.
9741 * symtab.c (default_collect_symbol_completion_matches_break_on):
9742 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9743 (default_collect_symbol_completion_matches)
9744 (collect_symbol_completion_matches): Add complete_symbol_mode
9745 parameter.
9746 (collect_symbol_completion_matches_type): Pass down
9747 complete_symbol_mode::EXPRESSION.
9748 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9749 parameter. Handle LINESPEC mode.
9750 * symtab.h (complete_symbol_mode): New.
9751 (default_collect_symbol_completion_matches_break_on)
9752 (default_collect_symbol_completion_matches)
9753 (collect_symbol_completion_matches)
9754 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9755 parameter.
9756
1d550c82
PA
97572017-07-17 Pedro Alves <palves@redhat.com>
9758
9759 * utils.c (enum class strncmp_iw_mode): New.
9760 (strcmp_iw): Rename to ...
9761 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9762 parameters. Handle them.
9763 (strncmp_iw): New.
9764 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9765 * utils.h (strncmp_iw): Declare.
9766 (strcmp_iw): Move describing comments here.
9767
8090b426
PA
97682017-07-17 Pedro Alves <palves@redhat.com>
9769
9770 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9771 CP_OPERATOR_STR.
9772 * c-typeprint.c (is_type_conversion_operator): Use
9773 CP_OPERATOR_STR.
9774 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9775 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9776 CP_OPERATOR_LEN.
9777 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9778 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9779 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9780 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9781 CP_OPERATOR_STR.
9782 * location.c: Include "cp-support.h".
9783 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9784 CP_OPERATOR_STR.
9785 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9786 CP_OPERATOR_LEN.
9787
6a2c1b87
PA
97882017-07-17 Pedro Alves <palves@redhat.com>
9789
9790 * cli/cli-cmds.c (complete_command): Use a completion tracker
9791 along with completion_find_completion_word for handle_brkchars
9792 phase.
9793 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9794 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9795 (struct gdb_rl_completion_word_info): New.
9796 (gdb_rl_find_completion_word): New.
9797 (completion_find_completion_word): New.
9798 * completer.h (completion_find_completion_word): Declare.
9799
eb3ff9a5
PA
98002017-07-17 Pedro Alves <palves@redhat.com>
9801
9802 * ada-lang.c (symbol_completion_match): Adjust comments.
9803 (symbol_completion_add): Replace vector parameter with
9804 completion_tracker parameter. Use it.
9805 (ada_make_symbol_completion_list): Rename to...
9806 (ada_collect_symbol_completion_matches): ... this. Add
9807 completion_tracker parameter and use it.
9808 (ada_language_defn): Adjust.
9809 * break-catch-syscall.c (catch_syscall_completer): Adjust
9810 prototype and work with completion_tracker instead of VEC.
9811 * breakpoint.c (condition_completer): Adjust prototype and work
9812 with completion_tracker instead of VEC.
9813 * c-lang.c (c_language_defn, cplus_language_defn)
9814 (asm_language_defn, minimal_language_defn): Adjust to renames.
9815 * cli/cli-cmds.c (complete_command): Rework using
9816 completion_tracker. Catch exceptions when completing.
9817 * cli/cli-decode.c (integer_unlimited_completer)
9818 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9819 with completion_tracker instead of VEC.
9820 * command.h (struct completion_tracker): Forward declare.
9821 (completer_ftype, completer_handle_brkchars_ftype): Change
9822 types.
9823 (complete_on_cmdlist, complete_on_enum): Adjust.
9824 * completer.c: Include <algorithm>.
9825 (struct gdb_completer_state): New.
9826 (current_completion): New global.
9827 (readline_line_completion_function): Delete.
9828 (noop_completer, filename_completer)
9829 (filename_completer_handle_brkchars, complete_files_symbols)
9830 (linespec_location_completer): Adjust to work with a
9831 completion_tracker instead of a VEC.
9832 (string_or_empty): New.
9833 (collect_explicit_location_matches): Adjust to work with a
9834 completion_tracker instead of a VEC.
9835 (explicit_location_completer): Rename to ...
9836 (complete_explicit_location): ... this and adjust to work with a
9837 completion_tracker instead of a VEC.
9838 (location_completer): Adjust to work with a completion_tracker
9839 instead of a VEC.
9840 (add_struct_fields): Adjust to work with a completion_list instead
9841 of VEC.
9842 (expression_completer): Rename to ...
9843 (complete_expression): ... this and adjust to work with a
9844 completion_tracker instead of a VEC. Use complete_files_symbols.
9845 (expression_completer): Reimplement on top of complete_expression.
9846 (symbol_completer): Adjust to work with a completion_tracker
9847 instead of a VEC.
9848 (enum complete_line_internal_reason): Add describing comments.
9849 (complete_line_internal_normal_command): Adjust to work with a
9850 completion_tracker instead of a VEC.
9851 (complete_line_internal): Rename to ...
9852 (complete_line_internal_1): ... this and adjust to work with a
9853 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9854 handle_brkchars phase.
9855 (new_completion_tracker): Delete.
9856 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9857 complete_line_internal_1.
9858 (free_completion_tracker): Delete.
9859 (INITIAL_COMPLETION_HTAB_SIZE): New.
9860 (completion_tracker::completion_tracker)
9861 (completion_tracker::~completion_tracker): New.
9862 (maybe_add_completion): Delete.
9863 (completion_tracker::maybe_add_completion)
9864 (completion_tracker::add_completion)
9865 (completion_tracker::add_completions): New.
9866 (throw_max_completions_reached_error): Delete.
9867 (complete_line): Adjust to work with a completion_tracker instead
9868 of a VEC. Don't create a completion_tracker_t or check for max
9869 completions here.
9870 (command_completer, command_completer_handle_brkchars)
9871 (signal_completer, reg_or_group_completer_1)
9872 (reg_or_group_completer, default_completer_handle_brkchars):
9873 Adjust to work with a completion_tracker.
9874 (gdb_completion_word_break_characters_throw): New.
9875 (gdb_completion_word_break_characters): Reimplement.
9876 (line_completion_function): Delete.
9877 (completion_tracker::recompute_lowest_common_denominator)
9878 (expand_preserving_ws)
9879 (completion_tracker::build_completion_result)
9880 (completion_result::completion_result)
9881 (completion_result::completion_result)
9882 (completion_result::~completion_result)
9883 (completion_result::completion_result)
9884 (completion_result::release_match_list, compare_cstrings)
9885 (completion_result::sort_match_list)
9886 (completion_result::reset_match_list)
9887 (gdb_rl_attempted_completion_function_throw)
9888 (gdb_rl_attempted_completion_function): New.
9889 * completer.h (completion_list, struct completion_result)
9890 (class completion_tracker): New.
9891 (complete_line): Add completion_tracker parameter.
9892 (readline_line_completion_function): Delete.
9893 (gdb_rl_attempted_completion_function): New.
9894 (noop_completer, filename_completer, expression_completer)
9895 (location_completer, symbol_completer, command_completer)
9896 (signal_completer, reg_or_group_completer): Update prototypes.
9897 (completion_tracker_t, new_completion_tracker)
9898 (make_cleanup_free_completion_tracker): Delete.
9899 (enum maybe_add_completion_enum): Delete.
9900 (maybe_add_completion): Delete.
9901 (throw_max_completions_reached_error): Delete.
9902 * corefile.c (complete_set_gnutarget): Adjust to work with a
9903 completion_tracker instead of a VEC.
9904 * cp-abi.c (cp_abi_completer): Adjust to work with a
9905 completion_tracker instead of a VEC.
9906 * d-lang.c (d_language_defn): Adjust.
9907 * disasm.c (disassembler_options_completer): Adjust to work with a
9908 completion_tracker instead of a VEC.
9909 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9910 (f_collect_symbol_completion_matches): ... this. Adjust to work
9911 with a completion_tracker instead of a VEC.
9912 (f_language_defn): Adjust.
9913 * go-lang.c (go_language_defn): Adjust.
9914 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9915 Adjust to work with a completion_tracker instead of a VEC.
9916 * infrun.c (handle_completer): Likewise.
9917 * interps.c (interpreter_completer): Likewise.
9918 * interps.h (interpreter_completer): Likewise.
9919 * language.c (unknown_language_defn, auto_language_defn)
9920 (local_language_defn): Adjust.
9921 * language.h (language_defn::la_make_symbol_completion_list):
9922 Rename to ...
9923 (language_defn::la_collect_symbol_completion_matches): ... this
9924 and adjust to work with a completion_tracker instead of a VEC.
9925 * m2-lang.c (m2_language_defn): Adjust.
9926 * objc-lang.c (objc_language_defn): Adjust.
9927 * opencl-lang.c (opencl_language_defn): Adjust.
9928 * p-lang.c (pascal_language_defn): Adjust.
9929 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9930 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9931 with a completion_tracker.
9932 * rust-lang.c (rust_language_defn): Adjust.
9933 * symtab.c (free_completion_list, do_free_completion_list)
9934 (return_val, completion_tracker): Delete.
9935 (completion_list_add_name, completion_list_add_symbol)
9936 (completion_list_add_msymbol, completion_list_objc_symbol)
9937 (completion_list_add_fields, add_symtab_completions): Add
9938 completion_tracker parameter and use it.
9939 (default_make_symbol_completion_list_break_on_1): Rename to...
9940 (default_collect_symbol_completion_matches_break_on): ... this.
9941 Add completion_tracker parameter and use it instead of allocating
9942 a completion tracker here.
9943 (default_make_symbol_completion_list_break_on): Delete old
9944 implementation.
9945 (default_make_symbol_completion_list): Delete.
9946 (default_collect_symbol_completion_matches): New.
9947 (make_symbol_completion_list): Delete.
9948 (collect_symbol_completion_matches): New.
9949 (make_symbol_completion_type): Rename to ...
9950 (collect_symbol_completion_matches_type): ... this. Add
9951 completion_tracker parameter and use it instead of VEC.
9952 (make_file_symbol_completion_list_1): Rename to...
9953 (collect_file_symbol_completion_matches): ... this. Add
9954 completion_tracker parameter and use it instead of VEC.
9955 (make_file_symbol_completion_list): Delete.
9956 (add_filename_to_list): Use completion_list instead of a VEC.
9957 (add_partial_filename_data::list): Now a completion_list.
9958 (make_source_files_completion_list): Work with a completion_list
9959 instead of a VEC.
9960 * symtab.h: Include "completer.h".
9961 (default_make_symbol_completion_list_break_on)
9962 (default_make_symbol_completion_list, make_symbol_completion_list)
9963 (make_symbol_completion_type, make_file_symbol_completion_list)
9964 (make_source_files_completion_list): Delete.
9965 (default_collect_symbol_completion_matches_break_on)
9966 (default_collect_symbol_completion_matches)
9967 (collect_symbol_completion_matches)
9968 (collect_symbol_completion_matches_type)
9969 (collect_file_symbol_completion_matches)
9970 (make_source_files_completion_list): New.
9971 * top.c (init_main): Don't install a rl_completion_entry_function
9972 hook. Install a rl_attempted_completion_function hook instead.
9973 * tui/tui-layout.c (layout_completer): Adjust to work with a
9974 completion_tracker.
9975 * tui/tui-regs.c (tui_reggroup_completer):
9976 * tui/tui-win.c (window_name_completer, focus_completer)
9977 (winheight_completer): Adjust to work with a completion_tracker.
9978 * value.c: Include "completer.h".
9979 (complete_internalvar): Adjust to work with a completion_tracker.
9980 * value.h (complete_internalvar): Likewise.
9981
6e1dbf8c
PA
99822017-07-17 Pedro Alves <palves@redhat.com>
9983
9984 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9985 renames.
9986 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9987 comments to completer_ftype's declaration.
9988 <completer_handle_brkchars>: Change type to
9989 completer_handle_brkchars_ftype.
9990 * command.h (completer_ftype): Add describing comment and give
9991 names to parameters.
9992 (completer_ftype_void): Rename to ...
9993 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9994 (set_cmd_completer_handle_brkchars): Adjust.
9995 * completer.c (filename_completer_handle_brkchars): New function.
9996 (complete_line_internal_normal_command): New function, factored
9997 out from ...
9998 (complete_line_internal): ... here.
9999 (command_completer_handle_brkchars)
10000 (default_completer_handle_brkchars)
10001 (completer_handle_brkchars_func_for_completer): New functions.
10002 * completer.h (set_gdb_completion_word_break_characters): Delete
10003 declaration.
10004 (completer_handle_brkchars_func_for_completer): New declaration.
10005 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10006 completer_handle_brkchars_func_for_completer.
10007
78b13106
PA
100082017-07-17 Pedro Alves <palves@redhat.com>
10009
10010 * completer.c (symbol_completer): New function, based on
10011 make_symbol_completion_list_fn.
10012 * completer.h (symbol_completer): New declaration.
10013 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10014 * python/py-cmd.c (completers): Adjust.
10015 * symtab.c (make_symbol_completion_list_fn): Delete.
10016 * symtab.h (make_symbol_completion_list_fn): Delete.
10017 * cli/cli-decode.c (add_cmd): Adjust.
10018
bbf2f4df
PA
100192017-07-17 Pedro Alves <palves@redhat.com>
10020
10021 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10022 * dwarf2read.c: Include "filename-seen-cache.h".
10023 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10024 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10025 * filename-seen-cache.c: New file.
10026 * filename-seen-cache.h: New file.
10027 * symtab.c: Include "filename-seen-cache.h".
10028 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10029 (create_filename_seen_cache, clear_filename_seen_cache)
10030 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10031 to filename-seen-cache.h/filename-seen-cache.c.
10032 (output_source_filename, sources_info)
10033 (maybe_add_partial_symtab_filename)
10034 (make_source_files_completion_list): Adjust to use
10035 filename_seen_cache.
10036
330cdd98
PA
100372017-07-17 Pedro Alves <palves@redhat.com>
10038
10039 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10040 fields.
10041 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10042 dwarf2_debug_sections*)): New.
10043 (dwarf2_per_objfile::dwarf2_per_objfile(const
10044 dwarf2_per_objfile&)): Declare as deleted.
10045 (dwarf2_per_objfile::operator=): Declare as deleted.
10046 (dwarf2_per_objfile::dwarf2_per_objfile)
10047 (dwarf2_per_objfile::~dwarf2_per_objfile)
10048 (dwarf2_per_objfile::free_cached_comp_units): New.
10049 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10050 ctor. Call dwarf2_per_objfile's ctor manually.
10051 (dwarf2_locate_sections): Deleted/refactored as ...
10052 (dwarf2_per_objfile::locate_sections): ... this new method.
10053 (free_cached_comp_units): Defer to
10054 dwarf2_per_objfile::free_cached_comp_units.
10055 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10056
8880f2a9
TT
100572017-07-14 Tom Tromey <tom@tromey.com>
10058
10059 PR rust/21764:
10060 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10061 parameter.
10062 <UNOP_SIZEOF>: Split into separate case.
10063 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10064
65547233
TT
100652017-07-14 Tom Tromey <tom@tromey.com>
10066
10067 PR rust/21763:
10068 * symtab.c (symbol_matches_domain): Add language_rust to special
10069 case.
10070 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10071 treat LOC_TYPEDEF symbols as variables.
10072
8f14146e
PA
100732017-07-14 Pedro Alves <palves@redhat.com>
10074
10075 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10076 symtabs matching all symtabs with SRCFILE as file name instead of
10077 only considering the first hit, with lookup_symtab.
10078
2347965c
SM
100792017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10080
10081 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10082 operator_name parameters.
10083 (gen_expr): Update function call.
10084
40f4af28
SM
100852017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10086
10087 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10088 parameter.
10089 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10090 Likewise.
10091 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10092 parameter, use agent_expr::gdbarch instead, update function
10093 calls.
10094 (locexpr_tracepoint_var_ref): Likewise.
10095 (loclist_tracepoint_var_ref): Likewise.
10096 * ax-gdb.c (gen_trace_static_fields): Likewise.
10097 (gen_traced_pop): Likewise.
10098 (gen_frame_args_address): Likewise.
10099 (gen_frame_locals_address): Likewise.
10100 (gen_var_ref): Likewise.
10101 (gen_struct_ref_recursive): Likewise.
10102 (gen_static_field): Likewise.
10103 (gen_maybe_namespace_elt): Likewise.
10104 (gen_expr): Likewise.
10105 (gen_trace_for_var): Likewise.
10106 (gen_trace_for_expr): Likewise.
10107 (gen_trace_for_return_address): Likewise.
10108
053f8057
SM
101092017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10110
10111 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10112 parameter.
10113 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10114
6661ad48
SM
101152017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10116
10117 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10118 from ax, update calls.
10119 (gen_usual_arithmetic): Likewise.
10120 (gen_integral_promotions): Likewise.
10121 (gen_bitfield_ref): Likewise.
10122 (gen_primitive_field): Likewise.
10123 (gen_struct_ref_recursive): Likewise.
10124 (gen_struct_ref): Likewise.
10125 (gen_maybe_namespace_elt): Likewise.
10126 (gen_struct_elt_for_reference): Likewise.
10127 (gen_namespace_elt): Likewise.
10128 (gen_aggregate_elt_ref): Likewise.
10129 (gen_expr): Get gdbarch from ax, update calls.
10130 (gen_expr_binop_rest): Likewise.
10131
c55a47e7
PA
101322017-07-13 Pedro Alves <palves@redhat.com>
10133
10134 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10135 as default tdesc.
10136 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10137 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10138 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10139 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10140 tdep.
10141 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10142 Get final tdesc from the tdep.
10143 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10144 default tdesc.
10145 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10146 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10147 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10148 Use it as default tdesc.
10149 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10150 down to amd_init_abi. No longer handle fallback tdesc here.
10151 * amd64-tdep.h (tdesc_x32): Declare.
10152 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10153 parameter.
10154 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10155 as default tdesc.
10156
55efceab
AA
101572017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10158
10159 * s390-linux-tdep.c (s390_process_record): Add support for
10160 instructions new in arch12.
10161
0aa37b65
JB
101622017-07-11 John Baldwin <jhb@FreeBSD.org>
10163
10164 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10165 PT_GETFSBASE and PT_GETGSBASE.
10166 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10167 PT_SETGSBASE.
10168
48aeef91
JB
101692017-07-11 John Baldwin <jhb@FreeBSD.org>
10170
10171 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10172 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10173 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10174 those rules.
10175 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10176 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10177 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10178 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10179 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10180 * features/i386/amd64.xml: Add 64bit-segments.xml.
10181 * features/i386/amd64-avx-avx512.c: Regenerated.
10182 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10183 * features/i386/amd64-avx-mpx.c: Regenerated.
10184 * features/i386/amd64-avx.c: Regenerated.
10185 * features/i386/amd64-mpx.c: Regenerated.
10186 * features/i386/amd64.c: Regenerated.
10187 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10188 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10189 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10190 * regformats/i386/amd64-avx.dat: Regenerated.
10191 * regformats/i386/amd64-mpx.dat: Regenerated.
10192 * regformats/i386/amd64.dat: Regenerated.
10193
77c501bc
YQ
101942017-07-10 Yao Qi <yao.qi@linaro.org>
10195
10196 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10197 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10198
6dc8d757
AK
101992017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10200
10201 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10202 unsetenv.
10203 * gnulib/aclocal.m4: Regenerate.
10204 * gnulib/config.in: Regenerate.
10205 * gnulib/configure: Regenerate.
10206 * gnulib/import/Makefile.am: Regenerate.
10207 * gnulib/import/Makefile.in: Regenerate.
10208 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10209 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10210 * gnulib/import/m4/environ.m4: New file.
10211 * gnulib/import/m4/setenv.m4: New file.
10212 * gnulib/import/setenv.c: New file.
10213 * gnulib/import/unsetenv.c: New file.
10214
266934d1
SM
102152017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10216
10217 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10218 address when op is DW_OP_addr.
10219
03278692
TT
102202017-07-09 Tom Tromey <tom@tromey.com>
10221
10222 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10223 check and apply to outer type.
10224
4b654465
JB
102252017-07-07 John Baldwin <jhb@FreeBSD.org>
10226
10227 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10228 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10229 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10230 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10231
2af9fc44
JB
102322017-07-07 John Baldwin <jhb@FreeBSD.org>
10233
10234 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10235
382b69bb
JB
102362017-07-07 John Baldwin <jhb@FreeBSD.org>
10237
10238 * corelow.c (get_core_siginfo): Remove.
10239 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10240 instead of get_core_siginfo.
10241 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10242 * gdbarch.h: Re-generate.
10243 * gdbarch.c: Re-generate.
10244 * linux-tdep.c (linux_core_xfer_siginfo): New.
10245 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10246
6e5eab33
JB
102472017-07-07 John Baldwin <jhb@FreeBSD.org>
10248
10249 * corelow.c (thread_section_name): Move to ...
10250 * gdbcore.h (thread_section_name): ... here.
10251
929edea9
JB
102522017-07-07 John Baldwin <jhb@FreeBSD.org>
10253
10254 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10255 (struct siginfo32): New.
10256 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10257 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10258 via ptrace(PT_LWPINFO).
10259
762c974a
JB
102602017-07-07 John Baldwin <jhb@FreeBSD.org>
10261
10262 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10263 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10264 (fbsd_get_siginfo_type): New.
10265 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10266 (_initialize_fbsd_tdep): New.
10267
33c5cd75
DB
102682017-07-06 David Blaikie <dblaikie@gmail.com>
10269
10270 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10271 a singular dwo_unit*) to support multiple CUs in the same way that
10272 multiple TUs are supported.
10273 (create_cus_hash_table): Replace create_dwo_cu with a function for
10274 parsing multiple CUs from a DWO file.
10275 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10276 create_dwo_cu.
10277 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10278 htab_find, rather than comparing the signature to a singleton CU in
10279 the dwo_file.
10280
8455d262
PA
102812017-07-06 Pedro Alves <palves@redhat.com>
10282
10283 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10284
4da3eb35
PA
102852017-07-04 Pedro Alves <palves@redhat.com>
10286
10287 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10288 * gdbtypes.h (TYPE_STATIC): Delete.
10289 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10290 is_synchronized, is_native>: Delete.
10291 <dummy>: Bump.
10292 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10293 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10294 (TYPE_FN_FIELD_ABSTRACT): Delete.
10295
5bfd255c
SM
102962017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10297
10298 * buffer.h (buffer_finish): Fix spelling mistakes.
10299
25c54127
EZ
103002017-07-01 Eli Zaretskii <eliz@gnu.org>
10301
10302 * .dir-locals.el: Automatically switch to C-style comments in
10303 versions of Emacs that support the feature.
10304
dc4bde35
SDJ
103052017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10306 Pedro Alves <palves@redhat.com>
10307
10308 PR cli/21688
10309 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10310 (process_next_line): New variable 'inline_cmd'.
10311 Adjust 'if' clauses for "python", "compile" and "guile" to use
10312 'command_name_equals' and check for '!inline_cmd'.
10313
51ed89aa
SDJ
103142017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10315
10316 PR cli/21688
10317 * cli/cli-script.c (command_name_equals_not_inline): New function.
10318 (process_next_line): Adjust 'if' clauses for "python", "compile"
10319 and "guile" to use command_name_equals_not_inline.
10320
eb17d413
PA
103212017-06-29 Pedro Alves <palves@redhat.com>
10322
10323 * completer.c (expression_completer): Call
10324 linespec_location_completer instead of location_completer.
10325
195bcdd5
PA
103262017-06-29 Pedro Alves <palves@redhat.com>
10327
10328 * completer.c (expression_completer): Remove code that recomputes
10329 'text' from 'word'.
10330
adc764e7
YQ
103312017-06-29 Yao Qi <yao.qi@linaro.org>
10332
10333 * regformats/regdat.sh: Generate code with
10334 "ifndef IN_PROCESS_AGENT".
10335
6e75794e
PA
103362017-06-28 Pedro Alves <palves@redhat.com>
10337
10338 * command.h: Include "common/scoped_restore.h".
10339
bc491f2e
YQ
103402017-06-28 Yao Qi <yao.qi@linaro.org>
10341
10342 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10343 instead of obstack_grow.
10344
41664b45
DG
103452017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10346
10347 PR gdb/21337
10348 * symfile.c (reread_symbols): Call objfiles_changed just before
10349 read_symbols.
10350
6da67eb1
PA
103512017-06-27 Pedro Alves <palves@redhat.com>
10352
10353 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10354 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10355 (completion_list_add_symbol, completion_list_add_msymbol):
10356 ... these new functions.
10357 (add_symtab_completions)
10358 (default_make_symbol_completion_list_break_on_1): Adjust.
10359
23732b1e
PA
103602017-06-27 Pedro Alves <palves@redhat.com>
10361
10362 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10363 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10364 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10365 dtor.
10366 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10367 'storage_obstack' field an auto_obstack. In-class initialize all
10368 non-bitfield fields. Make minsyms_read bool.
10369 * symfile.c (read_symbols): Adjust.
10370
a4d1e79a
AH
103712017-06-27 Alan Hayward <alan.hayward@arm.com>
10372
10373 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10374 (gdbsim_store_register): Likewise.
10375
8268c778
PA
103762017-06-27 Pedro Alves <palves@redhat.com>
10377
10378 * c-exp.y (name_obstack): Now an auto_obstack.
10379 (yylex): Use auto_obstack::clear.
10380 (c_parse): Use auto_obstack::clear instead of reinitializing and
10381 freeing the obstack.
10382 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10383 * d-exp.y (name_obstack): Now an auto_obstack.
10384 (yylex): Use auto_obstack::clear.
10385 (d_parse): Use auto_obstack::clear instead of reinitializing and
10386 freeing the obstack.
10387 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10388 auto_obstack.
10389 * dwarf2read.c (create_addrmap_from_index)
10390 (dwarf2_build_psymtabs_hard)
10391 (update_enumeration_type_from_children): Likewise.
10392 * gdb_obstack.h (auto_obstack): New type.
10393 * go-exp.y (name_obstack): Now an auto_obstack.
10394 (build_packaged_name): Use auto_obstack::clear.
10395 (go_parse): Use auto_obstack::clear instead of reinitializing and
10396 freeing the obstack.
10397 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10398 auto_obstack.
10399 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10400 * rust-exp.y (work_obstack): Now an auto_obstack.
10401 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10402 reinitializing and freeing the obstack.
10403 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10404 (host_char_to_target): Use auto_obstack.
10405 * utils.h (make_cleanup_obstack_free): Delete declaration.
10406 * valprint.c (generic_emit_char, generic_printstr): Use
10407 auto_obstack.
10408
db665f42
SM
104092017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10410
10411 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10412 thread.
10413 (darwin_init_thread_list): Don't update dummy thread.
10414 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10415
873c0814
SM
104162017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10417
10418 * record-full.c (netorder16): Remove.
10419
8b5a7a6e
SM
104202017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10421
10422 * common/diagnostics.h: Define macros for GCC.
10423 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10424 * common/vec.h: Include diagnostics.h.
10425 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10426 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10427 warning.
10428
d1435379
SM
104292017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10430
10431 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10432 New macro.
10433 * ada-lex.l: Ignore deprecated register warnings.
10434
cc75e0fd
SM
104352017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10436
10437 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10438 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10439
07809eaf
SM
104402017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10441
10442 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10443 its own line.
10444
f076f034
SM
104452017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10446
10447 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10448
0dd5cbc5
AH
104492017-06-23 Alan Hayward <alan.hayward@arm.com>
10450
10451 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10452 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10453 (xtensa_register_read_masked): Likewise.
10454
d4c6ce5b
SDJ
104552017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10456
10457 * common/environ.c (gdb_environ::unset): Update comment.
10458
16892a03
AH
104592017-06-22 Alan Hayward <alan.hayward@arm.com>
10460
10461 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10462 registers.
10463
d7dcbefc
AH
104642017-06-22 Alan Hayward <alan.hayward@arm.com>
10465
10466 * record-full.c (record_full_exec_insn): Use byte_vector.
10467
b30ff123
YQ
104682017-06-22 Yao Qi <yao.qi@linaro.org>
10469
10470 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10471 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10472
4fa847d7
AH
104732017-06-22 Alan Hayward <alan.hayward@arm.com>
10474
10475 * remote.c (cached_reg): Move from here...
10476 * regcache.h (cached_reg): ...to here.
10477 * python/py-unwind.c (struct reg_info): Remove.
10478 (cached_frame_info): Use cached_reg_t.
10479 (pyuw_prev_register): Likewise.
10480 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10481 (pyuw_dealloc_cache): Free all registers.
10482
f4906a9a
PA
104832017-06-22 Pedro Alves <palves@redhat.com>
10484 Simon Marchi <simon.marchi@ericsson.com>
10485
10486 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10487 warning.
10488 * common/diagnostics.h: New file.
10489
b45a1208
PA
104902017-06-22 Pedro Alves <palves@redhat.com>
10491
10492 * common/agent.h: Add include guards.
10493
e4da2c61
SM
104942017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10495
10496 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10497 talk about addressable units instead of bytes.
10498
96160d60
SDJ
104992017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10500
10501 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10502 of '::const_iterator'.
10503
9a6c7d9c
SDJ
105042017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10505
10506 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10507 'unittests/environ-selftests.c'.
10508 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10509 * charset.c (find_charset_names): Declare object 'iconv_env'.
10510 Update code to use 'iconv_env' object. Remove call to
10511 'free_environ'.
10512 * common/environ.c: Include <utility>.
10513 (make_environ): Delete function.
10514 (free_environ): Delete function.
10515 (gdb_environ::clear): New function.
10516 (gdb_environ::operator=): New function.
10517 (gdb_environ::get): Likewise.
10518 (environ_vector): Delete function.
10519 (set_in_environ): Delete function.
10520 (gdb_environ::set): New function.
10521 (unset_in_environ): Delete function.
10522 (gdb_environ::unset): New function.
10523 (gdb_environ::envp): Likewise.
10524 * common/environ.h: Include <vector>.
10525 (struct gdb_environ): Delete; transform into...
10526 (class gdb_environ): ... this class.
10527 (free_environ): Delete prototype.
10528 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10529 environ_vector): Likewise.
10530 * infcmd.c (run_command_1): Update code to call
10531 'envp' from 'gdb_environ' class.
10532 (environment_info): Update code to call methods from 'gdb_environ'
10533 class.
10534 (unset_environment_command): Likewise.
10535 (path_info): Likewise.
10536 (path_command): Likewise.
10537 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10538 (inferior::inferior): Initialize 'environment' using the host's
10539 information.
10540 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10541 Include "environ.h".
10542 (class inferior) <environment>: Change type from 'struct
10543 gdb_environ' to 'gdb_environ'.
10544 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10545 methods from 'gdb_environ' class.
10546 * solib.c (solib_find_1): Likewise
10547 * unittests/environ-selftests.c: New file.
10548
75c554cf
YQ
105492017-06-20 Yao Qi <yao.qi@linaro.org>
10550
10551 * features/i386/i386-linux.xml: Exchange the order of including
10552 32bit-linux.xml and 32bit-sse.xml.
10553 * features/i386/i386-linux.c: Regenerated.
10554
72ddacb7
YQ
105552017-06-20 Yao Qi <yao.qi@linaro.org>
10556
10557 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10558 Delete copy ctor and assignment operator.
10559 (tdesc_type): Likewise.
10560 (tdesc_feature): Likewise.
10561 (tdesc_free_reg): Remove.
10562 (tdesc_create_reg): Use new.
10563 (tdesc_free_type): Remove.
10564 (tdesc_create_vector): Use new.
10565 (tdesc_create_union): Likewise.
10566 (tdesc_create_flags): Likewise.
10567 (tdesc_create_enum): Likewise.
10568 (tdesc_free_feature): Delete.
10569 (free_target_description): Use delete.
10570
325c9fd4
JB
105712017-06-19 John Baldwin <jhb@FreeBSD.org>
10572
10573 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10574 registers.
10575
16b7a719
PA
105762017-06-19 Pedro Alves <palves@redhat.com>
10577
10578 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10579 after gdb::unlinker.
10580
1c8e01c9
SDJ
105812017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10582
10583 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10584 gdb_environ to access an environment variable.
10585
ffce45d2
TP
105862017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10587
10588 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10589 gdb_byte*.
10590
1d4fbac9
SM
105912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10592
10593 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10594
8465943a
SM
105952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10596
10597 * configure: Re-generate.
10598 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10599
3e019bdc
SM
106002017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10601
10602 * configure: Re-generate.
10603 * warning.m4: Pass -Werror to compiler when checking for
10604 supported warning flags.
10605
cf0dd6f0
SM
106062017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10607
10608 * Makefile.in (COMPILE.pre): Add "-x c++".
10609
6f98355c
YQ
106102017-06-16 Alan Hayward <alan.hayward@arm.com>
10611 Pedro Alves <palves@redhat.com>
10612 Yao Qi <yao.qi@linaro.org>
10613
10614 * defs.h (RequireLongest): New.
10615 (extract_integer): Declare function template.
10616 (extract_signed_integer): Remove the declaration, but define it
10617 static inline.
10618 (extract_unsigned_integer): Likewise.
10619 (store_integer): Declare function template.
10620 (store_signed_integer): Remove the declaration, but define it
10621 static inline.
10622 (store_unsigned_integer): Likewise.
10623 * findvar.c (extract_integer): New function template.
10624 (extract_signed_integer): Remove.
10625 (extract_unsigned_integer): Remove.
10626 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10627 instantiations.
10628 (store_integer): New function template.
10629 (store_signed_integer): Remove.
10630 (store_unsigned_integer): Remove.
10631 (store_integer): Explicit instantiations.
10632 * regcache.c (regcache_raw_read_signed): Update.
10633 (regcache::raw_read): New function.
10634 (regcache::raw_read_signed): Remove.
10635 (regcache::raw_read_unsigned): Remove.
10636 (regcache_raw_read_unsigned): Update.
10637 (regcache_raw_write_unsigned): Update.
10638 (regcache::raw_write_signed): Remove.
10639 (regcache::raw_write): New function.
10640 (regcache_cooked_read_signed): Update.
10641 (regcache::raw_write_unsigned): Remove.
10642 (regcache::cooked_read_signed): Remove.
10643 (regcache_cooked_read_unsigned): Update.
10644 (regcache::cooked_read_unsigned): Remove.
10645 (regcache_cooked_write_signed): Update.
10646 (regcache_cooked_write_unsigned): Update.
10647 * regcache.h (regcache) <raw_read_signed>: Remove.
10648 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10649 <raw_read, raw_write>: New.
10650 <cooked_read_signed, cooked_write_signed>: Remove.
10651 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10652 <cooked_read, cooked_write>: New.
10653 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10654 (sh64_pseudo_register_write): Update.
10655
a87dc45a
AK
106562017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10657
10658 * arc-tdep.c (arc_disassembler_options): New variable.
10659 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10660 of default_print_insn.
10661 (arc_delayed_print_insn): Set info->section when needed,
10662 use default_print_insn to retrieve a disassembler.
10663
45159d6a
SDJ
106642017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10665
10666 PR gdb/21574
10667 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10668 to mention $SHELL and startup-with-shell.
10669
b46c4cf0
MF
106702017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10671
10672 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10673
6394c606
YQ
106742017-06-14 Yao Qi <yao.qi@linaro.org>
10675
10676 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10677 default_print_insn instead of print_insn_aarch64.
10678 * arm-tdep.c (gdb_print_insn_arm): Call
10679 default_print_insn instead of print_insn_big_arm
10680 and print_insn_little_arm.
10681 * i386-tdep.c (i386_print_insn): Call default_print_insn
10682 instead of print_insn_i386.
10683 * ia64-tdep.c (ia64_print_insn): Call
10684 default_print_insn instead of print_insn_ia64.
10685 * mips-tdep.c (gdb_print_insn_mips): Call
10686 default_print_insn instead of print_insn_big_mips
10687 and print_insn_little_mips.
10688 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10689 instead of print_insn_spu.
10690
d5722aa2
PA
106912017-06-14 Pedro Alves <palves@redhat.com>
10692
10693 * ada-lang.c: Include "common/byte-vector.h".
10694 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10695 * charset.c (wchar_iterator::iterate): Resize the vector instead
10696 of reserving it.
10697 * common/byte-vector.h: Include "common/def-vector.h".
10698 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10699 * cli/cli-dump.c: Include "common/byte-vector.h".
10700 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10701 * common/byte-vector.h: New file.
10702 * common/def-vector.h: New file.
10703 * common/default-init-alloc.h: New file.
10704 * dwarf2loc.c: Include "common/byte-vector.h".
10705 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10706 instead of reserving it.
10707 * dwarf2read.c: Include "common/byte-vector.h".
10708 (data_buf::m_vec): Now a gdb::byte_vector.
10709 * gdb_regex.c: Include "common/def-vector.h".
10710 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10711 * mi/mi-main.c: Include "common/byte-vector.h".
10712 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10713 * printcmd.c: Include "common/byte-vector.h".
10714 (print_scalar_formatted): Use gdb::byte_vector.
10715 * valprint.c: Include "common/byte-vector.h".
10716 (maybe_negate_by_bytes, print_decimal_chars): Use
10717 gdb::byte_vector.
10718
01ec7a27
SM
107192017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10720
10721 * darwin-nat.c: Include "nat/fork-inferior.h".
10722
848d9074
SM
107232017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10724
10725 * configure.nat: Factor out Darwin bits that are not
10726 architecture-specific. Add fork-inferior.o.
10727
3b912944
SM
107282017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10729
10730 * configure.nat: Factor out AIX bits that are not
10731 architecture-specific. Add fork-inferior.o.
10732
55acdf22
AA
107332017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10734
10735 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10736 (read_pieced_value, write_pieced_value): ...here. Reduce to
10737 wrappers that just call rw_pieced_value.
10738
f65e2044
AA
107392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10740
10741 * dwarf2loc.c (write_pieced_value): When writing the data for a
10742 memory piece, use write_memory_with_notification instead of
10743 write_memory.
10744
23f945bf
AA
107452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10746
10747 * valops.c (read_value_memory): Change embedded_offset to
10748 represent a bit offset instead of a byte offset.
10749 * value.h (read_value_memory): Adjust comment.
10750
f236533e
AA
107512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10752
10753 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10754 dest_offset_bits and source_offset_bits.
10755 (write_pieced_value): Likewise.
10756
65d84b76
AA
107572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10758
10759 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10760 given by DW_OP_bit_piece.
10761 (write_pieced_value): Likewise.
10762
242d31ab
AA
107632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10764
10765 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10766 some other preparations to the places where sufficient information
10767 is available.
10768 (write_pieced_value): Likewise.
10769
03c8af18
AA
107702017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10771
10772 * dwarf2loc.c (bits_to_bytes): New function.
10773 (read_pieced_value): Fix offset calculations for register pieces
10774 on big-endian targets.
10775 (write_pieced_value): Likewise.
10776
840989c1
AA
107772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10778
10779 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10780 (write_pieced_value): Likewise.
10781
359b19bb
AA
107822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10783
10784 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10785 transfer the source value's least significant bits, instead of its
10786 lowest-addressed ones. Rename type_len to max_offset.
10787 (read_pieced_value): Mirror above changes to write_pieced_value as
10788 applicable.
10789
07c9ca3b
AA
107902017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10791
10792 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10793 truncate full bytes from dest_offset_bits before using it as an
10794 offset into the buffer.
10795
f1cc9874
AA
107962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10797
10798 * dwarf2loc.c (write_pieced_value): Include transfer size in
10799 byte-wise check.
10800
cdaac320
AA
108012017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10802
10803 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10804 calculation of this_size.
10805
af547a96
AA
108062017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10807
10808 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10809 when targeting a bit-field.
10810 (write_pieced_value): Likewise.
10811
ddd7882a
AA
108122017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10813
10814 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10815 (allocate_piece_closure): Drop addr_size parameter.
10816 (dwarf2_evaluate_loc_desc_full): Adjust call to
10817 allocate_piece_closure.
10818
e9352324
AA
108192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10820
10821 PR gdb/21226
10822 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10823 the LSB end, independent of endianness.
10824
d5d1163e
AA
108252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10826
10827 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10828 size capping.
10829
032bb6ea
YQ
108302017-06-13 Yao Qi <yao.qi@linaro.org>
10831
10832 * mips-linux-nat.c: Move include features/mips*-linux.c to
10833 mips-linux-tdep.c.
10834 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10835 to mips-linux-tdep.c.
10836 * mips-linux-tdep.c: Include features/mips*-linux.c
10837 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10838 functions.
10839 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10840 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10841 (tdesc_mips64_dsp_linux): Declare.
10842
f12f6bad
TT
108432017-06-12 Tom Tromey <tom@tromey.com>
10844
10845 * valprint.h (val_print_type_code_int): Remove.
10846 * valprint.c (generic_val_print_int): Always call
10847 val_print_scalar_formatted.
10848 (val_print_type_code_int): Remove.
10849 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10850 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10851 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10852 * ada-valprint.c (ada_val_print_num): Use
10853 val_print_scalar_formatted.
10854
d9109c80
TT
108552017-06-12 Tom Tromey <tom@tromey.com>
10856
10857 * printcmd.c (print_scalar_formatted): Unify the two switches.
10858 Don't convert scalars to LONGEST.
10859
4ac0cb1c
TT
108602017-06-12 Tom Tromey <tom@tromey.com>
10861
10862 PR exp/16225:
10863 * valprint.h (print_decimal_chars): Update.
10864 * valprint.c (maybe_negate_by_bytes): New function.
10865 (print_decimal_chars): Add "is_signed" argument.
10866 * printcmd.c (print_scalar_formatted): Update.
10867
30a25466
TT
108682017-06-12 Tom Tromey <tom@tromey.com>
10869
10870 PR exp/16225:
10871 * valprint.h (print_binary_chars, print_hex_chars): Update.
10872 * valprint.c (val_print_type_code_int): Update.
10873 (print_binary_chars): Add "zero_pad" argument.
10874 (emit_octal_digit): New function.
10875 (print_octal_chars): Don't zero-pad.
10876 (print_decimal_chars): Likewise.
10877 (print_hex_chars): Add "zero_pad" argument.
10878 * sh64-tdep.c (sh64_do_fp_register): Update.
10879 * regcache.c (regcache::dump): Update.
10880 * printcmd.c (print_scalar_formatted): Update.
10881 * infcmd.c (default_print_one_register_info): Update.
10882
b3464d03
PA
108832017-06-12 Pedro Alves <palves@redhat.com>
10884 Alan Hayward <alan.hayward@arm.com>
10885
10886 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10887 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10888 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10889 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10890 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10891
4b76cda9
PA
108922017-06-12 Pedro Alves <palves@redhat.com>
10893
10894 * dwarf2read.c (mapped_symtab::data): Now a vector of
10895 symtab_index_entry instead of vector of
10896 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10897 whether an element's name is NULL instead of checking whether the
10898 element itself is NULL.
10899 (find_slot): Change return type. Adjust.
10900 (hash_expand, , add_index_entry, uniquify_cu_indices)
10901 (write_hash_table): Adjust.
10902
e8f8bcb3
PA
109032017-06-12 Pedro Alves <palves@redhat.com>
10904
10905 * dwarf2read.c (recursively_count_psymbols): New function.
10906 (write_psymtabs_to_index): Call it to compute number of psyms and
10907 pass estimate size of psyms_seen to unordered_set's ctor.
10908
70a1152b
PA
109092017-06-12 Pedro Alves <palves@redhat.com>
10910
10911 * dwarf2read.c (write_hash_table): Check if key already exists
10912 before emplacing.
10913
c2f134ac
PA
109142017-06-12 Pedro Alves <palves@redhat.com>
10915
10916 * dwarf2read.c (data_buf::append_space): Rename to...
10917 (data_buf::grow): ... this, and make private. Adjust all callers.
10918 (data_buf::append_uint): New method.
10919 (add_address_entry, write_one_signatured_type)
10920 (write_psymtabs_to_index): Use it.
10921
a81e6d4d
PA
109222017-06-12 Pedro Alves <palves@redhat.com>
10923
10924 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10925 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10926 (data_buf::file_write): Call ::fwrite directly.
10927
6fd931f2
PA
109282017-06-12 Pedro Alves <palves@redhat.com>
10929
10930 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10931 std::vector::erase.
10932
bc8f2430
JK
109332017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10934
10935 Code cleanup: C++ify .gdb_index producer.
10936 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10937 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10938 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10939 (create_strtab, add_string): Remove.
10940 (file_write, data_buf): New.
10941 (struct symtab_index_entry): Use std::vector for cu_indices.
10942 (struct mapped_symtab): Use std::vector for data.
10943 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10944 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10945 Remove.
10946 (find_slot): Change return type. Update it to the new data structures.
10947 (hash_expand, add_index_entry): Update it to the new data structures.
10948 (offset_type_compare): Remove.
10949 (uniquify_cu_indices): Update it to the new data structures.
10950 (c_str_view, c_str_view_hasher, vector_hasher): New.
10951 (add_indices_to_cpool): Remove.
10952 (write_hash_table): Update it to the new data structures.
10953 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10954 (eq_psymtab_cu_index): Remove.
10955 (psym_index_map): New typedef.
10956 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10957 reference and std::unordered_map for cu_index_htab.
10958 (add_address_entry, add_address_entry_worker, write_address_map)
10959 (write_psymbols): Update it to the new data structures.
10960 (write_obstack): Remove.
10961 (struct signatured_type_index_data): Change types_list to a data_buf
10962 reference and psyms_seen to a std::unordered_set reference.
10963 (write_one_signatured_type, recursively_write_psymbols)
10964 (write_psymtabs_to_index): Update it to the new data structures.
10965
c4dcb155
SM
109662017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10967
10968 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10969 separate-debug-file commands.
10970 * symfile.h (separate_debug_file_debug): New global.
10971 * symfile.c (separate_debug_file_debug): New global.
10972 (separate_debug_file_exists, find_separate_debug_file): Add
10973 debug output.
10974 (_initialize_symfile): Add "set debug separate-debug-file"
10975 command.
10976 * build-id.c (build_id_to_debug_bfd,
10977 find_separate_debug_file_by_buildid): Add debug output.
10978
6d45d4b4
SM
109792017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10980
10981 * gdbarch.sh (displaced_step_free_closure): Remove.
10982 * gdbarch.h, gdbarch.c: Re-generate.
10983 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10984 displaced_step_free_closure.
10985 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10986 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10987 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10988 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10989 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10990 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10991 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10992 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10993 * infrun.c (displaced_step_clear): Call xfree instead of
10994 gdbarch_displaced_step_free_closure.
10995
2f91880f
SDJ
109962017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10997
10998 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10999 NULL".
11000
b8b6e72f
AH
110012017-06-08 Alan Hayward <alan.hayward@arm.com>
11002
11003 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11004 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11005 (mn10300_push_dummy_call): Likewise.
11006
5369082e
AH
110072017-06-08 Alan Hayward <alan.hayward@arm.com>
11008
11009 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11010
ff4ca5ac
AH
110112017-06-08 Alan Hayward <alan.hayward@arm.com>
11012
11013 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11014
aefd8b33
SDJ
110152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11016
11017 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11018 able to start inferiors using a shell.
11019 (New remote packets): Announce new packet "QStartupWithShell".
11020 * remote.c: Add PACKET_QStartupWithShell.
11021 (extended_remote_create_inferior): Handle new
11022 PACKET_QStartupWithShell.
11023 (remote_protocol_features) <QStartupWithShell>: New entry for
11024 PACKET_QStartupWithShell.
11025 (_initialize_remote): Call "add_packet_config_cmd" for
11026 QStartupShell.
11027
2090129c
SDJ
110282017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11029 Pedro Alves <palves@redhat.com>
11030
11031 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11032 and "nat/fork-inferior.h".
11033 * common/common-inferior.h: New file, with contents from
11034 "gdb/inferior.h".
11035 * commom/common-utils.c: Include "common-utils.h".
11036 (stringify_argv): New function.
11037 * common/common-utils.h (stringify_argv): New prototype.
11038 * configure.nat: Add "fork-inferior.o" as a dependency for
11039 "*linux*", "fbsd*" and "nbsd*" hosts.
11040 * corefile.c (get_exec_file): Update comment.
11041 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11042 instead of "startup_inferior".
11043 (darwin_create_inferior): Call "add_thread_silent" after
11044 "fork_inferior".
11045 * fork-child.c: Cleanup unnecessary includes.
11046 (SHELL_FILE): Move to "common/common-fork-child.c".
11047 (environ): Likewise.
11048 (exec_wrapper): Initialize.
11049 (get_exec_wrapper): New function.
11050 (breakup_args): Move to "common/common-fork-child.c"; rename to
11051 "breakup_args_for_exec".
11052 (escape_bang_in_quoted_argument): Move to
11053 "common/common-fork-child.c".
11054 (saved_ui): New variable.
11055 (prefork_hook): New function.
11056 (postfork_hook): Likewise.
11057 (postfork_child_hook): Likewise.
11058 (gdb_startup_inferior): Likewise.
11059 (fork_inferior): Move to "common/common-fork-child.c". Update
11060 function to support gdbserver.
11061 (startup_inferior): Likewise.
11062 * gdbcore.h (get_exec_file): Remove declaration.
11063 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11064 instead of "startup_inferior". Call "add_thread_silent" after
11065 "fork_inferior".
11066 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11067 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11068 instead of "startup_inferior". Call "add_thread_silent" after
11069 "fork_inferior".
11070 * inferior.h: Include "common-inferior.h".
11071 (trace_start_error): Move to "common/common-utils.h".
11072 (trace_start_error_with_name): Likewise.
11073 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11074 (startup_inferior): Likewise.
11075 (gdb_startup_inferior): New prototype.
11076 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11077 * nat/fork-inferior.h: New file.
11078 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11079 instead of "startup_inferior". Call "add_thread_silent" after
11080 "fork_inferior".
11081 * target.h (target_terminal_init): Move prototype to
11082 "target/target.h".
11083 (target_terminal_inferior): Likewise.
11084 (target_terminal_ours): Likewise.
11085 * target/target.h (target_terminal_init): New prototype, moved
11086 from "target.h".
11087 (target_terminal_inferior): Likewise.
11088 (target_terminal_ours): Likewise.
11089 * utils.c (gdb_flush_out_err): New function.
11090
043a4934
SDJ
110912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11092
11093 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11094 * common/common-gdbthread.h: New file, with parts from
11095 "gdb/gdbthread.h".
11096 * gdbthread.h: Include "common-gdbthread.h".
11097 (switch_to_thread): Moved to "common/common-gdbthread.h".
11098
15652511
SDJ
110992017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11100
11101 * Makefile.in (SFILES): Add "common/job-control.c".
11102 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11103 (COMMON_OBS): Add "job-control.o".
11104 * common/job-control.c: New file, with contents from
11105 "gdb/inflow.c".
11106 * common/job-control.h: New file, with contents from "terminal.h".
11107 * fork-child.c: Include "job-control.h".
11108 * inflow.c: Include "job-control.h".
11109 (gdb_setpgid): Move to "common/common-inflow.c".
11110 (_initialize_inflow): Move setting of "job_control" to
11111 "handle_job_control".
11112 * terminal.h (job_control): Moved to "common/common-terminal.h".
11113 (gdb_setpgid): Likewise.
11114 * top.c: Include "job_control.h".
11115 * utils.c: Likewise.
11116 (job_control): Moved to "job-control.c".
11117
2d7cc5c7
PA
111182017-06-07 Pedro Alves <palves@redhat.com>
11119
11120 * Makefile.in (SFILES): Add gdb_regex.c.
11121 (COMMON_OBS): Add gdb_regex.o.
11122 * ada-lang.c (ada_add_standard_exceptions)
11123 (ada_add_exceptions_from_frame, name_matches_regex)
11124 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11125 parameter type to compiled_regex. Adjust.
11126 (ada_exceptions_list): Use compiled_regex.
11127 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11128 std::unique_ptr<compiled_regex>.
11129 (exception_catchpoint::~exception_catchpoint): Remove regfree
11130 call.
11131 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11132 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11133 * breakpoint.c (solib_catchpoint::compiled): Now a
11134 std::unique_ptr<compiled_regex>.
11135 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11136 (check_status_catch_solib): Adjust to use compiled_regex.
11137 (add_solib_catchpoint): Adjust to use compiled_regex.
11138 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11139 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11140 compiled_regex reference. Adjust to use it.
11141 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11142 declaration. Include "gdb_regex.h".
11143 (apropos_cmd): Change regex parameter to compiled_regex reference.
11144 * gdb_regex.c: New file.
11145 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11146 declarations.
11147 (class compiled_regex): New.
11148 * linux-tdep.c: Include "common/gdb_optional.h".
11149 (struct mapping_regexes): New, factored out from
11150 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11151 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11152 gdb::optional and remove cleanups. Adjust to compiled_regex.
11153 * probe.c: Include "common/gdb_optional.h".
11154 (collect_probes): Use compiled_regex and gdb::optional and remove
11155 cleanups.
11156 * skip.c: Include "common/gdb_optional.h".
11157 (skiplist_entry::compiled_function_regexp): Now a
11158 gdb::optional<compiled_regex>.
11159 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11160 (free_skiplist_entry): Remove regfree call.
11161 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11162 compiled_regex and gdb::optional.
11163 * symtab.c: Include "common/gdb_optional.h".
11164 (search_symbols): Use compiled_regex and gdb::optional.
11165 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11166 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11167 to gdb_regex.c.
11168
50d6adef
AH
111692017-06-07 Alan Hayward <alan.hayward@arm.com>
11170
11171 * regcache.c (regcache::save): Avoid buffer use.
11172 (regcache::dump): Likewise.
11173
4a8a33c8
AH
111742017-06-07 Alan Hayward <alan.hayward@arm.com>
11175
11176 * sh-tdep.c (sh_pseudo_register_read): Remove
11177 MAX_REGISTER_SIZE.
11178 (sh_pseudo_register_write): Likewise.
11179 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11180 (sh64_pseudo_register_write): Likewise
11181
d1be909e
AH
111822017-06-07 Alan Hayward <alan.hayward@arm.com>
11183
11184 * aarch64-tdep.c (aarch64_store_return_value): Use
11185 V_REGISTER_SIZE.
11186 (aarch64_pseudo_read_value): Likewise.
11187 (aarch64_pseudo_write): Likewise.
11188
f4a65042
YQ
111892017-06-06 Yao Qi <yao.qi@linaro.org>
11190
11191 * regformats/regdef.h (set_register_cache): Remove the
11192 declaration.
11193
9f7fb0aa
AH
111942017-06-06 Alan Hayward <alan.hayward@arm.com>
11195
11196 * frame.c (frame_unwind_register_signed): Use
11197 frame_unwind_register_value.
11198
e1e01040
PA
111992017-06-06 Pedro Alves <palves@redhat.com>
11200
11201 PR breakpoints/21553
11202 * breakpoint.c (create_breakpoints_sal_default)
11203 (init_breakpoint_sal, create_breakpoint_sal): Use
11204 gdb::unique_xmalloc_ptr for string parameters.
11205 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11206 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11207 (base_breakpoint_create_breakpoints_sal)
11208 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11209 (strace_marker_create_breakpoints_sal)
11210 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11211 string parameters.
11212 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11213 gdb::unique_xmalloc_ptr for string parameters.
11214 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11215 parameters.
11216
fbe654c8
AH
112172017-06-06 Alan Hayward <alan.hayward@arm.com>
11218
11219 * alpha-tdep.c (alpha_register_to_value): Use
11220 get_frame_register_value.
11221 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11222
ae0d01d6
AH
112232017-06-06 Alan Hayward <alan.hayward@arm.com>
11224
11225 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11226 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11227 (ia64_value_to_register): Likewise.
11228 (ia64_extract_return_value): Likewise.
11229 (ia64_store_return_value): Likewise.
11230 (ia64_push_dummy_call): Likewise.
11231
49cf576c
JB
112322017-06-04 Joel Brobecker <brobecker@adacore.com>
11233
11234 GDB 8.0 released.
11235
26b6a6ab
SM
112362017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11237
11238 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11239
22827c51
SM
112402017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11241
11242 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11243 parameter.
11244 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11245
0e05cf3a
SM
112462017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11247
11248 * event-loop.c (poll_timers): Unallocate timer using delete
11249 instead of xfree.
11250
c1fc2657
SM
112512017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11252
11253 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11254 (struct breakpoint) <~breakpoint>: New.
11255 (struct watchpoint): Inherit from breakpoint.
11256 <~watchpoint>: New.
11257 <base>: Remove.
11258 (struct tracepoint): Inherit from breakpoint.
11259 <base>: Remove.
11260 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11261 (struct longjmp_breakpoint): Inherit from breakpoint.
11262 <~longjmp_breakpoint>: New.
11263 <base>: Remove.
11264 (new_breakpoint_from_type): Remove casts.
11265 (watchpoint_in_thread_scope): Remove reference to base field.
11266 (watchpoint_del_at_next_stop): Likewise.
11267 (update_watchpoint): Likewise.
11268 (watchpoint_check): Likewise.
11269 (bpstat_check_watchpoint): Likewise.
11270 (set_longjmp_breakpoint): Likewise.
11271 (struct fork_catchpoint): Inherit from breakpoint.
11272 <base>: Remove.
11273 (struct solib_catchpoint): Inherit from breakpoint.
11274 <~solib_catchpoint>: New.
11275 <base>: Remove.
11276 (dtor_catch_solib): Change to ...
11277 (solib_catchpoint::~solib_catchpoint): ... this.
11278 (breakpoint_hit_catch_solib): Remove reference to base field.
11279 (add_solib_catchpoint): Likewise.
11280 (create_fork_vfork_event_catchpoint): Likewise.
11281 (struct exec_catchpoint): Inherit from breakpoint.
11282 <~exec_catchpoint>: New.
11283 <base>: Remove.
11284 (dtor_catch_exec): Change to ...
11285 (exec_catchpoint::~exec_catchpoint): ... this.
11286 (dtor_watchpoint): Change to ...
11287 (watchpoint::~watchpoint): ... this.
11288 (watch_command_1): Remove reference to base field.
11289 (catch_exec_command_1): Likewise.
11290 (base_breakpoint_dtor): Change to ...
11291 (breakpoint::~breakpoint): ... this.
11292 (base_breakpoint_ops): Remove dtor field value.
11293 (longjmp_bkpt_dtor): Change to ...
11294 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11295 (strace_marker_create_breakpoints_sal): Remove reference to base
11296 field.
11297 (delete_breakpoint): Don't manually call breakpoint destructor.
11298 (create_tracepoint_from_upload): Remove reference to base field.
11299 (trace_pass_set_count): Likewise.
11300 (initialize_breakpoint_ops): Don't initialize
11301 momentary_breakpoint_ops, don't set dtors.
11302 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11303 <~ada_catchpoint>: New.
11304 <base>: Remove.
11305 (create_excep_cond_exprs): Remove reference to base field.
11306 (dtor_exception): Change to ...
11307 (ada_catchpoint::~ada_catchpoint): ... this.
11308 (dtor_catch_exception): Remove.
11309 (dtor_catch_exception_unhandled): Remove.
11310 (dtor_catch_assert): Remove.
11311 (create_ada_exception_catchpoint): Remove reference to base
11312 field.
11313 (initialize_ada_catchpoint_ops): Don't set dtors.
11314 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11315 breakpoint.
11316 <~signal_catchpoint>: New.
11317 <base>: Remove.
11318 (signal_catchpoint_dtor): Change to ...
11319 (signal_catchpoint::~signal_catchpoint): ... this.
11320 (create_signal_catchpoint): Remove reference to base field.
11321 (initialize_signal_catchpoint_ops): Don't set dtor.
11322 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11323 from breakpoint.
11324 <~syscall_catchpoint>: New.
11325 <base>: Remove.
11326 (dtor_catch_syscall): Change to ...
11327 (syscall_catchpoint::~syscall_catchpoint): ... this.
11328 (create_syscall_event_catchpoint): Remove reference to base
11329 field.
11330 (initialize_syscall_catchpoint_ops): Don't set dtor.
11331 * break-catch-throw.c (struct exception_catchpoint): Inherit
11332 from breakpoint.
11333 <~exception_catchpoint>: New.
11334 <base>: Remove.
11335 (dtor_exception_catchpoint): Change to ...
11336 (exception_catchpoint::~exception_catchpoint): ... this.
11337 (handle_gnu_v3_exceptions): Remove reference to base field.
11338 (initialize_throw_catchpoint_ops): Don't set dtor.
11339 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11340 field.
11341 * remote.c (remote_get_tracepoint_status): Likewise.
11342 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11343 * tracefile.c (tracefile_fetch_registers): Likewise.
11344 * tracepoint.c (actions_command): Likewise.
11345 (validate_actionline): Likewise.
11346 (tfind_1): Likewise.
11347 (get_traceframe_location): Likewise.
11348 (find_matching_tracepoint_location): Likewise.
11349 (parse_tracepoint_status): Likewise.
11350 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11351
3b0871f4
SM
113522017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11353
11354 * breakpoint.c (struct longjmp_breakpoint): New struct.
11355 (is_tracepoint_type): Change return type to bool.
11356 (is_longjmp_type): New function.
11357 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11358 (set_raw_breakpoint_without_location): Use
11359 new_breakpoint_from_type.
11360 (set_raw_breakpoint): Likewise.
11361
a5e364af
SM
113622017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11363
11364 * breakpoint.c (new_breakpoint_from_type): New function.
11365 (create_breakpoint_sal): Use new_breakpoint_from_type and
11366 unique_ptr.
11367 (create_breakpoint): Likewise.
11368
ae3b3f34
SM
113692017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11370
11371 * memattr.c (mem_info_command): Rename to ...
11372 (info_mem_command): ... this.
11373 (mem_enable_command): Rename to ...
11374 (enable_mem_command): ... this.
11375 (mem_disable_command): Rename to ...
11376 (disable_mem_command): ... this.
11377 (mem_delete_command): Rename to ...
11378 (delete_mem_command): ... this.
11379 (_initialize_mem): Adjust function names.
11380
13ace077
MM
113812017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11382
11383 * btrace.c (handle_pt_insn_events): New.
11384 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11385 STATUS. Split into this and ...
11386 (handle_pt_insn_event_flags): ... this.
11387
c56ccc05
MM
113882017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11389
11390 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11391 and struct pt_insn.resynced.
11392 * configure: Regenerated.
11393 * config.in: Regenerated.
11394
08c3f6d2
TW
113952017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11396
11397 * btrace.c (ftrace_find_call_by_number): New function.
11398 (ftrace_new_function): Store objects, not pointers.
11399 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11400 ftrace_new_gap, ftrace_update_function,
11401 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11402 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11403 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11404 btrace_ends_with_single_insn, btrace_call_get): Account for
11405 btrace_thread_info::functions now storing objects.
11406 * btrace.h (struct btrace_thread_info): Add constructor.
11407 (struct btrace_thread_info) <functions>: Make std::vector.
11408 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11409 Initialize with default values.
11410 * record-btrace.c (record_btrace_frame_sniffer): Account for
11411 btrace_thread_info::functions now storing objects.
11412
8ffd39f2
TW
114132017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11414
11415 * btrace.c: Remove typedef bfun_s.
11416 (ftrace_new_gap): Directly add gaps to the list of gaps.
11417 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11418 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11419 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11420 instead of gdb VEC.
11421
4aeb0dfc
TW
114222017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11423
11424 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11425 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11426 with btrace_thread_info::next_segment and
11427 btrace_thread_info::prev_segment.
11428 * btrace.h: Remove struct btrace_func_link.
11429 (struct btrace_function): Replace pair of function segment pointers
11430 with pair of indices.
11431 * python/py-record-btrace.c (btpy_call_prev_sibling,
11432 btpy_call_next_sibling): Replace references to
11433 btrace_thread_info::segment with btrace_thread_info::next_segment and
11434 btrace_thread_info::prev_segment.
11435 * record-btrace.c (record_btrace_frame_this_id): Use
11436 btrace_find_call_by_number.
11437
eb8f2b9c
TW
114382017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11439
11440 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11441 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11442 btrace_insn_next, btrace_insn_prev): Remove references to
11443 btrace_thread_info::flow.
11444 * btrace.h (struct btrace_function): Remove FLOW.
11445
42bfe59e
TW
114462017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11447
11448 * btrace.c (ftrace_find_call_by_number): New function.
11449 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11450 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11451 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11452 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11453 index.
11454 * btrace.h (struct btrace_function): Turn UP into an index.
11455 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11456 as an index.
11457 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11458 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11459 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11460
b54b03bd
TW
114612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11462
11463 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11464 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11465 ftrace_update_function, ftrace_compute_global_level_offset,
11466 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11467 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11468 btrace_insn_end, btrace_is_empty): Remove references to
11469 btrace_thread_info::begin and btrace_thread_info::end.
11470 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11471 (struct btrace_thread_info) <functions>: Adjust comment.
11472 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11473 btrace_thread_info::begin.
11474
8286623c
TW
114752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11476
11477 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11478 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11479 ftrace_update_function): Remove arguments that implicitly were always
11480 BTINFO->END.
11481 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11482 Don't pass BTINFO->END.
11483
a0f1b963
TW
114842017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11485
11486 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11487 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11488 btrace_find_insn_by_number): Replace function segment pointer with
11489 index.
11490 (btrace_insn_cmp): Simplify.
11491 * btrace.h: (struct btrace_insn_iterator) Rename index to
11492 insn_index. Replace function segment pointer with index into function
11493 segment vector.
11494 * record-btrace.c (record_btrace_call_history): Replace function
11495 segment pointer use with index.
11496 (record_btrace_frame_sniffer): Retrieve function call segment through
11497 vector.
11498 (record_btrace_set_replay): Remove defunc't safety check.
11499
f158f208
TW
115002017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11501
11502 * btrace.c (btrace_ends_with_single_insn): New function.
11503 (btrace_call_get, btrace_call_number, btrace_call_begin,
11504 btrace_call_end, btrace_call_next, btrace_call_prev,
11505 btrace_find_call_by_number): Use index into call segment vector
11506 instead of pointer.
11507 (btrace_call_cmp): Simplify.
11508 * btrace.h (struct btrace_call_iterator): Replace function call segment
11509 pointer with index into vector.
11510 * record-btrace.c (record_btrace_call_history): Use index instead of
11511 pointer.
11512
521103fd
TW
115132017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11514
11515 * btrace.c (btrace_insn_begin, btrace_insn_end,
11516 btrace_find_insn_by_number): Add btinfo to iterator.
11517 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11518
17b89b34
TW
115192017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11520
11521 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11522 and save pointers directly.
11523 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11524 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11525 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11526 changed signature of functions.
11527 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11528 (btrace_fetch): Remove code that adds btrace_function pointers to
11529 vector of btrace_functions.
11530 (btrace_clear): Simplify freeing vector of btrace_functions.
11531
2b51eddc
TW
115322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11533
11534 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11535 Replace VEC_* with std::vector functions.
11536 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11537 (struct btrace_thread_info)<functions>: Change type to std::vector.
11538
db6be0d5
SM
115392017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11540
11541 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11542 "Removed targets and native configurations" up. Merge duplicate
11543 "New commands" sub-sections. Add "New options" sub-sections.
11544
b057297a
AH
115452017-05-26 Alan Hayward <alan.hayward@arm.com>
11546
11547 * defs.h (copy_integer_to_size): New declaration.
11548 * findvar.c (copy_integer_to_size): New function.
11549 (do_cint_test): New selftest function.
11550 (copy_integer_to_size_test): Likewise.
11551 (_initialize_findvar): Likewise.
11552 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11553 (mips_fbsd_collect_reg): Use raw_collect_integer.
11554 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11555 (mips64_fill_gregset): Use raw_collect_integer
11556 (mips64_fill_fpregset): Use raw_supply_integer.
11557 * regcache.c (regcache::raw_supply_integer): New function.
11558 (regcache::raw_collect_integer): Likewise.
11559 * regcache.h: (regcache::raw_supply_integer): New declaration.
11560 (regcache::raw_collect_integer): Likewise.
11561
b77b02a5
YQ
115622017-05-24 Yao Qi <yao.qi@linaro.org>
11563
11564 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11565 (COMMON_OBS): Add gdbarch-selftests.o.
11566 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11567 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11568 * gdbarch-selftests.c: New file.
11569 * regcache.h (regcache) <~regcache>: Mark it virtual if
11570 GDB_SELF_TEST.
11571 <raw_write>: Likewise.
11572
e521e87e
YQ
115732017-05-24 Yao Qi <yao.qi@linaro.org>
11574
11575 * regcache.c (current_regcache): Change it to
11576 regcache::current_regcache.
11577 (regcache_observer_target_changed): Update.
11578 (regcache_thread_ptid_changed): Make it a regcache static
11579 method.
11580 (regcache_thread_ptid_changed): Update.
11581 (class regcache_access): New.
11582 (current_regcache_test): Update.
11583 (_initialize_regcache): Update.
11584 * regcache.h: Include forward_list.
11585 (regcache): Declare regcache_thread_ptid_changed and declare
11586 registers_changed_ptid as friend.
11587
d8e07dda
YQ
115882017-05-24 Yao Qi <yao.qi@linaro.org>
11589
11590 * i387-tdep.c (i387_register_to_value): Use register_size
11591 instead of TYPE_LENGTH.
11592 * m68k-tdep.c (m68k_register_to_value): Likewise.
11593
8c8f9122
YQ
115942017-05-24 Yao Qi <yao.qi@linaro.org>
11595
11596 * i387-tdep.c (i387_convert_register_p): Return false if type
11597 code isn't TYPE_CODE_FLT.
11598
68fce50f
YQ
115992017-05-24 Yao Qi <yao.qi@linaro.org>
11600
11601 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11602 length is 4.
11603 (alpha_register_to_value): Remove type length check.
11604 (alpha_value_to_register): Likewise.
11605
88954b49
YQ
116062017-05-24 Yao Qi <yao.qi@linaro.org>
11607
11608 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11609 TYPE_CODE_FLT.
11610
e3ec9b69
YQ
116112017-05-24 Yao Qi <yao.qi@linaro.org>
11612
11613 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11614 TYPE_CODE_FLT or not.
11615
cdd238da
YQ
116162017-05-24 Yao Qi <yao.qi@linaro.org>
11617
11618 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11619 * avr-tdep.c (avr_gdbarch_init): Likewise.
11620 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11621 * cris-tdep.c (cris_gdbarch_init): Likewise.
11622 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11623 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11624 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11625 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11626 * mep-tdep.c (mep_gdbarch_init): Likewise.
11627 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11628 * mips-tdep.c (mips_gdbarch_init): Likewise.
11629 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11630 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11631 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11632 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11633 * v850-tdep.c (v850_gdbarch_init): Likewise.
11634
7a3929c4
YQ
116352017-05-24 Yao Qi <yao.qi@linaro.org>
11636
11637 * selftest-arch.c (tests_with_arch): Call registers_changed
11638 and reinit_frame_cache.
11639 * selftest.c (run_self_tests): Likewise.
11640
f4985dba
YQ
116412017-05-24 Yao Qi <yao.qi@linaro.org>
11642
11643 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11644 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11645
ab20fa4a
YQ
116462017-05-24 Yao Qi <yao.qi@linaro.org>
11647
11648 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11649 set_gdbarch_print_insn.
11650
f532ab94
YQ
116512017-05-24 Yao Qi <yao.qi@linaro.org>
11652
11653 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11654 set_gdbarch_print_insn.
11655
39503f82
YQ
116562017-05-24 Yao Qi <yao.qi@linaro.org>
11657
11658 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11659 set_gdbarch_print_insn.
11660 * arc-tdep.c (arc_gdbarch_init): Likewise.
11661 * arch-utils.c: include dis-asm.h.
11662 (default_print_insn): New function.
11663 * arch-utils.h (default_print_insn): Declare.
11664 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11665 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11666 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11667 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11668 * frv-tdep.c (frv_gdbarch_init): Likewise.
11669 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11670 * gdbarch.sh (print_insn): Use default_print_insn.
11671 * gdbarch.c: Regenerated.
11672 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11673 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11674 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11675 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11676 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11677 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11678 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11679 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11680 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11681 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11682 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11683 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11684 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11685 * mt-tdep.c (mt_gdbarch_init): Likewise.
11686 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11687 * nios2-tdep.c (nios2_print_insn): Remove.
11688 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11689 * rx-tdep.c (rx_gdbarch_init): Likewise.
11690 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11691 * score-tdep.c (score_print_insn): Remove.
11692 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11693 * sh-tdep.c (sh_gdbarch_init): Likewise.
11694 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11695 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11696 * tic6x-tdep.c (tic6x_print_insn): Remove.
11697 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11698 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11699 * v850-tdep.c (v850_gdbarch_init): Likewise.
11700 * vax-tdep.c (vax_gdbarch_init): Likewise.
11701 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11702 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11703
f7241d4f
JB
117042017-05-23 John Baldwin <jhb@FreeBSD.org>
11705
11706 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11707 (MIPS_FP0_REGNUM): Remove.
11708 (MIPS_FSR_REGNUM): Remove.
11709 (mips_fbsd_supply_fpregs): Use mips_regnum.
11710 (mips_fbsd_supply_gregs): Likewise.
11711 (mips_fbsd_collect_fpregs): Likewise.
11712 (mips_fbsd_collect_gregs): Likewise.
11713
d489d81d
JB
117142017-05-23 John Baldwin <jhb@FreeBSD.org>
11715
11716 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11717 (getpfpregs_supplies): New function.
11718 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11719 getfpregs_supplies.
11720 (mips_fbsd_store_inferior_registers): Likewise.
11721
e11b3cdc
PA
117222017-05-22 Pedro Alves <palves@redhat.com>
11723
11724 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11725 maintainer.
11726
0f068fb5
AH
117272017-05-22 Alan Hayward <alan.hayward@arm.com>
11728
11729 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11730 (store_register): Likewise.
11731 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11732 (get_decimal_float_return_value): Likewise.
11733 (do_ppc_sysv_return_value): Likewise.
11734 (ppc64_sysv_abi_push_integer): Likewise.
11735 (ppc64_sysv_abi_push_freg): Likewise.
11736 (ppc64_sysv_abi_return_value_base): Likewise.
11737 (ppc64_sysv_abi_return_value): Likewise.
11738 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11739 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11740 * rs6000-nat.c: Likewise.
11741 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11742 (rs6000_value_to_register): Likewise.
11743 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11744
e6cf65f2
TT
117452017-05-21 Tom Tromey <tom@tromey.com>
11746
11747 PR rust/21466:
11748 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11749 arrays as "[T]", not "[T; ]".
11750
43cc5389
TT
117512017-05-19 Tom Tromey <tom@tromey.com>
11752
11753 PR rust/21484:
11754 * rust-lang.c (exp_descriptor_rust): New function.
11755 (rust_language_defn): Use it.
11756 * p-lang.c (pascal_language_defn): Update.
11757 * opencl-lang.c (opencl_language_defn): Update.
11758 * objc-lang.c (objc_language_defn): Update.
11759 * m2-lang.c (m2_language_defn): Update.
11760 * language.h (struct language_defn)
11761 <la_watch_location_expression>: New member.
11762 * language.c (unknown_language_defn, auto_language_defn)
11763 (local_language_defn): Update.
11764 * go-lang.c (go_language_defn): Update.
11765 * f-lang.c (f_language_defn): Update.
11766 * d-lang.c (d_language_defn): Update.
11767 * c-lang.h (c_watch_location_expression): Declare.
11768 * c-lang.c (c_watch_location_expression): New function.
11769 (c_language_defn, cplus_language_defn, asm_language_defn)
11770 (minimal_language_defn): Use it.
11771 * breakpoint.c (watch_command_1): Call
11772 la_watch_location_expression.
11773 * ada-lang.c (ada_language_defn): Update.
11774
7a6e7fcc
RO
117752017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11776
6e7e1744
RO
11777 PR tui/21482
11778 * gdb_curses.h (NOMACROS): Define.
11779 (NCURSES_NOMACROS): Define.
11780
117812017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11782
11783 PR tui/21482
7a6e7fcc
RO
11784 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11785 arg to char *.
11786 * tui/tui-wingeneral.c (box_win): Likewise.
11787 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11788 (tui_show_source_line): Likewise.
11789 (tui_show_exec_info_content): Likewise.
11790
1933fd8e
VM
117912017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11792
11793 * sparc-tdep.c (sparc_structure_return_p)
11794 (sparc_arg_on_registers_p): New functions.
11795 (sparc32_store_arguments): Use them.
11796 * sparc64-tdep.c (sparc64_16_byte_align_p)
11797 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11798 Handle TYPE_CODE_ARRAY.
11799
21873064
YQ
118002017-05-17 Yao Qi <yao.qi@linaro.org>
11801
11802 * cli/cli-decode.c (add_alias_cmd): New function.
11803 * command.h (add_alias_cmd): Declare.
11804 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11805 instead call add_alias_cmd.
11806
2b351b19
PA
118072017-05-17 Pedro Alves <palves@redhat.com>
11808
11809 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11810 (nat_makefile_frag): ... this. All references updated.
11811 * configure.ac: Likewise.
11812 * configure.nat: Likewise. Enhance comments.
11813 * configure: Regenerate.
11814
5f2ad7a3
RO
118152017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11816
11817 * procfs.c (procfs_create_inferior): Change prototype to match
11818 definition.
11819
adf3dde5
EZ
118202017-05-13 Eli Zaretskii <eliz@gnu.org>
11821
11822 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11823 C++ compiler warning.
11824
6830f270
TT
118252017-05-12 Tom Tromey <tom@tromey.com>
11826
11827 PR rust/21483:
11828 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11829 recurse, just call value_struct_elt directly.
11830
68f2f2e3
TT
118312017-05-12 Tom Tromey <tom@tromey.com>
11832
11833 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11834 OP_RUST_ARRAY>: Fix.
11835
256afbc2
TT
118362017-05-12 Tom Tromey <tom@tromey.com>
11837
11838 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11839
94bb8dfe
YQ
118402017-05-09 Yao Qi <yao.qi@linaro.org>
11841
11842 * regcache.c: Include <forward_list>.
11843 (struct regcache_list): Remove.
11844 (current_regcache): Update.
11845 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11846 (regcache_thread_ptid_changed): Likewise.
11847 (registers_changed_ptid): Likewise.
11848 (current_regcache_size): Likewise.
11849
8248946c
YQ
118502017-05-09 Yao Qi <yao.qi@linaro.org>
11851
11852 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11853 (current_regcache_size): New function.
11854 (current_regcache_test): New function.
11855 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11856
313c5961
AH
118572017-05-08 Alan Hayward <alan.hayward@arm.com>
11858
11859 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11860 (print_gp_register_row): Use get_frame_register_value.
11861
27bfc1d1
AH
118622017-05-08 Alan Hayward <alan.hayward@arm.com>
11863
11864 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11865 (mips_supply_fpregset): Likewise.
11866 (mips64_supply_gregset): Likewise.
11867
146e6c5c
AH
118682017-05-08 Alan Hayward <alan.hayward@arm.com>
11869
11870 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11871 regcache->raw_supply_zeroed.
11872
e50f25ec
SDJ
118732017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11874
11875 * configure.nat: Rearrange 'case' statements to match
11876 host before cpu.
11877
21ea5acd
SDJ
118782017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11879
11880 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11881 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11882 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11883 "@nat_extra_makefile_frag@".
11884 (Makefile): Remove dependency on "@frags@".
11885 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11886 (data-directory/Makefile): Likewise.
11887 * config/aarch64/linux.mh: Deleted; moved contents to
11888 "gdb/configure.nat".
11889 * config/alpha/alpha-linux.mh: Likewise.
11890 * config/alpha/nbsd.mh: Likewise.
11891 * config/arm/linux.mh: Likewise.
11892 * config/arm/nbsdelf.mh: Likewise.
11893 * config/i386/cygwin.mh: Likewise.
11894 * config/i386/cygwin64.mh: Likewise.
11895 * config/i386/darwin.mh: Likewise.
11896 * config/i386/fbsd.mh: Likewise.
11897 * config/i386/fbsd64.mh: Likewise.
11898 * config/i386/go32.mh: Likewise.
11899 * config/i386/i386gnu.mh: Likewise.
11900 * config/i386/i386sol2.mh: Likewise.
11901 * config/i386/linux.mh: Likewise.
11902 * config/i386/linux64.mh: Likewise.
11903 * config/i386/mingw.mh: Likewise.
11904 * config/i386/mingw64.mh: Likewise.
11905 * config/i386/nbsd64.mh: Likewise.
11906 * config/i386/nbsdelf.mh: Likewise.
11907 * config/i386/nto.mh: Likewise.
11908 * config/i386/obsd.mh: Likewise.
11909 * config/i386/obsd64.mh: Likewise.
11910 * config/i386/sol2-64.mh: Likewise.
11911 * config/ia64/linux.mh: Likewise.
11912 * config/m32r/linux.mh: Likewise.
11913 * config/m68k/linux.mh: Likewise.
11914 * config/m68k/nbsdelf.mh: Likewise.
11915 * config/m68k/obsd.mh: Likewise.
11916 * config/m88k/obsd.mh: Likewise.
11917 * config/mips/fbsd.mh: Likewise.
11918 * config/mips/linux.mh: Likewise.
11919 * config/mips/nbsd.mh: Likewise.
11920 * config/mips/obsd64.mh: Likewise.
11921 * config/pa/linux.mh: Likewise.
11922 * config/pa/nbsd.mh: Likewise.
11923 * config/pa/obsd.mh: Likewise.
11924 * config/powerpc/aix.mh: Likewise.
11925 * config/powerpc/fbsd.mh: Likewise.
11926 * config/powerpc/linux.mh: Likewise.
11927 * config/powerpc/nbsd.mh: Likewise.
11928 * config/powerpc/obsd.mh: Likewise.
11929 * config/powerpc/ppc64-linux.mh: Likewise.
11930 * config/powerpc/spu-linux.mh: Likewise.
11931 * config/s390/linux.mh: Likewise.
11932 * config/sh/nbsd.mh: Likewise.
11933 * config/sparc/fbsd.mh: Likewise.
11934 * config/sparc/linux.mh: Likewise.
11935 * config/sparc/linux64.mh: Likewise.
11936 * config/sparc/nbsd64.mh: Likewise.
11937 * config/sparc/nbsdelf.mh: Likewise.
11938 * config/sparc/obsd64.mh: Likewise.
11939 * config/sparc/sol2.mh: Likewise.
11940 * config/tilegx/linux.mh: Likewise.
11941 * config/vax/nbsdelf.mh: Likewise.
11942 * config/vax/obsd.mh: Likewise.
11943 * config/xtensa/linux.mh: Likewise.
11944 * config/i386/i386gnu.mn: New file, with excerpts from
11945 "config/i386/i386gnu.mh".
11946 * configure: Regenerate.
11947 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11948 *.mh files under "gdb/config".
11949 * configure.nat: New file, with contents from the
11950 "gdb/config/*/*.mh" files.
11951
7ed1acaf
TW
119522017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11953
11954 * btrace.c (btrace_clear): Free insn vector.
11955
e13cb306
PA
119562017-05-05 Pedro Alves <palves@redhat.com>
11957
11958 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11959 * configure: Regenerate.
11960
5ed8105e
PA
119612017-05-04 Pedro Alves <palves@redhat.com>
11962
11963 * Makefile.in (SFILES): Add progspace-and-thread.c.
11964 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11965 (COMMON_OBS): Add progspace-and-thread.o.
11966 * breakpoint.c: Include "progspace-and-thread.h".
11967 (update_inserted_breakpoint_locations)
11968 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11969 Use scoped_restore_current_pspace_and_thread.
11970 (create_std_terminate_master_breakpoint): Use
11971 scoped_restore_current_program_space.
11972 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11973 (print_breakpoint_location): Use
11974 scoped_restore_current_program_space.
11975 (bp_loc_is_permanent): Use
11976 scoped_restore_current_pspace_and_thread.
11977 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11978 (download_tracepoint_locations): Use
11979 scoped_restore_current_pspace_and_thread.
11980 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11981 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11982 (enum step_over_calls_kind): Moved from inferior.h.
11983 (class scoped_restore_current_thread): New class.
11984 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11985 declaration.
11986 (scoped_restore_current_thread): New class.
11987 * infcmd.c: Include "common/gdb_optional.h".
11988 (continue_1, proceed_after_attach): Use
11989 scoped_restore_current_thread.
11990 (notice_new_inferior): Use scoped_restore_current_thread.
11991 * inferior.c: Include "progspace-and-thread.h".
11992 (restore_inferior, save_current_inferior): Delete.
11993 (add_inferior_command, clone_inferior_command): Use
11994 scoped_restore_current_pspace_and_thread.
11995 * inferior.h (scoped_restore_current_inferior): New class.
11996 * infrun.c: Include "progspace-and-thread.h" and
11997 "common/gdb_optional.h".
11998 (follow_fork_inferior): Use
11999 scoped_restore_current_pspace_and_thread.
12000 (scoped_restore_exited_inferior): New class.
12001 (handle_vfork_child_exec_or_exit): Use
12002 scoped_restore_exited_inferior,
12003 scoped_restore_current_pspace_and_thread,
12004 scoped_restore_current_thread and scoped_restore.
12005 (fetch_inferior_event): Use scoped_restore_current_thread.
12006 * linespec.c (decode_line_full, decode_line_1): Use
12007 scoped_restore_current_program_space.
12008 * mi/mi-main.c: Include "progspace-and-thread.h".
12009 (exec_continue): Use scoped_restore_current_thread.
12010 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12011 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12012 * proc-service.c (ps_pglobal_lookup): Use
12013 scoped_restore_current_program_space.
12014 * progspace-and-thread.c: New file.
12015 * progspace-and-thread.h: New file.
12016 * progspace.c (release_program_space, clone_program_space): Use
12017 scoped_restore_current_program_space.
12018 (restore_program_space, save_current_program_space)
12019 (save_current_space_and_thread): Delete.
12020 (switch_to_program_space_and_thread): Moved to
12021 progspace-and-thread.c.
12022 * progspace.h (save_current_program_space)
12023 (save_current_space_and_thread): Delete declarations.
12024 (scoped_restore_current_program_space): New class.
12025 * remote.c (remote_btrace_maybe_reopen): Use
12026 scoped_restore_current_thread.
12027 * symtab.c: Include "progspace-and-thread.h".
12028 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12029 * thread.c (print_thread_info_1): Use
12030 scoped_restore_current_thread.
12031 (struct current_thread_cleanup): Delete.
12032 (do_restore_current_thread_cleanup)
12033 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12034 (scoped_restore_current_thread::~scoped_restore_current_thread):
12035 ... this new dtor.
12036 (make_cleanup_restore_current_thread): Rename/convert to ...
12037 (scoped_restore_current_thread::scoped_restore_current_thread):
12038 ... this new ctor.
12039 (thread_apply_all_command): Use scoped_restore_current_thread.
12040 (thread_apply_command): Use scoped_restore_current_thread.
12041 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12042 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12043
f6223dbb
PA
120442017-05-04 Pedro Alves <palves@redhat.com>
12045
12046 * thread.c (make_cleanup_restore_current_thread): Move
12047 find_thread_ptid call before the is_stopped call. Assert that the
12048 thread is found. Replace is_stopped call by checking the thread's
12049 state directly. Remove unnecessary NULL-thread check.
12050
3c3ae77e
PA
120512017-05-04 Pedro Alves <palves@redhat.com>
12052
12053 * corelow.c (thread_section_name): New class.
12054 (get_core_register_section, get_core_siginfo): Use it.
12055
45eba0ab
AA
120562017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12057
12058 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12059 (get_core_register_section): Remove xfree of NULL pointer.
12060
f81fdd35
AH
120612017-05-03 Alan Hayward <alan.hayward@arm.com>
12062
12063 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12064 * regcache.c (regcache::raw_supply_zeroed): New function.
12065 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12066
35837774
SM
120672017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12068
12069 * gdbarch.sh: Remove commented out definition of
12070 TARGET_CHAR_BIT.
12071 * gdbarch.h: Re-generate.
12072
c94fee56
SDJ
120732017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12074
12075 * configure: Regenerate.
12076
d17f7b36
SM
120772017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12078
12079 * solib-target.c (solib_target_relocate_section_addresses):
12080 Remove num_section_bases, num_bases, segment_bases variables.
12081
b560ebd6
SM
120822017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12083
12084 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12085
f2f46dfc
SM
120862017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12087
12088 * solib-target.c: Include <vector>
12089 (struct lm_info_target) <~lm_info_target>: Remove.
12090 <segment_bases, section_bases>: Change type to
12091 std::vector<CORE_ADDR>.
12092 (library_list_start_segment, library_list_start_section,
12093 library_list_end_library,
12094 solib_target_relocate_section_addresses): Adjust.
12095
a0ff9e1a
SM
120962017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12097
12098 * gdbarch.sh (software_single_step): Change return type to
12099 std::vector<CORE_ADDR>.
12100 * gdbarch.c, gdbarch.h: Re-generate.
12101 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12102 Adjust.
12103 (arm_deal_with_atomic_sequence_raw): Adjust.
12104 (thumb_get_next_pcs_raw): Adjust.
12105 (arm_get_next_pcs_raw): Adjust.
12106 (arm_get_next_pcs): Adjust.
12107 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12108 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12109 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12110 (alpha_software_single_step): Adjust.
12111 * alpha-tdep.h (alpha_software_single_step): Adjust.
12112 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12113 * arm-tdep.c (arm_software_single_step): Adjust.
12114 (arm_breakpoint_kind_from_current_state): Adjust.
12115 * arm-tdep.h (arm_software_single_step): Adjust.
12116 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12117 * cris-tdep.c (cris_software_single_step): Adjust.
12118 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12119 (micromips_deal_with_atomic_sequence): Adjust.
12120 (deal_with_atomic_sequence): Adjust.
12121 (mips_software_single_step): Adjust.
12122 * mips-tdep.h (mips_software_single_step): Adjust.
12123 * moxie-tdep.c (moxie_software_single_step): Adjust.
12124 * nios2-tdep.c (nios2_software_single_step): Adjust.
12125 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12126 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12127 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12128 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12129 * sparc-tdep.c (sparc_software_single_step): Adjust.
12130 * spu-tdep.c (spu_software_single_step): Adjust.
12131 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12132
ea480a30
SM
121332017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12134
12135 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12136 * gdbarch.h: Re-generate.
12137
d050f7d7
TW
121382017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12139
12140 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12141 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12142 * python/py-instruction.c, python/py-instruction.h: New file.
12143 * python/py-record.c: Add py-instruction.h include.
12144 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12145 gdb.RecordInstruction.
12146 * python/python-internal.h: Add gdbpy_initialize_instruction
12147 declaration.
12148 * python/python.c (do_start_initialization): Add
12149 gdbpy_initialize_instruction.
12150
14f819c8
TW
121512017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12152
12153 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12154 Remove.
12155 (btrace_func_from_recpy_func): New function.
12156 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12157 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12158 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12159 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12160 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12161 Also, use new helper functions.
12162 (btpy_list_item): Use new helper functions.
12163 (recpy_bt_function_call_history): Use new type name.
12164 (btpy_call_getset): Remove.
12165 (gdbpy_initialize_btrace): Remove code to initialize
12166 gdb.BtraceFunctionCall.
12167 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12168 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12169 recpy_bt_func_prev, recpy_bt_func_next): New export.
12170 * python/py-record.c (recpy_func_type): New static object.
12171 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12172 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12173 recpy_func_next): New function.
12174 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12175 (recpy_func_getset): New static object.
12176 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12177 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12178
0ed5da75
TW
121792017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12180
12181 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12182 (btpy_object, btpy_insn_type, btpy_new): Remove.
12183 (btpy_list_object): Use gdb.RecordInstruction type instead of
12184 gdb.BtraceInstruction type.
12185 (btrace_insn_from_recpy_insn): New function.
12186 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12187 btpy_new.
12188 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12189 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12190 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12191 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12192 instead of btpy_object.
12193 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12194 btpy_insn_data, btpy_insn_decode): Rename to ...
12195 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12196 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12197 recpy_bt_insn_decode): This. Also, use new helper functions.
12198 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12199 recpy_insn_type.
12200 (btpy_insn_getset): Remove.
12201 (gdbpy_initialize_btrace): Remove code to initialize
12202 gdb.BtraceInstruction. Use recpy_element_object.
12203 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12204 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12205 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12206 * python/py-record.c (recpy_insn_type): New static object.
12207 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12208 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12209 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12210 New function.
12211 (recpy_insn_getset): New static object.
12212 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12213 * python/py-record.h (recpy_element_object): New typedef.
12214 (recpy_insn_type, recpy_insn_new): New export.
12215
913aeadd
TW
122162017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12217
12218 * py-record-btrace.c (btpy_insn_new): Removed.
12219 (btpy_insn_or_gap_new): New function.
12220 (btpy_insn_error): Removed.
12221 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12222 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12223 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12224 btpy_insn_or_gap_new instead of btpy_insn_new.
12225 (btpy_insn_getset): Remove btpy_insn_error.
12226 * py-record.c (recpy_gap_type): New static object.
12227 (recpy_gap_object): New typedef.
12228 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12229 recpy_gap_reason_string): New function.
12230 (recpy_gap_getset): New static object.
12231 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12232 * py-record.h (recpy_gap_new): New export.
12233
a3be24ad
TW
122342017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12235
12236 * python/py-record.c (recpy_ptid): Remove.
12237 (recpy_record_getset): Remove recpy_ptid.
12238
ae20e79a
TW
122392017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12240
12241 * btrace.c (btrace_fetch): Set inferior_ptid.
12242 * python/py-record-btrace.c: Add "py-record.h" include.
12243 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12244 recpy_bt_end, recpy_bt_instruction_history,
12245 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12246 in gdb.Record object instead of current ptid.
12247 * python/py-record.c: Include new "py-record.h" file.
12248 (recpy_record_object): Moved to py-record.h.
12249 * python/py-record.h: New file.
12250
8d0050ea
TW
122512017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12252
12253 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12254 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12255 indentation.
12256
3f380b50
JB
122572017-05-01 Joel Brobecker <brobecker@adacore.com>
12258
12259 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12260 the past maintainers section.
12261
07495424
YQ
122622017-04-28 Yao Qi <yao.qi@linaro.org>
12263
12264 * infcmd.c (get_return_value): Use regcache ctor, and remove
12265 cleanup.
12266
deb1fa3e
YQ
122672017-04-28 Yao Qi <yao.qi@linaro.org>
12268 Pedro Alves <palves@redhat.com>
12269
12270 * regcache.c (regcache::regcache): New tag dispatch ctor.
12271 (do_cooked_read): Moved above.
12272 (regcache_dup): Use the tag dispatch ctor..
12273 * regcache.h (regcache): Declare ctor, delete copy ctor and
12274 assignment operator, remove friend regcache_dup.
12275
b421c83c
YQ
122762017-04-28 Yao Qi <yao.qi@linaro.org>
12277
12278 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12279 call method save instead of regcache_cpy.
12280 * regcache.h (struct regcache): Make regcache_dup a friend.
12281
ef79d9a3
YQ
122822017-04-28 Yao Qi <yao.qi@linaro.org>
12283
12284 * regcache.c (struct regcache): Move to regcache.h
12285 (regcache::arch): New method.
12286 (regcache_get_ptid): Update.
12287 (get_regcache_arch): Call arch method.
12288 (get_regcache_aspace): Call method aspace.
12289 (register_buffer): Change it to method.
12290 (regcache_save): Change it to regcache::save.
12291 (regcache_restore): Likewise.
12292 (regcache_cpy_no_passthrough): Remove the declaration.
12293 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12294 (regcache_cpy_no_passthrough): Change it to method
12295 cpy_no_passthrough.
12296 (regcache_register_status): Change it to method
12297 get_register_status.
12298 (regcache_invalidate): Change it to method invalidate.
12299 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12300 (regcache_raw_update): Change it to method raw_update.
12301 (regcache_raw_read): Likewise.
12302 (regcache_raw_read_signed): Likewise.
12303 (regcache_raw_read_unsigned): Likewise.
12304 (regcache_raw_write_signed): Likewise.
12305 (regcache_raw_write_unsigned): Likewise.
12306 (regcache_cooked_read): Likewise.
12307 (regcache_cooked_read_value): Likewise.
12308 (regcache_cooked_read_signed): Likewise.
12309 (regcache_cooked_read_unsigned): Likewise.
12310 (regcache_cooked_write_signed): Likewise.
12311 (regcache_cooked_write_unsigned): Likewise.
12312 (regcache_raw_set_cached_value): Likewise.
12313 (regcache_raw_write): Likewise.
12314 (regcache_cooked_write): Likewise.
12315 (regcache_xfer_part): Likewise.
12316 (regcache_raw_read_part): Likewise.
12317 (regcache_raw_write_part): Likewise.
12318 (regcache_cooked_read_part): Likewise.
12319 (regcache_cooked_write_part): Likewise.
12320 (regcache_raw_supply): Likewise.
12321 (regcache_raw_collect): Likewise.
12322 (regcache_transfer_regset): Likewise.
12323 (regcache_supply_regset): Likewise.
12324 (regcache_collect_regset): Likewise.
12325 (regcache_debug_print_register): Likewise.
12326 (enum regcache_dump_what): Move it to regcache.h.
12327 (regcache_dump): Change it to method dump.
12328 * regcache.h (enum regcache_dump_what): New.
12329 (class regcache): New.
12330 * target.c (target_fetch_registers): Call method
12331 debug_print_register.
12332 (target_store_registers): Likewise.
12333
f8fdb78e
SM
123342017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12335
12336 * windows-nat.c (struct lm_info_windows): Initialize field.
12337 (windows_make_so): Allocate lm_info_windows with new.
12338 (windows_free_so): Free lm_info_windows with delete.
12339
9ccbfd7b
SM
123402017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12341
12342 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12343 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12344 cleanup.
12345 (darwin_free_so): Free lm_info_darwin with delete.
12346
76e75227
SM
123472017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12348
12349 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12350 <l_addr_p>: Change type to bool.
12351 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12352 (svr4_free_so): Free lm_info_svr4 with delete.
12353 (svr4_copy_library_list): Replace memcpy with call to copy
12354 constructor.
12355 (library_list_start_library, svr4_default_sos): Allocate
12356 lm_info_svr4 with new.
12357
51046d9e
SM
123582017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12359
12360 * solib-target.c (struct lm_info_target): Add destructor,
12361 initialize fields.
12362 <name>: Change type to std::string.
12363 (library_list_start_library): Allocate lm_info_target with new.
12364 (solib_target_free_library_list): Free lm_info_target with
12365 delete.
12366 (solib_target_current_sos): Adapt to std::string.
12367 (solib_target_free_so): Free lm_info_target with delete.
12368
4023ae76
SM
123692017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12370
12371 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12372 fields.
12373 (frv_current_sos): Allocate lm_info_frv with new.
12374 (frv_relocate_main_executable): Free lm_info_frv with delete,
12375 allocate with new.
12376 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12377
af43057b
SM
123782017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12379
12380 * solib-frv.c (struct lm_info_frv): Fix indentation.
12381
b0911207
SM
123822017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12383
12384 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12385 map field.
12386 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12387 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12388 and allocate with new.
12389 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12390
6c401f72
SM
123912017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12392
12393 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12394 <filename, member_name>: Change type to std::string.
12395 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12396 (library_list_start_library): Allocate lm_info_aix with new.
12397 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12398 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12399 with copy constructor.
12400
d0e449a1
SM
124012017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12402
12403 * solist.h (struct lm_info): Remove.
12404 (struct lm_info_base): New class.
12405 (struct so_list) <lm_info>: Change type to lm_info_base *.
12406 * nto-tdep.c (struct lm_info): Remove.
12407 (lm_addr): Adjust.
12408 * solib-aix.c (struct lm_info): Rename to ...
12409 (struct lm_info_aix): ... this. Extend lm_info_base.
12410 (lm_info_p): Rename to ...
12411 (lm_info_aix_p): ... this, and adjust.
12412 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12413 solib_aix_parse_libraries, library_list_start_library,
12414 solib_aix_free_library_list, solib_aix_parse_libraries,
12415 solib_aix_get_library_list,
12416 solib_aix_relocate_section_addresses, solib_aix_free_so,
12417 solib_aix_get_section_offsets,
12418 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12419 Adjust.
12420 (struct solib_aix_inferior_data) <library_list>: Adjust.
12421 * solib-darwin.c (struct lm_info): Rename to ...
12422 (struct lm_info_darwin): ... this. Extend lm_info_base.
12423 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12424 * solib-dsbt.c (struct lm_info): Rename to ...
12425 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12426 (struct dsbt_info) <main_executable_lm_info): Adjust.
12427 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12428 dsbt_relocate_section_addresses): Adjust.
12429 * solib-frv.c (struct lm_info): Rename to ...
12430 (struct lm_info_frv): ... this. Extend lm_info_base.
12431 (main_executable_lm_info): Adjust.
12432 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12433 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12434 find_canonical_descriptor_in_load_object,
12435 frv_fdpic_find_canonical_descriptor): Adjust.
12436 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12437 to lm_info_svr4.
12438 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12439 svr4_clear_so, svr4_copy_library_list,
12440 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12441 svr4_current_sos, svr4_fetch_objfile_link_map,
12442 solist_update_incremental): Adjust.
12443 * solib-svr4.h (struct lm_info_svr4): Move here from
12444 solib-svr4.c.
12445 * solib-target.c (struct lm_info): Rename to ...
12446 (struct lm_info_target): ... this. Extend lm_info_base.
12447 (lm_info_p): Rename to ...
12448 (lm_info_target_p): ... this.
12449 (solib_target_parse_libraries, library_list_start_segment,
12450 library_list_start_section, library_list_start_library,
12451 library_list_end_library, solib_target_free_library_list,
12452 solib_target_current_sos, solib_target_free_so,
12453 solib_target_relocate_section_addresses): Adjust.
12454 * windows-nat.c (struct lm_info): Rename to ...
12455 (struct lm_info_windows): ... this. Extend lm_info_base.
12456 (windows_make_so, handle_load_dll, handle_unload_dll,
12457 windows_xfer_shared_libraries): Adjust.
12458
434a4023
SM
124592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12460
12461 * solib-darwin.c (struct darwin_so_list): Remove.
12462 (darwin_current_sos): Allocate an so_list object instead of a
12463 darwin_so_list, separately allocate an lm_info object.
12464 (darwin_free_so): Free lm_info.
12465
428544e8
JB
124662017-04-28 John Baldwin <jhb@FreeBSD.org>
12467
12468 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12469 with fprintf_filtered.
12470
4621115f
YQ
124712017-04-28 Yao Qi <yao.qi@linaro.org>
12472
12473 * regcache.c (regcache::regcache): New function.
12474 (regcache::~regcache): New function.
12475 (regcache_xmalloc_1): Remove.
12476 (regcache_xmalloc): Call new regcache.
12477 (regcache_xfree): Call delete regcache.
12478 (get_thread_arch_aspace_regcache): Call new regcache.
12479
339053c2
YQ
124802017-04-28 Yao Qi <yao.qi@linaro.org>
12481
12482 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12483 lwp instead of ptid_get_lwp.
12484
7974a605
YQ
124852017-04-28 Yao Qi <yao.qi@linaro.org>
12486
12487 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12488 lwp_info instead of getting from inferior_ptid.
12489
e15c3eb4
KS
124902017-04-27 Keith Seitz <keiths@redhat.com>
12491
12492 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12493 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12494 (CV_CONVERSION_BADNESS): Define.
12495 (rank_one_type): Remove overly restrictive rvalue reference
12496 rank checks.
12497 Add cv-qualifier checks and subranks for type equality.
12498 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12499 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12500 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12501
72bc1d24
SM
125022017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12503
12504 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12505 count when creating the object.
12506
55bcecda
UW
125072017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12508 Ulrich Weigand <uweigand@de.ibm.com>
12509
12510 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12511 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12512 is used in AIX.
12513 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12514 (process_xcoff_symbol): Likewise.
12515 (scan_xcoff_symtab): Likewise.
12516
5c99fcf8
AH
125172017-04-26 Alan Hayward <alan.hayward@arm.com>
12518
12519 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12520 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12521 (ia64_access_reg): Use get_frame_register_unsigned.
12522 (ia64_access_rse_reg): Likewise.
12523 (ia64_libunwind_frame_prev_register): Likewise.
12524
b41c5a85
JW
125252017-04-26 Jiong Wang <jiong.wang@arm.com>
12526
12527 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12528 * gdbarch.c: Regenerated.
12529 * gdbarch.h: Regenerated.
12530 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12531 visibility external.
12532 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12533 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12534 (enum cfa_how_kind): Move to ...
12535 (struct dwarf2_frame_state_reg_info): Likewise.
12536 (struct dwarf2_frame_state): Likewise.
12537 * dwarf2-frame.h: ... here.
12538 (dwarf2_frame_state_alloc_regs): New declaration.
12539 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12540 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12541
c185f580
AH
125422017-04-26 Alan Hayward <alan.hayward@arm.com>
12543
12544 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12545 regcache_raw_read_unsigned.
12546 (xtensa_pseudo_register_write): Likewise.
12547
19c45594
AH
125482017-04-26 Alan Hayward <alan.hayward@arm.com>
12549
12550 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12551 (nds32_pseudo_register_write): Likewise.
12552
4658f12e
YQ
125532017-04-25 Yao Qi <yao.qi@linaro.org>
12554
12555 * regcache.c (struct regcache) <readonly_p>: Change its type
12556 to bool.
12557 (regcache_xmalloc_1): Update parameter type and callers update.
12558
d581dda8
YQ
125592017-04-25 Yao Qi <yao.qi@linaro.org>
12560
12561 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12562 set_gdbarch_wchar_bit.
12563 * arm-tdep.c (arm_gdbarch_init): Likewise.
12564
debed3db
PA
125652017-04-25 Pedro Alves <palves@redhat.com>
12566
12567 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12568 (BothAreRelocatable, memcopy, memmove): Don't define.
12569 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12570 macros.
12571
b0b92aeb
PA
125722017-04-25 Pedro Alves <palves@redhat.com>
12573
12574 * common/common-defs.h: Include "common/poison.h".
12575 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12576 and adjust.
12577 * common/poison.h: New file.
12578 * common/traits.h: Include <type_traits>.
12579 (Not, Or, Requires): New, moved from common/function-view.h.
12580
16c4d54a
PA
125812017-04-25 Pedro Alves <palves@redhat.com>
12582
12583 * breakpoint.h (struct breakpoint): In-class initialize all
12584 fields. Make boolean fields "bool".
12585 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12586 memset call and initializations no longer necessary.
12587
b5c36682
PA
125882017-04-25 Pedro Alves <palves@redhat.com>
12589
12590 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12591 reference.
12592 (pt_btrace_insn): New function.
12593 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12594
5625a286
PA
125952017-04-25 Pedro Alves <palves@redhat.com>
12596
12597 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12598 "base" field and inherit from "bp_location" instead. Add
12599 non-default ctor.
12600 (allocate_location_exception): Use new non-default ctor.
12601 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12602 (init_bp_location): Convert to ...
12603 (bp_location::bp_location): ... this new ctor, and remove memset
12604 call.
12605 (base_breakpoint_allocate_location): Use the new non-default ctor.
12606 * breakpoint.h (bp_location): Now a class. Declare default and
12607 non-default ctors. In-class initialize all members.
12608 (init_bp_location): Remove declaration.
12609
23bcc18f
PA
126102017-04-25 Pedro Alves <palves@redhat.com>
12611
12612 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12613 assignment operator.
12614
e1ba3053
YQ
126152017-04-24 Yao Qi <yao.qi@linaro.org>
12616
12617 * doublest.c (convert_doublest_to_floatformat): Call
12618 floatformat_totalsize_bytes.
12619
10f489e5
TT
126202017-04-22 Tom Tromey <tom@tromey.com>
12621
12622 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12623 ui_out_emit_list.
12624 * stack.c (print_frame): Use ui_out_emit_list.
12625 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12626 ui_out_emit_list.
12627 * mi/mi-main.c (print_one_inferior)
12628 (mi_cmd_data_list_register_names)
12629 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12630 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12631 ui_out_emit_list.
12632 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12633 (mi_output_solib_attribs): Use ui_out_emit_list,
12634 ui_out_emit_tuple.
12635 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12636 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12637 (mi_cmd_stack_list_args, list_args_or_locals): Use
12638 ui_out_emit_list.
12639 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12640 * breakpoint.c (print_solib_event, output_thread_groups): Use
12641 ui_out_emit_list.
12642
0092b74d
TT
126432017-04-22 Tom Tromey <tom@tromey.com>
12644
12645 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12646 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12647 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12648
a14a62dd
TT
126492017-04-22 Tom Tromey <tom@tromey.com>
12650
12651 * tracepoint.c (tvariables_info_1)
12652 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12653
46b9c129
TT
126542017-04-22 Tom Tromey <tom@tromey.com>
12655
12656 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12657 annotate_arg_emitter.
12658 * breakpoint.c (print_mention_watchpoint)
12659 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12660 * annotate.h (struct annotate_arg_emitter): New.
12661
2e783024
TT
126622017-04-22 Tom Tromey <tom@tromey.com>
12663
12664 * record-btrace.c (record_btrace_insn_history)
12665 (record_btrace_insn_history_range, record_btrace_call_history)
12666 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12667 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12668 ui_out_emit_tuple.
12669 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12670 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12671 * skip.c (skip_info): Use ui_out_emit_tuple.
12672 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12673 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12674 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12675 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12676 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12677 ui_out_emit_tuple.
12678 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12679 (output_register, mi_cmd_data_read_memory)
12680 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12681 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12682 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12683 Use ui_out_emit_tuple.
12684 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12685 ui_out_emit_tuple.
12686 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12687 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12688 * linux-thread-db.c (info_auto_load_libthread_db): Use
12689 ui_out_emit_tuple.
12690 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12691 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12692 * disasm.c (do_mixed_source_and_assembly_deprecated)
12693 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12694 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12695 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12696 * breakpoint.c (print_one_breakpoint_location)
12697 (print_one_breakpoint): Use ui_out_emit_tuple.
12698 * auto-load.c (print_script, info_auto_load_cmd): Use
12699 ui_out_emit_tuple.
12700 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12701
9be21bb4
SM
127022017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12703
12704 * thread.c (print_thread_info_1): Remove dead code.
12705
0d4c07af
JK
127062017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12707
12708 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12709 GDB_SELF_TEST.
12710 * arm-tdep.c (selftests::arm_record_test): Likewise.
12711
4daf993d
YQ
127122017-04-21 Yao Qi <yao.qi@linaro.org>
12713
12714 * regcache.c (regcache_restore): Remove argument 2. Replace
12715 argument 3 with regcache. Get register status from
12716 src->register_status and get register contents from
12717 register_buffer (src, regnum).
12718 (regcache_cpy): Update.
12719
a6c21d4a
PA
127202017-04-19 Pedro Alves <palves@redhat.com>
12721
12722 * gdbthread.h (thread): Add missing closing parenthesis in
12723 comment.
12724
3a3fd0fd
PA
127252017-04-19 Pedro Alves <palves@redhat.com>
12726
12727 * common/refcounted-object.h: New file.
12728 * gdbthread.h: Include "common/refcounted-object.h".
12729 (thread_info): Inherit from refcounted_object and add comments.
12730 (thread_info::incref, thread_info::decref)
12731 (thread_info::m_refcount): Delete.
12732 (thread_info::deletable): Use the refcounted_object::refcount()
12733 method.
12734 * inferior.c (current_inferior_): Add comment.
12735 (set_current_inferior): Increment/decrement refcounts.
12736 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12737 not-deletable instead of comparing with the current inferior.
12738 (initialize_inferiors): Increment the initial inferior's refcount.
12739 * inferior.h (struct inferior): Forward declare.
12740 Include "common/refcounted-object.h".
12741 (current_inferior, set_current_inferior): Move declaration to
12742 before struct inferior's definition, and fix comment.
12743 (inferior): Inherit from refcounted_object. Add comments.
12744 * thread.c (switch_to_thread_no_regs): Reference the thread's
12745 inferior pointer directly instead of doing a ptid lookup.
12746 (switch_to_no_thread): New function.
12747 (switch_to_thread(thread_info *)): New function, factored out
12748 from ...
12749 (switch_to_thread(ptid_t)): ... this.
12750 (restore_current_thread): Delete.
12751 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12752 fields, and add 'inf' field.
12753 (do_restore_current_thread_cleanup): Check whether old->inf is
12754 alive instead of looking up an inferior by ptid. Use
12755 switch_to_thread and switch_to_no_thread.
12756 (restore_current_thread_cleanup_dtor): Use old->inf directly
12757 instead of lookup up an inferior by id. Decref the inferior.
12758 Don't restore 'removable'.
12759 (make_cleanup_restore_current_thread): Same the inferior pointer
12760 in old, instead of the inferior number. Incref the inferior.
12761 Don't save/clear 'removable'.
12762
9bcb1f16
PA
127632017-04-19 Pedro Alves <palves@redhat.com>
12764
12765 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12766 unittests/scoped_restore-selftests.c.
12767 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12768 * common/scoped_restore.h (scoped_restore_base): Make "class".
12769 (scoped_restore_base::release): New public method.
12770 (scoped_restore_base::scoped_restore_base): New protected ctor.
12771 (scoped_restore_base::m_saved_var): New protected field.
12772 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12773 scoped_restore_base base class instead of m_saved_var directly.
12774 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12775 (scoped_restore_tmpl::scoped_restore_tmpl(const
12776 scoped_restore_tmpl<T>&)): Likewise.
12777 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12778 method.
12779 (scoped_restore_tmpl::saved_var): New method.
12780 (scoped_restore_tmpl::m_saved_var): Delete.
12781 * inferior.h (inferior::detaching): Now a bool.
12782 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12783 cleanup.
12784 * unittests/scoped_restore-selftests.c: New file.
12785
26fcd539
PA
127862017-04-19 Pedro Alves <palves@redhat.com>
12787
12788 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12789 Re-sort in alphabetic order.
12790
fdd243b0
PA
127912017-04-18 Pedro Alves <palves@redhat.com>
12792
12793 * xml-support.c (obstack_xml_printf): Delete.
12794 * xml-support.h (obstack_xml_printf): Delete.
12795
4895cde2
PA
127962017-04-18 Pedro Alves <palves@redhat.com>
12797
12798 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12799 vdebug, verror, body_text, start_element, end_element, name,
12800 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12801 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12802 is_xinclude>: Make private and add m_ prefix.
12803 (gdb_xml_parser::body_text): New method, based on ...
12804 (gdb_xml_body_text): ... this. Adjust.
12805 (gdb_xml_parser::vdebug): New method, based on ...
12806 (gdb_xml_debug): ... this. Adjust.
12807 (gdb_xml_parser::verror): New method, based on ...
12808 (gdb_xml_error): ... this. Adjust.
12809 (gdb_xml_parser::start_element): New method, based on ...
12810 (gdb_xml_start_element): ... this. Adjust.
12811 (gdb_xml_start_element_wrapper): Defer to
12812 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12813 (gdb_xml_parser::end_element): New method, based on ...
12814 (gdb_xml_end_element_wrapper): ... this. Adjust.
12815 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12816 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12817 (gdb_xml_parser::use_dtd): New method, based on ...
12818 (gdb_xml_use_dtd): ... this. Adjust.
12819 (gdb_xml_parser::parse): New method, based on ...
12820 (gdb_xml_parse): ... this. Adjust.
12821 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12822 (xinclude_start_include): Adjust to call the parser's name method.
12823 (xml_xinclude_default, xml_xinclude_start_doctype)
12824 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12825 method.
12826 (xml_process_xincludes): Adjust to call parser methods.
12827 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12828 declarations.
12829
bd8a901f
PA
128302017-04-18 Pedro Alves <palves@redhat.com>
12831
12832 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12833 gdb::optional<std::string>.
12834 * xml-support.c: Include <string>.
12835 (scope_level::scope_level(scope_level &&))
12836 (scope_level::~scope_level): Delete.
12837 (scope_level::body): Now a std::string.
12838 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12839 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12840 parameter.
12841 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12842 (xinclude_parsing_data::output): Now a std::string reference.
12843 (xinclude_start_include): Adjust.
12844 (xml_xinclude_default): Adjust.
12845 (xml_process_xincludes): Add 'output' parameter, and return bool.
12846 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12847 and return bool.
12848 * xml-tdesc.c: Include <unordered_map> and <string>.
12849 (tdesc_xml_cache): Delete.
12850 (tdesc_xml_cache_s): Delete.
12851 (xml_cache): Now an std::unordered_map.
12852 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12853 (target_fetch_description_xml): Change return type to
12854 gdb::optional<std::string>, and adjust.
12855 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12856 (target_fetch_description_xml): Change return type to
12857 gdb::optional<std::string>.
12858
d35d1958
PA
128592017-04-18 Pedro Alves <palves@redhat.com>
12860
12861 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12862 unittests/optional-selftests.c.
12863 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12864 * unittests/optional-selftests.c: New file.
12865 * unittests/optional/assignment/1.cc: New file.
12866 * unittests/optional/assignment/2.cc: New file.
12867 * unittests/optional/assignment/3.cc: New file.
12868 * unittests/optional/assignment/4.cc: New file.
12869 * unittests/optional/assignment/5.cc: New file.
12870 * unittests/optional/assignment/6.cc: New file.
12871 * unittests/optional/assignment/7.cc: New file.
12872 * unittests/optional/cons/copy.cc: New file.
12873 * unittests/optional/cons/default.cc: New file.
12874 * unittests/optional/cons/move.cc: New file.
12875 * unittests/optional/cons/value.cc: New file.
12876 * unittests/optional/in_place.cc: New file.
12877 * unittests/optional/observers/1.cc: New file.
12878 * unittests/optional/observers/2.cc: New file.
12879
22796e97
PA
128802017-04-18 Pedro Alves <palves@redhat.com>
12881
12882 * common/gdb_optional.h: Include common/traits.h.
12883 (in_place_t): New type.
12884 (in_place): New constexpr variable.
12885 (optional::optional): Remove member initialization of
12886 m_instantiated.
12887 (optional::optional(in_place_t...)): New constructor.
12888 (optional::~optional): Use reset.
12889 (optional::optional(const optional&)): New.
12890 (optional::optional(const optional&&)): New.
12891 (optional::optional(T &)): New.
12892 (optional::optional(T &&)): New.
12893 (operator::operator=(const optional &)): New.
12894 (operator::operator=(optional &&)): New.
12895 (operator::operator= (const T &))
12896 (operator::operator= (T &&))
12897 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12898 (operator::reset): New.
12899 (operator::m_instantiated):: Add in-class initializer.
12900 * common/traits.h: Include <type_traits>.
12901 (struct And): New types.
12902
a7fc9b61
PA
129032017-04-18 Pedro Alves <palves@redhat.com>
12904
12905 * xml-support.c: Include <vector>.
12906 (scope_level::scope_level(const gdb_xml_element *))
12907 (scope_level::scope_level(scope_level&&)): New.
12908 (scope_level::~scope_level): New.
12909 (scope_level_s): Delete.
12910 (gdb_xml_parser::scopes): Now a std::vector.
12911 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12912 Use std::vector.
12913 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12914 scope cleanup code.
12915 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12916 of the scopes member. Use std::vector::emplace_back.
12917
010151c9
PA
129182017-04-18 Pedro Alves <palves@redhat.com>
12919
12920 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12921 a bool.
12922 (gdb_xml_end_element): Change type of first parameter.
12923 (gdb_xml_cleanup): Rename to ...
12924 (gdb_xml_parser::~gdb_xml_parser): ... this.
12925 (gdb_xml_create_parser_and_cleanup): Delete with ...
12926 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12927 to this new ctor.
12928 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12929 using gdb_xml_create_parser_and_cleanup.
12930 (xinclude_parsing_data): Add ctor/dtor.
12931 (xml_xinclude_cleanup): Delete.
12932 (xml_process_xincludes): Create a local xinclude_parsing_data
12933 instead of heap-allocating one. Create a local gdb_xml_parser
12934 instead of heap-allocating one with
12935 gdb_xml_create_parser_and_cleanup.
12936
d56060f0
JB
129372017-04-18 John Baldwin <jhb@FreeBSD.org>
12938
12939 PR threads/20743
12940 * fbsd-nat.c (resume_one_thread_cb): Remove.
12941 (resume_all_threads_cb): Remove.
12942 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12943 iterate_over_threads.
12944
305d16a9
JB
129452017-04-17 Joel Brobecker <brobecker@adacore.com>
12946
12947 * NEWS: Create a new section for the next release branch.
12948 Rename the section of the current branch, now that it has
12949 been cut.
12950
8bb57231
JB
129512017-04-17 Joel Brobecker <brobecker@adacore.com>
12952
12953 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12954 * version.in: Bump version to 8.0.50.DATE-git.
12955
096c92dd
SDJ
129562017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12957
12958 PR gdb/21385
12959 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12960 independently of the host, and fix build breakage on Cygwin.
12961
0550c955
PA
129622017-04-13 Pedro Alves <palves@redhat.com>
12963
12964 * inferior.c (free_inferior): Convert to ...
12965 (inferior::~inferior): ... this dtor.
12966 (inferior::inferior): New ctor, factored out from ...
12967 (add_inferior_silent): ... here. Allocate the inferior with a new
12968 expression.
12969 (delete_inferior): Call delete instead of free_inferior.
12970 * inferior.h (gdb_environ, continuation): Forward declare.
12971 (inferior): Now a class. Add in-class initialization to all
12972 members. Make boolean fields bool, except 'detaching'.
12973 (inferior::inferior): New explicit ctor.
12974 (inferior::~inferior): New.
12975
e3d60dfc
PA
129762017-04-13 Pedro Alves <palves@redhat.com>
12977
12978 * inferior.c (init_inferior_list): Delete.
12979 * inferior.h (init_inferior_list): Delete.
12980
5fd69d0a
PA
129812017-04-13 Pedro Alves <palves@redhat.com>
12982
12983 PR threads/13217
12984 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12985 (top level): Call it twice, with different thread sets.
12986
c6609450
PA
129872017-04-13 Pedro Alves <palves@redhat.com>
12988
12989 * thread.c: Include <algorithm>.
12990 (thread_array_cleanup): Delete.
12991 (scoped_inc_dec_ref): New class.
12992 (live_threads_count): New function.
12993 (set_thread_refcount): Delete.
12994 (tp_array_compar_ascending): Now a bool.
12995 (tp_array_compar): Convert to a std::sort comparison function.
12996 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12997 and live_threads_count.
12998
2a00d7ce
PA
129992017-04-13 Pedro Alves <palves@redhat.com>
13000
13001 * infrun.c (follow_fork_inferior): Also switch the current
13002 inferior.
13003
441d7c93
PA
130042017-04-13 Pedro Alves <palves@redhat.com>
13005
13006 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13007 before calling create_internal_breakpoint.
13008
808480f6
PA
130092017-04-13 Pedro Alves <palves@redhat.com>
13010
13011 * fork-child.c (execv_argv): New class.
13012 (breakup_args): Refactored as ...
13013 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13014 Copy arguments to storage and replace separators with NULL
13015 terminators in place.
13016 (escape_bang_in_quoted_argument): Adjust to return bool.
13017 (execv_argv::execv_argv): New ctor.
13018 (execv_argv::init_for_shell): New method, factored out from
13019 fork_inferior. Don't strdup strings into the vector.
13020 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13021 Remove free_vector_argv call.
13022
ad3d022a
YQ
130232017-04-13 Yao Qi <yao.qi@linaro.org>
13024
13025 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13026 tdep->rx_psw_type.
13027
e6ddc3bf
YQ
130282017-04-13 Yao Qi <yao.qi@linaro.org>
13029
13030 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13031 * rx-tdep.c (rx_gdbarch_init): Likewise.
13032
bfb8cf90
PA
130332017-04-13 Pedro Alves <palves@redhat.com>
13034
13035 * breakpoint.h (struct breakpoint): Reindent.
13036
f5336ca5
PA
130372017-04-13 Pedro Alves <palves@redhat.com>
13038
13039 * breakpoint.c (bp_location): Rename to ...
13040 (bp_locations): ... this. All references updated.
13041 (bp_location_count): Rename to ...
13042 (bp_locations_count): ... this. All references updated.
13043 (bp_location_placed_address_before_address_max): Rename to ...
13044 (bp_locations_placed_address_before_address_max): ... this. All
13045 references updated.
13046 (bp_location_shadow_len_after_address_max): Rename to ...
13047 (bp_locations_shadow_len_after_address_max): ... this. All
13048 references updated.
13049 (bp_location_compare_addrs): Rename to ...
13050 (bp_locations_compare_addrs): ... this. All references updated.
13051 (bp_location_compare):Rename to ...
13052 (bp_locations_compare): ... this. All references updated.
13053 (bp_location_target_extensions_update): Rename to ...
13054 (bp_locations_target_extensions_update): ... this. All references
13055 updated.
13056
be628ab8
SDJ
130572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13058
13059 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13060 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13061 'sgtty.h'.
13062 * common/gdb_termios.h: New file, with parts of "terminal.h".
13063 * inflow.c: Include "gdb_termios.h".
13064 * ser-unix.c: Include "gdb_termios.h".
13065 * terminal.h: Move terminal-related defines to
13066 "common/gdb_termios.h".
13067
8e9e35b1
TT
130682017-04-12 Tom Tromey <tom@tromey.com>
13069
13070 * probe.c (parse_probes): Update.
13071 * location.h (delete_event_location): Don't declare.
13072 (event_location_deleter::operator()): Update.
13073 * location.c (event_location_deleter::operator()): Rename from
13074 delete_event_location.
13075 * linespec.h (linespec_result) <location>: Change type to
13076 event_location_up.
13077 * linespec.c (canonicalize_linespec, event_location_to_sals)
13078 (decode_objc): Update.
13079 (linespec_result): Don't call delete_event_location.
13080 * breakpoint.c (create_breakpoints_sal)
13081 (bkpt_probe_create_sals_from_location)
13082 (strace_marker_create_sals_from_location): Update.
13083
16e802b9
TT
130842017-04-12 Tom Tromey <tom@tromey.com>
13085
13086 * linespec.h (struct linespec_result): Add constructor and
13087 destructor.
13088 (init_linespec_result, destroy_linespec_result)
13089 (make_cleanup_destroy_linespec_result): Don't declare.
13090 * linespec.c (init_linespec_result): Remove.
13091 (linespec_result::~linespec_result): Rename from
13092 destroy_linespec_result. Update.
13093 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13094 Remove.
13095 * breakpoint.c (create_breakpoint, break_range_command)
13096 (decode_location_default): Update.
13097 * ax-gdb.c (agent_command_1): Update.
13098
d28cd78a
TT
130992017-04-12 Tom Tromey <tom@tromey.com>
13100
13101 * remote.c (remote_download_tracepoint): Update.
13102 * python/py-breakpoint.c (bppy_get_location): Update.
13103 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13104 (gdbscm_breakpoint_location): Update.
13105 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13106 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13107 Change type to event_location_up.
13108 * breakpoint.c (create_overlay_event_breakpoint)
13109 (create_longjmp_master_breakpoint)
13110 (create_std_terminate_master_breakpoint)
13111 (create_exception_master_breakpoint)
13112 (breakpoint_event_location_empty_p, print_breakpoint_location)
13113 (print_one_breakpoint_location, create_thread_event_breakpoint)
13114 (init_breakpoint_sal, create_breakpoint)
13115 (print_recreate_ranged_breakpoint, break_range_command)
13116 (init_ada_exception_breakpoint, say_where): Update.
13117 (base_breakpoint_dtor): Don't call delete_event_location.
13118 (bkpt_print_recreate, tracepoint_print_recreate)
13119 (dprintf_print_recreate, update_static_tracepoint)
13120 (breakpoint_re_set_default): Update.
13121
711799d5
TT
131222017-04-12 Tom Tromey <tom@tromey.com>
13123
13124 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13125 type of "to_do". Update.
13126 (compute_stack_depth): Use std::vector.
13127
52d214d3
TT
131282017-04-12 Tom Tromey <tom@tromey.com>
13129
13130 * printcmd.c (find_instruction_backward): Use std::vector.
13131
4c404b8b
TT
131322017-04-12 Tom Tromey <tom@tromey.com>
13133
13134 * symfile.c (objfilep): Remove typedef.
13135 (reread_symbols): Use a std::vector.
13136
156d9eab
TT
131372017-04-12 Tom Tromey <tom@tromey.com>
13138
13139 * mi/mi-main.c (exec_direction_forward): Remove.
13140 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13141 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13142 scoped_restore.
13143 * guile/guile.c (guile_repl_command, guile_command)
13144 (gdbscm_execute_gdb_command): Use scoped_restore.
13145 * go-exp.y (go_parse): Use scoped_restore.
13146 * d-exp.y (d_parse): Use scoped_restore.
13147 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13148 * c-exp.y (c_parse): Use scoped_restore.
13149
4d89769a
TT
131502017-04-12 Tom Tromey <tom@tromey.com>
13151
13152 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13153 (mi_parse): Update return type.
13154 (mi_parse_free): Remove.
13155 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13156 (mi_parse::~mi_parse): Rename from mi_parse_free.
13157 (mi_parse_cleanup): Remove.
13158 (mi_parse): Return a unique_ptr. Use new.
13159 * mi/mi-main.c (mi_execute_command): Update.
13160
4b217cc7
TT
131612017-04-12 Tom Tromey <tom@tromey.com>
13162
13163 * location.c (explicit_location_lex_one): Return a
13164 unique_xmalloc_ptr.
13165 (string_to_explicit_location): Update. Remove cleanups.
13166
59d3651b
TT
131672017-04-12 Tom Tromey <tom@tromey.com>
13168
13169 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13170 (compare_value_and_voffset): Change type. Update.
13171 (compute_vtable_size): Change type of "offset_vec".
13172 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13173 (gnuv3_get_typeid): Remove extraneous declaration.
13174
b24b0d6c
TT
131752017-04-12 Tom Tromey <tom@tromey.com>
13176
13177 * charset.h (wchar_iterator): Fix comment.
13178
80a3b8c5
TT
131792017-04-12 Tom Tromey <tom@tromey.com>
13180
13181 * charset.c (iconv_wrapper): New class.
13182 (cleanup_iconv): Remove.
13183 (convert_between_encodings): Use it.
13184
c83dd867
TT
131852017-04-12 Tom Tromey <tom@tromey.com>
13186
13187 * symfile.h (increment_reading_symtab): Update type.
13188 * symfile.c (decrement_reading_symtab): Remove.
13189 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13190 * psymtab.c (psymtab_to_symtab): Update.
13191 * dwarf2read.c (dw2_instantiate_symtab): Update.
13192
0e8621a0
TT
131932017-04-12 Tom Tromey <tom@tromey.com>
13194
13195 * jit.c (struct jit_reader): Declare separately. Add constructor
13196 and destructor. Change type of "handle".
13197 (loaded_jit_reader): Define separately.
13198 (jit_reader_load): Update. New "new".
13199 (jit_reader_unload_command): Use "delete".
13200 * gdb-dlfcn.h (struct dlclose_deleter): New.
13201 (gdb_dlhandle_up): New typedef.
13202 (gdb_dlopen, gdb_dlsym): Update types.
13203 (gdb_dlclose): Remove.
13204 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13205 (gdb_dlsym): Change type of "handle".
13206 (make_cleanup_dlclose): Remove.
13207 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13208 * compile/compile-c-support.c (load_libcc): Update.
13209
67d89901
TT
132102017-04-12 Tom Tromey <tom@tromey.com>
13211
13212 * symtab.h (find_pcs_for_symtab_line): Change return type.
13213 * symtab.c (find_pcs_for_symtab_line): Change return type.
13214 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13215 type of "vec". Update.
13216 (ltpy_get_pcs_for_line): Update.
13217 * linespec.c (decode_digits_ordinary): Update.
13218
93921405
TT
132192017-04-12 Tom Tromey <tom@tromey.com>
13220
13221 * tracepoint.c (actions_command): Update.
13222 * python/python.c (python_command, python_interactive_command):
13223 Update.
13224 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13225 * guile/guile.c (guile_command): Update.
13226 * defs.h (read_command_lines, read_command_lines_1): Return
13227 command_line_up.
13228 (command_lines_deleter): New struct.
13229 (command_line_up): New typedef.
13230 * compile/compile.c (compile_code_command)
13231 (compile_print_command): Update.
13232 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13233 command_line_up.
13234 (make_cleanup_free_command_lines): Remove.
13235 * cli/cli-script.c (get_command_line, read_command_lines_1)
13236 (copy_command_lines): Return command_line_up.
13237 (while_command, if_command, read_command_lines, define_command)
13238 (document_command): Update.
13239 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13240 Remove.
13241 * breakpoint.h (breakpoint_set_commands): Change type of
13242 "commands".
13243 * breakpoint.c (breakpoint_set_commands): Change type of
13244 "commands". Update.
13245 (do_map_commands_command, update_dprintf_command_list)
13246 (create_tracepoint_from_upload): Update.
13247
ffc2605c
TT
132482017-04-12 Tom Tromey <tom@tromey.com>
13249
13250 * tracepoint.c (scope_info): Update.
13251 * spu-tdep.c (spu_catch_start): Update.
13252 * python/python.c (gdbpy_decode_line): Update.
13253 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13254 * python/py-breakpoint.c (bppy_init): Update.
13255 * probe.c (parse_probes): Update.
13256 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13257 * location.h (event_location_deleter): New struct.
13258 (event_location_up): New typedef.
13259 (new_linespec_location, new_address_location, new_probe_location)
13260 (new_explicit_location, copy_event_location)
13261 (string_to_event_location, string_to_event_location_basic)
13262 (string_to_explicit_location): Update return type.
13263 (make_cleanup_delete_event_location): Remove.
13264 * location.c (new_linespec_location, new_address_location)
13265 (new_probe_location, new_explicit_location, copy_event_location):
13266 Return event_location_up.
13267 (delete_event_location_cleanup)
13268 (make_cleanup_delete_event_location): Remove.
13269 (string_to_explicit_location, string_to_event_location_basic)
13270 (string_to_event_location): Return event_location_up.
13271 * linespec.c (canonicalize_linespec, event_location_to_sals)
13272 (decode_line_with_current_source)
13273 (decode_line_with_last_displayed, decode_objc): Update.
13274 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13275 * completer.c (location_completer): Update.
13276 * cli/cli-cmds.c (edit_command, list_command): Update.
13277 * breakpoint.c (create_overlay_event_breakpoint)
13278 (create_longjmp_master_breakpoint)
13279 (create_std_terminate_master_breakpoint)
13280 (create_exception_master_breakpoint)
13281 (create_thread_event_breakpoint): Update.
13282 (init_breakpoint_sal): Update. Remove some dead code.
13283 (create_breakpoint_sal): Change type of "location". Update.
13284 (create_breakpoints_sal, create_breakpoint, break_command_1)
13285 (dprintf_command, break_range_command, until_break_command)
13286 (init_ada_exception_breakpoint)
13287 (strace_marker_create_sals_from_location)
13288 (update_static_tracepoint, trace_command, ftrace_command)
13289 (strace_command, create_tracepoint_from_upload): Update.
13290 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13291 * ax-gdb.c (agent_command_1): Update.
13292
8f10c932
PA
132932017-04-12 Pedro Alves <palves@redhat.com>
13294
13295 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13296 * configure.tgt: Handle i[34567]86-*-go32* and
13297 i[34567]86-*-msdosdjgpp*.
13298 * i386-tdep.c (i386_svr4_reg_to_regnum):
13299 Make extern.
13300 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13301 i386-go32-tdep.c.
13302 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13303 * i386-go32-tdep.c: New file.
13304 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13305 declarations.
13306
0a31ccfb
SM
133072017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13308
13309 * aix-thread.c (pd_status2str): Change return type to const char *.
13310
e9bb3fbb
PA
133112017-04-12 Pedro Alves <palves@redhat.com>
13312
13313 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13314 calls to set_gdbarch_gnu_triplet_regexp.
13315
53375380
PA
133162017-04-12 Pedro Alves <palves@redhat.com>
13317
13318 PR gdb/21323
13319 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13320 New enum value.
13321 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13322 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13323 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13324 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13325 * gdbarch.h, gdbarch.c: Regenerate.
13326 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13327 gdbarch_wchar_bit and gdbarch_wchar_signed.
13328 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13329 * arm-tdep.c (arm_gdbarch_init): Likewise.
13330 * avr-tdep.c (avr_gdbarch_init): Likewise.
13331 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13332 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13333 * i386-tdep.c (i386_go32_init_abi): Likewise.
13334 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13335 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13336 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13337 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13338 * sh-tdep.c (sh_gdbarch_init): Likewise.
13339 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13340 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13341 * windows-tdep.c (windows_init_abi): Likewise.
13342 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13343
53e710ac
PA
133442017-04-12 Pedro Alves <palves@redhat.com>
13345
13346 PR c++/21323
13347 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13348 cplus_primitive_type_char32_t>: New enum values.
13349 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13350 and cplus_primitive_type_char32_t.
13351 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13352 32, use the archtecture's built-in type for char16_t and char32_t,
13353 respectively. Otherwise, fallback to init_integer_type as before,
13354 but make the type unsigned, and issue a complaint.
13355 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13356
ab0538b8
AH
133572017-04-12 Alan Hayward <alan.hayward@arm.com>
13358
5e0e0422 13359 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13360 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13361
5430098f
SDJ
133622017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13363
13364 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13365 'const char *'.
13366
7c5ded6a
SDJ
133672017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13368
13369 * common/common-utils.c (free_vector_argv): New function.
13370 * common/common-utils.h: Include <vector>.
13371 (free_vector_argv): New prototype.
13372 * darwin-nat.c (darwin_create_inferior): Rewrite function
13373 prototype in order to constify "exec_file" and accept a
13374 "std::string" for "allargs".
13375 * fork-child.c: Include <vector>.
13376 (breakup_args): Rewrite function, using C++.
13377 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13378 and accept "std::string" for "allargs". Update the code to
13379 calculate "argv" based on "allargs". Update calls to "exec_fun"
13380 and "execvp".
13381 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13382 order to constify "exec_file" and accept a "std::string" for
13383 "allargs".
13384 * go32-nat.c (go32_create_inferior): Likewise.
13385 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13386 * infcmd.c (run_command_1): Constify "exec_file". Use
13387 "std::string" for inferior arguments.
13388 * inferior.h (fork_inferior): Update prototype.
13389 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13390 prototype in order to constify "exec_file" and accept a
13391 "std::string" for "allargs".
13392 * nto-procfs.c (procfs_create_inferior): Likewise.
13393 * procfs.c (procfs_create_inferior): Likewise.
13394 * remote-sim.c (gdbsim_create_inferior): Likewise.
13395 * remote.c (extended_remote_run): Update code to accept
13396 "std::string" as argument.
13397 (extended_remote_create_inferior): Rewrite function prototype in
13398 order to constify "exec_file" and accept a "std::string" for
13399 "allargs".
13400 * rs6000-nat.c (super_create_inferior): Likewise.
13401 (rs6000_create_inferior): Likewise.
13402 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13403 * windows-nat.c (windows_create_inferior): Likewise.
13404
ae0eee42
PA
134052017-04-11 Pedro Alves <palves@redhat.com>
13406
13407 * thread.c: Fix whitespace throughout.
13408
a6acac06
PR
134092017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13410
13411 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13412
64403bd1
AH
134132017-04-11 Alan Hayward <alan.hayward@arm.com>
13414
13415 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13416
a5bef50f
SDJ
134172017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13418
13419 PR gdb/21364
13420 * osdata.c (info_osdata): Check if 'type' is an empty string
13421 instead of NULL.
13422
9295a5a9
PA
134232017-04-10 Pedro Alves <palves@redhat.com>
13424
13425 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13426 (ptid_to_global_thread_id, in_thread_list)
13427 (do_captured_list_thread_ids, set_resumed, set_running)
13428 (set_executing, set_stop_requested, finish_thread_state)
13429 (validate_registers_access, can_access_registers_ptid)
13430 (print_thread_info_1, switch_to_thread)
13431 (do_restore_current_thread_cleanup)
13432 (make_cleanup_restore_current_thread, thread_command)
13433 (thread_name_command): Use operator== instead of ptid_equal.
13434
996812e3
PA
134352017-04-10 Pedro Alves <palves@redhat.com>
13436
13437 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13438 (current_thread_cleanup_chain): Delete.
13439 (restore_current_thread_cleanup_dtor)
13440 (make_cleanup_restore_current_thread): Remove references to
13441 current_thread_cleanup_chain.
13442
845b344f
AH
134432017-04-10 Alan Hayward <alan.hayward@arm.com>
13444
13445 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13446 REG_UNKNOWN.
13447
803bdfe4
YQ
134482017-04-10 Yao Qi <yao.qi@linaro.org>
13449
13450 PR gdb/19942
13451 * gdbthread.h (thread_info::deletable): New method.
13452 (thread_info::incref): New method.
13453 (thread_info::decref): New method.
13454 (thread_info::refcount): Move it to private.
13455 * infrun.c (save_stop_context): Call inc_refcount.
13456 (release_stop_context_cleanup): Likewise.
13457 * thread.c (set_thread_exited): New function.
13458 (init_thread_list): Delete "tp" only it is deletable, otherwise
13459 call set_thread_exited.
13460 (delete_thread_1): Call set_thread_exited.
13461 (current_thread_cleanup) <inferior_pid>: Remove.
13462 <thread>: New field.
13463 (restore_current_thread_ptid_changed): Removed.
13464 (do_restore_current_thread_cleanup): Adjust.
13465 (restore_current_thread_cleanup_dtor): Don't call
13466 find_thread_ptid.
13467 (set_thread_refcount): Use dec_refcount.
13468 (make_cleanup_restore_current_thread): Adjust.
13469 (thread_apply_all_command): Call inc_refcount.
13470 (_initialize_thread): Don't call
13471 observer_attach_thread_ptid_changed.
13472
8c25b497
YQ
134732017-04-10 Yao Qi <yao.qi@linaro.org>
13474
13475 * thread.c (delete_thread_1): Hoist code on marking thread as
13476 exited.
13477
8473b447
SM
134782017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13479
13480 * windows-nat.c (windows_detach): Initialize ptid with
13481 minus_one_ptid.
13482
6670ec13
SM
134832017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13484
13485 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13486
ba2f91bb
AH
134872017-04-07 Alan Hayward <alan.hayward@arm.com>
13488
13489 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13490 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13491 (bfin_pseudo_register_write): Likewise
13492
436252de
SM
134932017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13494
13495 * common/ptid.h (struct ptid): Change to...
13496 (class ptid_t): ... this.
13497 <ptid_t>: New constructors.
13498 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13499 matches>: New methods.
13500 <make_null, make_minus_one>: New static methods.
13501 <pid>: Rename to...
13502 <m_pid>: ...this.
13503 <lwp>: Rename to...
13504 <m_lwp>: ...this.
13505 <tid>: Rename to...
13506 <m_tid>: ...this.
13507 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13508 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13509 as references, move comment to class ptid_t.
13510 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13511 ptid_t static methods.
13512 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13513 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13514 Take ptid arguments as references, implement using ptid_t methods.
13515 * unittests/ptid-selftests.c: New file.
13516 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13517 unittests/ptid-selftests.c.
13518 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13519
0dedf377
TP
135202017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13521
13522 * python/python.c (python_run_simple_file): Cast mode literal to
13523 non-const char pointer as expected by PyFile_FromString.
13524
4e9868d4
SM
135252017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13526
13527 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13528 minus_one_ptid and null_ptid.
13529
9bf2a700
PA
135302017-04-05 Pedro Alves <palves@redhat.com>
13531
13532 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13533 * configure: Regenerate.
13534
a121b7c1
PA
135352017-04-05 Pedro Alves <palves@redhat.com>
13536
13537 * ada-exp.y (yyerror): Constify.
13538 * ada-lang.c (bound_name, get_selections)
13539 (ada_variant_discrim_type)
13540 (ada_variant_discrim_name, ada_value_struct_elt)
13541 (ada_lookup_struct_elt_type, is_unchecked_variant)
13542 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13543 (catch_ada_exception_command_split)
13544 (catch_ada_assert_command_split, catch_assert_command)
13545 (ada_op_name): Constify.
13546 * ada-lang.h (ada_yyerror, get_selections)
13547 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13548 * arc-tdep.c (arc_print_frame_cache): Constify.
13549 * arm-tdep.c (arm_skip_stub): Constify.
13550 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13551 (gen_aggregate_elt_ref): Constify.
13552 * bcache.c (print_bcache_statistics): Constify.
13553 * bcache.h (print_bcache_statistics): Constify.
13554 * break-catch-throw.c (catch_exception_command_1):
13555 * breakpoint.c (struct ep_type_description::description):
13556 Constify.
13557 (add_solib_catchpoint): Constify.
13558 (catch_fork_command_1): Add cast.
13559 (add_catch_command): Constify.
13560 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13561 Constify.
13562 * bsd-uthread.c (bsd_uthread_state): Constify.
13563 * buildsym.c (patch_subfile_names): Constify.
13564 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13565 Constify.
13566 * c-exp.y (yyerror): Constify.
13567 (token::oper): Constify.
13568 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13569 * c-varobj.c (cplus_describe_child): Constify.
13570 * charset.c (find_charset_names): Add cast.
13571 (find_charset_names): Constify array and add const_cast.
13572 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13573 (edit_command): Constify.
13574 * cli/cli-decode.c (lookup_cmd): Constify.
13575 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13576 Constify.
13577 (struct dump_context): Constify.
13578 (add_dump_command, restore_command): Constify.
13579 * cli/cli-script.c (get_command_line): Constify.
13580 * cli/cli-script.h (get_command_line): Constify.
13581 * cli/cli-utils.c (check_for_argument): Constify.
13582 * cli/cli-utils.h (check_for_argument): Constify.
13583 * coff-pe-read.c (struct read_pe_section_data): Constify.
13584 * command.h (lookup_cmd): Constify.
13585 * common/print-utils.c (decimal2str): Constify.
13586 * completer.c (gdb_print_filename): Constify.
13587 * corefile.c (set_gnutarget): Constify.
13588 * cp-name-parser.y (yyerror): Constify.
13589 * cp-valprint.c (cp_print_class_member): Constify.
13590 * cris-tdep.c (cris_register_name, crisv32_register_name):
13591 Constify.
13592 * d-exp.y (yyerror): Constify.
13593 (struct token::oper): Constify.
13594 * d-lang.h (d_yyerror): Constify.
13595 * dbxread.c (struct header_file_location::name): Constify.
13596 (add_old_header_file, add_new_header_file, last_function_name)
13597 (dbx_next_symbol_text, add_bincl_to_list)
13598 (find_corresponding_bincl_psymtab, set_namestring)
13599 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13600 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13601 * defs.h (command_line_input, print_address_symbolic)
13602 (deprecated_readline_begin_hook): Constify.
13603 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13604 Constify.
13605 * event-top.c (handle_line_of_input): Constify and add cast.
13606 * exceptions.c (catch_errors): Constify.
13607 * exceptions.h (catch_errors): Constify.
13608 * expprint.c (print_subexp_standard, op_string, op_name)
13609 (op_name_standard, dump_raw_expression, dump_raw_expression):
13610 * expression.h (op_name, op_string, dump_raw_expression):
13611 Constify.
13612 * f-exp.y (yyerror): Constify.
13613 (struct token::oper): Constify.
13614 (struct f77_boolean_val::name): Constify.
13615 * f-lang.c (f_word_break_characters): Constify.
13616 * f-lang.h (f_yyerror): Constify.
13617 * fork-child.c (fork_inferior): Add cast.
13618 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13619 (new_variant): Constify.
13620 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13621 * gdbarch.c: Regenerate.
13622 * gdbcore.h (set_gnutarget): Constify.
13623 * go-exp.y (yyerror): Constify.
13624 (token::oper): Constify.
13625 * go-lang.h (go_yyerror): Constify.
13626 * go32-nat.c (go32_sysinfo): Constify.
13627 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13628 * guile/scm-cmd.c (cmdscm_function): Constify.
13629 * guile/scm-param.c (pascm_param_value): Constify.
13630 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13631 (h8300sx_register_name): Constify.
13632 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13633 Constify.
13634 * ia64-tdep.c (ia64_register_names): Constify.
13635 * infcmd.c (construct_inferior_arguments): Constify.
13636 (path_command, attach_post_wait): Constify.
13637 * language.c (show_range_command, show_case_command)
13638 (unk_lang_error): Constify.
13639 * language.h (language_defn::la_error)
13640 (language_defn::la_name_of_this): Constify.
13641 * linespec.c (decode_line_2): Constify.
13642 * linux-thread-db.c (thread_db_err_str): Constify.
13643 * lm32-tdep.c (lm32_register_name): Constify.
13644 * m2-exp.y (yyerror): Constify.
13645 * m2-lang.h (m2_yyerror): Constify.
13646 * m32r-tdep.c (m32r_register_names): Constify and make static.
13647 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13648 * m88k-tdep.c (m88k_register_name): Constify.
13649 * macroexp.c (appendmem): Constify.
13650 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13651 (upgrade_type, parse_external, parse_partial_symbols)
13652 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13653 (new_symbol): Constify.
13654 * memattr.c (mem_info_command): Constify.
13655 * mep-tdep.c (register_name_from_keyword): Constify.
13656 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13657 Constify.
13658 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13659 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13660 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13661 cast.
13662 (mi_execute_async_cli_command): Constify.
13663 * mips-tdep.c (mips_register_name): Constify.
13664 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13665 (am33_register_name, am33_2_register_name)
13666 * moxie-tdep.c (moxie_register_names): Constify.
13667 * nat/linux-osdata.c (osdata_type): Constify fields.
13668 * nto-tdep.c (nto_parse_redirection): Constify.
13669 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13670 (lookup_child_selector): Constify.
13671 (objc_methcall::name): Constify.
13672 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13673 (lookup_struct_typedef): Constify.
13674 * objfiles.c (pc_in_section): Constify.
13675 * objfiles.h (pc_in_section): Constify.
13676 * p-exp.y (struct token::oper): Constify.
13677 (yyerror): Constify.
13678 * p-lang.h (pascal_yyerror): Constify.
13679 * parser-defs.h (op_name_standard): Constify.
13680 (op_print::string): Constify.
13681 (exp_descriptor::op_name): Constify.
13682 * printcmd.c (print_address_symbolic): Constify.
13683 * psymtab.c (print_partial_symbols): Constify.
13684 * python/py-breakpoint.c (stop_func): Constify.
13685 (bppy_get_expression): Constify.
13686 * python/py-cmd.c (cmdpy_completer::name): Constify.
13687 (cmdpy_function): Constify.
13688 * python/py-event.c (evpy_add_attribute)
13689 (gdbpy_initialize_event_generic): Constify.
13690 * python/py-event.h (evpy_add_attribute)
13691 (gdbpy_initialize_event_generic): Constify.
13692 * python/py-evts.c (add_new_registry): Constify.
13693 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13694 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13695 * python/py-inferior.c (get_buffer): Add cast.
13696 * python/py-param.c (parm_constant::name): Constify.
13697 * python/py-unwind.c (fprint_frame_id): Constify.
13698 * python/python.c (gdbpy_parameter_value): Constify.
13699 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13700 * remote.c (memory_packet_config::name): Constify.
13701 (show_packet_config_cmd, remote_write_bytes)
13702 (remote_buffer_add_string):
13703 * reverse.c (exec_reverse_once): Constify.
13704 * rs6000-tdep.c (variant::name, variant::description): Constify.
13705 * rust-exp.y (rustyyerror): Constify.
13706 * rust-lang.c (rust_op_name): Constify.
13707 * rust-lang.h (rustyyerror): Constify.
13708 * serial.h (serial_ops::name): Constify.
13709 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13710 (sh_sh3e_register_name, sh_sh2e_register_name)
13711 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13712 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13713 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13714 (sh_sh4al_dsp_register_name): Constify.
13715 * sh64-tdep.c (sh64_register_name): Constify.
13716 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13717 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13718 * stabsread.c (patch_block_stabs, read_type_number)
13719 (ref_map::stabs, ref_add, process_reference)
13720 (symbol_reference_defined, define_symbol, define_symbol)
13721 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13722 (read_one_struct_field, read_struct_fields, read_baseclasses)
13723 (read_tilde_fields, read_struct_type, read_array_type)
13724 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13725 (read_huge_number, read_range_type, read_args, common_block_start)
13726 (find_name_end): Constify.
13727 * stabsread.h (common_block_start, define_symbol)
13728 (process_one_symbol, symbol_reference_defined, ref_add):
13729 * symfile.c (get_section_index, add_symbol_file_command):
13730 * symfile.h (get_section_index): Constify.
13731 * target-descriptions.c (tdesc_type::name): Constify.
13732 (tdesc_free_type): Add cast.
13733 * target.c (find_default_run_target):
13734 (add_deprecated_target_alias, find_default_run_target)
13735 (target_announce_detach): Constify.
13736 (do_option): Constify.
13737 * target.h (add_deprecated_target_alias): Constify.
13738 * thread.c (print_thread_info_1): Constify.
13739 * top.c (deprecated_readline_begin_hook, command_line_input):
13740 Constify.
13741 (init_main): Add casts.
13742 * top.h (handle_line_of_input): Constify.
13743 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13744 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13745 (tfind_command): Rename to ...
13746 (tfind_command_1): ... this and constify.
13747 (tfind_command): New function.
13748 (tfind_end_command, tfind_start_command): Adjust.
13749 (encode_source_string): Constify.
13750 * tracepoint.h (encode_source_string): Constify.
13751 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13752 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13753 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13754 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13755 * tui/tui-win.c (parse_scrolling_args): Constify.
13756 * tui/tui-windata.c (tui_erase_data_content): Constify.
13757 * tui/tui-windata.h (tui_erase_data_content): Constify.
13758 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13759 * tui/tui.c (tui_enable): Add cast.
13760 * utils.c (defaulted_query): Constify.
13761 (init_page_info): Add cast.
13762 (puts_debug, subset_compare): Constify.
13763 * utils.h (subset_compare): Constify.
13764 * varobj.c (varobj_format_string): Constify.
13765 * varobj.h (varobj_format_string): Constify.
13766 * vax-tdep.c (vax_register_name): Constify.
13767 * windows-nat.c (windows_detach): Constify.
13768 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13769 * xml-support.c (gdb_xml_end_element): Constify.
13770 * xml-tdesc.c (tdesc_start_reg): Constify.
13771 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13772 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13773 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13774
995816ba
PA
137752017-04-05 Pedro Alves <palves@redhat.com>
13776
13777 * proc-api.c (struct trans): Constify.
13778 (procfs_note): Constify.
13779 * proc-events.c (struct trans, syscall_table):
13780 * proc-flags.c (struct trans): Constify.
13781 * proc-utils.h (procfs_note): Constify.
13782 * proc-why.c (struct trans): Constify.
13783 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13784 (procfs_detach): Constify.
13785 * sol-thread.c (struct string_map): Constify.
13786 (td_err_string, td_state_string): Constify.
13787
3e83a920
PA
137882017-04-05 Pedro Alves <palves@redhat.com>
13789
13790 * proc-api.c (procfs_filename): Don't initialize
13791 procfs_filename.
13792 (prepare_to_trace): Assume procfs_filename is non-NULL.
13793 (_initialize_proc_api): Give procfs_filename a default value here.
13794
63160a43
PA
137952017-04-05 Pedro Alves <palves@redhat.com>
13796
13797 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13798 'cond_string' parameter.
13799 (extract_exception_regexp): Constify 'string' parameter.
13800 (catch_exception_command_1): Constify.
13801 * breakpoint.c (init_catchpoint)
13802 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13803 parameter.
13804 (ep_parse_optional_if_clause, catch_fork_command_1)
13805 (catch_exec_command_1): Constify.
13806 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13807 parameter.
13808 (ep_parse_optional_if_clause): Constify.
13809 * cli/cli-utils.c (remove_trailing_whitespace)
13810 (check_for_argument): Constify.
13811 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13812 non-const overload.
13813 (check_for_argument): Likewise.
13814
9b2eba3d
PA
138152017-04-05 Pedro Alves <palves@redhat.com>
13816
13817 * event-top.c (command_line_handler): Add cast to execute_command
13818 call.
13819 * record-btrace.c (cmd_record_btrace_bts_start)
13820 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13821 (cmd_record_btrace_start): Add cast to execute_command call.
13822 * record-full.c (record_full_goto_insn):
13823 * record.c (record_start, record_stop): Add cast to
13824 execute_command_to_string calls.
13825 (cmd_record_start): Add cast to execute_command calls.
13826
2adadf51
PA
138272017-04-05 Pedro Alves <palves@redhat.com>
13828
13829 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13830 static inline function.
13831 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13832 array and use gdb_PyArg_ParseTupleAndKeywords.
13833 * python/py-cmd.c (cmdpy_init): Likewise.
13834 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13835 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13836 (infpy_search_memory): Likewise.
13837 * python/py-objfile.c (objfpy_add_separate_debug_file)
13838 (gdbpy_lookup_objfile): Likewise.
13839 * python/py-symbol.c (gdbpy_lookup_symbol)
13840 (gdbpy_lookup_global_symbol): Likewise.
13841 * python/py-type.c (gdbpy_lookup_type): Likewise.
13842 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13843 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13844 Likewise.
13845
0d1f4ceb
PA
138462017-04-05 Pedro Alves <palves@redhat.com>
13847
13848 * python/python-internal.h (gdb_PyGetSetDef): New type.
13849 * python/py-block.c (block_object_getset)
13850 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13851 * python/py-event.c (event_object_getset)
13852 (finish_breakpoint_object_getset): Likewise.
13853 * python/py-inferior.c (inferior_object_getset): Likewise.
13854 * python/py-infthread.c (thread_object_getset): Likewise.
13855 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13856 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13857 * python/py-objfile.c (objfile_getset): Likewise.
13858 * python/py-progspace.c (pspace_getset): Likewise.
13859 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13860 Likewise.
13861 * python/py-record.c (recpy_record_getset): Likewise.
13862 * python/py-symbol.c (symbol_object_getset): Likewise.
13863 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13864 Likewise.
13865 * python/py-type.c (type_object_getset, field_object_getset):
13866 Likewise.
13867 * python/py-value.c (value_object_getset): Likewise.
13868
4d759979
PA
138692017-04-05 Pedro Alves <palves@redhat.com>
13870
13871 * python/python-internal.h (gdb_PyObject_CallMethod)
13872 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13873 New functions.
13874 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13875 (PySys_GetObject, PySys_SetPath): New macros.
13876
fdf9e36f
PA
138772017-04-05 Pedro Alves <palves@redhat.com>
13878
13879 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13880 info_osdata_command.
13881 * osdata.c (info_osdata_command): Rename to ...
13882 (info_osdata): ... this. Constify 'type' parameter, and remove
13883 the 'from_tty' parameter. Accept NULL TYPE.
13884 (info_osdata_command): New function.
13885 * osdata.h (info_osdata_command): Remove declaration.
13886 (info_osdata): New declaration.
13887
9f33b8b7
PA
138882017-04-05 Pedro Alves <palves@redhat.com>
13889
13890 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13891 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13892 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13893 parameter.
13894 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13895 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13896 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13897 parameter.
13898 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13899 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13900 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13901 (mi_cmd_file_list_exec_source_files)
13902 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13903 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13904 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13905 parameter.
13906 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13907 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13908 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13909 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13910 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13911 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13912 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13913 'command' parameter.
13914 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13915 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13916 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13917 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13918 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13919 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13920 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13921 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13922 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13923 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13924 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13925 parameter.
13926 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13927 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13928 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13929 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13930 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13931 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13932 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13933 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13934 (mi_cmd_data_list_changed_registers)
13935 (mi_cmd_data_write_register_values)
13936 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13937 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13938 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13939 (mi_cmd_list_features, mi_cmd_list_target_features)
13940 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13941 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13942 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13943 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13944 (mi_cmd_trace_frame_collected): Constify 'command'
13945 parameter.
13946 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13947 'command' parameter.
13948
67cb5b2d
PA
139492017-04-05 Pedro Alves <palves@redhat.com>
13950
13951 * ada-lang.c (ada_completer_word_break_characters): Now a const
13952 array.
13953 (ada_get_gdb_completer_word_break_characters): Constify.
13954 * completer.c (gdb_completer_command_word_break_characters)
13955 (gdb_completer_file_name_break_characters)
13956 (gdb_completer_quote_characters): Now const arrays.
13957 (get_gdb_completer_quote_characters): Constify.
13958 (set_rl_completer_word_break_characters): New function.
13959 (set_gdb_completion_word_break_characters)
13960 (complete_line_internal): Use it.
13961 * completer.h (get_gdb_completer_quote_characters): Constify.
13962 (set_rl_completer_word_break_characters): Declare.
13963 * f-lang.c (f_word_break_characters): Constify.
13964 * language.c (default_word_break_characters): Constify.
13965 * language.h (language_defn::la_word_break_characters): Constify.
13966 (default_word_break_characters): Constify.
13967 * top.c (init_main): Use set_rl_completer_word_break_characters.
13968
7a114964
PA
139692017-04-05 Pedro Alves <palves@redhat.com>
13970
13971 * aix-thread.c (aix_thread_pid_to_str)
13972 (aix_thread_extra_thread_info): Constify.
13973 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13974 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13975 (bsd_uthread_pid_to_str): Constify.
13976 * corelow.c (core_pid_to_str): Constify.
13977 * darwin-nat.c (darwin_pid_to_str): Constify.
13978 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13979 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13980 Constify.
13981 * gnu-nat.c (gnu_pid_to_str): Constify.
13982 * go32-nat.c (go32_pid_to_str): Constify.
13983 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13984 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13985 * inferior.c (inferior_pid_to_str): Constify.
13986 * linux-nat.c (linux_nat_pid_to_str): Constify.
13987 * linux-tdep.c (linux_core_pid_to_str): Constify.
13988 * linux-thread-db.c (thread_db_pid_to_str)
13989 (thread_db_extra_thread_info): Constify.
13990 * nto-tdep.c (nto_extra_thread_info): Constify.
13991 * nto-tdep.h (nto_extra_thread_info): Constify.
13992 * obsd-nat.c (obsd_pid_to_str): Constify.
13993 * procfs.c (procfs_pid_to_str): Constify.
13994 * ravenscar-thread.c (ravenscar_extra_thread_info)
13995 (ravenscar_pid_to_str): Constify.
13996 * remote-sim.c (gdbsim_pid_to_str): Constify.
13997 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13998 Constify.
13999 * sol-thread.c (solaris_pid_to_str): Constify.
14000 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14001 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14002 * target.c (default_pid_to_str, target_pid_to_str)
14003 (normal_pid_to_str, default_pid_to_str): Constify.
14004 * target.h (target_ops::to_pid_to_str)
14005 (target_ops::to_extra_thread_info): Constify.
14006 (target_pid_to_str, normal_pid_to_str): Constify.
14007 * windows-nat.c (windows_pid_to_str): Constify.
14008 * gdbarch.sh (core_pid_to_str): Constify.
14009 * target-delegates.c: Regenerate.
14010 * gdbarch.h, gdbarch.c: Regenerate.
14011
69bbf465
PA
140122017-04-05 Pedro Alves <palves@redhat.com>
14013
14014 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14015 the memory of the temporary warning_pre_print override.
14016 * utils.c (warning_pre_print): Constify.
14017 * utils.h (warning_pre_print): Constify.
14018
be47f9e8
PA
140192017-04-05 Pedro Alves <palves@redhat.com>
14020
14021 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14022 (shell_command): New function.
14023 (make_command): Use std::string.
14024 (init_cli_cmds): Register shell_command instead of shell_escape.
14025
bde6261a
PA
140262017-04-05 Pedro Alves <palves@redhat.com>
14027
14028 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14029 * tracepoint.c (default_collect): Don't initialize.
14030
b38ef47f
PA
140312017-04-05 Pedro Alves <palves@redhat.com>
14032
14033 * macroexp.c (macro_buffer::shared): Now a bool.
14034 (init_buffer): Update.
14035 (init_shared_buffer): Constify 'addr' parameter.
14036 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14037 casts.
14038
f995bbe8
PA
140392017-04-05 Pedro Alves <palves@redhat.com>
14040
14041 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14042 * disasm.c (set_disassembler_options): Constify local.
14043 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14044
4a596fe2
SDJ
140452017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14046
14047 PR gdb/21352
14048 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14049 option.
14050
2cad08ea
YQ
140512017-04-05 Yao Qi <yao.qi@linaro.org>
14052
14053 * frame.c (frame_unwind_register_unsigned): Call
14054 frame_unwind_register_value.
14055
55a98976
YQ
140562017-04-05 Yao Qi <yao.qi@linaro.org>
14057
14058 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14059 Use gdb_test_multiple, and don't match anchor.
14060
4ac40124
PA
140612017-04-05 Pedro Alves <palves@redhat.com>
14062
14063 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14064 (Write After Approval): Remove Simon Marchi.
14065
c053b654
PA
140662017-04-05 Pedro Alves <palves@redhat.com>
14067
14068 * common/gdb_optional.h (optional::optional): Make constexpr and
14069 initialize m_dummy.
14070
4c7bf4f9
JB
140712017-04-04 John Baldwin <jhb@FreeBSD.org>
14072
14073 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14074 (amd64fbsd_jmp_buf_reg_offset): Remove.
14075 (amd64fbsd_supply_uthread): Remove function.
14076 (amd64fbsd_collect_uthread): Remove function.
14077 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14078 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14079 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14080 (fbsd-nat.c): Update comment.
14081 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14082 (i386fbsd_jmp_buf_reg_offset): Remove.
14083 (i386fbsd_supply_uthread): Remove function.
14084 (i386fbsd_collect_uthread): Remove function.
14085 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14086
1e1a8bef
JB
140872017-04-04 John Baldwin <jhb@FreeBSD.org>
14088
14089 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14090 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14091 * NEWS: Mention that support for FreeBSD/alpha was removed.
14092 * alpha-fbsd-tdep.c: Delete file.
14093 * config/alpha/fbsd.mh: Delete file.
14094 * configure.host: Delete alpha*-*-freebsd* and
14095 alpha*-*-kfreebsd*-gnu.
14096 * configure.tgt: Delete alpha*-*-freebsd* and
14097 alpha*-*-kfreebsd*-gnu.
14098
49907934
JB
140992017-04-04 John Baldwin <jhb@FreeBSD.org>
14100
14101 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14102 amd64bsd_store_inferior_registers): Use ptid from regcache.
14103
6f77053d
PA
141042017-04-04 Pedro Alves <palves@redhat.com>
14105
14106 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14107 data fields, make them private and add "m_" prefixes.
14108 (lnp_state_machine::lnp_state_machine): New ctor.
14109 (record_line, check_line_address, handle_set_discriminator)
14110 (handle_set_address, handle_advance_pc, handle_special_opcode)
14111 (handle_advance_line, handle_set_file, handle_negate_stmt)
14112 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14113 (end_sequence, advance_line): New methods.
14114 (m_gdbarch, m_record_lines_p): New fields.
14115 (lnp_reader_state): Delete.
14116 (dwarf_record_line): Rename to ...
14117 (lnp_state_machine::record_line): ... adjust.
14118 (init_lnp_state_machine): Delete.
14119 (lnp_state_machine::lnp_state_machine): New.
14120 (check_line_address): Rename to ...
14121 (lnp_state_machine::check_line_address): This.
14122 (dwarf_decode_lines_1): Remove reference to "reader_state".
14123 Adjust lnp_state_machine having a non-default ctor. Use bool.
14124 State machine internal state manipulation moved to
14125 lnp_state_machine methods.
14126
9c541725
PA
141272017-04-04 Pedro Alves <palves@redhat.com>
14128
14129 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14130 unittests/offset-type-selftests.c.
14131 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14132 * common/offset-type.h: New file.
14133 * common/preprocessor.h: New file.
14134 * common/traits.h: New file.
14135 * common/valid-expr.h: New file.
14136 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14137 sect_offset and cu_offset strong typedefs throughout.
14138 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14139 typedefs throughout.
14140 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14141 sect_offset and cu_offset strong typedefs throughout.
14142 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14143 typedefs throughout.
14144 * gdbtypes.h: Include "common/offset-type.h".
14145 (cu_offset): Now an offset type (strong typedef) instead of a
14146 struct.
14147 (sect_offset): Likewise.
14148 (union call_site_parameter_u): Rename "param_offset" field to
14149 "param_cu_off".
14150 * unittests/offset-type-selftests.c: New file.
14151
ecfb656c
PA
141522017-04-04 Pedro Alves <palves@redhat.com>
14153
14154 * common/underlying.h: New file.
14155 * dwarf2read.c: Include "common/gdb_optional.h" and
14156 "common/underlying.h".
14157 (dir_index, file_name_index): New types.
14158 (file_entry): Use them.
14159 (file_entry::include): Use to_underlying.
14160 (line_header::add_file_name): Use dir_index.
14161 (read_formatted_entries): Use gdb::optional. Read form before
14162 writting to file_entry.
14163 (dwarf_decode_line_header): Use dir_index.
14164 (lnp_state_machine::current_file): Use to_underlying.
14165 (lnp_state_machine::file): Change type to file_name_index.
14166 (dwarf_record_line): Use to_underlying.
14167 (init_lnp_state_machine): Use file_name_index.
14168 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14169
d194f1fe
PA
141702017-04-04 Pedro Alves <palves@redhat.com>
14171
14172 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14173 operator bool, has_value and get methods.
14174
fff8551c
PA
141752017-04-04 Pedro Alves <palves@redhat.com>
14176
14177 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14178 fields.
14179 (line_header): Initialize all data fields. Change type of
14180 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14181 Change type of include_dirs to std::vector<const char *>. Remove
14182 num_include_dirs, include_dirs_size. Change type of file_names to
14183 std::vector<file_entry>. Remove num_file_names, file_names_size.
14184 (line_header::line_header): New.
14185 (line_header::add_include_dir, line_header::add_file_name): New
14186 methods.
14187 (line_header::include_dir_at): Remove NULL check.
14188 (line_header::file_name_at): Add const overload.
14189 (line_header_up): New unique_ptr typedef.
14190 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14191 std::vector. Remove free_line_header call.
14192 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14193 free_line_header call.
14194 (free_cu_line_header): Delete.
14195 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14196 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14197 Adjust to use std::vector.
14198 (free_line_header): Delete.
14199 (free_line_header_voidp): Use delete.
14200 (add_include_dir): Replace with ...
14201 (line_header::add_include_dir): ... this method. Use std::vector.
14202 (add_file_name): Replace with ...
14203 (line_header::add_file_name): ... this method. Use std::vector.
14204 (add_include_dir_stub): Delete.
14205 (read_formatted_entries): Remove memset.
14206 (dwarf_decode_line_header): Return a line_header_up instead of a
14207 raw pointer. Remove cleanup handling. Pass lambdas to
14208 read_formatted_entries. Adjust to use line_header methods.
14209 (dwarf_decode_lines_1): Adjust to use line_header methods.
14210 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14211 use std::vector.
14212
d62a8ae2
SM
142132017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14214
14215 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14216 instead of struct ptid.
14217
db3a1dc7
AH
142182017-05-04 Alan Hayward <alan.hayward@arm.com>
14219
14220 * frame.c (get_frame_register_bytes): Unwind using value.
14221 (put_frame_register_bytes): Likewise.
14222
b1b45502
IB
142232017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14224
14225 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14226 aggregate-like.
14227
ec13808e
JK
142282017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14229
14230 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14231
12316564
YQ
142322017-03-29 Yao Qi <yao.qi@linaro.org>
14233
14234 * gdbthread.h (struct thread_info): Declare constructor and
14235 destructor. Add some in-class member initializers.
14236 * thread.c (free_thread): Remove.
14237 (init_thread_list): Call delete instead of free_thread.
14238 (new_thread): Call thread_info constructor.
14239 (thread_info::thread_info): New function.
14240 (thread_info::~thread_info): New function.
14241 (delete_thread_1): Call delete instead of free_thread.
14242 (make_cleanup_restore_current_thread): Move tp and frame to
14243 inner block.
14244
fe5f7374
AK
142452017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14246
14247 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14248 (arc_skip_prologue): Likewise.
14249 (arc_make_frame_cache): Likewise.
14250 (arc_pv_get_operand): New function.
14251 (arc_is_in_prologue): Likewise.
14252 (arc_analyze_prologue): Likewise.
14253 (arc_print_frame_cache): Likewise.
14254 (MAX_PROLOGUE_LENGTH): New constant.
14255
eea78757
AK
142562017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14257
14258 * configure.tgt: Add arc-insn.o.
14259 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14260 (dump_arc_instruction_command): New function.
14261 (arc_fprintf_disasm): Likewise.
14262 (arc_disassemble_info): Likewise.
14263 (arc_insn_get_operand_value): Likewise.
14264 (arc_insn_get_operand_value_signed): Likewise.
14265 (arc_insn_get_memory_base_reg): Likewise.
14266 (arc_insn_get_memory_offset): Likewise.
14267 (arc_insn_get_branch_target): Likewise.
14268 (arc_insn_dump): Likewise.
14269 (arc_insn_get_linear_next_pc): Likewise.
14270 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14271 (arc_disassemble_info): Likewise.
14272 (arc_insn_get_branch_target): Likewise.
14273 (arc_insn_get_linear_next_pc): Likewise.
14274 * NEWS: Mention new "maint print arc arc-instruction".
14275
3be78afd
AK
142762017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14277
14278 * arc-tdep (maintenance_print_arc_list): New variable.
14279 (maintenance_print_arc_command): New function.
14280
296ec4fa
AK
142812017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14282
14283 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14284 Add "limm" and "reserved".
14285 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14286 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14287 * arc-tdep.h (arc_regnum): Likewise.
14288
f74f865e
MF
142892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14290
14291 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14292 for THREADPTR register.
14293 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14294 register.
14295 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14296 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14297 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14298
0d0bf81a
MF
142992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14300
14301 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14302 registers above gdbarch_num_regs (gdbarch) as privileged in
14303 call0 ABI.
14304
0ce4291e
MF
143052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14306
14307 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14308 for a single specified register or for all registers in
14309 a0_base..a0_base + C0_NREGS range.
14310 (supply_gregset_reg): Call regcache_raw_supply for a single
14311 specified register or for all registers in a0_base..a0_base +
14312 C0_NREGS range.
14313
c56054f9
MF
143142017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14315
14316 * arch/xtensa.h (C0_NREGS): Add definition.
14317 * xtensa-tdep.c (C0_NREGS): Remove definition.
14318
a4398628
MF
143192017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14320
14321 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14322 Drop xtensa_default_isa initialization.
14323 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14324
8c43009f
PA
143252017-03-27 Pedro Alves <palves@redhat.com>
14326
14327 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14328 (file_entry::include_dir): New method.
14329 (line_header::include_dir_at, line_header::file_name_at): New
14330 methods.
14331 (setup_type_unit_groups, setup_type_unit_groups)
14332 (psymtab_include_file_name): Simplify using the new methods.
14333 (lnp_state_machine) <the_line_header>: New field.
14334 <file>: Add comment.
14335 (lnp_state_machine::current_file): New method.
14336 (dwarf_record_line): Simplify using the new methods.
14337 (init_lnp_state_machine): Initialize the "the_line_header" field.
14338 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14339 Simplify using the new methods.
14340
a7e80b9e
PA
143412017-03-27 Pedro Alves <palves@redhat.com>
14342
14343 * cp-name-parser.y (make_empty): Delete.
14344 (demangler_special, nested_name, ptr_operator, array_indicator)
14345 (direct_declarator, declarator_1): Use fill_comp instead of
14346 make_empty.
14347
21047726
PA
143482017-03-27 Pedro Alves <palves@redhat.com>
14349
14350 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14351 to ATTRIBUTE_PRINTF.
14352 * solib-target.c (library_list_start_list): Print "string" not
14353 "version".
14354 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14355 gdb_xml_error call.
14356
d721ba37
PA
143572017-03-27 Pedro Alves <palves@redhat.com>
14358
14359 * dwarf2read.c (struct file_and_directory): New.
14360 (dwarf2_get_dwz_file): Adjust to use std::string.
14361 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14362 (find_file_and_directory): Adjust to return a file_and_directory
14363 object.
14364 (read_file_scope): Adjust to use file_and_directory. Remove
14365 make_cleanup/do_cleanups calls.
14366 (open_and_init_dwp_file): Adjust to use std::string. Remove
14367 make_cleanup/do_cleanups calls.
14368 * python/python.c (do_start_initialization): Adjust to ldirname
14369 returning a std::string.
14370 * utils.c (ldirname): Now returns a std::string.
14371 * utils.h (ldirname): Change return type to std::string.
14372 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14373 returning a std::string.
14374 * xml-tdesc.c (file_read_description_xml): Likewise.
14375
ed771251
AH
143762017-03-24 Alan Hayward <alan.hayward@arm.com>
14377
14378 * regcache.c (regcache_debug_print_register): New function.
14379 * regcache.h (regcache_debug_print_register): New declaration.
14380 * target.c (debug_print_register): Remove.
14381 (target_fetch_registers): Call regcache_debug_print_register.
14382 (target_store_registers): Likewise.
14383
568c1b9f
PB
143842017-03-24 Pádraig Brady <pbrady@fb.com>
14385
14386 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14387 reference beyond the 'lh->include_dirs' array before accessing to
14388 it.
14389 (psymtab_include_file_name): Likewise.
14390 (dwarf_decode_lines_1): Likewise.
14391 (dwarf_decode_lines): Likewise.
14392 (file_file_name): Likewise.
14393
3e00d44f
SM
143942017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14395
14396 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14397 inferior_ptid.
14398 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14399 ps_lsetfpregs): Likewise.
14400 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14401 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14402 ps_lsetfpregs): Likewise.
14403 * target.c (target_fetch_registers, target_store_registers):
14404 Remove asserts.
14405
077ae656
AH
144062017-03-23 Alan Hayward <alan.hayward@arm.com>
14407
14408 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14409
1e2b521d
YQ
144102017-03-23 Yao Qi <yao.qi@linaro.org>
14411
14412 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14413 (_initialize_aarch64_tdep): Register it.
14414 (aarch64_record_load_store): Handle PRFM instruction.
14415 (aarch64_process_record_test): New function.
14416
33877125
YQ
144172017-03-23 Yao Qi <yao.qi@linaro.org>
14418
14419 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14420 indentation.
14421
a0eef940
YQ
144222017-03-23 Yao Qi <yao.qi@linaro.org>
14423
14424 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14425
3f2a3564
PR
144262017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14427
14428 python/python.c (do_start_initialization): Fix memory leak.
14429
b67aeab0
SM
144302017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14431
14432 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14433 using get_ptrace_pid.
14434 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14435 inferior_ptid.
14436 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14437 inferior_ptid instead of pid.
14438
ffdbe864
YQ
144392017-03-22 Yao Qi <yao.qi@linaro.org>
14440
14441 * aarch64-tdep.c: Wrap locally used classes in anonymous
14442 namespace.
14443 * arm-tdep.c: Likewise.
14444 * linespec.c: Likewise.
14445 * ui-out.c: Likewise.
14446
9d736fbf
JG
144472017-03-22 Jonah Graham <jonah@kichwacoders.com>
14448
14449 PR gdb/19637
14450 * python/lib/gdb/printer/bound_registers.py: Import sys.
14451
3de88e9a
SM
144522017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14453
14454 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14455 windows_thread_info parameter and use it instead of
14456 current_thread.
14457 (windows_fetch_inferior_registers): Don't set current_thread,
14458 pass the thread to do_windows_fetch_inferior_registers. Use
14459 ptid from regcache instead of inferior_ptid.
14460 (do_windows_store_inferior_registers): Add windows_thread_info
14461 parameter and use it instead of current_thread.
14462 (windows_store_inferior_registers): Don't set current_thread,
14463 pass the thread to do_windows_store_inferior_registers. Use
14464 ptid from regcache instead of inferior_ptid.
14465
0e7b8f61
SM
144662017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14467
14468 * ser-mingw.c (ser_windows_raw): Remove reference to
14469 struct serial::current_timeout.
14470
5badf10a
IR
144712017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14472
14473 PR tdep/20928
14474 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14475 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14476 (sparc64_fsr_type): Fix %fsr decoding.
14477
cee59b3f
TW
144782017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14479
14480 * python/py-record-btrace.c (btpy_insn_data): Change return type
14481 for Python 2.
14482
639a9038
SM
144832017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14484
14485 * spu-linux-nat.c (spu_fetch_inferior_registers,
14486 spu_store_inferior_registers): Use ptid from regcache, set and
14487 restore inferior_ptid.
14488 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14489 Likewise.
14490
bcc0c096
SM
144912017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14492
14493 * i386-linux-nat.c (fetch_register, store_register,
14494 i386_linux_fetch_inferior_registers,
14495 i386_linux_store_inferior_registers): Use ptid from regcache.
14496 * ia64-linux-nat.c (ia64_linux_fetch_register,
14497 ia64_linux_store_register): Likewise.
14498 * inf-ptrace.c (inf_ptrace_fetch_register,
14499 inf_ptrace_store_register): Likewise.
14500 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14501 m32r_linux_store_inferior_registers): Likewise.
14502 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14503 m68kbsd_store_inferior_registers): Likewise.
14504 * m68k-linux-nat.c (fetch_register, store_register,
14505 m68k_linux_fetch_inferior_registers,
14506 m68k_linux_store_inferior_registers): Likewise.
14507 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14508 m88kbsd_store_inferior_registers): Likewise.
14509 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14510 mips_fbsd_store_inferior_registers): Likewise.
14511 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14512 mips64_linux_regsets_store_registers): Likewise.
14513 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14514 mipsnbsd_store_inferior_registers): Likewise.
14515 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14516 mips64obsd_store_inferior_registers): Likewise.
14517 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14518 Likewise.
14519 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14520 ppcfbsd_store_inferior_registers): Likewise.
14521 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14522 ppc_linux_store_inferior_registers): Likewise.
14523 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14524 ppcnbsd_store_inferior_registers): Likewise.
14525 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14526 ppcobsd_store_registers): Likewise.
14527 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14528 Likewise.
14529 * ravenscar-thread.c (ravenscar_fetch_registers,
14530 ravenscar_store_registers, ravenscar_prepare_to_store):
14531 Likewise.
14532 * record-btrace.c (record_btrace_fetch_registers,
14533 record_btrace_store_registers, record_btrace_prepare_to_store):
14534 Likewise.
14535 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14536 Lookup inferior using ptid from regcache, instead of
14537 current_inferior.
14538 * remote.c (remote_fetch_registers, remote_store_registers): Use
14539 ptid from regcache.
14540 * rs6000-nat.c (fetch_register, store_register): Likewise.
14541 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14542 s390_linux_store_inferior_registers): Likewise.
14543 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14544 shnbsd_store_inferior_registers): Likewise.
14545 * sol-thread.c (sol_thread_fetch_registers,
14546 sol_thread_store_registers): Likewise.
14547 * sparc-nat.c (sparc_fetch_inferior_registers,
14548 sparc_store_inferior_registers): Likewise.
14549 * tilegx-linux-nat.c (fetch_inferior_registers,
14550 store_inferior_registers): Likewise.
14551 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14552 vaxbsd_store_inferior_registers): Likewise.
14553 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14554 store_xtregs): Likewise.
14555
c0f55cc6
AV
145562017-03-20 Artemiy Volkov <artemiyv@acm.org>
14557
14558 PR gdb/14441
14559 * NEWS: Mention support for rvalue references in GDB and python.
14560 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14561 supports both lvalue and rvalue references.
14562
15c0a2a9
AV
145632017-03-20 Artemiy Volkov <artemiyv@acm.org>
14564
14565 PR gdb/14441
14566 * gdbtypes.c (rank_one_type): Implement overloading
14567 resolution rules regarding rvalue references.
14568
aa006118
AV
145692017-03-20 Artemiy Volkov <artemiyv@acm.org>
14570
14571 PR gdb/14441
14572 * aarch64-tdep.c (aarch64_type_align)
14573 (aarch64_extract_return_value, aarch64_store_return_value): Change
14574 lvalue reference type checks to general reference type checks.
14575 * amd64-tdep.c (amd64_classify): Likewise.
14576 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14577 Likewise.
14578 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14579 (arm_store_return_value): Likewise.
14580 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14581 * c-typeprint.c (c_print_type): Likewise.
14582 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14583 (cplus_number_of_children, cplus_describe_child): Likewise.
14584 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14585 * completer.c (expression_completer): Likewise.
14586 * cp-support.c (make_symbol_overload_list_adl_namespace):
14587 Likewise.
14588 * darwin-nat-info.c (info_mach_region_command): Likewise.
14589 * dwarf2loc.c (entry_data_value_coerce_ref)
14590 (value_of_dwarf_reg_entry): Likewise.
14591 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14592 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14593 Likewise.
14594 * findvar.c (extract_typed_address, store_typed_address):
14595 Likewise.
14596 * gdbtypes.c (rank_one_type): Likewise.
14597 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14598 * infcall.c (value_arg_coerce): Likewise.
14599 * language.c (pointer_type): Likewise.
14600 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14601 Likewise.
14602 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14603 * mn10300-tdep.c (mn10300_type_align): Likewise.
14604 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14605 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14606 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14607 Likewise.
14608 * printcmd.c (print_formatted, x_command): Likewise.
14609 * python/py-type.c (typy_get_composite, typy_template_argument):
14610 Likewise.
14611 * python/py-value.c (valpy_referenced_value)
14612 (valpy_get_dynamic_type, value_has_field): Likewise.
14613 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14614 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14615 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14616 * spu-tdep.c (spu_scalar_value_p): Likewise.
14617 * symtab.c (lookup_symbol_aux): Likewise.
14618 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14619 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14620 Likewise.
14621 * valops.c (value_cast_pointers, value_cast)
14622 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14623 (value_struct_elt, value_struct_elt_bitpos)
14624 (value_find_oload_method_list, find_overload_match)
14625 (value_rtti_indirect_type): Likewise.
14626 * valprint.c (val_print_scalar_type_p, generic_val_print):
14627 Likewise.
14628 * value.c (value_actual_type, value_as_address, unpack_long)
14629 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14630 (coerce_ref): Likewise.
14631 * varobj.c (varobj_get_value_type): Likewise.
14632
3fcf899d
AV
146332017-03-20 Artemiy Volkov <artemiyv@acm.org>
14634
14635 PR gdb/14441
14636 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14637 table of constants.
14638 * python/lib/gdb/command/explore.py: Support exploring values
14639 of rvalue reference types.
14640 * python/lib/gdb/types.py: Implement get_basic_type() for
14641 rvalue reference types.
14642 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14643 constant.
14644 * python/py-value.c (valpy_getitem): Add an rvalue reference
14645 check.
14646 (valpy_reference_value): Add new parameter "refcode".
14647 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14648 New wrappers for valpy_reference_value().
14649 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14650 (gdbpy_invoke_xmethod): Likewise.
14651
4297a3f0
AV
146522017-03-20 Artemiy Volkov <artemiyv@acm.org>
14653
14654 PR gdb/14441
14655 * dwarf2read.c (process_die, read_type_die_1): Handle the
14656 DW_TAG_rvalue_reference_type DIE.
14657 (read_tag_reference_type): Add new parameter "refcode".
14658
e1cb3213
AV
146592017-03-20 Artemiy Volkov <artemiyv@acm.org>
14660
14661 PR gdb/14441
14662 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14663 (c_type_print_modifier, c_type_print_varspec_suffix)
14664 (c_type_print_base): Support printing rvalue reference types.
14665 * c-valprint.c (c_val_print, c_value_print): Support printing
14666 rvalue reference values.
14667
e4347c89
AV
146682017-03-20 Artemiy Volkov <artemiyv@acm.org>
14669
14670 PR gdb/14441
14671 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14672 typename.
14673 * cp-support.c (replace_typedefs): Handle
14674 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14675 * python/py-type.c (typy_lookup_type): Likewise.
14676
53cc15f5
AV
146772017-03-20 Artemiy Volkov <artemiyv@acm.org>
14678
14679 PR gdb/14441
14680 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14681 * parse.c (insert_type): Change assert statement.
14682 (follow_types): Handle rvalue reference types.
14683 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14684 constant.
14685
a65cfae5
AV
146862017-03-20 Artemiy Volkov <artemiyv@acm.org>
14687
14688 PR gdb/14441
14689 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14690 value_ref() interface.
14691 * c-valprint.c (c_value_print): Likewise.
14692 * infcall.c (value_arg_coerce): Likewise.
14693 * python/py-value.c (valpy_reference_value): Likewise.
14694 * valops.c (value_cast, value_reinterpret_cast)
14695 (value_dynamic_cast, typecmp): Likewise.
14696 (value_ref): Parameterize by kind of return value reference type.
14697 * value.h (value_ref): Add new parameter "refcode".
14698
3b224330
AV
146992017-03-20 Artemiy Volkov <artemiyv@acm.org>
14700
14701 PR gdb/14441
14702 * dwarf2read.c (read_tag_reference_type): Use
14703 lookup_lvalue_reference_type() instead of lookup_reference_type().
14704 * eval.c (evaluate_subexp_standard): Likewise.
14705 * f-exp.y: Likewise.
14706 * gdbtypes.c (make_reference_type, lookup_reference_type):
14707 Generalize with rvalue reference types.
14708 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14709 convenience wrappers for lookup_reference_type().
14710 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14711 reference kind parameter.
14712 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14713 wrappers for lookup_reference_type().
14714 * guile/scm-type.c (gdbscm_type_reference): Use
14715 lookup_lvalue_reference_type() instead of lookup_reference_type().
14716 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14717 * parse.c (follow_types): Likewise.
14718 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14719 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14720 Likewise.
14721 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14722 (gdbpy_invoke_xmethod): Likewise.
14723 * stabsread.c: Provide extra argument to make_reference_type()
14724 call.
14725 * valops.c (value_ref, value_rtti_indirect_type): Use
14726 lookup_lvalue_reference_type() instead of lookup_reference_type().
14727
f9aeb8d4
AV
147282017-03-20 Artemiy Volkov <artemiyv@acm.org>
14729
14730 PR gdb/14441
14731 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14732 (TYPE_IS_REFERENCE): New macro.
14733 (struct type): Add rvalue_reference_type field.
14734 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14735
51457a05
MAL
147362017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14737
14738 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14739 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14740 New function definition.
14741 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14742 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14743 New function declaration.
14744 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14745 * mi/mi-interp.h: New file.
14746 * solib.c (info_sharedlibrary_command): Replace for loop with
14747 ALL_SO_LIBS macro
14748 * solib.h (update_solib_list): New function declaration.
14749 (so_list_head): Move macro.
14750 * solist.h (ALL_SO_LIBS): New macro.
14751
e696b3ad
MAL
147522017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14753
14754 * infcmd.c (post_create_inferior): Remove unused argument in
14755 call to solib_add.
14756 * remote.c (remote_start_remote): Likewise.
14757 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14758 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14759 (enable_break): Likewise.
14760 * solib.c (update_solib_list): Remove unused target argument
14761 and its documentation.
14762 (solib_add): Remove unused target argument. Remove unused
14763 argument in call to update_solib_list.
14764 (info_sharedlibrary_command): Remove unused argument in call
14765 to update_solib_list.
14766 (sharedlibrary_command): Remove unused argument in call to
14767 solib_add.
14768 (handle_solib_event): Likewise.
14769 (reload_shared_libraries): Likewise.
14770 * solib.h (solib_add): Remove unused target argument.
14771
dcb84eda
AA
147722017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14773
14774 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14775 (s390_displaced_step_fixup): Cover relative branches with the
14776 default fixup handling. This fixes lack of support for some
14777 relative branch instructions.
14778
d9cb6cdc
SM
147792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14780
14781 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14782 ptid from regcache.
14783
1afaf9f4
SM
147842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14785
14786 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14787 i386_darwin_store_inferior_registers): Use ptid from regcache.
14788
aac12e24
SM
147892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14790
14791 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14792 i386bsd_store_inferior_registers): Use ptid from regcache.
14793
bbe1eef1
SM
147942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14795
14796 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14797 hppaobsd_store_registers): Use ptid from regcache.
14798
10799020
SM
147992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14800
14801 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14802 hppanbsd_store_registers): Use ptid from regcache.
14803
00204cf7
SM
148042017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14805
14806 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14807 from regcache. Use get_ptrace_pid.
14808
11a33714
SM
148092017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14810
14811 * corelow.c (get_core_register_section): Use ptid from regcache,
14812 update doc.
14813
317cd492
SM
148142017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14815
14816 * bsd-uthread.c (bsd_uthread_fetch_registers,
14817 bsd_uthread_store_registers): Use ptid from regcache, set and
14818 restore inferior_ptid.
14819
9ac8a7c2
SM
148202017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14821
14822 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14823 fetch_fp_regs, store_register, store_regs, store_fp_register,
14824 store_fp_regs): Use ptid from regcache.
14825
4ac4bb6a
SM
148262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14827
14828 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14829 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14830 store_vfp_regs): Use ptid from regcache.
14831
9bcbdca8
PA
148322017-03-17 Pedro Alves <palves@redhat.com>
14833
14834 PR remote/21188
14835 * ser-base.c (ser_base_wait_for): Add comment.
14836 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14837 version.
14838 * ser-unix.c (hardwire_raw): Remove reference to
14839 scb->current_timeout.
14840 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14841 (hardwire_ops): Install ser_base_readchar instead of
14842 hardwire_readchar.
14843 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14844 Remove fields.
14845
7503099f
JG
148462017-03-17 Jonah Graham <jonah@kichwacoders.com>
14847
14848 PR gdb/19637
14849 * python/lib/gdb/printer/bound_registers.py: Add support for
14850 Python 3.
14851
7942e96e
AA
148522017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14853
14854 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14855 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14856 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14857 byte_offset to subobj_byte_offset. Fix the handling of
14858 DWARF_VALUE_STACK on big-endian targets when coming via an
14859 implicit pointer.
14860 (dwarf2_evaluate_loc_desc): Adjust call to
14861 dwarf2_evaluate_loc_desc_full.
14862 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14863 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14864
ba14f379
YQ
148652017-03-16 Yao Qi <yao.qi@linaro.org>
14866
14867 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14868 and REVSH instructions.
14869
b121eeb9
YQ
148702017-03-16 Yao Qi <yao.qi@linaro.org>
14871
14872 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14873 (arm_record_test): Declare.
14874 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14875 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14876 align with the manual.
14877 (thumb_record_misc): Adjust the code order to align with the
14878 manual.
14879 (thumb2_record_decode_insn_handler): Fix instruction matching.
14880 (instruction_reader_thumb): New class.
14881 (arm_record_test): New function.
14882
728a7913
YQ
148832017-03-16 Yao Qi <yao.qi@linaro.org>
14884
14885 * arm-tdep.c (abstract_memory_reader): New class.
14886 (instruction_reader): New class.
14887 (extract_arm_insn): Add argument 'reader'. Callers updated.
14888 (decode_insn): Likewise.
14889
34b43320
DE
148902017-03-16 Doug Evans <dje@google.com>
14891
a7c0469f
DE
14892 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14893 member. Change type of TYPE member to SCM. All uses updated.
14894 (lsscm_make_lazy_string_smob): Add assert.
14895 (lsscm_make_lazy_string): Flag bad length values.
14896 (lsscm_elt_type): New function.
14897 (gdbscm_lazy_string_to_value): Rewrite to use
14898 lsscm_safe_lazy_string_to_value.
14899 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14900 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14901 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14902 in incoming type.
14903 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14904 * guile/scm-type.c (tyscm_scm_to_type): New function.
14905
149062017-03-15 Doug Evans <dje@google.com>
14907
34b43320
DE
14908 PR python/17728, python/18439, python/18779
14909 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14910 member. Change type of TYPE member to PyObject *. All uses updated.
14911 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14912 (gdbpy_create_lazy_string_object): Flag bad length values.
14913 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14914 Handle typedefs in incoming type.
14915 (stpy_lazy_string_elt_type): New function.
14916 (gdbpy_extract_lazy_string): Call it.
14917 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14918 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14919 typedefs in incoming type.
14920
a3a5fecc
DE
149212017-03-16 Doug Evans <dje@google.com>
14922
14923 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14924 * guile/scm-type.c (tyscm_scm_to_type): New function.
14925
28f1c605
JW
149262017-03-16 Jiong Wang <jiong.wang@arm.com>
14927
14928 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14929 "ULONGEST" for "skip".
14930
87c336f6
AA
149312017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14932
14933 PR gdb/21220
14934 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14935 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14936 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14937 over ptrace peek/poke until end of buffer or error.
14938
cf81cf60
SM
149392017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14940
14941 * parse.c (length_of_subexp): Make static.
14942 * parser-defs.h (length_of_subexp): Remove.
14943
a379284a
AA
149442017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14945
14946 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14947 as well.
14948
8a6200ba
PA
149492017-03-14 Pedro Alves <palves@redhat.com>
14950
14951 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14952 (main): Use std::unique_ptr. Remove calls to
14953 cp_demangled_name_parse_free.
14954
f79ec206
SM
149552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14956
14957 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14958 alphabsd_store_inferior_registers): Use regcache->ptid instead
14959 of inferior_ptid.
14960
edb5fb00
SM
149612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14962
14963 * aix-thread.c (aix_thread_fetch_registers,
14964 aix_thread_store_registers): Use regcache->ptid instead of
14965 inferior_ptid.
14966
55119686
SM
149672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14968
14969 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14970 store_gregs_to_thread, fetch_fpregs_from_thread,
14971 store_fpregs_to_thread): Use regcache->ptid instead of
14972 inferior_ptid.
14973
6a06fbb7
SM
149742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14975
14976 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14977 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14978 instead of inferior_ptid.
14979
c6386875
SM
149802017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14981
14982 * target.c (target_fetch_registers, target_store_registers): Add
14983 assert.
14984
ddaaf0fb
SM
149852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14986
14987 * regcache.h (regcache_get_ptid): New function.
14988 * regcache.c (regcache_get_ptid): New function.
14989
b9da89d1 149902017-03-13 Mark Wielaard <mark@klomp.org>
14991
14992 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14993
5f4d1085
KS
149942017-03-10 Keith Seitz <keiths@redhat.com>
14995
14996 PR c++/8218
14997 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14998
c65d6b55
PA
149992017-03-08 Pedro Alves <palves@redhat.com>
15000
15001 PR gdb/18360
15002 * infrun.c (start_step_over, do_target_resume, resume)
15003 (restart_threads): Assert we're not resuming a thread that is
15004 meant to be stopped.
15005 (infrun_thread_stop_requested_callback): Delete.
15006 (infrun_thread_stop_requested): If the thread is internally
15007 stopped, queue a pending stop event and clear the thread's
15008 inline-frame state.
15009 (handle_stop_requested): New function.
15010 (handle_syscall_event, handle_inferior_event_1): Use
15011 handle_stop_requested.
15012 (handle_stop_requested): New function.
15013 (handle_signal_stop): Set the thread's stop_signal here instead of
15014 at caller.
15015 (finish_step_over): Clear step over info unconditionally.
15016 (handle_signal_stop): If the user had interrupted the event
15017 thread, consider the stop a random signal.
15018 (handle_signal_stop) <signal arrived while stepping over
15019 breakpoint>: Don't restart threads here.
15020 (stop_waiting): Don't clear step-over info here.
15021
15c22686
PA
150222017-03-08 Pedro Alves <palves@redhat.com>
15023
15024 PR 21206
15025 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15026 goes to argument 2, not 1.
15027
6e5d74e7
PA
150282017-03-08 Pedro Alves <palves@redhat.com>
15029
15030 PR cli/21218
15031 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15032 display_gdb_prompt.
15033 (command_line_input): Add comment.
15034
9753a2f6
PA
150352017-03-08 Pedro Alves <palves@redhat.com>
15036
15037 PR tui/21216
15038 * tui/tui-file.c (tui_file::write): New.
15039 * tui/tui-file.h (tui_file): Override "write".
15040 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15041 factored out from ...
15042 (tui_puts): ... here.
15043 (tui_putc): Use them.
15044 (tui_write): New function.
15045 * tui/tui-io.h (tui_write): Declare.
15046
1672e0d9
SDJ
150472017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15048
15049 * Makefile.in (SFILES): Replace "environ.c" with
15050 "common/environ.c".
15051 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15052 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15053 to...
15054 * common/environ.c: ... here.
15055 * environ.h: Moved to...
15056 * common/environ.h: ... here.
15057
f7bb4e3a
PB
150582017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15059
15060 * gdbarch.sh (pstring_ptr): New static function.
15061 (gdbarch_disassembler_options): Use it.
15062 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15063 not valid_disassembler_option->name.
15064 * gdbarch.c: Regenerate.
15065
e45ced6c
PB
150662017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15067
15068 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15069
5f6fd321
PA
150702017-03-07 Pedro Alves <palves@redhat.com>
15071
15072 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15073
6dbb839a 150742017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15075
15076 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15077 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15078 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15079 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15080
d274ecf4
SM
150812017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15082
15083 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15084
df97be55
SM
150852017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15086
15087 * remote.c (remote_add_target_side_commands): Use range-based
15088 for loop.
15089
7d45f3df
YQ
150902017-03-03 Yao Qi <yao.qi@linaro.org>
15091
15092 PR gdb/21165
15093 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15094 value is lazy.
15095 * valprint.c (common_val_print): Likewise.
15096
65b48a81
PB
150972017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15098
15099 * NEWS: Mention new set/show disassembler-options commands.
15100 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15101 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15102 (prospective_options): New static variable.
15103 (gdb_disassembler::gdb_disassembler): Initialize
15104 m_di.disassembler_options.
15105 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15106 (get_disassembler_options): New function.
15107 (set_disassembler_options): Likewise.
15108 (set_disassembler_options_sfunc): Likewise.
15109 (show_disassembler_options_sfunc): Likewise.
15110 (disassembler_options_completer): Likewise.
15111 (_initialize_disasm): Likewise.
15112 * disasm.h (get_disassembler_options): New prototype.
15113 (set_disassembler_options): Likewise.
15114 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15115 (gdbarch_verify_disassembler_options): Likewise.
15116 * gdbarch.c: Regenerate.
15117 * gdbarch.h: Likewise.
15118 * arm-tdep.c (num_disassembly_options): Delete.
15119 (set_disassembly_style): Likewise.
15120 (arm_disassembler_options): New static variable.
15121 (set_disassembly_style_sfunc): Convert short style name into long
15122 option name. Call set_disassembler_options.
15123 (show_disassembly_style_sfunc): New function.
15124 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15125 set_gdbarch_verify_disassembler_options.
15126 (_initialize_arm_tdep): Delete regnames variable and update callers.
15127 (arm_disassembler_options): Initialize.
15128 (disasm_options): New variable.
15129 (num_disassembly_options): Rename from this...
15130 (num_disassembly_styles): ...to this. Compute by scanning through
15131 disasm_options.
15132 (valid_disassembly_styles): Initialize using disasm_options.
15133 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15134 set_arm_regname_option.
15135 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15136 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15137 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15138 set_gdbarch_verify_disassembler_options.
15139 * s390-tdep.c (s390_disassembler_options): New static variable.
15140 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15141 set_gdbarch_verify_disassembler_options.
15142
d538e36d
SM
151432017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15144
15145 * remote.c (remote_add_target_side_condition): Remove "struct"
15146 keyword from range-based for loop.
15147
83621223
SM
151482017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15149
15150 * remote.c (remote_add_target_side_condition): Use range-based
15151 for loop. Update comment.
15152
2123df0e
YQ
151532017-02-27 Yao Qi <yao.qi@linaro.org>
15154
15155 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15156
8e368124
AH
151572017-02-26 Alan Hayward <alan.hayward@arm.com>
15158
15159 * regcache.c (regcache_raw_update): New function.
15160 (regcache_raw_read): Move code to regcache_raw_update.
15161 * regcache.h (regcache_raw_update): New declaration.
15162 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15163
a49dd8dd
JK
151642017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15165
15166 * dwarf2read.c (create_debug_type_hash_table): Initialize
15167 header.signature and header.type_offset_in_tu.
15168
34e4bae9
PA
151692017-02-24 Pedro Alves <palves@redhat.com>
15170
15171 * symtab.c (make_file_symbol_completion_list_1): Use
15172 add_symtab_completions.
15173
b0e4b369
AH
151742017-02-24 Alan Hayward <alan.hayward@arm.com>
15175
15176 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15177
975c21ab
AH
151782017-02-24 Alan Hayward <alan.hayward@arm.com>
15179
15180 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15181 I386_MAX_REGISTER_SIZE.
15182 (i386_pseudo_register_write): Likewise.
15183 (i386_process_record): Likewise.
15184 * i387-tdep.c (i387_supply_xsave): Likewise.
15185 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15186 (store_register): Likewise.
15187
14bc53a8
PA
151882017-02-23 Pedro Alves <palves@redhat.com>
15189
15190 * ada-lang.c: Include "common/function-view.h".
15191 (ada_iterate_over_symbols): Adjust to use function_view as
15192 callback type.
15193 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15194 (ada_make_symbol_completion_list): Use a lambda.
15195 (ada_exc_search_name_matches): Delete.
15196 (name_matches_regex): New.
15197 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15198 * compile/compile-c-support.c: Include "common/function-view.h".
15199 (print_one_macro): Change prototype to accept a ui_file pointer.
15200 (write_macro_definitions): Use a lambda.
15201 * dwarf2read.c: Include "common/function-view.h".
15202 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15203 (dw2_expand_symtabs_matching): Adjust to use function_view as
15204 callback type.
15205 * language.h: Include "common/function-view.h".
15206 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15207 function_view as callback type.
15208 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15209 * linespec.c: Include "common/function-view.h".
15210 (collect_info::add_symbol): New method.
15211 (struct symbol_and_data_callback, iterate_inline_only, struct
15212 symbol_matcher_data, iterate_name_matcher): Delete.
15213 (iterate_over_all_matching_symtabs): Adjust to use function_view
15214 as callback type and lambdas.
15215 (iterate_over_file_blocks): Adjust to use function_view as
15216 callback type.
15217 (decode_compound_collector): Now a class with private fields.
15218 (decode_compound_collector::release_symbols): New method.
15219 (collect_one_symbol): Rename to...
15220 (decode_compound_collector::operator()): ... this and adjust.
15221 (lookup_prefix_sym): decode_compound_collector construction bits
15222 move to decode_compound_collector ctor. Pass the
15223 decode_compound_collector object directly as callback. Remove
15224 cleanups and use decode_compound_collector::release_symbols
15225 instead.
15226 (symtab_collector): Now a class with private fields.
15227 (symtab_collector::release_symtabs): New method.
15228 (add_symtabs_to_list): Rename to...
15229 (symtab_collector::operator()): ... this and adjust.
15230 (collect_symtabs_from_filename): symtab_collector construction
15231 bits move to symtab_collector ctor. Pass the symtab_collector
15232 object directly as callback. Remove cleanups and use
15233 symtab_collector::release_symtabs instead.
15234 (collect_symbols): Delete.
15235 (add_matching_symbols_to_info): Use lambdas.
15236 * macrocmd.c (print_macro_callback): Delete.
15237 (info_macro_command): Use a lambda.
15238 (info_macros_command): Pass print_macro_definition as callable
15239 directly.
15240 (print_one_macro): Remove 'ignore' parameter.
15241 (macro_list_command): Adjust.
15242 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15243 (macro_for_each_data::user_data): Delete field.
15244 (foreach_macro): Adjust to call the function_view.
15245 (macro_for_each): Adjust to use function_view as callback type.
15246 (foreach_macro_in_scope): Adjust to call the function_view.
15247 (macro_for_each_in_scope): Adjust to use function_view as callback
15248 type.
15249 * macrotab.h: Include "common/function-view.h".
15250 (macro_callback_fn): Declare a prototype instead of a pointer.
15251 Remove "user_data" parameter.
15252 (macro_for_each, macro_for_each_in_scope): Adjust to use
15253 function_view as callback type.
15254 * psymtab.c (partial_map_expand_apply)
15255 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15256 Adjust to use function_view as callback type and to return bool.
15257 (psym_expand_symtabs_matching): Adjust to use function_view as
15258 callback types.
15259 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15260 to use function_view as callback type and to return bool.
15261 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15262 callback types.
15263 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15264 as callback types.
15265 * symfile.h: Include "common/function-view.h".
15266 (expand_symtabs_file_matcher_ftype)
15267 (expand_symtabs_symbol_matcher_ftype)
15268 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15269 return bool.
15270 (quick_symbol_functions::map_symtabs_matching_filename)
15271 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15272 function_view as callback type and return bool.
15273 (expand_symtabs_matching): Adjust to use function_view as callback
15274 type.
15275 (maintenance_expand_name_matcher)
15276 (maintenance_expand_file_matcher): Delete.
15277 (maintenance_expand_symtabs): Use lambdas.
15278 * symtab.c (iterate_over_some_symtabs): Adjust to use
15279 function_view as callback types and return bool.
15280 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15281 of a cleanup.
15282 (lookup_symtab_callback): Delete.
15283 (lookup_symtab): Use a lambda.
15284 (iterate_over_symbols): Adjust to use function_view as callback
15285 type.
15286 (struct search_symbols_data, search_symbols_file_matches)
15287 (search_symbols_name_matches): Delete.
15288 (search_symbols): Use a pair of lambdas.
15289 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15290 (symtab_expansion_callback): Delete.
15291 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15292 * symtab.h: Include "common/function-view.h".
15293 (iterate_over_some_symtabs): Adjust to use function_view as
15294 callback type and return bool.
15295 (iterate_over_symtabs): Adjust to use function_view as callback
15296 type.
15297 (symbol_found_callback_ftype): Remove 'data' parameter and return
15298 bool.
15299 (iterate_over_symbols): Adjust to use function_view as callback
15300 type.
15301
07e253aa
PA
153022017-02-23 Pedro Alves <palves@redhat.com>
15303
15304 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15305 (%.o) <unittests/%.c>: New pattern.
15306 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15307 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15308 * common/function-view.h: New file.
15309 * unittests/function-view-selftests.c: New file.
15310 * configure: Regenerate.
15311
8eaf5320
SM
153122017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15313
15314 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15315 inferior_ptid.
15316 * go32-nat.c (go32_thread_alive): Likewise.
15317
38768751
YQ
153182017-02-23 Yao Qi <yao.qi@linaro.org>
15319
15320 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15321 delete.
15322
0a8beaba
YQ
153232017-02-23 Yao Qi <yao.qi@linaro.org>
15324
15325 * varobj.c (varobj_clear_saved_item): Use delete instead of
15326 xfree.
15327 (update_dynamic_varobj_children): Likewise.
15328
58fdfd2c
JK
153292017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15330
15331 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15332
1b90b139
SM
153332017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15334
15335 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15336 m_enum_value to 0 in default constructor.
15337
2039d74e
EBM
153382017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15339
15340 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15341 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15342 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15343 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15344 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15345 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15346 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15347 IS_STORE_CONDITIONAL_INSN.
15348
7814882a
JK
153492017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15350
15351 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15352
0ae60b63
JK
153532017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15354
15355 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15356
0224619f
JK
153572017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15358
15359 * dwarf2read.c (skip_one_die, read_attribute_value)
15360 (dwarf2_const_value_attr, dump_die_shallow)
15361 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15362 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15363
0af92d60
JK
153642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15365
15366 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15367 (dwarf_parse_macro_header): Accept DWARF version 5.
15368 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15369
216f72a1
JK
153702017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15371
15372 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15373 DW_AT_GNU_*.
15374 * common/common-exceptions.h (enum errors): Likewise.
15375 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15376 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15377 (dwarf_expr_context::execute_stack_op): Likewise.
15378 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15379 Likewise.
15380 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15381 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15382 (show_entry_values_debug, call_site_to_target_addr)
15383 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15384 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15385 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15386 (value_of_dwarf_block_entry, indirect_pieced_value)
15387 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15388 (disassemble_dwarf_expression): Likewise.
15389 * dwarf2read.c (process_die, inherit_abstract_dies)
15390 (read_call_site_scope): Likewise.
15391 * gdbtypes.h (struct func_type, struct call_site_parameter)
15392 (struct call_site): Likewise.
15393 * stack.c (read_frame_arg): Likewise.
15394 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15395
43988095
JK
153962017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15397
15398 * defs.h (read_unsigned_leb128): New declaration.
15399 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15400 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15401 (dwarf2_find_location_expression): Call also
15402 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15403 * dwarf2loc.h (dwarf2_version): New declaration.
15404 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15405 rnglists.
15406 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15407 .debug_rnglists.
15408 (struct dwop_section_names): Add loclists_dwo.
15409 (dwop_section_names): Add .debug_loclists.dwo.
15410 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15411 (struct dwarf2_per_cu_data): Add dwarf_version.
15412 (struct dwo_sections): Add loclists.
15413 (struct attr_abbrev): Add implicit_const.
15414 (read_indirect_line_string): New declaration.
15415 (read_unsigned_leb128): Delete declaration.
15416 (rcuh_kind): New definition.
15417 (read_and_check_comp_unit_head): Change parameter
15418 is_debug_types_section to section_kind.
15419 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15420 (read_comp_unit_head): Change parameter abfd to section, add parameter
15421 section_kind. Handle DWARF-5.
15422 (error_check_comp_unit_head): Accept also DWARF version 5.
15423 (read_and_check_comp_unit_head): Change parameter
15424 is_debug_types_section to section_kind.
15425 (read_and_check_type_unit_head): Delete function.
15426 (read_abbrev_offset): Handle DWARF-5.
15427 (create_debug_type_hash_table): Add parameter section_kind. Process
15428 only DW_UT_type. Use signature and type_offset_in_tu from struct
15429 comp_unit_head.
15430 (create_debug_types_hash_table): Update create_debug_type_hash_table
15431 caller.
15432 (create_all_type_units): Call create_debug_type_hash_table.
15433 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15434 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15435 caller.
15436 (skip_one_die): Handle DW_FORM_implicit_const.
15437 (dwarf2_rnglists_process): New function.
15438 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15439 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15440 (read_attribute_value): Handle DW_FORM_implicit_const,
15441 DW_FORM_line_strp.
15442 (read_attribute): Handle DW_FORM_implicit_const.
15443 (read_indirect_string_at_offset_from): New function from
15444 read_indirect_string_at_offset.
15445 (read_indirect_string_at_offset): Call
15446 read_indirect_string_at_offset_from.
15447 (read_indirect_line_string_at_offset): New function.
15448 (read_indirect_string): New function comment.
15449 (read_indirect_line_string): New function.
15450 (read_unsigned_leb128): Make it global.
15451 (dwarf2_string_attr): Handle DWARF-5.
15452 (add_include_dir_stub, read_formatted_entries): New functions.
15453 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15454 Handle DWARF-5.
15455 (per_cu_header_read_in): Update read_comp_unit_head caller.
15456 (dwarf2_version): New function.
15457 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15458 rnglists.
15459 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15460 fields.
15461
22d2f3ab
JK
154622017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15463
15464 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15465
5f46c5a5
JK
154662017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15467
15468 * dwarf2read.c (dwarf2_ranges_process): New function from
15469 dwarf2_ranges_read.
15470 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15471 dwarf2_ranges_process.
15472
78d4d2c5
JK
154732017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15474
15475 * dwarf2read.c (create_debug_type_hash_table): New function from
15476 create_debug_types_hash_table.
15477 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15478 (create_all_type_units, open_and_init_dwo_file): Update
15479 create_debug_types_hash_table callers.
15480
1b076f25
SDJ
154812017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15482
15483 PR gdb/16188
15484 * fork-child.c (trace_start_error): Fix thinko. va_end should
15485 refer to 'ap', not 'args'.
15486
0db8980c
SDJ
154872017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15488 Pedro Alves <palves@redhat.com>
15489
15490 PR gdb/16188
15491 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15492 calls succeeded.
15493 * fork-child.c (trace_start_error): New function.
15494 (trace_start_error_with_name): Likewise.
15495 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15496 * inf-ptrace.c (inf_ptrace_me): Likewise.
15497 * inferior.h (trace_start_error): New prototype.
15498 (trace_start_error_with_name): Likewise.
15499
99e8a4f9
SDJ
155002017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15501
15502 PR gdb/21164
15503 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15504 NULL before using it.
15505 * symmisc.c (maintenance_print_symbols): Likewise.
15506 (maintenance_print_msymbols): Likewise.
15507
4e746bb6
TW
155082017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15509
15510 * NEWS: Add record Python bindings entry.
15511
155122017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15513
15514 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15515 py-record-full.o.
15516 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15517 * python/py-record-btrace.c, python/py-record-btrace.h,
15518 python/py-record-full.c, python/py-record-full.h: New file.
15519 * python/py-record.c: Add include for py-record-btrace.h and
15520 py-record-full.h.
15521 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15522 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15523 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15524 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15525 New definition.
15526 (gdbpy_initialize_btrace): New export.
15527 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15528
155292017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15530
15531 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15532 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15533 * python/py-record.c: New file.
15534 * python/python-internal.h (gdbpy_start_recording,
15535 gdbpy_current_recording, gdpy_stop_recording,
15536 gdbpy_initialize_record): New export.
15537 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15538 (python_GdbMethods): Add gdbpy_start_recording,
15539 gdbpy_current_recording and gdbpy_stop_recording.
15540
155412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15542
15543 * record-btrace.c (record_btrace_record_method): New function.
15544 (init_record_btrace_ops): Initialize to_record_method.
15545 * record-full.c (record_full_record_method): New function.
15546 (init_record_full_ops, init_record_full_core_ops): Add
15547 record_full_record_method.
15548 * record.h (enum record_method): New enum.
15549 * target-debug.h (target_debug_print_enum_record_method: New define.
15550 * target-delegates.c: Regenerate.
15551 * target.c (target_record_method): New function.
15552 * target.h: Include record.h.
15553 (struct target_ops) <to_record_method>: New field.
15554 (target_record_method): New export.
15555
155562017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15557
15558 * record.h (record_start, record_stop): New export.
15559 * record.c (record_start, record_stop): New function.
15560
155612017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15562
15563 * btrace.c (btrace_fetch): Copy function call segments pointer
15564 into a vector.
15565 (btrace_clear): Clear the vector.
15566 (btrace_find_insn_by_number): Use binary search to find the correct
15567 function call segment.
15568 * btrace.h (brace_fun_p): New typedef.
15569 (struct btrace_thread_info) <functions>: New field.
15570
155712017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15572
15573 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15574 * btrace.c (btrace_decode_error): ... here. New function.
15575 * btrace.h (btrace_decode_error): New export.
15576
155772017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15578
15579 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15580 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15581 btrace_find_insn_by_number): Remove special case for gaps.
15582 * btrace.h (btrace_insn_get_error): New export.
15583 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15584 * record-btrace.c (btrace_insn_history): Print number for gaps.
15585 (record_btrace_info, record_btrace_goto): Handle gaps.
15586
3f77c769
TT
155872017-02-14 Tom Tromey <tom@tromey.com>
15588
15589 PR python/13598:
15590 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15591 event.
15592 * python/py-evts.c (gdbpy_initialize_py_events): Add
15593 before_prompt registry.
15594 * python/py-events.h (events_object) <before_prompt>: New field.
15595
4c2c7ac6
MM
155962017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15597
15598 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15599
5cf30ebf
LM
156002017-02-13 Luis Machado <lgustavo@codesourcery.com>
15601
15602 * symfile (_initialize_symfile): Add usage text to the load command's
15603 help text.
15604
26a06916
SM
156052017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15606
15607 * utils.c (defaulted_query): Don't query on secondary UIs.
15608
0b145e37
TT
156092017-02-10 Tom Tromey <tom@tromey.com>
15610
15611 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15612
2d8365c4
TT
156132017-02-10 Tom Tromey <tom@tromey.com>
15614
15615 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15616 "cleanup" local.
15617 * python/py-type.c (typy_legacy_template_argument): Remove
15618 unnecessary "cleanup" local.
15619
2bb8f231
TT
156202017-02-10 Tom Tromey <tom@tromey.com>
15621
15622 * python/python.c (do_start_initialization): New function, from
15623 _initialize_python.
15624 (_initialize_python): Call do_start_initialization.
15625 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15626 goto.
15627
1bdfaf42
TT
156282017-02-10 Tom Tromey <tom@tromey.com>
15629
15630 * python/py-prettyprint.c (pretty_print_one_value): Use
15631 gdbpy_ref.
15632
88b6faea
TT
156332017-02-10 Tom Tromey <tom@tromey.com>
15634
15635 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15636 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15637 gdbpy_ref.
15638 * python/py-type.c (field_new): Use gdbpy_ref.
15639 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15640 gdbpy_ref.
15641 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15642 (py_free_pspace): Likewise.
15643 (pspace_to_pspace_object): Likewise.
15644 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15645 (py_free_objfile): Likewise.
15646 (objfile_to_objfile_object): Likewise.
15647 * python/py-inferior.c (delete_thread_object): Use
15648 gdbpy_ref.
15649 (infpy_read_memory): Likewise.
15650 (py_free_inferior): Likewise.
15651 * python/py-evtregistry.c (create_eventregistry_object): Use
15652 gdbpy_ref.
15653 * python/py-event.c (create_event_object): Use gdbpy_ref.
15654
7780f186
TT
156552017-02-10 Tom Tromey <tom@tromey.com>
15656
15657 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15658 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15659 used.
15660 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15661 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15662 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15663 python/py-framefilter.c, python/py-function.c,
15664 python/py-inferior.c, python/py-infevents.c,
15665 python/py-linetable.c, python/py-newobjfileevent.c,
15666 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15667 python/py-signalevent.c, python/py-stopevent.c,
15668 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15669 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15670 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15671 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15672
d4b0bb18
TT
156732017-02-10 Tom Tromey <tom@tromey.com>
15674
15675 * ui-out.h (ui_out_emit_type): New class.
15676 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15677 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15678 and ui_out_emit_tuple.
15679 (enumerate_locals): Likewise.
15680 (py_mi_print_variables, py_print_locals, py_print_args): Use
15681 ui_out_emit_list.
15682 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15683 ui_out_emit_list.
15684 * common/gdb_optional.h: New file.
15685
f67f945c
MG
156862017-02-10 Martin Galvan <martingalvan@sourceware.org>
15687
15688 * MAINTAINERS (Write After Approval): Update my e-mail address.
15689
18da0c51
MG
156902017-02-10 Martin Galvan <martingalvan@sourceware.org>
15691
15692 PR gdb/21122
15693 * breakpoint.c (_initialize_breakpoint): Update the help description
15694 of the 'commands' command to indicate that it takes a list argument.
15695
62c14536
SM
156962017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15697
15698 * interps.c (current_interp_set_logging): Remove "return".
15699
ff6fa247
GB
157002017-02-09 Gary Benson <gbenson@redhat.com>
15701
15702 * symtab.c (add_symtab_completions): Prevent NULL pointer
15703 dereference.
15704
a474bd8e
PA
157052017-02-08 Pedro Alves <palves@redhat.com>
15706
15707 * interps.c (interp::interp): Remove reference to quiet_p.
15708 (interp_set): Make static. Remove dead "Switching to" output
15709 code.
15710 (interp_quiet_p, interp_set_quiet): Delete.
15711 (interpreter_exec_cmd): Don't set the interpreter quiet.
15712 * interps.h (interp_quiet_p): Make static.
15713 (class interp) <quiet_p>: Remove field
15714
3d7b173c
JG
157152017-02-08 Jerome Guitton <guitton@adacore.com>
15716
604c4576
JG
15717 * cli/cli-decode.c (find_command_name_length): Make it extern.
15718 * cli/cli-decode.h (find_command_name_length): Declare.
15719 * cli/cli-script.c (command_name_equals, line_first_arg):
15720 New functions.
15721 (process_next_line): Use cli-decode to parse command names.
15722 (build_command_line): Make args a constant pointer.
15723
157242017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15725
3d7b173c
JG
15726 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15727 Remove case-insensitive search.
15728
1291063d
JM
157292017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15730
15731 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15732 at the end of the line. Avoids an ARI warning.
15733
20b477a7
LM
157342017-02-06 Luis Machado <lgustavo@codesourcery.com>
15735
15736 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15737 rdseed instructions.
15738 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15739
3f7b46f2
IR
157402017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15741
15742 PR tdep/20936
15743 Provide and use sparc32 and sparc64 target description XML files.
15744 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15745 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15746 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15747 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15748 * features/sparc/sparc32-solaris.xml: New file.
15749 * features/sparc/sparc64-solaris.xml: New file.
15750 * features/sparc/sparc32-solaris.c: Generated.
15751 * features/sparc/sparc64-solaris.c: Generated.
15752 * sparc-tdep.h: Account for differences in target descriptions.
15753 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15754 (sparc32_register_type): Use target provided registers.
15755 (validate_tdesc_registers): New function.
15756 (sparc32_gdbarch_init): Use tdesc_has_registers.
15757 Set pseudoregister functions.
15758 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15759 (sparc64_register_type): Use target provided registers.
15760 (sparc64_init_abi): Set pseudoregister functions.
15761
f0fd41c1
TT
157622017-02-03 Tom Tromey <tom@tromey.com>
15763
15764 PR rust/21097:
15765 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15766 with a single member.
15767
d6f9b0fb
PA
157682017-02-03 Pedro Alves <palves@redhat.com>
15769
15770 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15771 (cli_interp_base::~cli_interp_base): New.
15772 (cli_interp): New struct.
15773 (as_cli_interp): Cast the interp itself to cli_interp.
15774 (cli_interpreter_pre_command_loop): Rename to ...
15775 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15776 parameter.
15777 (cli_interpreter_init): Rename to ...
15778 (cli_interp::init): ... this. Remove 'self' parameter. Use
15779 boolean. Make extern.
15780 (cli_interpreter_resume): Rename to ...
15781 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15782 extern.
15783 (cli_interpreter_suspend): Rename to ...
15784 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15785 extern.
15786 (cli_interpreter_exec): Rename to ...
15787 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15788 extern.
15789 (cli_interpreter_supports_command_editing): Rename to ...
15790 (cli_interp_base::supports_command_editing): ... this. Remove
15791 'interp' parameter. Make extern.
15792 (cli_ui_out): Rename to ...
15793 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15794 Make extern.
15795 (cli_set_logging): Rename to ...
15796 (cli_interp_base::set_logging): ... this. Remove 'interp'
15797 parameter. Make extern.
15798 (cli_interp_procs): Delete.
15799 (cli_interp_factory): Adjust to use "new".
15800 * cli/cli-interp.h: Include "interps.h".
15801 (struct cli_interp_base): New struct.
15802 * interps.c (struct interp): Delete. Fields moved to interps.h.
15803 (interp_new): Delete.
15804 (interp::interp, interp::~interp): New.
15805 (interp_set): Use bool, and return void. Assume the interpreter
15806 has suspend, init and resume methods, and that the all return
15807 void.
15808 (set_top_level_interpreter): interp_set returns void.
15809 (interp_ui_out): Adapt.
15810 (current_interp_set_logging): Adapt.
15811 (interp_data): Delete.
15812 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15813 (interp_exec): Adapt.
15814 (top_level_interpreter_data): Delete.
15815 * interps.h (interp_init_ftype, interp_resume_ftype)
15816 (interp_suspend_ftype, interp_exec_ftype)
15817 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15818 (class interp): New.
15819 (interp_new): Delete.
15820 (interp_set): Now returns void. Use bool.
15821 (interp_data, top_level_interpreter_data): Delete.
15822 * mi/mi-common.h: Include interps.h.
15823 (class mi_interp): Inherit from interp. Define a ctor. Declare
15824 init, resume, suspect, exec, interp_ui_out, set_logging and
15825 pre_command_loop methods.
15826 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15827 (mi_interpreter_init): Rename to ...
15828 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15829 bool, return void and make extern. Adjust.
15830 (mi_interpreter_resume): ... Rename to ...
15831 (mi_interp::resume): ... this. Remove the 'data' parameter,
15832 return void and make extern. Adjust.
15833 (mi_interpreter_suspend): ... Rename to ...
15834 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15835 return void and make extern. Adjust.
15836 (mi_interpreter_exec): ... Rename to ...
15837 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15838 extern. Adjust.
15839 (mi_interpreter_pre_command_loop): ... Rename to ...
15840 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15841 parameter and make extern.
15842 (mi_on_normal_stop_1): Adjust.
15843 (mi_ui_out): Rename to ...
15844 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15845 parameter and make extern. Adjust.
15846 (mi_set_logging): Rename to ...
15847 (mi_interp::set_logging): ... this. Remove the 'interp'
15848 parameter and make extern. Adjust.
15849 (mi_interp_procs): Delete.
15850 (mi_interp_factory): Adjust to use 'new'.
15851 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15852 (mi_print_exception, mi_execute_command, mi_load_progress):
15853 Adjust.
15854 * tui/tui-interp.c (tui_interp): New class.
15855 (as_tui_interp): Return a tui_interp pointer.
15856 (tui_on_normal_stop, tui_on_signal_received)
15857 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15858 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15859 to use interp::interp_ui_out.
15860 (tui_init): Rename to ...
15861 (tui_interp::init): ... this. Remove the 'self' parameter, use
15862 bool, return void and make extern. Adjust.
15863 (tui_resume): Rename to ...
15864 (tui_interp::resume): ... this. Remove the 'data' parameter,
15865 return void and make extern. Adjust.
15866 (tui_suspend): Rename to ...
15867 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15868 return void and make extern. Adjust.
15869 (tui_ui_out): Rename to ...
15870 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15871 parameter, and make extern. Adjust.
15872 (tui_exec): Rename to ...
15873 (tui_interp::exec): ... this. Remove the 'data' parameter and
15874 make extern.
15875 (tui_interp_procs): Delete.
15876 (tui_interp_factory): Use "new".
15877
65c40c95
TT
158782017-02-02 Tom Tromey <tom@tromey.com>
15879
15880 * rust-exp.y (ends_raw_string, space_then_number)
15881 (rust_identifier_start_p): Return bool.
15882 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15883 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15884 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15885 (rust_chartype_p): Return bool.
15886 (val_print_struct, rust_print_struct_def, rust_print_type):
15887 Update.
15888 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15889 Return bool.
15890
b50f188d
TT
158912017-02-02 Tom Tromey <tom@tromey.com>
15892
15893 * rust-lang.c: Reindent.
15894
03c85b11
TT
158952017-02-02 Tom Tromey <tom@tromey.com>
15896
15897 * rust-lang.h (rust_crate_for_block): Update.
15898 * rust-lang.c (rust_crate_for_block): Return std::string.
15899 (rust_get_disr_info): Use std:;string, not
15900 gdb::unique_xmalloc_ptr.
15901 * rust-exp.y (crate_name): Update.
15902
9b6da501
PA
159032017-02-02 Pedro Alves <palves@redhat.com>
15904
15905 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15906 field out of gdb_disassembler_test and make it static.
15907
ec4cb20b
PA
159082017-02-02 Pedro Alves <palves@redhat.com>
15909
15910 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15911 mi1_interp and mi_interp fields.
15912
5be5dbf0
PA
159132017-02-02 Pedro Alves <palves@redhat.com>
15914
616268b6
PA
15915 * cli/cli-interp.c (struct saved_output_files, saved_output):
15916 Moved from cli/cli-logging.c.
15917 (cli_set_logging): New function.
15918 (cli_interp_procs): Install cli_set_logging.
15919 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15920 Declare.
15921 * cli/cli-logging.c (struct saved_output_files, saved_output):
15922 Moved to cli/cli-interp.c.
15923 (pop_output_files): Don't save outputs here.
15924 (make_logging_output): New function.
15925 (handle_redirections): Don't build tee nor save previous outputs
15926 here.
15927 * interps.c (current_interp_set_logging): Change prototype.
15928 Assume there's always a set_logging_proc method installed.
15929 * interps.h (interp_set_logging_ftype): Change prototype.
15930 (current_interp_set_logging): Change prototype and adjust comment.
15931 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15932 use make_logging_output.
15933 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
159342017-02-02 Pedro Alves <palves@redhat.com>
15935
5be5dbf0
PA
15936 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15937 from ...
15938 (set_logging_overwrite): ... here.
15939 (logging_no_redirect_file): Delete.
15940 (set_logging_redirect): Don't handle redirection on the fly.
15941 Instead warn that "logging off" / "logging on" is necessary.
15942 (pop_output_files): Delete references to logging_no_redirect_file.
15943 (show_logging_command): Always speak in terms of what will happen
15944 once logging is reenabled.
15945
c99cc448
PA
159462017-02-02 Pedro Alves <palves@redhat.com>
15947
15948 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15949
8b172ce7
PA
159502017-02-02 Pedro Alves <palves@redhat.com>
15951
15952 * disasm.c (gdb_pretty_print_insn): Rename to ...
15953 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15954 Remove gdbarch parameter. Adapt to clear the object's buffers
15955 instead of allocating new buffers, and to print using the object's
15956 gdb_disassembler instead of calling gdb_print_insn.
15957 (dump_insns): Use gdb_pretty_print_disassembler.
15958 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15959 (gdb_pretty_print_disassembler): New class.
15960 * record-btrace.c (btrace_insn_history): Use
15961 gdb_pretty_print_disassembler.
15962
d7e74731
PA
159632017-02-02 Pedro Alves <palves@redhat.com>
15964
15965 * ada-lang.c (type_as_string): Use string_file.
15966 * ada-valprint.c (ada_print_floating): Use string_file.
15967 * ada-varobj.c (ada_varobj_scalar_image)
15968 (ada_varobj_get_value_image): Use string_file.
15969 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15970 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15971 * breakpoint.c (update_inserted_breakpoint_locations)
15972 (insert_breakpoint_locations, reattach_breakpoints)
15973 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15974 (print_it_watchpoint): Use string_file.
15975 (save_breakpoints): Use stdio_file.
15976 * c-exp.y (oper): Use string_file.
15977 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15978 tee_file.
15979 (pop_output_files): Use delete.
15980 (handle_redirections): Use stdio_file and tee_file.
15981 * cli/cli-setshow.c (do_show_command): Use string_file.
15982 * compile/compile-c-support.c (c_compute_program): Use
15983 string_file.
15984 * compile/compile-c-symbols.c (generate_vla_size): Take a
15985 'string_file &' instead of a 'ui_file *'.
15986 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15987 of a 'ui_file *'. Use string_file.
15988 (generate_c_for_variable_locations): Take a 'string_file &'
15989 instead of a 'ui_file *'.
15990 * compile/compile-internal.h (generate_c_for_for_one_variable):
15991 Take a 'string_file &' instead of a 'ui_file *'.
15992 * compile/compile-loc2c.c (push, pushf, unary, binary)
15993 (print_label, pushf_register_address, pushf_register)
15994 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15995 'ui_file *'. Adjust.
15996 * compile/compile.c (compile_to_object): Use string_file.
15997 * compile/compile.h (compile_dwarf_expr_to_c)
15998 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15999 'ui_file *'.
16000 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16001 (replace_typedefs_qualified_name): Use string_file and
16002 obstack_copy0.
16003 * disasm.c (gdb_pretty_print_insn): Use string_file.
16004 (gdb_disassembly): Adjust reference the null_stream global.
16005 (do_ui_file_delete): Delete.
16006 (gdb_insn_length): Use null_stream.
16007 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16008 * dwarf2loc.c (dwarf2_compile_property_to_c)
16009 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16010 'string_file &' instead of a 'ui_file *'.
16011 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16012 * dwarf2read.c (do_ui_file_peek_last): Delete.
16013 (dwarf2_compute_name): Use string_file.
16014 * event-top.c (gdb_setup_readline): Use stdio_file.
16015 * gdbarch.sh (verify_gdbarch): Use string_file.
16016 * gdbtypes.c (safe_parse_type): Use null_stream.
16017 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16018 string_file.
16019 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16020 'string_file *' instead of a 'ui_file *'.
16021 (gdbscm_arch_disassemble): Use string_file.
16022 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16023 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16024 inherits from ui_file.
16025 (ioscm_file_port_delete, ioscm_file_port_rewind)
16026 (ioscm_file_port_put): Delete.
16027 (ioscm_file_port_write): Rename to ...
16028 (ioscm_file_port::write): ... this. Remove file_port_magic
16029 checks.
16030 (ioscm_file_port_new): Delete.
16031 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16032 ui_file_up.
16033 * guile/scm-type.c (tyscm_type_name): Use string_file.
16034 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16035 Use string_file.
16036 * infcmd.c (print_return_value_1): Use string_file.
16037 * infrun.c (print_target_wait_results): Use string_file.
16038 * language.c (add_language): Use string_file.
16039 * location.c (explicit_to_string_internal): Use string_file.
16040 * main.c (captured_main_1): Use null_file.
16041 * maint.c (maintenance_print_architecture): Use stdio_file.
16042 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16043 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16044 event_channel>: Change type to mi_console_file pointer.
16045 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16046 (mi_console_file_delete): Delete.
16047 (struct mi_console_file): Delete.
16048 (mi_console_file_magic): Delete.
16049 (mi_console_file_new): Delete.
16050 (mi_console_file::mi_console_file): New.
16051 (mi_console_file_delete): Delete.
16052 (mi_console_file_fputs): Delete.
16053 (mi_console_file::write): New.
16054 (mi_console_raw_packet): Delete.
16055 (mi_console_file::flush): New.
16056 (mi_console_file_flush): Delete.
16057 (mi_console_set_raw): Rename to ...
16058 (mi_console_file::set_raw): ... this.
16059 * mi/mi-console.h (class mi_console_file): New class.
16060 (mi_console_file_new, mi_console_set_raw): Delete.
16061 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16062 (mi_set_logging): Use delete and tee_file. Adjust.
16063 * mi/mi-main.c (output_register): Use string_file.
16064 (mi_cmd_data_evaluate_expression): Use string_file.
16065 (mi_cmd_data_read_memory): Use string_file.
16066 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16067 * mi/mi-out.c (mi_ui_out::main_stream): New.
16068 (mi_ui_out::rewind): Use main_stream and
16069 string_file.
16070 (mi_ui_out::put): Use main_stream and string_file.
16071 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16072 Allocate a 'string_file' instead.
16073 (mi_out_new): Don't allocate a mem_fileopen stream here.
16074 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16075 (mi_ui_out::main_stream): Declare method.
16076 * printcmd.c (eval_command): Use string_file.
16077 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16078 * python/py-arch.c (archpy_disassemble): Use string_file.
16079 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16080 * python/py-frame.c (frapy_str): Use string_file.
16081 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16082 Use string_file.
16083 * python/py-type.c (typy_str): Use string_file.
16084 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16085 * python/py-value.c (valpy_str): Use string_file.
16086 * record-btrace.c (btrace_insn_history): Use string_file.
16087 * regcache.c (regcache_print): Use stdio_file.
16088 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16089 * remote.c (escape_buffer): Use string_file.
16090 * rust-lang.c (rust_get_disr_info): Use string_file.
16091 * serial.c (serial_open_ops_1): Use stdio_file.
16092 (do_serial_close): Use delete.
16093 * stack.c (print_frame_arg): Use string_file.
16094 (print_frame_args): Remove local mem_fileopen stream, not used.
16095 (print_frame): Use string_file.
16096 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16097 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16098 Take a 'string_file *' instead of a 'ui_file *'.
16099 * top.c (new_ui): Use stdio_file and stderr_file.
16100 (free_ui): Use delete.
16101 (execute_command_to_string): Use string_file.
16102 (quit_confirm): Use string_file.
16103 * tracepoint.c (collection_list::append_exp): Use string_file.
16104 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16105 * tui/tui-file.c: Don't include "ui-file.h".
16106 (enum streamtype, struct tui_stream): Delete.
16107 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16108 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16109 (tui_file::tui_file): New method.
16110 (tui_file_fputs): Delete.
16111 (tui_file_get_strbuf): Delete.
16112 (tui_file::puts): New method.
16113 (tui_file_adjust_strbuf): Delete.
16114 (tui_file_flush): Delete.
16115 (tui_file::flush): New method.
16116 * tui/tui-file.h: Tweak intro comment.
16117 Include ui-file.h.
16118 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16119 (tui_file_adjust_strbuf): Delete declarations.
16120 (class tui_file): New class.
16121 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16122 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16123 (tui_register_format): Use string_stream.
16124 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16125 (tui_get_function_from_frame): Use string_file.
16126 * typeprint.c (type_to_string): Use string_file.
16127 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16128 (null_stream): New global.
16129 (ui_file_delete): Delete.
16130 (ui_file::ui_file): New.
16131 (null_file_isatty): Delete.
16132 (ui_file::~ui_file): New.
16133 (null_file_rewind): Delete.
16134 (ui_file::printf): New.
16135 (null_file_put): Delete.
16136 (null_file_flush): Delete.
16137 (ui_file::putstr): New.
16138 (null_file_write): Delete.
16139 (ui_file::putstrn): New.
16140 (null_file_read): Delete.
16141 (ui_file::putc): New.
16142 (null_file_fputs): Delete.
16143 (null_file_write_async_safe): Delete.
16144 (ui_file::vprintf): New.
16145 (null_file_delete): Delete.
16146 (null_file::write): New.
16147 (null_file_fseek): Delete.
16148 (null_file::puts): New.
16149 (ui_file_data): Delete.
16150 (null_file::write_async_safe): New.
16151 (gdb_flush, ui_file_isatty): Adjust.
16152 (ui_file_put, ui_file_rewind): Delete.
16153 (ui_file_write): Adjust.
16154 (ui_file_write_for_put): Delete.
16155 (ui_file_write_async_safe, ui_file_read): Adjust.
16156 (ui_file_fseek): Delete.
16157 (fputs_unfiltered): Adjust.
16158 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16159 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16160 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16161 (set_ui_file_data): Delete.
16162 (string_file::~string_file, string_file::write)
16163 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16164 (do_ui_file_as_string, ui_file_as_string): Delete.
16165 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16166 (struct mem_file): Delete.
16167 (mem_file_new): Delete.
16168 (stdio_file::stdio_file): New.
16169 (mem_file_delete): Delete.
16170 (stdio_file::stdio_file): New.
16171 (mem_fileopen): Delete.
16172 (stdio_file::~stdio_file): New.
16173 (mem_file_rewind): Delete.
16174 (stdio_file::set_stream): New.
16175 (mem_file_put): Delete.
16176 (stdio_file::open): New.
16177 (mem_file_write): Delete.
16178 (stdio_file_magic, struct stdio_file): Delete.
16179 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16180 (stdio_file::flush): New.
16181 (stdio_file_read): Rename to ...
16182 (stdio_file::read): ... this. Adjust.
16183 (stdio_file_write): Rename to ...
16184 (stdio_file::write): ... this. Adjust.
16185 (stdio_file_write_async_safe): Rename to ...
16186 (stdio_file::write_async_safe) ... this. Adjust.
16187 (stdio_file_fputs): Rename to ...
16188 (stdio_file::puts) ... this. Adjust.
16189 (stdio_file_isatty): Delete.
16190 (stdio_file_fseek): Delete.
16191 (stdio_file::isatty): New.
16192 (stderr_file_write): Rename to ...
16193 (stderr_file::write) ... this. Adjust.
16194 (stderr_file_fputs): Rename to ...
16195 (stderr_file::puts) ... this. Adjust.
16196 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16197 (stderr_file::stderr_file): New.
16198 (tee_file_magic): Delete.
16199 (struct tee_file): Delete.
16200 (tee_file::tee_file): New.
16201 (tee_file_new): Delete.
16202 (tee_file::~tee_file): New.
16203 (tee_file_delete): Delete.
16204 (tee_file_flush): Rename to ...
16205 (tee_file::flush): ... this. Adjust.
16206 (tee_file_write): Rename to ...
16207 (tee_file::write): ... this. Adjust.
16208 (tee_file::write_async_safe): New.
16209 (tee_file_fputs): Rename to ...
16210 (tee_file::puts): ... this. Adjust.
16211 (tee_file_isatty): Rename to ...
16212 (tee_file::isatty): ... this. Adjust.
16213 * ui-file.h (struct obstack, struct ui_file): Don't
16214 forward-declare.
16215 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16216 (ui_file_write_ftype)
16217 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16218 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16219 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16220 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16221 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16222 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16223 (set_ui_file_fseek): Delete.
16224 (ui_file_data, ui_file_delete, ui_file_rewind)
16225 (struct ui_file): New.
16226 (ui_file_up): New.
16227 (class null_file): New.
16228 (null_stream): Declare.
16229 (ui_file_write_for_put, ui_file_put): Delete.
16230 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16231 Delete.
16232 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16233 (gdb_fopen, tee_file_new): Delete.
16234 (struct string_file): New.
16235 (struct stdio_file): New.
16236 (stdio_file_up): New.
16237 (struct stderr_file): New.
16238 (class tee_file): New.
16239 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16240 of a 'ui_file *'. Adjust.
16241 * ui-out.h (class ui_out) <field_stream>: Likewise.
16242 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16243 (null_stream): Delete.
16244 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16245 Adjust.
16246 * utils.h (struct ui_file): Delete forward declaration..
16247 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16248 (error_stream): Take a 'string_file &' instead of a
16249 'ui_file *'.
16250 * varobj.c (varobj_value_get_print_value): Use string_file.
16251 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16252 * gdbarch.c: Regenerate.
16253
187808b0
PA
162542017-02-02 Pedro Alves <palves@redhat.com>
16255
16256 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16257 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16258 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16259 Adjust to call gdb_print_insn instead of
16260 gdb_disassembler::print_insn.
16261 (dump_insns, do_mixed_source_and_assembly_deprecated)
16262 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16263 'gdbarch' parameter. Remove gdb_disassembler parameter.
16264 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16265 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16266 declaration.
16267 (gdb_pretty_print_insn): Re-add declaration.
16268 * record-btrace.c (btrace_insn_history): Don't allocate a
16269 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16270
7a8eb317
SM
162712017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16272
16273 * disasm.h (gdb_disassembly): Remove file_string parameter.
16274 * disasm.c (gdb_disassembly): Likewise.
16275 * cli/cli-cmds.c (print_disassembly): Adapt.
16276 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16277 * stack.c (do_gdb_disassembly): Likewise.
16278
7346ef59
AA
162792017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16280
16281 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16282 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16283 targets. And if the implicit value is longer than needed, extract
16284 the first bytes instead of the "least significant" ones.
16285
cd4007e4
MM
162862017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16287
16288 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16289 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16290 (btrace_fetch): Assert can_access_registers_ptid.
16291 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16292 validate_registers_access.
16293
cf77c34e
MM
162942017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16295
16296 * gdbthread.h (can_access_registers_ptid): New.
16297 * thread.c (can_access_registers_ptid): New.
16298
be85ce7d
PA
162992017-02-01 Pedro Alves <palves@redhat.com>
16300
16301 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16302
29b0b251
PA
163032017-01-31 Pedro Alves <palves@redhat.com>
16304
16305 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16306 Fix typos.
16307
289b5b24
PA
163082017-01-31 Pedro Alves <palves@redhat.com>
16309
16310 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16311 not used.
16312
b47413b4
PA
163132017-01-31 Pedro Alves <palves@redhat.com>
16314
16315 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16316
60adb36c
PA
163172017-01-31 Pedro Alves <palves@redhat.com>
16318
16319 * common/scoped_restore.h
16320 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16321 change the value's parameter type to T2.
16322 (make_scoped_restore): Likewise.
16323
2735833d
WT
163242017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16325 Richard Henderson <rth@redhat.com>
16326
16327 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16328 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16329 GS_BASE for older kernels.
16330 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16331 GS_BASE for older kernels.
16332 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16333 and GS_BASE to the offset table.
16334 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16335 system register group.
16336 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16337 for older kernels.
16338 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16339 amd64 ABI.
16340 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16341 AMD64_GSBASE_REGNUM.
16342 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16343 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16344 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16345 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16346 i386/64bit-segments.xml in those rules.
16347 * features/i386/64bit-segments.xml: New file.
16348 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16349 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16350 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16351 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16352 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16353 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16354 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16355 * features/i386/amd64-avx-linux.c: Regenerated.
16356 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16357 * features/i386/amd64-avx-mpx.c: Regenerated.
16358 * features/i386/amd64-avx512-linux.c: Regenerated.
16359 * features/i386/amd64-linux.c: Regenerated.
16360 * features/i386/amd64-mpx-linux.c: Regenerated.
16361 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16362 * features/i386/i386-avx-mpx.c: Regenerated.
16363 * features/i386/x32-avx-linux.c: Regenerated.
16364 * features/i386/x32-avx512-linux.c: Regenerated.
16365 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16366 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16367 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16368 * regformats/i386/amd64-linux.dat: Regenerated.
16369 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16370 * regformats/i386/x32-avx-linux.dat: Regenerated.
16371 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16372 * regformats/i386/x32-linux.dat: Regenerated.
16373
8884e97e
WT
163742017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16375
16376 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16377 Set to AMD64_NUM_REGS.
16378
7005d26a
WT
163792017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16380
16381 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16382 that checks validity of a register number.
16383
4bd2e1b2
KC
163842017-01-27 Kees Cook <keescook@google.com>
16385
16386 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16387 fetch_fpregs if target has fpa registers.
16388 (arm_linux_store_inferior_registers): Call store_fpregs if target
16389 has fpa registers.
16390
7cf1de6c
AA
163912017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16392
16393 * cris-tdep.c (cris_gdbarch_init): Remove check for
16394 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16395
874a1c8c
AT
163962017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16397
16398 * corelow.c (get_core_register_section): Check for regset
16399 existence before checking for REGSET_VARIABLE_SIZE.
16400
d8b49cf0
YQ
164012017-01-26 Yao Qi <yao.qi@linaro.org>
16402 Pedro Alves <palves@redhat.com>
16403
16404 PR gdb/20939
16405 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16406 call memory_error, save memaddr instead.
16407 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16408 negative, cal memory_error.
16409 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16410
658ca58c
YQ
164112017-01-26 Yao Qi <yao.qi@linaro.org>
16412
16413 * disasm-selftests.c (memory_error_test): New function.
16414 (_initialize_disasm_selftests): Register memory_error_test.
16415
79843d45
YQ
164162017-01-26 Yao Qi <yao.qi@linaro.org>
16417
16418 * Makefile.in (SFILES): Add disasm-selftests.c and
16419 selftest-arch.c.
16420 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16421 * disasm-selftests.c: New file.
16422 * selftest-arch.c: New file.
16423 * selftest-arch.h: New file.
16424
8cafda32
YQ
164252017-01-26 Yao Qi <yao.qi@linaro.org>
16426
16427 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16428 to bfd_arch_mep. Don't return 0 if section is not
16429 found. Call print_insn_mep.
16430
e47ad6c0
YQ
164312017-01-26 Pedro Alves <palves@redhat.com>
16432 Yao Qi <yao.qi@linaro.org>
16433
16434 * arm-tdep.c: Include "disasm.h".
16435 (gdb_print_insn_arm): Update code to get gdbarch.
16436 * disasm.c (dis_asm_read_memory): Change it to
16437 gdb_disassembler::dis_asm_read_memory.
16438 (dis_asm_memory_error): Likewise.
16439 (dis_asm_print_address): Likewise.
16440 (gdb_pretty_print_insn): Change it to
16441 gdb_disassembler::pretty_print_insn.
16442 (dump_insns): Add one argument gdb_disassemlber. All
16443 callers updated.
16444 (do_mixed_source_and_assembly_deprecated): Likewise.
16445 (do_mixed_source_and_assembly): Likewise.
16446 (do_assembly_only): Likewise.
16447 (gdb_disassembler::gdb_disassembler): New.
16448 (gdb_disassembler::print_insn): New.
16449 * disasm.h (class gdb_disassembler): New.
16450 (gdb_pretty_print_insn): Remove declaration.
16451 (gdb_disassemble_info): Likewise.
16452 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16453 (gdbscm_disasm_read_memory_worker): Update.
16454 (gdbscm_disasm_read_memory): Update.
16455 (gdbscm_disasm_memory_error): Remove.
16456 (gdbscm_disasm_print_address): Remove.
16457 (gdbscm_disassembler::gdbscm_disassembler): New.
16458 (gdbscm_print_insn_from_port): Update.
16459 * mips-tdep.c: Include disasm.h.
16460 (gdb_print_insn_mips): Update code to get gdbarch.
16461 * record-btrace.c (btrace_insn_history): Update.
16462 * spu-tdep.c: Include disasm.h.
16463 (struct spu_dis_asm_data): Remove.
16464 (struct spu_dis_asm_info): New.
16465 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16466 SPU id.
16467 (gdb_print_insn_spu): Cast disassemble_info to
16468 spu_dis_asm_info.
16469
80d75874
YQ
164702017-01-26 Yao Qi <yao.qi@linaro.org>
16471
16472 * disasm.c (do_ui_file_delete): Delete.
16473 (gdb_insn_length): Move code creating stream to ...
16474 * utils.c (null_stream): ... here. New function.
16475 * utils.h (null_stream): Declare.
16476
60685cd0
SM
164772017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16478
16479 * python/py-inferior.c (find_thread_object): Return directly
16480 from the loop. Remove "found" variable.
16481
eb1cdb62
JB
164822017-01-21 Joel Brobecker <brobecker@adacore.com>
16483
16484 GDB 7.12.1 released.
16485
b1ce6568
SM
164862017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16487
16488 * python/py-function.c (fnpy_call): Reorder declarations to have
16489 the gdbpy_enter object declared first.
16490 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16491
6f8b0407
SM
164922017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16493
fec93fb1 16494 PR python/21068
6f8b0407
SM
16495 * python/python-internal.h (PyMem_RawMalloc): Define for
16496 Python < 3.4.
16497 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16498 PyMem_RawMalloc instead of PyMem_Malloc.
16499
78cbbba8
LM
165002017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16501 Luis Machado <lgustavo@codesourcery.com>
16502
16503 * NEWS (New commands): Mention flash-erase.
16504 (New MI commands): Mention target-flash-erase.
16505 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16506 command.
16507 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16508 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16509 * target.c (flash_erase_command): New function.
16510 (initialize_targets): Add new flash-erase command.
16511 * target.h (flash_erase_command): New declaration.
16512
2132fe85
JB
165132017-01-20 Joel Brobecker <brobecker@adacore.com>
16514
16515 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16516 HAVE_SYS_PROCFS_H is defined.
16517
d1dff226
AH
165182017-01-18 Alan Hayward <alan.hayward@arm.com>
16519
16520 * remote.c (struct cached_reg): Change data into a pointer.
16521 * (stop_reply_dtr): Free data pointers before deleting vector.
16522 (process_stop_reply): Likewise.
16523 (remote_parse_stop_reply): Allocate space for data
16524
9890e433
AH
165252017-01-18 Alan Hayward <alan.hayward@arm.com>
16526
16527 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16528 MAX_REGISTER_SIZE.
16529 (amd64_pseudo_register_read_value): Likewise.
16530 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16531 (store_register_using_P): Likewise.
16532 * regcache.c (regcache_xfer_part): Likewise.
16533
7a36499a
IR
165342017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16535
16536 Split real and pseudo registers.
16537 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16538 (sparc32_pseudo_regnum): New enum.
16539 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16540 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16541 (SPARC32_CP0_REGISTERS): New macro.
16542 (sparc32_pseudo_register_name): New function.
16543 (sparc32_register_name): Use sparc32_pseudo_register_name.
16544 (sparc32_pseudo_register_type): New function.
16545 (sparc32_register_type): Use sparc32_pseudo_register_type.
16546 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16547 pseudo register numbers.
16548 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16549 (SPARC64_CP0_REGISTERS): New macro.
16550 (sparc64_pseudo_register_name): New function.
16551 (sparc64_register_name): Use sparc64_pseudo_register_name.
16552 (sparc64_pseudo_register_type): New function.
16553 (sparc64_register_type): Use sparc64_pseudo_register_type.
16554 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16555 pseudo register numbers.
16556 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16557 sparc64_store_arguments): Handle pseudo register numbers.
16558
6f8976bf
YQ
165592017-01-13 Yao Qi <yao.qi@linaro.org>
16560
16561 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16562 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16563 output.
16564 (getpkt_or_notif_sane_1): Likewise.
16565
e4241ace
YQ
165662017-01-13 Yao Qi <yao.qi@linaro.org>
16567
16568 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16569 of CC. Pass "-x c++-header" instead of "-x c".
16570
3015c064
SM
165712017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16572
16573 * remote.c (remote_can_async_p): Update comment.
16574
fde1b17d
SM
165752017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16576
16577 * linux-nat.c (linux_nat_can_async_p): Update comment.
16578
ca1ca08b
SM
165792017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16580
16581 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16582
4ad2da73
SM
165832017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16584
16585 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16586
c8b23b3f
TT
165872017-01-10 Tom Tromey <tom@tromey.com>
16588
16589 * python/py-type.c (typy_legacy_template_argument): Update.
16590 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16591 ~demangle_parse_info): Declare new members.
16592 (cp_demangled_name_to_comp): Return unique_ptr.
16593 (cp_demangled_name_parse_free)
16594 (make_cleanup_cp_demangled_name_parse_free)
16595 (cp_new_demangle_parse_info): Remove.
16596 * cp-support.c (do_demangled_name_parse_free_cleanup)
16597 (make_cleanup_cp_demangled_name_parse_free): Remove.
16598 (inspect_type, cp_canonicalize_string_full)
16599 (cp_canonicalize_string): Update.
16600 (mangled_name_to_comp): Change return type.
16601 (cp_class_name_from_physname, method_name_from_physname)
16602 (cp_func_name, cp_remove_params): Update.
16603 * cp-name-parser.y (demangle_parse_info): New constructor, from
16604 cp_new_demangle_parse_info.
16605 (~demangle_parse_info): New destructor, from
16606 cp_demangled_name_parse_free.
16607 (cp_merge_demangle_parse_infos): Update.
16608 (cp_demangled_name_to_comp): Change return type.
16609
1ac32117
TT
166102017-01-10 Tom Tromey <tom@tromey.com>
16611
16612 * top.c (prevent_dont_repeat): Change return type.
16613 * python/python.c (execute_gdb_command): Use std::string.
16614 Update.
16615 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16616 * command.h (prevent_dont_repeat): Change return type.
16617 * breakpoint.c (bpstat_do_actions_1): Update.
16618
0cf08227
TT
166192017-01-10 Tom Tromey <tom@tromey.com>
16620
16621 * value.h (scoped_value_mark::~scoped_value_mark): Call
16622 free_to_mark.
16623 (scoped_value_mark::free_to_mark): New method.
16624 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16625 scoped_value_mark.
16626
eb115069
TT
166272017-01-10 Tom Tromey <tom@tromey.com>
16628
16629 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16630 (valpy_reference_value, valpy_const_value, valpy_get_address)
16631 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16632 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16633 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16634 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16635 scoped_value_mark.
16636 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16637 * value.h (scoped_value_mark): New class.
16638
906768f9
TT
166392017-01-10 Tom Tromey <tom@tromey.com>
16640
16641 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16642 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16643 * psymtab.c (discard_psymtabs_upto): Remove.
16644 (make_cleanup_discard_psymtabs): Remove.
16645 (struct psymtab_state): Remove.
16646
bef155c3
TT
166472017-01-10 Tom Tromey <tom@tromey.com>
16648
16649 * record-full.c (record_full_save_cleanups): Remove.
16650 (record_full_save): Use gdb::unlinker.
16651 * gcore.c (do_bfd_delete_cleanup): Remove.
16652 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16653 cleanups.
16654 * dwarf2read.c (unlink_if_set): Remove.
16655 (write_psymtabs_to_index): Use gdb::unlinker.
16656 * common/gdb_unlinker.h: New file.
16657
192b62ce
TT
166582017-01-10 Tom Tromey <tom@tromey.com>
16659
16660 * windows-tdep.c (windows_xfer_shared_library): Update.
16661 * windows-nat.c (windows_make_so): Update.
16662 * utils.h (make_cleanup_bfd_unref): Remove.
16663 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16664 * symfile.h (symfile_bfd_open)
16665 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16666 * symfile.c (read_symbols, symbol_file_add)
16667 (separate_debug_file_exists): Update.
16668 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16669 (generic_load, reread_symbols): Update.
16670 * symfile-mem.c (symbol_file_add_from_memory): Update.
16671 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16672 (spu_symbol_file_add_from_memory): Update.
16673 * solist.h (struct target_so_ops) <bfd_open>: Return
16674 gdb_bfd_ref_ptr.
16675 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16676 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16677 gdb_bfd_ref_ptr.
16678 (solib_map_sections, reload_shared_libraries_1): Update.
16679 * solib-svr4.c (enable_break): Update.
16680 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16681 * solib-frv.c (enable_break2): Update.
16682 * solib-dsbt.c (enable_break): Update.
16683 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16684 gdb_bfd_ref_ptr.
16685 (darwin_solib_get_all_image_info_addr_at_init): Update.
16686 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16687 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16688 * record-full.c (record_full_save): Update.
16689 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16690 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16691 * minidebug.c (find_separate_debug_file_in_section): Return
16692 gdb_bfd_ref_ptr.
16693 * machoread.c (macho_add_oso_symfile): Change abfd to
16694 gdb_bfd_ref_ptr.
16695 (macho_symfile_read_all_oso): Update.
16696 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16697 (macho_symfile_read): Update.
16698 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16699 (jit_bfd_try_read_symtab): Update.
16700 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16701 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16702 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16703 gdb_bfd_ref_ptr.
16704 (gdb_bfd_ref_policy): New struct.
16705 (gdb_bfd_ref_ptr): New typedef.
16706 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16707 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16708 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16709 gdb_bfd_ref_ptr.
16710 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16711 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16712 (gcore_command): Update.
16713 * exec.c (exec_file_attach): Update.
16714 * elfread.c (elf_symfile_read): Update.
16715 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16716 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16717 (open_and_init_dwo_file): Update.
16718 (open_dwp_file): Return gdb_bfd_ref_ptr.
16719 (open_and_init_dwp_file): Update.
16720 * corelow.c (core_open): Update.
16721 * compile/compile-object-load.c (compile_object_load): Update.
16722 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16723 * coffread.c (coff_symfile_read): Update.
16724 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16725 gdb_bfd_ref_ptr. Rename.
16726 (dump_bfd_file, restore_command): Update.
16727 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16728 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16729 (find_separate_debug_file_by_buildid): Update.
16730
50315b21
TT
167312017-01-10 Tom Tromey <tom@tromey.com>
16732
16733 * common/gdb_ref_ptr.h: New file.
16734 * python/py-ref.h (struct gdbpy_ref_policy): New.
16735 (gdbpy_ref): Now a typedef.
16736
fc4007c9
TT
167372017-01-10 Tom Tromey <tom@tromey.com>
16738
16739 * utils.h (make_cleanup_htab_delete): Don't declare.
16740 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16741 Remove.
16742 * linespec.c (decode_compound_collector): Add constructor,
16743 destructor.
16744 (lookup_prefix_sym): Remove cleanup.
16745 (symtab_collector): Add constructor, destructor.
16746 (collect_symtabs_from_filename): Remove cleanup.
16747 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16748 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16749 Use htab_up.
16750 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16751 * dwarf2read.c (dw2_expand_symtabs_matching)
16752 (dw2_map_symbol_filenames, dwarf_decode_macros)
16753 (write_psymtabs_to_index): Use htab_up.
16754 * dwarf2loc.c (func_verify_no_selftailcall)
16755 (call_site_find_chain_1, func_verify_no_selftailcall)
16756 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16757 std::vector, gdb::unique_xmalloc_ptr.
16758 (call_sitep): Remove typedef.
16759 (dwarf2_locexpr_baton_eval): Remove unused variable.
16760
8dbcee67
TT
167612017-01-10 Tom Tromey <tom@tromey.com>
16762
16763 * python/python-internal.h (make_cleanup_py_decref)
16764 (make_cleanup_py_xdecref): Don't declare.
16765 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16766 (py_xdecref, make_cleanup_py_xdecref): Remove.
16767
13df46cc
TT
167682017-01-10 Tom Tromey <tom@tromey.com>
16769
16770 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16771 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16772
06fc9bf7
TT
167732017-01-10 Tom Tromey <tom@tromey.com>
16774
16775 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16776
830a4934
TT
167772017-01-10 Tom Tromey <tom@tromey.com>
16778
16779 * python/py-utils.c (unicode_to_encoded_string)
16780 (python_string_to_target_string)
16781 (python_string_to_target_python_string)
16782 (python_string_to_host_string, gdbpy_obj_to_string)
16783 (get_addr_from_python): Use gdbpy_ref.
16784
4586d543
TT
167852017-01-10 Tom Tromey <tom@tromey.com>
16786
16787 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16788 gdbpy_ref.
16789
59876f8f
TT
167902017-01-10 Tom Tromey <tom@tromey.com>
16791
16792 * python/python.c (eval_python_command, gdbpy_decode_line)
16793 (gdbpy_run_events, gdbpy_start_type_printers)
16794 (gdbpy_apply_type_printers): Use gdbpy_ref.
16795
97d83487
TT
167962017-01-10 Tom Tromey <tom@tromey.com>
16797
16798 * python/py-param.c (get_doc_string, compute_enum_values): Use
16799 gdbpy_ref.
16800
9205649a
TT
168012017-01-10 Tom Tromey <tom@tromey.com>
16802
16803 * python/py-inferior.c (find_thread_object, build_inferior_list):
16804 Use gdbpy_ref.
16805
74c49d45
TT
168062017-01-10 Tom Tromey <tom@tromey.com>
16807
16808 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16809
16361ffb
TT
168102017-01-10 Tom Tromey <tom@tromey.com>
16811
16812 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16813 gdbpy_ref.
16814
905f2cca
TT
168152017-01-10 Tom Tromey <tom@tromey.com>
16816
16817 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16818 extra incref.
16819 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16820 Use gdbpy_ref.
16821
64081434
TT
168222017-01-10 Tom Tromey <tom@tromey.com>
16823
16824 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16825 gdbpy_ref.
16826
59e9e831
TT
168272017-01-10 Tom Tromey <tom@tromey.com>
16828
16829 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16830 decref results of PyArg_ParseTupleAndKeywords.
16831
9de10f6d
TT
168322017-01-10 Tom Tromey <tom@tromey.com>
16833
16834 * python/python.c (python_run_simple_file): Use
16835 unique_xmalloc_ptr, gdbpy_ref.
16836
2bd5759d
TT
168372017-01-10 Tom Tromey <tom@tromey.com>
16838
16839 * python/py-prettyprint.c (print_stack_unless_memory_error)
16840 (print_string_repr, print_children): Use gdbpy_ref.
16841 (dummy_python_frame): New class.
16842 (dummy_python_frame::dummy_python_frame): Rename from
16843 push_dummy_python_frame.
16844 (py_restore_tstate): Remove.
16845
3b4e0e01
TT
168462017-01-10 Tom Tromey <tom@tromey.com>
16847
16848 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16849
17a22718
TT
168502017-01-10 Tom Tromey <tom@tromey.com>
16851
16852 * python/python.c (ensure_python_env, restore_python_env):
16853 Remove.
16854 * python/python-internal.h (ensure_python_env): Don't declare.
16855 * varobj.h (varobj_ensure_python_env): Don't declare.
16856 * varobj.c (varobj_ensure_python_env): Remove.
16857
68cdc557
TT
168582017-01-10 Tom Tromey <tom@tromey.com>
16859
16860 * varobj.c (varobj_value_get_print_value): Use
16861 gdbpy_enter_varobj.
16862
1eba6383
TT
168632017-01-10 Tom Tromey <tom@tromey.com>
16864
16865 * python/py-prettyprint.c (print_string_repr, print_children):
16866 Update.
16867 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16868 of "encoding".
16869 * varobj.c (varobj_value_get_print_value): Update.
16870 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16871
bde7b3e3
TT
168722017-01-10 Tom Tromey <tom@tromey.com>
16873
16874 * varobj.c (varobj_get_display_hint)
16875 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16876 (varobj_set_visualizer, free_variable): Use
16877 gdbpy_enter_varobj.
16878
a7785f8c
TT
168792017-01-10 Tom Tromey <tom@tromey.com>
16880
16881 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16882 (do_finish_initialization): New function. Use gdbpy_ref.
16883 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16884 do_finish_initialization.
16885
2865bfce
TT
168862017-01-10 Tom Tromey <tom@tromey.com>
16887
16888 * python/py-param.c (get_set_value, get_show_value): Use
16889 gdbpy_enter, gdbpy_ref.
16890
0e9dcc75
TT
168912017-01-10 Tom Tromey <tom@tromey.com>
16892
16893 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16894
12a5cedd
TT
168952017-01-10 Tom Tromey <tom@tromey.com>
16896
16897 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16898
788f2586
TT
168992017-01-10 Tom Tromey <tom@tromey.com>
16900
16901 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16902 Use gdbpy_enter_varobj.
16903
6cd67bea
TT
169042017-01-10 Tom Tromey <tom@tromey.com>
16905
16906 * varobj.c (gdbpy_enter_varobj): New constructor.
16907 * python/python-internal.h (gdbpy_enter_varobj): New class.
16908 * python/py-varobj.c (py_varobj_get_iterator): Use
16909 gdbpy_enter_varobj.
16910
14b122bf
TT
169112017-01-10 Tom Tromey <tom@tromey.com>
16912
16913 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16914 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16915 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16916 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16917 unique_xmalloc_ptr.
16918 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16919
bf1ca3b9
TT
169202017-01-10 Tom Tromey <tom@tromey.com>
16921
16922 * python/py-xmethods.c (invoke_match_method): Use
16923 gdbpy_ref.
16924
572a5524
TT
169252017-01-10 Tom Tromey <tom@tromey.com>
16926
16927 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16928 gdbpy_enter, gdbpy_ref.
16929
396a78b6
TT
169302017-01-10 Tom Tromey <tom@tromey.com>
16931
16932 * python/python.c (python_interactive_command): Use gdbpy_enter.
16933
a88b13c7
TT
169342017-01-10 Tom Tromey <tom@tromey.com>
16935
16936 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16937 gdbpy_ref.
16938
e9f0c363
TT
169392017-01-10 Tom Tromey <tom@tromey.com>
16940
16941 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16942 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16943
6349f452
TT
169442017-01-10 Tom Tromey <tom@tromey.com>
16945
16946 * utils.h (htab_deleter): New struct.
16947 (htab_up): New typedef.
16948 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16949 gdbpy_enter, gdbpy_ref, htab_up.
16950
c0171de6
TT
169512017-01-10 Tom Tromey <tom@tromey.com>
16952
16953 * python/py-unwind.c (pending_frame_invalidate): Remove.
16954 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16955
f18e226f
TT
169562017-01-10 Tom Tromey <tom@tromey.com>
16957
16958 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16959 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16960
c57af3f1
TT
169612017-01-10 Tom Tromey <tom@tromey.com>
16962
16963 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16964
60e600ec
TT
169652017-01-10 Tom Tromey <tom@tromey.com>
16966
16967 * python/python.c (gdbpy_eval_from_control_command)
16968 (gdbpy_source_script, gdbpy_run_events)
16969 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16970 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16971 gdbpy_enter.
16972
bf7da5b0
TT
169732017-01-10 Tom Tromey <tom@tromey.com>
16974
16975 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16976
2d38bced
TT
169772017-01-10 Tom Tromey <tom@tromey.com>
16978
16979 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16980
07bc7329
TT
169812017-01-10 Tom Tromey <tom@tromey.com>
16982
16983 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16984 (python_on_inferior_call_pre, python_on_inferior_call_post)
16985 (python_on_memory_change, python_on_register_change)
16986 (python_inferior_exit, python_new_objfile, add_thread_object)
16987 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16988
6e7c365e
TT
169892017-01-10 Tom Tromey <tom@tromey.com>
16990
16991 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16992 (bpfinishpy_handle_exit): Use gdbpy_enter.
16993
6ba0cd40
TT
169942017-01-10 Tom Tromey <tom@tromey.com>
16995
16996 * python/py-cmd.c (cmdpy_destroyer)
16997 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16998 gdbpy_enter.
16999
de2dc875
TT
170002017-01-10 Tom Tromey <tom@tromey.com>
17001
17002 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17003 gdbpy_enter.
17004 (gdbpy_breakpoint_has_cond): Likewise.
17005
4ecee2c4
TT
170062017-01-10 Tom Tromey <tom@tromey.com>
17007
17008 * python/python.c (gdbpy_enter): New constructor.
17009 (~gdbpy_enter): New destructor.
17010 (restore_python_env, ensure_python_env): Rewrite.
17011 * python/python-internal.h (gdbpy_enter): New class.
17012
37fce74f
TT
170132017-01-10 Tom Tromey <tom@tromey.com>
17014
17015 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17016
53a0cca3
TT
170172017-01-10 Tom Tromey <tom@tromey.com>
17018
17019 * python/py-value.c (value_has_field, get_field_flag)
17020 (get_field_type, valpy_getitem, convert_value_from_python): Use
17021 gdbpy_ref.
17022
ff3724f5
TT
170232017-01-10 Tom Tromey <tom@tromey.com>
17024
17025 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17026 gdbpy_ref.
17027
0700aea5
TT
170282017-01-10 Tom Tromey <tom@tromey.com>
17029
17030 * python/py-prettyprint.c (search_pp_list)
17031 (find_pretty_printer_from_objfiles)
17032 (find_pretty_printer_from_progspace)
17033 (find_pretty_printer_from_gdb, find_pretty_printer)
17034 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17035 gdbpy_ref.
17036
1bb44c9f
TT
170372017-01-10 Tom Tromey <tom@tromey.com>
17038
17039 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17040
87ce03fd
TT
170412017-01-10 Tom Tromey <tom@tromey.com>
17042
17043 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17044 (ltpy_get_all_source_lines): Use gdbpy_ref.
17045
ee0a3fb8
TT
170462017-01-10 Tom Tromey <tom@tromey.com>
17047
17048 * python/py-framefilter.c (extract_sym, extract_value)
17049 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17050 gdbpy_ref.
17051
bf2a52fa
TT
170522017-01-10 Tom Tromey <tom@tromey.com>
17053
17054 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17055
f59fe7f8
TT
170562017-01-10 Tom Tromey <tom@tromey.com>
17057
17058 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17059
80bd970a
TT
170602017-01-10 Tom Tromey <tom@tromey.com>
17061
17062 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17063 gdbpy_ref.
17064
d1b3de2e
TT
170652017-01-10 Tom Tromey <tom@tromey.com>
17066
17067 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17068
3bb43384
TT
170692017-01-10 Tom Tromey <tom@tromey.com>
17070
17071 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17072 (typy_range): Use gdbpy_ref.
17073
abf5651e
TT
170742017-01-10 Tom Tromey <tom@tromey.com>
17075
17076 * python/py-threadevent.c (create_thread_event_object): Use
17077 gdbpy_ref.
17078 * python/py-stopevent.c (create_stop_event_object): Simplify.
17079 (emit_stop_event): Use gdbpy_ref.
17080 * python/py-signalevent.c (create_signal_event_object): Use
17081 gdbpy_ref.
17082 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17083 (emit_new_objfile_event, create_clear_objfiles_event_object)
17084 (emit_clear_objfiles_event): Use gdbpy_ref.
17085 * python/py-infevents.c (create_inferior_call_event_object)
17086 (create_register_changed_event_object)
17087 (create_memory_changed_event_object, emit_inferior_call_event)
17088 (emit_memory_changed_event, emit_register_changed_event): Use
17089 gdbpy_ref.
17090 * python/py-exitedevent.c (create_exited_event_object)
17091 (emit_exited_event): Use gdbpy_ref.
17092 * python/py-event.h (evpy_emit_event): Remove
17093 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17094 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17095 * python/py-continueevent.c (emit_continue_event): Use
17096 gdbpy_ref.
17097 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17098 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17099 gdbpy_ref.
17100 * python/py-bpevent.c (create_breakpoint_event_object): Use
17101 gdbpy_ref.
17102
a68ff33e
TT
171032017-01-10 Tom Tromey <tom@tromey.com>
17104
17105 * python/py-ref.h: New file.
17106
7becfd03
SM
171072017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17108
17109 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17110 void.
17111 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17112 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17113 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17114 * ui-out.c (ui_out::redirect): Likewise.
17115 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17116 * cli/cli-logging.c (set_logging_redirect): Update call site of
17117 ui_out::redirect.
17118 (handle_redirections): Likewise.
17119 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17120 * top.c (execute_command_to_string): Likewise.
17121 * utils.c (do_ui_out_redirect_pop): Likewise.
17122
df294654
SM
171232017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17124
17125 * stack.c (_initialize_stack): Update "frame" command help message.
17126
f5e6296e
IB
171272017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17128
17129 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17130
0e2d6fa6
YQ
171312017-01-06 Yao Qi <yao.qi@linaro.org>
17132
17133 * x86-linux-nat.h: Include gdb_proc_service.h.
17134
44d6d3f9
YQ
171352017-01-06 Yao Qi <yao.qi@linaro.org>
17136
17137 * ser-base.h: Include serial.h.
17138
656731fe
YQ
171392017-01-06 Yao Qi <yao.qi@linaro.org>
17140
17141 * ppc-linux-tdep.h: Include ppc-tdep.h.
17142
1ca8f924
YQ
171432017-01-06 Yao Qi <yao.qi@linaro.org>
17144
17145 * nat/amd64-linux-siginfo.h: Include signal.h.
17146
bc3008c4
YQ
171472017-01-06 Yao Qi <yao.qi@linaro.org>
17148
17149 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17150
66c80d03
YQ
171512017-01-06 Yao Qi <yao.qi@linaro.org>
17152
17153 * mi/mi-parse.h: Include mi-cmds.h.
17154
051d2dda
YQ
171552017-01-06 Yao Qi <yao.qi@linaro.org>
17156
17157 * inf-loop.c: Don't include "target.h".
17158 * inf-loop.h: Include it here.
17159
8018d34f
YQ
171602017-01-06 Yao Qi <yao.qi@linaro.org>
17161
17162 * dfp.h: Include "dboulest.h" and "expression.h".
17163
c0b8369c
YQ
171642017-01-06 Yao Qi <yao.qi@linaro.org>
17165
17166 * ax-gdb.h: Include "ax.h".
17167
ad5cba2a
YQ
171682017-01-06 Yao Qi <yao.qi@linaro.org>
17169
17170 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17171 with nat/gdb_ptrace.h.
17172
1c33cd7f
YQ
171732017-01-05 Yao Qi <yao.qi@linaro.org>
17174
17175 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17176 new line.
17177 (mips64_fbsd_sigframe_init): Likewise.
17178
c988ac1d
JB
171792017-01-04 John Baldwin <jhb@FreeBSD.org>
17180
17181 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17182 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17183
b268007c
JB
171842017-01-04 John Baldwin <jhb@FreeBSD.org>
17185
17186 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17187 * NEWS: Mention new FreeBSD/mips native configuration.
17188 * config/mips/fbsd.mh: New file.
17189 * configure.host: Add mips*-*-freebsd*.
17190 * mips-fbsd-nat.c: New file.
17191
387360da
JB
171922017-01-04 John Baldwin <jhb@FreeBSD.org>
17193
17194 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17195 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17196 * NEWS: Mention new FreeBSD/mips target.
17197 * configure.tgt: Add mips*-*-freebsd*.
17198 * mips-fbsd-tdep.c: New file.
17199 * mips-fbsd-tdep.h: New file.
17200
2aaaf250
YQ
172012017-01-04 Yao Qi <yao.qi@linaro.org>
17202
17203 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17204 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17205
61baf725
JB
172062017-01-01 Joel Brobecker <brobecker@adacore.com>
17207
6dbb839a 17208 Update copyright year range in all GDB files.
61baf725 17209
c113e7ff 172102017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17211
c113e7ff 17212 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17213
c113e7ff 17214For older changes see ChangeLog-2016.
c906108c
SS
17215\f
17216Local Variables:
17217mode: change-log
17218left-margin: 8
17219fill-column: 74
17220version-control: never
57da7796 17221coding: utf-8
c906108c 17222End: