0c9d089103184cdab9c3da1f920f2cef4296beb0
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-29 Pedro Alves <palves@redhat.com>
2
3 * ada-lang.c (ada_lookup_name_info::matches): Change type of
4 parameter from completion_match to completion_match_result.
5 Adjust.
6 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
7 * completer.c (completion_tracker::maybe_add_completion): Add
8 match_for_lcd parameter and use it.
9 (completion_tracker::add_completion): Likewise.
10 * completer.h (class completion_match_for_lcd): New class.
11 (completion_match_result::match_for_lcd): New field.
12 (completion_match_result::set_match): New method.
13 (completion_tracker): Add comments.
14 (completion_tracker::add_completion): Add match_for_lcd parameter.
15 (completion_tracker::reset_completion_match_result): Reset
16 match_for_lcd too.
17 (completion_tracker::maybe_add_completion): Add match_for_lcd
18 parameter.
19 (completion_tracker::m_lowest_common_denominator_unique): Extend
20 comments.
21 * cp-support.c (cp_symbol_name_matches_1)
22 (cp_fq_symbol_name_matches): Change type of parameter from
23 completion_match to completion_match_result. Adjust.
24 * language.c (default_symbol_name_matcher): Change type of
25 parameter from completion_match to completion_match_result.
26 Adjust.
27 * language.h (completion_match_for_lcd): Forward declare.
28 (default_symbol_name_matcher): Change type of parameter from
29 completion_match to completion_match_result.
30 * symtab.c (compare_symbol_name): Adjust.
31 (completion_list_add_name): Pass the match_for_lcd to the tracker.
32 * symtab.h (ada_lookup_name_info::matches): Change type of
33 parameter from completion_match to completion_match_result.
34 (symbol_name_matcher_ftype): Likewise, and update comments.
35
36 2017-11-29 Pedro Alves <palves@redhat.com>
37
38 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
39 * minsyms.c (msymbol_is_text): Delete.
40 (msymbol_is_function): New function.
41 * minsyms.h (msymbol_is_text): Delete.
42 (msymbol_is_function): New declaration.
43 * symtab.c (find_function_alias_target): Use msymbol_is_function.
44
45 2017-11-29 Tom Tromey <tom@tromey.com>
46
47 * Makefile.in (distclean): Handle the case where rmdir fails.
48
49 2017-11-29 Tom Tromey <tom@tromey.com>
50
51 * symfile.c (_initialize_symfile): Update usage text for
52 add-symbol-file, symbol-file, load.
53
54 2017-11-29 Tom Tromey <tom@tromey.com>
55
56 * symfile.c (add_symbol_file_command): Error if some arguments to
57 -s are missing. Change unrecognized-argument error message.
58 (_initialize_symfile): Fix usage text for add-symbol-file.
59
60 2017-11-27 Tom Tromey <tom@tromey.com>
61
62 * Makefile.in (REMOTE_OBS): Remove.
63 (SFILES): Remove remote sources.
64 (COMMON_SFILES): Add remote sources.
65 (ALLDEPFILES): Remove dcache.c.
66
67 2017-11-27 Tom Tromey <tom@tromey.com>
68
69 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
70 variables.
71 (SFILES): Use SUBDIR_TARGET_SRCS.
72 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
73 (CONFIG_SRC_SUBDIR): Add target.
74 (%.o): Remove target rule.
75
76 2017-11-27 Tom Tromey <tom@tromey.com>
77
78 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
79 registry.o, thread-fsm.o, debug.o.
80 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
81 thread-fsm.c, debug.c.
82
83 2017-11-27 Tom Tromey <tom@tromey.com>
84
85 * Makefile.in (COMMON_SFILES): New.
86 (SFILES): Move some entries to COMMON_SFILES.
87 (COMMON_OBS): Use COMMON_SFILES.
88
89 2017-11-27 Tom Tromey <tom@tromey.com>
90
91 * Makefile.in (YYFILES): Update comment.
92 (YYOBJ): Redefine.
93
94 2017-11-27 Tom Tromey <tom@tromey.com>
95
96 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
97 (CONFIG_SRC_SUBDIR): Add python.
98 (%.o): Remove python rule.
99 (python/%.o): New rule.
100 * configure: Rebuild.
101 * configure.ac (CONFIG_OBS): Refer to python/python.o
102
103 2017-11-27 Tom Tromey <tom@tromey.com>
104
105 * configure: Rebuild.
106 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
107 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
108 (CONFIG_SRC_SUBDIR): Add guile.
109 (%.o): Remove guile rule.
110
111 2017-11-27 Tom Tromey <tom@tromey.com>
112
113 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
114 (%.o): Remove unittests rule.
115 (CONFIG_SRC_SUBDIR): Add unittests.
116
117 2017-11-27 Tom Tromey <tom@tromey.com>
118
119 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
120 (CONFIG_SRC_SUBDIR): Add tui.
121 (%.o): Remove tui rule.
122
123 2017-11-27 Tom Tromey <tom@tromey.com>
124
125 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
126 (%.o): Remove compile rule.
127 (CONFIG_SRC_SUBDIR): Add compile.
128
129 2017-11-27 Tom Tromey <tom@tromey.com>
130
131 * Makefile.in (SUBDIR_MI_OBS): Redefine.
132 (%.o): Remove mi rule.
133 (CONFIG_SRC_SUBDIR): Add mi.
134 (COMMON_OBS): Use mi/mi-common.o
135
136 2017-11-27 Tom Tromey <tom@tromey.com>
137
138 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
139 (%.o): Remove cli rule.
140 (CONFIG_SRC_SUBDIR): Add cli.
141
142 2017-11-27 Tom Tromey <tom@tromey.com>
143
144 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
145 * configure: Rebuild.
146 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
147 (CONFIG_DEP_SUBDIR): New variable.
148 (%.o): Add order-only dependency.
149 ($(CONFIG_DEP_SUBDIR)): New target.
150
151 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
152
153 PR gdb/21945
154 * findcmd.c (_initialize_mem_search): Update find command help
155 text.
156
157 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
158
159 * python/python.c (do_start_initialization): Change progname
160 type to gdb::unique_xmalloc_ptr. Release the pointer when using
161 Python 2.
162
163 2017-11-26 Tom Tromey <tom@tromey.com>
164
165 * common/format.h: Add include guards.
166
167 2017-11-26 Tom Tromey <tom@tromey.com>
168
169 * nat/linux-personality.h (class
170 maybe_disable_address_space_randomization): New class.
171 (maybe_disable_address_space_randomization): Don't declare
172 function.
173 * nat/linux-personality.c (restore_personality)
174 (make_disable_asr_cleanup): Remove.
175 (maybe_disable_address_space_randomization): Now a constructor.
176 (~maybe_disable_address_space_randomization): New destructor.
177 * linux-nat.c (linux_nat_create_inferior): Update.
178
179 2017-11-26 Tom Tromey <tom@tromey.com>
180
181 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
182
183 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
184
185 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
186 "cooked" register. Access only first four bytes of branch target
187 registers.
188
189 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
190
191 PR gdb/22491
192 * stap-probe.c (relocate_address): New function.
193 (stap_probe::get_relocated_address): Use 'relocate_address'.
194 (stap_probe::set_semaphore): Use 'relocate_address' and pass
195 'm_sem_addr'.
196 (stap_probe::clear_semaphore): Likewise.
197
198 2017-11-25 Pedro Alves <palves@redhat.com>
199
200 * dictionary.c: Include "safe-ctype.h".
201 * minsyms.c: Include "safe-ctype.h".
202 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
203
204 2017-11-25 Pedro Alves <palves@redhat.com>
205
206 * completer.c (complete_line_internal_1): Skip spaces until the
207 start of the command.
208
209 2017-11-24 Pedro Alves <palves@redhat.com>
210
211 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
212 cp_fq_symbol_name_matches. Pass language_cplus to
213 strncmp_with_mode.
214 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
215 (selftests::test_cp_symbol_name_cmp): New.
216 (_initialize_cp_support): Register "cp_symbol_name_matches"
217 selftests.
218 * language.c (default_symbol_name_matcher): Pass language_minimal
219 to strncmp_iw_with_mode.
220 * utils.c: Include "cp-support.h" and <algorithm>.
221 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
222 (cp_is_operator): New functions.
223 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
224 skip whitespace in the symbol name when the lookup name doesn't
225 have spaces, and vice versa.
226 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
227 * utils.h (strncmp_iw_with_mode): Add language parameter.
228
229 2017-11-24 Joel Brobecker <brobecker@adacore.com>
230
231 * ada-lang.c (ada_exception_message_1, ada_exception_message):
232 New functions.
233 (print_it_exception): If available, display the exception
234 message as well.
235 * NEWS: Document new feature.
236
237 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
238
239 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
240
241 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
242
243 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
244 (dtrace_probe::is_enabled, dtrace_probe::enable)
245 (dtrace_probe::disable): Remove keyword 'struct' at for-range
246 variable
247 * probe.c (gen_ui_out_table_header_info)
248 (print_ui_out_not_applicables): Remove keyword 'struct' at
249 for-range variable
250
251 2017-11-24 Alan Hayward <alan.hayward@arm.com>
252
253 * configure.tgt: Add arch/aarch64.o
254
255 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * common/common-utils.h: Include poison.h.
258 (xfree): Remove declaration, add definition with static_assert.
259 * common/common-utils.c (xfree): Remove.
260 * common/poison.h (IsMallocatable): Define.
261 (IsFreeable): Define.
262 (free): Delete for non-freeable types.
263 (xnew): New.
264 (XNEW): Undef and redefine.
265 (xcnew): New.
266 (XCNEW): Undef and redefine.
267 (xdelete): New.
268 (XDELETE): Undef and redefine.
269 (xnewvec): New.
270 (XNEWVEC): Undef and redefine.
271 (xcnewvec): New.
272 (XCNEWVEC): Undef and redefine.
273 (xresizevec): New.
274 (XRESIZEVEC): Undef and redefine.
275 (xdeletevec): New.
276 (XDELETEVEC): Undef and redefine.
277 (xnewvar): New.
278 (XNEWVAR): Undef and redefine.
279 (xcnewvar): New.
280 (XCNEWVAR): Undef and redefine.
281 (xresizevar): New.
282 (XRESIZEVAR): Undef and redefine.
283
284 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * gdbthread.h (private_thread_info): Define structure type, add
287 virtual pure destructor.
288 (thread_info) <priv>: Change type to unique_ptr.
289 <private_dtor>: Remove.
290 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
291 (private_thread_info::~private_thread_info): Provide default
292 implementation.
293 (thread_info::~thread_info): Don't call private_dtor nor
294 manually free priv.
295 * aix-thread.c (private_thread_info): Rename to ...
296 (aix_thread_info): ... this.
297 (get_aix_thread_info): New.
298 (sync_threadlists): Adjust.
299 (iter_tid): Adjust.
300 (aix_thread_resume): Adjust.
301 (aix_thread_fetch_registers): Adjust.
302 (aix_thread_store_registers): Adjust.
303 (aix_thread_extra_thread_info): Adjust.
304 * darwin-nat.h (private_thread_info): Rename to ...
305 (darwin_thread_info): ... this.
306 (get_darwin_thread_info): New.
307 * darwin-nat.c (darwin_init_thread_list): Adjust.
308 (darwin_check_new_threads): Adjust.
309 (thread_info_from_private_thread_info): Adjust.
310 * linux-thread-db.c (private_thread_info): Rename to ...
311 (thread_db_thread_info): ... this, initialize fields.
312 (get_thread_db_thread_info): New.
313 <dying>: Change type to bool.
314 (update_thread_state): Adjust to type rename.
315 (record_thread): Adjust to type rename an use of unique_ptr.
316 (thread_db_pid_to_str): Likewise.
317 (thread_db_extra_thread_info): Likewise.
318 (thread_db_thread_handle_to_thread_info): Likewise.
319 (thread_db_get_thread_local_address): Likewise.
320 * nto-tdep.h (private_thread_info): Rename to ...
321 (nto_thread_info): ... this, initialize fields.
322 (get_nto_thread_info): New.
323 <name>: Change type to std::string.
324 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
325 use of unique_ptr.
326 * nto-procfs.c (update_thread_private_data_name): Adjust to
327 std::string change, allocate nto_private_thread_info with new.
328 (update_thread_private_data): Adjust to unique_ptr.
329 * remote.c (private_thread_info): Rename to ...
330 (remote_thread_info): ... this, initialize data members with
331 default values.
332 <extra, name>: Change type to std::string.
333 <thread_handle>: Change type to non-pointer.
334 (free_private_thread_info): Remove.
335 (get_private_info_thread): Rename to...
336 (get_remote_thread_info): ... this, change return type, adjust to
337 use of unique_ptr, use remote_thread_info constructor.
338 (remote_add_thread): Adjust.
339 (get_private_info_ptid): Rename to...
340 (get_remote_thread_info): ...this, change return type.
341 (remote_thread_name): Use get_remote_thread_info, adjust to
342 change to std::string.
343 (struct thread_item) <~thread_item>: Remove.
344 <thread_handle>: Make non pointer.
345 (start_thread): Adjust to thread_item::thread_handle type
346 change.
347 (remote_update_thread_list): Adjust to type name change, move
348 strings from temporary to long-lived object instead of
349 duplicating.
350 (remote_threads_extra_info): Use get_remote_thread_info.
351 (process_initial_stop_replies): Likewise.
352 (resume_clear_thread_private_info): Likewise.
353 (remote_resume): Adjust to type name change.
354 (remote_commit_resume): Use get_remote_thread_info.
355 (process_stop_reply): Adjust to type name change.
356 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
357 (remote_stopped_by_hw_breakpoint): Likewise.
358 (remote_stopped_by_watchpoint): Likewise.
359 (remote_stopped_data_address): Likewise.
360 (remote_core_of_thread): Likewise.
361 (remote_thread_handle_to_thread_info): Use
362 get_private_info_thread, adjust to thread_handle field type
363 change.
364
365 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * remote.c (struct thread_item): Add constructor, disable copy
368 construction and copy assignment, define default move
369 construction and move assignment.
370 <extra, name>: Change type to std::string.
371 <core>: Initialize.
372 <thread_handle>: Make non-pointer.
373 (thread_item_t): Remove typedef.
374 (DEF_VEC_O(thread_item_t)): Remove.
375 (threads_listing_context) <contains_thread>: New method.
376 <remove_thread>: New method.
377 <items>: Change type to std::vector.
378 (clear_threads_listing_context): Remove.
379 (threads_listing_context_remove): Remove.
380 (remote_newthread_step): Use thread_item constructor, adjust to
381 change to std::vector.
382 (start_thread): Use thread_item constructor, adjust to change to
383 std::vector.
384 (end_thread): Adjust to change to std::vector and std::string.
385 (remote_get_threads_with_qthreadinfo): Use thread_item
386 constructor, adjust to std::vector.
387 (remote_update_thread_list): Adjust to change to std::vector and
388 std::string, use threads_listing_context methods.
389 (remove_child_of_pending_fork): Adjust.
390 (remove_new_fork_children): Adjust.
391 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
392 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
393 * unittests/rsp-low-selftests.c: New file.
394 * common/rsp-low.h: Include common/byte-vector.h.
395 (hex2bin): New overload.
396 * common/rsp-low.c (hex2bin): New overload.
397
398 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
399
400 * inferior.h (private_inferior): Define structure type, add
401 virtual pure destructor.
402 (inferior) <priv>: Change type to unique_ptr.
403 * inferior.c (private_inferior::~private_inferior): Provide
404 default implementation.
405 (inferior::~inferior): Don't free priv field.
406 (exit_inferior_1): Likewise.
407 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
408 (darwin_exception_info): Remove typedef.
409 (DEF_VEC_O (darwin_thread_t)); Remove.
410 (private_inferior): Rename to ...
411 (darwin_private_inferior): ... this, extend private_inferior.
412 (get_darwin_inferior): New.
413 <threads>: Change type to std::vector of darwin_thread_t pointers.
414 * darwin-nat.c (darwin_check_new_threads): Adjust.
415 (find_inferior_task_it): Adjust.
416 (darwin_find_thread); Adjust.
417 (darwin_suspend_inferior): Adjust.
418 (darwin_resume_inferior): Adjust.
419 (darwin_find_new_inferior): Adjust.
420 (darwin_decode_notify_message): Adjust.
421 (darwin_send_reply): Adjust.
422 (darwin_resume_inferior_threads): Adjust.
423 (darwin_suspend_inferior_threads): Adjust.
424 (darwin_decode_message): Adjust.
425 (darwin_wait): Adjust.
426 (darwin_interrupt): Adjust.
427 (darwin_deallocate_threads): Adjust.
428 (darwin_mourn_inferior): Adjust, don't free private data.
429 (darwin_reply_to_all_pending_messages): Adjust.
430 (darwin_stop_inferior): Adjust.
431 (darwin_setup_exceptions): Adjust.
432 (darwin_kill_inferior): Adjust.
433 (darwin_setup_request_notification): Adjust.
434 (darwin_attach_pid): Adjust.
435 (darwin_init_thread_list): Adjust.
436 (darwin_setup_fake_stop_event): Adjust.
437 (darwin_attach): Adjust.
438 (darwin_detach): Adjust.
439 (darwin_xfer_partial): Adjust.
440 (set_enable_mach_exceptions): Adjust.
441 (darwin_pid_to_exec_file): Adjust.
442 (darwin_get_ada_task_ptid): Adjust.
443 * darwin-nat-info.c (get_task_from_args): Adjust.
444 (info_mach_ports_command): Adjust.
445 (info_mach_region_command): Adjust.
446 (info_mach_exceptions_command): Adjust.
447 * remote.c (private_inferior): Rename to ...
448 (remote_private_inferior): ... this, initialize fields.
449 (get_remote_inferior); New.
450 (remote_commit_resume): Use get_remote_inferior.
451 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
452
453 2017-11-24 Pedro Alves <palves@redhat.com>
454
455 * NEWS: Mention linespecs and explicit locations, and completion
456 improvements.
457
458 2017-11-24 Yao Qi <yao.qi@linaro.org>
459
460 * regcache.c (regcache::dump): Remove footnote_register_size.
461
462 2017-11-24 Yao Qi <yao.qi@linaro.org>
463
464 * regcache.c (cooked_read_test): Add more test for readonly
465 regcache.
466
467 2017-11-24 Yao Qi <yao.qi@linaro.org>
468
469 * gdbarch-selftests.c (test_target_has_registers): Move it to
470 target.c.
471 (test_target_has_stack): Likewise.
472 (test_target_has_memory): Likewise.
473 (test_target_prepare_to_store): Likewise.
474 (test_target_store_registers): Likewise.
475 (test_target_ops): Likewise.
476 * regcache.c: Include selftest-arch.h and gdbthread.h.
477 (target_ops_no_register): New class.
478 (test_target_fetch_registers): New.
479 (test_target_store_registers): New.
480 (test_target_xfer_partial): New.
481 (readwrite_regcache): New.
482 (cooked_read_test): New.
483 (_initialize_regcache): Register the test.
484 * target.c: (test_target_has_registers): Moved from
485 gdbarch-selftests.c.
486 (test_target_has_stack): Likewise.
487 (test_target_has_memory): Likewise.
488 (test_target_prepare_to_store): Likewise.
489 (test_target_store_registers): Likewise.
490 * target.h (test_target_ops): New class.
491
492 2017-11-24 Alan Hayward <alan.hayward@arm.com>
493
494 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
495 selftest.
496
497 2017-11-24 Alan Hayward <alan.hayward@arm.com>
498
499 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
500 * arch/aarch64.c (aarch64_create_target_description): Create
501 new target description.
502 * features/Makefile: Add new files.
503 * features/aarch64.c: Remove file.
504 * features/aarch64-core.c: New autogenerated file.
505 * features/aarch64-fpu.c: New autogenerated file.
506 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
507
508 2017-11-24 Alan Hayward <alan.hayward@arm.com>
509
510 * Makefile.in: Add new files.
511 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
512 aarch64_read_description.
513 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
514 Call aarch64_read_description.
515 * aarch64-tdep.c (aarch64_read_description): New function.
516 (aarch64_gdbarch_init): Call aarch64_read_description.
517 * aarch64-tdep.h (aarch64_read_description): New function.
518 * arch/aarch64.c: New file.
519 * configure.tgt: Add new files.
520
521 2017-11-24 Yao Qi <yao.qi@linaro.org>
522
523 * mi/mi-main.c (register_changed_p): Update.
524 * value.c (value_contents_bits_eq): Change return type.
525 (value_contents_eq): Likewise.
526 * value.h: Update comments.
527
528 2017-11-24 Yao Qi <yao.qi@linaro.org>
529
530 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
531 local 'changed'. Remove error.
532 (register_changed_p): Change return type to bool.
533
534 2017-11-24 Yao Qi <yao.qi@linaro.org>
535
536 * arch/tic6x.c: New file.
537 * arch/tic6x.h: New file.
538 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
539 tic6x-core.xml and tic6x-gp.xml.
540 * features/tic6x-c6xp.c: Generated.
541 * features/tic6x-core.c: Generated.
542 * features/tic6x-gp.c: Generated.
543 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
544 "tic6x-".
545
546 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
547
548 * mi/mi-main.c (list_available_thread_groups): Change map value
549 type to std::vector.
550
551 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
552
553 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
554
555 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
556
557 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
558 back to...
559 <children_requested>: ... this.
560 (varobj_get_num_children, varobj_update): Adjust.
561
562 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
563
564 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
565 (ada_value_has_mutated): Likewise.
566 * c-varobj.c (varobj_is_anonymous_child): Likewise.
567 (c_is_path_expr_parent): Likewise.
568 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
569 (mi_cmd_var_set_frozen): Likewise.
570 (mi_cmd_var_update_iter): Likewise.
571 (mi_cmd_var_update): Likewise.
572 * varobj.c (pretty_printing): Likewise.
573 (varobj_enable_pretty_printing): Likewise.
574 (struct varobj_root) <floating, is_valid>: Likewise.
575 (struct varobj_dynamic) <children_requested>: Likewise.
576 (delete_variable): Likewise.
577 (delete_variable_1): Likewise.
578 (install_variable): Likewise.
579 (update_type_if_necessary): Likewise.
580 (install_new_value): Likewise.
581 (value_of_root): Likewise.
582 (is_root_p): Likewise.
583 (varobj_create): Likewise.
584 (varobj_delete): Likewise.
585 (varobj_has_more): Likewise.
586 (varobj_set_frozen): Likewise.
587 (varobj_get_frozen): Likewise.
588 (install_dynamic_child): Likewise.
589 (dynamic_varobj_has_child_method): Likewise.
590 (update_dynamic_varobj_children): Likewise.
591 (varobj_get_num_children): Likewise.
592 (varobj_list_children): Likewise.
593 (is_path_expr_parent): Likewise.
594 (varobj_default_is_path_expr_parent): Likewise.
595 (varobj_is_dynamic_p): Likewise.
596 (varobj_set_value): Likewise.
597 (varobj_value_has_mutated): Likewise.
598 (varobj_update): Likewise.
599 (check_scope): Likewise.
600 (value_of_root_1): Likewise.
601 (varobj_value_get_print_value): Likewise.
602 (varobj_editable_p): Likewise.
603 (varobj_value_is_changeable_p): Likewise.
604 (varobj_floating_p): Likewise.
605 (varobj_default_value_is_changeable_p): Likewise.
606 (varobj_invalidate_iter): Likewise.
607 * varobj.h (struct varobj_update_result) <type_changed,
608 children_changed, changed, value_installed>: Likewise.
609 (struct varobj) <updated, frozen, not_fetched>: Likewise.
610 (struct lang_varobj_ops) <value_is_changeable_p,
611 value_has_mutated, is_path_expr_parent>: Likewise.
612 (varobj_delete): Likewise.
613 (varobj_set_frozen): Likewise.
614 (varobj_get_frozen): Likewise.
615 (varobj_set_value): Likewise.
616 (varobj_update): Likewise.
617 (varobj_editable_p): Likewise.
618 (varobj_floating_p): Likewise.
619 (varobj_has_more): Likewise.
620 (varobj_is_dynamic_p): Likewise.
621 (varobj_default_value_is_changeable_p): Likewise.
622 (varobj_value_is_changeable_p): Likewise.
623 (varobj_is_anonymous_child): Likewise.
624 (varobj_default_is_path_expr_parent): Likewise.
625
626 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
627
628 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
629 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
630 <type_str>: Convert to 'std::string'.
631 <expr>: Convert to 'expression_up'.
632 (dtrace_probe_arg_s): Delete type and VEC.
633 (dtrace_probe_enabler_s): Likewise.
634 (struct dtrace_probe): Replace by...
635 (class dtrace_static_probe_ops): ...this and...
636 (class dtrace_probe): ...this.
637 (dtrace_probe_is_linespec): Rename to...
638 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
639 to reflect change.
640 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
641 Adjust code. Create new instance of 'dtrace_probe'.
642 (dtrace_build_arg_exprs): Rename to...
643 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
644 reflect change.
645 (dtrace_get_probes): Rename to...
646 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
647 to reflect change.
648 (dtrace_get_arg): Rename to...
649 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
650 reflect change.
651 (dtrace_probe_is_enabled): Rename to...
652 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
653 change.
654 (dtrace_get_probe_address): Rename to...
655 (dtrace_probe::get_relocated_address): ...this. Adjust code
656 to reflect change.
657 (dtrace_get_probe_argument_count): Rename to...
658 (dtrace_probe::get_argument_count): ...this. Adjust code to
659 reflect change.
660 (dtrace_can_evaluate_probe_arguments): Rename to...
661 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
662 to reflect change.
663 (dtrace_evaluate_probe_argument): Rename to...
664 (dtrace_probe::evaluate_argument): ...this. Adjust code to
665 reflect change.
666 (dtrace_compile_to_ax): Rename to...
667 (dtrace_probe::compile_to_ax): ...this. Adjust code to
668 reflect change.
669 (dtrace_probe_destroy): Delete.
670 (dtrace_type_name): Rename to...
671 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
672 reflect change.
673 (dtrace_probe::get_static_ops): New method.
674 (dtrace_gen_info_probes_table_header): Rename to...
675 (dtrace_static_probe_ops::gen_info_probes_table_header):
676 ...this. Adjust code to reflect change.
677 (dtrace_gen_info_probes_table_values): Rename to...
678 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
679 code to reflect change.
680 (dtrace_enable_probe): Rename to...
681 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
682 change.
683 (dtrace_disable_probe): Rename to...
684 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
685 change.
686 (struct probe_ops dtrace_probe_ops): Delete.
687 (info_probes_dtrace_command): Call 'info_probes_for_spops'
688 instead of 'info_probes_for_ops'.
689 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
690 of 'all_probe_ops'.
691
692 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
693 Simon Marchi <simark@simark.ca>
694
695 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
696 variable.
697 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
698 <aexpr>: Change type to 'expression_up'.
699 (stap_probe_arg_s): Delete type and VEC.
700 (struct stap_probe): Delete. Replace by...
701 (class stap_static_probe_ops): ...this and...
702 (class stap_probe): ...this. Rename variables to add 'm_'
703 prefix. Do not use 'union' for arguments anymore.
704 (stap_get_expected_argument_type): Receive probe name instead
705 of 'struct stap_probe'. Adjust code.
706 (stap_parse_probe_arguments): Rename to...
707 (stap_probe::parse_arguments): ...this. Adjust code to
708 reflect change.
709 (stap_get_probe_address): Rename to...
710 (stap_probe::get_relocated_address): ...this. Adjust code
711 to reflect change.
712 (stap_get_probe_argument_count): Rename to...
713 (stap_probe::get_argument_count): ...this. Adjust code
714 to reflect change.
715 (stap_get_arg): Rename to...
716 (stap_probe::get_arg_by_number'): ...this. Adjust code to
717 reflect change.
718 (can_evaluate_probe_arguments): Rename to...
719 (stap_probe::can_evaluate_arguments): ...this. Adjust code
720 to reflect change.
721 (stap_evaluate_probe_argument): Rename to...
722 (stap_probe::evaluate_argument): ...this. Adjust code
723 to reflect change.
724 (stap_compile_to_ax): Rename to...
725 (stap_probe::compile_to_ax): ...this. Adjust code to
726 reflect change.
727 (stap_probe_destroy): Delete.
728 (stap_modify_semaphore): Adjust comment.
729 (stap_set_semaphore): Rename to...
730 (stap_probe::set_semaphore): ...this. Adjust code to reflect
731 change.
732 (stap_clear_semaphore): Rename to...
733 (stap_probe::clear_semaphore): ...this. Adjust code to
734 reflect change.
735 (stap_probe::get_static_ops): New method.
736 (handle_stap_probe): Adjust code to create instance of
737 'stap_probe'.
738 (stap_get_probes): Rename to...
739 (stap_static_probe_ops::get_probes): ...this. Adjust code to
740 reflect change.
741 (stap_probe_is_linespec): Rename to...
742 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
743 reflect change.
744 (stap_type_name): Rename to...
745 (stap_static_probe_ops::type_name): ...this. Adjust code to
746 reflect change.
747 (stap_gen_info_probes_table_header): Rename to...
748 (stap_static_probe_ops::gen_info_probes_table_header):
749 ...this. Adjust code to reflect change.
750 (stap_gen_info_probes_table_values): Rename to...
751 (stap_probe::gen_info_probes_table_values): ...this. Adjust
752 code to reflect change.
753 (struct probe_ops stap_probe_ops): Delete.
754 (info_probes_stap_command): Use 'info_probes_for_spops'
755 instead of 'info_probes_for_ops'.
756 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
757 of 'all_probe_ops'.
758
759 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
760
761 * break-catch-throw.c (fetch_probe_arguments): Use
762 'probe.prob' instead of 'probe.probe'.
763 * breakpoint.c (create_longjmp_master_breakpoint): Call
764 'can_evaluate_arguments' and 'get_relocated_address' methods
765 from probe.
766 (create_exception_master_breakpoint): Likewise.
767 (add_location_to_breakpoint): Use 'sal->prob' instead of
768 'sal->probe'.
769 (bkpt_probe_insert_location): Call 'set_semaphore' method from
770 probe.
771 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
772 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
773 of 'probe_ops'.
774 (probe_key_free): Call 'delete' on probe.
775 (check_exception_resume): Use 'probe.prob' instead of
776 'probe.probe'.
777 * location.c (string_to_event_location_basic): Call
778 'probe_linespec_to_static_ops'.
779 * probe.c (class any_static_probe_ops): New class.
780 (any_static_probe_ops any_static_probe_ops): New variable.
781 (parse_probes_in_pspace): Receive 'static_probe_ops' as
782 argument. Adjust code to reflect change.
783 (parse_probes): Use 'static_probe_ops' instead of
784 'probe_ops'. Adjust code to reflect change.
785 (find_probes_in_objfile): Call methods to get name and
786 provider from probe.
787 (find_probe_by_pc): Use 'result.prob' instead of
788 'result.probe'. Call 'get_relocated_address' method from
789 probe.
790 (collect_probes): Adjust comment and argument list to receive
791 'static_probe_ops' instead of 'probe_ops'. Adjust code to
792 reflect change. Call necessary methods from probe.
793 (compare_probes): Call methods to get name and provider from
794 probes.
795 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
796 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
797 adjust code accordingly.
798 (print_ui_out_not_applicables): Likewise.
799 (info_probes_for_ops): Rename to...
800 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
801 as argument instead of 'probe_ops'. Adjust code. Call
802 necessary methods from probe.
803 (info_probes_command): Use 'info_probes_for_spops'.
804 (enable_probes_command): Pass correct argument to
805 'collect_probes'. Call methods from probe.
806 (disable_probes_command): Likewise.
807 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
808 (get_probe_argument_count): Move to
809 'any_static_probe_ops::get_argument_count'.
810 (can_evaluate_probe_arguments): Move to
811 'any_static_probe_ops::can_evaluate_arguments'.
812 (evaluate_probe_argument): Move to
813 'any_static_probe_ops::evaluate_argument'.
814 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
815 'probe.probe'.
816 (probe_linespec_to_ops): Rename to...
817 (probe_linespec_to_static_ops): ...this. Adjust code.
818 (probe_any_is_linespec): Rename to...
819 (any_static_probe_ops::is_linespec): ...this.
820 (probe_any_get_probes): Rename to...
821 (any_static_probe_ops::get_probes): ...this.
822 (any_static_probe_ops::type_name): New method.
823 (any_static_probe_ops::gen_info_probes_table_header): New
824 method.
825 (compute_probe_arg): Use 'pc_probe.prob' instead of
826 'pc_probe.probe'. Call methods from probe.
827 (compile_probe_arg): Likewise.
828 (std::vector<const probe_ops *> all_probe_ops): Delete.
829 (std::vector<const static_probe_ops *> all_static_probe_ops):
830 New variable.
831 (_initialize_probe): Use 'all_static_probe_ops' instead of
832 'all_probe_ops'.
833 * probe.h (struct info_probe_column) <field_name>: Delete
834 extraneous newline
835 (info_probe_column_s): Delete type and VEC.
836 (struct probe_ops): Delete. Replace with...
837 (class static_probe_ops): ...this and...
838 (clas probe): ...this.
839 (struct bound_probe) <bound_probe>: Delete extraneous
840 newline. Adjust constructor to receive 'probe' instead of
841 'struct probe'.
842 <probe>: Rename to...
843 <prob>: ...this. Delete extraneous newline.
844 <objfile>: Delete extraneous newline.
845 (register_probe_ops): Delete unused prototype.
846 (info_probes_for_ops): Rename to...
847 (info_probes_for_spops): ...this. Adjust comment.
848 (get_probe_address): Move to 'probe::get_address'.
849 (get_probe_argument_count): Move to
850 'probe::get_argument_count'.
851 (can_evaluate_probe_arguments): Move to
852 'probe::can_evaluate_arguments'.
853 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
854 * solib-svr4.c (struct svr4_info): Adjust comment.
855 (struct probe_and_action) <probe>: Rename to...
856 <prob>: ...this.
857 (register_solib_event_probe): Receive 'probe' instead of
858 'struct probe' as argument. Use 'prob' instead of 'probe'
859 when applicable.
860 (solib_event_probe_action): Call 'get_argument_count' method
861 from probe. Adjust comment.
862 (svr4_handle_solib_event): Adjust comment. Call
863 'evaluate_argument' method from probe.
864 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
865 from probe.
866 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
867 'struct probe'. Call 'can_evaluate_arguments' from probe.
868 * symfile.h: Forward declare 'class probe' instead of 'struct
869 probe'.
870 * symtab.h: Likewise.
871 (struct symtab_and_line) <probe>: Rename to...
872 <prob>: ...this.
873 * tracepoint.c (start_tracing): Use 'prob' when applicable.
874 Call probe methods.
875 (stop_tracing): Likewise.
876
877 2017-11-22 Joel Brobecker <brobecker@adacore.com>
878
879 * ravenscar-thread.c (ravenscar_inferior_created): Remove
880 trailing newline at end of string in call to warning.
881
882 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
883
884 * osdata.h: Include vector isntead of vec.h.
885 (osdata_column_s): Remove typedef.
886 (struct osdata_column): Add constructor.
887 <name, value>: Change type to std::string.
888 (DEF_VEC_O (osdata_column_s)): Remove.
889 (osdata_item_s): Remove typedef.
890 (struct osdata_item) <columns>: Change type to std::vector.
891 (DEF_VEC_O (osdata_item_s)): Remove.
892 (struct osdata): Add constructor.
893 <type>: Change type to std::string.
894 <items>: Change type to std::vector.
895 (osdata_p): Remove typedef.
896 (DEF_VEC_P (osdata_p)): Remove.
897 (osdata_parse): Return a unique_ptr.
898 (osdata_free): Remove.
899 (make_cleanup_osdata_free): Remove.
900 (get_osdata): Return a unique_ptr.
901 (get_osdata_column): Return pointer to std::string, take a
902 reference to osdata_item as parameter.
903 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
904 unique_ptr.
905 <property_name>: Change type to std::string.
906 (osdata_start_osdata): Allocate osdata with new and adjust.
907 (osdata_start_item): Adjust.
908 (osdata_start_column): Adjust.
909 (osdata_end_column): Adjust.
910 (clear_parsing_data): Remove.
911 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
912 (osdata_item_clear): Remove.
913 (get_osdata): return a unique_ptr and adjust.
914 (get_osdata_column): Return a pointer to std::string and adjust.
915 (info_osdata): Adjust.
916 * mi/mi-main.c: Include <map>.
917 (free_vector_of_osdata_items): Remove.
918 (list_available_thread_groups): Adjust, use std::map instead of
919 splay tree.
920
921 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
922
923 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
924 case in switch.
925
926 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
927
928 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
929
930 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
931
932 * varobj.h (struct varobj_update_result): Add constructor, add
933 move constructor, disable copy and assign, initialize fields.
934 <newobj>: Change type to std::vector.
935 (varobj_update): Return std::vector.
936 * varobj.c (install_dynamic_child): Change VEC parameters to
937 std::vector and adjust.
938 (update_dynamic_varobj_children): Likewise.
939 (varobj_update): Return std::vector and adjust.
940 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
941
942 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
943
944 * varobj.h (struct varobj) <parent>: Remove const.
945 <children>: Change type to std::vector.
946 (varobj_list_children): Return std::vector const reference.
947 (varobj_restrict_range): Change parameter type to std::vector
948 const reference.
949 * varobj.c (varobj_has_more): Adjust.
950 (varobj_restrict_range): Change parameter type to std::vector
951 const reference and adjust.
952 (install_dynamic_child): Adjust.
953 (update_dynamic_varobj_children): Adjust.
954 (varobj_list_children): Return std::vector const reference and
955 adjust.
956 (varobj_add_child): Adjust.
957 (update_type_if_necessary): Adjust.
958 (varobj_update): Adjust.
959 (delete_variable_1): Adjust.
960 * ada-varobj.c (ada_value_has_mutated): Adjust.
961 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
962
963 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * varobj.h (struct varobj): Add constructor and destructor,
966 initialize fields.
967 * varobj.c (struct varobj_root): Initialize fields.
968 (struct varobj_dynamic): Initialize fields.
969 (varobj_create): Use unique_ptr instead of cleanup. Create
970 varobj with new instead of new_root_variable.
971 (delete_variable_1): Free variable with delete instead of
972 free_variable.
973 (create_child_with_value): Create variable with new instead of
974 new_variable.
975 (varobj::varobj): New.
976 (varobj::~varobj): New (body mostly coming from free_variable).
977 (new_variable): Remove.
978 (free_variable): Remove.
979 (do_free_variable_cleanup): Remove.
980 (make_cleanup_free_variable): Remove.
981
982 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
983
984 * core-regset.c: Remove file.
985 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
986
987 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
988
989 * NEWS: Document use of GNU MPFR.
990 * README: Likewise.
991
992 * Makefile.in (LIBMPFR): Add define.
993 (CLIBS): Add $(LIBMPFR).
994 * configure.ac: Add --with-mpfr configure option.
995 * configure: Regenerate.
996 * config.in: Regenerate.
997
998 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
999 (class mpfr_float_ops): New type.
1000 (mpfr_float_ops::from_target): Two new overloaded functions.
1001 (mpfr_float_ops::to_target): Likewise.
1002 (mpfr_float_ops::to_string): New function.
1003 (mpfr_float_ops::from_string): Likewise.
1004 (mpfr_float_ops::to_longest): Likewise.
1005 (mpfr_float_ops::from_longest): Likewise.
1006 (mpfr_float_ops::from_ulongest): Likewise.
1007 (mpfr_float_ops::to_host_double): Likewise.
1008 (mpfr_float_ops::from_host_double): Likewise.
1009 (mpfr_float_ops::convert): Likewise.
1010 (mpfr_float_ops::binop): Likewise.
1011 (mpfr_float_ops::compare): Likewise.
1012 (get_target_float_ops): Use mpfr_float_ops if available.
1013
1014 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1015
1016 * target-float.c: Do not include <math.h>.
1017 Include <cmath> and <limits>.
1018 (DOUBLEST): Do not define.
1019 (class target_float_ops): New type.
1020 (class host_float_ops): New templated type.
1021 (class decimal_float_ops): New type.
1022
1023 (floatformat_to_doublest): Rename to ...
1024 (host_float_ops<T>::from_target): ... this. Use template type T
1025 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1026 (host_float_ops<T>::from_target): New overload using a type argument.
1027 (floatformat_from_doublest): Rename to ...
1028 (host_float_ops<T>::to_target): ... this. Use template type T
1029 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1030 (host_float_ops<T>::to_target): New overload using a type argument.
1031 (floatformat_printf_format): New function.
1032 (struct printf_length_modifier): New templated type.
1033 (floatformat_to_string): Rename to ...
1034 (host_float_ops<T>::to_string): ... this. Use type instead of
1035 floatformat argument. Use floatformat_printf_format and
1036 printf_length_modifier. Remove special handling of invalid numbers,
1037 infinities and NaN (moved to target_float_to_string).
1038 (struct scanf_length_modifier): New templated type.
1039 (floatformat_from_string): Rename to ...
1040 (host_float_ops<T>::from_string): ... this. Use type instead of
1041 floatformat argument. Use scanf_length_modifier.
1042 (floatformat_to_longest): Rename to ...
1043 (host_float_ops<T>::to_longest): ... this. Use type instead of
1044 floatformat argument. Handle out-of-range values deterministically.
1045 (floatformat_from_longest): Rename to ...
1046 (host_float_ops<T>::from_longest): ... this. Use type instead of
1047 floatformat argument.
1048 (floatformat_from_ulongest): Rename to ...
1049 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1050 floatformat argument.
1051 (floatformat_to_host_double): Rename to ...
1052 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1053 floatformat argument.
1054 (floatformat_from_host_double): Rename to ...
1055 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1056 floatformat argument.
1057 (floatformat_convert): Rename to ...
1058 (host_float_ops<T>::convert): ... this. Use type instead of
1059 floatformat arguments. Remove handling of no-op conversions.
1060 (floatformat_binop): Rename to ...
1061 (host_float_ops<T>::binop): ... this. Use type instead of
1062 floatformat arguments.
1063 (floatformat_compare): Rename to ...
1064 (host_float_ops<T>::compare): ... this. Use type instead of
1065 floatformat arguments.
1066
1067 (match_endianness): Use type instead of length/byte_order arguments.
1068 (set_decnumber_context): Likewise.
1069 (decimal_from_number): Likewise. Update calls.
1070 (decimal_to_number): Likewise.
1071 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1072 (decimal_float_ops::to_host_double): New dummy function.
1073 (decimal_float_ops::from_host_double): Likewise.
1074 (decimal_to_string): Rename to ...
1075 (decimal_float_ops::to_string): ... this. Use type instead of
1076 length/byte_order arguments. Update calls.
1077 (decimal_from_string): Rename to ...
1078 (decimal_float_ops::from_string): ... this. Use type instead of
1079 length/byte_order arguments. Update calls.
1080 (decimal_from_longest): Rename to ...
1081 (decimal_float_ops::from_longest): ... this. Use type instead of
1082 length/byte_order arguments. Update calls.
1083 (decimal_from_ulongest): Rename to ...
1084 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1085 length/byte_order arguments. Update calls.
1086 (decimal_to_longest): Rename to ...
1087 (decimal_float_ops::to_longest): ... this. Use type instead of
1088 length/byte_order arguments. Update calls.
1089 (decimal_binop): Rename to ...
1090 (decimal_float_ops::binop): ... this. Use type instead of
1091 length/byte_order arguments. Update calls.
1092 (decimal_compare): Rename to ...
1093 (decimal_float_ops::compare): ... this. Use type instead of
1094 length/byte_order arguments. Update calls.
1095 (decimal_convert): Rename to ...
1096 (decimal_float_ops::convert): ... this. Use type instead of
1097 length/byte_order arguments. Update calls.
1098
1099 (target_float_same_category_p): New function.
1100 (target_float_same_format_p): Likewise.
1101 (target_float_format_length): Likewise.
1102 (enum target_float_ops_kind): New type.
1103 (get_target_float_ops_kind): New function.
1104 (get_target_float_ops): Three new overloaded functions.
1105
1106 (target_float_is_zero): Update call.
1107 (target_float_to_string): Add special handling of invalid numbers,
1108 infinities and NaN (moved from floatformat_to_string). Use
1109 target_float_ops callback.
1110 (target_float_from_string): Use target_float_ops callback.
1111 (target_float_to_longest): Likewise.
1112 (target_float_from_longest): Likewise.
1113 (target_float_from_ulongest): Likewise.
1114 (target_float_to_host_double): Likewise.
1115 (target_float_from_host_double): Likewise.
1116 (target_float_convert): Add special case for no-op conversions.
1117 Use target_float_ops callback.
1118 (target_float_binop): Use target_float_ops callback.
1119 (target_float_compare): Likewise.
1120
1121 2017-11-22 Yao Qi <yao.qi@linaro.org>
1122
1123 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1124
1125 2017-11-22 Yao Qi <yao.qi@linaro.org>
1126
1127 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1128 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1129
1130 2017-11-21 Jerome Guitton <guitton@adacore.com>
1131
1132 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1133 with event ptid from the lower layer before doing the
1134 ravenscar-specific update.
1135
1136 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1137
1138 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1139 the ptid's TID is nonzero.
1140
1141 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1142
1143 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1144 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1145 Make non-static. Change return type to char *. Adjust code
1146 accordingly. Rewrite the function's documentation.
1147 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1148 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1149 we have enough debugging information in the runtime to support
1150 Ada task debugging before we enable the ravenscar-thread layer.
1151
1152 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1153
1154 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1155 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1156 * ravenscar-thread.c: Add into comment.
1157 (base_magic_null_ptid): Delete.
1158 (base_ptid): Change documentation.
1159 (ravenscar_active_task): Renames ravenscar_running_thread.
1160 All callers updated throughout.
1161 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1162 (ravenscar_task_is_currently_active): Likewise.
1163 (get_base_thread_from_ravenscar_task): Ditto.
1164 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1165 (ravenscar_runtime_initialized): Likewise.
1166 (get_running_thread_id): Add new parameter "cpu". Adjust
1167 implementation to handle this new parameter.
1168 (ravenscar_fetch_registers): Small adjustment to use
1169 is_ravenscar_task and ravenscar_task_is_currently_active in
1170 order to decide whether to use the target beneath or this
1171 module's arch_ops.
1172 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1173 (ravenscar_stopped_by_sw_breakpoint): Use
1174 get_base_thread_from_ravenscar_task to get the underlying
1175 thread, rather than using base_ptid.
1176 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1177 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1178 Likewise.
1179 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1180
1181 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1182
1183 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1184 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1185 (get_tcb_types_info): Set fieldnos.base_cpu.
1186 (read_atcb): Set task_info->base_cpu.
1187 (info_task): Print "Base CPU" info if set by runtime.
1188
1189 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1190
1191 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1192 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1193 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1194 New functions.
1195 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1196 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1197 to_stopped_data_address and to_core_of_thread fields of
1198 ravenscar_ops.
1199
1200 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1201
1202 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1203 (struct gdbarch_tdep): New member long_double_abi.
1204 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1205 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1206 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1207 format depending on long_double_abi tdep member.
1208 (ppc_floatformat_for_type): Handle __ibm128 type.
1209
1210 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1211
1212 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1213
1214 2017-11-21 Pedro Alves <palves@redhat.com>
1215
1216 * dwarf2read.c (mapped_index::find_name_components_bounds)
1217 <completion mode, upper bound>: Use std::lower_bound instead of
1218 std::upper_bound.
1219 (test_mapped_index_find_name_component_bounds): Remove incorrect
1220 "t1_fund" from expected symbols.
1221
1222 2017-11-21 Pedro Alves <palves@redhat.com>
1223
1224 * dwarf2read.c (mapped_index::name_components_casing): New field.
1225 (mapped_index) <build_name_components,
1226 find_name_components_bounds): Declare new methods.
1227 (mapped_index::find_name_components_bounds)
1228 (mapped_index::build_name_components): New methods, factored out
1229 from dw2_expand_symtabs_matching_symbol.
1230 (check_find_bounds_finds)
1231 (test_mapped_index_find_name_component_bounds): New.
1232 (run_test): Rename to ...
1233 (test_dw2_expand_symtabs_matching_symbol): ... this.
1234 (run_test): Reimplement.
1235
1236 2017-11-21 Pedro Alves <palves@redhat.com>
1237
1238 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1239 (symbol_end): Use cp_ident_is_alnum.
1240 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1241 * dwarf2read.c (make_sort_after_prefix_name): New function.
1242 (dw2_expand_symtabs_matching_symbol): Use it.
1243 (test_symbols): Add more symbols.
1244 (run_test): Add tests.
1245
1246 2017-11-17 Tom Tromey <tom@tromey.com>
1247
1248 * symtab.h (enum symbol_subclass_kind): New.
1249 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1250 Remove.
1251 <subclass>: New member.
1252 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1253 * rust-lang.c (rust_get_trait_object_pointer): Update.
1254 * dwarf2read.c (read_func_scope): Update.
1255 (read_variable): Update.
1256
1257 2017-11-17 Tom Tromey <tom@tromey.com>
1258
1259 * dwarf2read.c (read_func_scope): Update.
1260 * symtab.h (struct template_symbol): Derive from symbol.
1261 <base>: Remove.
1262
1263 2017-11-17 Tom Tromey <tom@tromey.com>
1264
1265 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1266 (struct rust_vtable_symbol): New.
1267 (find_symbol_at_address): Declare.
1268 * symtab.c (find_symbol_at_address): New function.
1269 * symfile.h (struct quick_symbol_functions)
1270 <find_compunit_symtab_by_address>: New member.
1271 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1272 function.
1273 (debug_sym_quick_functions): Link to
1274 debug_qf_find_compunit_symtab_by_address.
1275 * rust-lang.c (rust_get_trait_object_pointer): New function.
1276 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1277 rust_get_trait_object_pointer.
1278 * psymtab.c (psym_relocate): Clear psymbol_map.
1279 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1280 functions.
1281 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1282 * objfiles.h (struct objfile) <psymbol_map>: New member.
1283 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1284 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1285 (rust_containing_type, read_variable): New functions.
1286
1287 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1290
1291 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1292
1293 * common/filestuff.c: Include <algorithm>.
1294 (open_fds): Change type to std::vector<int>.
1295 (do_mark_open_fd): Adjust.
1296 (unmark_fd_no_cloexec): Adjust.
1297 (do_close): Adjust.
1298
1299 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1300
1301 * breakpoint.c (output_thread_groups): Take an std::vector.
1302 (print_one_breakpoint_location): Adjust.
1303
1304 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1305
1306 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1307 (ada_evaluate_subexp_for_cast): New function.
1308 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1309 ada_evaluate_subexp_for_cast.
1310 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1311 eval_skip_value.
1312 * eval.c (evaluate_var_value): Make non-static.
1313 (evaluate_var_msym_value, eval_skip_value): Likewise.
1314 * value.h (evaluate_var_value, evaluate_var_msym_value)
1315 (eval_skip_value): Declare.
1316
1317 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1318
1319 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1320 Update all callers.
1321
1322 2017-11-16 Pedro Alves <palves@redhat.com>
1323
1324 * python/py-unwind.c (pyuw_sniffer): Translate
1325 PyExc_KeyboardInterrupt to a GDB Quit exception.
1326
1327 2017-11-16 Pedro Alves <palves@redhat.com>
1328
1329 * infrun.c (resume_cleanups): Delete.
1330 (resume): No longer install a resume_cleanups cleanup nor call
1331 QUIT.
1332 (proceed): Pass the terminal to the inferior.
1333 (keep_going_pass_signal): No longer install a resume_cleanups
1334 cleanup.
1335
1336 2017-11-16 Pedro Alves <palves@redhat.com>
1337
1338 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1339 if the prompt is blocked.
1340
1341 2017-11-16 Pedro Alves <palves@redhat.com>
1342
1343 * breakpoint.c (insert_bp_location): Replace bp_err and
1344 bp_err_message locals by a gdb_exception local.
1345
1346 2017-11-16 Pedro Alves <palves@redhat.com>
1347
1348 * inflow.c (scoped_ignore_sigttou): New class.
1349 (child_terminal_ours_1, new_tty): Use it.
1350
1351 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1352
1353 * target-float.c (decimal_from_number): Add byte_order argument and
1354 call match_endianness. Error if unknown floating-point type.
1355 (decimal_to_number): Add byte_order argument and call match_endianness.
1356 (decimal_from_longest): Update call. Do not call match_endianness.
1357 (decimal_from_ulongest): Likewise.
1358 (decimal_binop): Likewise.
1359 (decimal_is_zero): Likewise.
1360 (decimal_compare): Likewise.
1361 (decimal_convert): Likewise.
1362
1363 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1364
1365 * python/python.c (gdbpy_rbreak): New function.
1366 * NEWS: Document Python rbreak feature.
1367
1368 2017-11-16 Yao Qi <yao.qi@linaro.org>
1369
1370 * features/tic6x-c62x.xml: Remove.
1371 * features/tic6x-c64x.xml: Remove.
1372 * features/tic6x-c64xp.xml: Remove.
1373
1374 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1375
1376 * symtab.h: Include <array>.
1377
1378 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1379
1380 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1381 (bsd_kvm_proc_cmd): Likewise.
1382
1383 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1384
1385 * tui/tui-win.c (window_name_completer): Replace VEC with
1386 std::vector.
1387
1388 2017-11-15 Andrew Cagney <cagney@gnu.org>
1389
1390 * MAINTAINERS: Remove no-longer applicable entries.
1391
1392 2017-11-15 Andrew Cagney <cagney@gnu.org>
1393
1394 * MAINTAINERS: Move self to Past Maintainers.
1395
1396 2017-11-15 Yao Qi <yao.qi@linaro.org>
1397
1398 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1399 * features/nios2-linux.c: Remove.
1400 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1401 initialize_tdesc_nios2_linux.
1402
1403 2017-11-15 Yao Qi <yao.qi@linaro.org>
1404
1405 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1406 M68HC11_LAST_HARD_REG + 1.
1407
1408 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1409
1410 PR gdb/22388
1411 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1412 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1413 Return TARGET_XFER_EOF if size of returned data is 0.
1414
1415 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1416
1417 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1418 memory-map-selftests.c.
1419 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1420 * memory-map.c (memory_map_start_memory): Fix computation of hi
1421 address.
1422 * unittests/memory-map-selftests.c: New file.
1423
1424 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1425
1426 * ada-lang.c: Fix some typos in the general command documenting
1427 how Ada expressions are being evaluated and how their result
1428 is printed.
1429
1430 2017-11-09 Tom Tromey <tom@tromey.com>
1431
1432 * psymtab.c (psymbol_hash): Do not hash string contents.
1433 (psymbol_compare): Add comment.
1434
1435 2017-11-09 Tom Tromey <tom@tromey.com>
1436
1437 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1438
1439 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1440
1441 * ada-exp.y (write_var_from_sym): Remove parameter
1442 "orig_left_context". Update all callers.
1443
1444 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1445
1446 * tracepoint.h (class collection_list) <stringify>: Return
1447 std::vector<std::string>.
1448 (encode_actions_rsp): Change parameters to
1449 std::vector<std::string> *.
1450 * tracepoint.c (collection_list::stringify): Return
1451 std::vector<std::string> and adjust accordingly.
1452 (encode_actions_rsp): Changee parameters to
1453 std::vector<std::string> and adjust accordingly.
1454 * remote.c (free_actions_list),
1455 free_actions_list_cleanup_wrapper): Remove.
1456 (remote_download_tracepoint): Adjust to std::vector.
1457
1458 2017-11-08 Tom Tromey <tom@tromey.com>
1459
1460 * dwarf2read.c (symbolp): Remove typedef.
1461 (read_func_scope): Use std::vector.
1462 (process_structure_scope): Use std::vector.
1463
1464 2017-11-08 Pedro Alves <palves@redhat.com>
1465
1466 * ada-lang.c (ada_make_symbol_completion_list): Use
1467 completion_skip_symbol.
1468 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1469 (symbol_is_function_or_method(symbol*)): New.
1470 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1471 completion_skip_symbol.
1472 (default_collect_symbol_completion_matches_break_on): Use
1473 completion_skip_symbol. Pass down mode.
1474 (collect_file_symbol_completion_matches): Pass down mode.
1475 * symtab.h (symbol_is_function_or_method): New declarations.
1476 (completion_skip_symbol): New template function.
1477
1478 2017-11-08 Pedro Alves <palves@redhat.com>
1479
1480 * linespec.c (iterate_over_all_matching_symtabs): Add
1481 search_domain parameter. Pass it down to expand_symtabs_matching.
1482 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1483 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1484 search_domain.
1485 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1486 Pass it down.
1487 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1488 symbols.
1489 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1490 it down.
1491
1492 2017-11-08 Pedro Alves <palves@redhat.com>
1493
1494 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1495 text_len locals and don't pass them down.
1496 * symtab.c (completion_list_add_name): Remove
1497 sym_text/sym_text_len parameters and adjust.
1498 (completion_list_add_symbol, completion_list_add_msymbol)
1499 (completion_list_objc_symbol, completion_list_add_fields)
1500 (add_symtab_completions): Likewise.
1501 (default_collect_symbol_completion_matches_break_on)
1502 (collect_file_symbol_completion_matches): Remove sym_text_len
1503 local and don't pass it down.
1504 * symtab.h (completion_list_add_name): Remove
1505 sym_text/sym_text_len parameters.
1506
1507 2017-11-08 Pedro Alves <palves@redhat.com>
1508
1509 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1510 unittests/lookup_name_info-selftests.c.
1511 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1512 * cp-support.c: Include "selftest.h".
1513 (cp_remove_params_1): Rename from cp_remove_params. Add
1514 'require_param' parameter, and handle it.
1515 (cp_remove_params): Reimplement.
1516 (cp_remove_params_if_any): New.
1517 (selftests::quote): New.
1518 (selftests::check_remove_params): New.
1519 (selftests::test_cp_remove_params): New.
1520 (_initialize_cp_support): Install
1521 selftests::test_cp_remove_params.
1522 * cp-support.h (cp_remove_params_if_any): Declare.
1523 * dwarf2read.c :Include "selftest.h".
1524 (dw2_expand_symtabs_matching_symbol): Use
1525 lookup_name_info::make_ignore_params.
1526 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1527 (selftests::dw2_expand_symtabs_matching::string_or_null)
1528 (selftests::dw2_expand_symtabs_matching::check_match)
1529 (selftests::dw2_expand_symtabs_matching::test_symbols)
1530 (selftests::dw2_expand_symtabs_matching::run_test): New.
1531 (_initialize_dwarf2_read): Register
1532 selftests::dw2_expand_symtabs_matching::run_test.
1533 * psymtab.c (psym_expand_symtabs_matching): Use
1534 lookup_name_info::make_ignore_params.
1535 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1536 If the lookup name wants to ignore parameters, strip them.
1537 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1538 code handling '('.
1539 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1540 (default_collect_symbol_completion_matches_break_on): Don't try to
1541 strip parameters.
1542 * symtab.h (lookup_name_info::lookup_name_info): Add
1543 'ignore_parameters' parameter.
1544 (lookup_name_info::ignore_parameters)
1545 (lookup_name_info::make_ignore_params): New methods.
1546 (lookup_name_info::m_ignore_parameters): New field.
1547 * unittests/lookup_name_info-selftests.c: New file.
1548
1549 2017-11-08 Pedro Alves <palves@redhat.com>
1550
1551 * dwarf2read.c (dw2_expand_marked_cus)
1552 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1553 (dw2_expand_symtabs_matching): Move further below.
1554 (dw2_expand_marked_cus): Reindent.
1555
1556 2017-11-08 Pedro Alves <palves@redhat.com>
1557
1558 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1559 (struct name_component): New.
1560 (mapped_index::name_components): New field.
1561 (mapped_index::symbol_name_at): New method.
1562 (dwarf2_read_index): Call mapped_index ctor.
1563 (dw2_map_matching_symbols): Add comment about name_components
1564 table.
1565 (dw2_expand_symtabs_matching): Factor part to...
1566 (dw2_expand_symtabs_matching_symbol): ... this new function.
1567 Build name components table, and lookup symbols in it before
1568 calling the name matcher.
1569 (dw2_expand_marked_cus): New, factored out from
1570 dw2_expand_symtabs_matching.
1571 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1572
1573 2017-11-08 Pedro Alves <palves@redhat.com>
1574
1575 * ada-lang.c (ada_encode): Rename to ..
1576 (ada_encode_1): ... this. Add throw_errors parameter and handle
1577 it.
1578 (ada_encode): Reimplement.
1579 (match_name): Delete, folded into full_name.
1580 (resolve_subexp): No longer pass the encoded name to
1581 ada_lookup_symbol_list.
1582 (should_use_wild_match): Delete.
1583 (name_match_type_from_name): New.
1584 (ada_lookup_simple_minsym): Use lookup_name_info and the
1585 language's symbol_name_matcher_ftype.
1586 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1587 (ada_add_block_renamings): Adjust to use lookup_name_info.
1588 (ada_lookup_name): New.
1589 (add_nonlocal_symbols, ada_add_all_symbols)
1590 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1591 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1592 (ada_name_for_lookup): Delete.
1593 (ada_lookup_encoded_symbol): Construct a verbatim name.
1594 (wild_match): Reverse sense of return type. Use bool.
1595 (full_match): Reverse sense of return type. Inline bits of old
1596 match_name here.
1597 (ada_add_block_symbols): Adjust to use lookup_name_info.
1598 (symbol_completion_match): Delete, folded into...
1599 (ada_lookup_name_info::matches): ... .this new method.
1600 (symbol_completion_add): Delete.
1601 (ada_collect_symbol_completion_matches): Add name_match_type
1602 parameter. Adjust to use lookup_name_info and
1603 completion_list_add_name.
1604 (get_var_value, ada_add_global_exceptions): Adjust to use
1605 lookup_name_info.
1606 (ada_get_symbol_name_cmp): Delete.
1607 (do_wild_match, do_full_match): New functions.
1608 (ada_lookup_name_info::ada_lookup_name_info): New method.
1609 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1610 functions.
1611 (ada_language_defn): Install ada_get_symbol_name_matcher.
1612 * ada-lex.l (processId): If name starts with '<', copy it
1613 verbatim.
1614 * block.c (block_iter_match_step, block_iter_match_first)
1615 (block_iter_match_next, block_lookup_symbol)
1616 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1617 lookup_name_info.
1618 * block.h (block_iter_match_first, block_iter_match_next)
1619 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1620 * c-lang.c (c_language_defn, cplus_language_defn)
1621 (asm_language_defn, minimal_language_defn): Adjust comments to
1622 refer to la_get_symbol_name_matcher.
1623 * completer.c (complete_files_symbols)
1624 (collect_explicit_location_matches, symbol_completer): Pass a
1625 symbol_name_match_type down.
1626 * completer.h (class completion_match, completion_match_result):
1627 New classes.
1628 (completion_tracker::reset_completion_match_result): New method.
1629 (completion_tracker::m_completion_match_result): New field.
1630 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1631 lookup_name_info.
1632 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1633 functions.
1634 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1635 * d-lang.c: Adjust comments to refer to
1636 la_get_symbol_name_matcher.
1637 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1638 Adjust to use lookup_name_info.
1639 (dict_iter_match_first, dict_iter_match_next)
1640 (iter_match_first_hashed, iter_match_next_hashed)
1641 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1642 with a lookup_name_info.
1643 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1644 Likewise.
1645 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1646 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1647 (gdb_index_symbol_name_matcher): New class.
1648 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1649 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1650 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1651 with a symbol_name_match_type.
1652 (f_language_defn): Adjust comments to refer to
1653 la_get_symbol_name_matcher.
1654 * go-lang.c (go_language_defn): Adjust comments to refer to
1655 la_get_symbol_name_matcher.
1656 * language.c (default_symbol_name_matcher)
1657 (language_get_symbol_name_matcher): New functions.
1658 (unknown_language_defn, auto_language_defn): Adjust comments to
1659 refer to la_get_symbol_name_matcher.
1660 * language.h (symbol_name_cmp_ftype): Delete.
1661 (language_defn) <la_collect_symbol_completion_matches>: Add match
1662 type parameter.
1663 <la_get_symbol_name_cmp>: Delete field.
1664 <la_get_symbol_name_matcher>: New field.
1665 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1666 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1667 Declare.
1668 * linespec.c (iterate_over_all_matching_symtabs)
1669 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1670 (find_methods): Add language parameter, and use lookup_name_info
1671 and the language's symbol_name_matcher_ftype.
1672 (linespec_complete_function): Adjust.
1673 (lookup_prefix_sym): Use lookup_name_info.
1674 (add_all_symbol_names_from_pspace): Adjust.
1675 (find_superclass_methods): Add language parameter and pass it
1676 down.
1677 (find_method): Pass symbol language down.
1678 (find_linespec_symbols): Don't demangle or Ada encode here.
1679 (search_minsyms_for_name): Add lookup_name_info parameter.
1680 (add_matching_symbols_to_info): Add name_match_type parameter.
1681 Use lookup_name_info.
1682 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1683 la_get_symbol_name_matcher.
1684 * minsyms.c: Include <algorithm>.
1685 (add_minsym_to_demangled_hash_table): Remove table parameter and
1686 add objfile parameter. Use search_name_hash, and add language to
1687 demangled languages vector.
1688 (struct found_minimal_symbols): New struct.
1689 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1690 New functions.
1691 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1692 input names here. Use lookup_name_info instead. Lookup up
1693 demangled names once for each language in the demangled names
1694 vector.
1695 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1696 demangled names once for each language in the demangled names
1697 vector.
1698 (build_minimal_symbol_hash_tables): Adjust.
1699 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1700 lookup_name_info.
1701 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1702 la_get_symbol_name_matcher.
1703 * objfiles.h: Include <vector>.
1704 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1705 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1706 la_get_symbol_name_matcher.
1707 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1708 la_get_symbol_name_matcher.
1709 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1710 (match_partial_symbol): Use symbol_name_match_type,
1711 lookup_name_info and psymbol_name_matches.
1712 (lookup_partial_symbol): Use lookup_name_info.
1713 (map_block): Use symbol_name_match_type and lookup_name_info.
1714 (psym_map_matching_symbols): Use symbol_name_match_type.
1715 (psymbol_name_matches): New.
1716 (recursively_search_psymtabs): Use lookup_name_info and
1717 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1718 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1719 'kind' parameter to 'domain'.
1720 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1721 la_get_symbol_name_matcher.
1722 * symfile-debug.c (debug_qf_map_matching_symbols)
1723 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1724 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1725 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1726 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1727 Adjust to use symbol_name_match_type.
1728 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1729 (expand_symtabs_matching): Adjust to use lookup_name_info.
1730 * symmisc.c (maintenance_expand_symtabs): Use
1731 lookup_name_info::match_any ().
1732 * symtab.c (symbol_matches_search_name): New.
1733 (eq_symbol_entry): Adjust to use lookup_name_info and the
1734 language's matcher.
1735 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1736 (lookup_name_info::match_any): New.
1737 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1738 (compare_symbol_name): Add language, lookup_name_info and
1739 completion_match_result parameters, and use them.
1740 (completion_list_add_name): Make extern. Add language and
1741 lookup_name_info parameters. Use them.
1742 (completion_list_add_symbol, completion_list_add_msymbol)
1743 (completion_list_objc_symbol): Add lookup_name_info parameters and
1744 adjust. Pass down language.
1745 (completion_list_add_fields): Add lookup_name_info parameters and
1746 adjust. Pass down language.
1747 (add_symtab_completions): Add lookup_name_info parameters and
1748 adjust.
1749 (default_collect_symbol_completion_matches_break_on): Add
1750 name_match_type parameter, and use it. Use lookup_name_info.
1751 (default_collect_symbol_completion_matches)
1752 (collect_symbol_completion_matches): Add name_match_type
1753 parameter, and pass it down.
1754 (collect_symbol_completion_matches_type): Adjust.
1755 (collect_file_symbol_completion_matches): Add name_match_type
1756 parameter, and use lookup_name_info.
1757 * symtab.h: Include <string> and "common/gdb_optional.h".
1758 (enum class symbol_name_match_type): New.
1759 (class ada_lookup_name_info): New.
1760 (struct demangle_for_lookup_info): New.
1761 (class lookup_name_info): New.
1762 (symbol_name_matcher_ftype): New.
1763 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1764 (symbol_matches_search_name): Declare.
1765 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1766 (default_collect_symbol_completion_matches)
1767 (collect_symbol_completion_matches)
1768 (collect_file_symbol_completion_matches): Add name_match_type
1769 parameter.
1770 (iterate_over_symbols): Use lookup_name_info.
1771 (completion_list_add_name): Declare.
1772 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1773 (strncmp_iw_with_mode): Now extern.
1774 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1775 (strncmp_iw_with_mode): Declare.
1776
1777 2017-11-08 Keith Seitz <keiths@redhat.com>
1778 Pedro Alves <palves@redhat.com>
1779
1780 * ada-lang.c (ada_language_defn): Install
1781 default_search_name_hash.
1782 * buildsym.c (struct buildsym_compunit): <language>: New field.
1783 (finish_block_internal): Pass language when creating dictionaries.
1784 (start_buildsym_compunit, start_symtab): New language parameters.
1785 Use them.
1786 (restart_symtab): Pass down compilation unit's language.
1787 * buildsym.h (enum language): Forward declare.
1788 (start_symtab): New 'language' parameter.
1789 * c-lang.c (c_language_defn, cplus_language_defn)
1790 (asm_language_defn, minimal_language_defn): Install
1791 default_search_name_hash.
1792 * coffread.c (coff_start_symtab): Adjust.
1793 * d-lang.c (d_language_defn): Install default_search_name_hash.
1794 * dbxread.c (struct symloc): Add 'pst_language' field.
1795 (PST_LANGUAGE): Define.
1796 (start_psymtab, read_ofile_symtab): Use it.
1797 (process_one_symbol): New 'language' parameter. Pass it down.
1798 * dictionary.c (struct dictionary) <language>: New field.
1799 (DICT_LANGUAGE): Define.
1800 (dict_create_hashed, dict_create_hashed_expandable)
1801 (dict_create_linear, dict_create_linear_expandable): New parameter
1802 'language'. Set the dictionary's language.
1803 (iter_match_first_hashed): Adjust to rename.
1804 (insert_symbol_hashed): Assert we don't see mismatching
1805 languages. Adjust to rename.
1806 (dict_hash): Rename to ...
1807 (default_search_name_hash): ... this and make extern.
1808 * dictionary.h (struct language_defn): Forward declare.
1809 (dict_create_hashed): New parameter 'language'.
1810 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1811 * f-lang.c (f_language_defn): Install default_search_name_hash.
1812 * go-lang.c (go_language_defn): Install default_search_name_hash.
1813 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1814 creation.
1815 * language.c (unknown_language_defn, auto_language_defn):
1816 * language.h (language_defn::la_search_name_hash): New field.
1817 (default_search_name_hash): Declare.
1818 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1819 * mdebugread.c (new_block): New parameter 'language'.
1820 * mdebugread.c (parse_symbol): Pass symbol language to block
1821 allocation.
1822 (psymtab_to_symtab_1): Pass down language.
1823 (new_symtab): Pass compunit's language to block allocation.
1824 * objc-lang.c (objc_language_defn): Install
1825 default_search_name_hash.
1826 * opencl-lang.c (opencl_language_defn):
1827 * p-lang.c (pascal_language_defn): Install
1828 default_search_name_hash.
1829 * rust-lang.c (rust_language_defn): Install
1830 default_search_name_hash.
1831 * stabsread.h (enum language): Forward declare.
1832 (process_one_symbol): Add 'language' parameter.
1833 * symtab.c (search_name_hash): New function.
1834 * symtab.h (search_name_hash): Declare.
1835 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1836
1837 2017-11-08 Pedro Alves <palves@redhat.com>
1838
1839 * cp-name-parser.y (main): Don't initialize extra_chars.
1840
1841 2017-11-07 Tom Tromey <tom@tromey.com>
1842
1843 * event-top.h (command_handler): Constify.
1844 * record-full.c (cmd_record_full_start): Update.
1845 * thread.c (thread_apply_all_command): Update.
1846 * printcmd.c (eval_command): Update.
1847 * mi/mi-main.c (mi_execute_cli_command): Update.
1848 (mi_execute_async_cli_command): Update.
1849 * tui/tui-stack.c (tui_update_command): Update.
1850 * cli/cli-interp.c (safe_execute_command): Constify.
1851 * record.c (record_start): Update.
1852 (record_start, record_stop, cmd_record_start): Update.
1853 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1854 (cmd_record_btrace_pt_start): Update.
1855 (cmd_record_btrace_start): Update.
1856 (cmd_record_btrace_start): Update.
1857 * reverse.c (exec_reverse_once): Update.
1858 * python/python.c (execute_gdb_command): Don't copy the command.
1859 * event-top.c (command_line_handler): Update.
1860 (command_handler): Constify.
1861 * defs.h (deprecated_call_command_hook): Constify.
1862 * cli/cli-script.h (execute_user_command): Constify.
1863 * cli/cli-script.c (execute_user_command): Constify.
1864 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1865 (enum command_control_type): Update.
1866 * main.c (catch_command_errors): Remove non-const overload.
1867 (catch_command_errors_ftype): Remove.
1868 * python/py-cmd.c (cmdpy_function): Constify.
1869 * guile/scm-cmd.c (cmdscm_function): Constify.
1870 * cli/cli-dump.c (call_dump_func): Constify.
1871 * cli/cli-decode.c (do_const_cfunc): Constify.
1872 (do_sfunc): Constify.
1873 (cmd_func): Constify.
1874 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1875 * top.h (execute_command): Constify.
1876 * top.c (execute_command): Constify.
1877 (execute_command_to_string): Constify.
1878 (deprecated_call_command_hook): Constify.
1879 * command.h (cmd_func): Constify.
1880 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1881
1882 2017-11-07 Tom Tromey <tom@tromey.com>
1883
1884 * ada-lang.c (catch_ada_exception_command): Constify.
1885 (catch_assert_command): Constify.
1886 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1887 (catch_rethrow_command): Constify.
1888 (catch_exception_command_1): Constify.
1889 * breakpoint.h (add_catch_command): Constify.
1890 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1891 (catch_syscall_split_args): Constify.
1892 * break-catch-sig.c (catch_signal_command): Constify.
1893 (catch_signal_split_args): Constify.
1894 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1895 cmd_const_sfunc_ftype.
1896 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1897 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1898 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1899 (add_setshow_string_cmd, struct cmd_list_element)
1900 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1901 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1902 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1903 Constify.
1904 (set_cmd_sfunc): Constify.
1905 (empty_sfunc): Constify.
1906 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1907 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1908 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1909 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1910 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1911 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1912 Constify.
1913 (set_cmd_sfunc): Constify.
1914 (cmd_sfunc_ftype): Remove.
1915 * compile/compile.c (set_compile_args): Constify.
1916 * infrun.c (set_disable_randomization): Constify.
1917 * infcmd.c (set_args_command, set_cwd_command): Constify.
1918 * breakpoint.c (set_condition_evaluation_mode): Constify.
1919 (add_catch_command): Constify.
1920 (catch_fork_command_1, catch_exec_command_1)
1921 (catch_load_command_1, catch_unload_command_1): Constify.
1922 (catch_load_or_unload): Constify.
1923 * guile/scm-param.c (pascm_set_func): Constify.
1924 (add_setshow_generic): Constify.
1925 * python/py-param.c (get_set_value): Constify.
1926 * top.h (set_verbose): Constify.
1927 * tui/tui-win.c (tui_set_var_cmd): Constify.
1928 * mi/mi-main.c (set_mi_async_command): Constify.
1929 * cli/cli-logging.c (set_logging_overwrite)
1930 (set_logging_redirect): Constify.
1931 * value.c (set_max_value_size): Constify.
1932 * valprint.c (set_input_radix, set_output_radix): Constify.
1933 * utils.c (set_width_command, set_height_command): Constify.
1934 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1935 * tracepoint.c (set_disconnected_tracing)
1936 (set_circular_trace_buffer, set_trace_buffer_size)
1937 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1938 * top.c (set_history_size_command, set_verbose, set_editing)
1939 (set_gdb_datadir, set_history_filename): Constify.
1940 * target.c (set_targetdebug, maint_set_target_async_command)
1941 (maint_set_target_non_stop_command, set_target_permissions)
1942 (set_write_memory_permission): Constify.
1943 (open_target): Constify.
1944 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1945 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1946 * symtab.c (set_symbol_cache_size_handler): Constify.
1947 * symfile.c (set_ext_lang_command): Constify.
1948 * symfile-debug.c (set_debug_symfile): Constify.
1949 * source.c (set_directories_command): Constify.
1950 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1951 * serial.c (set_parity): Constify.
1952 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1953 * remote.c (set_remote_exec_file, set_remotebreak)
1954 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1955 * record.c (set_record_insn_history_size)
1956 (set_record_call_history_size): Constify.
1957 * record-full.c (set_record_full_insn_max_num): Constify.
1958 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1959 * osabi.c (set_osabi): Constify.
1960 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1961 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1962 * maint.c (maintenance_set_profile_cmd): Constify.
1963 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1964 * language.c (set_language_command, set_range_command)
1965 (set_case_command): Constify.
1966 * infrun.c (set_non_stop, set_observer_mode)
1967 (set_stop_on_solib_events, set_schedlock_func)
1968 (set_exec_direction_func): Constify.
1969 * infcmd.c (set_inferior_tty_command): Constify.
1970 * disasm.c (set_disassembler_options_sfunc): Constify.
1971 * demangle.c (set_demangling_command): Constify.
1972 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1973 * cris-tdep.c (set_cris_version, set_cris_mode)
1974 (set_cris_dwarf2_cfi): Constify.
1975 * corefile.c (set_gnutarget_command): Constify.
1976 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1977 (set_target_wide_charset_sfunc): Constify.
1978 * breakpoint.c (update_dprintf_commands): Constify.
1979 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1980 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1981 (set_disassembly_style_sfunc): Constify.
1982 * arch-utils.c (set_endian, set_architecture): Constify.
1983 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1984 * agent.c (set_can_use_agent): Constify.
1985
1986 2017-11-07 Tom Tromey <tom@tromey.com>
1987
1988 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1989 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1990 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1991 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1992 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1993 (parse_int_arg, show_thread_default_detach_sc_cmd)
1994 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1995 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1996 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1997 (show_task_pause_cmd, set_task_detach_sc_cmd)
1998 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1999 (set_noninvasive_cmd, set_thread_pause_cmd)
2000 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2001 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2002 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2003 * windows-nat.c (display_selectors): Constify.
2004 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2005 non-const "cfunc".
2006 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2007 (cmd_cfunc_eq): Likewise.
2008 (struct cmd_list_element): Likewise.
2009 (do_cfunc): Remove.
2010 (cli_user_command_p): Update.
2011 * command.h (add_cmd): Remove non-const overload.
2012 (cmd_cfunc_ftype): Remove typedef.
2013 (cmd_cfunc_eq): Remove non-const overload.
2014 * value.c (show_values): Constify.
2015 * thread.c (thread_apply_all_command): Constify.
2016 * symfile.c (load_command): Constify.
2017 * source.c (directory_command): Constify.
2018 * maint.c (maintenance_internal_error)
2019 (maintenance_demangler_warning, maintenance_space_display)
2020 (maintenance_print_architecture, maintenance_translate_address)
2021 (maintenance_info_selftests, maintenance_internal_warning):
2022 Constify.
2023 * breakpoint.c (disable_trace_command, enable_trace_command):
2024 Constify.
2025 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2026 Constify.
2027 (add_auto_load_safe_path): Constify.
2028 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2029 * top.h (show_commands): Constify.
2030 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2031 * sparc64-tdep.c (adi_examine_command): Constify.
2032 (adi_assign_command): Constify.
2033
2034 2017-11-07 Tom Tromey <tom@tromey.com>
2035
2036 * frame.h (info_locals_command, info_args_command): Constify.
2037 * auto-load.h (auto_load_info_scripts): Constify.
2038 * inferior.h (registers_info): Constify.
2039 * copying.c: Rebuild.
2040 * copying.awk: Constify generated commands.
2041 * auto-load.c (auto_load_info_scripts)
2042 (info_auto_load_gdb_scripts): Constify.
2043 * cli/cli-decode.c (struct cmd_list_element): Take a
2044 cmd_const_cfunc_ftype.
2045 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2046 * tui/tui-win.c (tui_all_windows_info): Constify.
2047 * python/py-auto-load.c (info_auto_load_python_scripts):
2048 Constify.
2049 * cli/cli-cmds.c (show_command): Remove non-const overload.
2050 * tracepoint.c (info_tvariables_command, info_scope_command):
2051 Constify.
2052 (info_static_tracepoint_markers_command): Constify.
2053 * thread.c (info_threads_command): Constify.
2054 (print_thread_info_1): Constify.
2055 * target.c (info_target_command): Constify.
2056 * symtab.c (info_sources_command, info_functions_command)
2057 (info_types_command): Constify.
2058 (info_variables_command): Remove non-const overload.
2059 * symfile.c (info_ext_lang_command): Constify.
2060 * stack.c (info_frame_command, info_locals_command)
2061 (info_args_command): Constify.
2062 (backtrace_command): Remove non-const overload.
2063 * source.c (info_source_command, info_line_command): Constify.
2064 * solib.c (info_sharedlibrary_command): Constify.
2065 * skip.c (info_skip_command): Constify.
2066 * ser-go32.c (info_serial_command): Constify.
2067 * reverse.c (info_bookmarks_command): Constify.
2068 * printcmd.c (info_symbol_command, info_address_command)
2069 (info_display_command): Constify.
2070 * osdata.c (info_osdata_command): Constify.
2071 * objc-lang.c (info_selectors_command, info_classes_command):
2072 Constify.
2073 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2074 * memattr.c (info_mem_command): Constify.
2075 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2076 * linux-fork.c (info_checkpoints_command): Constify.
2077 * infrun.c (info_signals_command): Constify.
2078 * inflow.c (info_terminal_command): Constify.
2079 * inferior.c (info_inferiors_command): Constify.
2080 (print_inferior): Constify.
2081 * infcmd.c (info_program_command, info_all_registers_command)
2082 (info_registers_command, info_vector_command)
2083 (info_float_command): Constify.
2084 (registers_info): Constify.
2085 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2086 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2087 Constify.
2088 * f-valprint.c (info_common_command): Constify.
2089 * dcache.c (info_dcache_command): Constify.
2090 (dcache_info_1): Constify.
2091 * darwin-nat-info.c (info_mach_tasks_command)
2092 (info_mach_task_command, info_mach_ports_command)
2093 (info_mach_port_command, info_mach_threads_command)
2094 (info_mach_thread_command, info_mach_regions_command)
2095 (info_mach_regions_recurse_command, info_mach_region_command)
2096 (info_mach_exceptions_command): Constify.
2097 (get_task_from_args): Constify.
2098 * cp-support.c (info_vtbl_command): Constify.
2099 * breakpoint.c (info_watchpoints_command)
2100 (info_tracepoints_command): Constify.
2101 (info_breakpoints_command): Remove non-const overload.
2102 * avr-tdep.c (avr_io_reg_read_command): Constify.
2103 * auxv.c (info_auxv_command): Constify.
2104 * ada-tasks.c (info_tasks_command): Constify.
2105 (info_task): Constify.
2106 * ada-lang.c (info_exceptions_command): Constify.
2107
2108 2017-11-07 Tom Tromey <tom@tromey.com>
2109
2110 * solib.h (no_shared_libraries): Constify.
2111 * frame.h (return_command): Constify.
2112 * cli/cli-cmds.h (quit_command): Constify.
2113 * top.h (quit_command, execute_command): Constify.
2114 * target.h (flash_erase_command): Constify.
2115 * inferior.h (set_inferior_args, attach_command): Constify.
2116 * tracepoint.h (start_tracing, stop_tracing): Constify.
2117 * breakpoint.h (break_command, tbreak_command)
2118 (hbreak_command_wrapper, thbreak_command_wrapper)
2119 (rbreak_command_wrapper, watch_command_wrapper)
2120 (awatch_command_wrapper, rwatch_command_wrapper)
2121 (get_tracepoint_by_number): Constify.
2122 * symtab.c (info_variables_command, rbreak_command)
2123 (symtab_symbol_info): Constify.
2124 (info_variables_command): Add non-const overload.
2125 * top.c (dont_repeat_command): Constify.
2126 * breakpoint.c (ignore_command, commands_command)
2127 (condition_command, tbreak_command, hbreak_command)
2128 (thbreak_command, clear_command, break_command)
2129 (info_breakpoints_command, watch_command, rwatch_command)
2130 (awatch_command, trace_command, ftrace_command, strace_command)
2131 (trace_pass_command, break_range_command, dprintf_command)
2132 (agent_printf_command, get_tracepoint_by_number)
2133 (watch_maybe_just_location, trace_pass_command): Constify.
2134 (info_breakpoints_command): Add non-const overload.
2135 * tracefile.c (tsave_command): Constify.
2136 * infcmd.c (attach_command, disconnect_command, signal_command)
2137 (queue_signal_command, stepi_command, nexti_command)
2138 (finish_command, next_command, step_command, until_command)
2139 (advance_command, jump_command, continue_command, run_command)
2140 (start_command, starti_command, interrupt_command)
2141 (run_command_1, set_inferior_args, step_1): Constify.
2142 * inferior.c (add_inferior_command, remove_inferior_command)
2143 (clone_inferior_command): Constify.
2144 * linux-fork.c (checkpoint_command, restart_command): Constify.
2145 * windows-nat.c (signal_event_command): Constify.
2146 * guile/guile.c (guile_repl_command, guile_command): Constify.
2147 * printcmd.c (x_command, display_command, printf_command)
2148 (output_command, set_command, call_command, print_command)
2149 (eval_command): Constify.
2150 (non_const_set_command): Remove.
2151 (_initialize_printcmd): Update.
2152 * source.c (forward_search_command, reverse_search_command):
2153 Constify.
2154 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2155 Constify.
2156 * infrun.c (handle_command): Constify.
2157 * memattr.c (mem_command): Constify.
2158 * stack.c (return_command, up_command, up_silently_command)
2159 (down_command, down_silently_command, frame_command)
2160 (backtrace_command, func_command, backtrace_command_1): Constify.
2161 (backtrace_command): Add non-const overload.
2162 * remote-sim.c (simulator_command): Constify.
2163 * exec.c (set_section_command): Constify.
2164 * tracepoint.c (tdump_command, trace_variable_command)
2165 (tstatus_command, tstop_command, tstart_command)
2166 (end_actions_pseudocommand, while_stepping_pseudocommand)
2167 (collect_pseudocommand, teval_pseudocommand, actions_command)
2168 (start_tracing, stop_tracing): Constify.
2169 * value.c (init_if_undefined_command): Constify.
2170 * tui/tui-stack.c (tui_update_command): Constify.
2171 * tui/tui-win.c (tui_refresh_all_command)
2172 (tui_set_tab_width_command, tui_set_win_height_command)
2173 (tui_set_focus_command, tui_scroll_forward_command)
2174 (tui_scroll_backward_command, tui_scroll_left_command)
2175 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2176 (tui_set_win_height): Constify.
2177 * tui/tui-layout.c (tui_layout_command): Constify.
2178 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2179 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2180 (proc_untrace_sysexit_cmd): Constify.
2181 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2182 (threadset_test_cmd, threadlist_update_test_cmd)
2183 (threadalive_test): Constify.
2184 * objc-lang.c (print_object_command): Constify.
2185 * command.h (add_com): Constify.
2186 * cli/cli-dump.c (restore_command): Constify.
2187 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2188 (help_command, complete_command, shell_command, edit_command)
2189 (list_command, disassemble_command, make_command)
2190 (apropos_command, alias_command): Constify.
2191 * cli/cli-script.c (document_command, define_command)
2192 (while_command, if_command, validate_comname): Constify.
2193 * cli/cli-decode.c (struct cmd_list_element): Change type of
2194 "fun".
2195 * target.c (do_monitor_command, flash_erase_command): Constify.
2196 * regcache.c (reg_flush_command): Constify.
2197 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2198 (reverse_nexti, reverse_continue, reverse_finish)
2199 (save_bookmark_command, goto_bookmark_command)
2200 (exec_reverse_once): Constify.
2201 * python/python.c (python_interactive_command, python_command):
2202 Constify.
2203 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2204 Constify.
2205 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2206 * gcore.c (gcore_command): Constify.
2207
2208 2017-11-07 Tom Tromey <tom@tromey.com>
2209
2210 * printcmd.c (x_command): Call set_repeat_arguments.
2211 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2212 * top.c (repeat_arguments): New global.
2213 (set_repeat_arguments): New function.
2214 (execute_command): Handle repeat_arguments.
2215 (show_commands): Calls set_repeat_arguments.
2216 * command.h (set_repeat_arguments): Declare.
2217
2218 2017-11-07 Tom Tromey <tom@tromey.com>
2219
2220 * stack.c (backtrace_command): Use std::string.
2221 (backtrace_command_1): Make "count_exp" const.
2222
2223 2017-11-07 Tom Tromey <tom@tromey.com>
2224
2225 * source.c (directory_switch, mod_path, add_path): Constify.
2226 * defs.h (add_path, mod_path, directory_switch): Constify.
2227 * mi/mi-cmd-env.c (env_mod_path): Constify.
2228
2229 2017-11-07 Tom Tromey <tom@tromey.com>
2230
2231 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2232 (run_command_1, continue_command, step_1, jump_command)
2233 (signal_command, until_command, advance_command, finish_command)
2234 (attach_command): Update.
2235
2236 2017-11-07 Tom Tromey <tom@tromey.com>
2237
2238 * command.h (set_cmd_cfunc): Don't declare.
2239 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2240
2241 2017-11-07 Tom Tromey <tom@tromey.com>
2242
2243 * stack.c (select_frame_command): Constify.
2244 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2245 * command.h (add_com_suppress_notification): Constify.
2246
2247 2017-11-07 Tom Tromey <tom@tromey.com>
2248
2249 * breakpoint.c (stop_command): Constify.
2250 * cli/cli-decode.c (struct cmd_list_element): Constify.
2251 * command.h (add_abbrev_prefix_cmd): Constify.
2252
2253 2017-11-07 Pedro Alves <palves@redhat.com>
2254
2255 * breakpoint.c (extract_bp_kind): New enum.
2256 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2257 factored out from ...
2258 (extract_bp_number_and_location): ... here.
2259 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2260
2261 2017-11-07 Pedro Alves <palves@redhat.com>
2262
2263 * breakpoint.c (extract_bp_number_and_location): Change return
2264 type to void. Throw error instead of warning.
2265 (enable_disable_command): Adjust.
2266
2267 2017-11-07 Xavier Roirand <roirand@adacore.com>
2268 Pedro Alves <palves@redhat.com>
2269
2270 * breakpoint.c (map_breakpoint_number_range): New, factored out
2271 from ...
2272 (map_breakpoint_numbers): ... here.
2273 (find_location_by_number): Change parameters from string to
2274 breakpoint number and location.
2275 (extract_bp_number_and_location): New function.
2276 (enable_disable_bp_num_loc)
2277 (enable_disable_breakpoint_location_range)
2278 (enable_disable_command): New functions, factored out ...
2279 (enable_command, disable_command): ... these functions, and
2280 adjusted to support ranges.
2281 * NEWS: Document enable/disable breakpoint location range feature.
2282
2283 2017-11-06 Luis Machado <luis.machado@linaro.org>
2284
2285 * MAINTAINERS (Write After Approval): Update my e-mail address.
2286
2287 2017-11-06 Pedro Alves <palves@redhat.com>
2288
2289 * gnu-nat.c (gnu_terminal_init): Delete.
2290 (gnu_target): Don't install gnu_terminal_init.
2291 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2292 (child_terminal_init): ... this function.
2293
2294 2017-11-06 Pedro Alves <palves@redhat.com>
2295
2296 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2297 sgtty.h.
2298 * config.in, configure: Regenerate.
2299
2300 2017-11-06 Pedro Alves <palves@redhat.com>
2301
2302 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2303 (async_init_signals): Adjust.
2304 (handle_stop_sig): Rename to ...
2305 (handle_sigtstp): ... this.
2306 (async_stop_sig): Rename to ...
2307 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2308 SIGTSTP path.
2309 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2310 instead of STOP_SIGNAL thoughout.
2311 (handle_stop_sig): Rename to ...
2312 (handle_sigtstp): ... this.
2313 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2314
2315 2017-11-06 Pedro Alves <palves@redhat.com>
2316
2317 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2318 longer set flags twice in row.
2319
2320 2017-11-06 Pedro Alves <palves@redhat.com>
2321
2322 * Makefile.in (SER_HARDWIRE): Update comment.
2323 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2324 * common/gdb_termios.h: Delete file.
2325 * common/job-control.c: Include termios.h and unistd.h instead of
2326 gdb_termios.h.
2327 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2328 check.
2329 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2330 Remove sgtty code.
2331 * configure.ac: No longer check for termio.h and sgtty.h.
2332 * configure: Regenerate.
2333 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2334 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2335 Replace PROCESS_GROUP_TYPE references with pid_t references
2336 throughout.
2337 (gdb_getpgrp): Delete.
2338 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2339 (child_terminal_inferior): Remove comment. Remove sgtty code.
2340 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2341 gdb_getpgrp. Use serial_set_tty_state instead aof
2342 serial_noflush_set_tty_state. Remove sgtty code.
2343 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2344 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2345 (inferior_process_group): Now returns pid_t.
2346 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2347 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2348 * ser-event.c (serial_event_ops): Update.
2349 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2350 (dos_ops): Update.
2351 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2352 * ser-pipe.c (pipe_ops): Update.
2353 * ser-tcp.c (tcp_ops): Update.
2354 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2355 HAVE_TERMIOS checks.
2356 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2357 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2358 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2359 assume termios.
2360 (hardwire_noflush_set_tty_state): Delete.
2361 (hardwire_print_tty_state, hardwire_drain_output)
2362 (hardwire_flush_output, hardwire_flush_input)
2363 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2364 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2365 code, and assume termios.
2366 (hardwire_ops): Update.
2367 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2368 * serial.c (serial_noflush_set_tty_state): Delete.
2369 * serial.h (serial_noflush_set_tty_state): Delete.
2370 (serial_ops::noflush_set_tty_state): Delete.
2371
2372 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2373
2374 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2375 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2376 (COMMON_OBS): Remove doublest.o and dfp.o.
2377 Do not build target-float.c (instead of doublest.c)
2378 with -Wformat-nonliteral.
2379
2380 * doublest.c: Remove file.
2381 * doublest.h: Remove file.
2382 * dfp.c: Remove file.
2383 * dfp.h: Remove file.
2384
2385 * target-float.c: Do not include "doublest.h" and "dfp.h".
2386 (DOUBLEST): Move here from doublest.h.
2387 (enum float_kind): Likewise.
2388 (FLOATFORMAT_CHAR_BIT): Likewise.
2389 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2390 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2391 (floatformat_precision): Likewise.
2392 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2393 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2394 Likewise.
2395 (host_float_format, host_double_format, host_long_double_format):
2396 Likewise.
2397 (floatformat_to_string, floatformat_from_string): Likewise.
2398 (floatformat_to_doublest): Likewise. Also, inline the original
2399 convert_floatformat_to_doublest.
2400 (floatformat_from_doublest): Likewise. Also, inline the original
2401 convert_floatformat_from_doublest.
2402
2403 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2404 (MAX_DECIMAL_STRING): Move here from dfp.c.
2405 (match_endianness): Likewise.
2406 (set_decnumber_context, decimal_check_errors): Likewise.
2407 (decimal_from_number, decimal_to_number): Likewise.
2408 (decimal_to_string, decimal_from_string): Likewise. Make static.
2409 (decimal_from_longest, decimal_from_ulongest): Likewise.
2410 (decimal_to_longest): Likewise.
2411 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2412 (decimal_convert): Likewise.
2413
2414 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2415
2416 * doublest.c: Do not include "gdbtypes.h".
2417 (extract_typed_floating): Remove.
2418 (store_typed_floating): Remove.
2419 (convert_typed_floating): Remove.
2420 * doublest.h (struct type): Remove.
2421 (DOUBLEST_PRINT_FORMAT): Remove.
2422 (DOUBLEST_SCAN_FORMAT): Remove.
2423 (extract_typed_floating): Remove.
2424 (store_typed_floating): Remove.
2425 (convert_typed_floating): Remove.
2426
2427 * dfp.c (decimal_from_doublest): Remove.
2428 (decimal_to_doublest): Remove.
2429 * dfp.h: Do not include "doublest.h".
2430 (decimal_from_doublest): Remove.
2431 (decimal_to_doublest): Remove.
2432
2433 * value.c: Do not include "doublest.h" and "dfp.h".
2434 (value_as_double): Remove.
2435 (unpack_double): Remove.
2436 (value_from_double): Remove.
2437 (value_from_decfloat): Remove.
2438 * value.h: Do not include "doublest.h".
2439 (value_as_double): Remove.
2440 (unpack_double): Remove.
2441 (value_from_double): Remove.
2442 (value_from_decfloat): Remove.
2443
2444 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2445
2446 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2447 (i386_extract_return_value): Use target_float_convert.
2448 (i386_store_return_value): Likewise.
2449 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2450 (i387_value_to_register): Likewise.
2451 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2452 (ia64_register_to_value): Use target_float_convert.
2453 (ia64_value_to_register): Likewise.
2454 (ia64_extract_return_value): Likewise.
2455 (ia64_store_return_value): Likewise.
2456 (ia64_push_dummy_call): Likewise.
2457 * m68k-tdep.c: Include "target-float.h".
2458 (m68k_register_to_value): Use target_float_convert.
2459 (m68k_value_to_register): Likewise.
2460 (m68k_svr4_extract_return_value): Likewise.
2461 (m68k_svr4_store_return_value): Likewise.
2462 * ppc-sysv-tdep.c: Include "target-float.h".
2463 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2464 (do_ppc_sysv_return_value): Likewise.
2465 (ppc64_sysv_abi_push_freg): Likewise.
2466 (ppc64_sysv_abi_return_value_base): Likewise.
2467 * rs6000-aix-tdep.c: Include "target-float.h".
2468 (rs6000_push_dummy_call): Use target_float_convert.
2469 (rs6000_return_value): Likewise.
2470 * rs6000-lynx178-tdep.c: Include "target-float.h".
2471 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2472 (rs6000_lynx178_return_value): Likewise.
2473 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2474 (rs6000_register_to_value): Use target_float_convert.
2475 (rs6000_value_to_register): Likewise.
2476 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2477 (arm_extract_return_value): Use target_float_convert.
2478 (arm_store_return_value): Likewise.
2479 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2480 (sh_register_convert_to_virtual): Use target_float_convert.
2481 (sh_register_convert_to_raw): Likewise.
2482 * sh64-tdep.c: Include "target-float.h".
2483 (sh64_extract_return_value): Use target_float_convert.
2484 (sh64_register_convert_to_virtual): Likewise.
2485 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2486
2487 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2488
2489 * target-float.c (floatformat_to_host_double): New function.
2490 (floatformat_from_host_double): Likewise.
2491 (target_float_to_host_double): Likewise.
2492 (target_float_from_host_double): Likewise.
2493 * target-float.h (target_float_to_host_double): Add prototype.
2494 (target_float_from_host_double): Likewise.
2495
2496 * guile/scm-value.c: Include "target-float.h".
2497 (gdbscm_value_to_real): Use target_float_to_host_double.
2498 Handle integer source values via value_as_long.
2499 * guile/scm-math.c: Include "target-float.h". Do not include
2500 "doublest.h", "dfp.h", and "expression.h".
2501 (vlscm_convert_typed_number): Use target_float_from_host_double.
2502 (vlscm_convert_number): Likewise.
2503
2504 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2505 (convert_value_from_python): Use target_float_from_host_double.
2506
2507 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2508
2509 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2510 (cast_from_fixed): Likewise.
2511 (ada_scaling_type): New function.
2512 (ada_delta): Return value instead of DOUBLEST. Perform target
2513 arithmetic instead of host arithmetic.
2514 (scaling_factor): Rename to ...
2515 (ada_scaling_factor) ... this. Make non-static. Return value instead
2516 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2517 (ada_fixed_to_float): Remove.
2518 (ada_float_to_fixed): Remove.
2519 * ada-lang.h (ada_fixed_to_float): Remove.
2520 (ada_float_to_fixed): Remove.
2521 (ada_delta): Return value instead of DOUBLEST.
2522 (ada_scaling_factor): Add prototype.
2523
2524 * ada-typeprint.c: Include "target-float.h".
2525 (print_fixed_point_type): Perform target arithmetic instead of
2526 host arithmetic.
2527 * ada-valprint.c: Include "target-float.h".
2528 (ada_val_print_num): Perform target arithmetic instead of
2529 host arithmetic for fixed-point types.
2530
2531 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2532
2533 * target-float.c: Include <math.h>.
2534 (floatformat_binop): New function.
2535 (floatformat_compare): Likewise.
2536 (target_float_binop): Likewise.
2537 (target_float_compare): Likewise.
2538 * target-float.h: Include "expression.h".
2539 (target_float_binop): Add prototype.
2540 (target_float_compare): Likewise.
2541
2542 * valarith.c: Do not include "doublest.h" and "dfp.h".
2543 Include "common/byte-vector.h".
2544 (value_args_as_decimal): Remove, replace by ...
2545 (value_args_as_target_float): ... this function. Handle both
2546 binary and decimal target floating-point formats.
2547 (scalar_binop): Handle both binary and decimal FP using
2548 value_args_as_target_float and target_float_binop.
2549 (value_equal): Handle both binary and decimal FP using
2550 value_args_as_target_float and target_float_compare.
2551 (value_less): Likewise.
2552 (value_pos): Handle all scalar types as simple copy.
2553 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2554 * dfp.c (decimal_binop): Throw error instead of internal_error
2555 when called with an unsupported operation code.
2556
2557 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2558
2559 * target-float.c (target_float_to_string): New function.
2560 (target_float_from_string): New function.
2561 * target-float.h (target_float_to_string): Add prototype.
2562 (target_float_from_string): Add prototype.
2563
2564 * valprint.c: Include "target-float.h". Do not include
2565 "doublest.h" and "dfp.h".
2566 (print_floating): Use target_float_to_string.
2567 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2568 (printf_floating): Use target_float_to_string.
2569 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2570 (print_i387_value): Use target_float_to_string.
2571 * mips-tdep.c: Include "target-float.h".
2572 (mips_print_fp_register): Use target_float_to_string.
2573 * sh64-tdep.c: Include "target-float.h".
2574 (sh64_do_fp_register): Use target_float_to_string.
2575
2576 * parse.c: Include "target-float.h". Do not include
2577 "doublest.h" and "dfp.h".
2578 (parse_float): Use target_float_from_string.
2579 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2580 (define_symbol): Use target_float_from_string.
2581 * gdbarch-selftests.c: Include "target-float.h".
2582 (register_to_value_test): Use target_float_from_string.
2583
2584 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2585
2586 * Makefile.c (SFILES): Add target-float.c.
2587 (HFILES_NO_SRCDIR): Add target-float.h.
2588 (COMMON_OBS): Add target-float.o.
2589 * target-float.h: New file.
2590 * target-float.c: New file.
2591
2592 * doublest.c (floatformat_classify): Fix detection of float_zero.
2593
2594 * gdbtypes.c (is_floating_type): New function.
2595 * gdbtypes.h (is_floating_type): Add prototype.
2596
2597 * value.c: Do not include "floatformat.h".
2598 (unpack_double): Use target_float_is_valid.
2599 (is_floating_value): New function.
2600 * value.h (is_floating_value): Add prototype-
2601
2602 * valarith.c: Include "target-float.h".
2603 (value_logical_not): Use target_float_is_zero.
2604
2605 * python/py-value.c: Include "target-float.h".
2606 (valpy_nonzero): Use target_float_is_zero.
2607
2608 2017-11-04 Tom Tromey <tom@tromey.com>
2609
2610 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2611
2612 2017-11-04 Tom Tromey <tom@tromey.com>
2613
2614 * breakpoint.c (set_momentary_breakpoint): Return
2615 breakpoint_up.
2616 (until_break_command): Update.
2617 (new_until_break_fsm): Change argument types to
2618 breakpoint_up.
2619 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2620 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2621 Remove.
2622 * infcmd.c (finish_forward): Update.
2623 * breakpoint.h (set_momentary_breakpoint)
2624 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2625 (make_cleanup_delete_breakpoint): Remove.
2626 (struct breakpoint_deleter): New.
2627 (breakpoint_up): New typedef.
2628 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2629 (insert_exception_resume_breakpoint): Update.
2630 (insert_exception_resume_from_probe): Update.
2631 (insert_longjmp_resume_breakpoint): Update.
2632 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2633 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2634 * infcall.c (call_function_by_hand_dummy): Update
2635
2636 2017-11-04 Tom Tromey <tom@tromey.com>
2637
2638 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2639
2640 2017-11-04 Tom Tromey <tom@tromey.com>
2641
2642 * linux-tdep.c (linux_core_info_proc_mappings): Use
2643 gdb::def_vector.
2644 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2645 "size" argument.
2646 (linux_corefile_thread): Update.
2647 (linux_make_corefile_notes): Remove unused variable.
2648
2649 2017-11-04 Tom Tromey <tom@tromey.com>
2650
2651 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2652 gdb::byte_vector.
2653
2654 2017-11-04 Tom Tromey <tom@tromey.com>
2655
2656 * objfiles.c (do_free_objfile_cleanup): Remove.
2657 * compile/compile-object-load.c (compile_object_load): Update.
2658 * objfiles.h (make_cleanup_free_objfile): Remove.
2659
2660 2017-11-04 Tom Tromey <tom@tromey.com>
2661
2662 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2663 (adi_read_versions): Change "tags" to "gdb_byte *".
2664 (adi_print_versions): Likewise.
2665
2666 2017-11-04 Tom Tromey <tom@tromey.com>
2667
2668 * breakpoint.c
2669 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2670 from start_rbreak_breakpoints.
2671 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2672 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2673 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2674 * symtab.c (do_end_rbreak_breakpoints): Remove.
2675 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2676
2677 2017-11-04 Tom Tromey <tom@tromey.com>
2678
2679 * cp-namespace.c (reset_directive_searched): Remove.
2680 (cp_lookup_symbol_via_imports): Use scoped_restore.
2681 * cp-support.c (reset_directive_searched): Remove.
2682 (make_symbol_overload_list_using): Use scoped_restore.
2683 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2684 (reset_directive_searched): Remove.
2685
2686 2017-11-04 Tom Tromey <tom@tromey.com>
2687
2688 * symfile.c (find_separate_debug_file_by_debuglink): Use
2689 unique_xmalloc_ptr.
2690
2691 2017-11-04 Tom Tromey <tom@tromey.com>
2692
2693 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2694 type of "info".
2695 (compute_stack_depth): Likewise.
2696 (do_compile_dwarf_expr_to_c): Use std::vector.
2697
2698 2017-11-04 Tom Tromey <tom@tromey.com>
2699
2700 * compile/compile-object-load.c (link_callbacks_einfo): Use
2701 std::string.
2702
2703 2017-11-04 Tom Tromey <tom@tromey.com>
2704
2705 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2706 Use scoped_free_pendings.
2707 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2708 scoped_free_pendings.
2709 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2710 (xcoff_initial_scan): Likewise.
2711 * buildsym.c (reset_symtab_globals): Update comment.
2712 (scoped_free_pendings): Rename from really_free_pendings.
2713 (prepare_for_building): Update comment.
2714 (buildsym_init): Likewise.
2715 * buildsym.h (class scoped_free_pendings): New class.
2716 (really_free_pendings): Don't declare.
2717
2718 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2719
2720 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2721 output when converting a zero value to a special byteorder format.
2722
2723 2017-11-02 Yao Qi <yao.qi@linaro.org>
2724
2725 * frame.c (do_frame_register_read): Remove aspace.
2726 * jit.c (jit_frame_sniffer): Likwise.
2727 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2728 * regcache.c (regcache::regcache): Pass nullptr.
2729 (regcache_print): Caller updated.
2730 * regcache.h (regcache::regcache): Remove one constructor
2731 parameter aspace.
2732
2733 2017-11-02 Yao Qi <yao.qi@linaro.org>
2734
2735 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2736
2737 2017-11-02 Yao Qi <yao.qi@linaro.org>
2738
2739 * breakpoint.c (insert_single_step_breakpoints): Update.
2740 * frame.c (struct frame_info) <aspace>: Add const.
2741 (frame_save_as_regcache): Add const.
2742 (get_frame_address_space): Return const address_space *.
2743 * frame.h (get_frame_address_space): Update declaration.
2744 * infrun.c (struct step_over_info) <aspace>: Add const.
2745 (set_step_over_info): Make aspace const.
2746 (displaced_step_prepare_throw): Change variable const.
2747 (resume): Likewise.
2748 (proceed): Likewise.
2749 (adjust_pc_after_break): Likewise.
2750 (save_waitstatus): Likewise.
2751 (handle_signal_stop): Likewise.
2752 (keep_going_pass_signal): Likewise.
2753 * jit.c (jit_frame_sniffer): Add const.
2754 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2755 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2756 * record-full.c (record_full_wait_1): Likewise.
2757 * regcache.c (regcache::regcache): Change parameter to const.
2758 * regcache.h (regcache::regcache): Likewise.
2759 (regcache::aspace): Return const address_space *.
2760 (regcache) <m_aspace>: Add const.
2761
2762 2017-11-02 Yao Qi <yao.qi@linaro.org>
2763
2764 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2765 * frame.c (create_sentinel_frame): Likewise.
2766 * infrun.c (displaced_step_prepare_throw): Likewise.
2767 (resume): Likewise.
2768 (thread_still_needs_step_over_bp): Likewise.
2769 (proceed): Likewise.
2770 (do_target_wait): Likewise.
2771 (adjust_pc_after_break): Likewise.
2772 (handle_syscall_event): Likewise.
2773 (save_waitstatus): Likewise.
2774 (handle_inferior_event_1): Likewise.
2775 (handle_signal_stop): Likewise.
2776 (keep_going_pass_signal): Likewise.
2777 * linux-nat.c (status_callback): Likewise.
2778 (save_stop_reason): Likewise.
2779 (resume_stopped_resumed_lwps): Likewise.
2780 * record-full.c (record_full_exec_insn): Likewise.
2781 (record_full_wait_1): Likewise.
2782 * regcache.c (get_regcache_aspace): Remove.
2783 * regcache.h (get_regcache_aspace): Remove.
2784
2785 2017-11-02 Yao Qi <yao.qi@linaro.org>
2786
2787 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2788 (init_regcache_descr): Use gdbarch_num_regs.
2789 (regcache::regcache): Likewise.
2790 (regcache::get_register_status): Likewise.
2791 (regcache::assert_raw_regnum): Likewise.
2792 (regcache::cooked_read): Likewise.
2793 (regcache::cooked_read_value): Likewise.
2794 (regcache::cooked_write): Likewise.
2795 (regcache::dump): Likewise.
2796 (regcache::num_raw_registers): New method.
2797 * regcache.h (class regcache) <num_raw_registers>: New.
2798
2799 2017-11-02 Yao Qi <yao.qi@linaro.org>
2800
2801 * regcache.c (regcache::assert_regnum): New method.
2802 (regcache::invalidate): Call assert_regnum.
2803 (regcache::raw_update): Likewise.
2804 (regcache::raw_write): Likewise.
2805 (regcache::raw_read_part): Likewise.
2806 (regcache::raw_write_part): Likewise.
2807 (regcache::raw_supply): Likewise.
2808 (regcache::raw_supply_integer): Likewise.
2809 (regcache::raw_supply_zeroed): Likewise.
2810 (regcache::raw_collect): Likewise.
2811 (regcache::raw_collect_integer): Likewise.
2812 * regcache.h (regcache::assert_regnum): Declare.
2813
2814 2017-11-02 Yao Qi <yao.qi@linaro.org>
2815
2816 * regcache.c (regcache::dump): Remove code.
2817
2818 2017-11-02 Yao Qi <yao.qi@linaro.org>
2819
2820 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2821 Remove.
2822 <sizeof_cooked_register_status>: Remove.
2823 (init_regcache_descr): Update.
2824 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2825 (regcache::save): Likewise.
2826 (regcache::dump): Likewise.
2827
2828 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2829
2830 * ft32-tdep.c (ft32_fetch_instruction): New function.
2831 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2832
2833 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2834
2835 * cli/cli-script.c (execute_control_command): Rename to ...
2836 (execute_control_command_1): ... this.
2837 (execute_control_command): New function.
2838
2839 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2840
2841 * tracepoint.c (tfind_command): Remove const_cast.
2842
2843 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2844
2845 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2846
2847 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2848
2849 * common/common-utils.h (in_inclusive_range): New function.
2850 * arm-tdep.c (arm_record_extension_space): Use
2851 in_inclusive_range.
2852 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2853 * cris-tdep.c (cris_spec_reg_applicable): Use
2854 in_inclusive_range.
2855
2856 2017-10-30 Pedro Alves <palves@redhat.com>
2857 Simon Marchi <simon.marchi@ericsson.com>
2858
2859 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2860 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2861
2862 2017-10-30 Pedro Alves <palves@redhat.com>
2863
2864 * common/common-utils.c (string_appendf, string_vappendf): New
2865 functions.
2866 * common/common-utils.h (string_appendf, string_vappendf): New
2867 declarations.
2868 * unittests/common-utils-selftests.c (string_appendf_func)
2869 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2870 (string_vappendf_tests): New functions.
2871 (_initialize_common_utils_selftests): Register "string_appendf" and
2872 "string_vappendf tests".
2873
2874 2017-10-30 Pedro Alves <palves@redhat.com>
2875
2876 * unittests/common-utils-selftests.c (format_func): New typedef.
2877 (string_printf_tests, string_vprintf_tests): Tests factored out
2878 and merged to ...
2879 (test_format_func): ... this new function.
2880 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2881 test_format_func.
2882
2883 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2884
2885 * darwin-nat.c: Remove include of gdb.h.
2886
2887 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2888
2889 * xtensa-xtregs.c: Fix formatting issues.
2890
2891 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2892
2893 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2894
2895 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2896
2897 PR python/21213
2898 * python/py-infthread.c (thpy_get_inferior): Increment reference
2899 of inferior before returning it.
2900
2901 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2902
2903 * unittests/common-utils-selftests.c (format): Add
2904 ATTRIBUTE_PRINTF.
2905
2906 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2907
2908 * xml-syscall.c (struct syscall_desc): Add constructor.
2909 <name>: Change type to std::string.
2910 (syscall_desc_up): New typedef.
2911 (syscall_desc_p): Remove typeder.
2912 (DEF_VEC_P(syscall_desc_p)): Remove.
2913 (struct syscall_group_desc): Add constructor.
2914 <name>: Change type to std::string.
2915 <syscalls>: Change type to std::vector.
2916 (syscall_group_desc_up): New typedef.
2917 (syscall_group_desc_p): Remove typedef.
2918 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2919 (struct syscalls_info) <syscalls>: Change type to std::vector of
2920 unique_ptr.
2921 <groups>: Likewise.
2922 <my_gdb_datadir>: Change type to std::string.
2923 (syscalls_info_up): New typedef.
2924 (allocate_syscalls_info): Remove.
2925 (syscalls_info_free_syscalls_desc): Remove.
2926 (syscalls_info_free_syscall_group_desc): Remove.
2927 (free_syscalls_info): Remove.
2928 (make_cleanup_free_syscalls_info): Remove.
2929 (syscall_group_create_syscall_group_desc): Adjust.
2930 (syscall_group_add_syscall): Adjust.
2931 (syscall_create_syscall_desc): Adjust.
2932 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2933 (init_syscalls_info): Adjust.
2934 (syscall_group_get_group_by_name): Adjust.
2935 (xml_get_syscall_number): Adjust.
2936 (xml_get_syscall_name): Adjust.
2937 (xml_list_of_syscalls): Adjust.
2938 (xml_list_syscalls_by_group): Adjust.
2939 (xml_list_of_groups): Adjust.
2940
2941 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2942
2943 * probe.h: Don't include gdb_vecs.h.
2944 (DEF_VEC_P (probe_p)): Remove.
2945 (find_probes_in_objfile): Return an std::vector.
2946 * probe.c (find_probes_in_objfile): Likewise.
2947 * breakpoint.c (breakpoint_objfile_data)
2948 <longjmp_probes>: Change type to std::vector.
2949 <exception_probes>: Likewise.
2950 (free_breakpoint_probes): Don't manually free vectors.
2951 (create_longjmp_master_breakpoint): Adjust.
2952 (create_exception_master_breakpoint): Adjust.
2953 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2954 parameter type, adjust.
2955 (svr4_create_solib_event_breakpoints): Adjust.
2956
2957 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2958
2959 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2960 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2961 with new.
2962 (free_breakpoint_probes): Rename to ...
2963 (free_breakpoint_objfile_data): ... this, and call delete on
2964 bp_objfile_data..
2965
2966 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2967
2968 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2969 (loaded_script_ptr): Remove typedef.
2970 (DEF_VEC_P (loaded_script_ptr)): Remove.
2971 (struct collect_matching_scripts_data): Add constructor.
2972 <scripts_p>: Change type to (pointer to) std::vector.
2973 (collect_matching_scripts_data): Adjust.
2974 (sort_scripts_by_name): Make suitable for std::sort.
2975 (print_scripts): Don't sort vector, adjust to std::vector.
2976 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2977
2978 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2979
2980 * symfile.c (filename_language): Make struct, not typedef. Add
2981 constructor.
2982 <ext>: Change type to std::string.
2983 (DEF_VEC_O (filename_language)): Remove.
2984 (filename_language_table): Change type to std::vector.
2985 (add_filename_language): Adjust.
2986 (set_ext_lang_command): Adjust.
2987 (info_ext_lang_command): Adjust.
2988 (deduce_language_from_filename): Adjust.
2989 (class scoped_restore_filename_language_table): Remove.
2990 (test_filename_language): Use scoped_restore.
2991 (test_set_ext_lang_command): Use scoped_restore, adjust to
2992 std::vector change.
2993
2994 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2995
2996 * symfile.c: Include selftest.h.
2997 (class scoped_restore_filename_language_table): New.
2998 (test_filename_language): New test.
2999 (test_set_ext_lang_command): New test.
3000 (_initialize_symfile): Register tests.
3001
3002 2017-10-27 Keith Seitz <keiths@redhat.com>
3003
3004 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3005 in the bp_location, falling back to find_pc_sect_function when
3006 needed.
3007 (add_location_to_breakpoint): Save sal->symbol.
3008 * breakpoint.h (struct bp_location) <symbol>: New field.
3009 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3010 * symtab.h (struct symtab_and_line) <symbol>: New field.
3011
3012 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3013
3014 PR gdb/13669
3015 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3016 to rewind obstack.
3017
3018 2017-10-26 Pedro Alves <palves@redhat.com>
3019
3020 * remote.c (remote_async_terminal_ours_p): Delete.
3021 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3022 Remove references to 'remote_async_terminal_ours_p'.
3023
3024 2017-10-26 Yao Qi <yao.qi@linaro.org>
3025
3026 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3027
3028 2017-10-26 Yao Qi <yao.qi@linaro.org>
3029
3030 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3031 aspace const.
3032 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3033 Likewise.
3034 * breakpoint.c (bpstat_check_location): Remove cast.
3035 (breakpoint_hit_catch_fork): Make aspce const.
3036 (breakpoint_hit_catch_solib): Likewise.
3037 (breakpoint_hit_catch_exec): Likewise.
3038 (breakpoint_hit_ranged_breakpoint): Likewise.
3039 (breakpoint_hit_watchpoint): Likewise.
3040 (base_breakpoint_breakpoint_hit): Likewise.
3041 (bkpt_breakpoint_hit): Likewise.
3042 (dprintf_breakpoint_hit): Likewise.
3043 (tracepoint_breakpoint_hit): Likewise.
3044 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3045
3046 2017-10-26 Yao Qi <yao.qi@linaro.org>
3047
3048 * breakpoint.c (breakpoint_location_address_match): Change
3049 "struct address_space *" to "const address_space".
3050 (breakpoint_location_address_range_overlap): Likewise.
3051 (breakpoint_here_p): Likewise.
3052 (breakpoint_in_range_p): Likewise.
3053 (moribund_breakpoint_here_p): Likewise.
3054 (bp_location_inserted_here_p): Likewise.
3055 (software_breakpoint_inserted_here_p): Likewise.
3056 (hardware_breakpoint_inserted_here_p): Likewise.
3057 (hardware_watchpoint_inserted_in_range): Likewise.
3058 (bpstat_check_location): Likewise.
3059 (bpstat_stop_status): Likewise.
3060 (breakpoint_address_match): Likewise.
3061 (breakpoint_address_match_range): Likewise.
3062 (breakpoint_location_address_match): Likewise.
3063 (breakpoint_location_address_range_overlap): Likewise.
3064 (insert_single_step_breakpoint): Likewise.
3065 (breakpoint_has_location_inserted_here): Likewise.
3066 (single_step_breakpoint_inserted_here_p): Likewise.
3067 (pc_at_non_inline_function): Likewise.
3068 * breakpoint.h (bpstat_stop_status): Update declaration.
3069 (breakpoint_here_p): Likewise.
3070 (breakpoint_in_range_p): Likewise.
3071 (moribund_breakpoint_here_p): Likewise.
3072 (breakpoint_inserted_here_p): Likewise.
3073 (software_breakpoint_inserted_here_p): Likewise.
3074 (hardware_breakpoint_inserted_here_p): Likewise.
3075 (breakpoint_has_location_inserted_here): Likewise.
3076 (single_step_breakpoint_inserted_here_p): Likewise.
3077 (hardware_watchpoint_inserted_in_range): Likewise.
3078 (breakpoint_address_match): Likewise.
3079 (insert_single_step_breakpoint): Likewise.
3080 (pc_at_non_inline_function): Likewise.
3081 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3082 * record.c (record_check_stopped_by_breakpoint): Likewise.
3083 * record.h (record_check_stopped_by_breakpoint): Likewise.
3084 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3085
3086 2017-10-25 Yao Qi <yao.qi@linaro.org>
3087
3088 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3089 regcache->arch () instead get_regcache_arch.
3090 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3091 Likewise.
3092 (aarch64_fbsd_store_inferior_registers): Likewise.
3093 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3094 (store_gregs_to_thread): Likewise.
3095 (fetch_fpregs_from_thread): Likewise.
3096 (store_fpregs_to_thread): Likewise.
3097 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3098 (aarch64_store_return_value): Likewise.
3099 (aarch64_software_single_step): Likewise.
3100 * aix-thread.c (aix_thread_wait): Likewise.
3101 (supply_reg32): Likewise.
3102 (supply_sprs64): Likewise.
3103 (supply_sprs32): Likewise.
3104 (fill_gprs64): Likewise.
3105 (fill_gprs32): Likewise.
3106 (fill_sprs64): Likewise.
3107 (fill_sprs32): Likewise.
3108 (store_regs_user_thread): Likewise.
3109 (store_regs_kernel_thread): Likewise.
3110 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3111 (alphabsd_store_inferior_registers): Likewise.
3112 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3113 (alpha_store_return_value): Likewise.
3114 (alpha_deal_with_atomic_sequence): Likewise.
3115 (alpha_next_pc): Likewise.
3116 (alpha_software_single_step): Likewise.
3117 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3118 (amd64bsd_store_inferior_registers): Likewise.
3119 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3120 Likewise.
3121 (amd64_linux_store_inferior_registers): Likewise.
3122 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3123 (amd64_collect_native_gregset): Likewise.
3124 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3125 (amd64obsd_collect_uthread): Likewise.
3126 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3127 (amd64_collect_fpregset): Likewise.
3128 (amd64_supply_fxsave): Likewise.
3129 (amd64_supply_xsave): Likewise.
3130 (amd64_collect_fxsave): Likewise.
3131 (amd64_collect_xsave): Likewise.
3132 * arc-tdep.c (arc_write_pc): Likewise.
3133 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3134 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3135 (arm_fbsd_store_inferior_registers): Likewise.
3136 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3137 (store_vfp_regs): Likewise.
3138 (arm_linux_fetch_inferior_registers): Likewise.
3139 (arm_linux_store_inferior_registers): Likewise.
3140 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3141 (arm_linux_sigreturn_next_pc): Likewise.
3142 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3143 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3144 (fetch_register): Likewise.
3145 (store_register): Likewise.
3146 * arm-tdep.c (arm_is_thumb): Likewise.
3147 (displaced_in_arm_mode): Likewise.
3148 (bx_write_pc): Likewise.
3149 (arm_get_next_pcs_addr_bits_remove): Likewise.
3150 (arm_software_single_step): Likewise.
3151 (arm_extract_return_value): Likewise.
3152 (arm_store_return_value): Likewise.
3153 (arm_write_pc): Likewise.
3154 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3155 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3156 (bsd_uthread_store_registers): Likewise.
3157 * core-regset.c (fetch_core_registers): Likewise.
3158 * corelow.c (get_core_registers): Likewise.
3159 * cris-tdep.c (cris_store_return_value): Likewise.
3160 (cris_extract_return_value): Likewise.
3161 (find_step_target): Likewise.
3162 (find_step_target): Likewise.
3163 (cris_software_single_step): Likewise.
3164 * ctf.c (ctf_fetch_registers): Likewise.
3165 * darwin-nat.c (cancel_breakpoint): Likewise.
3166 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3167 * frv-tdep.c (frv_extract_return_value): Likewise.
3168 * ft32-tdep.c (ft32_store_return_value): Likewise.
3169 (ft32_extract_return_value): Likewise.
3170 * go32-nat.c (fetch_register): Likewise.
3171 (go32_fetch_registers): Likewise.
3172 (go32_store_registers): Likewise.
3173 (store_register): Likewise.
3174 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3175 (h8300_store_return_value): Likewise.
3176 * hppa-linux-nat.c (fetch_register): Likewise.
3177 (store_register): Likewise.
3178 (hppa_linux_fetch_inferior_registers): Likewise.
3179 (hppa_linux_store_inferior_registers): Likewise.
3180 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3181 (i386_darwin_store_inferior_registers): Likewise.
3182 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3183 (gnu_store_registers): Likewise.
3184 * i386-linux-nat.c (fetch_register): Likewise.
3185 (store_register): Likewise.
3186 (supply_gregset): Likewise.
3187 (fill_gregset): Likewise.
3188 (i386_linux_fetch_inferior_registers): Likewise.
3189 (i386_linux_store_inferior_registers): Likewise.
3190 (i386_linux_resume): Likewise.
3191 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3192 Likewise.
3193 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3194 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3195 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3196 (i386obsd_collect_uthread): Likewise.
3197 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3198 (i386_supply_gregset): Likewise.
3199 (i386_collect_gregset): Likewise.
3200 (i386_supply_fpregset): Likewise.
3201 (i386_collect_fpregset): Likewise.
3202 (i386_mpx_bd_base): Likewise.
3203 * i386-v4-nat.c (supply_fpregset): Likewise.
3204 (fill_fpregset): Likewise.
3205 * i387-tdep.c (i387_supply_fsave): Likewise.
3206 (i387_collect_fsave): Likewise.
3207 (i387_supply_fxsave): Likewise.
3208 (i387_collect_fxsave): Likewise.
3209 (i387_supply_xsave): Likewise.
3210 (i387_collect_xsave): Likewise.
3211 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3212 (ia64_linux_store_registers): Likewise.
3213 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3214 (ia64_extract_return_value): Likewise.
3215 (ia64_store_return_value): Likewise.
3216 (find_func_descr): Likewise.
3217 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3218 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3219 (inf_ptrace_store_registers): Likewise.
3220 * infrun.c (use_displaced_stepping): Likewise.
3221 (displaced_step_prepare_throw): Likewise.
3222 (resume): Likewise.
3223 (proceed): Likewise.
3224 (do_target_wait): Likewise.
3225 (adjust_pc_after_break): Likewise.
3226 (handle_inferior_event_1): Likewise.
3227 (handle_signal_stop): Likewise.
3228 (save_infcall_suspend_state): Likewise.
3229 (restore_infcall_suspend_state): Likewise.
3230 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3231 * jit.c (jit_frame_prev_register): Likewise.
3232 * linux-nat.c (save_stop_reason): Likewise.
3233 (linux_nat_wait_1): Likewise.
3234 (resume_stopped_resumed_lwps): Likewise.
3235 * linux-record.c (record_linux_sockaddr): Likewise.
3236 (record_linux_msghdr): Likewise.
3237 (record_linux_system_call): Likewise.
3238 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3239 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3240 (lm32_store_return_value): Likewise.
3241 * m32c-tdep.c (m32c_read_flg): Likewise.
3242 (m32c_pseudo_register_read): Likewise.
3243 (m32c_pseudo_register_write): Likewise.
3244 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3245 (m32r_linux_collect_gregset): Likewise.
3246 * m32r-tdep.c (m32r_store_return_value): Likewise.
3247 (m32r_extract_return_value): Likewise.
3248 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3249 (m68kbsd_collect_fpregset): Likewise.
3250 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3251 * m68k-linux-nat.c (fetch_register): Likewise.
3252 (old_fetch_inferior_registers): Likewise.
3253 (old_store_inferior_registers): Likewise.
3254 (store_regs): Likewise.
3255 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3256 (m68k_svr4_store_return_value): Likewise.
3257 * m88k-tdep.c (m88k_store_arguments): Likewise.
3258 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3259 (mi_cmd_data_write_register_values): Likewise.
3260 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3261 (mips_fbsd_store_inferior_registers): Likewise.
3262 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3263 (mips_fbsd_supply_gregs): Likewise.
3264 (mips_fbsd_collect_fpregs): Likewise.
3265 (mips_fbsd_collect_gregs): Likewise.
3266 (mips_fbsd_supply_fpregset): Likewise.
3267 (mips_fbsd_collect_fpregset): Likewise.
3268 (mips_fbsd_supply_gregset): Likewise.
3269 (mips_fbsd_collect_gregset): Likewise.
3270 * mips-linux-nat.c (supply_gregset): Likewise.
3271 (fill_gregset): Likewise.
3272 (supply_fpregset): Likewise.
3273 (fill_fpregset): Likewise.
3274 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3275 (mips_fill_gregset): Likewise.
3276 (mips_supply_fpregset): Likewise.
3277 (mips_fill_fpregset): Likewise.
3278 (mips64_supply_gregset): Likewise.
3279 (micromips_linux_sigframe_validate): Likewise.
3280 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3281 (mipsnbsd_fetch_inferior_registers): Likewise.
3282 (mipsnbsd_store_inferior_registers): Likewise.
3283 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3284 (mipsnbsd_supply_gregset): Likewise.
3285 (mipsnbsd_iterate_over_regset_sections): Likewise.
3286 (mipsnbsd_supply_reg): Likewise.
3287 (mipsnbsd_supply_fpreg): Likewise.
3288 * mips-tdep.c (mips_in_frame_stub): Likewise.
3289 (mips_dummy_id): Likewise.
3290 (is_octeon_bbit_op): Likewise.
3291 (micromips_bc1_pc): Likewise.
3292 (extended_mips16_next_pc): Likewise.
3293 (mips16_next_pc): Likewise.
3294 (deal_with_atomic_sequence): Likewise.
3295 * moxie-tdep.c (moxie_process_readu): Likewise.
3296 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3297 * nto-procfs.c (procfs_store_registers): Likewise.
3298 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3299 (ppcfbsd_store_inferior_registers): Likewise.
3300 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3301 (fetch_altivec_register): Likewise.
3302 (get_spe_registers): Likewise.
3303 (fetch_spe_register): Likewise.
3304 (fetch_altivec_registers): Likewise.
3305 (fetch_all_gp_regs): Likewise.
3306 (fetch_all_fp_regs): Likewise.
3307 (store_vsx_register): Likewise.
3308 (store_altivec_register): Likewise.
3309 (set_spe_registers): Likewise.
3310 (store_spe_register): Likewise.
3311 (store_altivec_registers): Likewise.
3312 (store_all_gp_regs): Likewise.
3313 (store_all_fp_regs): Likewise.
3314 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3315 (ppc_linux_collect_gregset): Likewise.
3316 (ppc_canonicalize_syscall): Likewise.
3317 (ppc_linux_record_signal): Likewise.
3318 (ppu2spu_prev_register): Likewise.
3319 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3320 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3321 (ppcobsd_store_registers): Likewise.
3322 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3323 Likewise.
3324 (ppc_ravenscar_generic_store_registers): Likewise.
3325 * procfs.c (procfs_fetch_registers): Likewise.
3326 (procfs_store_registers): Likewise.
3327 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3328 (ravenscar_store_registers): Likewise.
3329 (ravenscar_prepare_to_store): Likewise.
3330 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3331 * record-full.c (record_full_wait_1): Likewise.
3332 (record_full_registers_change): Likewise.
3333 (record_full_store_registers): Likewise.
3334 (record_full_core_fetch_registers): Likewise.
3335 (record_full_save): Likewise.
3336 (record_full_goto_insn): Likewise.
3337 * regcache.c (regcache_register_size): Likewise.
3338 (get_regcache_arch): Remove.
3339 (regcache_read_pc): Likewise.
3340 * regcache.h (get_regcache_arch): Remove.
3341 * remote-sim.c (gdbsim_fetch_register): Likewise.
3342 (gdbsim_store_register): Likewise.
3343 * remote.c (fetch_register_using_p): Likewise.
3344 (send_g_packet): Likewise.
3345 (remote_prepare_to_store): Likewise.
3346 (store_registers_using_G): Likewise.
3347 * reverse.c (save_bookmark_command): Likewise.
3348 (goto_bookmark_command): Likewise.
3349 * rs6000-aix-tdep.c (branch_dest): Likewise.
3350 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3351 (fetch_register): Likewise.
3352 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3353 (ppc_collect_reg): Likewise.
3354 (ppc_collect_gregset): Likewise.
3355 (ppc_collect_fpregset): Likewise.
3356 (ppc_collect_vsxregset): Likewise.
3357 (ppc_collect_vrregset): Likewise.
3358 (ppc_displaced_step_hw_singlestep): Likewise.
3359 (rs6000_pseudo_register_read): Likewise.
3360 (rs6000_pseudo_register_write): Likewise.
3361 * s390-linux-nat.c (supply_gregset): Likewise.
3362 (fill_gregset): Likewise.
3363 (s390_linux_fetch_inferior_registers): Likewise.
3364 * s390-linux-tdep.c (s390_write_pc): Likewise.
3365 (s390_software_single_step): Likewise.
3366 (s390_all_but_pc_registers_record): Likewise.
3367 (s390_linux_syscall_record): Likewise.
3368 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3369 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3370 (shnbsd_store_inferior_registers): Likewise.
3371 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3372 (sh_extract_return_value_fpu): Likewise.
3373 (sh_store_return_value_nofpu): Likewise.
3374 (sh_corefile_supply_regset): Likewise.
3375 (sh_corefile_collect_regset): Likewise.
3376 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3377 (sh64_store_return_value): Likewise.
3378 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3379 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3380 (sparc_store_inferior_registers): Likewise.
3381 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3382 (sparc_ravenscar_prepare_to_store): Likewise.
3383 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3384 (sparc_analyze_control_transfer): Likewise.
3385 (sparc_step_trap): Likewise.
3386 (sparc_software_single_step): Likewise.
3387 (sparc32_gdbarch_init): Likewise.
3388 (sparc_supply_rwindow): Likewise.
3389 (sparc_collect_rwindow): Likewise.
3390 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3391 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3392 (sparc64nbsd_collect_gregset): Likewise.
3393 (sparc64nbsd_supply_fpregset): Likewise.
3394 (sparc64nbsd_collect_fpregset): Likewise.
3395 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3396 (sparc64_supply_gregset): Likewise.
3397 (sparc64_collect_gregset): Likewise.
3398 (sparc64_supply_fpregset): Likewise.
3399 (sparc64_collect_fpregset): Likewise.
3400 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3401 * spu-tdep.c (spu_unwind_sp): Likewise.
3402 (spu2ppu_prev_register): Likewise.
3403 (spu_memory_remove_breakpoint): Likewise.
3404 * stack.c (return_command): Likewise.
3405 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3406 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3407 * tracefile.c (trace_save_ctf): Likewise.
3408 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3409 (do_windows_store_inferior_registers): Likewise.
3410 (windows_resume): Likewise.
3411 * xtensa-linux-nat.c (fill_gregset): Likewise.
3412 (supply_gregset_reg): Likewise.
3413 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3414 (xtensa_register_read_masked): Likewise.
3415 (xtensa_supply_gregset): Likewise.
3416 (xtensa_extract_return_value): Likewise.
3417 (xtensa_store_return_value): Likewise.
3418
3419 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3420
3421 * doublest.c (floatformat_from_string): New function.
3422 * doublest.h (floatformat_from_string): Add prototype.
3423
3424 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3425 (OP_FLOAT): ... this.
3426 * expression.h: Do not include "doublest.h".
3427 (union exp_element): Replace doubleconst and decfloatconst by
3428 new element floatconst.
3429 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3430 (ada_evaluate_subexp): Likewise.
3431 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3432 OP_DOUBLE and OP_DECFLOAT.
3433 * expprint.c (print_subexp_standard): Likewise.
3434 (dump_subexp_body_standard): Likewise.
3435 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3436
3437 * parse.c: Include "dfp.h".
3438 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3439 (write_exp_elt_floatcst): New function.
3440 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3441 and OP_DECFLOAT.
3442 (operator_check_standard): Likewise.
3443 (parse_float): Do not accept suffix. Take type as input. Return bool.
3444 Return target format buffer instead of host DOUBLEST.
3445 Use floatformat_from_string and decimal_from_string to parse
3446 either binary or decimal floating-point types.
3447 (parse_c_float): Remove.
3448 * parser-defs.h: Do not include "doublest.h".
3449 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3450 (write_exp_elt_floatcst): Add prototype.
3451 (parse_float): Update prototype.
3452 (parse_c_float): Remove.
3453
3454 * c-exp.y: Do not include "dfp.h".
3455 (typed_val_float): Use byte buffer instead of DOUBLEST.
3456 (typed_val_decfloat): Remove.
3457 (DECFLOAT): Remove.
3458 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3459 (parse_number): Update to new parse_float interface.
3460 Parse suffixes and determine type before calling parse_float.
3461 Handle decimal and binary FP types the same way.
3462
3463 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3464 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3465 (parse_number): Update to new parse_float interface.
3466 Parse suffixes and determine type before calling parse_float.
3467
3468 * f-exp.y: Replace dval by typed_val_float.
3469 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3470 (parse_number): Use parse_float instead of atof.
3471
3472 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3473 (parse_go_float): Remove.
3474 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3475 (parse_number): Call parse_float instead of parse_go_float.
3476 Parse suffixes and determine type before calling parse_float.
3477
3478 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3479 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3480 (parse_number): Update to new parse_float interface.
3481 Parse suffixes and determine type before calling parse_float.
3482
3483 * m2-exp.y: Replace dval by byte buffer val.
3484 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3485 (parse_number): Call parse_float instead of atof.
3486
3487 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3488 (lex_number): Call parse_float instead of strtod.
3489 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3490 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3491 Use write_exp_elt_floatcst.
3492 (unit_testing): Remove static variable.
3493 (rust_type): Do not check unit_testing.
3494 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3495
3496 * ada-exp.y (type_float, type_double): Remove.
3497 (typed_val_float): Use byte buffer instead of DOUBLEST.
3498 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3499 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3500
3501 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3502
3503 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3504 * arch/aarch64.h: New file.
3505
3506 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3507
3508 * dfp.h (decimal_from_string): Use const reference for argument.
3509 * dfp.c (decimal_from_string): Likewise.
3510
3511 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3512
3513 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3514 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3515 * mips-tdep.c (mips_print_fp_register): Likewise.
3516
3517 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3518
3519 * common/format.h (enum argclass): Replace decfloat_arg by
3520 dec32float_arg, dec64float_arg, and dec128float_arg.
3521 * common/format.c (parse_format_string): Update to return
3522 new decimal float argument classes.
3523
3524 * printcmd.c (printf_decfloat): Rename to ...
3525 (printf_floating): ... this. Add argclass argument, and use it
3526 instead of parsing the format string again. Add support for
3527 binary floating-point values, using floatformat_to_string.
3528 Convert value to the target format if it doesn't already match.
3529 (ui_printf): Call printf_floating instead of printf_decfloat,
3530 also for double_arg / long_double_arg. Pass argclass.
3531
3532 * dfp.c (decimal_to_string): Add format string argument.
3533 * dfp.h (decimal_to_string): Likewise.
3534
3535 * doublest.c (floatformat_to_string): Add format string argument.
3536 * doublest.h (floatformat_to_string): Likewise.
3537
3538 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3539
3540 * doublest.c (floatformat_precision): New routine.
3541 (floatformat_to_string): Likewise.
3542 * doublest.c (floatformat_to_string): Add prototype.
3543
3544 * printcmd.c (print_scalar_formatted): Only call print_floating
3545 on floating-point types.
3546 * valprint.c: Do not include "floatformat.h".
3547 (generic_val_print_decfloat): Remove.
3548 (generic_val_print): Call generic_val_print_float for both
3549 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3550 (print_floating): Use floatformat_to_string. Handle decimal float.
3551 (print_decimal_floating): Remove, merge into floatformat_to_string.
3552 * value.h (print_decimal_floating): Remove.
3553
3554 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3555
3556 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3557
3558 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3559
3560 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3561
3562 * memattr.h: Don't include vec.h.
3563 (struct mem_attrib): Initialize fields.
3564 <unknown>: New static method.
3565 (struct mem_region): Add constructors, operator<, initialize
3566 fields.
3567 * memattr.c: Include algorithm.
3568 (default_mem_attrib, unknown_mem_attrib): Remove.
3569 (user_mem_region_list): New global.
3570 (target_mem_region_list, mem_region_list): Change type to
3571 std::vector<mem_region>.
3572 (mem_use_target): Now a function.
3573 (target_mem_regions_valid): Change type to bool.
3574 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3575 (require_user_regions): Adjust.
3576 (require_target_regions): Adjust.
3577 (create_mem_region): Adjust.
3578 (lookup_mem_region): Adjust.
3579 (invalidate_target_mem_regions): Adjust.
3580 (mem_clear): Rename to...
3581 (user_mem_clear): ... this, and adjust.
3582 (mem_command): Adjust.
3583 (info_mem_command): Adjust.
3584 (mem_enable, enable_mem_command, mem_disable,
3585 disable_mem_command): Adjust.
3586 (mem_delete): Adjust.
3587 (delete_mem_command): Adjust.
3588 * memory-map.h (parse_memory_map): Return an std::vector.
3589 * memory-map.c (parse_memory_map): Likewise.
3590 (struct memory_map_parsing_data): Add constructor.
3591 <memory_map>: Point to std::vector.
3592 (memory_map_start_memory): Adjust.
3593 (memory_map_end_memory): Adjust.
3594 (memory_map_end_property): Adjust.
3595 (clear_result): Remove.
3596 * remote.c (remote_memory_map): Return an std::vector.
3597 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3598 Remove.
3599 (target_debug_print_mem_region_vector): New.
3600 * target-delegates.c: Regenerate.
3601 * target.h (mem_region_vector): New typedef.
3602 (to_memory_map): Return mem_region_vector.
3603 (target_memory_map): Return an std::vector.
3604 * target.c (target_memory_map): Return an std::vector.
3605 (flash_erase_command): Adjust.
3606
3607 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3608
3609 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3610 Change type to std::string.
3611 (memory_map_start_property): Adjust.
3612 (memory_map_end_property): Adjust.
3613
3614 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3615
3616 * infrun.h: Include common/byte-vector.h.
3617 (struct displaced_step_closure): New struct.
3618 (struct buf_displaced_step_closure): New struct.
3619 * infrun.c (displaced_step_closure::~displaced_step_closure):
3620 Provide default implementation.
3621 (displaced_step_clear): Deallocate step closure with delete.
3622 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3623 (aarch64_displaced_step_closure): ... this, extend
3624 displaced_step_closure.
3625 (aarch64_displaced_step_data) <dsc>: Change type to
3626 aarch64_displaced_step_closure.
3627 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3628 unique_ptr.
3629 (aarch64_displaced_step_fixup): Add cast for displaced step
3630 closure.
3631 * amd64-tdep.c (displaced_step_closure): Rename to ...
3632 (amd64_displaced_step_closure): ... this, extend
3633 displaced_step_closure.
3634 <insn_buf>: Change type to std::vector<gdb_byte>.
3635 <max_len>: Remove.
3636 (fixup_riprel): Change type of DSC parameter, adjust to type
3637 change of insn_buf.
3638 (fixup_displaced_copy): Change type of DSC parameter.
3639 (amd64_displaced_step_copy_insn): Instantiate
3640 amd64_displaced_step_closure.
3641 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3642 to type change of insn_buf.
3643 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3644 parameter DSC.
3645 (arm_linux_copy_svc): Likewise.
3646 (cleanup_kernel_helper_return): Likewise.
3647 (arm_catch_kernel_helper_return): Likewise.
3648 (arm_linux_displaced_step_copy_insn): Instantiate
3649 arm_displaced_step_closure.
3650 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3651 (displaced_read_reg): Change type of parameter DSC.
3652 (branch_write_pc): Likewise.
3653 (load_write_pc): Likewise.
3654 (alu_write_pc): Likewise.
3655 (displaced_write_reg): Likewise.
3656 (arm_copy_unmodified): Likewise.
3657 (thumb_copy_unmodified_32bit): Likewise.
3658 (thumb_copy_unmodified_16bit): Likewise.
3659 (cleanup_preload): Likewise.
3660 (install_preload): Likewise.
3661 (arm_copy_preload): Likewise.
3662 (thumb2_copy_preload): Likewise.
3663 (install_preload_reg): Likewise.
3664 (arm_copy_preload_reg): Likewise.
3665 (cleanup_copro_load_store): Likewise.
3666 (install_copro_load_store): Likewise.
3667 (arm_copy_copro_load_store) Likewise.
3668 (thumb2_copy_copro_load_store): Likewise.
3669 (cleanup_branch): Likewise.
3670 (install_b_bl_blx): Likewise.
3671 (arm_copy_b_bl_blx): Likewise.
3672 (thumb2_copy_b_bl_blx): Likewise.
3673 (thumb_copy_b): Likewise.
3674 (install_bx_blx_reg): Likewise.
3675 (arm_copy_bx_blx_reg): Likewise.
3676 (thumb_copy_bx_blx_reg): Likewise.
3677 (cleanup_alu_imm): Likewise.
3678 (arm_copy_alu_imm): Likewise.
3679 (thumb2_copy_alu_imm): Likewise.
3680 (cleanup_alu_reg): Likewise.
3681 (install_alu_reg): Likewise.
3682 (arm_copy_alu_reg): Likewise.
3683 (thumb_copy_alu_reg): Likewise.
3684 (cleanup_alu_shifted_reg): Likewise.
3685 (install_alu_shifted_reg): Likewise.
3686 (arm_copy_alu_shifted_reg): Likewise.
3687 (cleanup_load): Likewise.
3688 (cleanup_store): Likewise.
3689 (arm_copy_extra_ld_st): Likewise.
3690 (install_load_store): Likewise.
3691 (thumb2_copy_load_literal): Likewise.
3692 (thumb2_copy_load_reg_imm): Likewise.
3693 (arm_copy_ldr_str_ldrb_strb): Likewise.
3694 (cleanup_block_load_all): Likewise.
3695 (cleanup_block_store_pc): Likewise.
3696 (cleanup_block_load_pc): Likewise.
3697 (arm_copy_block_xfer): Likewise.
3698 (thumb2_copy_block_xfer): Likewise.
3699 (cleanup_svc): Likewise.
3700 (install_svc): Likewise.
3701 (arm_copy_svc): Likewise.
3702 (thumb_copy_svc): Likewise.
3703 (arm_copy_undef): Likewise.
3704 (thumb_32bit_copy_undef): Likewise.
3705 (arm_copy_unpred): Likewise.
3706 (arm_decode_misc_memhint_neon): Likewise.
3707 (arm_decode_unconditional): Likewise.
3708 (arm_decode_miscellaneous): Likewise.
3709 (arm_decode_dp_misc): Likewise.
3710 (arm_decode_ld_st_word_ubyte): Likewise.
3711 (arm_decode_media): Likewise.
3712 (arm_decode_b_bl_ldmstm): Likewise.
3713 (arm_decode_ext_reg_ld_st): Likewise.
3714 (thumb2_decode_dp_shift_reg): Likewise.
3715 (thumb2_decode_ext_reg_ld_st): Likewise.
3716 (arm_decode_svc_copro): Likewise.
3717 (thumb2_decode_svc_copro): Likewise.
3718 (install_pc_relative): Likewise.
3719 (thumb_copy_pc_relative_16bit): Likewise.
3720 (thumb_decode_pc_relative_16bit): Likewise.
3721 (thumb_copy_pc_relative_32bit): Likewise.
3722 (thumb_copy_16bit_ldr_literal): Likewise.
3723 (thumb_copy_cbnz_cbz): Likewise.
3724 (thumb2_copy_table_branch): Likewise.
3725 (cleanup_pop_pc_16bit_all): Likewise.
3726 (thumb_copy_pop_pc_16bit): Likewise.
3727 (thumb_process_displaced_16bit_insn): Likewise.
3728 (decode_thumb_32bit_ld_mem_hints): Likewise.
3729 (thumb_process_displaced_32bit_insn): Likewise.
3730 (thumb_process_displaced_insn): Likewise.
3731 (arm_process_displaced_insn): Likewise.
3732 (arm_displaced_init_closure): Likewise.
3733 (arm_displaced_step_fixup): Add cast for closure.
3734 * arm-tdep.h: Include infrun.h.
3735 (displaced_step_closure): Rename to ...
3736 (arm_displaced_step_closure): ... this, extend
3737 displaced_step_closure.
3738 <u::svc::copy_svc_os>: Change type of parameter DSC.
3739 <cleanup>: Likewise.
3740 (arm_process_displaced_insn): Likewise.
3741 (arm_displaced_init_closure): Likewise.
3742 (displaced_read_reg): Likewise.
3743 (displaced_write_reg): Likewise.
3744 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3745 Adjust.
3746 * i386-tdep.h: Include infrun.h.
3747 (i386_displaced_step_closure): New typedef.
3748 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3749 i386_displaced_step_closure.
3750 (i386_displaced_step_fixup): Adjust.
3751 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3752 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3753 and unique_ptr.
3754 (ppc_displaced_step_fixup): Adjust.
3755 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3756 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3757 and unique_ptr.
3758 (s390_displaced_step_fixup): Adjust.
3759
3760 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3761
3762 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3763 Remove declarations.
3764
3765 2017-10-20 Tom Tromey <tom@tromey.com>
3766
3767 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3768 std::vector.
3769 (gdb_bfd_record_inclusion): Update.
3770 (bfdp): Remove typedef.
3771
3772 2017-10-20 Tom Tromey <tom@tromey.com>
3773
3774 * gdb_bfd.c (gdb_bfd_ref): Use new.
3775 (struct gdb_bfd_data): Add constructor, destructor, and member
3776 initializers.
3777 (gdb_bfd_unref): Use delete.
3778
3779 2017-10-20 Tom Tromey <tom@tromey.com>
3780
3781 * exec.c (exec_file_attach): Use new_bfd_ref.
3782 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3783 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3784 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3785 new_bfd_ref.
3786 * gdb_bfd.h (new_bfd_ref): New function.
3787
3788 2017-10-20 Pedro Alves <palves@redhat.com>
3789
3790 * main.c (captured_command_loop): Add attribute noinline.
3791
3792 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3793
3794 * interps.c (struct interp_factory): Add constructor.
3795 (interp_factory_p): Remove typedef.
3796 (DEF_VEC_P(interp_factory_p)): Remove.
3797 (interpreter_factories): Change type to std::vector.
3798 (interp_factory_register): Adjust.
3799 (interp_lookup): Adjust.
3800 (interpreter_completer): Adjust.
3801
3802 2017-10-19 Tom Tromey <tom@tromey.com>
3803
3804 * break-catch-syscall.c (catch_syscall_completer): Use
3805 std::string, gdb::unique_xmalloc_ptr.
3806
3807 2017-10-19 Tom Tromey <tom@tromey.com>
3808
3809 * infcall.c (call_function_by_hand_dummy): Use std::string.
3810
3811 2017-10-19 Tom Tromey <tom@tromey.com>
3812
3813 * mi/mi-main.c (mi_cmd_execute): Update.
3814 * top.h (prepare_execute_command): Return scoped_value_mark.
3815 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3816 Add move constructor.
3817 * top.c (prepare_execute_command): Return scoped_value_mark.
3818 (execute_command): Update.
3819
3820 2017-10-19 Pedro Alves <palves@redhat.com>
3821
3822 * xml-support.c (xml_fetch_content_from_file): Check fread's
3823 return.
3824
3825 2017-10-19 Pedro Alves <palves@redhat.com>
3826
3827 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3828 async.
3829 (handle_error_fd): New function.
3830 (ser_base_async): Add/delete an event loop file handler for
3831 error_fd.
3832
3833 2017-10-19 Pedro Alves <palves@redhat.com>
3834
3835 * xml-support.c (xml_fetch_content_from_file): Don't read in
3836 chunks. Instead use fseek to determine the file's size, and read
3837 it in one go.
3838
3839 2017-11-18 Keith Seitz <keiths@redhat.com>
3840
3841 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3842 types.
3843 Add whitespace to front of type name.
3844
3845 2017-10-18 Keith Seitz <keiths@redhat.com>
3846
3847 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3848 DW_AT_accessibility.
3849
3850 2017-10-18 Yao Qi <yao.qi@linaro.org>
3851
3852 * features/tic6x-c62x-linux.c: Remove.
3853
3854 2017-10-17 Tom Tromey <tom@tromey.com>
3855
3856 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3857 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3858 (do_mixed_source_and_assembly): Likewise.
3859
3860 2017-10-17 Tom Tromey <tom@tromey.com>
3861
3862 * regcache.c (regcache::xfer_part): Remove assertion.
3863
3864 2017-10-17 Pedro Alves <palves@redhat.com>
3865
3866 * xml-support.c (xml_fetch_content_from_file): Call
3867 unique_ptr::release() instead unique_ptr::get() when passing
3868 through xrealloc.
3869
3870 2017-10-17 Yao Qi <yao.qi@linaro.org>
3871
3872 * regcache.c (regcache::xfer_part): Remove parameters read and
3873 write, add parameter is_raw. All callers are updated.
3874
3875 2017-10-16 Keith Seitz <keiths@redhat.com>
3876
3877 * c-typeprint.c (enum access_specifier): Moved here from
3878 c_type_print_base.
3879 (output_access_specifier): New function.
3880 (c_type_print_base): Consider typedefs when assessing
3881 whether access labels are needed.
3882 Use output_access_specifier as needed.
3883 Output access specifier for typedefs, if needed.
3884 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3885 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3886 fields.
3887 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3888 accessor macros.
3889
3890 2017-10-16 Tom Tromey <tom@tromey.com>
3891
3892 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3893 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3894 * target.c (target_fileio_read_stralloc): Update.
3895 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3896 * target.h (target_fileio_read_stralloc): Return
3897 unique_xmalloc_ptr.
3898
3899 2017-10-16 Tom Tromey <tom@tromey.com>
3900
3901 * xml-syscall.c (xml_init_syscalls_info): Update.
3902 * xml-support.c (xinclude_start_include): Update.
3903 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3904 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3905 (xml_fetch_content_from_file): Likewise.
3906 * osdata.c (get_osdata): Update.
3907 * target.h (target_read_stralloc, target_get_osdata): Return
3908 unique_xmalloc_ptr.
3909 * solib-aix.c (solib_aix_get_library_list): Update.
3910 * solib-target.c (solib_target_current_sos): Update.
3911 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3912 * xml-tdesc.c (fetch_available_features_from_target): Update.
3913 (target_fetch_description_xml): Update.
3914 (file_read_description_xml): Update.
3915 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3916 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3917 (remote_pid_to_exec_file): Update.
3918 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3919 (target_get_osdata): Likewise.
3920
3921 2017-10-16 Tom Tromey <tom@tromey.com>
3922
3923 * remote.c (remote_register_number_and_offset): Use std::vector.
3924 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3925 (putpkt_binary): Use gdb::def_vector.
3926 (compare_sections_command): Use gdb::byte_vector.
3927
3928 2017-10-16 Tom Tromey <tom@tromey.com>
3929
3930 * ppc-linux-nat.c (hwdebug_insert_point): Use
3931 gdb::unique_xmalloc_ptr, XDUP.
3932
3933 2017-10-16 Tom Tromey <tom@tromey.com>
3934
3935 * probe.c (parse_probes): Use std::string.
3936 (info_probes_for_ops, enable_probes_command)
3937 (disable_probes_command): Remove cleanups.
3938
3939 2017-10-16 Tom Tromey <tom@tromey.com>
3940
3941 * buildsym.c (block_compar): Remove.
3942 (end_symtab_get_static_block): Use std::vector.
3943
3944 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3945
3946 * memrange.h (struct mem_range): Define operator< and operator==.
3947 (mem_range_s): Remove.
3948 (DEF_VEC_O (mem_range_s)): Remove.
3949 (normalize_mem_ranges): Change parameter type to std::vector.
3950 * memrange.c (compare_mem_ranges): Remove.
3951 (normalize_mem_ranges): Change parameter type to std::vector,
3952 adjust to vector change.
3953 * exec.c (section_table_available_memory): Return vector, remove
3954 parameter.
3955 (section_table_read_available_memory): Adjust to std::vector
3956 change.
3957 * remote.c (remote_read_bytes): Adjust to std::vector
3958 change.
3959 * tracepoint.h (traceframe_available_memory): Change parameter
3960 type to std::vector.
3961 * tracepoint.c (traceframe_available_memory): Change parameter
3962 type to std::vector, adjust.
3963 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3964 std::vector change.
3965 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3966 unittests/memrange-selftests.c.
3967 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3968 * gdb/unittests/memrange-selftests.c: New file.
3969
3970 2017-10-16 Pedro Alves <palves@redhat.com>
3971
3972 * elfread.c (probe_key_free): Rename range-for variable.
3973 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3974 (find_probe_by_pc, collect_probes): Rename range-for variable.
3975
3976 2017-10-16 Yao Qi <yao.qi@linaro.org>
3977
3978 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3979 * features/tic6x-c62x.c: Remove.
3980 * features/tic6x-c64x-linux.c: Remove.
3981 * features/tic6x-c64x.c: Remove.
3982 * features/tic6x-c64xp-linux.c: Remove.
3983 * features/tic6x-c64xp.c: Remove.
3984 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3985 initialize_tdesc_tic6x_*_linux functions.
3986 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3987 initialize_tdesc_tic6x_* functions.
3988
3989 2017-10-16 Yao Qi <yao.qi@linaro.org>
3990
3991 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3992 tic6x-c62x.
3993 * regformats/tic6x-c62x.dat: Remove.
3994 * regformats/tic6x-c64x.dat: Remove.
3995 * regformats/tic6x-c64xp.dat: Remove.
3996
3997 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3998
3999 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4000 (the !HAVE_LIBEXPAT version).
4001
4002 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4003
4004 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4005 const.
4006
4007 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4008
4009 * target.h: Include tracepoint.h.
4010 (enum trace_find_type): Move to tracepoint.h.
4011 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4012 * tracepoint.h: Don't include target.h
4013 (enum trace_find_type): Move from target.h.
4014 (parse_traceframe_info): Return a unique ptr.
4015 * tracepoint.c (current_traceframe_info): Change type to unique
4016 ptr.
4017 (free_traceframe_info): Remove.
4018 (clear_traceframe_info): Don't manually free
4019 current_traceframe_info.
4020 (free_result): Remove.
4021 (parse_traceframe_info): Return a unique ptr.
4022 (get_traceframe_info): Adjust to unique ptr.
4023 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4024 * remote.c (remote_traceframe_info): Return a unique ptr.
4025 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4026 ptr.
4027 * target-debug.h (target_debug_print_traceframe_info_up): New
4028 macro.
4029 * target-delegates.c: Regenerate.
4030
4031 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4032
4033 * memrange.h (struct mem_range): Add constructors.
4034 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4035 std::vector<mem_range>.
4036 * tracepoint.c (free_traceframe_info): Don't manually free
4037 vector.
4038 (traceframe_info_start_memory): Adjust to vector change.
4039 (traceframe_available_memory): Likewise.
4040 * tracefile-tfile.c (build_traceframe_info): Likewise.
4041 * ctf.c (ctf_traceframe_info): Likewise.
4042
4043 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4044
4045 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4046 std::vector<int>.
4047 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4048 (traceframe_info_start_tvar): Adjust to vector change.
4049 (parse_traceframe_info): Allocate with new.
4050 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4051 vector change.
4052 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4053 change.
4054 tfile_traceframe_info): Allocate with new.
4055 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4056 change.
4057
4058 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4059
4060 * tracepoint.c (traceframe_info): Rename to...
4061 (current_traceframe_info): ...this.
4062 (clear_traceframe_info): Adjust.
4063 (get_traceframe_info): Adjust.
4064
4065 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4066
4067 * nat/linux-osdata.c: Include algorithm.
4068 (compare_processes): Remove.
4069 (struct pid_pgid_entry): New struct.
4070 (linux_xfer_osdata_processgroups): Use std::vector instead of
4071 XNEWVEC.
4072
4073 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4074
4075 * objfiles.h: Don't include symfile.h.
4076 (struct partial_symbol): Remove forward-declaration.
4077 (struct objfile) <global_psymbols, static_psymbols>: Change type
4078 to std::vector<partial_symbol *>.
4079 * objfiles.c (objfile::objfile): Don't memset those fields.
4080 (objfile::~objfile): Don't free those fields.
4081 * psympriv.h (struct psymbol_allocation_list): Remove
4082 forward-declaration.
4083 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4084 to std::vector.
4085 (start_psymtab_common): Change parameters to std::vector.
4086 * psymtab.c: Include algorithm.
4087 (require_partial_symbols): Call shrink_to_fit.
4088 (find_pc_sect_psymbol): Adjust to vector change.
4089 (match_partial_symbol): Likewise.
4090 (lookup_partial_symbol): Likewise.
4091 (psym_relocate): Likewise.
4092 (dump_psymtab): Likewise.
4093 (recursively_search_psymtabs): Likewise.
4094 (compare_psymbols): Remove.
4095 (sort_pst_symbols): Adjust to vector change.
4096 (start_psymtab_common): Likewise.
4097 (end_psymtab_common): Likewise.
4098 (psymbol_bcache_full): De-constify return value.
4099 (add_psymbol_to_bcache): Likewise.
4100 (extend_psymbol_list): Remove.
4101 (append_psymbol_to_list): Adjust to vector change.
4102 (add_psymbol_to_list): Likewise.
4103 (init_psymbol_list): Likewise.
4104 (maintenance_info_psymtabs): Likewise.
4105 (maintenance_check_psymtabs): Likewise.
4106 * symfile.h (struct psymbol_allocation_list): Remove.
4107 * symfile.c (reread_symbols): Adjust to vector change.
4108 * dbxread.c (start_psymtab): Change type of parameters.
4109 (dbx_symfile_read): Adjust to vector change.
4110 (read_dbx_symtab): Likewise.
4111 (start_psymtab): Change type of parameters.
4112 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4113 (create_partial_symtab): Likewise.
4114 (add_partial_symbol): Likewise.
4115 (write_one_signatured_type): Likewise.
4116 (recursively_write_psymbols): Likewise.
4117 * mdebugread.c (parse_partial_symbols): Likewise.
4118 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4119 (scan_xcoff_symtab): Adjust to vector change.
4120 (xcoff_initial_scan): Likewise.
4121
4122 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4123
4124 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4125
4126 2017-10-13 Yao Qi <yao.qi@linaro.org>
4127
4128 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4129 Remove s390x-*-expedite, add s390x-expedite.
4130
4131 2017-10-13 Yao Qi <yao.qi@linaro.org>
4132
4133 * features/s390-gs-linux64.c: Regenerated.
4134 * features/s390x-gs-linux64.c: Regenerated.
4135
4136 2017-10-13 Tom Tromey <tom@tromey.com>
4137
4138 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4139 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4140 delete.
4141 * symfile.c (symbol_file_add_with_addrs): Use new.
4142 (symbol_file_add_separate): Update comment.
4143 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4144 * jit.c (jit_object_close_impl): Use new.
4145 (jit_unregister_code): Use delete.
4146 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4147 (~objfile): Rename from free_objfile.
4148 (free_objfile_separate_debug, do_free_objfile_cleanup)
4149 (free_all_objfiles, objfile_purge_solibs): Use delete.
4150 * objfiles.h (struct objfile): Add constructor and destructor.
4151 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4152 (allocate_objfile, free_objfile): Don't declare.
4153 (struct objstats): Add initializers.
4154
4155 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4156
4157 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4158 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4159 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4160 * gdbarch.h: Regenerate.
4161 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4162 Adjust comment.
4163 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4164 (i386_displaced_step_fixup): Adjust comment.
4165 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4166
4167 2017-10-12 Tom Tromey <tom@tromey.com>
4168
4169 * prologue-value.h (pv_area::store_would_trash): Return bool.
4170 (pv_area::find_reg): Likewise.
4171 * prologue-value.c (pv_area::store_would_trash): Return bool.
4172 (pv_area::find_reg): Likewise.
4173
4174 2017-10-12 Tom Tromey <tom@tromey.com>
4175
4176 * s390-linux-tdep.c (s390_store, s390_load)
4177 (s390_check_for_saved, s390_analyze_prologue): Update.
4178 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4179 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4180 * prologue-value.h (class pv_area): Move from prologue-value.c.
4181 Change names of members. Add constructor, destructor, member
4182 functions.
4183 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4184 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4185 (pv_area_fetch, pv_area_scan): Don't declare.
4186 * prologue-value.c (struct pv_area::area_entry): Now member of
4187 pv_area.
4188 (struct pv_area): Move to prologue-value.h.
4189 (pv_area::pv_area): Rename from make_pv_area.
4190 (pv_area::~pv_area): Rename from free_pv_area.
4191 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4192 (clear_entries, find_entry, overlaps, store_would_trash, store)
4193 (fetch, find_reg, scan): Now member of pv_area.
4194 Remove "area" argument. Update.
4195 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4196 Update.
4197 * mn10300-tdep.c (push_reg, check_for_saved)
4198 (mn10300_analyze_prologue): Update.
4199 * mep-tdep.c (is_arg_spill, check_for_saved)
4200 (mep_analyze_prologue): Update.
4201 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4202 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4203 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4204 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4205 Update.
4206 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4207 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4208
4209 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4210
4211 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4212 * linux-nat.c (linux_nat_delete_thread): New variable.
4213 (lwp_free): Invoke linux_nat_delete_thread if set.
4214 (linux_nat_set_delete_thread): New function.
4215 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4216 thread delete callback.
4217 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4218 (_initialize_arm_linux_nat): Assign thread delete callback.
4219 * s390-linux-nat.c (s390_delete_thread): New function.
4220 (_initialize_s390_nat): Assign thread delete callback.
4221 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4222 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4223 function.
4224 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4225 declaration.
4226 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4227 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4228
4229 2017-10-09 Tom Tromey <tom@tromey.com>
4230
4231 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4232 std::string.
4233 * tui/tui-layout.c (enum tui_status): Use std::string.
4234
4235 2017-10-11 Tom Tromey <tom@tromey.com>
4236
4237 * gdbthread.h (thread_command): Constify.
4238 * inferior.h (detach_command): Constify.
4239 * top.h (set_history, show_history): Constify.
4240 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4241 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4242 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4243 * printcmd.c (set_command): Constify.
4244 (non_const_set_command): New function.
4245 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4246 * breakpoint.c (enable_command, disable_command, delete_command)
4247 (catch_command, tcatch_command, set_breakpoint_cmd)
4248 (show_breakpoint_cmd): Constify.
4249 * macrocmd.c (macro_command): Constify.
4250 * infcmd.c (unset_command, kill_command, detach_command)
4251 (info_proc_cmd): Constify.
4252 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4253 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4254 (info_auto_load_cmd): Constify.
4255 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4256 (unset_tdesc_cmd): Constify.
4257 * ada-lang.c (set_ada_command, show_ada_command)
4258 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4259 * guile/guile.c (set_guile_command, show_guile_command)
4260 (info_guile_command): Constify.
4261 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4262 Constify.
4263 * skip.c (skip_command): Constify.
4264 * compile/compile.c (_initialize_compile): Constify.
4265 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4266 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4267 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4268 (maint_btrace_pt_show_cmd): Constify.
4269 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4270 Constify.
4271 * python/python.c (user_show_python, user_set_python): Constify.
4272 * mips-tdep.c (set_mips_command, show_mips_command)
4273 (set_mipsfpu_command): Constify.
4274 * record-btrace.c (cmd_record_btrace_start)
4275 (cmd_set_record_btrace, cmd_show_record_btrace)
4276 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4277 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4278 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4279 Constify.
4280 * symfile.c (overlay_command): Constify.
4281 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4282 * cli/cli-logging.c (set_logging_command, show_logging_command):
4283 Constify.
4284 * cli/cli-dump.c (dump_command, append_command)
4285 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4286 (tekhex_dump_command, binary_dump_command)
4287 (binary_append_command): Constify.
4288 * cli/cli-decode.c (struct cmd_list_element): Change type of
4289 "fun".
4290 * cli/cli-cmds.c (info_command, show_command, set_debug)
4291 (show_debug): Constify.
4292 (show_command): Add non-const overload.
4293 * top.c (set_history, show_history): Constify.
4294 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4295 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4296 * target.c (target_command): Constify.
4297 * sparc64-tdep.c (info_adi_command): Constify.
4298 * record-full.c (cmd_record_full_start): Constify.
4299 (set_record_full_command): Constify. Fix typo.
4300 (show_record_full_command): Constify.
4301 * thread.c (thread_command, thread_apply_command): Constify.
4302 * memattr.c (dummy_cmd): Constify.
4303 * value.c (function_command): Constify.
4304 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4305 * probe.c (info_probes_command): Constify.
4306 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4307 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4308 (show_thread_cmd, set_thread_default_cmd)
4309 (show_thread_default_cmd): Constify.
4310 (check_empty): Constify.
4311 * tracepoint.c (tfind_command): Constify.
4312 * cp-support.c (maint_cplus_command): Constify.
4313 * windows-tdep.c (info_w32_command): Constify.
4314 * record.c (cmd_record_start, set_record_command)
4315 (show_record_command, info_record_command, cmd_record_goto):
4316 Constify.
4317 * ravenscar-thread.c (set_ravenscar_command)
4318 (show_ravenscar_command): Constify.
4319 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4320 Constify.
4321 (add_internal_problem_command): Remove casts.
4322 * arc-tdep.c (maintenance_print_arc_command): Constify.
4323 * valprint.c (set_print, show_print, set_print_raw)
4324 (show_print_raw): Constify.
4325 * maint.c (maintenance_command, maintenance_info_command)
4326 (maintenance_print_command, maintenance_set_cmd)
4327 (maintenance_show_cmd, set_per_command_cmd)
4328 (show_per_command_cmd, maintenance_check_command): Constify.
4329 * language.c (set_check, show_check): Constify.
4330 * typeprint.c (show_print_type, set_print_type): Constify.
4331 * go32-nat.c (go32_info_dos_command): Constify.
4332
4333 2017-10-11 Tom Tromey <tom@tromey.com>
4334
4335 * breakpoint.c (prepare_re_set_context): Remove.
4336 (breakpoint_re_set_one): Update. Don't use cleanups.
4337 (breakpoint_re_set): Use scoped_restore, std::string, and
4338 scoped_restore_current_language.
4339
4340 2017-10-11 Tom Tromey <tom@tromey.com>
4341
4342 * breakpoint.c (commands_command_1): Use std::string.
4343 (cleanup_executing_breakpoints): Remove.
4344 (bpstat_do_actions_1): Use scoped_restore.
4345 (bpstat_check_watchpoint): Use std::string.
4346 (decode_static_tracepoint_spec): Likewise.
4347 (break_range_command): Likewise.
4348 (watch_command_1): Likewise.
4349 (compare_breakpoints): Change argument types.
4350 (clear_command): Use std::vector.
4351 (cleanup_executing_breakpoints): Remove.
4352 (update_global_location_list): Use unique_xmalloc_ptr.
4353 (strace_command): Remove unused declaration.
4354
4355 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4356
4357 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4358 * NEWS: Mention new FreeBSD/arm native configuration.
4359 * configure.host: Add arm*-*-freebsd*.
4360 * configure.nat: Likewise.
4361 * arm-fbsd-nat.c: New file.
4362
4363 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4364
4365 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4366 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4367 * NEWS: Mention new FreeBSD/arm target.
4368 * configure.tgt: Add arm*-*-freebsd*.
4369 * arm-fbsd-tdep.c: New file.
4370 * arm-fbsd-tdep.h: New file.
4371
4372 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4373
4374 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4375 `gdbarch_elfcore_write_linux_prpsinfo'.
4376 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4377 method.
4378 (elf_internal_linux_prpsinfo): Remove declaration.
4379 * gdbarch.h: Regenerate.
4380 * gdbarch.c: Regenerate.
4381
4382 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4383
4384 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4385 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4386
4387 2017-10-11 Pedro Alves <palves@redhat.com>
4388
4389 * breakpoint.c (reattach_breakpoints): Delete.
4390 * breakpoint.h (reattach_breakpoints): Delete.
4391
4392 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4393
4394 * symfile.c (registered_sym_fns): Make struct, not typedef.
4395 (DEF_VEC_O (registered_sym_fns)): Remove.
4396 (symtab_fns): Change type to std::vector.
4397 (add_symtab_fns): Adjust.
4398 (find_sym_fns): Adjust.
4399
4400 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4401
4402 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4403 * arc-tdep.h (arc_arch_is_em): New function.
4404 (arc_arch_is_hs): Likewise.
4405
4406 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4407
4408 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4409 parentheses in the declaration.
4410 (macro_lookup_inclusion): Likewise.
4411 (macro_lookup_definition): Likewise.
4412 * p-lang.h (pascal_builtin_types): Likewise.
4413 * tui/tui-data.c (tui_win_list): Likewise.
4414 * tui/tui-data.h (tui_win_list): Likewise.
4415 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4416
4417 2017-10-11 Mark Rages <markrages@gmail.com>
4418
4419 * target-memory.c (block_boundaries): Fix for block address not
4420 aligned on block size.
4421
4422 2017-10-10 Pedro Alves <palves@redhat.com>
4423 Tom Tromey <tom@tromey.com>
4424
4425 * breakpoint.c (struct captured_breakpoint_query_args)
4426 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4427 (print_breakpoint): New.
4428 * breakpoint.h (print_breakpoint): Declare.
4429 * common/common-exceptions.h (enum return_reason): Remove
4430 references to catch_exceptions.
4431 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4432 Delete.
4433 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4434 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4435 * gdb.h: Delete.
4436 * gdbthread.h (thread_select): Declare.
4437 * mi/mi-cmd-break.c: Don't include gdb.h.
4438 (breakpoint_notify): Use print_breakpoint.
4439 * mi/mi-cmd-catch.c: Don't include gdb.h.
4440 * mi/mi-interp.c: Don't include gdb.h.
4441 (mi_print_breakpoint_for_event): New.
4442 (mi_breakpoint_created, mi_breakpoint_modified): Use
4443 mi_print_breakpoint_for_event.
4444 * mi/mi-main.c: Don't include gdb.h.
4445 (mi_cmd_thread_select): Parse the global thread ID here. Use
4446 thread_select instead of gdb_thread_select.
4447 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4448 of using gdb_list_thread_ids.
4449 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4450 FILEIO_ENOSYS here.
4451 (remote_fileio_request): Use TRY/CATCH instead of
4452 catch_exceptions.
4453 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4454 (symbol_file_add_from_memory_wrapper): Delete.
4455 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4456 * thread.c: Don't include gdb.h.
4457 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4458 (thread_alive): Use thread_select.
4459 (do_captured_thread_select): Delete, parts salvaged as ...
4460 (thread_select): ... this new function.
4461 (gdb_thread_select): Delete.
4462
4463 2017-10-10 Pedro Alves <palves@redhat.com>
4464 Tom Tromey <tom@tromey.com>
4465
4466 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4467 and reverse logic.
4468 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4469 No longer macros. Instead ...
4470 (enum wp_check_result): They're now values of this new
4471 enumeration.
4472 (watchpoint_check): Change return type to wp_check_result and
4473 parameter type to bpstat.
4474 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4475 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4476 catch_errors. Reverse logic of watchpoint_check call.
4477 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4478 pointer as parameter.
4479 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4480 * common/common-exceptions.c (throw_exception_sjlj): Update
4481 comments to avoid mentioning catch_errors.
4482 * exceptions.c (catch_errors): Delete.
4483 * exceptions.h: Update comments to avoid mentioning catch_errors.
4484 (catch_errors_ftype, catch_errors): Delete.
4485 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4486 (hook_stop_stub): Delete.
4487 (restore_selected_frame): Change return type to void, and
4488 parameter type to const frame_id &.
4489 (restore_infcall_control_state): Use TRY/CATCH instead of
4490 catch_errors.
4491 * main.c (captured_command_loop): Return void and remove
4492 parameter. Remove references to catch_errors.
4493 (captured_main): Use TRY/CATCH instead of catch_errors.
4494 * objc-lang.c (objc_submethod_helper_data)
4495 (find_objc_msgcall_submethod_helper): Delete.
4496 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4497 catch_errors.
4498 * record-full.c (record_full_message): Return void.
4499 (record_full_message_args, record_full_message_wrapper): Delete.
4500 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4501 instead of catch_errors.
4502 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4503 parameter type to int.
4504 * solib-darwin.c (open_symbol_file_object): Ditto.
4505 * solib-dsbt.c (open_symbol_file_object): Ditto.
4506 * solib-frv.c (open_symbol_file_object): Ditto.
4507 * solib-svr4.c (open_symbol_file_object): Ditto.
4508 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4509 * solib.c (update_solib_list): Use TRY/CATCH instead of
4510 catch_errors.
4511 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4512 Change type.
4513 * symmisc.c (struct print_symbol_args): Remove.
4514 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4515 (print_symbol): Change type.
4516 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4517 and remove parameters.
4518 (catch_errors): New.
4519 (get_windows_debug_event): Adjust.
4520
4521 2017-10-09 Tom Tromey <tom@tromey.com>
4522
4523 * mi/mi-main.c (free_splay_tree): Remove.
4524 (list_available_thread_groups): Use splay_tree_up.
4525 * common/gdb_splay_tree.h: New file.
4526
4527 2017-10-09 Tom Tromey <tom@tromey.com>
4528
4529 * mi/mi-main.c (do_nothing): Remove.
4530 (list_available_thread_groups): Update.
4531
4532 2017-10-09 Pedro Alves <palves@redhat.com>
4533
4534 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4535 reading registers when switching context.
4536
4537 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4538
4539 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4540 (fbsd_convert_siginfo): Likewise.
4541 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4542
4543 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4544
4545 * configure.ac (try_guile_versions): Remove guile-2.2.
4546 * configure: Regenerate.
4547
4548 2017-10-09 Tom Tromey <tom@tromey.com>
4549
4550 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4551 (COMPILE.pre): Use $(CXX).
4552
4553 2017-10-09 Pedro Alves <palves@redhat.com>
4554
4555 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4556 Use bool.
4557 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4558 * cp-support.h (cp_remove_params): Now returns a
4559 gdb::unique_xmalloc_ptr.
4560 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4561 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4562 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4563 returning a gdb::unique_xmalloc_ptr.
4564 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4565 * stack.c (find_frame_funname): Adjust to cp_remove_params
4566 returning a gdb::unique_xmalloc_ptr.
4567
4568 2017-10-08 Tom Tromey <tom@tromey.com>
4569
4570 * dwarf2read.c (dwarf2_get_dwz_file): Use
4571 gdb::unique_xmalloc_ptr.
4572 (find_slot_in_mapped_hash): Likewise.
4573 (dwarf2_physname): Likewise.
4574 (create_dwo_unit_in_dwp_v1): Use std::string.
4575 (create_dwo_unit_in_dwp_v2): Likewise.
4576 (lookup_dwo_cutu): Likewise.
4577 (inherit_abstract_dies): Use std::vector.
4578 (read_array_type): Likewise.
4579 (dwarf_decode_macros): Remove unused declaration.
4580 (unsigned_int_compar): Remove.
4581 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4582 (psymtabs_addrmap_cleanup): Remove.
4583
4584 2017-10-08 Tom Tromey <tom@tromey.com>
4585
4586 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4587 * frame.h (frame_cleanup_after_sniffer): Declare.
4588 (frame_prepare_for_sniffer): Return void.
4589 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4590 type of argument.
4591 (frame_prepare_for_sniffer): Return void.
4592
4593 2017-10-08 Tom Tromey <tom@tromey.com>
4594
4595 * utils.h (make_cleanup_value_free): Remove.
4596 * utils.c (do_value_free, struct cleanup): Remove.
4597 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4598 Use gdb_value_up.
4599 * value.h (struct value_deleter): New.
4600 (gdb_value_up): New typedef.
4601
4602 2017-10-08 Tom Tromey <tom@tromey.com>
4603
4604 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4605 (make_cleanup_free_search_symbols): Remove.
4606 (search_symbols): Return std::vector.
4607 (symbol_search::compare_search_syms): Now member of
4608 symbol_search. Change arguments.
4609 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4610 (symtab_symbol_info, rbreak_command): Update.
4611 * symtab.h (struct symbol_search) <next>: Remove.
4612 Add constructors.
4613 (symbol_search::operator<): New function.
4614 (symbol_search::operator==): New function.
4615 (search_symbols): Remove std::vector.
4616 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4617 (symbol_search::compare_search_syms): Declare.
4618
4619 2017-10-06 Yao Qi <yao.qi@linaro.org>
4620
4621 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4622 arch/aarch64-insn.o.
4623 Remove one rule.
4624 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4625
4626 2017-10-06 Yao Qi <yao.qi@linaro.org>
4627
4628 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4629 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4630 arch/arm-linux.o respectively.
4631 * configure.tgt: Likewise.
4632
4633 2017-10-06 Yao Qi <yao.qi@linaro.org>
4634
4635 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4636 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4637
4638 2017-10-06 Pedro Alves <palves@redhat.com>
4639
4640 * windows-nat.c: Include <algorithm>.
4641
4642 2017-10-06 Yao Qi <yao.qi@linaro.org>
4643
4644 * configure.tgt (i386_tobjs): New variable.
4645 (amd64_tobjs): New variable.
4646 Set $cpu_obs and $os_obs.
4647
4648 2017-10-06 Yao Qi <yao.qi@linaro.org>
4649
4650 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4651 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4652 (clean): Remove object files and dependency files.
4653 (distclean): Remove the directory.
4654 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4655 * configure: Re-generated.
4656 * configure.tgt: Replace amd64.o with arch/amd64.o.
4657
4658 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4659
4660 PR build/22188
4661 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4662 and SETEND.
4663
4664 2017-10-05 Pedro Alves <palves@redhat.com>
4665
4666 * linux-nat.c (linux_child_follow_fork): When following the parent
4667 and detaching the child, consult the parent thread's architecture
4668 instead of the child's.
4669
4670 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4671
4672 * ax.h: Do not include "doublest.h".
4673 (union agent_val): Remove.
4674
4675 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4676
4677 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4678 (decimal_to_string): Return std::string object.
4679 (decimal_from_string): Accept std::string object. Return bool.
4680 (decimal_from_integral, decimal_from_doublest): Remove.
4681 (decimal_from_longest): Add prototype.
4682 (decimal_from_ulongest): Likewise.
4683 (decimal_to_longest): Likewise.
4684 (decimal_from_doublest): Likewise.
4685 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4686 (MAX_DECIMAL_STRING): Move here.
4687 (decimal_to_string): Return std::string object.
4688 (decimal_from_string): Accept std::string object. Return bool.
4689 (decimal_from_integral): Remove, replace by ...
4690 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4691 (decimal_to_longest): New function.
4692 (decimal_from_floating): Remove, replace by ...
4693 (decimal_from_doublest): ... this new function.
4694 (decimal_to_doublest): Update to new decimal_to_string interface.
4695
4696 * value.c (unpack_long): Use decimal_to_longest.
4697 * valops.c (value_cast): Use decimal_from_doublest instead of
4698 decimal_from_floating. Use decimal_from_[u]longest isntead of
4699 decimal_from_integral.
4700 * valarith.c (value_args_as_decimal): Likewise.
4701 * valprint.c (print_decimal_floating): Update to new
4702 decimal_to_string interface.
4703 * printcmd.c (printf_decfloat): Likewise.
4704 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4705
4706 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4707
4708 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4709 * gdbtypes.c: Include "floatformat.h".
4710 * value.c: Likewise.
4711 * m68k-tdep.c: Likewise.
4712
4713 * findvar.c: Do not include "floatformat.h".
4714 * amd64-darwin-tdep.c: Likewise.
4715 * arm-linux-tdep.c: Likewise.
4716 * i386-darwin-tdep.c: Likewise.
4717 * i387-tdep.c: Likewise.
4718 * m68k-linux-tdep.c: Likewise.
4719 * mep-tdep.c: Likewise.
4720 * mips-tdep.c: Likewise.
4721 * nios2-tdep.c: Likewise.
4722 * s390-linux-tdep.c: Likewise.
4723 * sparc-obsd-tdep.c: Likewise.
4724 * sparc-tdep.c: Likewise.
4725 * sparc64-tdep.c: Likewise.
4726 * spu-tdep.c: Likewise.
4727 * tic6x-tdep.c: Likewise.
4728 * tilegx-tdep.c: Likewise.
4729 * vax-tdep.c: Likewise.
4730 * xstormy16-tdep.c: Likewise.
4731 * xtensa-tdep.c: Likewise.
4732
4733 * top.c: Do not include "doublest.h".
4734 * aarch64-tdep.c: Likewise.
4735 * alpha-tdep.c: Likewise.
4736 * arm-linux-tdep.c: Likewise.
4737 * m68k-linux-tdep.c: Likewise.
4738 * tilegx-tdep.c: Likewise.
4739 * xstormy16-tdep.c: Likewise.
4740
4741 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4742
4743 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4744 (mipsn32_fbsd_sigframe): Define.
4745 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4746 for FreeBSD/mipsn32.
4747
4748 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4749
4750 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4751 AT_HWCAP.
4752
4753 2017-10-05 Tristan Gingold <tgingold@free.fr>
4754
4755 * MAINTAINERS (Misc): Update my email address.
4756
4757 2017-10-04 Pedro Alves <palves@redhat.com>
4758
4759 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4760 it instead of target_gdbarch.
4761 (get_remote_state, get_remote_packet_size): Adjust
4762 get_remote_arch_state calls, passing down target_gdbarch
4763 explicitly.
4764 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4765 'gdbarch' and use it instead of target_gdbarch.
4766 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4767 passing down target_gdbarch explicitly.
4768 (struct stop_reply) <arch>: New field.
4769 (remote_parse_stop_reply): Use the stopped thread's architecture,
4770 not the current inferior's. Save the architecture in the
4771 stop_reply.
4772 (process_stop_reply): Use the stop reply's architecture.
4773 (process_g_packet, remote_fetch_registers)
4774 (remote_prepare_to_store, store_registers_using_G)
4775 (remote_store_registers): Adjust get_remote_arch_state calls,
4776 using the regcache's architecture.
4777 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4778 passing down target_gdbarch explicitly.
4779 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4780 beneath instead of calling target_gdbarch.
4781 * target.c (default_thread_architecture): Use the specified
4782 inferior's architecture, instead of the current inferior's
4783 architecture (via target_gdbarch).
4784
4785 2017-10-04 Pedro Alves <palves@redhat.com>
4786
4787 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4788 case.
4789 (regcache_print): Handle !target_has_registers here instead.
4790
4791 2017-10-04 Pedro Alves <palves@redhat.com>
4792
4793 * frame.c (create_test_frame): Delete.
4794 * frame.h (create_test_frame): Delete.
4795 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4796 (class regcache_test): Delete.
4797 (test_target_has_registers, test_target_has_stack)
4798 (test_target_has_memory, test_target_prepare_to_store)
4799 (test_target_store_registers): New functions.
4800 (test_target_ops): New class.
4801 (register_to_value_test): Error out if there's already a
4802 process_stratum (or higher) target pushed. Create a fuller mock
4803 environment, with mock target_ops, inferior, address space, thread
4804 and inferior_ptid.
4805 * progspace.c (struct address_space): Move to ...
4806 * progspace.h (struct address_space): ... here.
4807 * regcache.h (regcache::~regcache, regcache::raw_write)
4808 [GDB_SELF_TEST]: No longer virtual.
4809
4810 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4811
4812 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4813
4814 2017-10-04 Pedro Alves <palves@redhat.com>
4815
4816 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4817 out of 'between TRY and CATCH'.
4818
4819 2017-10-04 Pedro Alves <palves@redhat.com>
4820
4821 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4822 * common/common-exceptions.h (TRY): Open an outermost scope.
4823 Expand intro comment.
4824 (CATCH): Reindent.
4825 (END_CATCH): Close the outermost scope.
4826 * completer.c (complete_line_internal): Add missing END_CATCH.
4827
4828 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4829
4830 * NEWS (Changes since GDB 8.0): Add entry about new
4831 'set-cwd-on-gdbserver' feature.
4832 (New remote packets): Add entry for QSetWorkingDir.
4833 * common/common-inferior.h (set_inferior_cwd): New prototype.
4834 * infcmd.c (set_inferior_cwd): Remove "static".
4835 (show_cwd_command): Expand text to include remote debugging.
4836 * remote.c: Add PACKET_QSetWorkingDir.
4837 (remote_protocol_features) <QSetWorkingDir>: New entry for
4838 PACKET_QSetWorkingDir.
4839 (extended_remote_set_inferior_cwd): New function.
4840 (extended_remote_create_inferior): Call
4841 "extended_remote_set_inferior_cwd".
4842 (_initialize_remote): Call "add_packet_config_cmd" for
4843 QSetWorkingDir.
4844
4845 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4846
4847 * NEWS (New commands): Mention "set/show cwd".
4848 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4849 "cd" command's help text.
4850 * common/common-inferior.h (get_inferior_cwd): New prototype.
4851 * infcmd.c (inferior_cwd_scratch): New global variable.
4852 (set_inferior_cwd): New function.
4853 (get_inferior_cwd): Likewise.
4854 (set_cwd_command): Likewise.
4855 (show_cwd_command): Likewise.
4856 (_initialize_infcmd): Add "set/show cwd" commands.
4857 * inferior.h (class inferior) <cwd>: New field.
4858 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4859 (fork_inferior): Change inferior's cwd before its execution.
4860 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4861 to CreateProcess.
4862
4863 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4864
4865 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4866 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4867 (COMMON_OBS): Add gdb_tilde_expand.o.
4868 * common/gdb_tilde_expand.c: New file.
4869 * common/gdb_tilde_expand.h: Likewise.
4870
4871 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4872
4873 * gdbarch.sh (objfile): Remove duplicate declaration.
4874 * gdbarch.h: Regenerate.
4875
4876 2017-10-03 Tom Tromey <tom@tromey.com>
4877
4878 * utils.c (internal_vproblem): Use string_vprintf.
4879
4880 2017-10-03 Tom Tromey <tom@tromey.com>
4881
4882 * printcmd.c (info_symbol_command): Use std::string.
4883
4884 2017-10-03 Tom Tromey <tom@tromey.com>
4885
4886 * top.c (gdb_safe_append_history): Use std::string.
4887
4888 2017-10-03 Tom Tromey <tom@tromey.com>
4889
4890 * event-top.c (stdin_event_handler): Update.
4891 * main.c (captured_main_1): Update.
4892 * top.h (make_delete_ui_cleanup): Remove.
4893 (struct ui): Add constructor and destructor.
4894 (new_ui, delete_ui): Remove.
4895 * top.c (make_delete_ui_cleanup): Remove.
4896 (new_ui_command): Use std::unique_ptr.
4897 (delete_ui_cleanup): Remove.
4898 (ui::ui): Rename from new_ui. Update.
4899 (free_ui): Remove.
4900 (ui::~ui): Rename from delete_ui. Update.
4901
4902 2017-10-03 Tom Tromey <tom@tromey.com>
4903
4904 * symfile.c (load_progress): Use gdb::byte_vector.
4905
4906 2017-10-03 Tom Tromey <tom@tromey.com>
4907
4908 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4909 declaration.
4910 * printcmd.c (x_command): Remove unused declaration.
4911 * symfile.c (symbol_file_command): Remove unused declaration.
4912
4913 2017-10-03 Tom Tromey <tom@tromey.com>
4914
4915 * utils.c (internal_vproblem): Use std::string.
4916 (defaulted_query): Likewise.
4917
4918 2017-10-03 Tom Tromey <tom@tromey.com>
4919
4920 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4921 * top.c (execute_command_to_string): Update.
4922 * utils.c (make_cleanup_restore_page_info): Remove.
4923 (do_restore_page_info_cleanup): Remove.
4924 (set_batch_flag_and_restore_page_info):
4925 New.
4926 (make_cleanup_restore_page_info): Remove.
4927 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4928 (~set_batch_flag_and_restore_page_info): New
4929 (make_cleanup_restore_uinteger): Remove.
4930 (make_cleanup_restore_integer): Remove.
4931 (struct restore_integer_closure): Remove.
4932 (restore_integer): Remove.
4933 * utils.h (struct set_batch_flag_and_restore_page_info): New
4934 class.
4935 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4936 (make_cleanup_restore_page_info): Remove.
4937 (make_cleanup_restore_uinteger) Remove.
4938 (make_cleanup_restore_integer) Remove.
4939
4940 2017-10-03 Tom Tromey <tom@tromey.com>
4941
4942 * record-full.h (record_full_gdb_operation_disable_set): Return
4943 scoped_restore_tmpl<int>.
4944 * infrun.c (adjust_pc_after_break): Update.
4945 (handle_signal_stop): Update.
4946 * record-full.c (record_full_gdb_operation_disable_set): Return
4947 scoped_restore_tmpl<int>.
4948 (record_full_wait_1, record_full_insert_breakpoint)
4949 (record_full_remove_breakpoint, record_full_save)
4950 (record_full_goto_insn): Update.
4951
4952 2017-10-02 Tom Tromey <tom@tromey.com>
4953
4954 PR rust/22236:
4955 * rust-lang.c (rust_val_print_str): New function.
4956 (val_print_struct): Call it.
4957 (rust_subscript): Preserve name of slice type.
4958
4959 2017-10-02 Tom Tromey <tom@tromey.com>
4960
4961 * rust-lang.c (rust_subscript): Handle slices in
4962 EVAL_AVOID_SIDE_EFFECTS case.
4963
4964 2017-10-02 Tom Tromey <tom@tromey.com>
4965
4966 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4967
4968 2017-10-02 Tom Tromey <tom@tromey.com>
4969
4970 * rust-lang.h (rust_slice_type): Add "extern".
4971
4972 2017-10-02 Tom Tromey <tom@tromey.com>
4973 Pedro Alves <palves@redhat.com>
4974
4975 * ada-lang.h (ada_exc_info::operator<): Make const.
4976 (ada_exc_info::operator==): Make const.
4977 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4978 Make const.
4979
4980 2017-09-29 Tom Tromey <tom@tromey.com>
4981
4982 * target.c (read_whatever_is_readable): Change type of "result".
4983 Update.
4984 (free_memory_read_result_vector): Remove.
4985 (read_memory_robust): Change return type. Update.
4986 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4987 bin2hex, std::string.
4988 * target.h (memory_read_result_s): Remove typedef.
4989 (free_memory_read_result_vector): Remove.
4990 (read_memory_robust): Return std::vector.
4991
4992 2017-09-29 Tom Tromey <tom@tromey.com>
4993
4994 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4995
4996 2017-09-29 Tom Tromey <tom@tromey.com>
4997
4998 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4999 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5000 operator< and operator==.
5001 (ada_exceptions_list): Return a std::vector.
5002 * ada-lang.c (ada_exc_info::operator<): Rename from
5003 compare_ada_exception_info.
5004 (ada_exc_info::operator==): New.
5005 (sort_remove_dups_ada_exceptions_list): Change type of
5006 "exceptions".
5007 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5008 (ada_add_global_exceptions): Likewise.
5009 (ada_exceptions_list_1): Return a std::vector.
5010 (ada_exceptions_list): Likewise.
5011
5012 2017-09-29 Tom Tromey <tom@tromey.com>
5013
5014 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5015 'std::set *'.
5016 (print_one_inferior): Update.
5017 (free_vector_of_ints): Remove.
5018 (list_available_thread_groups): Change "ids" to std::set.
5019 (mi_cmd_list_thread_groups): Update.
5020 (struct collect_cores_data) <core>: Now a std::set.
5021 (collect_cores): Update.
5022 (unique): Remove.
5023 (print_one_inferior): Update.
5024
5025 2017-09-29 Tom Tromey <tom@tromey.com>
5026
5027 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5028 (mi_execute_async_cli_command): Likewise.
5029 (mi_cmd_trace_frame_collected): Use field_fmt.
5030
5031 2017-09-29 Tom Tromey <tom@tromey.com>
5032
5033 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5034 gdb::byte_vector.
5035
5036 2017-09-29 Tom Tromey <tom@tromey.com>
5037
5038 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5039
5040 2017-09-29 Tom Tromey <tom@tromey.com>
5041
5042 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5043
5044 2017-09-29 Tom Tromey <tom@tromey.com>
5045
5046 * varobj.h (varobj_gen_name): Return std::string.
5047 * varobj.c (varobj_gen_name): Return std::string.
5048 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5049 (mi_cmd_var_delete): Don't copy "name".
5050
5051 2017-09-29 Tom Tromey <tom@tromey.com>
5052
5053 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5054 (mi_cmd_break_insert_1): Update.
5055
5056 2017-09-29 Tom Tromey <tom@tromey.com>
5057
5058 * target.h (make_scoped_defer_target_commit_resume): Update.
5059 * target.c (make_scoped_defer_target_commit_resume): Rename from
5060 make_cleanup_defer_target_commit_resume. Return a
5061 scoped_restore.
5062 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5063
5064 2017-09-29 Tom Tromey <tom@tromey.com>
5065
5066 * main.c (captured_main_1): Remove unused declaration.
5067 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5068
5069 2017-09-29 Tom Tromey <tom@tromey.com>
5070
5071 * symtab.c (search_symbols): Remove unused outer cleanup.
5072 (make_source_files_completion_list): Remove unused declaration.
5073
5074 2017-09-29 Tom Tromey <tom@tromey.com>
5075
5076 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5077
5078 2017-09-29 Tom Tromey <tom@tromey.com>
5079
5080 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5081 gdb::byte_vector.
5082
5083 2017-09-29 Tom Tromey <tom@tromey.com>
5084
5085 * complaints.c (vcomplaint): Use std::string.
5086
5087 2017-09-29 Tom Tromey <tom@tromey.com>
5088
5089 * tracepoint.c (trace_variable_command): Use std::string.
5090 (encode_actions_1): Remove unused declarations.
5091 (create_tsv_from_upload): Use std::string.
5092
5093 2017-09-29 Tom Tromey <tom@tromey.com>
5094
5095 * cp-support.c (gdb_demangle): Use std::string.
5096
5097 2017-09-29 Tom Tromey <tom@tromey.com>
5098
5099 * stack.c (parse_frame_specification): Use std::string
5100 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5101
5102 2017-09-29 Tom Tromey <tom@tromey.com>
5103
5104 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5105
5106 2017-09-29 Tom Tromey <tom@tromey.com>
5107
5108 * utils.c (vfprintf_maybe_filtered): Use std::string.
5109 (vfprintf_unfiltered): Likewise.
5110
5111 2017-09-29 Tom Tromey <tom@tromey.com>
5112
5113 * event-top.c (top_level_prompt): Return std::string.
5114 (display_gdb_prompt): Update.
5115
5116 2017-09-29 Tom Tromey <tom@tromey.com>
5117
5118 * unittests/common-utils-selftests.c (format): New function.
5119 (string_vprintf_tests): New function.
5120 (_initialize_common_utils_selftests): Register new tests.
5121 * common/common-utils.c (string_vprintf): New function.
5122 * common/common-utils.h (string_vprintf): Declare.
5123
5124 2017-09-29 Pedro Alves <palves@redhat.com>
5125
5126 * common/rsp-low.c (unpack_varlen_hex): Constify.
5127 * common/rsp-low.h (unpack_varlen_hex): Constify.
5128 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5129 Constify.
5130 * remote.c (remote_set_permissions, read_ptid)
5131 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5132 (remote_static_tracepoint_marker_at)
5133 (remote_static_tracepoint_markers_by_strid)
5134 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5135 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5136 (parse_tracepoint_definition, parse_tsv_definition)
5137 (parse_static_tracepoint_marker_definition): Constify.
5138 * tracepoint.h (parse_static_tracepoint_marker_definition)
5139 (parse_trace_status, parse_tracepoint_status)
5140 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5141
5142 2017-09-29 Pedro Alves <palves@redhat.com>
5143
5144 * remote.c (target_buf, target_buf_size): Delete.
5145 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5146 Use the connection's packet buffer instead.
5147 All callers adjusted.
5148 (_initialize_remote): Remove references to target_buf and
5149 target_buf_size.
5150
5151 2017-09-28 Pedro Alves <palves@redhat.com>
5152
5153 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5154 unittests/common-utils-selftests.c.
5155 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5156 (COMMON_OBS): Remove utils-selftests.o.
5157 * utils-selftests.c: Move to ...
5158 * unittests/common-utils-selftests.c: ... here and rename self
5159 test to "string_printf".
5160
5161 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5162
5163 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5164 having NULL cus or tus.
5165
5166 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5167
5168 * arm-tdep.c: (convert_from_extended): Remove.
5169 (convert_to_extended): Likewise.
5170 (arm_extract_return_value): Use convert_typed_floating.
5171 (arm_store_return_value): Likewise.
5172
5173 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5174 * sh-tdep.c: Do not include "floatformat.h".
5175 (sh_littlebyte_bigword_type): New function.
5176 (sh_register_convert_to_virtual): Use convert_typed_floating.
5177 (sh_register_convert_to_raw): Likewise.
5178 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5179 (sh64_littlebyte_bigword_type): New function.
5180 (sh64_extract_return_value): Use convert_typed_floating.
5181 (sh64_register_convert_to_virtual): Likewise.
5182 (sh64_register_convert_to_raw): Likewise.
5183
5184 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5185
5186 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5187 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5188
5189 * gdbtypes.h (union type_specific): Make field floatformat hold
5190 just a single struct floatformat, not an array.
5191 (floatformat_from_type): Move here.
5192 * gdbtypes.c (floatformat_from_type): Move here. Update to
5193 changed TYPE_FLOATFORMAT definition.
5194 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5195 (recursive_dump_type): Likewise.
5196 (init_float_type): Install correct floatformat for byte order.
5197 (arch_float_type): Likewise.
5198
5199 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5200
5201 * gdbtypes.c (init_type): Change incoming argument from
5202 length-in-bytes to length-in-bits. Assert length is a
5203 multiple of TARGET_CHAR_BITS.
5204 (arch_type, arch_flags_type): Likewise.
5205 (init_integer_type): Update call to init_type.
5206 (init_character_type): Likewise.
5207 (init_boolean_type): Likewise.
5208 (init_float_type): Likewise.
5209 (init_decfloat_type): Likewise.
5210 (init_complex_type): Likewise.
5211 (init_pointer_type): Likewise.
5212 (objfile_type): Likewise.
5213 (arch_integer_type): Update call to arch_type.
5214 (arch_character_type): Likewise.
5215 (arch_boolean_type): Likewise.
5216 (arch_float_type): Likewise.
5217 (arch_decfloat_type): Likewise.
5218 (arch_complex_type): Likewise.
5219 (arch_pointer_type): Likewise.
5220 (gdbtypes_post_init): Likewise.
5221
5222 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5223 (read_base_type): Likewise.
5224 * mdebugread.c (basic_type): Likewise.
5225 * stabsread.c (dbx_init_float_type): Likewise.
5226 (rs6000_builtin_type): Likewise.
5227 (read_range_type): Likewise. Also, fix call to init_integer_type
5228 with erroneous length argument.
5229
5230 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5231 * d-lang.c (build_d_types): Likewise.
5232 * f-lang.c (build_fortran_types): Likewise.
5233 * go-lang.c (build_go_types): Likewise.
5234 * opencl-lang.c (build_opencl_types): Likewise.
5235 * jit.c (finalize_symtab): Likewise.
5236 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5237 (build_std_type_info_type): Likewise.
5238 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5239 update call to arch_flags_type.
5240
5241 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5242 arch_type.
5243 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5244 * windows-tdep.c (windows_get_tlb_type): Likewise.
5245
5246 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5247 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5248 * m32c-tdep.c (make_types): Likewise.
5249 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5250 (rl78_psw_type): Update call to arch_flags_type.
5251 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5252 * rx-tdep.c (rx_psw_type): Likewise.
5253 (rx_fpsw_type): Likewise.
5254 * sparc-tdep.c (sparc_psr_type): Likewise.
5255 (sparc_fsr_type): Likewise.
5256 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5257 (sparc64_ccr_type): Likewise.
5258 (sparc64_fsr_type): Likewise.
5259 (sparc64_fprs_type): Likewise.
5260
5261 2017-09-27 Tom Tromey <tom@tromey.com>
5262
5263 * findcmd.c (find_command): Constify.
5264
5265 2017-09-27 Tom Tromey <tom@tromey.com>
5266
5267 * ada-tasks.c (task_command_1, task_command): Constify.
5268
5269 2017-09-27 Tom Tromey <tom@tromey.com>
5270
5271 * symtab.c (maintenance_print_symbol_cache)
5272 (maintenance_flush_symbol_cache)
5273 (maintenance_print_symbol_cache_statistics): Constify.
5274
5275 2017-09-27 Tom Tromey <tom@tromey.com>
5276
5277 * inferior.c (detach_inferior_command, kill_inferior_command)
5278 (inferior_command): Constify.
5279
5280 2017-09-27 Tom Tromey <tom@tromey.com>
5281
5282 * regcache.c (regcache_print, maintenance_print_registers)
5283 (maintenance_print_raw_registers)
5284 (maintenance_print_cooked_registers)
5285 (maintenance_print_register_groups)
5286 (maintenance_print_remote_registers): Constify.
5287
5288 2017-09-27 Tom Tromey <tom@tromey.com>
5289
5290 * printcmd.c (map_display_numbers, undisplay_command)
5291 (enable_disable_display_command, enable_display_command)
5292 (disable_display_command): Constify.
5293
5294 2017-09-27 Tom Tromey <tom@tromey.com>
5295
5296 * breakpoint.h (delete_command): Don't declare.
5297 * breakpoint.c (delete_command, enable_once_command)
5298 (enable_count_command, enable_delete_command, breakpoint_1)
5299 (maintenance_info_breakpoints, stopin_command, stopat_command)
5300 (delete_command, delete_trace_command, save_breakpoints)
5301 (save_breakpoints_command, save_tracepoints_command): Constify.
5302
5303 2017-09-27 Tom Tromey <tom@tromey.com>
5304
5305 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5306 (skip_ws, extract_identifier, macro_define_command)
5307 (macro_undef_command, macro_list_command): Constify.
5308
5309 2017-09-27 Tom Tromey <tom@tromey.com>
5310
5311 * infcmd.c (environment_info, set_environment_command)
5312 (unset_environment_command, path_info, info_proc_cmd_1)
5313 (info_proc_cmd_mappings, info_proc_cmd_stat)
5314 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5315 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5316
5317 2017-09-27 Tom Tromey <tom@tromey.com>
5318
5319 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5320 Constify.
5321
5322 2017-09-27 Tom Tromey <tom@tromey.com>
5323
5324 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5325
5326 2017-09-27 Tom Tromey <tom@tromey.com>
5327
5328 * demangle.c (demangle_command): Constify.
5329
5330 2017-09-27 Tom Tromey <tom@tromey.com>
5331
5332 * progspace.c (maintenance_info_program_spaces_command):
5333 Constify.
5334
5335 2017-09-27 Tom Tromey <tom@tromey.com>
5336
5337 * compile/compile.c (check_raw_argument, compile_file_command)
5338 (compile_code_command, compile_print_command): Constify.
5339
5340 2017-09-27 Tom Tromey <tom@tromey.com>
5341
5342 * reggroups.c (maintenance_print_reggroups): Constify.
5343
5344 2017-09-27 Tom Tromey <tom@tromey.com>
5345
5346 * dwarf2read.c (save_gdb_index_command): Constify.
5347
5348 2017-09-27 Tom Tromey <tom@tromey.com>
5349
5350 * stap-probe.c (info_probes_stap_command): Constify.
5351
5352 2017-09-27 Tom Tromey <tom@tromey.com>
5353
5354 * fork-child.c (unset_exec_wrapper_command): Constify.
5355
5356 2017-09-27 Tom Tromey <tom@tromey.com>
5357
5358 * btrace.c (get_uint, get_context_size, no_chunk)
5359 (maint_btrace_packet_history_cmd)
5360 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5361 (maint_info_btrace_cmd): Constify.
5362
5363 2017-09-27 Tom Tromey <tom@tromey.com>
5364
5365 * reverse.c (delete_bookmark_command): Constify.
5366
5367 2017-09-27 Tom Tromey <tom@tromey.com>
5368
5369 * remote.c (set_memory_packet_size)
5370 (set_memory_write_packet_size, show_memory_write_packet_size)
5371 (set_memory_read_packet_size, show_memory_read_packet_size)
5372 (compare_sections_command, packet_command, remote_put_command)
5373 (remote_get_command, remote_delete_command): Constify.
5374
5375 2017-09-27 Tom Tromey <tom@tromey.com>
5376
5377 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5378 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5379 (set_mipsfpu_auto_command): Constify.
5380
5381 2017-09-27 Tom Tromey <tom@tromey.com>
5382
5383 * cli/cli-cmds.h (cd_command): Constify.
5384 * cli/cli-cmds.c (cd_command): Constify.
5385
5386 2017-09-27 Tom Tromey <tom@tromey.com>
5387
5388 * thread.c (thread_name_command, thread_find_command): Constify.
5389
5390 2017-09-27 Tom Tromey <tom@tromey.com>
5391
5392 * probe.c (enable_probes_command, disable_probes_command):
5393 Constify.
5394
5395 2017-09-27 Tom Tromey <tom@tromey.com>
5396
5397 * symfile.c (symbol_file_command): Constify.
5398 * gdbcore.h (deprecated_file_changed_hook): Constify.
5399 * exec.c (deprecated_file_changed_hook, exec_file_command)
5400 (file_command): Constify.
5401 * defs.h (symbol_file_command): Constify.
5402
5403 2017-09-27 Tom Tromey <tom@tromey.com>
5404
5405 * remote-fileio.c (set_system_call_allowed)
5406 (show_system_call_allowed): Constify.
5407
5408 2017-09-27 Tom Tromey <tom@tromey.com>
5409
5410 * tracepoint.c (delete_trace_variable_command)
5411 (tfind_end_command, tfind_start_command, tfind_pc_command)
5412 (tfind_tracepoint_command, tfind_line_command)
5413 (tfind_range_command, tfind_outside_command): Constify.
5414
5415 2017-09-27 Tom Tromey <tom@tromey.com>
5416
5417 * ax-gdb.c (maint_agent_printf_command, agent_command)
5418 (agent_eval_command): Constify.
5419
5420 2017-09-27 Tom Tromey <tom@tromey.com>
5421
5422 * tracepoint.c (info_scope_command): Constify.
5423 * python/python.c (gdbpy_decode_line): Constify.
5424 * python/py-breakpoint.c (bppy_init): Constify.
5425 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5426 * location.h: (new_linespec_location)
5427 (string_to_event_location_basic, string_to_event_location):
5428 Constify.
5429 * location.c (new_linespec_location)
5430 (string_to_event_location_basic, string_to_event_location):
5431 Constify.
5432 * linespec.h (decode_line_with_current_source)
5433 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5434 * linespec.c (linespec_lex_to_end)
5435 (decode_line_with_current_source)
5436 (decode_line_with_last_displayed): Constify.
5437 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5438 Constify.
5439 * cli/cli-cmds.c (edit_command, list_command): Constify.
5440 * breakpoint.h (until_break_command, watch_command_wrapper)
5441 (awatch_command_wrapper, rwatch_command_wrapper)
5442 (init_ada_exception_breakpoint): Constify.
5443 * breakpoint.c (break_command_1, dprintf_command)
5444 (break_range_command, watch_command_wrapper)
5445 (rwatch_command_wrapper, awatch_command_wrapper)
5446 (until_break_command, init_ada_exception_breakpoint)
5447 (strace_marker_create_sals_from_location, trace_command)
5448 (ftrace_command, strace_command, struct tracepoint): Constify.
5449 * ax-gdb.c (agent_command_1): Constify.
5450 * ada-lang.c (ada_exception_sal): Constify.
5451
5452 2017-09-27 Tom Tromey <tom@tromey.com>
5453
5454 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5455 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5456 (get_context_size, no_chunk, get_insn_history_modifiers)
5457 (cmd_record_insn_history, get_call_history_modifiers)
5458 (cmd_record_call_history): Constify.
5459
5460 2017-09-27 Tom Tromey <tom@tromey.com>
5461
5462 * source.c (show_substitute_path_command)
5463 (unset_substitute_path_command, set_substitute_path_command):
5464 Constify.
5465
5466 2017-09-27 Tom Tromey <tom@tromey.com>
5467
5468 * typeprint.c (maintenance_print_type): Constify.
5469 * maint.c (maintenance_dump_me, maintenance_demangle)
5470 (maintenance_time_display, maintenance_info_sections)
5471 (maintenance_print_statistics, maintenance_deprecate)
5472 (maintenance_undeprecate): Constify.
5473 (maintenance_do_deprecate): Constify. Use std::string.
5474 (maintenance_selftest): Constify.
5475 * gdbtypes.h (maintenance_print_type): Constify.
5476
5477 2017-09-27 Tom Tromey <tom@tromey.com>
5478
5479 * hppa-tdep.c (unwind_command): Constify.
5480
5481 2017-09-27 Tom Tromey <tom@tromey.com>
5482
5483 * target-descriptions.c (unset_tdesc_filename_cmd)
5484 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5485 Constify.
5486
5487 2017-09-27 Tom Tromey <tom@tromey.com>
5488
5489 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5490
5491 2017-09-27 Tom Tromey <tom@tromey.com>
5492
5493 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5494
5495 2017-09-27 Tom Tromey <tom@tromey.com>
5496
5497 * tui/tui-regs.c (tui_reg_command): Constify.
5498
5499 2017-09-27 Tom Tromey <tom@tromey.com>
5500
5501 * skip.c (skip_file_command, skip_function_command)
5502 (skip_enable_command, skip_disable_command, skip_delete_command):
5503 Constify.
5504
5505 2017-09-27 Tom Tromey <tom@tromey.com>
5506
5507 * record-btrace.c (cmd_record_btrace_bts_start)
5508 (cmd_record_btrace_pt_start): Constify.
5509
5510 2017-09-27 Tom Tromey <tom@tromey.com>
5511
5512 * symmisc.c (maintenance_print_symbols)
5513 (maintenance_print_msymbols, maintenance_print_objfiles)
5514 (maintenance_info_symtabs, maintenance_check_symtabs)
5515 (maintenance_expand_symtabs, maintenance_info_line_tables):
5516 Constify.
5517
5518 2017-09-27 Tom Tromey <tom@tromey.com>
5519
5520 * top.c (new_ui_command): Constify.
5521
5522 2017-09-27 Tom Tromey <tom@tromey.com>
5523
5524 * symfile.c (add_symbol_file_command)
5525 (remove_symbol_file_command, list_overlays_command)
5526 (map_overlay_command, unmap_overlay_command)
5527 (overlay_auto_command, overlay_manual_command)
5528 (overlay_off_command, overlay_load_command): Constify.
5529
5530 2017-09-27 Tom Tromey <tom@tromey.com>
5531
5532 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5533 (info_spu_mailbox_command, info_spu_dma_command)
5534 (info_spu_proxydma_command): Constify.
5535
5536 2017-09-27 Tom Tromey <tom@tromey.com>
5537
5538 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5539
5540 2017-09-27 Tom Tromey <tom@tromey.com>
5541
5542 * cli/cli-script.c (user_defined_command): Constify.
5543
5544 2017-09-27 Tom Tromey <tom@tromey.com>
5545
5546 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5547 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5548 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5549 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5550 (dump_binary_value, append_binary_memory, append_binary_value):
5551 Constify.
5552 (struct dump_context) <func>: Constify.
5553 (add_dump_command): Update.
5554
5555 2017-09-27 Tom Tromey <tom@tromey.com>
5556
5557 * cli/cli-cmds.c (show_version, show_configuration)
5558 (source_command, show_user): Constify.
5559
5560 2017-09-27 Tom Tromey <tom@tromey.com>
5561
5562 * target.c (maintenance_print_target_stack): Constify.
5563
5564 2017-09-27 Tom Tromey <tom@tromey.com>
5565
5566 * interps.c (interpreter_exec_cmd): Constify.
5567
5568 2017-09-27 Tom Tromey <tom@tromey.com>
5569
5570 * record-full.c (cmd_record_full_restore): Constify.
5571
5572 2017-09-27 Tom Tromey <tom@tromey.com>
5573
5574 * memattr.c (enable_mem_command, disable_mem_command)
5575 (delete_mem_command): Constify.
5576
5577 2017-09-27 Tom Tromey <tom@tromey.com>
5578
5579 * value.c (show_convenience): Constify.
5580
5581 2017-09-27 Tom Tromey <tom@tromey.com>
5582
5583 * gdbcore.h (core_file_command): Update.
5584 * corefile.c (core_file_command): Constify.
5585
5586 2017-09-27 Tom Tromey <tom@tromey.com>
5587
5588 * user-regs.c (maintenance_print_user_registers): Constify.
5589
5590 2017-09-27 Tom Tromey <tom@tromey.com>
5591
5592 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5593
5594 2017-09-27 Tom Tromey <tom@tromey.com>
5595
5596 * cp-support.c (first_component_command): Constify.
5597
5598 2017-09-27 Tom Tromey <tom@tromey.com>
5599
5600 * psymtab.c (maintenance_print_psymbols)
5601 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5602 Constify.
5603
5604 2017-09-27 Tom Tromey <tom@tromey.com>
5605
5606 * windows-tdep.c (display_tib): Constify.
5607
5608 2017-09-27 Tom Tromey <tom@tromey.com>
5609
5610 * linux-fork.c (delete_checkpoint_command)
5611 (detach_checkpoint_command): Constify.
5612
5613 2017-09-27 Tom Tromey <tom@tromey.com>
5614
5615 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5616
5617 2017-09-27 Tom Tromey <tom@tromey.com>
5618
5619 * arc-tdep.c (dump_arc_instruction_command): Constify.
5620
5621 2017-09-27 Tom Tromey <tom@tromey.com>
5622
5623 * valprint.c (set_radix, show_radix): Constify.
5624
5625 2017-09-27 Tom Tromey <tom@tromey.com>
5626
5627 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5628
5629 2017-09-27 Tom Tromey <tom@tromey.com>
5630
5631 * command.h (not_just_help_class_command): Update.
5632 * cli/cli-decode.h (not_just_help_class_command): Update.
5633 * cli/cli-decode.c (not_just_help_class_command): Constify.
5634
5635 2017-09-27 Tom Tromey <tom@tromey.com>
5636
5637 * gdb_bfd.c (maintenance_info_bfds): Constify.
5638
5639 2017-09-27 Tom Tromey <tom@tromey.com>
5640
5641 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5642 overloads.
5643 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5644 (do_const_cfunc): New function.
5645 (cmd_cfunc_eq): New overload.
5646 (cli_user_command_p): Check do_const_cfunc.
5647 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5648 const_cfunc.
5649 * command.h (add_cmd): Add const overload and no-function
5650 overload.
5651 (set_cmd_cfunc): Add const overload.
5652 (cmd_const_cfunc_ftype): Declare.
5653 (cmd_cfunc_eq): Add const overload.
5654 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5655 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5656 overload.
5657
5658 2017-09-27 Tom Tromey <tom@tromey.com>
5659
5660 * macroexp.c (get_next_token_for_substitution): New function.
5661 (substitute_args): Call it. Check for __VA_OPT__.
5662
5663 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5664 Pedro Alves <palves@redhat.com>
5665
5666 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5667 producer_is_icc_lt_14.
5668 (producer_is_icc_lt_14): New function.
5669 (check_producer): Add code for checking version of ICC.
5670 (producer_is_icc): Move to producer.c.
5671 (read_structure_type): Restrict ICC workaround to ICC<14.
5672 * producer.c: Include selftest.h.
5673 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5674 New functions.
5675 * producer.h (producer_is_icc): New declaration.
5676
5677 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5678
5679 * Makefile.in (SFILES): Add producer.c.
5680 (COMMON_OBS): Add producer.o
5681 * amd64-tdep.c (producer.h): Add new include.
5682 * dwarf2read.c (producer.h): Add new include.
5683 * producer.c: New file.
5684 * producer.h: New file.
5685 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5686 producer.c.
5687 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5688 producer.h.
5689
5690 2017-09-26 Matthias Klose <doko@ubuntu.com>
5691
5692 * configure.ac: Search ncursesw before ncurses.
5693 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5694 * gdb_curses.h: Include <ncursesw/ncurses.h>
5695 * config.in, configure: Regenerate.
5696
5697 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5698
5699 PR gdb/22185
5700 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5701 obsolete.
5702 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5703 Remove i386sol2 support.
5704 * configure.nat <i386sol2>: Remove.
5705 <sol2-64>: Fold into ...
5706 <sol2>: ... this.
5707 Move common settings to default section.
5708 Add sol-thread.o.
5709 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5710 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5711 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5712 <i[34567]86-*-solaris*>: Remove.
5713 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5714
5715 * configure.ac: Remove wctype in libw check.
5716 (_MSE_INT_H): Don't define on Solaris 7-9.
5717 <solaris*>: Remove libthread_db.so.1 check.
5718 * configure: Regenerate.
5719 * config.in: Regenerate.
5720
5721 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5722 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5723 (gdb_ps_size_t): Remove.
5724 Use base types in users.
5725 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5726
5727 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5728
5729 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5730
5731 PR build/22206
5732 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5733 (adi_is_addr_mapped): Likewise.
5734 (PSR_ICC): Don't redefine.
5735 (PSR_IMPL): Likewise.
5736
5737 2017-09-25 Tom Tromey <tom@tromey.com>
5738
5739 * regcache.c (regcache::dump): Use string_printf.
5740
5741 2017-09-25 Tom Tromey <tom@tromey.com>
5742
5743 * regcache.c (class regcache_invalidator): New.
5744 (struct register_to_invalidate): Remove.
5745 (make_cleanup_regcache_invalidate): Remove.
5746 (regcache::raw_write): Use regcache_invalidator.
5747
5748 2017-09-25 Tom Tromey <tom@tromey.com>
5749
5750 * spu-tdep.c (spu2ppu_sniffer): Update.
5751 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5752 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5753 Remove.
5754 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5755 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5756 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5757 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5758 (frame_pop): Update.
5759
5760 2017-09-25 Tom Tromey <tom@tromey.com>
5761
5762 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5763 * regcache.h (regcache_xfree): Don't declare.
5764 * regcache.c (regcache_xfree): Remove.
5765 (do_regcache_xfree): Use delete.
5766 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5767 * linux-fork.c (free_fork): Use delete.
5768 (fork_save_infrun_state): Likewise.
5769 * jit.c (jit_dealloc_cache): Use delete.
5770 * infrun.c (discard_infcall_suspend_state): Use delete.
5771
5772 2017-09-25 Tom Tromey <tom@tromey.com>
5773
5774 * regcache.h (regcache_xmalloc): Don't declare.
5775 (regcache_raw_set_cached_value): Update comment.
5776 * regcache.c (regcache_xmalloc): Remove.
5777 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5778 * jit.c (jit_frame_sniffer): Use new.
5779 * frame.c (frame_save_as_regcache): Use new.
5780
5781 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5782
5783 * NEWS: Advertise support for guarded-storage registers on IBM z.
5784
5785 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5786
5787 * s390-linux-nat.c (have_regset_gs): New static variable.
5788 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5789 control block and guarded-storage broadcast control regsets.
5790 (s390_read_description): Detect whether the target has
5791 guarded-storage support, return appropriate tdesc.
5792 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5793 (features/s390x-gs-linux64.c): Likewise.
5794 (struct gdbarch_tdep) <have_gs>: New field.
5795 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5796 (s390_gsbc_regset): New variables.
5797 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5798 and s390_gsbc_regset, if applicable.
5799 (s390_core_read_description): Check whether core file was from a
5800 target with guarded-storage support; include appropriate regsets.
5801 (s390_gdbarch_init): Add registers for guarded-storage support.
5802 (_initialize_s390_tdep): Initialize new target descriptions that
5803 include registers for guarded-storage support.
5804 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5805 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5806 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5807 (S390_NUM_REGS): Adjust macro definition.
5808 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5809 (tdesc_s390x_gs_linux64): New declarations.
5810
5811 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5812
5813 * features/s390-gs-linux64.xml: New file.
5814 * features/s390-gs.xml: New file.
5815 * features/s390-gsbc.xml: New file.
5816 * features/s390x-gs-linux64.xml: New file.
5817 * features/Makefile (WHICH): Add s390-gs-linux64 and
5818 s390x-gs-linux64.
5819 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5820 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5821 * features/s390-gs-linux64.c: New generated file.
5822 * features/s390x-gs-linux64.c: New file.
5823 * regformats/s390-gs-linux64.dat: New file.
5824 * regformats/s390x-gs-linux64.dat: New file.
5825
5826 2017-09-23 Tom Tromey <tom@tromey.com>
5827
5828 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5829
5830 2017-09-22 Tom Tromey <tom@tromey.com>
5831
5832 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5833 type to scoped_restore_tmpl.
5834 <scoped_input_handler>: Initialize m_quit_handler directly.
5835
5836 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5837
5838 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5839 (cd_command): Likewise. Free "current_directory" before
5840 assigning to it.
5841 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5842 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5843 * top.c (gdb_dirbuf): Remove global declaration.
5844 * top.h (gdb_dirbuf): Likewise.
5845
5846 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5847
5848 * gnulib/aclocal.m4: Regenerate.
5849 * gnulib/config.in: Regenerate.
5850 * gnulib/configure: Regenerate.
5851 * gnulib/import/Makefile.am: Regenerate.
5852 * gnulib/import/Makefile.in: Regenerate.
5853 * gnulib/import/assure.h: New file.
5854 * gnulib/import/at-func.c: Likewise
5855 * gnulib/import/chdir-long.c: New file.
5856 * gnulib/import/chdir-long.h: New file.
5857 * gnulib/import/cloexec.c: New file.
5858 * gnulib/import/cloexec.h: New file.
5859 * gnulib/import/close.c: New file.
5860 * gnulib/import/closedir.c: New file.
5861 * gnulib/import/dirent-private.h: New file.
5862 * gnulib/import/dup-safer.c: New file.
5863 * gnulib/import/dup.c: New file.
5864 * gnulib/import/dup2.c: New file.
5865 * gnulib/import/error.c: New file.
5866 * gnulib/import/error.h: New file.
5867 * gnulib/import/exitfail.c: New file.
5868 * gnulib/import/exitfail.h: New file.
5869 * gnulib/import/fchdir.c: New file.
5870 * gnulib/import/fcntl.c: New file.
5871 * gnulib/import/fcntl.in.h: New file.
5872 * gnulib/import/fd-hook.c: New file.
5873 * gnulib/import/fd-hook.h: New file.
5874 * gnulib/import/fd-safer.c: New file.
5875 * gnulib/import/fdopendir.c: New file.
5876 * gnulib/import/filename.h: New file.
5877 * gnulib/import/filenamecat-lgpl.c: New file.
5878 * gnulib/import/filenamecat.h: New file.
5879 * gnulib/import/fstat.c: New file.
5880 * gnulib/import/fstatat.c: New file.
5881 * gnulib/import/getcwd-lgpl.c: New file.
5882 * gnulib/import/getcwd.c: New file.
5883 * gnulib/import/getdtablesize.c: New file.
5884 * gnulib/import/getlogin_r.c: New file.
5885 * gnulib/import/getprogname.c: New file.
5886 * gnulib/import/getprogname.h: New file.
5887 * gnulib/import/gettext.h: New file.
5888 * gnulib/import/glob-libc.h: New file.
5889 * gnulib/import/glob.c: New file.
5890 * gnulib/import/glob.in.h: New file.
5891 * gnulib/import/intprops.h: New file.
5892 * gnulib/import/m4/chdir-long.m4: New file.
5893 * gnulib/import/m4/close.m4: New file.
5894 * gnulib/import/m4/closedir.m4: New file.
5895 * gnulib/import/m4/d-ino.m4: New file.
5896 * gnulib/import/m4/d-type.m4: New file.
5897 * gnulib/import/m4/dup.m4: New file.
5898 * gnulib/import/m4/dup2.m4: New file.
5899 * gnulib/import/m4/error.m4: New file.
5900 * gnulib/import/m4/fchdir.m4: New file.
5901 * gnulib/import/m4/fcntl.m4: New file.
5902 * gnulib/import/m4/fcntl_h.m4: New file.
5903 * gnulib/import/m4/fdopendir.m4: New file.
5904 * gnulib/import/m4/filenamecat.m4: New file.
5905 * gnulib/import/m4/fstat.m4: New file.
5906 * gnulib/import/m4/fstatat.m4: New file.
5907 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5908 * gnulib/import/m4/getcwd-path-max.m4: New file.
5909 * gnulib/import/m4/getcwd.m4: New file.
5910 * gnulib/import/m4/getdtablesize.m4: New file.
5911 * gnulib/import/m4/getlogin_r.m4: New file.
5912 * gnulib/import/m4/getprogname.m4: New file.
5913 * gnulib/import/m4/glob.m4: New file.
5914 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5915 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5916 * gnulib/import/m4/mempcpy.m4: New file.
5917 * gnulib/import/m4/memrchr.m4: New file.
5918 * gnulib/import/m4/mode_t.m4: New file.
5919 * gnulib/import/m4/msvc-inval.m4: New file.
5920 * gnulib/import/m4/msvc-nothrow.m4: New file.
5921 * gnulib/import/m4/open.m4: New file.
5922 * gnulib/import/m4/openat.m4: New file.
5923 * gnulib/import/m4/opendir.m4: New file.
5924 * gnulib/import/m4/readdir.m4: New file.
5925 * gnulib/import/m4/realloc.m4: New file.
5926 * gnulib/import/m4/rewinddir.m4: New file.
5927 * gnulib/import/m4/save-cwd.m4: New file.
5928 * gnulib/import/m4/strdup.m4: New file.
5929 * gnulib/import/m4/strerror.m4: New file.
5930 * gnulib/import/m4/unistd-safer.m4: New file.
5931 * gnulib/import/mempcpy.c: New file.
5932 * gnulib/import/memrchr.c: New file.
5933 * gnulib/import/msvc-inval.c: New file.
5934 * gnulib/import/msvc-inval.h: New file.
5935 * gnulib/import/msvc-nothrow.c: New file.
5936 * gnulib/import/msvc-nothrow.h: New file.
5937 * gnulib/import/open.c: New file.
5938 * gnulib/import/openat-die.c: New file.
5939 * gnulib/import/openat-priv.h: New file.
5940 * gnulib/import/openat-proc.c: New file.
5941 * gnulib/import/openat.c: New file.
5942 * gnulib/import/openat.h: New file.
5943 * gnulib/import/opendir.c: New file.
5944 * gnulib/import/pipe-safer.c: New file.
5945 * gnulib/import/readdir.c: New file.
5946 * gnulib/import/realloc.c: New file.
5947 * gnulib/import/rewinddir.c: New file.
5948 * gnulib/import/save-cwd.c: New file.
5949 * gnulib/import/save-cwd.h: New file.
5950 * gnulib/import/strdup.c: New file.
5951 * gnulib/import/strerror-override.c: New file.
5952 * gnulib/import/strerror-override.h: New file.
5953 * gnulib/import/strerror.c: New file.
5954 * gnulib/import/unistd--.h: New file.
5955 * gnulib/import/unistd-safer.h: New file.
5956 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5957 "getcwd" and "glob".
5958 * ser-tcp.c: Undefine "close" before redefining it.
5959
5960 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5961
5962 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5963 get rid of res_val.
5964
5965 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5966
5967 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5968 <sol2,sparc>: Likewise.
5969 <sol2-64,i386>: Likewise.
5970
5971 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5972 -Wdeprecated-declarations on *-*-solaris*.
5973 * configure: Regenerate.
5974
5975 * procfs.c: Include "nat/inferior.h".
5976 (procfs_info_proc): Fix typo.
5977
5978 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5979
5980 * remote.c (vector): Include.
5981 (struct private_thread_info): Add field, thread_handle.
5982 (free_private_thread_info): Deallocate storage associated with
5983 thread handle.
5984 (get_private_info_thread): Initialize `thread_handle' field.
5985 (struct thread_item): Add field, thread_handle.
5986 (clear_threads_listing_context): Deallocate storage associated
5987 with thread handle.
5988 (start_thread): Add support for "handle" attribute.
5989 (thread_attributes): Add "handle".
5990 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5991 field.
5992 (remote_update_thread_list): Update thread_handle.
5993 (remote_thread_handle_to_thread_info): New function.
5994 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5995
5996 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5997
5998 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5999 function.
6000 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6001 * python/python-internal.h (thread_object_type): Declare.
6002
6003 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6004
6005 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6006 (target_thread_handle_to_thread_info): Declare.
6007 * target.c (target_thread_handle_to_thread_info): New function.
6008 * target-delegates.c: Regenerate.
6009 * gdbthread.h (find_thread_by_handle): Declare.
6010 * thread.c (find_thread_by_handle): New function.
6011 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6012 function.
6013 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6014
6015 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6016
6017 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6018
6019 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6020
6021 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6022
6023 2017-09-21 Yao Qi <yao.qi@linaro.org>
6024
6025 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6026 to gdb_target_obs.
6027
6028 2017-09-20 Tom Tromey <tom@tromey.com>
6029
6030 * breakpoint.c (struct counted_command_line): Remove.
6031 (breakpoint_commands): Update.
6032 (alloc_counted_command_line, incref_counted_command_line)
6033 (decref_counted_command_line, do_cleanup_counted_command_line)
6034 (make_cleanup_decref_counted_command_line): Remove.
6035 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6036 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6037 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6038 (save_breakpoints): Update.
6039 * breakpoint.h (counted_command_line): Now a typedef to
6040 shared_ptr.
6041 (struct breakpoint) <commands>: Now a counted_command_line.
6042 (struct bpstats) <command>: Likewise.
6043
6044 2017-09-20 Tom Tromey <tom@tromey.com>
6045
6046 * breakpoint.c (struct commands_info, do_map_commands_command):
6047 Remove.
6048 (commands_command_1): Update.
6049 (iterate_over_related_breakpoints): Take a function_view.
6050 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6051 (delete_command): Update.
6052 (map_breakpoint_numbers): Take a function_view.
6053 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6054 (disable_command): Update.
6055 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6056 (enable_command): Update.
6057 (struct disp_data, do_enable_breakpoint_disp)
6058 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6059 (do_map_enable_delete_breakpoint): Remove.
6060 (enable_once_command, enable_count_command, enable_delete_command)
6061 (delete_trace_variable_command): Update.
6062
6063 2017-09-20 Tom Tromey <tom@tromey.com>
6064
6065 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6066 (bpstat_clear): Use delete.
6067 (bpstats): New constructors.
6068 (bpstat_copy, bpstat_stop_status): Use new.
6069 (dprintf_after_condition_true): Update.
6070 * breakpoint.h (bpstats::bpstats): Add constructors.
6071 (bpstats::~bpstats): Add destructor.
6072
6073 2017-09-20 Pedro Alves <palves@redhat.com>
6074
6075 * eval.c (make_params): Delete, refactored as ...
6076 (class fake_method): ... this new type's ctor.
6077 (fake_method::~fake_method): New.
6078 (evaluate_subexp_standard): Use 'fake_method'.
6079
6080 2017-09-20 Tom Tromey <tom@tromey.com>
6081
6082 * windows-nat.c (get_windows_debug_event, windows_wait)
6083 (do_initial_windows_stuff, windows_attach): Update.
6084 * utils.c (vwarning, internal_vproblem): Update.
6085 (ui_unregister_input_event_handler_cleanup)
6086 (prepare_to_handle_input): Remove.
6087 (class scoped_input_handler): New.
6088 (defaulted_query, prompt_for_continue): Update.
6089 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6090 Update.
6091 * top.c (undo_terminal_modifications_before_exit): Update.
6092 * target/target.h (target_terminal_init, target_terminal_inferior)
6093 (target_terminal_ours): Don't declare.
6094 (class target_terminal): New.
6095 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6096 (target_terminal_ours_for_output)
6097 (make_cleanup_restore_target_terminal): Don't declare.
6098 (target_terminal_info): Remove.
6099 * target.c (enum terminal_state, terminal_state): Remove.
6100 (target_terminal::terminal_state): Define.
6101 (target_terminal::init): Rename from target_terminal_init.
6102 (target_terminal::inferior): Rename from
6103 target_terminal_inferior.
6104 (target_terminal::ours): Rename from target_terminal_ours.
6105 (target_terminal::ours_for_output): Rename from
6106 target_terminal_ours_for_output.
6107 (target_terminal::info): New method.
6108 (cleanup_restore_target_terminal)
6109 (make_cleanup_restore_target_terminal): Remove.
6110 * solib.c (handle_solib_event): Update.
6111 * remote.c (remote_serial_quit_handler): Update.
6112 (remote_terminal_inferior, remote_wait_as): Update.
6113 * record-full.c (record_full_wait_1): Update.
6114 * nto-procfs.c (procfs_create_inferior): Update.
6115 * nat/fork-inferior.c (startup_inferior): Update.
6116 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6117 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6118 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6119 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6120 (mi_breakpoint_created, mi_breakpoint_deleted)
6121 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6122 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6123 (mi_user_selected_context_changed, report_initial_inferior):
6124 Update.
6125 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6126 (linux_nat_terminal_inferior): Update.
6127 * infrun.c (follow_fork_inferior)
6128 (handle_vfork_child_exec_or_exit, do_target_resume)
6129 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6130 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6131 Update.
6132 * inflow.c (child_terminal_init, info_terminal_command): Update.
6133 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6134 (attach_command): Update.
6135 * infcall.c (call_thread_fsm_should_stop): Update.
6136 * gnu-nat.c (gnu_attach): Update.
6137 * extension.c (struct active_ext_lang_state)
6138 (restore_active_ext_lang): Update.
6139 * exceptions.c (print_flush): Update.
6140 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6141 (struct quit_handler_cleanup_data, restore_quit_handler)
6142 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6143 Remove.
6144 * cp-support.c (gdb_demangle): Update.
6145 * breakpoint.c (update_inserted_breakpoint_locations)
6146 (insert_breakpoint_locations, handle_jit_event)
6147 (disable_breakpoints_in_unloaded_shlib): Update.
6148 * annotate.c (annotate_breakpoints_invalid)
6149 (annotate_frames_invalid): Update.
6150
6151 2017-09-20 Tom Tromey <tom@tromey.com>
6152
6153 * main.c (catch_command_errors): Rename from
6154 catch_command_errors_const.
6155 (captured_main_1): Update.
6156
6157 2017-09-20 Pedro Alves <palves@redhat.com>
6158
6159 * cli/cli-cmds.c (list_command): Use print_sal_location.
6160 (print_sal_location): New function.
6161 (ambiguous_line_spec): Use print_sal_location.
6162 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6163 * symtab.c (find_function_start_sal): Likewise.
6164 * symtab.h (symtab_and_line::symbol): New field.
6165
6166 2017-09-20 Pedro Alves <palves@redhat.com>
6167
6168 * linespec.c (minsym_found): Handle non-text minsyms.
6169 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6170
6171 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6172
6173 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6174 backslash.
6175
6176 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6177
6178 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6179 vmovups instead vmovaps.
6180 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6181
6182 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6183
6184 * NEWS (Changes since GDB 8.0): Add starti.
6185 * infcmd.c (enum run_break): New.
6186 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6187 case.
6188 (run_command): Use enum run_how.
6189 (start_command): Likewise.
6190 (starti_command): New function.
6191 (RUN_ARGS_HELP): New macro.
6192 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6193 commands. Add starti command.
6194
6195 2017-09-19 Yao Qi <yao.qi@linaro.org>
6196
6197 * Makefile.in (monitor.o): Remove the rule.
6198
6199 2017-09-19 Yao Qi <yao.qi@linaro.org>
6200
6201 * annotate.h (struct annotate_arg_emitter): Use
6202 DISABLE_COPY_AND_ASSIGN.
6203 * common/refcounted-object.h (refcounted_object): Likewise.
6204 * completer.h (struct completion_result): Likewise.
6205 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6206 * filename-seen-cache.h (filename_seen_cache): Likewise.
6207 * gdbcore.h (thread_section_name): Likewise.
6208 * gdb_regex.h (compiled_regex): Likewise.
6209 * gdbthread.h (scoped_restore_current_thread): Likewise.
6210 * inferior.h (scoped_restore_current_inferior): Likewise.
6211 * jit.c (jit_reader): Likewise.
6212 * linespec.h (struct linespec_result): Likewise.
6213 * mi/mi-parse.h (struct mi_parse): Likewise.
6214 * nat/fork-inferior.c (execv_argv): Likewise.
6215 * progspace.h (scoped_restore_current_program_space): Likewise.
6216 * python/python-internal.h (class gdbpy_enter): Likewise.
6217 * regcache.h (regcache): Likewise.
6218 * target-descriptions.c (struct tdesc_reg): Likewise.
6219 (struct tdesc_type): Likewise.
6220 (struct tdesc_feature): Likewise.
6221 * ui-out.h (ui_out_emit_type): Likewise.
6222
6223 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6226 label abort_expression.
6227
6228 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6229
6230 * common/buffer.c (buffer_xml_printf): Adjust.
6231 * common/xml-utils.c (xml_escape_text): Change return type to
6232 std::string, update code accordingly.
6233 * common/xml-utils.h (xml_escape_text): Change return type to
6234 std::string.
6235 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6236 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6237 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6238 Adjust.
6239
6240 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6241
6242 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6243 (SUBDIR_UNITTESTS_OBS): Add new object file.
6244 * unittests/xml-utils-selftests.c: New file.
6245
6246 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6247
6248 * common/selftest.h (selftest): New struct/interface.
6249 (register_test): Add name parameter, add new overload.
6250 (run_tests): Add filter parameter.
6251 (for_each_selftest_ftype): New typedef.
6252 (for_each_selftest): New declaration.
6253 * common/selftest.c (tests): Change type to
6254 map<string, unique_ptr<selftest>>.
6255 (simple_selftest): New struct.
6256 (register_test): New function.
6257 (register_test): Add name parameter and use it.
6258 (run_tests): Add filter parameter and use it. Add prints.
6259 Adjust to vector -> map change.
6260 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6261 registering selftests.
6262 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6263 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6264 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6265 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6266 * findvar.c (_initialize_findvar): Likewise.
6267 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6268 * maint.c (maintenance_selftest): Update call to run_tests.
6269 (maintenance_info_selftests): New function.
6270 (_initialize_maint_cmds): Register "maintenance info selftests"
6271 command. Update "maintenance selftest" doc.
6272 * regcache.c (_initialize_regcache): Add names when registering
6273 selftests.
6274 * rust-exp.y (_initialize_rust_exp): Likewise.
6275 * selftest-arch.c (gdbarch_selftest): New struct.
6276 (gdbarch_tests): Remove.
6277 (register_test_foreach_arch): Add name parameter. Call
6278 register_test.
6279 (tests_with_arch): Remove, move most content to
6280 gdbarch_selftest::operator().
6281 (_initialize_selftests_foreach_arch): Remove.
6282 * selftest-arch.h (register_test_foreach_arch): Add name
6283 parameter.
6284 (run_tests_with_arch): New declaration.
6285 * utils-selftests.c (_initialize_utils_selftests): Add names
6286 when registering selftests.
6287 * utils.c (_initialize_utils): Likewise.
6288 * unittests/array-view-selftests.c
6289 (_initialize_array_view_selftests): Likewise.
6290 * unittests/environ-selftests.c (_initialize_environ_selftests):
6291 Likewise.
6292 * unittests/function-view-selftests.c
6293 (_initialize_function_view_selftests): Likewise.
6294 * unittests/offset-type-selftests.c
6295 (_initialize_offset_type_selftests): Likewise.
6296 * unittests/optional-selftests.c
6297 (_initialize_optional_selftests): Likewise.
6298 * unittests/scoped_restore-selftests.c
6299 (_initialize_scoped_restore_selftests): Likewise.
6300 * NEWS: Document "maintenance selftest" and "maint info
6301 selftests".
6302
6303 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6304
6305 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6306 scoped_restore.
6307
6308 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6309
6310 * mi/mi-main.c (mi_load_progress): Make uiout variable
6311 a unique_ptr.
6312
6313 2017-09-15 Pedro Alves <palves@redhat.com>
6314
6315 * compile/compile-c-types.c (convert_enum, convert_int)
6316 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6317
6318 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * dwarf2read.c (copy_string): Remove.
6321 (parse_macro_definition): Replace copy_string with savestring.
6322
6323 2017-09-15 Yao Qi <yao.qi@linaro.org>
6324
6325 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6326 gdb_target_obs.
6327 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6328 Likewise.
6329 (i[34567]86-*-linux*): Likewise.
6330
6331 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6332
6333 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6334 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6335 <stack>: Change type to std::vector.
6336 <stack_len, stack_allocated>: Remove.
6337 <grow_stack>: Remove.
6338 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6339 (dwarf_expr_context::~dwarf_expr_context): Remove.
6340 (dwarf_expr_context::grow_stack): Remove.
6341 (dwarf_expr_context::push): Adjust.
6342 (dwarf_expr_context::pop): Adjust.
6343 (dwarf_expr_context::fetch): Adjust.
6344 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6345 (dwarf_expr_context::stack_empty_p): Adjust.
6346 (dwarf_expr_context::execute_stack_op): Adjust.
6347
6348 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6349
6350 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6351 return type to bool.
6352 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6353
6354 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6355
6356 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6357 Change type to bool.
6358 (dwarf_stack_value) <in_stack_memory>: Likewise.
6359 (dwarf_expr_context) <push_address>: Change parameter type to
6360 bool.
6361 <fetch_in_stack_memory>: Change return type to bool.
6362 <push>: Change parameter type to bool.
6363 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6364 to bool.
6365 (dwarf_expr_context::push_address): Likewise.
6366 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6367 to bool.
6368 (dwarf_expr_context::execute_stack_op): Adjust.
6369 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6370
6371 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6372
6373 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6374 (struct dwarf_expr_context) <n_pieces>: Remove.
6375 <pieces>: Change type to std::vector.
6376 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6377 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6378 pieces.
6379 (dwarf_expr_context::add_piece): Adjust.
6380 * dwarf2loc.c (struct piece_closure): Initialize fields.
6381 <n_pieces>: Remove.
6382 <pieces>: Change type to std::vector.
6383 (allocate_piece_closure): Adjust, change parameter to
6384 std::vector rvalue and std::move it to piece_closure.
6385 (rw_pieced_value): Adjust.
6386 (check_pieced_synthetic_pointer): Adjust.
6387 (indirect_synthetic_pointer): Adjust.
6388 (coerce_pieced_ref): Adjust.
6389 (free_pieced_value_closure): Adjust. Use delete to free
6390 piece_closure.
6391 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6392 to allocate_piece_closure.
6393 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6394
6395 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6396
6397 * probe.h (probe_ops_cp): Remove typedef.
6398 (DEF_VEC_P (probe_ops_cp)): Remove.
6399 (all_probe_ops): Change type to std::vector.
6400 * probe.c (info_probes_for_ops): Adjust to vector change.
6401 (probe_linespec_to_ops): Likewise.
6402 (all_probe_ops): Change type to std::vector.
6403 (_initialize_probe): Adjust to vector change.
6404 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6405 * elfread.c (elf_get_probes): Likewise.
6406 * stap-probe.c (_initialize_stap_probe): Likewise.
6407
6408 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6409
6410 * probe.h (struct bound_probe): Define constructors.
6411 * probe.c (bound_probe_s): Remove typedef.
6412 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6413 (collect_probes): Change return type to std::vector, remove
6414 cleanup.
6415 (compare_probes): Return bool, change parameter type. Change
6416 semantic to "less than".
6417 (gen_ui_out_table_header_info): Change parameter to std::vector
6418 and update.
6419 (exists_probe_with_pops): Likewise.
6420 (info_probes_for_ops): Update to std::vector change.
6421 (enable_probes_command): Likewise.
6422 (disable_probes_command): Likewise.
6423
6424 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6425
6426 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6427 vec to std::vector.
6428 * probe.c (parse_probes_in_pspace): Update.
6429 (find_probes_in_objfile): Update.
6430 (find_probe_by_pc): Update.
6431 (collect_probes): Update.
6432 (probe_any_get_probes): Update.
6433 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6434 return type to reference to std::vector.
6435 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6436 std::vector and update.
6437 (dtrace_process_dof): Likewise.
6438 (dtrace_get_probes): Likewise.
6439 * elfread.c (elf_get_probes): Change return type to std::vector,
6440 store an std::vector in bfd_data.
6441 (probe_key_free): Update to std::vector.
6442 * stap-probe.c (handle_stap_probe): Change parameter to
6443 std::vector and update.
6444 (stap_get_probes): Likewise.
6445 * symfile-debug.c (debug_sym_get_probes): Change return type to
6446 std::vector and update.
6447
6448 2017-09-11 Tom Tromey <tom@tromey.com>
6449
6450 * breakpoint.c (program_breakpoint_here_p): Update.
6451 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6452 from make_show_memory_breakpoints_cleanup. Return a
6453 scoped_restore_tmpl<int>.
6454 (restore_show_memory_breakpoints): Remove.
6455 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6456 * mem-break.c (memory_validate_breakpoint): Update.
6457 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6458 (ia64_memory_remove_breakpoint): Update.
6459 (ia64_breakpoint_from_pc): Update.
6460 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6461 from make_show_memory_breakpoints_cleanup.
6462
6463 2017-09-11 Tom Tromey <tom@tromey.com>
6464
6465 * d-namespace.c (d_lookup_symbol): Use std::string.
6466 (find_symbol_in_baseclass): Likewise.
6467
6468 2017-09-11 Tom Tromey <tom@tromey.com>
6469
6470 * ctf.c (ctf_start): Use std::string.
6471
6472 2017-09-11 Tom Tromey <tom@tromey.com>
6473
6474 * ada-lang.c (is_known_support_routine): Update.
6475 (ada_unhandled_exception_name_addr_from_raise): Update.
6476 * guile/scm-frame.c (gdbscm_frame_name): Update.
6477 * python/py-frame.c (frapy_name): Update.
6478 (frapy_function): Update.
6479 * stack.h (find_frame_funname): Update.
6480 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6481 (print_frame): Update.
6482
6483 2017-09-11 Tom Tromey <tom@tromey.com>
6484
6485 * findcmd.c (put_bits): Take a gdb::byte_vector.
6486 (parse_find_args): Return gdb::byte_vector. "args" now const.
6487 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6488 cleanups.
6489 (find_command): Update.
6490
6491 2017-09-11 Tom Tromey <tom@tromey.com>
6492
6493 * cli/cli-script.c (class scoped_restore_hook_in): New.
6494 (clear_hook_in_cleanup): Remove.
6495 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6496 scoped_restore_hook_in.
6497
6498 2017-09-11 Tom Tromey <tom@tromey.com>
6499
6500 * cli/cli-script.c (restore_interp): Remove.
6501 (read_command_lines): Use scoped_restore_interp.
6502 * interps.c (scoped_restore_interp::set_temp): Rename from
6503 interp_set_temp.
6504 * interps.h (class scoped_restore_interp): New.
6505 (interp_set_temp): Remove.
6506
6507 2017-09-11 Tom Tromey <tom@tromey.com>
6508
6509 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6510 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6511 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6512 scoped_restore.
6513 (mi_cmd_break_insert_1): Update.
6514 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6515 scoped_restore.
6516
6517 2017-09-11 Tom Tromey <tom@tromey.com>
6518
6519 * demangle.c (demangle_command): Update.
6520 * breakpoint.c (disable_command): Update.
6521 (enable_command): Update.
6522 (find_location_by_number): Make "number" const. Use
6523 get_number_trailer.
6524 * cli/cli-utils.c (extract_arg): Return std::string.
6525 * probe.c (parse_probe_linespec): Update. Change types.
6526 (collect_probes): Take string arguments.
6527 (parse_probe_linespec): Likewise.
6528 (info_probes_for_ops): Update.
6529 (enable_probes_command): Update.
6530 (disable_probes_command): Update.
6531 * break-catch-sig.c (catch_signal_split_args): Update.
6532 * mi/mi-parse.c (mi_parse): Update.
6533
6534 2017-09-11 Tom Tromey <tom@tromey.com>
6535
6536 * language.h (language_enum): Make argument const.
6537 * language.c (language_enum): Make argument const.
6538
6539 2017-09-11 Tom Tromey <tom@tromey.com>
6540
6541 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6542 as function.
6543 (skip_to_space): Rename from skip_to_space_const.
6544 * common/common-utils.c (skip_to_space): New function.
6545 (skip_to_space): Rename from skip_to_space_const.
6546 * cli/cli-utils.h (get_number): Rename from get_number_const.
6547 (extract_arg): Rename from extract_arg_const.
6548 * cli/cli-utils.c (get_number): Rename from get_number_const.
6549 (extract_arg): Rename from extract_arg_const.
6550 (number_or_range_parser::get_number): Use ::get_number.
6551 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6552 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6553 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6554 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6555 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6556 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6557 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6558 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6559
6560 2017-09-11 Tom Tromey <tom@tromey.com>
6561
6562 * python/python.c (do_start_initialization): Use
6563 py-event-types.def to initialize types.
6564 Define all object type structures.
6565 * python/python-internal.h: Don't declare event initialization
6566 functions.
6567 * python/py-threadevent.c (thread_event_object_type): Don't
6568 define.
6569 * python/py-stopevent.c (stop_event_object_type): Don't define.
6570 * python/py-signalevent.c (signal_event_object_type): Don't
6571 declare or define.
6572 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6573 (clear_objfiles_event_object_type): Don't declare or define.
6574 * python/py-infevents.c (inferior_call_pre_event_object_type)
6575 (inferior_call_post_event_object_type)
6576 (register_changed_event_object_type)
6577 (memory_changed_event_object_type): Don't declare or define.
6578 * python/py-inferior.c (new_thread_event_object_type)
6579 (new_inferior_event_object_type)
6580 (inferior_deleted_event_object_type): Don't declare or define.
6581 * python/py-exitedevent.c (exited_event_object_type): Don't
6582 declare or define.
6583 * python/py-evts.c (gdbpy_initialize_py_events): Use
6584 py-all-events.def.
6585 * python/py-events.h (thread_event_object_type): Don't declare.
6586 (events_object): Use py-all-events.def.
6587 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6588 py-event-types.def.
6589 * python/py-event-types.def: New file.
6590 * python/py-continueevent.c (create_continue_event_object): Don't
6591 declare or define.
6592 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6593 declare or define.
6594 * python/py-all-events.def: New file.
6595
6596 2017-09-11 Tom Tromey <tom@tromey.com>
6597
6598 * python/py-threadevent.c (create_thread_event_object): Return
6599 gdbpy_ref.
6600 * python/py-stopevent.h (create_stop_event_object)
6601 (create_breakpoint_event_object, create_signal_event_object):
6602 Update.
6603 * python/py-stopevent.c (create_stop_event_object): Return
6604 gdbpy_ref.
6605 (emit_stop_event): Update.
6606 * python/py-signalevent.c (create_signal_event_object): Return
6607 gdbpy_ref.
6608 * python/py-infevents.c (create_inferior_call_event_object):
6609 Update.
6610 * python/py-event.h (create_event_object)
6611 (create_thread_event_object): Update.
6612 * python/py-event.c (create_event_object): Return gdbpy_ref.
6613 * python/py-continueevent.c: Return gdbpy_ref.
6614 * python/py-bpevent.c (create_breakpoint_event_object): Return
6615 gdbpy_ref.
6616
6617 2017-09-11 Tom Tromey <tom@tromey.com>
6618
6619 PR python/15622:
6620 * NEWS: Add entry.
6621 * python/python.c (do_start_initialization): Initialize new event
6622 types.
6623 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6624 (gdbpy_initialize_inferior_deleted_event)
6625 (gdbpy_initialize_new_thread_event): Declare.
6626 * python/py-threadevent.c (create_thread_event_object): Add option
6627 "thread" parameter.
6628 * python/py-inferior.c (new_thread_event_object_type)
6629 (new_inferior_event_object_type)
6630 (inferior_deleted_event_object_type): Declare.
6631 (python_new_inferior, python_inferior_deleted): New functions.
6632 (add_thread_object): Emit new_thread event.
6633 (gdbpy_initialize_inferior): Attach new functions to corresponding
6634 observers.
6635 (new_thread, new_inferior, inferior_deleted): Define new event
6636 types.
6637 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6638 registries.
6639 * python/py-events.h (events_object) <new_inferior,
6640 inferior_deleted, new_thread>: New fields.
6641 * python/py-event.h (create_thread_event_breakpoint): Add optional
6642 "thread" parameter.
6643
6644 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6645
6646 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6647 check current_ui instead.
6648 (internal_vproblem): Likewise.
6649
6650 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6651
6652 * thread.c (print_thread_info_1): Remove unnecessary calls to
6653 uiout->is_mi_like_p.
6654
6655 2017-09-09 Tom Tromey <tom@tromey.com>
6656
6657 * namespace.h (add_using_directive): Update.
6658 * namespace.c (add_using_directive): Change type of excludes to
6659 std::vector.
6660 * dwarf2read.c (read_import_statement): Use std::vector.
6661 (read_namespace): Update.
6662 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6663
6664 2017-09-09 Tom Tromey <tom@tromey.com>
6665
6666 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6667
6668 2017-09-09 Tom Tromey <tom@tromey.com>
6669
6670 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6671
6672 2017-09-09 Tom Tromey <tom@tromey.com>
6673
6674 * stack.c (func_command): Use gdb::def_vector.
6675
6676 2017-09-09 Tom Tromey <tom@tromey.com>
6677
6678 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6679 ui_out_emit_list, ui_out_emit_tuple.
6680 (mi_cmd_var_update): Likewise.
6681
6682 2017-09-09 Tom Tromey <tom@tromey.com>
6683
6684 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6685 ui_out_redirect_pop.
6686 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6687 ui_out_redirect_pop.
6688 * utils.c (do_ui_out_redirect_pop)
6689 (make_cleanup_ui_out_redirect_pop): Remove.
6690 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6691 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6692 * ui-out.h (ui_out_redirect_pop): New class.
6693
6694 2017-09-09 Tom Tromey <tom@tromey.com>
6695
6696 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6697 (list_available_thread_groups, mi_cmd_list_thread_groups)
6698 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6699 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6700 Likewise.
6701
6702 2017-09-09 Tom Tromey <tom@tromey.com>
6703
6704 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6705 ui_out_emit_tuple.
6706
6707 2017-09-09 Tom Tromey <tom@tromey.com>
6708
6709 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6710 * stack.c (print_frame): Use ui_out_emit_tuple.
6711 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6712 (info_spu_mailbox_command, info_spu_dma_command)
6713 (info_spu_proxydma_command): Likewise.
6714 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6715 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6716 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6717 ui_out_emit_tuple.
6718 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6719
6720 2017-09-09 Tom Tromey <tom@tromey.com>
6721
6722 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6723 (class ui_out_emit_table): Update comment.
6724 * ui-out.c (do_cleanup_table_end)
6725 (make_cleanup_ui_out_table_begin_end): Remove.
6726 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6727 (info_spu_dma_cmdlist): Likewise.
6728 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6729 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6730 ui_out_emit_table.
6731
6732 2017-09-09 Tom Tromey <tom@tromey.com>
6733
6734 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6735 ui_out_emit_list, gdb::optional.
6736
6737 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6738
6739 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6740 prototype.
6741 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6742 prototype.
6743 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6744 prototype.
6745 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6746 * ada-exp.y: Remove _initialize_ada_exp prototype.
6747 * ada-lang.c: Remove _initialize_ada_language prototype.
6748 * ada-tasks.c: Remove _initialize_tasks prototype.
6749 * addrmap.c: Remove _initialize_addrmap prototype.
6750 * agent.c: Remove _initialize_agent prototype.
6751 * aix-thread.c: Remove _initialize_aix_thread prototype.
6752 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6753 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6754 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6755 prototype.
6756 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6757 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6758 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6759 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6760 prototype.
6761 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6762 prototype.
6763 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6764 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6765 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6766 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6767 prototype.
6768 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6769 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6770 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6771 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6772 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6773 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6774 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6775 prototype.
6776 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6777 prototype.
6778 * annotate.c: Remove _initialize_annotate prototype.
6779 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6780 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6781 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6782 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6783 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6784 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6785 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6786 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6787 prototype.
6788 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6789 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6790 * auto-load.c: Remove _initialize_auto_load prototype.
6791 * auxv.c: Remove _initialize_auxv prototype.
6792 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6793 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6794 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6795 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6796 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6797 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6798 prototype.
6799 * break-catch-throw.c: Remove _initialize_break_catch_throw
6800 prototype.
6801 * breakpoint.c: Remove _initialize_breakpoint prototype.
6802 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6803 * btrace.c: Remove _initialize_btrace prototype.
6804 * charset.c: Remove _initialize_charset prototype.
6805 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6806 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6807 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6808 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6809 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6810 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6811 * coffread.c: Remove _initialize_coffread prototype.
6812 * compile/compile.c: Remove _initialize_compile prototype.
6813 * complaints.c: Remove _initialize_complaints prototype.
6814 * completer.c: Remove _initialize_completer prototype.
6815 * copying.awk: Remove _initialize_copying prototype.
6816 * copying.c: Regenerate.
6817 * core-regset.c: Remove _initialize_core_regset prototype.
6818 * corefile.c: Remove _initialize_core prototype.
6819 * corelow.c: Remove _initialize_corelow prototype.
6820 * cp-abi.c: Remove _initialize_cp_abi prototype.
6821 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6822 * cp-support.c: Remove _initialize_cp_support prototype.
6823 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6824 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6825 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6826 * ctf.c: Remove _initialize_ctf prototype.
6827 * d-lang.c: Remove _initialize_d_language prototype.
6828 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6829 prototype.
6830 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6831 * dbxread.c: Remove _initialize_dbxread prototype.
6832 * dcache.c: Remove _initialize_dcache prototype.
6833 * demangle.c: Remove _initialize_demangler prototype.
6834 * disasm-selftests.c: Remove _initialize_disasm_selftests
6835 prototype.
6836 * disasm.c: Remove _initialize_disasm prototype.
6837 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6838 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6839 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6840 prototype.
6841 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6842 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6843 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6844 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6845 * elfread.c: Remove _initialize_elfread prototype.
6846 * exec.c: Remove _initialize_exec prototype.
6847 * extension.c: Remove _initialize_extension prototype.
6848 * f-lang.c: Remove _initialize_f_language prototype.
6849 * f-valprint.c: Remove _initialize_f_valprint prototype.
6850 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6851 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6852 * filesystem.c: Remove _initialize_filesystem prototype.
6853 * findcmd.c: Remove _initialize_mem_search prototype.
6854 * fork-child.c: Remove _initialize_fork_child prototype.
6855 * frame-base.c: Remove _initialize_frame_base prototype.
6856 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6857 * frame.c: Remove _initialize_frame prototype.
6858 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6859 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6860 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6861 * gcore.c: Remove _initialize_gcore prototype.
6862 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6863 * gdbarch.c: Regenerate.
6864 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6865 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6866 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6867 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6868 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6869 * go-lang.c: Remove _initialize_go_language prototype.
6870 * go32-nat.c: Remove _initialize_go32_nat prototype.
6871 * guile/guile.c: Remove _initialize_guile prototype.
6872 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6873 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6874 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6875 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6876 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6877 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6878 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6879 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6880 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6881 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6882 prototype.
6883 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6884 prototype.
6885 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6886 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6887 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6888 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6889 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6890 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6891 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6892 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6893 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6894 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6895 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6896 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6897 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6898 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6899 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6900 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6901 prototype.
6902 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6903 prototype.
6904 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6905 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6906 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6907 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6908 * infcall.c: Remove _initialize_infcall prototype.
6909 * infcmd.c: Remove _initialize_infcmd prototype.
6910 * inferior.c: Remove _initialize_inferiors prototype.
6911 * inflow.c: Remove _initialize_inflow prototype.
6912 * infrun.c: Remove _initialize_infrun prototype.
6913 * interps.c: Remove _initialize_interpreter prototype.
6914 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6915 * jit.c: Remove _initialize_jit prototype.
6916 * language.c: Remove _initialize_language prototype.
6917 * linux-fork.c: Remove _initialize_linux_fork prototype.
6918 * linux-nat.c: Remove _initialize_linux_nat prototype.
6919 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6920 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6921 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6922 * m2-lang.c: Remove _initialize_m2_language prototype.
6923 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6924 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6925 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6926 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6927 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6928 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6929 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6930 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6931 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6932 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6933 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6934 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6935 * machoread.c: Remove _initialize_machoread prototype.
6936 * macrocmd.c: Remove _initialize_macrocmd prototype.
6937 * macroscope.c: Remove _initialize_macroscope prototype.
6938 * maint.c: Remove _initialize_maint_cmds prototype.
6939 * mdebugread.c: Remove _initialize_mdebugread prototype.
6940 * memattr.c: Remove _initialize_mem prototype.
6941 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6942 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6943 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6944 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6945 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6946 * microblaze-linux-tdep.c: Remove
6947 _initialize_microblaze_linux_tdep prototype.
6948 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6949 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6950 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6951 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6952 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6953 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6954 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6955 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6956 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6957 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6958 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6959 prototype.
6960 * mipsread.c: Remove _initialize_mipsread prototype.
6961 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6962 prototype.
6963 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6964 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6965 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6966 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6967 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6968 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6969 prototype.
6970 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6971 * nto-procfs.c: Remove _initialize_procfs prototype.
6972 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6973 * objc-lang.c: Remove _initialize_objc_language prototype.
6974 * objfiles.c: Remove _initialize_objfiles prototype.
6975 * observer.c: Remove observer_test_first_notification_function,
6976 observer_test_second_notification_function,
6977 observer_test_third_notification_function, and
6978 _initialize_observer prototypes.
6979 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6980 * osabi.c: Remove _initialize_gdb_osabi prototype.
6981 * osdata.c: Remove _initialize_osdata prototype.
6982 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6983 * parse.c: Remove _initialize_parse prototype.
6984 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6985 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6986 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6987 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6988 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6989 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6990 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6991 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6992 * printcmd.c: Remove _initialize_printcmd prototype.
6993 * probe.c: Remove _initialize_probe prototype.
6994 * proc-api.c: Remove _initialize_proc_api prototype.
6995 * proc-events.c: Remove _initialize_proc_events prototype.
6996 * proc-service.c: Remove _initialize_proc_service prototype.
6997 * procfs.c: Remove _initialize_procfs prototype.
6998 * psymtab.c: Remove _initialize_psymtab prototype.
6999 * python/python.c: Remove _initialize_python prototype.
7000 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7001 * record-btrace.c: Remove _initialize_record_btrace prototype.
7002 * record-full.c: Remove _initialize_record_full prototype.
7003 * record.c: Remove _initialize_record prototype.
7004 * regcache.c: Remove _initialize_regcache prototype.
7005 * reggroups.c: Remove _initialize_reggroup prototype.
7006 * remote-notif.c: Remove _initialize_notif prototype.
7007 * remote-sim.c: Remove _initialize_remote_sim prototype.
7008 * remote.c: Remove _initialize_remote prototype.
7009 * reverse.c: Remove _initialize_reverse prototype.
7010 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7011 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7012 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7013 prototype.
7014 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7015 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7016 * rust-exp.y: Remove _initialize_rust_exp prototype.
7017 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7018 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7019 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7020 * score-tdep.c: Remove _initialize_score_tdep prototype.
7021 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7022 prototype.
7023 * ser-go32.c: Remove _initialize_ser_dos prototype.
7024 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7025 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7026 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7027 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7028 * serial.c: Remove _initialize_serial prototype.
7029 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7030 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7031 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7032 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7033 * skip.c: Remove _initialize_step_skip prototype.
7034 * sol-thread.c: Remove _initialize_sol_thread prototype.
7035 * solib-aix.c: Remove _initialize_solib_aix prototype.
7036 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7037 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7038 * solib-frv.c: Remove _initialize_frv_solib prototype.
7039 * solib-spu.c: Remove _initialize_spu_solib prototype.
7040 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7041 * solib-target.c: Remove _initialize_solib_target prototype.
7042 * solib.c: Remove _initialize_solib prototype.
7043 * source.c: Remove _initialize_source prototype.
7044 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7045 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7046 prototype.
7047 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7048 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7049 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7050 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7051 prototype.
7052 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7053 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7054 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7055 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7056 prototype.
7057 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7058 prototype.
7059 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7060 prototype.
7061 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7062 prototype.
7063 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7064 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7065 prototype.
7066 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7067 prototype.
7068 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7069 prototype.
7070 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7071 prototype.
7072 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7073 prototype.
7074 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7075 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7076 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7077 * stabsread.c: Remove _initialize_stabsread prototype.
7078 * stack.c: Remove _initialize_stack prototype.
7079 * stap-probe.c: Remove _initialize_stap_probe prototype.
7080 * std-regs.c: Remove _initialize_frame_reg prototype.
7081 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7082 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7083 * symfile.c: Remove _initialize_symfile prototype.
7084 * symmisc.c: Remove _initialize_symmisc prototype.
7085 * symtab.c: Remove _initialize_symtab prototype.
7086 * target-dcache.c: Remove _initialize_target_dcache prototype.
7087 * target-descriptions.c: Remove _initialize_target_descriptions
7088 prototype.
7089 * thread.c: Remove _initialize_thread prototype.
7090 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7091 prototype.
7092 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7093 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7094 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7095 prototype.
7096 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7097 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7098 * tracefile.c: Remove _initialize_tracefile prototype.
7099 * tracepoint.c: Remove _initialize_tracepoint prototype.
7100 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7101 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7102 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7103 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7104 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7105 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7106 * tui/tui.c: Remove _initialize_tui prototype.
7107 * typeprint.c: Remove _initialize_typeprint prototype.
7108 * user-regs.c: Remove _initialize_user_regs prototype.
7109 * utils.c: Remove _initialize_utils prototype.
7110 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7111 * valarith.c: Remove _initialize_valarith prototype.
7112 * valops.c: Remove _initialize_valops prototype.
7113 * valprint.c: Remove _initialize_valprint prototype.
7114 * value.c: Remove _initialize_values prototype.
7115 * varobj.c: Remove _initialize_varobj prototype.
7116 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7117 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7118 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7119 * windows-nat.c: Remove _initialize_windows_nat,
7120 _initialize_check_for_gdb_ini, and _initialize_loadable
7121 prototypes.
7122 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7123 * xcoffread.c: Remove _initialize_xcoffread prototype.
7124 * xml-support.c: Remove _initialize_xml_support prototype.
7125 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7126 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7127 prototype.
7128 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7129 prototype.
7130 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7131
7132 2017-09-08 Keith Seitz <keiths@redhat.com>
7133
7134 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7135 field.
7136
7137 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7138
7139 * f-valprint.c (f_val_print): Remove check for one byte
7140 sized integers. Remove printing of character type.
7141
7142 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7143 Christoph Weinmann <christoph.t.weinmann@intel.com>
7144 Bernhard Heckel <bernhard.heckel@intel.com>
7145
7146 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7147 to maintain proper indentation when printing pointers/refs.
7148
7149 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7150
7151 GDB 8.0.1 released.
7152
7153 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7154
7155 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7156
7157 2017-09-05 Tom Tromey <tom@tromey.com>
7158
7159 * parse.c (funcall_chain): Now a std::vector.
7160 (start_arglist, end_arglist): Simplify.
7161 (free_funcalls): Remove.
7162 (parse_exp_in_context_1): Remove cleanup.
7163
7164 2017-09-05 Tom Tromey <tom@tromey.com>
7165
7166 * go-exp.y (go_parse): Don't create a cleanup.
7167
7168 2017-09-05 Tom Tromey <tom@tromey.com>
7169
7170 * d-exp.y (PrimaryExpression): Use std::string.
7171 (d_parse): Don't create a cleanup.
7172
7173 2017-09-05 Tom Tromey <tom@tromey.com>
7174
7175 * utils.c (do_clear_parser_state): Remove.
7176 (make_cleanup_clear_parser_state): Remove.
7177 * p-exp.y (pascal_parse): Use scoped_restore.
7178 * m2-exp.y (m2_parse): Use scoped_restore.
7179 * f-exp.y (f_parse): Use scoped_restore.
7180 * d-exp.y (d_parse): Use scoped_restore.
7181 * c-exp.y (c_parse): Use scoped_restore.
7182 * ada-exp.y (ada_parse): Use scoped_restore.
7183 * utils.h (make_cleanup_clear_parser_state): Remove.
7184
7185 2017-09-06 Keith Seitz <keiths@redhat.com>
7186
7187 * dwarf2read.c (dw2_linkage_name_attr): New function.
7188 (dw2_linkage_name): New function.
7189 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7190 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7191 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7192
7193 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7194
7195 * config/djgpp/djconfig.sh: Correct shell portability issue.
7196
7197 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7198
7199 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7200
7201 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7202
7203 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7204 * NEWS: Mention new FreeBSD/mips native configuration.
7205 * configure.host: Add aarch64*-*-freebsd*.
7206 * configure.nat: Likewise.
7207 * aarch64-fbsd-nat.c: New file.
7208
7209 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7210
7211 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7212 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7213 * NEWS: Mention new FreeBSD/aarch64 target.
7214 * configure.tgt: Add aarch64*-*-freebsd*.
7215 * aarch64-fbsd-tdep.c: New file.
7216 * aarch64-fbsd-tdep.h: New file.
7217
7218 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7219
7220 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7221
7222 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7223
7224 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7225 of TLS symbols.
7226
7227 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7228
7229 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7230 call.
7231
7232 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7233
7234 * infrun.c (follow_exec): Call add_thread after
7235 target_find_description.
7236
7237 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7238
7239 * infrun.c (handle_inferior_event_1): When exec'ing, read
7240 stop_pc after follow_exec.
7241
7242 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7243
7244 * remote.c (process_g_packet): Update error message.
7245
7246 2017-09-05 Yao Qi <yao.qi@linaro.org>
7247
7248 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7249 targets.
7250
7251 2017-09-05 Pedro Alves <palves@redhat.com>
7252
7253 * eval.c (eval_call, evaluate_funcall): New functions, factored
7254 out from ...
7255 (evaluate_subexp_standard): ... this.
7256
7257 2017-09-05 Yao Qi <yao.qi@linaro.org>
7258
7259 * amd64-tdep.c (amd64_target_description): Create target
7260 descriptions.
7261 (_initialize_amd64_tdep): Don't call functions
7262 initialize_tdesc_amd64_*. Add self tests.
7263 * arch/amd64.c (amd64_create_target_description): Add parameter
7264 is_linux. Call set_tdesc_osabi if is_linux is true.
7265 * arch/amd64.h (amd64_create_target_description): Update the
7266 declaration.
7267 * arch/i386.c (i386_create_target_description): Add parameter
7268 is_linux. Call set_tdesc_osabi if is_linux is true.
7269 * arch/i386.h (i386_create_target_description): Update
7270 declaration.
7271 * configure.tgt: Add i386.o to gdb_target_obs.
7272 * features/Makefile (XMLTOC): Remove i386/*.xml.
7273 * features/i386/amd64-avx-avx512.c: Remove.
7274 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7275 * features/i386/amd64-avx-mpx.c: Remove.
7276 * features/i386/amd64-avx.c: Remove.
7277 * features/i386/amd64-mpx.c: Remove.
7278 * features/i386/amd64.c: Remove.
7279 * features/i386/i386-avx-avx512.c: Remove.
7280 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7281 * features/i386/i386-avx-mpx.c: Remove.
7282 * features/i386/i386-avx.c: Remove.
7283 * features/i386/i386-mmx.c: Remove.
7284 * features/i386/i386-mpx.c: Remove.
7285 * features/i386/i386.c: Remove.
7286 * i386-tdep.c: Don't include features/i386/i386*.c., include
7287 target-descriptions.h and arch/i386.h.
7288 (i386_target_description): Create target descriptions.
7289 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7290 functions. Do self tests.
7291
7292 2017-09-05 Yao Qi <yao.qi@linaro.org>
7293
7294 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7295 * features/i386/amd64-avx-avx512-linux.c: Removed.
7296 * features/i386/amd64-avx-linux.c: Removed.
7297 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7298 * features/i386/amd64-avx-mpx-linux.c: Removed.
7299 * features/i386/amd64-linux.c: Removed.
7300 * features/i386/amd64-mpx-linux.c: Removed.
7301 * features/i386/x32-avx-avx512-linux.c: Removed.
7302 * features/i386/x32-avx-linux.c: Removed.
7303 * features/i386/x32-linux.c: Removed.
7304
7305 2017-09-05 Yao Qi <yao.qi@linaro.org>
7306
7307 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7308 features/i386/*.c.
7309 (amd64_linux_read_description): Call
7310 amd64_create_target_description.
7311 * arch/amd64.c: New file.
7312 * arch/amd64.h: New file.
7313 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7314 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7315
7316 2017-09-05 Yao Qi <yao.qi@linaro.org>
7317
7318 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7319 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7320 (amd64_linux_read_description): Create target descriptions.
7321 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7322 functions. Add unit tests.
7323 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7324 x32-core.xml.
7325 * features/i386/64bit-avx.c: Generated.
7326 * features/i386/64bit-avx512.c: Generated.
7327 * features/i386/64bit-core.c: Generated.
7328 * features/i386/64bit-linux.c: Generated.
7329 * features/i386/64bit-mpx.c: Generated.
7330 * features/i386/64bit-pkeys.c: Generated.
7331 * features/i386/64bit-segments.c: Generated.
7332 * features/i386/64bit-sse.c: Generated.
7333 * features/i386/x32-core.c: Generated.
7334 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7335 c files for amd64-linux and x32-linux.
7336
7337 2017-09-05 Yao Qi <yao.qi@linaro.org>
7338
7339 * amd64-linux-tdep.c (amd64_linux_read_description): New
7340 function.
7341 (amd64_linux_core_read_description): Call
7342 amd64_linux_read_description.
7343 (amd64_linux_init_abi): Likewise.
7344 (amd64_x32_linux_init_abi): Likewise.
7345 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7346 * x86-linux-nat.c (x86_linux_read_description): Call
7347 amd64_linux_read_description.
7348
7349 2017-09-05 Yao Qi <yao.qi@linaro.org>
7350
7351 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7352 comments.
7353
7354 2017-09-05 Yao Qi <yao.qi@linaro.org>
7355
7356 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7357 * features/i386/i386-avx-avx512-linux.c: Remove.
7358 * features/i386/i386-avx-linux.c: Remove.
7359 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7360 * features/i386/i386-avx-mpx-linux.c: Remove.
7361 * features/i386/i386-linux.c: Remove.
7362 * features/i386/i386-mmx-linux.c: Remove.
7363 * features/i386/i386-mpx-linux.c: Remove.
7364
7365 2017-09-05 Yao Qi <yao.qi@linaro.org>
7366
7367 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7368 (SFILES): Add arch/i386.c.
7369 (HFILES_NO_SRCDIR): Add arch/i386.h.
7370 * arch/i386.c: New file.
7371 * arch/i386.h: New file.
7372 * arch/tdesc.h (allocate_target_description): Declare.
7373 (set_tdesc_architecture): Declare.
7374 (set_tdesc_osabi): Declare.
7375 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7376 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7377 include arch/i386.h.
7378 (i386_linux_read_description): Remove code and call
7379 i386_create_target_description.
7380 (set_tdesc_architecture): New function.
7381 (set_tdesc_osabi): New function.
7382 * target-descriptions.h (allocate_target_description): Remove.
7383
7384 2017-09-05 Yao Qi <yao.qi@linaro.org>
7385
7386 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7387 * target-descriptions.c (tdesc_create_feature): Likewise, and
7388 adjust code.
7389 * features/i386/32bit-avx.c: Re-generated.
7390 * features/i386/32bit-avx512.c: Re-generated.
7391 * features/i386/32bit-core.c: Re-generated.
7392 * features/i386/32bit-linux.c: Re-generated.
7393 * features/i386/32bit-mpx.c: Re-generated.
7394 * features/i386/32bit-pkeys.c: Re-generated.
7395 * features/i386/32bit-sse.c: Re-generated.
7396
7397 2017-09-05 Yao Qi <yao.qi@linaro.org>
7398
7399 * regformats/regdef.h (struct reg): Override operator == and !=.
7400
7401 2017-09-05 Yao Qi <yao.qi@linaro.org>
7402
7403 * arch/tdesc.h: New file.
7404 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7405 * target-descriptions.c: Update comments.
7406 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7407 declarations.
7408 * features/i386/32bit-avx.c: Re-generated.
7409 * features/i386/32bit-avx512.c: Re-generated.
7410 * features/i386/32bit-core.c: Re-generated.
7411 * features/i386/32bit-linux.c: Re-generated.
7412 * features/i386/32bit-mpx.c: Re-generated.
7413 * features/i386/32bit-pkeys.c: Re-generated.
7414 * features/i386/32bit-sse.c: Re-generated.
7415
7416 2017-09-05 Yao Qi <yao.qi@linaro.org>
7417
7418 * regformats/regdat.sh: Update generated code.
7419
7420 2017-09-05 Yao Qi <yao.qi@linaro.org>
7421
7422 * regformats/regdat.sh: Adjust code order.
7423
7424 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7425
7426 * expprint.c (dump_subexp_body_standard): Use constant format
7427 string in fprintf_filtered call.
7428
7429 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7430
7431 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7432 NetBSD/i386.
7433 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7434
7435 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7436
7437 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7438
7439 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7440
7441 * bsd-kvm.o: Define _KMEMUSER.
7442 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7443 * configure: Regenerate.
7444
7445 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7446
7447 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7448 * i386-fbsd-nat.c: Likewise.
7449
7450 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7451
7452 * unittests/array-view-selftests.c: Add include of <array>.
7453
7454 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7455
7456 * spu-tdep.c (flush_ea_cache): Add missing argument to
7457 call_function_by_hand.
7458
7459 2017-09-04 Pedro Alves <palves@redhat.com>
7460
7461 * NEWS (Safer support for debugging with no debug info): New.
7462
7463 2017-09-04 Pedro Alves <palves@redhat.com>
7464
7465 * c-exp.y (function_method, function_method_void): Add current
7466 instance flags to TYPE_INSTANCE.
7467 * dwarf2read.c (check_modifier): New.
7468 (compute_delayed_physnames): Assert that only C++ adds delayed
7469 physnames. Mark fn_fields as const/volatile depending on
7470 physname.
7471 * eval.c (make_params): New type_instance_flags parameter. Use
7472 it as the new type's instance flags.
7473 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7474 flags element and pass it to make_params.
7475 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7476 instance flags element.
7477 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7478 * gdbtypes.h: Include "enum-flags.h".
7479 (type_instance_flags): New enum-flags type.
7480 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7481 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7482 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7483 (follow_type_instance_flags): New function.
7484 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7485 * parser-defs.h (follow_type_instance_flags): Declare.
7486 * valops.c (value_struct_elt_for_reference): const/volatile must
7487 match too.
7488
7489 2017-09-04 Pedro Alves <palves@redhat.com>
7490
7491 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7492 function/method scopes; lookup the nested name as a function local
7493 static variable.
7494
7495 2017-09-04 Pedro Alves <palves@redhat.com>
7496
7497 (%type <voidval>): Add function_method.
7498 * c-exp.y (exp): New production for calls with no arguments.
7499 (function_method, function_method_void_or_typelist): New
7500 productions.
7501 (exp): New production for "method()::static_var".
7502 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7503 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7504 Handle OP_FUNC_STATIC_VAR.
7505 * parse.c (operator_length_standard):
7506 Handle OP_FUNC_STATIC_VAR.
7507
7508 2017-09-04 Pedro Alves <palves@redhat.com>
7509
7510 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7511 handling.
7512 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7513 Ditto.
7514 * parse.c (operator_length_standard, operator_check_standard):
7515 Ditto.
7516 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7517
7518 2017-09-04 Pedro Alves <palves@redhat.com>
7519
7520 * ax-gdb.c: Include "typeprint.h".
7521 (gen_expr_for_cast): New function.
7522 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7523 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7524 type is unknown.
7525 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7526 nodebug_data_symbol.
7527 * eval.c: Include "typeprint.h".
7528 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7529 Error out if symbol has unknown type.
7530 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7531 evaluate_subexp_for_cast.
7532 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7533 OP_VAR_MSYM_VALUE.
7534 (evaluate_subexp_for_cast): New function.
7535 * gdbtypes.c (init_nodebug_var_type): New function.
7536 (objfile_type): Use it to initialize types of variables with no
7537 debug info.
7538 * typeprint.c (error_unknown_type): New.
7539 * typeprint.h (error_unknown_type): New declaration.
7540 * compile/compile-c-types.c (convert_type_basic): Handle
7541 TYPE_CODE_ERROR; warn and fallback to int for variables with
7542 unknown type.
7543
7544 2017-09-04 Pedro Alves <palves@redhat.com>
7545
7546 * eval.c (evaluate_var_value): New function, factored out from ...
7547 (evaluate_subexp_standard): ... here.
7548
7549 2017-09-04 Pedro Alves <palves@redhat.com>
7550
7551 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7552 Remove useless assignments to 'op'.
7553
7554 2017-09-04 Pedro Alves <palves@redhat.com>
7555
7556 * eval.c (eval_skip_value): New function.
7557 (evaluate_subexp_standard): Use it.
7558
7559 2017-09-04 Pedro Alves <palves@redhat.com>
7560
7561 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7562 function name from symbol/minsym and pass it to
7563 error_call_unknown_return_type.
7564
7565 2017-09-04 Pedro Alves <palves@redhat.com>
7566
7567 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7568 * ax-gdb.c (gen_msym_var_ref): New function.
7569 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7570 * eval.c (evaluate_var_msym_value): New function.
7571 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7572 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7573 to call_function_by_hand.
7574 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7575 Handle OP_VAR_MSYM_VALUE.
7576 (union exp_element) <msymbol>: New field.
7577 * minsyms.h (struct type): Forward declare.
7578 (find_minsym_type_and_address): Declare.
7579 * parse.c (write_exp_elt_msym): New function.
7580 (write_exp_msymbol): Delete, refactored as ...
7581 (find_minsym_type_and_address): ... this new function.
7582 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7583 (operator_length_standard, operator_check_standard): Handle
7584 OP_VAR_MSYM_VALUE.
7585 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7586
7587 2017-09-04 Pedro Alves <palves@redhat.com>
7588
7589 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7590 TYPE_GNU_IFUNC specially here. Throw error if return type is
7591 unknown.
7592 * ada-typeprint.c (print_func_type): Handle functions with unknown
7593 return type.
7594 * c-typeprint.c (c_type_print_base): Handle functions and methods
7595 with unknown return type.
7596 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7597 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7598 * compile/compile-c-types.c: Include "objfiles.h".
7599 (convert_func): For functions with unknown return type, warn and
7600 default to int.
7601 * compile/compile-object-run.c (compile_object_run): Adjust call
7602 to call_function_by_hand_dummy.
7603 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7604 call_function_by_hand.
7605 * eval.c (evaluate_subexp_standard): Adjust calls to
7606 call_function_by_hand. Handle functions and methods with unknown
7607 return type. Pass expect_type to call_function_by_hand.
7608 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7609 return type.
7610 * gcore.c (call_target_sbrk): Adjust call to
7611 call_function_by_hand.
7612 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7613 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7614 an integer address type instead of nodebug.
7615 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7616 call_function_by_hand.
7617 * infcall.c (error_call_unknown_return_type): New function.
7618 (call_function_by_hand): New "default_return_type" parameter.
7619 Pass it down.
7620 (call_function_by_hand_dummy): New "default_return_type"
7621 parameter. Use it instead of defaulting to int. If there's no
7622 default and the return type is unknown, throw an error. If
7623 there's a default return type, and the called function has no
7624 debug info, then assume the function is prototyped.
7625 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7626 New "default_return_type" parameter.
7627 (error_call_unknown_return_type): New declaration.
7628 * linux-fork.c (call_lseek): Cast return type of lseek.
7629 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7630 call_function_by_hand.
7631 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7632 calls to call_function_by_hand.
7633 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7634 return type.
7635 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7636 (value_nsstring, print_object_command): Adjust calls to
7637 call_function_by_hand.
7638 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7639 functions with unknown return type.
7640 (pascal_type_print_func_varspec_suffix): New function.
7641 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7642 TYPE_CODE_METHOD>: Use it.
7643 * python/py-value.c (valpy_call): Adjust call to
7644 call_function_by_hand.
7645 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7646 call_function_by_hand.
7647 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7648 call_function_by_hand.
7649 * valops.c (value_allocate_space_in_inferior): Adjust call to
7650 call_function_by_hand.
7651 * typeprint.c (type_print_unknown_return_type): New function.
7652 * typeprint.h (type_print_unknown_return_type): New declaration.
7653
7654 2017-09-04 Pedro Alves <palves@redhat.com>
7655
7656 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7657 types with more than one parameter as prototyped.
7658
7659 2017-09-04 Pedro Alves <palves@redhat.com>
7660
7661 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7662 (disassemble_command): Use gdb_disassembly_flags instead of bare
7663 int.
7664 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7665 (dump_insns, do_mixed_source_and_assembly_deprecated)
7666 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7667 Use gdb_disassembly_flags instead of bare int.
7668 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7669 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7670 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7671 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7672 (enum gdb_disassembly_flag): ... values of this new enumeration.
7673 (gdb_disassembly_flags): Define.
7674 (gdb_disassembly)
7675 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7676 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7677 gdb_disassembly_flags instead of bare int.
7678 * record-btrace.c (btrace_insn_history)
7679 (record_btrace_insn_history, record_btrace_insn_history_range)
7680 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7681 instead of bare int.
7682 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7683 Use gdb_disassembly_flags instead of bare int.
7684 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7685 Define.
7686 * target-delegates.c: Regenerate.
7687 * target.c (target_insn_history, target_insn_history_from)
7688 (target_insn_history_range): Use gdb_disassembly_flags instead of
7689 bare int.
7690 * target.h: Include "disasm.h".
7691 (struct target_ops) <to_insn_history, to_insn_history_from,
7692 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7693 int.
7694 (target_insn_history, target_insn_history_from)
7695 (target_insn_history_range): Use gdb_disassembly_flags instead of
7696 bare int.
7697
7698 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7699
7700 * cli/cli-script.c (build_command_line): For if/while commands,
7701 check whether args is empty.
7702
7703 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7704
7705 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7706 (enum command_control_type): Likewise.
7707 (struct command_line): Likewise.
7708 (free_command_lines): Likewise.
7709 (struct command_lines_deleter): Likewise.
7710 (command_line_up): Likewise.
7711 (read_command_lines): Likewise.
7712 (read_command_lines_1): Likewise.
7713 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7714 (enum command_control_type): Likewise.
7715 (struct command_line): Likewise.
7716 (free_command_lines): Likewise.
7717 (struct command_lines_deleter): Likewise.
7718 (command_line_up): Likewise.
7719 (read_command_lines): Likewise.
7720 (read_command_lines_1): Likewise.
7721 * breakpoint.h: Include cli/cli-script.h.
7722 * extension-priv.h: Likewise.
7723 * gdbcmd.h: Likewise.
7724
7725 2017-09-04 Pedro Alves <palves@redhat.com>
7726
7727 * ada-lang.c (is_known_support_routine): Move sal declaration to
7728 where it is initialized.
7729 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7730 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7731 (clear_command, update_static_tracepoint): Remove init_sal
7732 references. Move declarations closer to initializations.
7733 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7734 initializations.
7735 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7736 references. Move sal declarations closer to initializations.
7737 * frame.c (find_frame_sal): Return a symtab_and_line via function
7738 return instead of output parameter. Remove init_sal references.
7739 * frame.h (find_frame_sal): Return a symtab_and_line via function
7740 return instead of output parameter.
7741 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7742 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7743 instead of memset.
7744 (gdbscm_find_pc_line): Remove init_sal reference.
7745 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7746 references. Move declarations closer to initializations.
7747 * infcmd.c (set_step_frame): Update. Move declarations closer to
7748 initializations.
7749 (finish_backward): Remove init_sal references. Move declarations
7750 closer to initializations.
7751 * infrun.c (process_event_stop_test, handle_step_into_function)
7752 (insert_hp_step_resume_breakpoint_at_frame)
7753 (insert_step_resume_breakpoint_at_caller): Likewise.
7754 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7755 (symbol_to_sal): Likewise.
7756 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7757 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7758 to its initialization.
7759 * reverse.c (save_bookmark_command): Use new/delete. Remove
7760 init_sal references. Move declarations closer to initializations.
7761 * source.c (get_current_source_symtab_and_line): Remove brace
7762 initialization.
7763 (set_current_source_symtab_and_line): Now takes the sal by const
7764 reference. Remove brace initialization.
7765 (line_info): Remove init_sal reference.
7766 * source.h (set_current_source_symtab_and_line): Now takes a
7767 symtab_and_line via const reference.
7768 * stack.c (set_current_sal_from_frame): Adjust.
7769 (print_frame_info): Adjust.
7770 (get_last_displayed_sal): Return the sal via function return
7771 instead of via output parameter. Simplify.
7772 (frame_info): Adjust.
7773 * stack.h (get_last_displayed_sal): Return the sal via function
7774 return instead of via output parameter.
7775 * symtab.c (init_sal): Delete.
7776 (find_pc_sect_line): Remove init_sal references. Move
7777 declarations closer to initializations.
7778 (find_function_start_sal): Remove init_sal references. Move
7779 declarations closer to initializations.
7780 * symtab.h (struct symtab_and_line): In-class initialize all
7781 fields.
7782 * tracepoint.c (set_traceframe_context)
7783 (print_one_static_tracepoint_marker): Remove init_sal references.
7784 Move declarations closer to initializations.
7785 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7786 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7787 declarations closer to initializations.
7788 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7789 init_sal references. Adjust.
7790
7791 2017-09-04 Pedro Alves <palves@redhat.com>
7792
7793 * ax-gdb.c (agent_command_1): Use range-for.
7794 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7795 * breakpoint.c: Include "common/array-view.h".
7796 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7797 parameter from struct symtabs_and_lines to
7798 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7799 (breakpoint_sals_to_pc): Change sals parameter from struct
7800 symtabs_and_lines to std::vector reference.
7801 (check_fast_tracepoint_sals): Change sals parameter from struct
7802 symtabs_and_lines to std::array_view. Use range-for.
7803 (decode_static_tracepoint_spec): Return a std::vector instead of
7804 symtabs_and_lines. Update.
7805 (create_breakpoint): Update.
7806 (break_range_command, until_break_command, clear_command): Update.
7807 (base_breakpoint_decode_location, bkpt_decode_location)
7808 (bkpt_probe_create_sals_from_location)
7809 (bkpt_probe_decode_location, tracepoint_decode_location)
7810 (tracepoint_probe_decode_location)
7811 (strace_marker_create_sals_from_location): Return a std::vector
7812 instead of symtabs_and_lines.
7813 (strace_marker_create_breakpoints_sal): Update.
7814 (strace_marker_decode_location): Return a std::vector instead of
7815 symtabs_and_lines. Update.
7816 (update_breakpoint_locations): Change struct symtabs_and_lines
7817 parameters to gdb::array_view. Adjust.
7818 (location_to_sals): Return a std::vector instead of
7819 symtabs_and_lines. Update.
7820 (breakpoint_re_set_default): Use std::vector instead of struct
7821 symtabs_and_lines.
7822 (decode_location_default): Return a std::vector instead of
7823 symtabs_and_lines. Update.
7824 * breakpoint.h: Include "common/array-view.h".
7825 (struct breakpoint_ops) <decode_location>: Now returns a
7826 std::vector instead of returning a symtabs_and_lines via output
7827 parameter.
7828 (update_breakpoint_locations): Change sals parameters to use
7829 gdb::array_view.
7830 * cli/cli-cmds.c (edit_command, list_command): Update to use
7831 std::vector and gdb::array_view.
7832 (ambiguous_line_spec): Adjust to use gdb::array_view and
7833 range-for.
7834 (compare_symtabs): Rename to ...
7835 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7836 const reference and adjust.
7837 (filter_sals): Rewrite using std::vector and standard algorithms.
7838 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7839 (jump_command): Update to use std::vector.
7840 * linespec.c (struct linespec_state) <canonical_names>: Update
7841 comment.
7842 (add_sal_to_sals_basic): Delete.
7843 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7844 (decode_line_2, create_sals_line_offset)
7845 (convert_address_location_to_sals, convert_linespec_to_sals)
7846 (convert_explicit_location_to_sals, parse_linespec)
7847 (event_location_to_sals, decode_line_full, decode_line_1)
7848 (decode_line_with_current_source)
7849 (decode_line_with_last_displayed, decode_objc)
7850 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7851 (linespec_result::~linespec_result): Adjust to use std::vector
7852 instead of symtabs_and_lines.
7853 * linespec.h (linespec_sals::sals): Now a std::vector.
7854 (struct linespec_result): Use std::vector, bool, and in-class
7855 initialization.
7856 (decode_line_1, decode_line_with_current_source)
7857 (decode_line_with_last_displayed): Return std::vector.
7858 * macrocmd.c (info_macros_command): Use std::vector.
7859 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7860 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7861 std::vector.
7862 * probe.h (parse_probes): Return a std::vector.
7863 * python/python.c (gdbpy_decode_line): Use std::vector and
7864 gdb::array_view.
7865 * source.c (select_source_symtab, line_info): Use std::vector.
7866 * stack.c (func_command): Use std::vector.
7867 * symtab.h (struct symtabs_and_lines): Delete.
7868 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7869
7870 2017-09-04 Pedro Alves <palves@redhat.com>
7871
7872 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7873 unittests/array-view-selftests.c.
7874 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7875 * common/array-view.h: New file.
7876 * unittests/array-view-selftests.c: New file.
7877
7878 2017-09-04 Pedro Alves <palves@redhat.com>
7879
7880 * cli/cli-cmds.c (edit_command): Pass message to
7881 ambiguous_line_spec.
7882 (list_command): Pass message to ambiguous_line_spec. Say
7883 "first"/"last" instead of "start" and "end" to be consistent with
7884 the manual.
7885 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7886 them to print formatted message.
7887
7888 2017-09-04 Pedro Alves <palves@redhat.com>
7889
7890 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7891 ftrace_update_insns by reference instead of pointer.
7892
7893 2017-09-04 Yao Qi <yao.qi@linaro.org>
7894
7895 * i386-go32-tdep.c: Include x86-xstate.h.
7896 (i386_go32_init_abi): Call i386_target_description.
7897 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7898 if xcr0 is X86_XSTATE_X87_MASK.
7899 * i386-tdep.h (tdesc_i386): Remove the declaration.
7900 (tdesc_i386_mmx): Likewise.
7901
7902 2017-09-04 Yao Qi <yao.qi@linaro.org>
7903
7904 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7905 X86_XSTATE_SSE_MASK instead of 0.
7906
7907 2017-09-04 Yao Qi <yao.qi@linaro.org>
7908
7909 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7910 i386_target_description.
7911 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7912 i386_target_description.
7913 * i386-tdep.c (i386_gdbarch_init): Likewise.
7914
7915 2017-09-04 Yao Qi <yao.qi@linaro.org>
7916
7917 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7918 (x86_darwin_init_abi_64): Call amd64_target_description.
7919 * amd64-dicos-tdep.c: Likewise.
7920 * amd64-fbsd-nat.c: Likewise.
7921 * amd64-fbsd-tdep.c: Likewise.
7922 * amd64-nbsd-tdep.c: Likewise.
7923 * amd64-obsd-tdep.c: Likewise.
7924 * amd64-sol2-tdep.c: Likewise.
7925 * amd64-windows-tdep.c: Likewise.
7926 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7927
7928 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7929
7930 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7931 (btrace_function) <insn>: Change type to use std::vector.
7932 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7933 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7934 ftrace_update_insns, ftrace_compute_global_level_offset,
7935 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7936 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7937 change to std::vector.
7938 (ftrace_update_insns): Adjust to change to std::vector, change
7939 type of INSN parameter.
7940 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7941 * record-btrace.c (btrace_call_history_insn_range,
7942 btrace_compute_src_line_range,
7943 record_btrace_frame_prev_register): Adjust to change to
7944 std::vector.
7945 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7946 to change to std::vector.
7947
7948 2017-09-03 Tom Tromey <tom@tromey.com>
7949
7950 * corefile.c (reopen_exec_file): Use std::string.
7951
7952 2017-09-03 Tom Tromey <tom@tromey.com>
7953
7954 * compile/compile.c (compile_register_name_mangled): Return
7955 std::string.
7956 * compile/compile-loc2c.c (pushf_register_address): Update.
7957 (pushf_register): Update.
7958 * compile/compile-c-types.c (convert_array): Update.
7959 * compile/compile-c-symbols.c (generate_vla_size): Update.
7960 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7961 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7962 (convert_one_symbol): Update.
7963 (generate_c_for_for_one_variable): Update.
7964 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7965 std::string.
7966 (generate_register_struct): Update.
7967 * compile/compile-internal.h (c_get_range_decl_name): Return a
7968 std::string.
7969 (compile_register_name_mangled): Return std::string.
7970
7971 2017-09-03 Tom Tromey <tom@tromey.com>
7972
7973 * utils.c (perror_string): Return a std::string.
7974 (throw_perror_with_name, perror_warning_with_name): Update.
7975
7976 2017-09-03 Tom Tromey <tom@tromey.com>
7977
7978 * demangle.c (demangle_command): Use std::string,
7979 unique_xmalloc_ptr.
7980
7981 2017-09-03 Tom Tromey <tom@tromey.com>
7982
7983 * cli/cli-setshow.c (do_set_command): Use std::string.
7984
7985 2017-09-03 Tom Tromey <tom@tromey.com>
7986
7987 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7988
7989 2017-09-03 Tom Tromey <tom@tromey.com>
7990
7991 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7992
7993 2017-09-03 Tom Tromey <tom@tromey.com>
7994
7995 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7996 gdb::unique_xmalloc_ptr.
7997
7998 2017-09-03 Tom Tromey <tom@tromey.com>
7999
8000 * thread.c (print_thread_info_1): Use string_printf.
8001 (thread_apply_command, thread_apply_all_command): Use
8002 std::string.
8003
8004 2017-09-03 Tom Tromey <tom@tromey.com>
8005
8006 * valprint.c (val_print_string): Update.
8007 * gdbcore.h (memory_error_message): Return std::string.
8008 * corefile.c (memory_error_message): Return std::string.
8009 (memory_error): Update.
8010 * breakpoint.c (insert_bp_location): Update.
8011
8012 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8013
8014 * target/waitstatus.h (target_waitstatus_to_string): Change
8015 return type to std::string.
8016 * target/waitstatus.c (target_waitstatus_to_string): Return
8017 std::string.
8018 * target.h (target_waitstatus_to_string): Remove declaration.
8019 * infrun.c (resume, clear_proceed_status_thread,
8020 print_target_wait_results, do_target_wait, save_waitstatus,
8021 stop_all_threads): Adjust.
8022 * record-btrace.c (record_btrace_wait): Adjust.
8023 * target-debug.h
8024 (target_debug_print_struct_target_waitstatus_p): Adjust.
8025
8026 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8027
8028 PR gdb/22046
8029 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8030 detection.
8031
8032 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8033
8034 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8035 for setting/unsetting environment variables on the remote target.
8036 (New remote packets): Add entries for QEnvironmentHexEncoded,
8037 QEnvironmentUnset and QEnvironmentReset.
8038 * common/environ.c (gdb_environ::operator=): Extend method to
8039 handle m_user_set_env_list and m_user_unset_env_list.
8040 (gdb_environ::clear): Likewise.
8041 (match_var_in_string): Change type of first parameter from 'char
8042 *' to 'const char *'.
8043 (gdb_environ::set): Extend method to handle
8044 m_user_set_env_list and m_user_unset_env_list.
8045 (gdb_environ::unset): Likewise.
8046 (gdb_environ::clear_user_set_env): New method.
8047 (gdb_environ::user_set_envp): Likewise.
8048 (gdb_environ::user_unset_envp): Likewise.
8049 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8050 m_user_unset_env_list on move constructor/assignment.
8051 (unset): Add new default parameter 'update_unset_list = true'.
8052 (clear_user_set_env): New method.
8053 (user_set_envp): Likewise.
8054 (user_unset_envp): Likewise.
8055 (m_user_set_env_list): New std::set.
8056 (m_user_unset_env_list): Likewise.
8057 * common/rsp-low.c (hex2str): New function.
8058 (bin2hex): New overload for bin2hex function.
8059 * common/rsp-low.c (hex2str): New prototype.
8060 (str2hex): New overload prototype.
8061 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8062 QEnvironmentUnset and QEnvironmentReset.
8063 (remote_protocol_features): Add QEnvironmentHexEncoded,
8064 QEnvironmentUnset and QEnvironmentReset packets.
8065 (send_environment_packet): New function.
8066 (extended_remote_environment_support): Likewise.
8067 (extended_remote_create_inferior): Call
8068 extended_remote_environment_support.
8069 (_initialize_remote): Add QEnvironmentHexEncoded,
8070 QEnvironmentUnset and QEnvironmentReset packet configs.
8071 * unittests/environ-selftests.c (gdb_selftest_env_var):
8072 New variable.
8073 (test_vector_initialization): New function.
8074 (test_init_from_host_environ): Likewise.
8075 (test_reinit_from_host_environ): Likewise.
8076 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8077 Likewise.
8078 (test_unset_set_empty_vector): Likewise.
8079 (test_vector_clear): Likewise.
8080 (test_std_move): Likewise.
8081 (test_move_constructor):
8082 (test_self_move): Likewise.
8083 (test_set_unset_reset): Likewise.
8084 (run_tests): Rewrite in terms of the functions above.
8085
8086 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8087
8088 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8089 (adi_available): Use a temp variable of type CORE_ADDR as argument
8090 3 when calling target_auxv_search.
8091 (adi_normalize_address): Use masks and xor operators to calculate
8092 normalized address.
8093 (adi_read_versions, adi_write_versions, adi_print_versions)
8094 (do_examine, do_assign): Use paddress.
8095
8096 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8097
8098 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8099 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8100 out of loop and add supply of FIR.
8101 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8102 add collect of FIR.
8103
8104 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8105
8106 PR gdb/21827
8107 * cli/cli-script.c (define_command): Don't convert command name
8108 to lower case.
8109
8110 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8111
8112 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8113 Update all callers accordingly. Remove all code blocks handling
8114 the case where DISPP is not NULL.
8115
8116 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8117
8118 PR symtab/22003
8119 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8120 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8121 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8122
8123 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8124
8125 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8126 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8127 (read_comp_units_from_section): New parameter abbrev_section, use
8128 read_and_check_comp_unit_head, allocate signatured_type if needed.
8129 (create_all_comp_units): Update read_comp_units_from_section caller.
8130
8131 2017-08-23 Pedro Alves <palves@redhat.com>
8132
8133 PR remote/21852
8134 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8135 to null_ptid and switch to thread without reading the registers
8136 after adding the inferior.
8137
8138 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8139
8140 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8141 compile-gcc.
8142 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8143 (compile_to_object): Implement compile_gcc.
8144 (_initialize_compile): Install "set compile-gcc". Initialize
8145 compile_gcc.
8146
8147 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8148
8149 * compile/compile.c (compile_to_object): Conditionally call
8150 set_verbose. Conditionally call compile or compile_v0.
8151
8152 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8153
8154 * sparc64-tdep.h: (adi_normalize_address): New export.
8155 * sparc-nat.h: (open_adi_tag_fd): New export.
8156 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8157 * sparc64-linux-tdep.c:
8158 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8159 (sparc64_linux_handle_segmentation_fault): New function.
8160 (sparc64_linux_init_abi): Register
8161 sparc64_linux_handle_segmentation_fault
8162 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8163 (sparc64_addr_bits_remove): New function.
8164 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8165 (MAX_PROC_NAME_SIZE): New macro.
8166 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8167 (sparc64adilist): New variable.
8168 (adi_proc_list): New variable.
8169 (find_adi_info): New function.
8170 (add_adi_info): New function.
8171 (get_adi_info_proc): New function.
8172 (get_adi_info): New function.
8173 (info_adi_command): New function.
8174 (read_maps_entry): New function.
8175 (adi_available): New function.
8176 (adi_normalize_address): New function.
8177 (adi_align_address): New function.
8178 (adi_convert_byte_count): New function.
8179 (adi_tag_fd): New function.
8180 (adi_is_addr_mapped): New function.
8181 (adi_read_versions): New function.
8182 (adi_write_versions): New function.
8183 (adi_print_versions): New function.
8184 (do_examine): New function.
8185 (do_assign): New function.
8186 (adi_examine_command): New function.
8187 (adi_assign_command): New function.
8188 (_initialize_sparc64_adi_tdep): New function.
8189
8190 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8191
8192 * breakpoint.c (breakpoints_info): Rename to ...
8193 (info_breakpoints_command): ... this.
8194 (watchpoints_info): Rename to ...
8195 (info_watchpoints_command): ... this.
8196 (tracepoints_info): Rename to ...
8197 (info_tracepoints_command): ... this.
8198 (_initialize_breakpoint): Adjust.
8199 * dcache.c (dcache_info): Rename to ...
8200 (info_display_command): ... this.
8201 (_initialize_dcache): Adjust.
8202 * frame.h (args_info): Rename to ...
8203 (info_args_command): ... this.
8204 (locals_info): Rename to ...
8205 (info_locals_command): ... this.
8206 * infcmd.c (nofp_registers_info): Rename to ...
8207 (info_registers_command): ... this.
8208 (float_info): Rename to ...
8209 (info_float_command): ... this.
8210 (program_info): Rename to ...
8211 (info_program_command): ... this.
8212 (all_registers_info): Rename to ...
8213 (info_all_registers_command): ... this.
8214 (vector_info): Rename to ...
8215 (info_vector_command): ... this.
8216 (float_info): Rename to ...
8217 (info_float_command): ... this.
8218 (_initialize_infcmd): Adjust.
8219 * inferior.h (term_info): Rename to ...
8220 (info_terminal_command): ... this.
8221 * inflow.c (term_info): Rename to ...
8222 (info_terminal_command): ... this.
8223 (_initialize_inflow): Adjust.
8224 * infrun.c (signals_info): Rename to ...
8225 (info_signals_command): ... this.
8226 (_initialize_infrun): Adjust.
8227 * objc-lang.c (classes_info): Rename to ...
8228 (info_classes_command): ... this.
8229 (selectors_info): Rename to ...
8230 (info_selectors_command): ... this.
8231 (_initialize_objc_language): Adjust.
8232 * printcmd.c (sym_info): Rename to ...
8233 (info_symbol_command): ... this.
8234 (address_info): Rename to ...
8235 (info_address_command): ... this.
8236 (display_info): Rename to ...
8237 (info_display_command): ... this.
8238 (_initialize_printcmd): Adjust.
8239 * reverse.c (bookmarks_info): Rename to ...
8240 (info_breakpoints_command): ... this.
8241 (_initialize_reverse): Adjust.
8242 * ser-go32.c (dos_info): Rename to ...
8243 (info_serial_command): ... this.
8244 (_initialize_ser_dos): Adjust.
8245 * skip.c (skip_info): Rename to ...
8246 (info_skip_command): ... this.
8247 (_initialize_step_skip): Adjust.
8248 * source.c (line_info): Rename to ...
8249 (info_line_command): ... this.
8250 (source_info): Rename to ...
8251 (info_source_command)
8252 * stack.c (frame_info): Rename to ...
8253 (info_frame_command): ... this.
8254 (locals_info): Rename to ...
8255 (info_locals_command): ... this.
8256 (args_info): Rename to ...
8257 (info_args_command): ... this.
8258 (_initialize_stack): Adjust.
8259 * symtab.c (sources_info): Rename to ...
8260 (info_sources_command): ... this.
8261 (variables_info): Rename to ...
8262 (info_variables_command): ... this.
8263 (functions_info): Rename to ...
8264 (info_functions_command): ... this.
8265 (types_info): Rename to ...
8266 (info_types_command): ... this.
8267 (_initialize_symtab): Adjust.
8268 * target.c (target_info): Rename to ...
8269 (info_target_command): ... this.
8270 (initialize_targets): Adjust.
8271 * tracepoint.c (tvariables_info): Rename to ...
8272 (info_tvariables_command): ... this.
8273 (scope_info): Rename to ...
8274 (info_scope_command): ... this.
8275 (trace_dump_actions): Adjust.
8276 (_initialize_tracepoint): Adjust.
8277
8278 2017-08-22 Tom Tromey <tom@tromey.com>
8279
8280 * breakpoint.h (install_breakpoint): Update.
8281 * breakpoint.c (add_solib_catchpoint): Update.
8282 (install_breakpoint): Change argument to a std::unique_ptr.
8283 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8284 (create_breakpoint_sal, create_breakpoint): Update.
8285 (watch_command_1, catch_exec_command_1)
8286 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8287 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8288 Return the breakpoint.
8289 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8290 (new_single_step_breakpoint): Update.
8291 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8292 std::unique_ptr.
8293 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8294 std::unique_ptr.
8295 * break-catch-sig.c (create_signal_catchpoint): Use
8296 std::unique_ptr.
8297 * ada-lang.c (create_ada_exception_catchpoint): Use
8298 std::unique_ptr.
8299
8300 2017-08-22 Tom Tromey <tom@tromey.com>
8301
8302 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8303
8304 2017-08-22 Tom Tromey <tom@tromey.com>
8305
8306 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8307 (lookup_partial_symbol): Update.
8308
8309 2017-08-22 Tom Tromey <tom@tromey.com>
8310
8311 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8312 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8313 (find_and_open_source, symtab_to_fullname): Update.
8314 * psymtab.c (psymtab_to_fullname): Update.
8315
8316 2017-08-22 Tom Tromey <tom@tromey.com>
8317
8318 * exec.c (exec_file_attach): Update.
8319 * linux-thread-db.c (try_thread_db_load): Update.
8320 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8321 * utils.c (gdb_realpath): Change return type.
8322 (gdb_realpath_keepfile): Update.
8323 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8324 (_initialize_utils): Register the new self test.
8325 * source.c (openp): Update.
8326 (find_and_open_source): Update.
8327 * nto-tdep.c (nto_find_and_open_solib): Update.
8328 * main.c (set_gdb_data_directory): Update.
8329 (captured_main_1): Update.
8330 * dwarf2read.c (dwarf2_get_dwz_file): Update
8331 (dw2_map_symbol_filenames): Update.
8332 * auto-load.c (auto_load_safe_path_vec_update): Update.
8333 (filename_is_in_auto_load_safe_path_vec): Change type of
8334 "filename_realp".
8335 (auto_load_objfile_script): Update.
8336 (file_is_auto_load_safe): Update. Use std::string.
8337 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8338
8339 2017-08-22 Tom Tromey <tom@tromey.com>
8340
8341 * utils.c (gdb_realpath_keepfile): Return a
8342 gdb::unique_xmalloc_ptr.
8343 * exec.c (exec_file_attach): Update.
8344 * utils.h (gdb_realpath_keepfile): Return a
8345 gdb::unique_xmalloc_ptr.
8346
8347 2017-08-22 Tom Tromey <tom@tromey.com>
8348
8349 * compile/compile.c (compile_file_command): Use
8350 gdb::unique_xmalloc_ptr, std::string.
8351 * utils.c (gdb_abspath): Change return type.
8352 * source.c (openp): Update.
8353 * objfiles.c (allocate_objfile): Update.
8354 * main.c (set_gdb_data_directory): Update.
8355 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8356
8357 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8358
8359 * cli-cmds.c (list_commands): List actual code around more than
8360 one location.
8361
8362 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8363
8364 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8365
8366 2017-08-21 Pedro Alves <palves@redhat.com>
8367
8368 PR gdb/19487
8369 * c-exp.y (variable production): Handle function aliases.
8370 * minsyms.c (msymbol_is_text): New function.
8371 * minsyms.h (msymbol_is_text): Declare.
8372 * symtab.c (find_function_alias_target): New function.
8373 * symtab.h (find_function_alias_target): Declare.
8374
8375 2017-08-21 Pedro Alves <palves@redhat.com>
8376
8377 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8378 typedefs.
8379 * typeprint.c (whatis_exp): If handling "whatis", and expression
8380 is OP_TYPE, strip one typedef level. Otherwise don't strip
8381 typedefs here.
8382 * valops.c (value_cast): Save "to" type before resolving
8383 stubs/typedefs. Use that type as resulting value's type.
8384
8385 2017-08-18 Tom Tromey <tom@tromey.com>
8386 Pedro Alves <palves@redhat.com>
8387
8388 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8389 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8390 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8391 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8392 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8393 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8394 (linux_get_siginfo_data): Add "thread" argument. Use
8395 scoped_restore.
8396 * linux-nat.c (linux_child_follow_fork)
8397 (check_stopped_by_watchpoint): Use scoped_restore.
8398 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8399 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8400 (restore_inferior_ptid, save_inferior_ptid): Remove.
8401 * btrace.c (btrace_fetch): Use scoped_restore.
8402 * bsd-uthread.c (bsd_uthread_fetch_registers)
8403 (bsd_uthread_store_registers): Use scoped_restore.
8404 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8405 scoped_restore.
8406 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8407 (aix_thread_xfer_partial): Use scoped_restore.
8408 * inferior.h (save_inferior_ptid): Remove.
8409
8410 2017-08-18 Yao Qi <yao.qi@linaro.org>
8411
8412 PR tdep/21818
8413 * arm-tdep.c (gdb_print_insn_arm): Mark
8414 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8415
8416 2017-08-18 Yao Qi <yao.qi@linaro.org>
8417
8418 * NEWS: Mention GDBserver's new option "--selftest".
8419 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8420 * selftest.c: Move it to common/selftest.c.
8421 * selftest.h: Move it to common/selftest.h.
8422 * selftest-arch.c (reset): New function.
8423 (tests_with_arch): Call reset.
8424
8425 2017-08-18 Yao Qi <yao.qi@linaro.org>
8426
8427 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8428 instead of exception_fprintf and printf_filtered.
8429
8430 2017-08-18 Yao Qi <yao.qi@linaro.org>
8431
8432 * selftest.c (register_self_test): Rename it to
8433 selftests::register_test.
8434 (run_self_tests): selftest::run_tests.
8435 * selftest.h: Update declarations.
8436 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8437 selftests::register_test_foreach_arch.
8438 * selftest-arch.h: Update declaration.
8439 * aarch64-tdep.c: Update.
8440 * arm-tdep.c: Likewise.
8441 * disasm-selftests.c: Likewise.
8442 * dwarf2loc.c: Likewise.
8443 * dwarf2-frame.c: Likewise.
8444 * findvar.c: Likewise.
8445 * gdbarch-selftests.c: Likewise.
8446 * maint.c (maintenance_selftest): Likewise.
8447 * regcache.c: Likewise.
8448 * rust-exp.y: Likewise.
8449 * selftest-arch.c: Likewise.
8450 * unittests/environ-selftests.c: Likewise.
8451 * unittests/function-view-selftests.c: Likewise.
8452 * unittests/offset-type-selftests.c: Likewise.
8453 * unittests/optional-selftests.c: Likewise.
8454 * unittests/scoped_restore-selftests.c: Likewise.
8455 * utils-selftests.c: Likewise.
8456
8457 2017-08-17 Pedro Alves <palves@redhat.com>
8458
8459 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8460 local.
8461
8462 2017-08-17 Pedro Alves <palves@redhat.com>
8463
8464 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8465 field.
8466 (reset_die_in_process): Delete, replaced by ...
8467 (process_die_scope): ... this new class. Make it responsible for
8468 freeing cu->line_header too.
8469 (process_die): Use process_die_scope.
8470 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8471 cu->line_header_die_owner. Don't release the line header if it's
8472 owned by the CU.
8473 (setup_type_unit_groups): Make the CU/DIE own the line header.
8474 Don't release the line header here.
8475
8476 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8477
8478 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8479
8480 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8481
8482 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8483 Single-Key mode
8484
8485 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8486
8487 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8488 mode command list.
8489
8490 2017-08-15 Stafford Horne <shorne@gmail.com>
8491
8492 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8493
8494 2017-08-15 Stafford Horne <shorne@gmail.com>
8495
8496 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8497
8498 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8499
8500 PR gdb/21954
8501 * infcmd.c (unset_environment_command): Use the 'clear' method on
8502 the environment instead of resetting it.
8503
8504 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8505
8506 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8507 platforms.
8508
8509 2017-08-14 Tom Tromey <tom@tromey.com>
8510
8511 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8512 (print_binary_chars): Likewise.
8513 (BITS_IN_BYTES): Remove.
8514
8515 2017-08-14 Tom Tromey <tom@tromey.com>
8516
8517 PR gdb/21675
8518 * valprint.c (LOW_ZERO): Change value to 034.
8519 (print_octal_chars): Add static_asserts for octal constants.
8520 * printcmd.c (print_scalar_formatted): Add 'd' case.
8521
8522 2017-08-11 Tom Tromey <tom@tromey.com>
8523
8524 * symfile.c (add_symbol_file_command): Use std::vector.
8525
8526 2017-08-14 Tom Tromey <tom@tromey.com>
8527
8528 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8529 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8530 std::move.
8531 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8532
8533 2017-08-11 Pedro Alves <palves@redhat.com>
8534
8535 * infrun.c (process_event_stop_test): Adjust
8536 function_name_is_marked_for_skip call.
8537 * skip.c: Include <list>.
8538 (skiplist_entry): Make it a class with private fields, and
8539 getters/setters.
8540 (skiplist_entry_chain): Delete.
8541 (skiplist_entries): New.
8542 (skiplist_entry_count): Delete.
8543 (highest_skiplist_entry_num): New.
8544 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8545 (add_skiplist_entry): Delete.
8546 (skiplist_entry::skiplist_entry): New.
8547 (skiplist_entry::add_entry): New.
8548 (skip_file_command, skip_function): Adjust.
8549 (compile_skip_regexp): Delete.
8550 (skip_command): Don't compile regexp here. Adjust to use
8551 skiplist_entry::add_entry.
8552 (skip_info): Adjust to use range-for and getters.
8553 (skip_enable_command, skip_disable_command): Adjust to use
8554 range-for and setters.
8555 (skip_delete_command): Adjust to use std::list.
8556 (add_skiplist_entry): Delete.
8557 (skip_file_p): Delete, refactored as ...
8558 (skiplist_entry::do_skip_file_p): ... this new method.
8559 (skip_gfile_p): Delete, refactored as ...
8560 (skiplist_entry::do_gskip_file_p): ... this new method.
8561 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8562 (skiplist_entry::skip_function_p): ... this new method.
8563 (function_name_is_marked_for_skip): Now returns bool, and takes
8564 the function sal by const reference. Adjust to use range-for and
8565 skiplist_entry methods.
8566 (_initialize_step_skip): Remove references to
8567 skiplist_entry_chain, skiplist_entry_count.
8568 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8569 takes the function sal by const reference.
8570
8571 2017-08-11 Yao Qi <yao.qi@linaro.org>
8572
8573 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8574 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8575 (dwarf2_frame_cache):
8576 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8577 RETURN_MASK_ALL and set *this_case to NULL.
8578 * frame-unwind.h: Update comments.
8579
8580 2017-08-11 Yao Qi <yao.qi@linaro.org>
8581
8582 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8583 (dwarf2_frame_state_copy_regs): Remove.
8584 (dwarf2_frame_state_free_regs): Remove.
8585 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8586 (dwarf2_restore_rule): Call method .alloc_regs instead of
8587 dwarf2_frame_state_alloc_regs.
8588 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8589 constructor. Call std::move.
8590 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8591 (dwarf2_frame_cache): Likewise.
8592
8593 [GDB_SELF_TEST]: Include selftest.h and
8594 selftest-arch.h.
8595 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8596 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8597 execute_cfa_program_test.
8598
8599 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8600 copy ctor, assignment operator, move assignment.
8601 <alloc_regs>: New method.
8602 <swap>: New method.
8603 (struct dwarf2_frame_state): Delete dtor.
8604 (dwarf2_frame_state_alloc_regs): Remove declaration.
8605 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8606 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8607
8608 2017-08-11 Yao Qi <yao.qi@linaro.org>
8609
8610 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8611 (dwarf2_frame_state::dwarf2_frame_state): New.
8612 (dwarf2_frame_state::~dwarf2_frame_state): New.
8613 (dwarf2_fetch_cfa_info): Update.
8614 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8615 rather than a pointer. Update code.
8616 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8617 dtor.
8618 <data_align, code_align, retaddr_column>: Change them to const.
8619 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8620 to bool.
8621
8622 2017-08-11 Yao Qi <yao.qi@linaro.org>
8623
8624 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8625 <loc.exp>: New field.
8626 * dwarf2-frame.c (execute_cfa_program): Update.
8627 (dwarf2_frame_prev_register): Update.
8628
8629 2017-08-10 Pedro Alves <palves@redhat.com>
8630
8631 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8632
8633 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8634
8635 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8636 (fbsd_pending_children): Use std::list.
8637 (fbsd_remember_child): Likewise.
8638 (fbsd_is_child_pending): Likewise.
8639 (fbsd_pending_vfork_done): Use std::forward_list.
8640 (fbsd_add_vfork_done): Likewise.
8641 (fbsd_is_vfork_done_pending): Likewise.
8642 (fbsd_next_vfork_done): Likewise.
8643
8644 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8645
8646 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8647 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8648 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8649 for `mapfilename'.
8650 (fbsd_xfer_partial): Use gdb::byte_vector.
8651 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8652
8653 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8654
8655 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8656 "filestuff.h".
8657 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8658
8659 2017-08-09 Tom Tromey <tom@tromey.com>
8660
8661 * skip.c (skiplist_entry): New constructor.
8662 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8663 (skiplist_entry::file_is_glob): Now bool.
8664 (skiplist_entry::file, skiplist_entry::function): Now
8665 std::string.
8666 (make_skip_entry): Return a unique_ptr. Use new.
8667 (free_skiplist_entry, free_skiplist_entry_cleanup)
8668 (make_free_skiplist_entry_cleanup): Remove.
8669 (skip_command, skip_disable_command, add_skiplist_entry)
8670 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8671 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8672 (function_name_is_marked_for_skip): Update.
8673 (skip_delete_command): Update. Use delete.
8674
8675 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8676
8677 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8678 (aarch64_linux_core_read_description): New function.
8679 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8680
8681 2017-08-09 Pedro Alves <palves@redhat.com>
8682
8683 * cp-name-parser.y (cp_comp_to_string): Return a
8684 gdb::unique_xmalloc_ptr<char>.
8685 * cp-support.c (replace_typedefs_qualified_name)
8686 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8687 (cp_canonicalize_string_full): Use op= instead of explicit
8688 convertion.
8689 (cp_class_name_from_physname, method_name_from_physname)
8690 (cp_func_name, cp_remove_params): Adjust to use
8691 gdb::unique_xmalloc_ptr<char>.
8692 * cp-support.h (cp_comp_to_string): Return a
8693 gdb::unique_xmalloc_ptr<char>.
8694 * python/py-type.c (typy_lookup_type): Adjust to use
8695 gdb::unique_xmalloc_ptr<char>.
8696
8697 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8698
8699 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8700
8701 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8702 Yao Qi <yao.qi@linaro.org>
8703
8704 * cp-support.c (cp_canonicalize_string_full): Use
8705 gdb::unique_xmalloc_ptr<char>.
8706 (cp_canonicalize_string): Likewise.
8707
8708 2017-08-09 Yao Qi <yao.qi@linaro.org>
8709
8710 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8711 * regformats/i386/amd64-avx-avx512.dat: Remove.
8712 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8713 * regformats/i386/amd64-avx-mpx.dat:Remove.
8714 * regformats/i386/amd64-avx.dat: Remove.
8715 * regformats/i386/amd64-mpx.dat: Remove.
8716 * regformats/i386/i386-avx-avx512.dat: Remove.
8717 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8718 * regformats/i386/i386-avx-mpx.dat: Remove.
8719 * regformats/i386/i386-mmx.dat: Remove.
8720 * regformats/i386/i386-mpx.dat: Remove.
8721
8722 2017-08-09 Yao Qi <yao.qi@linaro.org>
8723
8724 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8725 * amd64-tdep.c: Don't include features/i386/x32*.c.
8726 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8727 functions.
8728 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8729 and i386/x32-avx-avx512.
8730 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8731 and i386/x32.xml.
8732 * features/i386/x32-avx-avx512.c: Removed.
8733 * features/i386/x32-avx-avx512.xml: Removed.
8734 * features/i386/x32-avx.c: Removed.
8735 * features/i386/x32-avx.xml: Removed.
8736 * features/i386/x32.c: Removed.
8737 * features/i386/x32.xml: Removed.
8738 * regformats/i386/x32-avx-avx512.dat: Removed.
8739 * regformats/i386/x32-avx.dat: Removed.
8740 * regformats/i386/x32.dat: Removed.
8741
8742 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8743
8744 PR breakpoints/21886
8745 * mem-break.c (default_memory_insert_breakpoint): Use
8746 `->placed_address' rather than `->reqstd_address' for the
8747 breakpoint location.
8748
8749 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8750
8751 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8752 assertions.
8753
8754 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8755
8756 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8757 a union of `tdep_info', `tdesc_data' and `id'.
8758 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8759 rather than `info.tdep_info'.
8760 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8761 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8762 * i386-tdep.c (i386_gdbarch_init): Likewise.
8763 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8764 * mips-tdep.c (mips_gdbarch_init): Likewise.
8765 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8766 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8767 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8768 `info.tdep_info'.
8769 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8770 `info.tdep_info'.
8771 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8772 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8773 `info.tdep_info'.
8774 * spu-tdep.c (spu_gdbarch_init): Likewise.
8775 * gdbarch.h: Regenerate.
8776
8777 2017-08-07 Leszek Swirski <leszeks@google.com>
8778
8779 PR symtab/20899
8780 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8781
8782 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8783
8784 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8785 (gdbsim_open): Rename gdb_argv args object to argv.
8786
8787 2017-08-05 Tom Tromey <tom@tromey.com>
8788
8789 * compile/compile-object-load.c (compile_object_load): Use
8790 gdb::unique_xmalloc_ptr.
8791 * cli/cli-dump.c (scan_filename): Rename from
8792 scan_filename_with_cleanup. Change return type.
8793 (scan_expression): Rename from scan_expression_with_cleanup.
8794 Change return type.
8795 (dump_memory_to_file, dump_value_to_file, restore_command):
8796 Use gdb::unique_xmalloc_ptr. Update.
8797 * cli/cli-cmds.c (find_and_open_script): Use
8798 gdb::unique_xmalloc_ptr.
8799 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8800 * symmisc.c (maintenance_print_symbols)
8801 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8802 * symfile.c (symfile_bfd_open, generic_load)
8803 (add_symbol_file_command, remove_symbol_file_command): Use
8804 gdb::unique_xmalloc_ptr.
8805 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8806 * psymtab.c (maintenance_print_psymbols): Use
8807 gdb::unique_xmalloc_ptr.
8808 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8809 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8810 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8811 (reload_shared_libraries_1): Likewise.
8812
8813 2017-08-05 Tom Tromey <tom@tromey.com>
8814
8815 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8816 (rust_op_vector, rust_set_vector): New typedefs.
8817 (current_parser): New global.
8818 (work_obstack): Change to pointer type. Update all users.
8819 (rust_ast, pstate): Remove globals.
8820 (struct rust_parser): New.
8821 (%union) <params, field_inits>: Change type.
8822 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8823 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8824 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8825 (convert_params_to_types, convert_params_to_expression): Change
8826 type of "params".
8827 (ast_string): Change type of "fields".
8828 (rust_parse): Make a rust_parser. Remove cleanups.
8829 (rust_lex_tests): Make and install an auto_obstack.
8830
8831 2017-08-04 Yao Qi <yao.qi@linaro.org>
8832
8833 * configure.srv (ipa_x32_linux_regobj): New.
8834 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8835 instead of X86_TDESC_AVX512.
8836 (initialize_low_tracepoint): Call
8837 init_registers_x32_avx_avx512_linux.
8838
8839 2017-08-04 Yao Qi <yao.qi@linaro.org>
8840
8841 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8842
8843 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8844
8845 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8846
8847 2017-08-03 Tom Tromey <tom@tromey.com>
8848
8849 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8850 Remove.
8851 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8852
8853 2017-08-03 Tom Tromey <tom@tromey.com>
8854
8855 * python/py-param.c (compute_enum_values): Use gdb_argv.
8856
8857 2017-08-03 Tom Tromey <tom@tromey.com>
8858
8859 * utils.h (struct gdb_argv_deleter): New.
8860 (gdb_argv): New class.
8861 * utils.c (gdb_argv::reset): New method.
8862 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8863 * tracefile.c (tsave_command): Use gdb_argv.
8864 * top.c (new_ui_command): Use gdb_argv.
8865 * symmisc.c (maintenance_print_symbols)
8866 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8867 * symfile.c (symbol_file_command, generic_load)
8868 (remove_symbol_file_command): Use gdb_argv.
8869 * stack.c (backtrace_command): Use gdb_argv.
8870 * source.c (add_path, show_substitute_path_command)
8871 (unset_substitute_path_command, set_substitute_path_command):
8872 Use gdb_argv.
8873 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8874 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8875 * remote.c (extended_remote_run, remote_put_command)
8876 (remote_get_command, remote_delete_command): Use gdb_argv.
8877 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8878 (gdbsim_open): Use gdb_argv.
8879 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8880 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8881 * procfs.c (procfs_info_proc): Use gdb_argv.
8882 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8883 * infrun.c (handle_command): Use gdb_argv.
8884 * inferior.c (add_inferior_command, clone_inferior_command):
8885 Use gdb_argv.
8886 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8887 * exec.c (exec_file_command): Use gdb_argv.
8888 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8889 * compile/compile.c (build_argc_argv): Use gdb_argv.
8890
8891 2017-08-03 Tom Tromey <tom@tromey.com>
8892
8893 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8894
8895 2017-08-03 Tom Tromey <tom@tromey.com>
8896
8897 * python/python.c (compute_python_string): Return std::string.
8898 (gdbpy_eval_from_control_command): Update.
8899 (do_start_initialization): Use std::string.
8900 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8901 xstrprintf.
8902 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8903 xstrprintf.
8904
8905 2017-08-03 Tom Tromey <tom@tromey.com>
8906
8907 * top.h (do_restore_instream_cleanup): Remove.
8908 * top.c (do_restore_instream_cleanup): Remove.
8909 (read_command_file): Use scoped_restore.
8910 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8911
8912 2017-08-03 Tom Tromey <tom@tromey.com>
8913
8914 * cli/cli-script.c (execute_user_command)
8915 (execute_control_command): Use scoped_restore.
8916
8917 2017-08-03 Tom Tromey <tom@tromey.com>
8918
8919 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8920 (execute_user_command): Remove user_call_depth; use
8921 user_args_stack's size instead.
8922
8923 2017-08-03 Tom Tromey <tom@tromey.com>
8924
8925 * top.h (in_user_command): Remove.
8926 * top.c (in_user_command): Remove.
8927 * cli/cli-script.c (do_restore_user_call_depth)
8928 (execute_user_command): Update.
8929
8930 2017-08-03 Tom Tromey <tom@tromey.com>
8931
8932 * valops.c (search_struct_method): Use gdb::byte_vector.
8933 * valarith.c (value_concat): Use std::vector.
8934 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8935 (simple_search_memory): Likewise.
8936 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8937 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8938 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8939 * elfread.c (elf_rel_plt_read): Use std::string.
8940 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8941 * cli/cli-dump.c (restore_section_callback): Use
8942 gdb::byte_vector.
8943
8944 2017-08-03 Tom Tromey <tom@tromey.com>
8945
8946 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8947
8948 2017-08-03 Tom Tromey <tom@tromey.com>
8949
8950 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8951 (tui_register_format): Use scoped_restore.
8952
8953 2017-08-03 Tom Tromey <tom@tromey.com>
8954
8955 * reverse.c (exec_direction_default): Remove.
8956 (exec_reverse_once): Use scoped_restore.
8957 * remote.c (restore_remote_timeout): Remove.
8958 (remote_flash_erase, remote_flash_write, remote_flash_done)
8959 (readchar, remote_serial_write): Use scoped_restore.
8960 * cli/cli-script.c (struct source_cleanup_lines_args)
8961 (source_cleanup_lines): Remove.
8962 (script_from_file): Use scoped_restore.
8963 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8964 (source_command): Use scoped_restore.
8965
8966 2017-08-03 Tom Tromey <tom@tromey.com>
8967
8968 * utils.h (make_cleanup_free_so): Remove.
8969 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8970 * solist.h (struct so_deleter): New.
8971 (so_list_up): New typedef.
8972 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8973
8974 2017-08-03 Tom Tromey <tom@tromey.com>
8975
8976 * utils.h (make_cleanup_restore_current_language): Remove.
8977 * utils.c (do_restore_current_language)
8978 (make_cleanup_restore_current_language): Remove.
8979 * parse.c (parse_exp_in_context_1)
8980 (parse_expression_with_language): Use
8981 scoped_restore_current_language.
8982 * mi/mi-main.c (mi_cmd_execute): Use
8983 scoped_restore_current_language.
8984 * language.h (scoped_restore_current_language): New class.
8985
8986 2017-08-03 Tom Tromey <tom@tromey.com>
8987
8988 * compile/compile.c (cleanup_unlink_file): Remove.
8989 (compile_to_object): Use gdb::unlinker.
8990 (eval_compile_command): Likewise.
8991
8992 2017-08-03 Tom Tromey <tom@tromey.com>
8993
8994 * utils.h (make_cleanup_fclose): Remove.
8995 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8996
8997 2017-08-03 Tom Tromey <tom@tromey.com>
8998
8999 * top.c (open_terminal_stream): Return gdb_file_up.
9000 (new_ui_command): Update.
9001
9002 2017-08-03 Tom Tromey <tom@tromey.com>
9003
9004 * source.c (print_source_lines_base, forward_search_command)
9005 (reverse_search_command): Use gdb_file_up.
9006
9007 2017-08-03 Tom Tromey <tom@tromey.com>
9008
9009 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9010
9011 2017-08-03 Tom Tromey <tom@tromey.com>
9012
9013 * cli/cli-cmds.c (find_and_open_script): Change return type.
9014 Remove "streamp" and "full_path" parameters.
9015 (source_script_with_search): Update.
9016 * auto-load.c (source_script_file): Update.
9017 * cli/cli-cmds.h (find_and_open_script): Change type.
9018 (open_script): New struct.
9019
9020 2017-08-03 Tom Tromey <tom@tromey.com>
9021
9022 * xml-support.c (xml_fetch_content_from_file): Update.
9023 * ui-file.c (stdio_file::open): Update.
9024 * tracefile-tfile.c (tfile_start): Update.
9025 * remote.c (remote_file_put, remote_file_get): Update.
9026 * nat/linux-procfs.c (linux_proc_get_int)
9027 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9028 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9029 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9030 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9031 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9032 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9033 * linux-nat.c (linux_proc_pending_signals): Update.
9034 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9035 (file_closer): Remove.
9036 * compile/compile.c (compile_to_object): Update.
9037 * common/filestuff.h (struct gdb_file_deleter): New.
9038 (gdb_file_up): New typedef.
9039 (gdb_fopen_cloexec): Change return type.
9040 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9041 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9042 (dump_binary_file, restore_binary_file): Update.
9043 * auto-load.c (auto_load_objfile_script_1): Update.
9044
9045 2017-08-03 Tom Tromey <tom@tromey.com>
9046
9047 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9048 (info_static_tracepoint_markers_command): Likewise.
9049 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9050 * skip.c (skip_info): Use ui_out_emit_table.
9051 * progspace.c (print_program_space): Use ui_out_emit_table.
9052 * osdata.c (info_osdata): Use ui_out_emit_table.
9053 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9054 ui_out_emit_table.
9055 * linux-thread-db.c (info_auto_load_libthread_db): Use
9056 ui_out_emit_table.
9057 * inferior.c (print_inferior): Use ui_out_emit_table.
9058 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9059 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9060 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9061 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9062 * ui-out.h (class ui_out_emit_table): New.
9063
9064 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9065
9066 * mips-tdep.c (mips_fpu_type_str): New function.
9067 (mips_dump_tdep): Call it.
9068
9069 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9070
9071 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9072 `->mips_fpu_type'.
9073
9074 2017-07-31 Xavier Roirand <roirand@adacore.com>
9075
9076 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9077
9078 2017-07-27 Xavier Roirand <roirand@adacore.com>
9079
9080 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9081
9082 2017-07-26 Yao Qi <yao.qi@linaro.org>
9083
9084 * cli/cli-cmds.c (maintenancechecklist): New variable.
9085 * gdbcmd.h (maintenancechecklist): Declare it.
9086 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9087 Call i386_linux_read_description with different masks.
9088 * maint.c (maintenance_check_command): New function.
9089 (_initialize_maint_cmds): Call add_prefix_cmd.
9090 * target-descriptions.c (tdesc_reg): override operator != and ==.
9091 (tdesc_type): Likewise.
9092 (tdesc_feature): Likewise.
9093 (target_desc): Likewise.
9094 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9095 (maintenance_check_xml_descriptions): New function.
9096 (_initialize_target_descriptions) Add command "xml-descriptions".
9097 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9098
9099 2017-07-26 Yao Qi <yao.qi@linaro.org>
9100
9101 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9102 Include features/i386/32bit-*.c.
9103 (i386_linux_read_description): Generate target description if it
9104 doesn't exist.
9105 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9106 functions.
9107 * features/i386/32bit-linux.c: Re-generated.
9108 * features/i386/32bit-sse.c: Likewise.
9109 * target-descriptions.c (print_c_feature::visit): Print code to
9110 set register number if needed.
9111 (print_c_feature) <m_next_regnum>: New field.
9112
9113 2017-07-26 Yao Qi <yao.qi@linaro.org>
9114
9115 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9116 (FEATURE_XMLFILES): New.
9117 (FEATURE_CFILES): New.
9118 New rules.
9119 (clean-cfiles): Remove generated c files.
9120 * features/i386/32bit-avx.c: Generated.
9121 * features/i386/32bit-avx512.c: Generated.
9122 * features/i386/32bit-core.c: Generated.
9123 * features/i386/32bit-linux.c: Generated.
9124 * features/i386/32bit-mpx.c: Generated.
9125 * features/i386/32bit-pkeys.c: Generated.
9126 * features/i386/32bit-sse.c: Generated.
9127 * target-descriptions.c: Include algorithm.
9128 (tdesc_element_visitor): Add method visit_end.
9129 (print_c_tdesc): Implement visit_end.
9130 (print_c_tdesc:: m_filename_after_features): Move it to
9131 protected.
9132 (print_c_feature): New class.
9133 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9134 name starts with "i386/32bit-".
9135
9136 2017-07-26 Yao Qi <yao.qi@linaro.org>
9137
9138 * target-descriptions.c (tdesc_element_visitor): New class.
9139 (tdesc_element): New class.
9140 (tdesc_reg): Inherit from tdesc_element.
9141 (tdesc_reg::accept): New function.
9142 (tdesc_type): Inherit from tdesc_element.
9143 (tdesc_type::accept): New function.
9144 (tdesc_feature): Inherit from tdesc_element.
9145 (tdesc_feature::accept): New function.
9146 (target_desc): Inherit from tdesc_element.
9147 (target_desc::target_desc): New.
9148 (target_desc::~target_desc): New.
9149 (target_desc::accept): New.
9150 (allocate_target_description): Use new.
9151 (free_target_description): Use delete.
9152 (print_c_tdesc): New class.
9153 (maint_print_c_tdesc_cmd): Adjust.
9154
9155 * features/aarch64.c: Re-generated.
9156 * features/arc-arcompact.c: Re-generated.
9157 * features/arc-v2.c: Re-generated.
9158 * features/arm/arm-with-iwmmxt.c: Re-generated.
9159 * features/arm/arm-with-m.c: Re-generated.
9160 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9161 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9162 * features/arm/arm-with-neon.c: Re-generated.
9163 * features/arm/arm-with-vfpv2.c: Re-generated.
9164 * features/arm/arm-with-vfpv3.c: Re-generated.
9165 * features/i386/amd64-avx-avx512.c: Re-generated.
9166 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9167 * features/i386/amd64-avx.c: Re-generated.
9168 * features/i386/amd64-avx-linux.c: Re-generated.
9169 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9170 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9171 * features/i386/amd64-avx-mpx.c: Re-generated.
9172 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9173 * features/i386/amd64.c: Re-generated.
9174 * features/i386/amd64-linux.c: Re-generated.
9175 * features/i386/amd64-mpx.c: Re-generated.
9176 * features/i386/amd64-mpx-linux.c: Re-generated.
9177 * features/i386/i386-avx-avx512.c: Re-generated.
9178 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9179 * features/i386/i386-avx.c: Re-generated.
9180 * features/i386/i386-avx-linux.c: Re-generated.
9181 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9182 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9183 * features/i386/i386-avx-mpx.c: Re-generated.
9184 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9185 * features/i386/i386.c: Re-generated.
9186 * features/i386/i386-linux.c: Re-generated.
9187 * features/i386/i386-mmx.c: Re-generated.
9188 * features/i386/i386-mmx-linux.c: Re-generated.
9189 * features/i386/i386-mpx.c: Re-generated.
9190 * features/i386/i386-mpx-linux.c: Re-generated.
9191 * features/i386/x32-avx-avx512.c: Re-generated.
9192 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9193 * features/i386/x32-avx.c: Re-generated.
9194 * features/i386/x32-avx-linux.c: Re-generated.
9195 * features/i386/x32.c: Re-generated.
9196 * features/i386/x32-linux.c: Re-generated.
9197 * features/microblaze.c: Re-generated.
9198 * features/microblaze-with-stack-protect.c: Re-generated.
9199 * features/mips64-dsp-linux.c: Re-generated.
9200 * features/mips64-linux.c: Re-generated.
9201 * features/mips-dsp-linux.c: Re-generated.
9202 * features/mips-linux.c: Re-generated.
9203 * features/nds32.c: Re-generated.
9204 * features/nios2.c: Re-generated.
9205 * features/nios2-linux.c: Re-generated.
9206 * features/rs6000/powerpc-32.c: Re-generated.
9207 * features/rs6000/powerpc-32l.c: Re-generated.
9208 * features/rs6000/powerpc-403.c: Re-generated.
9209 * features/rs6000/powerpc-403gc.c : Re-generated.
9210 * features/rs6000/powerpc-405.c: Re-generated.
9211 * features/rs6000/powerpc-505.c: Re-generated.
9212 * features/rs6000/powerpc-601.c: Re-generated.
9213 * features/rs6000/powerpc-602.c: Re-generated.
9214 * features/rs6000/powerpc-603.c: Re-generated.
9215 * features/rs6000/powerpc-604.c: Re-generated.
9216 * features/rs6000/powerpc-64.c: Re-generated.
9217 * features/rs6000/powerpc-64l.c: Re-generated.
9218 * features/rs6000/powerpc-7400.c: Re-generated.
9219 * features/rs6000/powerpc-750.c: Re-generated.
9220 * features/rs6000/powerpc-860.c: Re-generated.
9221 * features/rs6000/powerpc-altivec32.c: Re-generated.
9222 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9223 * features/rs6000/powerpc-altivec64.c: Re-generated.
9224 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9225 * features/rs6000/powerpc-cell32l.c: Re-generated.
9226 * features/rs6000/powerpc-cell64l.c: Re-generated.
9227 * features/rs6000/powerpc-e500.c: Re-generated.
9228 * features/rs6000/powerpc-e500l.c: Re-generated.
9229 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9230 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9231 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9232 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9233 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9234 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9235 * features/rs6000/powerpc-vsx32.c: Re-generated.
9236 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9237 * features/rs6000/powerpc-vsx64.c: Re-generated.
9238 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9239 * features/rs6000/rs6000.c: Re-generated.
9240 * features/s390-linux32.c: Re-generated.
9241 * features/s390-linux32v1.c: Re-generated.
9242 * features/s390-linux32v2.c: Re-generated.
9243 * features/s390-linux64.c: Re-generated.
9244 * features/s390-linux64v1.c: Re-generated.
9245 * features/s390-linux64v2.c: Re-generated.
9246 * features/s390-te-linux64.c: Re-generated.
9247 * features/s390-tevx-linux64.c: Re-generated.
9248 * features/s390-vx-linux64.c: Re-generated.
9249 * features/s390x-linux64.c: Re-generated.
9250 * features/s390x-linux64v1.c: Re-generated.
9251 * features/s390x-linux64v2.c: Re-generated.
9252 * features/s390x-te-linux64.c: Re-generated.
9253 * features/s390x-tevx-linux64.c: Re-generated.
9254 * features/s390x-vx-linux64.c: Re-generated.
9255 * features/sparc/sparc32-solaris.c: Re-generated.
9256 * features/sparc/sparc64-solaris.c: Re-generated.
9257 * features/tic6x-c62x.c: Re-generated.
9258 * features/tic6x-c62x-linux.c: Re-generated.
9259 * features/tic6x-c64x.c: Re-generated.
9260 * features/tic6x-c64x-linux.c: Re-generated.
9261 * features/tic6x-c64xp.c: Re-generated.
9262 * features/tic6x-c64xp-linux.c: Re-generated.
9263
9264 2017-07-26 Yao Qi <yao.qi@linaro.org>
9265
9266 * i386-linux-tdep.c (i386_linux_read_description): New function.
9267 (i386_linux_core_read_description): Call
9268 i386_linux_read_description.
9269 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9270 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9271 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9272 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9273 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9274 * x86-linux-nat.c (x86_linux_read_description): Call
9275 i386_linux_read_description.
9276
9277 2017-07-26 Yao Qi <yao.qi@linaro.org>
9278
9279 * NEWS: Mention it.
9280 * features/Makefile (%.c: %.xml): Pass the xml file name to
9281 command "maint print c-tdesc".
9282 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9283 name from 'arg'.
9284
9285 2017-07-26 Yao Qi <yao.qi@linaro.org>
9286
9287 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9288 in-class initialization.
9289 (tdesc_create_feature): Call new instead of XCNEW.
9290 (free_target_description): Ue delete.
9291
9292 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9293
9294 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9295
9296 2017-07-25 Yao Qi <yao.qi@linaro.org>
9297
9298 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9299 constant.
9300 (amd64_x32_init_abi): Likewise.
9301 * amd64-tdep.h (amd64_init_abi): Update declaration.
9302 (amd64_x32_init_abi): Likewise.
9303
9304 2017-07-25 Yao Qi <yao.qi@linaro.org>
9305
9306 PR tdep/21717
9307 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9308 condition for FPSCR.
9309 (arm_linux_store_inferior_registers): Likewise.
9310
9311 2017-07-22 Tom Tromey <tom@tromey.com>
9312
9313 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9314 <syscalls_counts>: Now a std::vector.
9315 (get_catch_syscall_inferior_data): Use "new".
9316 (catch_syscall_inferior_data_cleanup): Use "delete".
9317 (insert_catch_syscall, remove_catch_syscall)
9318 (clear_syscall_counts): Update.
9319
9320 2017-07-22 Tom Tromey <tom@tromey.com>
9321
9322 * break-catch-syscall.c (syscall_catchpoint)
9323 <syscalls_to_be_caught>: Now a std::vector<int>
9324 (~syscall_catchpoint): Remove.
9325 (insert_catch_syscall, remove_catch_syscall)
9326 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9327 (print_mention_catch_syscall, print_recreate_catch_syscall):
9328 Update.
9329 (create_syscall_event_catchpoint): Change type of "filter"
9330 parameter.
9331 (catch_syscall_split_args): Return a std::vector.
9332 (catch_syscall_command_1, catching_syscall_number_1): Update.
9333
9334 2017-07-22 Tom Tromey <tom@tromey.com>
9335
9336 * break-catch-throw.c (struct exception_catchpoint)
9337 <exception_rx>: Now a std::string.
9338 (~exception_catchpoint): Remove.
9339 (print_one_detail_exception_catchpoint): Update.
9340 (handle_gnu_v3_exceptions): Change type of except_rx.
9341 (extract_exception_regexp): Return a std::string.
9342 (catch_exception_command_1): Update.
9343
9344 2017-07-22 Tom Tromey <tom@tromey.com>
9345
9346 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9347 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9348 std::vector.
9349 <catch_all>: Now a bool.
9350 (~signal_catchpoint): Remove.
9351 (signal_catchpoint_insert_location)
9352 (signal_catchpoint_remove_location)
9353 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9354 (signal_catchpoint_print_mention)
9355 (signal_catchpoint_print_recreate)
9356 (signal_catchpoint_explains_signal): Update.
9357 (create_signal_catchpoint): Change type of "filter" and
9358 "catch_all".
9359 (catch_signal_split_args): Return a std::vector. Change type of
9360 "catch_all".
9361 (catch_signal_command): Update.
9362
9363 2017-07-20 Pedro Alves <palves@redhat.com>
9364
9365 * ada-lang.c (ada_language_defn): Make extern.
9366 (_initialize_ada_language): Remove add_language call.
9367 * c-lang.c (c_language_defn, cplus_language_defn)
9368 (asm_language_defn, minimal_language_defn): Make extern.
9369 (_initialize_c_language): Delete.
9370 * completer.c (compare_cstrings): Delete, moved to utils.h.
9371 * d-lang.c (d_language_defn): Make extern.
9372 (_initialize_d_language): Remove add_language calls.
9373 * defs.h (enum language): Add comment.
9374 * f-lang.c (f_language_defn): Make extern.
9375 (_initialize_f_language): Remove add_language call.
9376 * go-lang.c (go_language_defn): Make extern.
9377 (_initialize_go_language): Remove add_language call.
9378 * language.c: Include <algorithm>.
9379 (languages): Redefine as const array.
9380 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9381 (set_language_command): Handle "local". Use for-range loop.
9382 (set_language): Remove loop.
9383 (language_enum): Rewrite.
9384 (language_def, language_str): Remove loops.
9385 (add_language): Delete.
9386 (add_set_language_command): New, based on add_languages.
9387 (skip_language_trampoline): Adjust.
9388 (local_language_defn): Delete.
9389 (language_gdbarch_post_init): Adjust.
9390 (_initialize_language): Remove add_language calls. Call
9391 add_set_language_command.
9392 * language.h (add_language): Delete.
9393 (auto_language_defn)
9394 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9395 (asm_language_defn, c_language_defn, cplus_language_defn)
9396 (d_language_defn, f_language_defn, go_language_defn)
9397 (m2_language_defn, objc_language_defn, opencl_language_defn)
9398 (pascal_language_defn, rust_language_defn): Declare.
9399 * m2-lang.c (m2_language_defn): Make extern.
9400 (_initialize_m2_language): Remove add_language call.
9401 * objc-lang.c (objc_language_defn): Make extern.
9402 (_initialize_objc_language): Remove add_language call.
9403 * opencl-lang.c (opencl_language_defn): Make extern.
9404 (_initialize_opencl_language): Remove add_language call.
9405 * p-lang.c (pascal_language_defn): Make extern.
9406 (_initialize_pascal_language): Delete.
9407 * rust-lang.c (rust_language_defn): Make extern.
9408 (_initialize_rust_language): Delete.
9409 * utils.h (compare_cstrings): New static inline function.
9410
9411 2017-07-20 Pedro Alves <palves@redhat.com>
9412
9413 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9414 (get_var_value): Constify parameters.
9415 (get_int_var_value): Change prototype.
9416 (to_fixed_range_type): Adjust.
9417 * ada-lang.h (get_int_var_value): Change prototype.
9418
9419 2017-07-20 Pedro Alves <palves@redhat.com>
9420
9421 * dwarf2read.c (dw2_lookup_symbol): Use
9422 SYMBOL_MATCHES_SEARCH_NAME.
9423 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9424
9425 2017-07-20 Pedro Alves <palves@redhat.com>
9426
9427 * block.c (block_iter_name_step, block_iter_name_first)
9428 (block_iter_name_next): Delete.
9429 (block_lookup_symbol_primary): Adjust to use
9430 dict_iter_match_first/dict_iter_match_next.
9431 * block.h (block_iter_name_first, block_iter_name_next): Delete
9432 declarations.
9433 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9434 dict_iter_match_first/dict_iter_match_next.
9435
9436 2017-07-20 Pedro Alves <palves@redhat.com>
9437
9438 * cp-support.c (cp_find_first_component_aux): Add missing case for
9439 end of string.
9440
9441 2017-07-18 David Blaikie <dblaikie@gmail.com>
9442
9443 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9444 of dwo_cu's dwo_file.
9445
9446 2017-07-18 Yao Qi <yao.qi@linaro.org>
9447
9448 * remote.c (store_registers_using_G): Remove one line comment.
9449
9450 2017-07-18 Yao Qi <yao.qi@linaro.org>
9451
9452 * regcache.c (regcache_cpy): Simplify it.
9453 (regcache::cpy_no_passthrough): Remove it.
9454 * regcache.h (cpy_no_passthrough): Remove it.
9455 (regcache_dup, regcache_cpy): Update comments.
9456
9457 2017-07-18 Pedro Alves <palves@redhat.com>
9458
9459 * remote-sim.c (sim_command_completer): Adjust to work with a
9460 completion_tracker instead of a VEC.
9461
9462 2017-07-17 Pedro Alves <palves@redhat.com>
9463
9464 * completer.c (complete_source_filenames): New function.
9465 (complete_address_and_linespec_locations): New function.
9466 (location_completer): Use complete_address_and_linespec_locations.
9467 (completion_tracker::build_completion_result): Honor the tracker's
9468 request to suppress append.
9469 * completer.h (completion_tracker::suppress_append_ws)
9470 (completion_tracker::set_suppress_append_ws): New methods.
9471 (completion_tracker::m_suppress_append_ws): New field.
9472 (complete_source_filenames): New declaration.
9473 * linespec.c (linespec_complete_what): New.
9474 (struct ls_parser) <complete_what, completion_word,
9475 completion_quote_char, completion_quote_end, completion_tracker>:
9476 New fields.
9477 (string_find_incomplete_keyword_at_end): New.
9478 (linespec_lexer_lex_string): Record quote char. If in completion
9479 mode, don't throw.
9480 (linespec_lexer_consume_token): Advance the completion word point.
9481 (linespec_lexer_peek_token): Save/restore completion info.
9482 (save_stream_and_consume_token): New.
9483 (set_completion_after_number): New.
9484 (linespec_parse_basic): Set what to complete next depending on
9485 token. Handle function and label completions specially.
9486 (parse_linespec): Disable objc shortcut in completion mode. Set
9487 what to complete next depending on token type. Skip keyword if in
9488 completion mode.
9489 (complete_linespec_component, linespec_complete): New.
9490 * linespec.h (linespec_complete): Declare.
9491
9492 2017-07-17 Pedro Alves <palves@redhat.com>
9493
9494 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9495 Handle 'operator<' / 'operator<<'.
9496
9497 2017-07-17 Pedro Alves <palves@redhat.com>
9498
9499 * completer.c (collect_explicit_location_matches): Handle
9500 MATCH_LABEL.
9501 (convert_explicit_location_to_linespec): New, factored out from
9502 ...
9503 (convert_explicit_location_to_sals): ... this.
9504 (complete_label): New.
9505 (linespec_complete_label, find_label_symbols_in_block): New.
9506 (find_label_symbols): Add completion_mode parameter and adjust to
9507 call find_label_symbols_in_block.
9508 * linespec.h (linespec_complete_label): Declare.
9509
9510 2017-07-17 Pedro Alves <palves@redhat.com>
9511
9512 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9513 complete_symbol_mode parameter.
9514 * cli/cli-cmds.c (complete_command): Get the completion result out
9515 of the handle_brkchars tracker if used a custom word point.
9516 * completer.c: Include "linespec.h".
9517 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9518 (advance_to_expression_complete_word_point): New.
9519 (completion_tracker::completes_to_completion_word): New.
9520 (complete_files_symbols): Pass down
9521 complete_symbol_mode::EXPRESSION.
9522 (explicit_options, probe_options): New.
9523 (collect_explicit_location_matches): Complete on the
9524 explictit_loc->foo instead of word. Use
9525 linespec_complete_function. Handle MATCH_LINE. Handle offering
9526 keyword and options completions.
9527 (backup_text_ptr): Delete.
9528 (skip_keyword): New.
9529 (complete_explicit_location): Remove 'word' parameter. Add
9530 language, quoted_arg_start and quoted_arg_end parameters.
9531 Rewrite, parsing left to right.
9532 (location_completer): Rewrite.
9533 (location_completer_handle_brkchars): New function.
9534 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9535 (enum complete_line_internal_reason): Adjust comments.
9536 (completion_tracker::discard_completions): New.
9537 (completer_handle_brkchars_func_for_completer): Handle
9538 location_completer.
9539 (gdb_custom_word_point_brkchars)
9540 (gdb_org_rl_basic_quote_characters): New.
9541 (gdb_completion_word_break_characters_throw)
9542 (completion_find_completion_word): Handle trackers that use a
9543 custom word point.
9544 (completion_tracker::advance_custom_word_point_by): New.
9545 (completion_tracker::build_completion_result): Don't rely on
9546 readline appending the quote char.
9547 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9548 use a custom word point.
9549 (gdb_rl_attempted_completion_function): Restore
9550 rl_basic_quote_characters.
9551 * completer.h (class completion_tracker): Extend intro comment.
9552 (completion_tracker::set_quote_char)
9553 (completion_tracker::quote_char)
9554 (completion_tracker::set_use_custom_word_point)
9555 (completion_tracker::use_custom_word_point)
9556 (completion_tracker::custom_word_point)
9557 (completion_tracker::set_custom_word_point)
9558 (completion_tracker::advance_custom_word_point_by)
9559 (completion_tracker::completes_to_completion_word)
9560 (completion_tracker::discard_completions): New methods.
9561 (completion_tracker::m_quote_char)
9562 (completion_tracker::m_use_custom_word_point)
9563 (completion_tracker::m_custom_word_point): New fields.
9564 (advance_to_expression_complete_word_point): Declare.
9565 * f-lang.c (f_collect_symbol_completion_matches): Add
9566 complete_symbol_mode parameter.
9567 * language.h (struct language_defn)
9568 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9569 parameter.
9570 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9571 (linespec_complete_function): New function.
9572 (linespec_lexer_lex_keyword): Adjust.
9573 * linespec.h (linespec_keywords, linespec_complete_function): New
9574 declarations.
9575 * location.c (find_end_quote): New function.
9576 (explicit_location_lex_one): Add explicit_completion_info
9577 parameter. Save quoting info. Don't throw if being called for
9578 completion. Don't handle Ada operators here.
9579 (is_cp_operator, skip_op_false_positives, first_of)
9580 (explicit_location_lex_one_function): New function.
9581 (string_to_explicit_location): Replace 'dont_throw' parameter with
9582 an explicit_completion_info pointer parameter. Handle it. Don't
9583 use explicit_location_lex_one to lex function names. Use
9584 explicit_location_lex_one_function instead.
9585 * location.h (struct explicit_completion_info): New.
9586 (string_to_explicit_location): Replace 'dont_throw' parameter with
9587 an explicit_completion_info pointer parameter.
9588 * symtab.c (default_collect_symbol_completion_matches_break_on):
9589 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9590 (default_collect_symbol_completion_matches)
9591 (collect_symbol_completion_matches): Add complete_symbol_mode
9592 parameter.
9593 (collect_symbol_completion_matches_type): Pass down
9594 complete_symbol_mode::EXPRESSION.
9595 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9596 parameter. Handle LINESPEC mode.
9597 * symtab.h (complete_symbol_mode): New.
9598 (default_collect_symbol_completion_matches_break_on)
9599 (default_collect_symbol_completion_matches)
9600 (collect_symbol_completion_matches)
9601 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9602 parameter.
9603
9604 2017-07-17 Pedro Alves <palves@redhat.com>
9605
9606 * utils.c (enum class strncmp_iw_mode): New.
9607 (strcmp_iw): Rename to ...
9608 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9609 parameters. Handle them.
9610 (strncmp_iw): New.
9611 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9612 * utils.h (strncmp_iw): Declare.
9613 (strcmp_iw): Move describing comments here.
9614
9615 2017-07-17 Pedro Alves <palves@redhat.com>
9616
9617 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9618 CP_OPERATOR_STR.
9619 * c-typeprint.c (is_type_conversion_operator): Use
9620 CP_OPERATOR_STR.
9621 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9622 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9623 CP_OPERATOR_LEN.
9624 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9625 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9626 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9627 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9628 CP_OPERATOR_STR.
9629 * location.c: Include "cp-support.h".
9630 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9631 CP_OPERATOR_STR.
9632 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9633 CP_OPERATOR_LEN.
9634
9635 2017-07-17 Pedro Alves <palves@redhat.com>
9636
9637 * cli/cli-cmds.c (complete_command): Use a completion tracker
9638 along with completion_find_completion_word for handle_brkchars
9639 phase.
9640 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9641 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9642 (struct gdb_rl_completion_word_info): New.
9643 (gdb_rl_find_completion_word): New.
9644 (completion_find_completion_word): New.
9645 * completer.h (completion_find_completion_word): Declare.
9646
9647 2017-07-17 Pedro Alves <palves@redhat.com>
9648
9649 * ada-lang.c (symbol_completion_match): Adjust comments.
9650 (symbol_completion_add): Replace vector parameter with
9651 completion_tracker parameter. Use it.
9652 (ada_make_symbol_completion_list): Rename to...
9653 (ada_collect_symbol_completion_matches): ... this. Add
9654 completion_tracker parameter and use it.
9655 (ada_language_defn): Adjust.
9656 * break-catch-syscall.c (catch_syscall_completer): Adjust
9657 prototype and work with completion_tracker instead of VEC.
9658 * breakpoint.c (condition_completer): Adjust prototype and work
9659 with completion_tracker instead of VEC.
9660 * c-lang.c (c_language_defn, cplus_language_defn)
9661 (asm_language_defn, minimal_language_defn): Adjust to renames.
9662 * cli/cli-cmds.c (complete_command): Rework using
9663 completion_tracker. Catch exceptions when completing.
9664 * cli/cli-decode.c (integer_unlimited_completer)
9665 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9666 with completion_tracker instead of VEC.
9667 * command.h (struct completion_tracker): Forward declare.
9668 (completer_ftype, completer_handle_brkchars_ftype): Change
9669 types.
9670 (complete_on_cmdlist, complete_on_enum): Adjust.
9671 * completer.c: Include <algorithm>.
9672 (struct gdb_completer_state): New.
9673 (current_completion): New global.
9674 (readline_line_completion_function): Delete.
9675 (noop_completer, filename_completer)
9676 (filename_completer_handle_brkchars, complete_files_symbols)
9677 (linespec_location_completer): Adjust to work with a
9678 completion_tracker instead of a VEC.
9679 (string_or_empty): New.
9680 (collect_explicit_location_matches): Adjust to work with a
9681 completion_tracker instead of a VEC.
9682 (explicit_location_completer): Rename to ...
9683 (complete_explicit_location): ... this and adjust to work with a
9684 completion_tracker instead of a VEC.
9685 (location_completer): Adjust to work with a completion_tracker
9686 instead of a VEC.
9687 (add_struct_fields): Adjust to work with a completion_list instead
9688 of VEC.
9689 (expression_completer): Rename to ...
9690 (complete_expression): ... this and adjust to work with a
9691 completion_tracker instead of a VEC. Use complete_files_symbols.
9692 (expression_completer): Reimplement on top of complete_expression.
9693 (symbol_completer): Adjust to work with a completion_tracker
9694 instead of a VEC.
9695 (enum complete_line_internal_reason): Add describing comments.
9696 (complete_line_internal_normal_command): Adjust to work with a
9697 completion_tracker instead of a VEC.
9698 (complete_line_internal): Rename to ...
9699 (complete_line_internal_1): ... this and adjust to work with a
9700 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9701 handle_brkchars phase.
9702 (new_completion_tracker): Delete.
9703 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9704 complete_line_internal_1.
9705 (free_completion_tracker): Delete.
9706 (INITIAL_COMPLETION_HTAB_SIZE): New.
9707 (completion_tracker::completion_tracker)
9708 (completion_tracker::~completion_tracker): New.
9709 (maybe_add_completion): Delete.
9710 (completion_tracker::maybe_add_completion)
9711 (completion_tracker::add_completion)
9712 (completion_tracker::add_completions): New.
9713 (throw_max_completions_reached_error): Delete.
9714 (complete_line): Adjust to work with a completion_tracker instead
9715 of a VEC. Don't create a completion_tracker_t or check for max
9716 completions here.
9717 (command_completer, command_completer_handle_brkchars)
9718 (signal_completer, reg_or_group_completer_1)
9719 (reg_or_group_completer, default_completer_handle_brkchars):
9720 Adjust to work with a completion_tracker.
9721 (gdb_completion_word_break_characters_throw): New.
9722 (gdb_completion_word_break_characters): Reimplement.
9723 (line_completion_function): Delete.
9724 (completion_tracker::recompute_lowest_common_denominator)
9725 (expand_preserving_ws)
9726 (completion_tracker::build_completion_result)
9727 (completion_result::completion_result)
9728 (completion_result::completion_result)
9729 (completion_result::~completion_result)
9730 (completion_result::completion_result)
9731 (completion_result::release_match_list, compare_cstrings)
9732 (completion_result::sort_match_list)
9733 (completion_result::reset_match_list)
9734 (gdb_rl_attempted_completion_function_throw)
9735 (gdb_rl_attempted_completion_function): New.
9736 * completer.h (completion_list, struct completion_result)
9737 (class completion_tracker): New.
9738 (complete_line): Add completion_tracker parameter.
9739 (readline_line_completion_function): Delete.
9740 (gdb_rl_attempted_completion_function): New.
9741 (noop_completer, filename_completer, expression_completer)
9742 (location_completer, symbol_completer, command_completer)
9743 (signal_completer, reg_or_group_completer): Update prototypes.
9744 (completion_tracker_t, new_completion_tracker)
9745 (make_cleanup_free_completion_tracker): Delete.
9746 (enum maybe_add_completion_enum): Delete.
9747 (maybe_add_completion): Delete.
9748 (throw_max_completions_reached_error): Delete.
9749 * corefile.c (complete_set_gnutarget): Adjust to work with a
9750 completion_tracker instead of a VEC.
9751 * cp-abi.c (cp_abi_completer): Adjust to work with a
9752 completion_tracker instead of a VEC.
9753 * d-lang.c (d_language_defn): Adjust.
9754 * disasm.c (disassembler_options_completer): Adjust to work with a
9755 completion_tracker instead of a VEC.
9756 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9757 (f_collect_symbol_completion_matches): ... this. Adjust to work
9758 with a completion_tracker instead of a VEC.
9759 (f_language_defn): Adjust.
9760 * go-lang.c (go_language_defn): Adjust.
9761 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9762 Adjust to work with a completion_tracker instead of a VEC.
9763 * infrun.c (handle_completer): Likewise.
9764 * interps.c (interpreter_completer): Likewise.
9765 * interps.h (interpreter_completer): Likewise.
9766 * language.c (unknown_language_defn, auto_language_defn)
9767 (local_language_defn): Adjust.
9768 * language.h (language_defn::la_make_symbol_completion_list):
9769 Rename to ...
9770 (language_defn::la_collect_symbol_completion_matches): ... this
9771 and adjust to work with a completion_tracker instead of a VEC.
9772 * m2-lang.c (m2_language_defn): Adjust.
9773 * objc-lang.c (objc_language_defn): Adjust.
9774 * opencl-lang.c (opencl_language_defn): Adjust.
9775 * p-lang.c (pascal_language_defn): Adjust.
9776 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9777 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9778 with a completion_tracker.
9779 * rust-lang.c (rust_language_defn): Adjust.
9780 * symtab.c (free_completion_list, do_free_completion_list)
9781 (return_val, completion_tracker): Delete.
9782 (completion_list_add_name, completion_list_add_symbol)
9783 (completion_list_add_msymbol, completion_list_objc_symbol)
9784 (completion_list_add_fields, add_symtab_completions): Add
9785 completion_tracker parameter and use it.
9786 (default_make_symbol_completion_list_break_on_1): Rename to...
9787 (default_collect_symbol_completion_matches_break_on): ... this.
9788 Add completion_tracker parameter and use it instead of allocating
9789 a completion tracker here.
9790 (default_make_symbol_completion_list_break_on): Delete old
9791 implementation.
9792 (default_make_symbol_completion_list): Delete.
9793 (default_collect_symbol_completion_matches): New.
9794 (make_symbol_completion_list): Delete.
9795 (collect_symbol_completion_matches): New.
9796 (make_symbol_completion_type): Rename to ...
9797 (collect_symbol_completion_matches_type): ... this. Add
9798 completion_tracker parameter and use it instead of VEC.
9799 (make_file_symbol_completion_list_1): Rename to...
9800 (collect_file_symbol_completion_matches): ... this. Add
9801 completion_tracker parameter and use it instead of VEC.
9802 (make_file_symbol_completion_list): Delete.
9803 (add_filename_to_list): Use completion_list instead of a VEC.
9804 (add_partial_filename_data::list): Now a completion_list.
9805 (make_source_files_completion_list): Work with a completion_list
9806 instead of a VEC.
9807 * symtab.h: Include "completer.h".
9808 (default_make_symbol_completion_list_break_on)
9809 (default_make_symbol_completion_list, make_symbol_completion_list)
9810 (make_symbol_completion_type, make_file_symbol_completion_list)
9811 (make_source_files_completion_list): Delete.
9812 (default_collect_symbol_completion_matches_break_on)
9813 (default_collect_symbol_completion_matches)
9814 (collect_symbol_completion_matches)
9815 (collect_symbol_completion_matches_type)
9816 (collect_file_symbol_completion_matches)
9817 (make_source_files_completion_list): New.
9818 * top.c (init_main): Don't install a rl_completion_entry_function
9819 hook. Install a rl_attempted_completion_function hook instead.
9820 * tui/tui-layout.c (layout_completer): Adjust to work with a
9821 completion_tracker.
9822 * tui/tui-regs.c (tui_reggroup_completer):
9823 * tui/tui-win.c (window_name_completer, focus_completer)
9824 (winheight_completer): Adjust to work with a completion_tracker.
9825 * value.c: Include "completer.h".
9826 (complete_internalvar): Adjust to work with a completion_tracker.
9827 * value.h (complete_internalvar): Likewise.
9828
9829 2017-07-17 Pedro Alves <palves@redhat.com>
9830
9831 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9832 renames.
9833 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9834 comments to completer_ftype's declaration.
9835 <completer_handle_brkchars>: Change type to
9836 completer_handle_brkchars_ftype.
9837 * command.h (completer_ftype): Add describing comment and give
9838 names to parameters.
9839 (completer_ftype_void): Rename to ...
9840 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9841 (set_cmd_completer_handle_brkchars): Adjust.
9842 * completer.c (filename_completer_handle_brkchars): New function.
9843 (complete_line_internal_normal_command): New function, factored
9844 out from ...
9845 (complete_line_internal): ... here.
9846 (command_completer_handle_brkchars)
9847 (default_completer_handle_brkchars)
9848 (completer_handle_brkchars_func_for_completer): New functions.
9849 * completer.h (set_gdb_completion_word_break_characters): Delete
9850 declaration.
9851 (completer_handle_brkchars_func_for_completer): New declaration.
9852 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9853 completer_handle_brkchars_func_for_completer.
9854
9855 2017-07-17 Pedro Alves <palves@redhat.com>
9856
9857 * completer.c (symbol_completer): New function, based on
9858 make_symbol_completion_list_fn.
9859 * completer.h (symbol_completer): New declaration.
9860 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9861 * python/py-cmd.c (completers): Adjust.
9862 * symtab.c (make_symbol_completion_list_fn): Delete.
9863 * symtab.h (make_symbol_completion_list_fn): Delete.
9864 * cli/cli-decode.c (add_cmd): Adjust.
9865
9866 2017-07-17 Pedro Alves <palves@redhat.com>
9867
9868 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9869 * dwarf2read.c: Include "filename-seen-cache.h".
9870 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9871 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9872 * filename-seen-cache.c: New file.
9873 * filename-seen-cache.h: New file.
9874 * symtab.c: Include "filename-seen-cache.h".
9875 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9876 (create_filename_seen_cache, clear_filename_seen_cache)
9877 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9878 to filename-seen-cache.h/filename-seen-cache.c.
9879 (output_source_filename, sources_info)
9880 (maybe_add_partial_symtab_filename)
9881 (make_source_files_completion_list): Adjust to use
9882 filename_seen_cache.
9883
9884 2017-07-17 Pedro Alves <palves@redhat.com>
9885
9886 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9887 fields.
9888 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9889 dwarf2_debug_sections*)): New.
9890 (dwarf2_per_objfile::dwarf2_per_objfile(const
9891 dwarf2_per_objfile&)): Declare as deleted.
9892 (dwarf2_per_objfile::operator=): Declare as deleted.
9893 (dwarf2_per_objfile::dwarf2_per_objfile)
9894 (dwarf2_per_objfile::~dwarf2_per_objfile)
9895 (dwarf2_per_objfile::free_cached_comp_units): New.
9896 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9897 ctor. Call dwarf2_per_objfile's ctor manually.
9898 (dwarf2_locate_sections): Deleted/refactored as ...
9899 (dwarf2_per_objfile::locate_sections): ... this new method.
9900 (free_cached_comp_units): Defer to
9901 dwarf2_per_objfile::free_cached_comp_units.
9902 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9903
9904 2017-07-14 Tom Tromey <tom@tromey.com>
9905
9906 PR rust/21764:
9907 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9908 parameter.
9909 <UNOP_SIZEOF>: Split into separate case.
9910 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9911
9912 2017-07-14 Tom Tromey <tom@tromey.com>
9913
9914 PR rust/21763:
9915 * symtab.c (symbol_matches_domain): Add language_rust to special
9916 case.
9917 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9918 treat LOC_TYPEDEF symbols as variables.
9919
9920 2017-07-14 Pedro Alves <palves@redhat.com>
9921
9922 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9923 symtabs matching all symtabs with SRCFILE as file name instead of
9924 only considering the first hit, with lookup_symtab.
9925
9926 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9927
9928 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9929 operator_name parameters.
9930 (gen_expr): Update function call.
9931
9932 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9933
9934 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9935 parameter.
9936 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9937 Likewise.
9938 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9939 parameter, use agent_expr::gdbarch instead, update function
9940 calls.
9941 (locexpr_tracepoint_var_ref): Likewise.
9942 (loclist_tracepoint_var_ref): Likewise.
9943 * ax-gdb.c (gen_trace_static_fields): Likewise.
9944 (gen_traced_pop): Likewise.
9945 (gen_frame_args_address): Likewise.
9946 (gen_frame_locals_address): Likewise.
9947 (gen_var_ref): Likewise.
9948 (gen_struct_ref_recursive): Likewise.
9949 (gen_static_field): Likewise.
9950 (gen_maybe_namespace_elt): Likewise.
9951 (gen_expr): Likewise.
9952 (gen_trace_for_var): Likewise.
9953 (gen_trace_for_expr): Likewise.
9954 (gen_trace_for_return_address): Likewise.
9955
9956 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9957
9958 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9959 parameter.
9960 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9961
9962 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9963
9964 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9965 from ax, update calls.
9966 (gen_usual_arithmetic): Likewise.
9967 (gen_integral_promotions): Likewise.
9968 (gen_bitfield_ref): Likewise.
9969 (gen_primitive_field): Likewise.
9970 (gen_struct_ref_recursive): Likewise.
9971 (gen_struct_ref): Likewise.
9972 (gen_maybe_namespace_elt): Likewise.
9973 (gen_struct_elt_for_reference): Likewise.
9974 (gen_namespace_elt): Likewise.
9975 (gen_aggregate_elt_ref): Likewise.
9976 (gen_expr): Get gdbarch from ax, update calls.
9977 (gen_expr_binop_rest): Likewise.
9978
9979 2017-07-13 Pedro Alves <palves@redhat.com>
9980
9981 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9982 as default tdesc.
9983 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9984 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9985 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9986 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9987 tdep.
9988 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9989 Get final tdesc from the tdep.
9990 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9991 default tdesc.
9992 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9993 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9994 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9995 Use it as default tdesc.
9996 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9997 down to amd_init_abi. No longer handle fallback tdesc here.
9998 * amd64-tdep.h (tdesc_x32): Declare.
9999 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10000 parameter.
10001 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10002 as default tdesc.
10003
10004 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10005
10006 * s390-linux-tdep.c (s390_process_record): Add support for
10007 instructions new in arch12.
10008
10009 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10010
10011 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10012 PT_GETFSBASE and PT_GETGSBASE.
10013 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10014 PT_SETGSBASE.
10015
10016 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10017
10018 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10019 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10020 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10021 those rules.
10022 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10023 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10024 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10025 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10026 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10027 * features/i386/amd64.xml: Add 64bit-segments.xml.
10028 * features/i386/amd64-avx-avx512.c: Regenerated.
10029 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10030 * features/i386/amd64-avx-mpx.c: Regenerated.
10031 * features/i386/amd64-avx.c: Regenerated.
10032 * features/i386/amd64-mpx.c: Regenerated.
10033 * features/i386/amd64.c: Regenerated.
10034 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10035 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10036 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10037 * regformats/i386/amd64-avx.dat: Regenerated.
10038 * regformats/i386/amd64-mpx.dat: Regenerated.
10039 * regformats/i386/amd64.dat: Regenerated.
10040
10041 2017-07-10 Yao Qi <yao.qi@linaro.org>
10042
10043 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10044 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10045
10046 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10047
10048 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10049 unsetenv.
10050 * gnulib/aclocal.m4: Regenerate.
10051 * gnulib/config.in: Regenerate.
10052 * gnulib/configure: Regenerate.
10053 * gnulib/import/Makefile.am: Regenerate.
10054 * gnulib/import/Makefile.in: Regenerate.
10055 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10056 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10057 * gnulib/import/m4/environ.m4: New file.
10058 * gnulib/import/m4/setenv.m4: New file.
10059 * gnulib/import/setenv.c: New file.
10060 * gnulib/import/unsetenv.c: New file.
10061
10062 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10063
10064 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10065 address when op is DW_OP_addr.
10066
10067 2017-07-09 Tom Tromey <tom@tromey.com>
10068
10069 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10070 check and apply to outer type.
10071
10072 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10073
10074 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10075 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10076 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10077 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10078
10079 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10080
10081 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10082
10083 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10084
10085 * corelow.c (get_core_siginfo): Remove.
10086 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10087 instead of get_core_siginfo.
10088 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10089 * gdbarch.h: Re-generate.
10090 * gdbarch.c: Re-generate.
10091 * linux-tdep.c (linux_core_xfer_siginfo): New.
10092 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10093
10094 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10095
10096 * corelow.c (thread_section_name): Move to ...
10097 * gdbcore.h (thread_section_name): ... here.
10098
10099 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10100
10101 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10102 (struct siginfo32): New.
10103 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10104 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10105 via ptrace(PT_LWPINFO).
10106
10107 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10108
10109 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10110 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10111 (fbsd_get_siginfo_type): New.
10112 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10113 (_initialize_fbsd_tdep): New.
10114
10115 2017-07-06 David Blaikie <dblaikie@gmail.com>
10116
10117 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10118 a singular dwo_unit*) to support multiple CUs in the same way that
10119 multiple TUs are supported.
10120 (create_cus_hash_table): Replace create_dwo_cu with a function for
10121 parsing multiple CUs from a DWO file.
10122 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10123 create_dwo_cu.
10124 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10125 htab_find, rather than comparing the signature to a singleton CU in
10126 the dwo_file.
10127
10128 2017-07-06 Pedro Alves <palves@redhat.com>
10129
10130 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10131
10132 2017-07-04 Pedro Alves <palves@redhat.com>
10133
10134 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10135 * gdbtypes.h (TYPE_STATIC): Delete.
10136 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10137 is_synchronized, is_native>: Delete.
10138 <dummy>: Bump.
10139 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10140 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10141 (TYPE_FN_FIELD_ABSTRACT): Delete.
10142
10143 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10144
10145 * buffer.h (buffer_finish): Fix spelling mistakes.
10146
10147 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10148
10149 * .dir-locals.el: Automatically switch to C-style comments in
10150 versions of Emacs that support the feature.
10151
10152 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10153 Pedro Alves <palves@redhat.com>
10154
10155 PR cli/21688
10156 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10157 (process_next_line): New variable 'inline_cmd'.
10158 Adjust 'if' clauses for "python", "compile" and "guile" to use
10159 'command_name_equals' and check for '!inline_cmd'.
10160
10161 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10162
10163 PR cli/21688
10164 * cli/cli-script.c (command_name_equals_not_inline): New function.
10165 (process_next_line): Adjust 'if' clauses for "python", "compile"
10166 and "guile" to use command_name_equals_not_inline.
10167
10168 2017-06-29 Pedro Alves <palves@redhat.com>
10169
10170 * completer.c (expression_completer): Call
10171 linespec_location_completer instead of location_completer.
10172
10173 2017-06-29 Pedro Alves <palves@redhat.com>
10174
10175 * completer.c (expression_completer): Remove code that recomputes
10176 'text' from 'word'.
10177
10178 2017-06-29 Yao Qi <yao.qi@linaro.org>
10179
10180 * regformats/regdat.sh: Generate code with
10181 "ifndef IN_PROCESS_AGENT".
10182
10183 2017-06-28 Pedro Alves <palves@redhat.com>
10184
10185 * command.h: Include "common/scoped_restore.h".
10186
10187 2017-06-28 Yao Qi <yao.qi@linaro.org>
10188
10189 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10190 instead of obstack_grow.
10191
10192 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10193
10194 PR gdb/21337
10195 * symfile.c (reread_symbols): Call objfiles_changed just before
10196 read_symbols.
10197
10198 2017-06-27 Pedro Alves <palves@redhat.com>
10199
10200 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10201 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10202 (completion_list_add_symbol, completion_list_add_msymbol):
10203 ... these new functions.
10204 (add_symtab_completions)
10205 (default_make_symbol_completion_list_break_on_1): Adjust.
10206
10207 2017-06-27 Pedro Alves <palves@redhat.com>
10208
10209 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10210 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10211 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10212 dtor.
10213 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10214 'storage_obstack' field an auto_obstack. In-class initialize all
10215 non-bitfield fields. Make minsyms_read bool.
10216 * symfile.c (read_symbols): Adjust.
10217
10218 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10219
10220 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10221 (gdbsim_store_register): Likewise.
10222
10223 2017-06-27 Pedro Alves <palves@redhat.com>
10224
10225 * c-exp.y (name_obstack): Now an auto_obstack.
10226 (yylex): Use auto_obstack::clear.
10227 (c_parse): Use auto_obstack::clear instead of reinitializing and
10228 freeing the obstack.
10229 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10230 * d-exp.y (name_obstack): Now an auto_obstack.
10231 (yylex): Use auto_obstack::clear.
10232 (d_parse): Use auto_obstack::clear instead of reinitializing and
10233 freeing the obstack.
10234 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10235 auto_obstack.
10236 * dwarf2read.c (create_addrmap_from_index)
10237 (dwarf2_build_psymtabs_hard)
10238 (update_enumeration_type_from_children): Likewise.
10239 * gdb_obstack.h (auto_obstack): New type.
10240 * go-exp.y (name_obstack): Now an auto_obstack.
10241 (build_packaged_name): Use auto_obstack::clear.
10242 (go_parse): Use auto_obstack::clear instead of reinitializing and
10243 freeing the obstack.
10244 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10245 auto_obstack.
10246 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10247 * rust-exp.y (work_obstack): Now an auto_obstack.
10248 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10249 reinitializing and freeing the obstack.
10250 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10251 (host_char_to_target): Use auto_obstack.
10252 * utils.h (make_cleanup_obstack_free): Delete declaration.
10253 * valprint.c (generic_emit_char, generic_printstr): Use
10254 auto_obstack.
10255
10256 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10257
10258 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10259 thread.
10260 (darwin_init_thread_list): Don't update dummy thread.
10261 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10262
10263 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10264
10265 * record-full.c (netorder16): Remove.
10266
10267 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10268
10269 * common/diagnostics.h: Define macros for GCC.
10270 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10271 * common/vec.h: Include diagnostics.h.
10272 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10273 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10274 warning.
10275
10276 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10277
10278 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10279 New macro.
10280 * ada-lex.l: Ignore deprecated register warnings.
10281
10282 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10283
10284 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10285 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10286
10287 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10288
10289 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10290 its own line.
10291
10292 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10293
10294 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10295
10296 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10297
10298 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10299 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10300 (xtensa_register_read_masked): Likewise.
10301
10302 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10303
10304 * common/environ.c (gdb_environ::unset): Update comment.
10305
10306 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10307
10308 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10309 registers.
10310
10311 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10312
10313 * record-full.c (record_full_exec_insn): Use byte_vector.
10314
10315 2017-06-22 Yao Qi <yao.qi@linaro.org>
10316
10317 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10318 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10319
10320 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10321
10322 * remote.c (cached_reg): Move from here...
10323 * regcache.h (cached_reg): ...to here.
10324 * python/py-unwind.c (struct reg_info): Remove.
10325 (cached_frame_info): Use cached_reg_t.
10326 (pyuw_prev_register): Likewise.
10327 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10328 (pyuw_dealloc_cache): Free all registers.
10329
10330 2017-06-22 Pedro Alves <palves@redhat.com>
10331 Simon Marchi <simon.marchi@ericsson.com>
10332
10333 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10334 warning.
10335 * common/diagnostics.h: New file.
10336
10337 2017-06-22 Pedro Alves <palves@redhat.com>
10338
10339 * common/agent.h: Add include guards.
10340
10341 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10342
10343 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10344 talk about addressable units instead of bytes.
10345
10346 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10347
10348 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10349 of '::const_iterator'.
10350
10351 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10352
10353 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10354 'unittests/environ-selftests.c'.
10355 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10356 * charset.c (find_charset_names): Declare object 'iconv_env'.
10357 Update code to use 'iconv_env' object. Remove call to
10358 'free_environ'.
10359 * common/environ.c: Include <utility>.
10360 (make_environ): Delete function.
10361 (free_environ): Delete function.
10362 (gdb_environ::clear): New function.
10363 (gdb_environ::operator=): New function.
10364 (gdb_environ::get): Likewise.
10365 (environ_vector): Delete function.
10366 (set_in_environ): Delete function.
10367 (gdb_environ::set): New function.
10368 (unset_in_environ): Delete function.
10369 (gdb_environ::unset): New function.
10370 (gdb_environ::envp): Likewise.
10371 * common/environ.h: Include <vector>.
10372 (struct gdb_environ): Delete; transform into...
10373 (class gdb_environ): ... this class.
10374 (free_environ): Delete prototype.
10375 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10376 environ_vector): Likewise.
10377 * infcmd.c (run_command_1): Update code to call
10378 'envp' from 'gdb_environ' class.
10379 (environment_info): Update code to call methods from 'gdb_environ'
10380 class.
10381 (unset_environment_command): Likewise.
10382 (path_info): Likewise.
10383 (path_command): Likewise.
10384 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10385 (inferior::inferior): Initialize 'environment' using the host's
10386 information.
10387 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10388 Include "environ.h".
10389 (class inferior) <environment>: Change type from 'struct
10390 gdb_environ' to 'gdb_environ'.
10391 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10392 methods from 'gdb_environ' class.
10393 * solib.c (solib_find_1): Likewise
10394 * unittests/environ-selftests.c: New file.
10395
10396 2017-06-20 Yao Qi <yao.qi@linaro.org>
10397
10398 * features/i386/i386-linux.xml: Exchange the order of including
10399 32bit-linux.xml and 32bit-sse.xml.
10400 * features/i386/i386-linux.c: Regenerated.
10401
10402 2017-06-20 Yao Qi <yao.qi@linaro.org>
10403
10404 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10405 Delete copy ctor and assignment operator.
10406 (tdesc_type): Likewise.
10407 (tdesc_feature): Likewise.
10408 (tdesc_free_reg): Remove.
10409 (tdesc_create_reg): Use new.
10410 (tdesc_free_type): Remove.
10411 (tdesc_create_vector): Use new.
10412 (tdesc_create_union): Likewise.
10413 (tdesc_create_flags): Likewise.
10414 (tdesc_create_enum): Likewise.
10415 (tdesc_free_feature): Delete.
10416 (free_target_description): Use delete.
10417
10418 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10419
10420 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10421 registers.
10422
10423 2017-06-19 Pedro Alves <palves@redhat.com>
10424
10425 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10426 after gdb::unlinker.
10427
10428 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10429
10430 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10431 gdb_environ to access an environment variable.
10432
10433 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10434
10435 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10436 gdb_byte*.
10437
10438 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10439
10440 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10441
10442 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10443
10444 * configure: Re-generate.
10445 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10446
10447 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10448
10449 * configure: Re-generate.
10450 * warning.m4: Pass -Werror to compiler when checking for
10451 supported warning flags.
10452
10453 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10454
10455 * Makefile.in (COMPILE.pre): Add "-x c++".
10456
10457 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10458 Pedro Alves <palves@redhat.com>
10459 Yao Qi <yao.qi@linaro.org>
10460
10461 * defs.h (RequireLongest): New.
10462 (extract_integer): Declare function template.
10463 (extract_signed_integer): Remove the declaration, but define it
10464 static inline.
10465 (extract_unsigned_integer): Likewise.
10466 (store_integer): Declare function template.
10467 (store_signed_integer): Remove the declaration, but define it
10468 static inline.
10469 (store_unsigned_integer): Likewise.
10470 * findvar.c (extract_integer): New function template.
10471 (extract_signed_integer): Remove.
10472 (extract_unsigned_integer): Remove.
10473 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10474 instantiations.
10475 (store_integer): New function template.
10476 (store_signed_integer): Remove.
10477 (store_unsigned_integer): Remove.
10478 (store_integer): Explicit instantiations.
10479 * regcache.c (regcache_raw_read_signed): Update.
10480 (regcache::raw_read): New function.
10481 (regcache::raw_read_signed): Remove.
10482 (regcache::raw_read_unsigned): Remove.
10483 (regcache_raw_read_unsigned): Update.
10484 (regcache_raw_write_unsigned): Update.
10485 (regcache::raw_write_signed): Remove.
10486 (regcache::raw_write): New function.
10487 (regcache_cooked_read_signed): Update.
10488 (regcache::raw_write_unsigned): Remove.
10489 (regcache::cooked_read_signed): Remove.
10490 (regcache_cooked_read_unsigned): Update.
10491 (regcache::cooked_read_unsigned): Remove.
10492 (regcache_cooked_write_signed): Update.
10493 (regcache_cooked_write_unsigned): Update.
10494 * regcache.h (regcache) <raw_read_signed>: Remove.
10495 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10496 <raw_read, raw_write>: New.
10497 <cooked_read_signed, cooked_write_signed>: Remove.
10498 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10499 <cooked_read, cooked_write>: New.
10500 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10501 (sh64_pseudo_register_write): Update.
10502
10503 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10504
10505 * arc-tdep.c (arc_disassembler_options): New variable.
10506 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10507 of default_print_insn.
10508 (arc_delayed_print_insn): Set info->section when needed,
10509 use default_print_insn to retrieve a disassembler.
10510
10511 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10512
10513 PR gdb/21574
10514 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10515 to mention $SHELL and startup-with-shell.
10516
10517 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10518
10519 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10520
10521 2017-06-14 Yao Qi <yao.qi@linaro.org>
10522
10523 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10524 default_print_insn instead of print_insn_aarch64.
10525 * arm-tdep.c (gdb_print_insn_arm): Call
10526 default_print_insn instead of print_insn_big_arm
10527 and print_insn_little_arm.
10528 * i386-tdep.c (i386_print_insn): Call default_print_insn
10529 instead of print_insn_i386.
10530 * ia64-tdep.c (ia64_print_insn): Call
10531 default_print_insn instead of print_insn_ia64.
10532 * mips-tdep.c (gdb_print_insn_mips): Call
10533 default_print_insn instead of print_insn_big_mips
10534 and print_insn_little_mips.
10535 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10536 instead of print_insn_spu.
10537
10538 2017-06-14 Pedro Alves <palves@redhat.com>
10539
10540 * ada-lang.c: Include "common/byte-vector.h".
10541 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10542 * charset.c (wchar_iterator::iterate): Resize the vector instead
10543 of reserving it.
10544 * common/byte-vector.h: Include "common/def-vector.h".
10545 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10546 * cli/cli-dump.c: Include "common/byte-vector.h".
10547 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10548 * common/byte-vector.h: New file.
10549 * common/def-vector.h: New file.
10550 * common/default-init-alloc.h: New file.
10551 * dwarf2loc.c: Include "common/byte-vector.h".
10552 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10553 instead of reserving it.
10554 * dwarf2read.c: Include "common/byte-vector.h".
10555 (data_buf::m_vec): Now a gdb::byte_vector.
10556 * gdb_regex.c: Include "common/def-vector.h".
10557 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10558 * mi/mi-main.c: Include "common/byte-vector.h".
10559 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10560 * printcmd.c: Include "common/byte-vector.h".
10561 (print_scalar_formatted): Use gdb::byte_vector.
10562 * valprint.c: Include "common/byte-vector.h".
10563 (maybe_negate_by_bytes, print_decimal_chars): Use
10564 gdb::byte_vector.
10565
10566 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10567
10568 * darwin-nat.c: Include "nat/fork-inferior.h".
10569
10570 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10571
10572 * configure.nat: Factor out Darwin bits that are not
10573 architecture-specific. Add fork-inferior.o.
10574
10575 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10576
10577 * configure.nat: Factor out AIX bits that are not
10578 architecture-specific. Add fork-inferior.o.
10579
10580 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10581
10582 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10583 (read_pieced_value, write_pieced_value): ...here. Reduce to
10584 wrappers that just call rw_pieced_value.
10585
10586 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10587
10588 * dwarf2loc.c (write_pieced_value): When writing the data for a
10589 memory piece, use write_memory_with_notification instead of
10590 write_memory.
10591
10592 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10593
10594 * valops.c (read_value_memory): Change embedded_offset to
10595 represent a bit offset instead of a byte offset.
10596 * value.h (read_value_memory): Adjust comment.
10597
10598 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10599
10600 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10601 dest_offset_bits and source_offset_bits.
10602 (write_pieced_value): Likewise.
10603
10604 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10605
10606 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10607 given by DW_OP_bit_piece.
10608 (write_pieced_value): Likewise.
10609
10610 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10611
10612 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10613 some other preparations to the places where sufficient information
10614 is available.
10615 (write_pieced_value): Likewise.
10616
10617 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10618
10619 * dwarf2loc.c (bits_to_bytes): New function.
10620 (read_pieced_value): Fix offset calculations for register pieces
10621 on big-endian targets.
10622 (write_pieced_value): Likewise.
10623
10624 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10625
10626 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10627 (write_pieced_value): Likewise.
10628
10629 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10630
10631 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10632 transfer the source value's least significant bits, instead of its
10633 lowest-addressed ones. Rename type_len to max_offset.
10634 (read_pieced_value): Mirror above changes to write_pieced_value as
10635 applicable.
10636
10637 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10638
10639 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10640 truncate full bytes from dest_offset_bits before using it as an
10641 offset into the buffer.
10642
10643 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10644
10645 * dwarf2loc.c (write_pieced_value): Include transfer size in
10646 byte-wise check.
10647
10648 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10649
10650 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10651 calculation of this_size.
10652
10653 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10654
10655 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10656 when targeting a bit-field.
10657 (write_pieced_value): Likewise.
10658
10659 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10660
10661 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10662 (allocate_piece_closure): Drop addr_size parameter.
10663 (dwarf2_evaluate_loc_desc_full): Adjust call to
10664 allocate_piece_closure.
10665
10666 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10667
10668 PR gdb/21226
10669 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10670 the LSB end, independent of endianness.
10671
10672 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10673
10674 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10675 size capping.
10676
10677 2017-06-13 Yao Qi <yao.qi@linaro.org>
10678
10679 * mips-linux-nat.c: Move include features/mips*-linux.c to
10680 mips-linux-tdep.c.
10681 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10682 to mips-linux-tdep.c.
10683 * mips-linux-tdep.c: Include features/mips*-linux.c
10684 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10685 functions.
10686 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10687 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10688 (tdesc_mips64_dsp_linux): Declare.
10689
10690 2017-06-12 Tom Tromey <tom@tromey.com>
10691
10692 * valprint.h (val_print_type_code_int): Remove.
10693 * valprint.c (generic_val_print_int): Always call
10694 val_print_scalar_formatted.
10695 (val_print_type_code_int): Remove.
10696 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10697 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10698 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10699 * ada-valprint.c (ada_val_print_num): Use
10700 val_print_scalar_formatted.
10701
10702 2017-06-12 Tom Tromey <tom@tromey.com>
10703
10704 * printcmd.c (print_scalar_formatted): Unify the two switches.
10705 Don't convert scalars to LONGEST.
10706
10707 2017-06-12 Tom Tromey <tom@tromey.com>
10708
10709 PR exp/16225:
10710 * valprint.h (print_decimal_chars): Update.
10711 * valprint.c (maybe_negate_by_bytes): New function.
10712 (print_decimal_chars): Add "is_signed" argument.
10713 * printcmd.c (print_scalar_formatted): Update.
10714
10715 2017-06-12 Tom Tromey <tom@tromey.com>
10716
10717 PR exp/16225:
10718 * valprint.h (print_binary_chars, print_hex_chars): Update.
10719 * valprint.c (val_print_type_code_int): Update.
10720 (print_binary_chars): Add "zero_pad" argument.
10721 (emit_octal_digit): New function.
10722 (print_octal_chars): Don't zero-pad.
10723 (print_decimal_chars): Likewise.
10724 (print_hex_chars): Add "zero_pad" argument.
10725 * sh64-tdep.c (sh64_do_fp_register): Update.
10726 * regcache.c (regcache::dump): Update.
10727 * printcmd.c (print_scalar_formatted): Update.
10728 * infcmd.c (default_print_one_register_info): Update.
10729
10730 2017-06-12 Pedro Alves <palves@redhat.com>
10731 Alan Hayward <alan.hayward@arm.com>
10732
10733 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10734 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10735 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10736 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10737 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10738
10739 2017-06-12 Pedro Alves <palves@redhat.com>
10740
10741 * dwarf2read.c (mapped_symtab::data): Now a vector of
10742 symtab_index_entry instead of vector of
10743 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10744 whether an element's name is NULL instead of checking whether the
10745 element itself is NULL.
10746 (find_slot): Change return type. Adjust.
10747 (hash_expand, , add_index_entry, uniquify_cu_indices)
10748 (write_hash_table): Adjust.
10749
10750 2017-06-12 Pedro Alves <palves@redhat.com>
10751
10752 * dwarf2read.c (recursively_count_psymbols): New function.
10753 (write_psymtabs_to_index): Call it to compute number of psyms and
10754 pass estimate size of psyms_seen to unordered_set's ctor.
10755
10756 2017-06-12 Pedro Alves <palves@redhat.com>
10757
10758 * dwarf2read.c (write_hash_table): Check if key already exists
10759 before emplacing.
10760
10761 2017-06-12 Pedro Alves <palves@redhat.com>
10762
10763 * dwarf2read.c (data_buf::append_space): Rename to...
10764 (data_buf::grow): ... this, and make private. Adjust all callers.
10765 (data_buf::append_uint): New method.
10766 (add_address_entry, write_one_signatured_type)
10767 (write_psymtabs_to_index): Use it.
10768
10769 2017-06-12 Pedro Alves <palves@redhat.com>
10770
10771 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10772 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10773 (data_buf::file_write): Call ::fwrite directly.
10774
10775 2017-06-12 Pedro Alves <palves@redhat.com>
10776
10777 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10778 std::vector::erase.
10779
10780 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10781
10782 Code cleanup: C++ify .gdb_index producer.
10783 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10784 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10785 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10786 (create_strtab, add_string): Remove.
10787 (file_write, data_buf): New.
10788 (struct symtab_index_entry): Use std::vector for cu_indices.
10789 (struct mapped_symtab): Use std::vector for data.
10790 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10791 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10792 Remove.
10793 (find_slot): Change return type. Update it to the new data structures.
10794 (hash_expand, add_index_entry): Update it to the new data structures.
10795 (offset_type_compare): Remove.
10796 (uniquify_cu_indices): Update it to the new data structures.
10797 (c_str_view, c_str_view_hasher, vector_hasher): New.
10798 (add_indices_to_cpool): Remove.
10799 (write_hash_table): Update it to the new data structures.
10800 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10801 (eq_psymtab_cu_index): Remove.
10802 (psym_index_map): New typedef.
10803 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10804 reference and std::unordered_map for cu_index_htab.
10805 (add_address_entry, add_address_entry_worker, write_address_map)
10806 (write_psymbols): Update it to the new data structures.
10807 (write_obstack): Remove.
10808 (struct signatured_type_index_data): Change types_list to a data_buf
10809 reference and psyms_seen to a std::unordered_set reference.
10810 (write_one_signatured_type, recursively_write_psymbols)
10811 (write_psymtabs_to_index): Update it to the new data structures.
10812
10813 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10814
10815 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10816 separate-debug-file commands.
10817 * symfile.h (separate_debug_file_debug): New global.
10818 * symfile.c (separate_debug_file_debug): New global.
10819 (separate_debug_file_exists, find_separate_debug_file): Add
10820 debug output.
10821 (_initialize_symfile): Add "set debug separate-debug-file"
10822 command.
10823 * build-id.c (build_id_to_debug_bfd,
10824 find_separate_debug_file_by_buildid): Add debug output.
10825
10826 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10827
10828 * gdbarch.sh (displaced_step_free_closure): Remove.
10829 * gdbarch.h, gdbarch.c: Re-generate.
10830 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10831 displaced_step_free_closure.
10832 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10833 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10834 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10835 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10836 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10837 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10838 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10839 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10840 * infrun.c (displaced_step_clear): Call xfree instead of
10841 gdbarch_displaced_step_free_closure.
10842
10843 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10844
10845 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10846 NULL".
10847
10848 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10849
10850 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10851 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10852 (mn10300_push_dummy_call): Likewise.
10853
10854 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10855
10856 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10857
10858 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10859
10860 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10861
10862 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10863
10864 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10865 able to start inferiors using a shell.
10866 (New remote packets): Announce new packet "QStartupWithShell".
10867 * remote.c: Add PACKET_QStartupWithShell.
10868 (extended_remote_create_inferior): Handle new
10869 PACKET_QStartupWithShell.
10870 (remote_protocol_features) <QStartupWithShell>: New entry for
10871 PACKET_QStartupWithShell.
10872 (_initialize_remote): Call "add_packet_config_cmd" for
10873 QStartupShell.
10874
10875 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10876 Pedro Alves <palves@redhat.com>
10877
10878 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10879 and "nat/fork-inferior.h".
10880 * common/common-inferior.h: New file, with contents from
10881 "gdb/inferior.h".
10882 * commom/common-utils.c: Include "common-utils.h".
10883 (stringify_argv): New function.
10884 * common/common-utils.h (stringify_argv): New prototype.
10885 * configure.nat: Add "fork-inferior.o" as a dependency for
10886 "*linux*", "fbsd*" and "nbsd*" hosts.
10887 * corefile.c (get_exec_file): Update comment.
10888 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10889 instead of "startup_inferior".
10890 (darwin_create_inferior): Call "add_thread_silent" after
10891 "fork_inferior".
10892 * fork-child.c: Cleanup unnecessary includes.
10893 (SHELL_FILE): Move to "common/common-fork-child.c".
10894 (environ): Likewise.
10895 (exec_wrapper): Initialize.
10896 (get_exec_wrapper): New function.
10897 (breakup_args): Move to "common/common-fork-child.c"; rename to
10898 "breakup_args_for_exec".
10899 (escape_bang_in_quoted_argument): Move to
10900 "common/common-fork-child.c".
10901 (saved_ui): New variable.
10902 (prefork_hook): New function.
10903 (postfork_hook): Likewise.
10904 (postfork_child_hook): Likewise.
10905 (gdb_startup_inferior): Likewise.
10906 (fork_inferior): Move to "common/common-fork-child.c". Update
10907 function to support gdbserver.
10908 (startup_inferior): Likewise.
10909 * gdbcore.h (get_exec_file): Remove declaration.
10910 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10911 instead of "startup_inferior". Call "add_thread_silent" after
10912 "fork_inferior".
10913 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10914 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10915 instead of "startup_inferior". Call "add_thread_silent" after
10916 "fork_inferior".
10917 * inferior.h: Include "common-inferior.h".
10918 (trace_start_error): Move to "common/common-utils.h".
10919 (trace_start_error_with_name): Likewise.
10920 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10921 (startup_inferior): Likewise.
10922 (gdb_startup_inferior): New prototype.
10923 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10924 * nat/fork-inferior.h: New file.
10925 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10926 instead of "startup_inferior". Call "add_thread_silent" after
10927 "fork_inferior".
10928 * target.h (target_terminal_init): Move prototype to
10929 "target/target.h".
10930 (target_terminal_inferior): Likewise.
10931 (target_terminal_ours): Likewise.
10932 * target/target.h (target_terminal_init): New prototype, moved
10933 from "target.h".
10934 (target_terminal_inferior): Likewise.
10935 (target_terminal_ours): Likewise.
10936 * utils.c (gdb_flush_out_err): New function.
10937
10938 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10939
10940 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10941 * common/common-gdbthread.h: New file, with parts from
10942 "gdb/gdbthread.h".
10943 * gdbthread.h: Include "common-gdbthread.h".
10944 (switch_to_thread): Moved to "common/common-gdbthread.h".
10945
10946 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10947
10948 * Makefile.in (SFILES): Add "common/job-control.c".
10949 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10950 (COMMON_OBS): Add "job-control.o".
10951 * common/job-control.c: New file, with contents from
10952 "gdb/inflow.c".
10953 * common/job-control.h: New file, with contents from "terminal.h".
10954 * fork-child.c: Include "job-control.h".
10955 * inflow.c: Include "job-control.h".
10956 (gdb_setpgid): Move to "common/common-inflow.c".
10957 (_initialize_inflow): Move setting of "job_control" to
10958 "handle_job_control".
10959 * terminal.h (job_control): Moved to "common/common-terminal.h".
10960 (gdb_setpgid): Likewise.
10961 * top.c: Include "job_control.h".
10962 * utils.c: Likewise.
10963 (job_control): Moved to "job-control.c".
10964
10965 2017-06-07 Pedro Alves <palves@redhat.com>
10966
10967 * Makefile.in (SFILES): Add gdb_regex.c.
10968 (COMMON_OBS): Add gdb_regex.o.
10969 * ada-lang.c (ada_add_standard_exceptions)
10970 (ada_add_exceptions_from_frame, name_matches_regex)
10971 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10972 parameter type to compiled_regex. Adjust.
10973 (ada_exceptions_list): Use compiled_regex.
10974 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10975 std::unique_ptr<compiled_regex>.
10976 (exception_catchpoint::~exception_catchpoint): Remove regfree
10977 call.
10978 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10979 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10980 * breakpoint.c (solib_catchpoint::compiled): Now a
10981 std::unique_ptr<compiled_regex>.
10982 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10983 (check_status_catch_solib): Adjust to use compiled_regex.
10984 (add_solib_catchpoint): Adjust to use compiled_regex.
10985 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10986 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10987 compiled_regex reference. Adjust to use it.
10988 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10989 declaration. Include "gdb_regex.h".
10990 (apropos_cmd): Change regex parameter to compiled_regex reference.
10991 * gdb_regex.c: New file.
10992 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10993 declarations.
10994 (class compiled_regex): New.
10995 * linux-tdep.c: Include "common/gdb_optional.h".
10996 (struct mapping_regexes): New, factored out from
10997 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10998 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10999 gdb::optional and remove cleanups. Adjust to compiled_regex.
11000 * probe.c: Include "common/gdb_optional.h".
11001 (collect_probes): Use compiled_regex and gdb::optional and remove
11002 cleanups.
11003 * skip.c: Include "common/gdb_optional.h".
11004 (skiplist_entry::compiled_function_regexp): Now a
11005 gdb::optional<compiled_regex>.
11006 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11007 (free_skiplist_entry): Remove regfree call.
11008 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11009 compiled_regex and gdb::optional.
11010 * symtab.c: Include "common/gdb_optional.h".
11011 (search_symbols): Use compiled_regex and gdb::optional.
11012 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11013 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11014 to gdb_regex.c.
11015
11016 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11017
11018 * regcache.c (regcache::save): Avoid buffer use.
11019 (regcache::dump): Likewise.
11020
11021 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11022
11023 * sh-tdep.c (sh_pseudo_register_read): Remove
11024 MAX_REGISTER_SIZE.
11025 (sh_pseudo_register_write): Likewise.
11026 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11027 (sh64_pseudo_register_write): Likewise
11028
11029 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11030
11031 * aarch64-tdep.c (aarch64_store_return_value): Use
11032 V_REGISTER_SIZE.
11033 (aarch64_pseudo_read_value): Likewise.
11034 (aarch64_pseudo_write): Likewise.
11035
11036 2017-06-06 Yao Qi <yao.qi@linaro.org>
11037
11038 * regformats/regdef.h (set_register_cache): Remove the
11039 declaration.
11040
11041 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11042
11043 * frame.c (frame_unwind_register_signed): Use
11044 frame_unwind_register_value.
11045
11046 2017-06-06 Pedro Alves <palves@redhat.com>
11047
11048 PR breakpoints/21553
11049 * breakpoint.c (create_breakpoints_sal_default)
11050 (init_breakpoint_sal, create_breakpoint_sal): Use
11051 gdb::unique_xmalloc_ptr for string parameters.
11052 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11053 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11054 (base_breakpoint_create_breakpoints_sal)
11055 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11056 (strace_marker_create_breakpoints_sal)
11057 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11058 string parameters.
11059 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11060 gdb::unique_xmalloc_ptr for string parameters.
11061 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11062 parameters.
11063
11064 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11065
11066 * alpha-tdep.c (alpha_register_to_value): Use
11067 get_frame_register_value.
11068 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11069
11070 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11071
11072 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11073 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11074 (ia64_value_to_register): Likewise.
11075 (ia64_extract_return_value): Likewise.
11076 (ia64_store_return_value): Likewise.
11077 (ia64_push_dummy_call): Likewise.
11078
11079 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11080
11081 GDB 8.0 released.
11082
11083 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11084
11085 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11086
11087 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11088
11089 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11090 parameter.
11091 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11092
11093 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11094
11095 * event-loop.c (poll_timers): Unallocate timer using delete
11096 instead of xfree.
11097
11098 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11099
11100 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11101 (struct breakpoint) <~breakpoint>: New.
11102 (struct watchpoint): Inherit from breakpoint.
11103 <~watchpoint>: New.
11104 <base>: Remove.
11105 (struct tracepoint): Inherit from breakpoint.
11106 <base>: Remove.
11107 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11108 (struct longjmp_breakpoint): Inherit from breakpoint.
11109 <~longjmp_breakpoint>: New.
11110 <base>: Remove.
11111 (new_breakpoint_from_type): Remove casts.
11112 (watchpoint_in_thread_scope): Remove reference to base field.
11113 (watchpoint_del_at_next_stop): Likewise.
11114 (update_watchpoint): Likewise.
11115 (watchpoint_check): Likewise.
11116 (bpstat_check_watchpoint): Likewise.
11117 (set_longjmp_breakpoint): Likewise.
11118 (struct fork_catchpoint): Inherit from breakpoint.
11119 <base>: Remove.
11120 (struct solib_catchpoint): Inherit from breakpoint.
11121 <~solib_catchpoint>: New.
11122 <base>: Remove.
11123 (dtor_catch_solib): Change to ...
11124 (solib_catchpoint::~solib_catchpoint): ... this.
11125 (breakpoint_hit_catch_solib): Remove reference to base field.
11126 (add_solib_catchpoint): Likewise.
11127 (create_fork_vfork_event_catchpoint): Likewise.
11128 (struct exec_catchpoint): Inherit from breakpoint.
11129 <~exec_catchpoint>: New.
11130 <base>: Remove.
11131 (dtor_catch_exec): Change to ...
11132 (exec_catchpoint::~exec_catchpoint): ... this.
11133 (dtor_watchpoint): Change to ...
11134 (watchpoint::~watchpoint): ... this.
11135 (watch_command_1): Remove reference to base field.
11136 (catch_exec_command_1): Likewise.
11137 (base_breakpoint_dtor): Change to ...
11138 (breakpoint::~breakpoint): ... this.
11139 (base_breakpoint_ops): Remove dtor field value.
11140 (longjmp_bkpt_dtor): Change to ...
11141 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11142 (strace_marker_create_breakpoints_sal): Remove reference to base
11143 field.
11144 (delete_breakpoint): Don't manually call breakpoint destructor.
11145 (create_tracepoint_from_upload): Remove reference to base field.
11146 (trace_pass_set_count): Likewise.
11147 (initialize_breakpoint_ops): Don't initialize
11148 momentary_breakpoint_ops, don't set dtors.
11149 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11150 <~ada_catchpoint>: New.
11151 <base>: Remove.
11152 (create_excep_cond_exprs): Remove reference to base field.
11153 (dtor_exception): Change to ...
11154 (ada_catchpoint::~ada_catchpoint): ... this.
11155 (dtor_catch_exception): Remove.
11156 (dtor_catch_exception_unhandled): Remove.
11157 (dtor_catch_assert): Remove.
11158 (create_ada_exception_catchpoint): Remove reference to base
11159 field.
11160 (initialize_ada_catchpoint_ops): Don't set dtors.
11161 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11162 breakpoint.
11163 <~signal_catchpoint>: New.
11164 <base>: Remove.
11165 (signal_catchpoint_dtor): Change to ...
11166 (signal_catchpoint::~signal_catchpoint): ... this.
11167 (create_signal_catchpoint): Remove reference to base field.
11168 (initialize_signal_catchpoint_ops): Don't set dtor.
11169 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11170 from breakpoint.
11171 <~syscall_catchpoint>: New.
11172 <base>: Remove.
11173 (dtor_catch_syscall): Change to ...
11174 (syscall_catchpoint::~syscall_catchpoint): ... this.
11175 (create_syscall_event_catchpoint): Remove reference to base
11176 field.
11177 (initialize_syscall_catchpoint_ops): Don't set dtor.
11178 * break-catch-throw.c (struct exception_catchpoint): Inherit
11179 from breakpoint.
11180 <~exception_catchpoint>: New.
11181 <base>: Remove.
11182 (dtor_exception_catchpoint): Change to ...
11183 (exception_catchpoint::~exception_catchpoint): ... this.
11184 (handle_gnu_v3_exceptions): Remove reference to base field.
11185 (initialize_throw_catchpoint_ops): Don't set dtor.
11186 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11187 field.
11188 * remote.c (remote_get_tracepoint_status): Likewise.
11189 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11190 * tracefile.c (tracefile_fetch_registers): Likewise.
11191 * tracepoint.c (actions_command): Likewise.
11192 (validate_actionline): Likewise.
11193 (tfind_1): Likewise.
11194 (get_traceframe_location): Likewise.
11195 (find_matching_tracepoint_location): Likewise.
11196 (parse_tracepoint_status): Likewise.
11197 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11198
11199 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11200
11201 * breakpoint.c (struct longjmp_breakpoint): New struct.
11202 (is_tracepoint_type): Change return type to bool.
11203 (is_longjmp_type): New function.
11204 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11205 (set_raw_breakpoint_without_location): Use
11206 new_breakpoint_from_type.
11207 (set_raw_breakpoint): Likewise.
11208
11209 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11210
11211 * breakpoint.c (new_breakpoint_from_type): New function.
11212 (create_breakpoint_sal): Use new_breakpoint_from_type and
11213 unique_ptr.
11214 (create_breakpoint): Likewise.
11215
11216 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11217
11218 * memattr.c (mem_info_command): Rename to ...
11219 (info_mem_command): ... this.
11220 (mem_enable_command): Rename to ...
11221 (enable_mem_command): ... this.
11222 (mem_disable_command): Rename to ...
11223 (disable_mem_command): ... this.
11224 (mem_delete_command): Rename to ...
11225 (delete_mem_command): ... this.
11226 (_initialize_mem): Adjust function names.
11227
11228 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11229
11230 * btrace.c (handle_pt_insn_events): New.
11231 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11232 STATUS. Split into this and ...
11233 (handle_pt_insn_event_flags): ... this.
11234
11235 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11236
11237 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11238 and struct pt_insn.resynced.
11239 * configure: Regenerated.
11240 * config.in: Regenerated.
11241
11242 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11243
11244 * btrace.c (ftrace_find_call_by_number): New function.
11245 (ftrace_new_function): Store objects, not pointers.
11246 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11247 ftrace_new_gap, ftrace_update_function,
11248 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11249 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11250 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11251 btrace_ends_with_single_insn, btrace_call_get): Account for
11252 btrace_thread_info::functions now storing objects.
11253 * btrace.h (struct btrace_thread_info): Add constructor.
11254 (struct btrace_thread_info) <functions>: Make std::vector.
11255 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11256 Initialize with default values.
11257 * record-btrace.c (record_btrace_frame_sniffer): Account for
11258 btrace_thread_info::functions now storing objects.
11259
11260 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11261
11262 * btrace.c: Remove typedef bfun_s.
11263 (ftrace_new_gap): Directly add gaps to the list of gaps.
11264 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11265 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11266 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11267 instead of gdb VEC.
11268
11269 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11270
11271 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11272 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11273 with btrace_thread_info::next_segment and
11274 btrace_thread_info::prev_segment.
11275 * btrace.h: Remove struct btrace_func_link.
11276 (struct btrace_function): Replace pair of function segment pointers
11277 with pair of indices.
11278 * python/py-record-btrace.c (btpy_call_prev_sibling,
11279 btpy_call_next_sibling): Replace references to
11280 btrace_thread_info::segment with btrace_thread_info::next_segment and
11281 btrace_thread_info::prev_segment.
11282 * record-btrace.c (record_btrace_frame_this_id): Use
11283 btrace_find_call_by_number.
11284
11285 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11286
11287 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11288 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11289 btrace_insn_next, btrace_insn_prev): Remove references to
11290 btrace_thread_info::flow.
11291 * btrace.h (struct btrace_function): Remove FLOW.
11292
11293 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11294
11295 * btrace.c (ftrace_find_call_by_number): New function.
11296 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11297 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11298 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11299 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11300 index.
11301 * btrace.h (struct btrace_function): Turn UP into an index.
11302 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11303 as an index.
11304 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11305 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11306 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11307
11308 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11309
11310 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11311 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11312 ftrace_update_function, ftrace_compute_global_level_offset,
11313 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11314 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11315 btrace_insn_end, btrace_is_empty): Remove references to
11316 btrace_thread_info::begin and btrace_thread_info::end.
11317 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11318 (struct btrace_thread_info) <functions>: Adjust comment.
11319 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11320 btrace_thread_info::begin.
11321
11322 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11323
11324 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11325 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11326 ftrace_update_function): Remove arguments that implicitly were always
11327 BTINFO->END.
11328 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11329 Don't pass BTINFO->END.
11330
11331 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11332
11333 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11334 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11335 btrace_find_insn_by_number): Replace function segment pointer with
11336 index.
11337 (btrace_insn_cmp): Simplify.
11338 * btrace.h: (struct btrace_insn_iterator) Rename index to
11339 insn_index. Replace function segment pointer with index into function
11340 segment vector.
11341 * record-btrace.c (record_btrace_call_history): Replace function
11342 segment pointer use with index.
11343 (record_btrace_frame_sniffer): Retrieve function call segment through
11344 vector.
11345 (record_btrace_set_replay): Remove defunc't safety check.
11346
11347 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11348
11349 * btrace.c (btrace_ends_with_single_insn): New function.
11350 (btrace_call_get, btrace_call_number, btrace_call_begin,
11351 btrace_call_end, btrace_call_next, btrace_call_prev,
11352 btrace_find_call_by_number): Use index into call segment vector
11353 instead of pointer.
11354 (btrace_call_cmp): Simplify.
11355 * btrace.h (struct btrace_call_iterator): Replace function call segment
11356 pointer with index into vector.
11357 * record-btrace.c (record_btrace_call_history): Use index instead of
11358 pointer.
11359
11360 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11361
11362 * btrace.c (btrace_insn_begin, btrace_insn_end,
11363 btrace_find_insn_by_number): Add btinfo to iterator.
11364 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11365
11366 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11367
11368 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11369 and save pointers directly.
11370 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11371 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11372 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11373 changed signature of functions.
11374 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11375 (btrace_fetch): Remove code that adds btrace_function pointers to
11376 vector of btrace_functions.
11377 (btrace_clear): Simplify freeing vector of btrace_functions.
11378
11379 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11380
11381 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11382 Replace VEC_* with std::vector functions.
11383 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11384 (struct btrace_thread_info)<functions>: Change type to std::vector.
11385
11386 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11387
11388 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11389 "Removed targets and native configurations" up. Merge duplicate
11390 "New commands" sub-sections. Add "New options" sub-sections.
11391
11392 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11393
11394 * defs.h (copy_integer_to_size): New declaration.
11395 * findvar.c (copy_integer_to_size): New function.
11396 (do_cint_test): New selftest function.
11397 (copy_integer_to_size_test): Likewise.
11398 (_initialize_findvar): Likewise.
11399 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11400 (mips_fbsd_collect_reg): Use raw_collect_integer.
11401 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11402 (mips64_fill_gregset): Use raw_collect_integer
11403 (mips64_fill_fpregset): Use raw_supply_integer.
11404 * regcache.c (regcache::raw_supply_integer): New function.
11405 (regcache::raw_collect_integer): Likewise.
11406 * regcache.h: (regcache::raw_supply_integer): New declaration.
11407 (regcache::raw_collect_integer): Likewise.
11408
11409 2017-05-24 Yao Qi <yao.qi@linaro.org>
11410
11411 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11412 (COMMON_OBS): Add gdbarch-selftests.o.
11413 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11414 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11415 * gdbarch-selftests.c: New file.
11416 * regcache.h (regcache) <~regcache>: Mark it virtual if
11417 GDB_SELF_TEST.
11418 <raw_write>: Likewise.
11419
11420 2017-05-24 Yao Qi <yao.qi@linaro.org>
11421
11422 * regcache.c (current_regcache): Change it to
11423 regcache::current_regcache.
11424 (regcache_observer_target_changed): Update.
11425 (regcache_thread_ptid_changed): Make it a regcache static
11426 method.
11427 (regcache_thread_ptid_changed): Update.
11428 (class regcache_access): New.
11429 (current_regcache_test): Update.
11430 (_initialize_regcache): Update.
11431 * regcache.h: Include forward_list.
11432 (regcache): Declare regcache_thread_ptid_changed and declare
11433 registers_changed_ptid as friend.
11434
11435 2017-05-24 Yao Qi <yao.qi@linaro.org>
11436
11437 * i387-tdep.c (i387_register_to_value): Use register_size
11438 instead of TYPE_LENGTH.
11439 * m68k-tdep.c (m68k_register_to_value): Likewise.
11440
11441 2017-05-24 Yao Qi <yao.qi@linaro.org>
11442
11443 * i387-tdep.c (i387_convert_register_p): Return false if type
11444 code isn't TYPE_CODE_FLT.
11445
11446 2017-05-24 Yao Qi <yao.qi@linaro.org>
11447
11448 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11449 length is 4.
11450 (alpha_register_to_value): Remove type length check.
11451 (alpha_value_to_register): Likewise.
11452
11453 2017-05-24 Yao Qi <yao.qi@linaro.org>
11454
11455 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11456 TYPE_CODE_FLT.
11457
11458 2017-05-24 Yao Qi <yao.qi@linaro.org>
11459
11460 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11461 TYPE_CODE_FLT or not.
11462
11463 2017-05-24 Yao Qi <yao.qi@linaro.org>
11464
11465 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11466 * avr-tdep.c (avr_gdbarch_init): Likewise.
11467 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11468 * cris-tdep.c (cris_gdbarch_init): Likewise.
11469 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11470 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11471 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11472 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11473 * mep-tdep.c (mep_gdbarch_init): Likewise.
11474 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11475 * mips-tdep.c (mips_gdbarch_init): Likewise.
11476 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11477 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11478 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11479 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11480 * v850-tdep.c (v850_gdbarch_init): Likewise.
11481
11482 2017-05-24 Yao Qi <yao.qi@linaro.org>
11483
11484 * selftest-arch.c (tests_with_arch): Call registers_changed
11485 and reinit_frame_cache.
11486 * selftest.c (run_self_tests): Likewise.
11487
11488 2017-05-24 Yao Qi <yao.qi@linaro.org>
11489
11490 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11491 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11492
11493 2017-05-24 Yao Qi <yao.qi@linaro.org>
11494
11495 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11496 set_gdbarch_print_insn.
11497
11498 2017-05-24 Yao Qi <yao.qi@linaro.org>
11499
11500 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11501 set_gdbarch_print_insn.
11502
11503 2017-05-24 Yao Qi <yao.qi@linaro.org>
11504
11505 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11506 set_gdbarch_print_insn.
11507 * arc-tdep.c (arc_gdbarch_init): Likewise.
11508 * arch-utils.c: include dis-asm.h.
11509 (default_print_insn): New function.
11510 * arch-utils.h (default_print_insn): Declare.
11511 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11512 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11513 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11514 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11515 * frv-tdep.c (frv_gdbarch_init): Likewise.
11516 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11517 * gdbarch.sh (print_insn): Use default_print_insn.
11518 * gdbarch.c: Regenerated.
11519 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11520 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11521 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11522 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11523 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11524 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11525 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11526 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11527 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11528 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11529 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11530 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11531 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11532 * mt-tdep.c (mt_gdbarch_init): Likewise.
11533 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11534 * nios2-tdep.c (nios2_print_insn): Remove.
11535 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11536 * rx-tdep.c (rx_gdbarch_init): Likewise.
11537 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11538 * score-tdep.c (score_print_insn): Remove.
11539 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11540 * sh-tdep.c (sh_gdbarch_init): Likewise.
11541 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11542 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11543 * tic6x-tdep.c (tic6x_print_insn): Remove.
11544 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11545 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11546 * v850-tdep.c (v850_gdbarch_init): Likewise.
11547 * vax-tdep.c (vax_gdbarch_init): Likewise.
11548 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11549 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11550
11551 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11552
11553 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11554 (MIPS_FP0_REGNUM): Remove.
11555 (MIPS_FSR_REGNUM): Remove.
11556 (mips_fbsd_supply_fpregs): Use mips_regnum.
11557 (mips_fbsd_supply_gregs): Likewise.
11558 (mips_fbsd_collect_fpregs): Likewise.
11559 (mips_fbsd_collect_gregs): Likewise.
11560
11561 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11562
11563 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11564 (getpfpregs_supplies): New function.
11565 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11566 getfpregs_supplies.
11567 (mips_fbsd_store_inferior_registers): Likewise.
11568
11569 2017-05-22 Pedro Alves <palves@redhat.com>
11570
11571 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11572 maintainer.
11573
11574 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11575
11576 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11577 (store_register): Likewise.
11578 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11579 (get_decimal_float_return_value): Likewise.
11580 (do_ppc_sysv_return_value): Likewise.
11581 (ppc64_sysv_abi_push_integer): Likewise.
11582 (ppc64_sysv_abi_push_freg): Likewise.
11583 (ppc64_sysv_abi_return_value_base): Likewise.
11584 (ppc64_sysv_abi_return_value): Likewise.
11585 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11586 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11587 * rs6000-nat.c: Likewise.
11588 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11589 (rs6000_value_to_register): Likewise.
11590 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11591
11592 2017-05-21 Tom Tromey <tom@tromey.com>
11593
11594 PR rust/21466:
11595 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11596 arrays as "[T]", not "[T; ]".
11597
11598 2017-05-19 Tom Tromey <tom@tromey.com>
11599
11600 PR rust/21484:
11601 * rust-lang.c (exp_descriptor_rust): New function.
11602 (rust_language_defn): Use it.
11603 * p-lang.c (pascal_language_defn): Update.
11604 * opencl-lang.c (opencl_language_defn): Update.
11605 * objc-lang.c (objc_language_defn): Update.
11606 * m2-lang.c (m2_language_defn): Update.
11607 * language.h (struct language_defn)
11608 <la_watch_location_expression>: New member.
11609 * language.c (unknown_language_defn, auto_language_defn)
11610 (local_language_defn): Update.
11611 * go-lang.c (go_language_defn): Update.
11612 * f-lang.c (f_language_defn): Update.
11613 * d-lang.c (d_language_defn): Update.
11614 * c-lang.h (c_watch_location_expression): Declare.
11615 * c-lang.c (c_watch_location_expression): New function.
11616 (c_language_defn, cplus_language_defn, asm_language_defn)
11617 (minimal_language_defn): Use it.
11618 * breakpoint.c (watch_command_1): Call
11619 la_watch_location_expression.
11620 * ada-lang.c (ada_language_defn): Update.
11621
11622 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11623
11624 PR tui/21482
11625 * gdb_curses.h (NOMACROS): Define.
11626 (NCURSES_NOMACROS): Define.
11627
11628 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11629
11630 PR tui/21482
11631 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11632 arg to char *.
11633 * tui/tui-wingeneral.c (box_win): Likewise.
11634 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11635 (tui_show_source_line): Likewise.
11636 (tui_show_exec_info_content): Likewise.
11637
11638 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11639
11640 * sparc-tdep.c (sparc_structure_return_p)
11641 (sparc_arg_on_registers_p): New functions.
11642 (sparc32_store_arguments): Use them.
11643 * sparc64-tdep.c (sparc64_16_byte_align_p)
11644 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11645 Handle TYPE_CODE_ARRAY.
11646
11647 2017-05-17 Yao Qi <yao.qi@linaro.org>
11648
11649 * cli/cli-decode.c (add_alias_cmd): New function.
11650 * command.h (add_alias_cmd): Declare.
11651 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11652 instead call add_alias_cmd.
11653
11654 2017-05-17 Pedro Alves <palves@redhat.com>
11655
11656 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11657 (nat_makefile_frag): ... this. All references updated.
11658 * configure.ac: Likewise.
11659 * configure.nat: Likewise. Enhance comments.
11660 * configure: Regenerate.
11661
11662 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11663
11664 * procfs.c (procfs_create_inferior): Change prototype to match
11665 definition.
11666
11667 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11668
11669 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11670 C++ compiler warning.
11671
11672 2017-05-12 Tom Tromey <tom@tromey.com>
11673
11674 PR rust/21483:
11675 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11676 recurse, just call value_struct_elt directly.
11677
11678 2017-05-12 Tom Tromey <tom@tromey.com>
11679
11680 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11681 OP_RUST_ARRAY>: Fix.
11682
11683 2017-05-12 Tom Tromey <tom@tromey.com>
11684
11685 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11686
11687 2017-05-09 Yao Qi <yao.qi@linaro.org>
11688
11689 * regcache.c: Include <forward_list>.
11690 (struct regcache_list): Remove.
11691 (current_regcache): Update.
11692 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11693 (regcache_thread_ptid_changed): Likewise.
11694 (registers_changed_ptid): Likewise.
11695 (current_regcache_size): Likewise.
11696
11697 2017-05-09 Yao Qi <yao.qi@linaro.org>
11698
11699 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11700 (current_regcache_size): New function.
11701 (current_regcache_test): New function.
11702 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11703
11704 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11705
11706 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11707 (print_gp_register_row): Use get_frame_register_value.
11708
11709 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11710
11711 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11712 (mips_supply_fpregset): Likewise.
11713 (mips64_supply_gregset): Likewise.
11714
11715 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11716
11717 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11718 regcache->raw_supply_zeroed.
11719
11720 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11721
11722 * configure.nat: Rearrange 'case' statements to match
11723 host before cpu.
11724
11725 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11726
11727 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11728 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11729 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11730 "@nat_extra_makefile_frag@".
11731 (Makefile): Remove dependency on "@frags@".
11732 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11733 (data-directory/Makefile): Likewise.
11734 * config/aarch64/linux.mh: Deleted; moved contents to
11735 "gdb/configure.nat".
11736 * config/alpha/alpha-linux.mh: Likewise.
11737 * config/alpha/nbsd.mh: Likewise.
11738 * config/arm/linux.mh: Likewise.
11739 * config/arm/nbsdelf.mh: Likewise.
11740 * config/i386/cygwin.mh: Likewise.
11741 * config/i386/cygwin64.mh: Likewise.
11742 * config/i386/darwin.mh: Likewise.
11743 * config/i386/fbsd.mh: Likewise.
11744 * config/i386/fbsd64.mh: Likewise.
11745 * config/i386/go32.mh: Likewise.
11746 * config/i386/i386gnu.mh: Likewise.
11747 * config/i386/i386sol2.mh: Likewise.
11748 * config/i386/linux.mh: Likewise.
11749 * config/i386/linux64.mh: Likewise.
11750 * config/i386/mingw.mh: Likewise.
11751 * config/i386/mingw64.mh: Likewise.
11752 * config/i386/nbsd64.mh: Likewise.
11753 * config/i386/nbsdelf.mh: Likewise.
11754 * config/i386/nto.mh: Likewise.
11755 * config/i386/obsd.mh: Likewise.
11756 * config/i386/obsd64.mh: Likewise.
11757 * config/i386/sol2-64.mh: Likewise.
11758 * config/ia64/linux.mh: Likewise.
11759 * config/m32r/linux.mh: Likewise.
11760 * config/m68k/linux.mh: Likewise.
11761 * config/m68k/nbsdelf.mh: Likewise.
11762 * config/m68k/obsd.mh: Likewise.
11763 * config/m88k/obsd.mh: Likewise.
11764 * config/mips/fbsd.mh: Likewise.
11765 * config/mips/linux.mh: Likewise.
11766 * config/mips/nbsd.mh: Likewise.
11767 * config/mips/obsd64.mh: Likewise.
11768 * config/pa/linux.mh: Likewise.
11769 * config/pa/nbsd.mh: Likewise.
11770 * config/pa/obsd.mh: Likewise.
11771 * config/powerpc/aix.mh: Likewise.
11772 * config/powerpc/fbsd.mh: Likewise.
11773 * config/powerpc/linux.mh: Likewise.
11774 * config/powerpc/nbsd.mh: Likewise.
11775 * config/powerpc/obsd.mh: Likewise.
11776 * config/powerpc/ppc64-linux.mh: Likewise.
11777 * config/powerpc/spu-linux.mh: Likewise.
11778 * config/s390/linux.mh: Likewise.
11779 * config/sh/nbsd.mh: Likewise.
11780 * config/sparc/fbsd.mh: Likewise.
11781 * config/sparc/linux.mh: Likewise.
11782 * config/sparc/linux64.mh: Likewise.
11783 * config/sparc/nbsd64.mh: Likewise.
11784 * config/sparc/nbsdelf.mh: Likewise.
11785 * config/sparc/obsd64.mh: Likewise.
11786 * config/sparc/sol2.mh: Likewise.
11787 * config/tilegx/linux.mh: Likewise.
11788 * config/vax/nbsdelf.mh: Likewise.
11789 * config/vax/obsd.mh: Likewise.
11790 * config/xtensa/linux.mh: Likewise.
11791 * config/i386/i386gnu.mn: New file, with excerpts from
11792 "config/i386/i386gnu.mh".
11793 * configure: Regenerate.
11794 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11795 *.mh files under "gdb/config".
11796 * configure.nat: New file, with contents from the
11797 "gdb/config/*/*.mh" files.
11798
11799 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11800
11801 * btrace.c (btrace_clear): Free insn vector.
11802
11803 2017-05-05 Pedro Alves <palves@redhat.com>
11804
11805 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11806 * configure: Regenerate.
11807
11808 2017-05-04 Pedro Alves <palves@redhat.com>
11809
11810 * Makefile.in (SFILES): Add progspace-and-thread.c.
11811 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11812 (COMMON_OBS): Add progspace-and-thread.o.
11813 * breakpoint.c: Include "progspace-and-thread.h".
11814 (update_inserted_breakpoint_locations)
11815 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11816 Use scoped_restore_current_pspace_and_thread.
11817 (create_std_terminate_master_breakpoint): Use
11818 scoped_restore_current_program_space.
11819 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11820 (print_breakpoint_location): Use
11821 scoped_restore_current_program_space.
11822 (bp_loc_is_permanent): Use
11823 scoped_restore_current_pspace_and_thread.
11824 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11825 (download_tracepoint_locations): Use
11826 scoped_restore_current_pspace_and_thread.
11827 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11828 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11829 (enum step_over_calls_kind): Moved from inferior.h.
11830 (class scoped_restore_current_thread): New class.
11831 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11832 declaration.
11833 (scoped_restore_current_thread): New class.
11834 * infcmd.c: Include "common/gdb_optional.h".
11835 (continue_1, proceed_after_attach): Use
11836 scoped_restore_current_thread.
11837 (notice_new_inferior): Use scoped_restore_current_thread.
11838 * inferior.c: Include "progspace-and-thread.h".
11839 (restore_inferior, save_current_inferior): Delete.
11840 (add_inferior_command, clone_inferior_command): Use
11841 scoped_restore_current_pspace_and_thread.
11842 * inferior.h (scoped_restore_current_inferior): New class.
11843 * infrun.c: Include "progspace-and-thread.h" and
11844 "common/gdb_optional.h".
11845 (follow_fork_inferior): Use
11846 scoped_restore_current_pspace_and_thread.
11847 (scoped_restore_exited_inferior): New class.
11848 (handle_vfork_child_exec_or_exit): Use
11849 scoped_restore_exited_inferior,
11850 scoped_restore_current_pspace_and_thread,
11851 scoped_restore_current_thread and scoped_restore.
11852 (fetch_inferior_event): Use scoped_restore_current_thread.
11853 * linespec.c (decode_line_full, decode_line_1): Use
11854 scoped_restore_current_program_space.
11855 * mi/mi-main.c: Include "progspace-and-thread.h".
11856 (exec_continue): Use scoped_restore_current_thread.
11857 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11858 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11859 * proc-service.c (ps_pglobal_lookup): Use
11860 scoped_restore_current_program_space.
11861 * progspace-and-thread.c: New file.
11862 * progspace-and-thread.h: New file.
11863 * progspace.c (release_program_space, clone_program_space): Use
11864 scoped_restore_current_program_space.
11865 (restore_program_space, save_current_program_space)
11866 (save_current_space_and_thread): Delete.
11867 (switch_to_program_space_and_thread): Moved to
11868 progspace-and-thread.c.
11869 * progspace.h (save_current_program_space)
11870 (save_current_space_and_thread): Delete declarations.
11871 (scoped_restore_current_program_space): New class.
11872 * remote.c (remote_btrace_maybe_reopen): Use
11873 scoped_restore_current_thread.
11874 * symtab.c: Include "progspace-and-thread.h".
11875 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11876 * thread.c (print_thread_info_1): Use
11877 scoped_restore_current_thread.
11878 (struct current_thread_cleanup): Delete.
11879 (do_restore_current_thread_cleanup)
11880 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11881 (scoped_restore_current_thread::~scoped_restore_current_thread):
11882 ... this new dtor.
11883 (make_cleanup_restore_current_thread): Rename/convert to ...
11884 (scoped_restore_current_thread::scoped_restore_current_thread):
11885 ... this new ctor.
11886 (thread_apply_all_command): Use scoped_restore_current_thread.
11887 (thread_apply_command): Use scoped_restore_current_thread.
11888 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11889 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11890
11891 2017-05-04 Pedro Alves <palves@redhat.com>
11892
11893 * thread.c (make_cleanup_restore_current_thread): Move
11894 find_thread_ptid call before the is_stopped call. Assert that the
11895 thread is found. Replace is_stopped call by checking the thread's
11896 state directly. Remove unnecessary NULL-thread check.
11897
11898 2017-05-04 Pedro Alves <palves@redhat.com>
11899
11900 * corelow.c (thread_section_name): New class.
11901 (get_core_register_section, get_core_siginfo): Use it.
11902
11903 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11904
11905 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11906 (get_core_register_section): Remove xfree of NULL pointer.
11907
11908 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11909
11910 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11911 * regcache.c (regcache::raw_supply_zeroed): New function.
11912 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11913
11914 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11915
11916 * gdbarch.sh: Remove commented out definition of
11917 TARGET_CHAR_BIT.
11918 * gdbarch.h: Re-generate.
11919
11920 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11921
11922 * configure: Regenerate.
11923
11924 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11925
11926 * solib-target.c (solib_target_relocate_section_addresses):
11927 Remove num_section_bases, num_bases, segment_bases variables.
11928
11929 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11930
11931 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11932
11933 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11934
11935 * solib-target.c: Include <vector>
11936 (struct lm_info_target) <~lm_info_target>: Remove.
11937 <segment_bases, section_bases>: Change type to
11938 std::vector<CORE_ADDR>.
11939 (library_list_start_segment, library_list_start_section,
11940 library_list_end_library,
11941 solib_target_relocate_section_addresses): Adjust.
11942
11943 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11944
11945 * gdbarch.sh (software_single_step): Change return type to
11946 std::vector<CORE_ADDR>.
11947 * gdbarch.c, gdbarch.h: Re-generate.
11948 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11949 Adjust.
11950 (arm_deal_with_atomic_sequence_raw): Adjust.
11951 (thumb_get_next_pcs_raw): Adjust.
11952 (arm_get_next_pcs_raw): Adjust.
11953 (arm_get_next_pcs): Adjust.
11954 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11955 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11956 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11957 (alpha_software_single_step): Adjust.
11958 * alpha-tdep.h (alpha_software_single_step): Adjust.
11959 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11960 * arm-tdep.c (arm_software_single_step): Adjust.
11961 (arm_breakpoint_kind_from_current_state): Adjust.
11962 * arm-tdep.h (arm_software_single_step): Adjust.
11963 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11964 * cris-tdep.c (cris_software_single_step): Adjust.
11965 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11966 (micromips_deal_with_atomic_sequence): Adjust.
11967 (deal_with_atomic_sequence): Adjust.
11968 (mips_software_single_step): Adjust.
11969 * mips-tdep.h (mips_software_single_step): Adjust.
11970 * moxie-tdep.c (moxie_software_single_step): Adjust.
11971 * nios2-tdep.c (nios2_software_single_step): Adjust.
11972 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11973 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11974 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11975 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11976 * sparc-tdep.c (sparc_software_single_step): Adjust.
11977 * spu-tdep.c (spu_software_single_step): Adjust.
11978 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11979
11980 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11981
11982 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11983 * gdbarch.h: Re-generate.
11984
11985 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11986
11987 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11988 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11989 * python/py-instruction.c, python/py-instruction.h: New file.
11990 * python/py-record.c: Add py-instruction.h include.
11991 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11992 gdb.RecordInstruction.
11993 * python/python-internal.h: Add gdbpy_initialize_instruction
11994 declaration.
11995 * python/python.c (do_start_initialization): Add
11996 gdbpy_initialize_instruction.
11997
11998 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11999
12000 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12001 Remove.
12002 (btrace_func_from_recpy_func): New function.
12003 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12004 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12005 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12006 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12007 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12008 Also, use new helper functions.
12009 (btpy_list_item): Use new helper functions.
12010 (recpy_bt_function_call_history): Use new type name.
12011 (btpy_call_getset): Remove.
12012 (gdbpy_initialize_btrace): Remove code to initialize
12013 gdb.BtraceFunctionCall.
12014 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12015 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12016 recpy_bt_func_prev, recpy_bt_func_next): New export.
12017 * python/py-record.c (recpy_func_type): New static object.
12018 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12019 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12020 recpy_func_next): New function.
12021 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12022 (recpy_func_getset): New static object.
12023 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12024 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12025
12026 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12027
12028 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12029 (btpy_object, btpy_insn_type, btpy_new): Remove.
12030 (btpy_list_object): Use gdb.RecordInstruction type instead of
12031 gdb.BtraceInstruction type.
12032 (btrace_insn_from_recpy_insn): New function.
12033 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12034 btpy_new.
12035 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12036 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12037 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12038 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12039 instead of btpy_object.
12040 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12041 btpy_insn_data, btpy_insn_decode): Rename to ...
12042 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12043 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12044 recpy_bt_insn_decode): This. Also, use new helper functions.
12045 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12046 recpy_insn_type.
12047 (btpy_insn_getset): Remove.
12048 (gdbpy_initialize_btrace): Remove code to initialize
12049 gdb.BtraceInstruction. Use recpy_element_object.
12050 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12051 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12052 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12053 * python/py-record.c (recpy_insn_type): New static object.
12054 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12055 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12056 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12057 New function.
12058 (recpy_insn_getset): New static object.
12059 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12060 * python/py-record.h (recpy_element_object): New typedef.
12061 (recpy_insn_type, recpy_insn_new): New export.
12062
12063 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12064
12065 * py-record-btrace.c (btpy_insn_new): Removed.
12066 (btpy_insn_or_gap_new): New function.
12067 (btpy_insn_error): Removed.
12068 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12069 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12070 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12071 btpy_insn_or_gap_new instead of btpy_insn_new.
12072 (btpy_insn_getset): Remove btpy_insn_error.
12073 * py-record.c (recpy_gap_type): New static object.
12074 (recpy_gap_object): New typedef.
12075 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12076 recpy_gap_reason_string): New function.
12077 (recpy_gap_getset): New static object.
12078 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12079 * py-record.h (recpy_gap_new): New export.
12080
12081 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12082
12083 * python/py-record.c (recpy_ptid): Remove.
12084 (recpy_record_getset): Remove recpy_ptid.
12085
12086 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12087
12088 * btrace.c (btrace_fetch): Set inferior_ptid.
12089 * python/py-record-btrace.c: Add "py-record.h" include.
12090 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12091 recpy_bt_end, recpy_bt_instruction_history,
12092 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12093 in gdb.Record object instead of current ptid.
12094 * python/py-record.c: Include new "py-record.h" file.
12095 (recpy_record_object): Moved to py-record.h.
12096 * python/py-record.h: New file.
12097
12098 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12099
12100 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12101 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12102 indentation.
12103
12104 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12105
12106 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12107 the past maintainers section.
12108
12109 2017-04-28 Yao Qi <yao.qi@linaro.org>
12110
12111 * infcmd.c (get_return_value): Use regcache ctor, and remove
12112 cleanup.
12113
12114 2017-04-28 Yao Qi <yao.qi@linaro.org>
12115 Pedro Alves <palves@redhat.com>
12116
12117 * regcache.c (regcache::regcache): New tag dispatch ctor.
12118 (do_cooked_read): Moved above.
12119 (regcache_dup): Use the tag dispatch ctor..
12120 * regcache.h (regcache): Declare ctor, delete copy ctor and
12121 assignment operator, remove friend regcache_dup.
12122
12123 2017-04-28 Yao Qi <yao.qi@linaro.org>
12124
12125 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12126 call method save instead of regcache_cpy.
12127 * regcache.h (struct regcache): Make regcache_dup a friend.
12128
12129 2017-04-28 Yao Qi <yao.qi@linaro.org>
12130
12131 * regcache.c (struct regcache): Move to regcache.h
12132 (regcache::arch): New method.
12133 (regcache_get_ptid): Update.
12134 (get_regcache_arch): Call arch method.
12135 (get_regcache_aspace): Call method aspace.
12136 (register_buffer): Change it to method.
12137 (regcache_save): Change it to regcache::save.
12138 (regcache_restore): Likewise.
12139 (regcache_cpy_no_passthrough): Remove the declaration.
12140 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12141 (regcache_cpy_no_passthrough): Change it to method
12142 cpy_no_passthrough.
12143 (regcache_register_status): Change it to method
12144 get_register_status.
12145 (regcache_invalidate): Change it to method invalidate.
12146 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12147 (regcache_raw_update): Change it to method raw_update.
12148 (regcache_raw_read): Likewise.
12149 (regcache_raw_read_signed): Likewise.
12150 (regcache_raw_read_unsigned): Likewise.
12151 (regcache_raw_write_signed): Likewise.
12152 (regcache_raw_write_unsigned): Likewise.
12153 (regcache_cooked_read): Likewise.
12154 (regcache_cooked_read_value): Likewise.
12155 (regcache_cooked_read_signed): Likewise.
12156 (regcache_cooked_read_unsigned): Likewise.
12157 (regcache_cooked_write_signed): Likewise.
12158 (regcache_cooked_write_unsigned): Likewise.
12159 (regcache_raw_set_cached_value): Likewise.
12160 (regcache_raw_write): Likewise.
12161 (regcache_cooked_write): Likewise.
12162 (regcache_xfer_part): Likewise.
12163 (regcache_raw_read_part): Likewise.
12164 (regcache_raw_write_part): Likewise.
12165 (regcache_cooked_read_part): Likewise.
12166 (regcache_cooked_write_part): Likewise.
12167 (regcache_raw_supply): Likewise.
12168 (regcache_raw_collect): Likewise.
12169 (regcache_transfer_regset): Likewise.
12170 (regcache_supply_regset): Likewise.
12171 (regcache_collect_regset): Likewise.
12172 (regcache_debug_print_register): Likewise.
12173 (enum regcache_dump_what): Move it to regcache.h.
12174 (regcache_dump): Change it to method dump.
12175 * regcache.h (enum regcache_dump_what): New.
12176 (class regcache): New.
12177 * target.c (target_fetch_registers): Call method
12178 debug_print_register.
12179 (target_store_registers): Likewise.
12180
12181 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12182
12183 * windows-nat.c (struct lm_info_windows): Initialize field.
12184 (windows_make_so): Allocate lm_info_windows with new.
12185 (windows_free_so): Free lm_info_windows with delete.
12186
12187 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12188
12189 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12190 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12191 cleanup.
12192 (darwin_free_so): Free lm_info_darwin with delete.
12193
12194 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12195
12196 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12197 <l_addr_p>: Change type to bool.
12198 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12199 (svr4_free_so): Free lm_info_svr4 with delete.
12200 (svr4_copy_library_list): Replace memcpy with call to copy
12201 constructor.
12202 (library_list_start_library, svr4_default_sos): Allocate
12203 lm_info_svr4 with new.
12204
12205 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12206
12207 * solib-target.c (struct lm_info_target): Add destructor,
12208 initialize fields.
12209 <name>: Change type to std::string.
12210 (library_list_start_library): Allocate lm_info_target with new.
12211 (solib_target_free_library_list): Free lm_info_target with
12212 delete.
12213 (solib_target_current_sos): Adapt to std::string.
12214 (solib_target_free_so): Free lm_info_target with delete.
12215
12216 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12217
12218 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12219 fields.
12220 (frv_current_sos): Allocate lm_info_frv with new.
12221 (frv_relocate_main_executable): Free lm_info_frv with delete,
12222 allocate with new.
12223 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12224
12225 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12226
12227 * solib-frv.c (struct lm_info_frv): Fix indentation.
12228
12229 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12230
12231 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12232 map field.
12233 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12234 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12235 and allocate with new.
12236 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12237
12238 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12239
12240 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12241 <filename, member_name>: Change type to std::string.
12242 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12243 (library_list_start_library): Allocate lm_info_aix with new.
12244 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12245 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12246 with copy constructor.
12247
12248 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12249
12250 * solist.h (struct lm_info): Remove.
12251 (struct lm_info_base): New class.
12252 (struct so_list) <lm_info>: Change type to lm_info_base *.
12253 * nto-tdep.c (struct lm_info): Remove.
12254 (lm_addr): Adjust.
12255 * solib-aix.c (struct lm_info): Rename to ...
12256 (struct lm_info_aix): ... this. Extend lm_info_base.
12257 (lm_info_p): Rename to ...
12258 (lm_info_aix_p): ... this, and adjust.
12259 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12260 solib_aix_parse_libraries, library_list_start_library,
12261 solib_aix_free_library_list, solib_aix_parse_libraries,
12262 solib_aix_get_library_list,
12263 solib_aix_relocate_section_addresses, solib_aix_free_so,
12264 solib_aix_get_section_offsets,
12265 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12266 Adjust.
12267 (struct solib_aix_inferior_data) <library_list>: Adjust.
12268 * solib-darwin.c (struct lm_info): Rename to ...
12269 (struct lm_info_darwin): ... this. Extend lm_info_base.
12270 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12271 * solib-dsbt.c (struct lm_info): Rename to ...
12272 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12273 (struct dsbt_info) <main_executable_lm_info): Adjust.
12274 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12275 dsbt_relocate_section_addresses): Adjust.
12276 * solib-frv.c (struct lm_info): Rename to ...
12277 (struct lm_info_frv): ... this. Extend lm_info_base.
12278 (main_executable_lm_info): Adjust.
12279 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12280 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12281 find_canonical_descriptor_in_load_object,
12282 frv_fdpic_find_canonical_descriptor): Adjust.
12283 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12284 to lm_info_svr4.
12285 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12286 svr4_clear_so, svr4_copy_library_list,
12287 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12288 svr4_current_sos, svr4_fetch_objfile_link_map,
12289 solist_update_incremental): Adjust.
12290 * solib-svr4.h (struct lm_info_svr4): Move here from
12291 solib-svr4.c.
12292 * solib-target.c (struct lm_info): Rename to ...
12293 (struct lm_info_target): ... this. Extend lm_info_base.
12294 (lm_info_p): Rename to ...
12295 (lm_info_target_p): ... this.
12296 (solib_target_parse_libraries, library_list_start_segment,
12297 library_list_start_section, library_list_start_library,
12298 library_list_end_library, solib_target_free_library_list,
12299 solib_target_current_sos, solib_target_free_so,
12300 solib_target_relocate_section_addresses): Adjust.
12301 * windows-nat.c (struct lm_info): Rename to ...
12302 (struct lm_info_windows): ... this. Extend lm_info_base.
12303 (windows_make_so, handle_load_dll, handle_unload_dll,
12304 windows_xfer_shared_libraries): Adjust.
12305
12306 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12307
12308 * solib-darwin.c (struct darwin_so_list): Remove.
12309 (darwin_current_sos): Allocate an so_list object instead of a
12310 darwin_so_list, separately allocate an lm_info object.
12311 (darwin_free_so): Free lm_info.
12312
12313 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12314
12315 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12316 with fprintf_filtered.
12317
12318 2017-04-28 Yao Qi <yao.qi@linaro.org>
12319
12320 * regcache.c (regcache::regcache): New function.
12321 (regcache::~regcache): New function.
12322 (regcache_xmalloc_1): Remove.
12323 (regcache_xmalloc): Call new regcache.
12324 (regcache_xfree): Call delete regcache.
12325 (get_thread_arch_aspace_regcache): Call new regcache.
12326
12327 2017-04-28 Yao Qi <yao.qi@linaro.org>
12328
12329 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12330 lwp instead of ptid_get_lwp.
12331
12332 2017-04-28 Yao Qi <yao.qi@linaro.org>
12333
12334 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12335 lwp_info instead of getting from inferior_ptid.
12336
12337 2017-04-27 Keith Seitz <keiths@redhat.com>
12338
12339 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12340 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12341 (CV_CONVERSION_BADNESS): Define.
12342 (rank_one_type): Remove overly restrictive rvalue reference
12343 rank checks.
12344 Add cv-qualifier checks and subranks for type equality.
12345 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12346 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12347 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12348
12349 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12350
12351 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12352 count when creating the object.
12353
12354 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12355 Ulrich Weigand <uweigand@de.ibm.com>
12356
12357 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12358 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12359 is used in AIX.
12360 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12361 (process_xcoff_symbol): Likewise.
12362 (scan_xcoff_symtab): Likewise.
12363
12364 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12365
12366 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12367 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12368 (ia64_access_reg): Use get_frame_register_unsigned.
12369 (ia64_access_rse_reg): Likewise.
12370 (ia64_libunwind_frame_prev_register): Likewise.
12371
12372 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12373
12374 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12375 * gdbarch.c: Regenerated.
12376 * gdbarch.h: Regenerated.
12377 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12378 visibility external.
12379 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12380 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12381 (enum cfa_how_kind): Move to ...
12382 (struct dwarf2_frame_state_reg_info): Likewise.
12383 (struct dwarf2_frame_state): Likewise.
12384 * dwarf2-frame.h: ... here.
12385 (dwarf2_frame_state_alloc_regs): New declaration.
12386 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12387 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12388
12389 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12390
12391 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12392 regcache_raw_read_unsigned.
12393 (xtensa_pseudo_register_write): Likewise.
12394
12395 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12396
12397 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12398 (nds32_pseudo_register_write): Likewise.
12399
12400 2017-04-25 Yao Qi <yao.qi@linaro.org>
12401
12402 * regcache.c (struct regcache) <readonly_p>: Change its type
12403 to bool.
12404 (regcache_xmalloc_1): Update parameter type and callers update.
12405
12406 2017-04-25 Yao Qi <yao.qi@linaro.org>
12407
12408 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12409 set_gdbarch_wchar_bit.
12410 * arm-tdep.c (arm_gdbarch_init): Likewise.
12411
12412 2017-04-25 Pedro Alves <palves@redhat.com>
12413
12414 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12415 (BothAreRelocatable, memcopy, memmove): Don't define.
12416 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12417 macros.
12418
12419 2017-04-25 Pedro Alves <palves@redhat.com>
12420
12421 * common/common-defs.h: Include "common/poison.h".
12422 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12423 and adjust.
12424 * common/poison.h: New file.
12425 * common/traits.h: Include <type_traits>.
12426 (Not, Or, Requires): New, moved from common/function-view.h.
12427
12428 2017-04-25 Pedro Alves <palves@redhat.com>
12429
12430 * breakpoint.h (struct breakpoint): In-class initialize all
12431 fields. Make boolean fields "bool".
12432 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12433 memset call and initializations no longer necessary.
12434
12435 2017-04-25 Pedro Alves <palves@redhat.com>
12436
12437 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12438 reference.
12439 (pt_btrace_insn): New function.
12440 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12441
12442 2017-04-25 Pedro Alves <palves@redhat.com>
12443
12444 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12445 "base" field and inherit from "bp_location" instead. Add
12446 non-default ctor.
12447 (allocate_location_exception): Use new non-default ctor.
12448 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12449 (init_bp_location): Convert to ...
12450 (bp_location::bp_location): ... this new ctor, and remove memset
12451 call.
12452 (base_breakpoint_allocate_location): Use the new non-default ctor.
12453 * breakpoint.h (bp_location): Now a class. Declare default and
12454 non-default ctors. In-class initialize all members.
12455 (init_bp_location): Remove declaration.
12456
12457 2017-04-25 Pedro Alves <palves@redhat.com>
12458
12459 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12460 assignment operator.
12461
12462 2017-04-24 Yao Qi <yao.qi@linaro.org>
12463
12464 * doublest.c (convert_doublest_to_floatformat): Call
12465 floatformat_totalsize_bytes.
12466
12467 2017-04-22 Tom Tromey <tom@tromey.com>
12468
12469 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12470 ui_out_emit_list.
12471 * stack.c (print_frame): Use ui_out_emit_list.
12472 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12473 ui_out_emit_list.
12474 * mi/mi-main.c (print_one_inferior)
12475 (mi_cmd_data_list_register_names)
12476 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12477 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12478 ui_out_emit_list.
12479 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12480 (mi_output_solib_attribs): Use ui_out_emit_list,
12481 ui_out_emit_tuple.
12482 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12483 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12484 (mi_cmd_stack_list_args, list_args_or_locals): Use
12485 ui_out_emit_list.
12486 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12487 * breakpoint.c (print_solib_event, output_thread_groups): Use
12488 ui_out_emit_list.
12489
12490 2017-04-22 Tom Tromey <tom@tromey.com>
12491
12492 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12493 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12494 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12495
12496 2017-04-22 Tom Tromey <tom@tromey.com>
12497
12498 * tracepoint.c (tvariables_info_1)
12499 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12500
12501 2017-04-22 Tom Tromey <tom@tromey.com>
12502
12503 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12504 annotate_arg_emitter.
12505 * breakpoint.c (print_mention_watchpoint)
12506 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12507 * annotate.h (struct annotate_arg_emitter): New.
12508
12509 2017-04-22 Tom Tromey <tom@tromey.com>
12510
12511 * record-btrace.c (record_btrace_insn_history)
12512 (record_btrace_insn_history_range, record_btrace_call_history)
12513 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12514 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12515 ui_out_emit_tuple.
12516 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12517 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12518 * skip.c (skip_info): Use ui_out_emit_tuple.
12519 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12520 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12521 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12522 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12523 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12524 ui_out_emit_tuple.
12525 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12526 (output_register, mi_cmd_data_read_memory)
12527 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12528 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12529 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12530 Use ui_out_emit_tuple.
12531 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12532 ui_out_emit_tuple.
12533 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12534 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12535 * linux-thread-db.c (info_auto_load_libthread_db): Use
12536 ui_out_emit_tuple.
12537 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12538 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12539 * disasm.c (do_mixed_source_and_assembly_deprecated)
12540 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12541 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12542 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12543 * breakpoint.c (print_one_breakpoint_location)
12544 (print_one_breakpoint): Use ui_out_emit_tuple.
12545 * auto-load.c (print_script, info_auto_load_cmd): Use
12546 ui_out_emit_tuple.
12547 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12548
12549 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12550
12551 * thread.c (print_thread_info_1): Remove dead code.
12552
12553 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12554
12555 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12556 GDB_SELF_TEST.
12557 * arm-tdep.c (selftests::arm_record_test): Likewise.
12558
12559 2017-04-21 Yao Qi <yao.qi@linaro.org>
12560
12561 * regcache.c (regcache_restore): Remove argument 2. Replace
12562 argument 3 with regcache. Get register status from
12563 src->register_status and get register contents from
12564 register_buffer (src, regnum).
12565 (regcache_cpy): Update.
12566
12567 2017-04-19 Pedro Alves <palves@redhat.com>
12568
12569 * gdbthread.h (thread): Add missing closing parenthesis in
12570 comment.
12571
12572 2017-04-19 Pedro Alves <palves@redhat.com>
12573
12574 * common/refcounted-object.h: New file.
12575 * gdbthread.h: Include "common/refcounted-object.h".
12576 (thread_info): Inherit from refcounted_object and add comments.
12577 (thread_info::incref, thread_info::decref)
12578 (thread_info::m_refcount): Delete.
12579 (thread_info::deletable): Use the refcounted_object::refcount()
12580 method.
12581 * inferior.c (current_inferior_): Add comment.
12582 (set_current_inferior): Increment/decrement refcounts.
12583 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12584 not-deletable instead of comparing with the current inferior.
12585 (initialize_inferiors): Increment the initial inferior's refcount.
12586 * inferior.h (struct inferior): Forward declare.
12587 Include "common/refcounted-object.h".
12588 (current_inferior, set_current_inferior): Move declaration to
12589 before struct inferior's definition, and fix comment.
12590 (inferior): Inherit from refcounted_object. Add comments.
12591 * thread.c (switch_to_thread_no_regs): Reference the thread's
12592 inferior pointer directly instead of doing a ptid lookup.
12593 (switch_to_no_thread): New function.
12594 (switch_to_thread(thread_info *)): New function, factored out
12595 from ...
12596 (switch_to_thread(ptid_t)): ... this.
12597 (restore_current_thread): Delete.
12598 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12599 fields, and add 'inf' field.
12600 (do_restore_current_thread_cleanup): Check whether old->inf is
12601 alive instead of looking up an inferior by ptid. Use
12602 switch_to_thread and switch_to_no_thread.
12603 (restore_current_thread_cleanup_dtor): Use old->inf directly
12604 instead of lookup up an inferior by id. Decref the inferior.
12605 Don't restore 'removable'.
12606 (make_cleanup_restore_current_thread): Same the inferior pointer
12607 in old, instead of the inferior number. Incref the inferior.
12608 Don't save/clear 'removable'.
12609
12610 2017-04-19 Pedro Alves <palves@redhat.com>
12611
12612 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12613 unittests/scoped_restore-selftests.c.
12614 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12615 * common/scoped_restore.h (scoped_restore_base): Make "class".
12616 (scoped_restore_base::release): New public method.
12617 (scoped_restore_base::scoped_restore_base): New protected ctor.
12618 (scoped_restore_base::m_saved_var): New protected field.
12619 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12620 scoped_restore_base base class instead of m_saved_var directly.
12621 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12622 (scoped_restore_tmpl::scoped_restore_tmpl(const
12623 scoped_restore_tmpl<T>&)): Likewise.
12624 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12625 method.
12626 (scoped_restore_tmpl::saved_var): New method.
12627 (scoped_restore_tmpl::m_saved_var): Delete.
12628 * inferior.h (inferior::detaching): Now a bool.
12629 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12630 cleanup.
12631 * unittests/scoped_restore-selftests.c: New file.
12632
12633 2017-04-19 Pedro Alves <palves@redhat.com>
12634
12635 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12636 Re-sort in alphabetic order.
12637
12638 2017-04-18 Pedro Alves <palves@redhat.com>
12639
12640 * xml-support.c (obstack_xml_printf): Delete.
12641 * xml-support.h (obstack_xml_printf): Delete.
12642
12643 2017-04-18 Pedro Alves <palves@redhat.com>
12644
12645 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12646 vdebug, verror, body_text, start_element, end_element, name,
12647 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12648 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12649 is_xinclude>: Make private and add m_ prefix.
12650 (gdb_xml_parser::body_text): New method, based on ...
12651 (gdb_xml_body_text): ... this. Adjust.
12652 (gdb_xml_parser::vdebug): New method, based on ...
12653 (gdb_xml_debug): ... this. Adjust.
12654 (gdb_xml_parser::verror): New method, based on ...
12655 (gdb_xml_error): ... this. Adjust.
12656 (gdb_xml_parser::start_element): New method, based on ...
12657 (gdb_xml_start_element): ... this. Adjust.
12658 (gdb_xml_start_element_wrapper): Defer to
12659 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12660 (gdb_xml_parser::end_element): New method, based on ...
12661 (gdb_xml_end_element_wrapper): ... this. Adjust.
12662 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12663 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12664 (gdb_xml_parser::use_dtd): New method, based on ...
12665 (gdb_xml_use_dtd): ... this. Adjust.
12666 (gdb_xml_parser::parse): New method, based on ...
12667 (gdb_xml_parse): ... this. Adjust.
12668 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12669 (xinclude_start_include): Adjust to call the parser's name method.
12670 (xml_xinclude_default, xml_xinclude_start_doctype)
12671 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12672 method.
12673 (xml_process_xincludes): Adjust to call parser methods.
12674 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12675 declarations.
12676
12677 2017-04-18 Pedro Alves <palves@redhat.com>
12678
12679 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12680 gdb::optional<std::string>.
12681 * xml-support.c: Include <string>.
12682 (scope_level::scope_level(scope_level &&))
12683 (scope_level::~scope_level): Delete.
12684 (scope_level::body): Now a std::string.
12685 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12686 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12687 parameter.
12688 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12689 (xinclude_parsing_data::output): Now a std::string reference.
12690 (xinclude_start_include): Adjust.
12691 (xml_xinclude_default): Adjust.
12692 (xml_process_xincludes): Add 'output' parameter, and return bool.
12693 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12694 and return bool.
12695 * xml-tdesc.c: Include <unordered_map> and <string>.
12696 (tdesc_xml_cache): Delete.
12697 (tdesc_xml_cache_s): Delete.
12698 (xml_cache): Now an std::unordered_map.
12699 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12700 (target_fetch_description_xml): Change return type to
12701 gdb::optional<std::string>, and adjust.
12702 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12703 (target_fetch_description_xml): Change return type to
12704 gdb::optional<std::string>.
12705
12706 2017-04-18 Pedro Alves <palves@redhat.com>
12707
12708 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12709 unittests/optional-selftests.c.
12710 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12711 * unittests/optional-selftests.c: New file.
12712 * unittests/optional/assignment/1.cc: New file.
12713 * unittests/optional/assignment/2.cc: New file.
12714 * unittests/optional/assignment/3.cc: New file.
12715 * unittests/optional/assignment/4.cc: New file.
12716 * unittests/optional/assignment/5.cc: New file.
12717 * unittests/optional/assignment/6.cc: New file.
12718 * unittests/optional/assignment/7.cc: New file.
12719 * unittests/optional/cons/copy.cc: New file.
12720 * unittests/optional/cons/default.cc: New file.
12721 * unittests/optional/cons/move.cc: New file.
12722 * unittests/optional/cons/value.cc: New file.
12723 * unittests/optional/in_place.cc: New file.
12724 * unittests/optional/observers/1.cc: New file.
12725 * unittests/optional/observers/2.cc: New file.
12726
12727 2017-04-18 Pedro Alves <palves@redhat.com>
12728
12729 * common/gdb_optional.h: Include common/traits.h.
12730 (in_place_t): New type.
12731 (in_place): New constexpr variable.
12732 (optional::optional): Remove member initialization of
12733 m_instantiated.
12734 (optional::optional(in_place_t...)): New constructor.
12735 (optional::~optional): Use reset.
12736 (optional::optional(const optional&)): New.
12737 (optional::optional(const optional&&)): New.
12738 (optional::optional(T &)): New.
12739 (optional::optional(T &&)): New.
12740 (operator::operator=(const optional &)): New.
12741 (operator::operator=(optional &&)): New.
12742 (operator::operator= (const T &))
12743 (operator::operator= (T &&))
12744 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12745 (operator::reset): New.
12746 (operator::m_instantiated):: Add in-class initializer.
12747 * common/traits.h: Include <type_traits>.
12748 (struct And): New types.
12749
12750 2017-04-18 Pedro Alves <palves@redhat.com>
12751
12752 * xml-support.c: Include <vector>.
12753 (scope_level::scope_level(const gdb_xml_element *))
12754 (scope_level::scope_level(scope_level&&)): New.
12755 (scope_level::~scope_level): New.
12756 (scope_level_s): Delete.
12757 (gdb_xml_parser::scopes): Now a std::vector.
12758 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12759 Use std::vector.
12760 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12761 scope cleanup code.
12762 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12763 of the scopes member. Use std::vector::emplace_back.
12764
12765 2017-04-18 Pedro Alves <palves@redhat.com>
12766
12767 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12768 a bool.
12769 (gdb_xml_end_element): Change type of first parameter.
12770 (gdb_xml_cleanup): Rename to ...
12771 (gdb_xml_parser::~gdb_xml_parser): ... this.
12772 (gdb_xml_create_parser_and_cleanup): Delete with ...
12773 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12774 to this new ctor.
12775 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12776 using gdb_xml_create_parser_and_cleanup.
12777 (xinclude_parsing_data): Add ctor/dtor.
12778 (xml_xinclude_cleanup): Delete.
12779 (xml_process_xincludes): Create a local xinclude_parsing_data
12780 instead of heap-allocating one. Create a local gdb_xml_parser
12781 instead of heap-allocating one with
12782 gdb_xml_create_parser_and_cleanup.
12783
12784 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12785
12786 PR threads/20743
12787 * fbsd-nat.c (resume_one_thread_cb): Remove.
12788 (resume_all_threads_cb): Remove.
12789 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12790 iterate_over_threads.
12791
12792 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12793
12794 * NEWS: Create a new section for the next release branch.
12795 Rename the section of the current branch, now that it has
12796 been cut.
12797
12798 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12799
12800 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12801 * version.in: Bump version to 8.0.50.DATE-git.
12802
12803 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12804
12805 PR gdb/21385
12806 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12807 independently of the host, and fix build breakage on Cygwin.
12808
12809 2017-04-13 Pedro Alves <palves@redhat.com>
12810
12811 * inferior.c (free_inferior): Convert to ...
12812 (inferior::~inferior): ... this dtor.
12813 (inferior::inferior): New ctor, factored out from ...
12814 (add_inferior_silent): ... here. Allocate the inferior with a new
12815 expression.
12816 (delete_inferior): Call delete instead of free_inferior.
12817 * inferior.h (gdb_environ, continuation): Forward declare.
12818 (inferior): Now a class. Add in-class initialization to all
12819 members. Make boolean fields bool, except 'detaching'.
12820 (inferior::inferior): New explicit ctor.
12821 (inferior::~inferior): New.
12822
12823 2017-04-13 Pedro Alves <palves@redhat.com>
12824
12825 * inferior.c (init_inferior_list): Delete.
12826 * inferior.h (init_inferior_list): Delete.
12827
12828 2017-04-13 Pedro Alves <palves@redhat.com>
12829
12830 PR threads/13217
12831 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12832 (top level): Call it twice, with different thread sets.
12833
12834 2017-04-13 Pedro Alves <palves@redhat.com>
12835
12836 * thread.c: Include <algorithm>.
12837 (thread_array_cleanup): Delete.
12838 (scoped_inc_dec_ref): New class.
12839 (live_threads_count): New function.
12840 (set_thread_refcount): Delete.
12841 (tp_array_compar_ascending): Now a bool.
12842 (tp_array_compar): Convert to a std::sort comparison function.
12843 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12844 and live_threads_count.
12845
12846 2017-04-13 Pedro Alves <palves@redhat.com>
12847
12848 * infrun.c (follow_fork_inferior): Also switch the current
12849 inferior.
12850
12851 2017-04-13 Pedro Alves <palves@redhat.com>
12852
12853 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12854 before calling create_internal_breakpoint.
12855
12856 2017-04-13 Pedro Alves <palves@redhat.com>
12857
12858 * fork-child.c (execv_argv): New class.
12859 (breakup_args): Refactored as ...
12860 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12861 Copy arguments to storage and replace separators with NULL
12862 terminators in place.
12863 (escape_bang_in_quoted_argument): Adjust to return bool.
12864 (execv_argv::execv_argv): New ctor.
12865 (execv_argv::init_for_shell): New method, factored out from
12866 fork_inferior. Don't strdup strings into the vector.
12867 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12868 Remove free_vector_argv call.
12869
12870 2017-04-13 Yao Qi <yao.qi@linaro.org>
12871
12872 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12873 tdep->rx_psw_type.
12874
12875 2017-04-13 Yao Qi <yao.qi@linaro.org>
12876
12877 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12878 * rx-tdep.c (rx_gdbarch_init): Likewise.
12879
12880 2017-04-13 Pedro Alves <palves@redhat.com>
12881
12882 * breakpoint.h (struct breakpoint): Reindent.
12883
12884 2017-04-13 Pedro Alves <palves@redhat.com>
12885
12886 * breakpoint.c (bp_location): Rename to ...
12887 (bp_locations): ... this. All references updated.
12888 (bp_location_count): Rename to ...
12889 (bp_locations_count): ... this. All references updated.
12890 (bp_location_placed_address_before_address_max): Rename to ...
12891 (bp_locations_placed_address_before_address_max): ... this. All
12892 references updated.
12893 (bp_location_shadow_len_after_address_max): Rename to ...
12894 (bp_locations_shadow_len_after_address_max): ... this. All
12895 references updated.
12896 (bp_location_compare_addrs): Rename to ...
12897 (bp_locations_compare_addrs): ... this. All references updated.
12898 (bp_location_compare):Rename to ...
12899 (bp_locations_compare): ... this. All references updated.
12900 (bp_location_target_extensions_update): Rename to ...
12901 (bp_locations_target_extensions_update): ... this. All references
12902 updated.
12903
12904 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12905
12906 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12907 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12908 'sgtty.h'.
12909 * common/gdb_termios.h: New file, with parts of "terminal.h".
12910 * inflow.c: Include "gdb_termios.h".
12911 * ser-unix.c: Include "gdb_termios.h".
12912 * terminal.h: Move terminal-related defines to
12913 "common/gdb_termios.h".
12914
12915 2017-04-12 Tom Tromey <tom@tromey.com>
12916
12917 * probe.c (parse_probes): Update.
12918 * location.h (delete_event_location): Don't declare.
12919 (event_location_deleter::operator()): Update.
12920 * location.c (event_location_deleter::operator()): Rename from
12921 delete_event_location.
12922 * linespec.h (linespec_result) <location>: Change type to
12923 event_location_up.
12924 * linespec.c (canonicalize_linespec, event_location_to_sals)
12925 (decode_objc): Update.
12926 (linespec_result): Don't call delete_event_location.
12927 * breakpoint.c (create_breakpoints_sal)
12928 (bkpt_probe_create_sals_from_location)
12929 (strace_marker_create_sals_from_location): Update.
12930
12931 2017-04-12 Tom Tromey <tom@tromey.com>
12932
12933 * linespec.h (struct linespec_result): Add constructor and
12934 destructor.
12935 (init_linespec_result, destroy_linespec_result)
12936 (make_cleanup_destroy_linespec_result): Don't declare.
12937 * linespec.c (init_linespec_result): Remove.
12938 (linespec_result::~linespec_result): Rename from
12939 destroy_linespec_result. Update.
12940 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12941 Remove.
12942 * breakpoint.c (create_breakpoint, break_range_command)
12943 (decode_location_default): Update.
12944 * ax-gdb.c (agent_command_1): Update.
12945
12946 2017-04-12 Tom Tromey <tom@tromey.com>
12947
12948 * remote.c (remote_download_tracepoint): Update.
12949 * python/py-breakpoint.c (bppy_get_location): Update.
12950 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12951 (gdbscm_breakpoint_location): Update.
12952 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12953 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12954 Change type to event_location_up.
12955 * breakpoint.c (create_overlay_event_breakpoint)
12956 (create_longjmp_master_breakpoint)
12957 (create_std_terminate_master_breakpoint)
12958 (create_exception_master_breakpoint)
12959 (breakpoint_event_location_empty_p, print_breakpoint_location)
12960 (print_one_breakpoint_location, create_thread_event_breakpoint)
12961 (init_breakpoint_sal, create_breakpoint)
12962 (print_recreate_ranged_breakpoint, break_range_command)
12963 (init_ada_exception_breakpoint, say_where): Update.
12964 (base_breakpoint_dtor): Don't call delete_event_location.
12965 (bkpt_print_recreate, tracepoint_print_recreate)
12966 (dprintf_print_recreate, update_static_tracepoint)
12967 (breakpoint_re_set_default): Update.
12968
12969 2017-04-12 Tom Tromey <tom@tromey.com>
12970
12971 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12972 type of "to_do". Update.
12973 (compute_stack_depth): Use std::vector.
12974
12975 2017-04-12 Tom Tromey <tom@tromey.com>
12976
12977 * printcmd.c (find_instruction_backward): Use std::vector.
12978
12979 2017-04-12 Tom Tromey <tom@tromey.com>
12980
12981 * symfile.c (objfilep): Remove typedef.
12982 (reread_symbols): Use a std::vector.
12983
12984 2017-04-12 Tom Tromey <tom@tromey.com>
12985
12986 * mi/mi-main.c (exec_direction_forward): Remove.
12987 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12988 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12989 scoped_restore.
12990 * guile/guile.c (guile_repl_command, guile_command)
12991 (gdbscm_execute_gdb_command): Use scoped_restore.
12992 * go-exp.y (go_parse): Use scoped_restore.
12993 * d-exp.y (d_parse): Use scoped_restore.
12994 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12995 * c-exp.y (c_parse): Use scoped_restore.
12996
12997 2017-04-12 Tom Tromey <tom@tromey.com>
12998
12999 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13000 (mi_parse): Update return type.
13001 (mi_parse_free): Remove.
13002 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13003 (mi_parse::~mi_parse): Rename from mi_parse_free.
13004 (mi_parse_cleanup): Remove.
13005 (mi_parse): Return a unique_ptr. Use new.
13006 * mi/mi-main.c (mi_execute_command): Update.
13007
13008 2017-04-12 Tom Tromey <tom@tromey.com>
13009
13010 * location.c (explicit_location_lex_one): Return a
13011 unique_xmalloc_ptr.
13012 (string_to_explicit_location): Update. Remove cleanups.
13013
13014 2017-04-12 Tom Tromey <tom@tromey.com>
13015
13016 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13017 (compare_value_and_voffset): Change type. Update.
13018 (compute_vtable_size): Change type of "offset_vec".
13019 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13020 (gnuv3_get_typeid): Remove extraneous declaration.
13021
13022 2017-04-12 Tom Tromey <tom@tromey.com>
13023
13024 * charset.h (wchar_iterator): Fix comment.
13025
13026 2017-04-12 Tom Tromey <tom@tromey.com>
13027
13028 * charset.c (iconv_wrapper): New class.
13029 (cleanup_iconv): Remove.
13030 (convert_between_encodings): Use it.
13031
13032 2017-04-12 Tom Tromey <tom@tromey.com>
13033
13034 * symfile.h (increment_reading_symtab): Update type.
13035 * symfile.c (decrement_reading_symtab): Remove.
13036 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13037 * psymtab.c (psymtab_to_symtab): Update.
13038 * dwarf2read.c (dw2_instantiate_symtab): Update.
13039
13040 2017-04-12 Tom Tromey <tom@tromey.com>
13041
13042 * jit.c (struct jit_reader): Declare separately. Add constructor
13043 and destructor. Change type of "handle".
13044 (loaded_jit_reader): Define separately.
13045 (jit_reader_load): Update. New "new".
13046 (jit_reader_unload_command): Use "delete".
13047 * gdb-dlfcn.h (struct dlclose_deleter): New.
13048 (gdb_dlhandle_up): New typedef.
13049 (gdb_dlopen, gdb_dlsym): Update types.
13050 (gdb_dlclose): Remove.
13051 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13052 (gdb_dlsym): Change type of "handle".
13053 (make_cleanup_dlclose): Remove.
13054 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13055 * compile/compile-c-support.c (load_libcc): Update.
13056
13057 2017-04-12 Tom Tromey <tom@tromey.com>
13058
13059 * symtab.h (find_pcs_for_symtab_line): Change return type.
13060 * symtab.c (find_pcs_for_symtab_line): Change return type.
13061 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13062 type of "vec". Update.
13063 (ltpy_get_pcs_for_line): Update.
13064 * linespec.c (decode_digits_ordinary): Update.
13065
13066 2017-04-12 Tom Tromey <tom@tromey.com>
13067
13068 * tracepoint.c (actions_command): Update.
13069 * python/python.c (python_command, python_interactive_command):
13070 Update.
13071 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13072 * guile/guile.c (guile_command): Update.
13073 * defs.h (read_command_lines, read_command_lines_1): Return
13074 command_line_up.
13075 (command_lines_deleter): New struct.
13076 (command_line_up): New typedef.
13077 * compile/compile.c (compile_code_command)
13078 (compile_print_command): Update.
13079 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13080 command_line_up.
13081 (make_cleanup_free_command_lines): Remove.
13082 * cli/cli-script.c (get_command_line, read_command_lines_1)
13083 (copy_command_lines): Return command_line_up.
13084 (while_command, if_command, read_command_lines, define_command)
13085 (document_command): Update.
13086 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13087 Remove.
13088 * breakpoint.h (breakpoint_set_commands): Change type of
13089 "commands".
13090 * breakpoint.c (breakpoint_set_commands): Change type of
13091 "commands". Update.
13092 (do_map_commands_command, update_dprintf_command_list)
13093 (create_tracepoint_from_upload): Update.
13094
13095 2017-04-12 Tom Tromey <tom@tromey.com>
13096
13097 * tracepoint.c (scope_info): Update.
13098 * spu-tdep.c (spu_catch_start): Update.
13099 * python/python.c (gdbpy_decode_line): Update.
13100 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13101 * python/py-breakpoint.c (bppy_init): Update.
13102 * probe.c (parse_probes): Update.
13103 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13104 * location.h (event_location_deleter): New struct.
13105 (event_location_up): New typedef.
13106 (new_linespec_location, new_address_location, new_probe_location)
13107 (new_explicit_location, copy_event_location)
13108 (string_to_event_location, string_to_event_location_basic)
13109 (string_to_explicit_location): Update return type.
13110 (make_cleanup_delete_event_location): Remove.
13111 * location.c (new_linespec_location, new_address_location)
13112 (new_probe_location, new_explicit_location, copy_event_location):
13113 Return event_location_up.
13114 (delete_event_location_cleanup)
13115 (make_cleanup_delete_event_location): Remove.
13116 (string_to_explicit_location, string_to_event_location_basic)
13117 (string_to_event_location): Return event_location_up.
13118 * linespec.c (canonicalize_linespec, event_location_to_sals)
13119 (decode_line_with_current_source)
13120 (decode_line_with_last_displayed, decode_objc): Update.
13121 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13122 * completer.c (location_completer): Update.
13123 * cli/cli-cmds.c (edit_command, list_command): Update.
13124 * breakpoint.c (create_overlay_event_breakpoint)
13125 (create_longjmp_master_breakpoint)
13126 (create_std_terminate_master_breakpoint)
13127 (create_exception_master_breakpoint)
13128 (create_thread_event_breakpoint): Update.
13129 (init_breakpoint_sal): Update. Remove some dead code.
13130 (create_breakpoint_sal): Change type of "location". Update.
13131 (create_breakpoints_sal, create_breakpoint, break_command_1)
13132 (dprintf_command, break_range_command, until_break_command)
13133 (init_ada_exception_breakpoint)
13134 (strace_marker_create_sals_from_location)
13135 (update_static_tracepoint, trace_command, ftrace_command)
13136 (strace_command, create_tracepoint_from_upload): Update.
13137 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13138 * ax-gdb.c (agent_command_1): Update.
13139
13140 2017-04-12 Pedro Alves <palves@redhat.com>
13141
13142 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13143 * configure.tgt: Handle i[34567]86-*-go32* and
13144 i[34567]86-*-msdosdjgpp*.
13145 * i386-tdep.c (i386_svr4_reg_to_regnum):
13146 Make extern.
13147 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13148 i386-go32-tdep.c.
13149 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13150 * i386-go32-tdep.c: New file.
13151 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13152 declarations.
13153
13154 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13155
13156 * aix-thread.c (pd_status2str): Change return type to const char *.
13157
13158 2017-04-12 Pedro Alves <palves@redhat.com>
13159
13160 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13161 calls to set_gdbarch_gnu_triplet_regexp.
13162
13163 2017-04-12 Pedro Alves <palves@redhat.com>
13164
13165 PR gdb/21323
13166 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13167 New enum value.
13168 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13169 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13170 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13171 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13172 * gdbarch.h, gdbarch.c: Regenerate.
13173 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13174 gdbarch_wchar_bit and gdbarch_wchar_signed.
13175 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13176 * arm-tdep.c (arm_gdbarch_init): Likewise.
13177 * avr-tdep.c (avr_gdbarch_init): Likewise.
13178 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13179 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13180 * i386-tdep.c (i386_go32_init_abi): Likewise.
13181 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13182 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13183 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13184 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13185 * sh-tdep.c (sh_gdbarch_init): Likewise.
13186 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13187 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13188 * windows-tdep.c (windows_init_abi): Likewise.
13189 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13190
13191 2017-04-12 Pedro Alves <palves@redhat.com>
13192
13193 PR c++/21323
13194 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13195 cplus_primitive_type_char32_t>: New enum values.
13196 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13197 and cplus_primitive_type_char32_t.
13198 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13199 32, use the archtecture's built-in type for char16_t and char32_t,
13200 respectively. Otherwise, fallback to init_integer_type as before,
13201 but make the type unsigned, and issue a complaint.
13202 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13203
13204 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13205
13206 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13207 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13208
13209 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13210
13211 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13212 'const char *'.
13213
13214 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13215
13216 * common/common-utils.c (free_vector_argv): New function.
13217 * common/common-utils.h: Include <vector>.
13218 (free_vector_argv): New prototype.
13219 * darwin-nat.c (darwin_create_inferior): Rewrite function
13220 prototype in order to constify "exec_file" and accept a
13221 "std::string" for "allargs".
13222 * fork-child.c: Include <vector>.
13223 (breakup_args): Rewrite function, using C++.
13224 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13225 and accept "std::string" for "allargs". Update the code to
13226 calculate "argv" based on "allargs". Update calls to "exec_fun"
13227 and "execvp".
13228 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13229 order to constify "exec_file" and accept a "std::string" for
13230 "allargs".
13231 * go32-nat.c (go32_create_inferior): Likewise.
13232 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13233 * infcmd.c (run_command_1): Constify "exec_file". Use
13234 "std::string" for inferior arguments.
13235 * inferior.h (fork_inferior): Update prototype.
13236 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13237 prototype in order to constify "exec_file" and accept a
13238 "std::string" for "allargs".
13239 * nto-procfs.c (procfs_create_inferior): Likewise.
13240 * procfs.c (procfs_create_inferior): Likewise.
13241 * remote-sim.c (gdbsim_create_inferior): Likewise.
13242 * remote.c (extended_remote_run): Update code to accept
13243 "std::string" as argument.
13244 (extended_remote_create_inferior): Rewrite function prototype in
13245 order to constify "exec_file" and accept a "std::string" for
13246 "allargs".
13247 * rs6000-nat.c (super_create_inferior): Likewise.
13248 (rs6000_create_inferior): Likewise.
13249 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13250 * windows-nat.c (windows_create_inferior): Likewise.
13251
13252 2017-04-11 Pedro Alves <palves@redhat.com>
13253
13254 * thread.c: Fix whitespace throughout.
13255
13256 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13257
13258 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13259
13260 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13261
13262 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13263
13264 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13265
13266 PR gdb/21364
13267 * osdata.c (info_osdata): Check if 'type' is an empty string
13268 instead of NULL.
13269
13270 2017-04-10 Pedro Alves <palves@redhat.com>
13271
13272 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13273 (ptid_to_global_thread_id, in_thread_list)
13274 (do_captured_list_thread_ids, set_resumed, set_running)
13275 (set_executing, set_stop_requested, finish_thread_state)
13276 (validate_registers_access, can_access_registers_ptid)
13277 (print_thread_info_1, switch_to_thread)
13278 (do_restore_current_thread_cleanup)
13279 (make_cleanup_restore_current_thread, thread_command)
13280 (thread_name_command): Use operator== instead of ptid_equal.
13281
13282 2017-04-10 Pedro Alves <palves@redhat.com>
13283
13284 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13285 (current_thread_cleanup_chain): Delete.
13286 (restore_current_thread_cleanup_dtor)
13287 (make_cleanup_restore_current_thread): Remove references to
13288 current_thread_cleanup_chain.
13289
13290 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13291
13292 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13293 REG_UNKNOWN.
13294
13295 2017-04-10 Yao Qi <yao.qi@linaro.org>
13296
13297 PR gdb/19942
13298 * gdbthread.h (thread_info::deletable): New method.
13299 (thread_info::incref): New method.
13300 (thread_info::decref): New method.
13301 (thread_info::refcount): Move it to private.
13302 * infrun.c (save_stop_context): Call inc_refcount.
13303 (release_stop_context_cleanup): Likewise.
13304 * thread.c (set_thread_exited): New function.
13305 (init_thread_list): Delete "tp" only it is deletable, otherwise
13306 call set_thread_exited.
13307 (delete_thread_1): Call set_thread_exited.
13308 (current_thread_cleanup) <inferior_pid>: Remove.
13309 <thread>: New field.
13310 (restore_current_thread_ptid_changed): Removed.
13311 (do_restore_current_thread_cleanup): Adjust.
13312 (restore_current_thread_cleanup_dtor): Don't call
13313 find_thread_ptid.
13314 (set_thread_refcount): Use dec_refcount.
13315 (make_cleanup_restore_current_thread): Adjust.
13316 (thread_apply_all_command): Call inc_refcount.
13317 (_initialize_thread): Don't call
13318 observer_attach_thread_ptid_changed.
13319
13320 2017-04-10 Yao Qi <yao.qi@linaro.org>
13321
13322 * thread.c (delete_thread_1): Hoist code on marking thread as
13323 exited.
13324
13325 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13326
13327 * windows-nat.c (windows_detach): Initialize ptid with
13328 minus_one_ptid.
13329
13330 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13331
13332 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13333
13334 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13335
13336 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13337 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13338 (bfin_pseudo_register_write): Likewise
13339
13340 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13341
13342 * common/ptid.h (struct ptid): Change to...
13343 (class ptid_t): ... this.
13344 <ptid_t>: New constructors.
13345 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13346 matches>: New methods.
13347 <make_null, make_minus_one>: New static methods.
13348 <pid>: Rename to...
13349 <m_pid>: ...this.
13350 <lwp>: Rename to...
13351 <m_lwp>: ...this.
13352 <tid>: Rename to...
13353 <m_tid>: ...this.
13354 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13355 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13356 as references, move comment to class ptid_t.
13357 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13358 ptid_t static methods.
13359 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13360 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13361 Take ptid arguments as references, implement using ptid_t methods.
13362 * unittests/ptid-selftests.c: New file.
13363 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13364 unittests/ptid-selftests.c.
13365 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13366
13367 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13368
13369 * python/python.c (python_run_simple_file): Cast mode literal to
13370 non-const char pointer as expected by PyFile_FromString.
13371
13372 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13373
13374 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13375 minus_one_ptid and null_ptid.
13376
13377 2017-04-05 Pedro Alves <palves@redhat.com>
13378
13379 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13380 * configure: Regenerate.
13381
13382 2017-04-05 Pedro Alves <palves@redhat.com>
13383
13384 * ada-exp.y (yyerror): Constify.
13385 * ada-lang.c (bound_name, get_selections)
13386 (ada_variant_discrim_type)
13387 (ada_variant_discrim_name, ada_value_struct_elt)
13388 (ada_lookup_struct_elt_type, is_unchecked_variant)
13389 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13390 (catch_ada_exception_command_split)
13391 (catch_ada_assert_command_split, catch_assert_command)
13392 (ada_op_name): Constify.
13393 * ada-lang.h (ada_yyerror, get_selections)
13394 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13395 * arc-tdep.c (arc_print_frame_cache): Constify.
13396 * arm-tdep.c (arm_skip_stub): Constify.
13397 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13398 (gen_aggregate_elt_ref): Constify.
13399 * bcache.c (print_bcache_statistics): Constify.
13400 * bcache.h (print_bcache_statistics): Constify.
13401 * break-catch-throw.c (catch_exception_command_1):
13402 * breakpoint.c (struct ep_type_description::description):
13403 Constify.
13404 (add_solib_catchpoint): Constify.
13405 (catch_fork_command_1): Add cast.
13406 (add_catch_command): Constify.
13407 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13408 Constify.
13409 * bsd-uthread.c (bsd_uthread_state): Constify.
13410 * buildsym.c (patch_subfile_names): Constify.
13411 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13412 Constify.
13413 * c-exp.y (yyerror): Constify.
13414 (token::oper): Constify.
13415 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13416 * c-varobj.c (cplus_describe_child): Constify.
13417 * charset.c (find_charset_names): Add cast.
13418 (find_charset_names): Constify array and add const_cast.
13419 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13420 (edit_command): Constify.
13421 * cli/cli-decode.c (lookup_cmd): Constify.
13422 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13423 Constify.
13424 (struct dump_context): Constify.
13425 (add_dump_command, restore_command): Constify.
13426 * cli/cli-script.c (get_command_line): Constify.
13427 * cli/cli-script.h (get_command_line): Constify.
13428 * cli/cli-utils.c (check_for_argument): Constify.
13429 * cli/cli-utils.h (check_for_argument): Constify.
13430 * coff-pe-read.c (struct read_pe_section_data): Constify.
13431 * command.h (lookup_cmd): Constify.
13432 * common/print-utils.c (decimal2str): Constify.
13433 * completer.c (gdb_print_filename): Constify.
13434 * corefile.c (set_gnutarget): Constify.
13435 * cp-name-parser.y (yyerror): Constify.
13436 * cp-valprint.c (cp_print_class_member): Constify.
13437 * cris-tdep.c (cris_register_name, crisv32_register_name):
13438 Constify.
13439 * d-exp.y (yyerror): Constify.
13440 (struct token::oper): Constify.
13441 * d-lang.h (d_yyerror): Constify.
13442 * dbxread.c (struct header_file_location::name): Constify.
13443 (add_old_header_file, add_new_header_file, last_function_name)
13444 (dbx_next_symbol_text, add_bincl_to_list)
13445 (find_corresponding_bincl_psymtab, set_namestring)
13446 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13447 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13448 * defs.h (command_line_input, print_address_symbolic)
13449 (deprecated_readline_begin_hook): Constify.
13450 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13451 Constify.
13452 * event-top.c (handle_line_of_input): Constify and add cast.
13453 * exceptions.c (catch_errors): Constify.
13454 * exceptions.h (catch_errors): Constify.
13455 * expprint.c (print_subexp_standard, op_string, op_name)
13456 (op_name_standard, dump_raw_expression, dump_raw_expression):
13457 * expression.h (op_name, op_string, dump_raw_expression):
13458 Constify.
13459 * f-exp.y (yyerror): Constify.
13460 (struct token::oper): Constify.
13461 (struct f77_boolean_val::name): Constify.
13462 * f-lang.c (f_word_break_characters): Constify.
13463 * f-lang.h (f_yyerror): Constify.
13464 * fork-child.c (fork_inferior): Add cast.
13465 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13466 (new_variant): Constify.
13467 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13468 * gdbarch.c: Regenerate.
13469 * gdbcore.h (set_gnutarget): Constify.
13470 * go-exp.y (yyerror): Constify.
13471 (token::oper): Constify.
13472 * go-lang.h (go_yyerror): Constify.
13473 * go32-nat.c (go32_sysinfo): Constify.
13474 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13475 * guile/scm-cmd.c (cmdscm_function): Constify.
13476 * guile/scm-param.c (pascm_param_value): Constify.
13477 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13478 (h8300sx_register_name): Constify.
13479 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13480 Constify.
13481 * ia64-tdep.c (ia64_register_names): Constify.
13482 * infcmd.c (construct_inferior_arguments): Constify.
13483 (path_command, attach_post_wait): Constify.
13484 * language.c (show_range_command, show_case_command)
13485 (unk_lang_error): Constify.
13486 * language.h (language_defn::la_error)
13487 (language_defn::la_name_of_this): Constify.
13488 * linespec.c (decode_line_2): Constify.
13489 * linux-thread-db.c (thread_db_err_str): Constify.
13490 * lm32-tdep.c (lm32_register_name): Constify.
13491 * m2-exp.y (yyerror): Constify.
13492 * m2-lang.h (m2_yyerror): Constify.
13493 * m32r-tdep.c (m32r_register_names): Constify and make static.
13494 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13495 * m88k-tdep.c (m88k_register_name): Constify.
13496 * macroexp.c (appendmem): Constify.
13497 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13498 (upgrade_type, parse_external, parse_partial_symbols)
13499 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13500 (new_symbol): Constify.
13501 * memattr.c (mem_info_command): Constify.
13502 * mep-tdep.c (register_name_from_keyword): Constify.
13503 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13504 Constify.
13505 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13506 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13507 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13508 cast.
13509 (mi_execute_async_cli_command): Constify.
13510 * mips-tdep.c (mips_register_name): Constify.
13511 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13512 (am33_register_name, am33_2_register_name)
13513 * moxie-tdep.c (moxie_register_names): Constify.
13514 * nat/linux-osdata.c (osdata_type): Constify fields.
13515 * nto-tdep.c (nto_parse_redirection): Constify.
13516 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13517 (lookup_child_selector): Constify.
13518 (objc_methcall::name): Constify.
13519 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13520 (lookup_struct_typedef): Constify.
13521 * objfiles.c (pc_in_section): Constify.
13522 * objfiles.h (pc_in_section): Constify.
13523 * p-exp.y (struct token::oper): Constify.
13524 (yyerror): Constify.
13525 * p-lang.h (pascal_yyerror): Constify.
13526 * parser-defs.h (op_name_standard): Constify.
13527 (op_print::string): Constify.
13528 (exp_descriptor::op_name): Constify.
13529 * printcmd.c (print_address_symbolic): Constify.
13530 * psymtab.c (print_partial_symbols): Constify.
13531 * python/py-breakpoint.c (stop_func): Constify.
13532 (bppy_get_expression): Constify.
13533 * python/py-cmd.c (cmdpy_completer::name): Constify.
13534 (cmdpy_function): Constify.
13535 * python/py-event.c (evpy_add_attribute)
13536 (gdbpy_initialize_event_generic): Constify.
13537 * python/py-event.h (evpy_add_attribute)
13538 (gdbpy_initialize_event_generic): Constify.
13539 * python/py-evts.c (add_new_registry): Constify.
13540 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13541 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13542 * python/py-inferior.c (get_buffer): Add cast.
13543 * python/py-param.c (parm_constant::name): Constify.
13544 * python/py-unwind.c (fprint_frame_id): Constify.
13545 * python/python.c (gdbpy_parameter_value): Constify.
13546 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13547 * remote.c (memory_packet_config::name): Constify.
13548 (show_packet_config_cmd, remote_write_bytes)
13549 (remote_buffer_add_string):
13550 * reverse.c (exec_reverse_once): Constify.
13551 * rs6000-tdep.c (variant::name, variant::description): Constify.
13552 * rust-exp.y (rustyyerror): Constify.
13553 * rust-lang.c (rust_op_name): Constify.
13554 * rust-lang.h (rustyyerror): Constify.
13555 * serial.h (serial_ops::name): Constify.
13556 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13557 (sh_sh3e_register_name, sh_sh2e_register_name)
13558 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13559 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13560 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13561 (sh_sh4al_dsp_register_name): Constify.
13562 * sh64-tdep.c (sh64_register_name): Constify.
13563 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13564 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13565 * stabsread.c (patch_block_stabs, read_type_number)
13566 (ref_map::stabs, ref_add, process_reference)
13567 (symbol_reference_defined, define_symbol, define_symbol)
13568 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13569 (read_one_struct_field, read_struct_fields, read_baseclasses)
13570 (read_tilde_fields, read_struct_type, read_array_type)
13571 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13572 (read_huge_number, read_range_type, read_args, common_block_start)
13573 (find_name_end): Constify.
13574 * stabsread.h (common_block_start, define_symbol)
13575 (process_one_symbol, symbol_reference_defined, ref_add):
13576 * symfile.c (get_section_index, add_symbol_file_command):
13577 * symfile.h (get_section_index): Constify.
13578 * target-descriptions.c (tdesc_type::name): Constify.
13579 (tdesc_free_type): Add cast.
13580 * target.c (find_default_run_target):
13581 (add_deprecated_target_alias, find_default_run_target)
13582 (target_announce_detach): Constify.
13583 (do_option): Constify.
13584 * target.h (add_deprecated_target_alias): Constify.
13585 * thread.c (print_thread_info_1): Constify.
13586 * top.c (deprecated_readline_begin_hook, command_line_input):
13587 Constify.
13588 (init_main): Add casts.
13589 * top.h (handle_line_of_input): Constify.
13590 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13591 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13592 (tfind_command): Rename to ...
13593 (tfind_command_1): ... this and constify.
13594 (tfind_command): New function.
13595 (tfind_end_command, tfind_start_command): Adjust.
13596 (encode_source_string): Constify.
13597 * tracepoint.h (encode_source_string): Constify.
13598 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13599 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13600 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13601 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13602 * tui/tui-win.c (parse_scrolling_args): Constify.
13603 * tui/tui-windata.c (tui_erase_data_content): Constify.
13604 * tui/tui-windata.h (tui_erase_data_content): Constify.
13605 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13606 * tui/tui.c (tui_enable): Add cast.
13607 * utils.c (defaulted_query): Constify.
13608 (init_page_info): Add cast.
13609 (puts_debug, subset_compare): Constify.
13610 * utils.h (subset_compare): Constify.
13611 * varobj.c (varobj_format_string): Constify.
13612 * varobj.h (varobj_format_string): Constify.
13613 * vax-tdep.c (vax_register_name): Constify.
13614 * windows-nat.c (windows_detach): Constify.
13615 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13616 * xml-support.c (gdb_xml_end_element): Constify.
13617 * xml-tdesc.c (tdesc_start_reg): Constify.
13618 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13619 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13620 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13621
13622 2017-04-05 Pedro Alves <palves@redhat.com>
13623
13624 * proc-api.c (struct trans): Constify.
13625 (procfs_note): Constify.
13626 * proc-events.c (struct trans, syscall_table):
13627 * proc-flags.c (struct trans): Constify.
13628 * proc-utils.h (procfs_note): Constify.
13629 * proc-why.c (struct trans): Constify.
13630 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13631 (procfs_detach): Constify.
13632 * sol-thread.c (struct string_map): Constify.
13633 (td_err_string, td_state_string): Constify.
13634
13635 2017-04-05 Pedro Alves <palves@redhat.com>
13636
13637 * proc-api.c (procfs_filename): Don't initialize
13638 procfs_filename.
13639 (prepare_to_trace): Assume procfs_filename is non-NULL.
13640 (_initialize_proc_api): Give procfs_filename a default value here.
13641
13642 2017-04-05 Pedro Alves <palves@redhat.com>
13643
13644 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13645 'cond_string' parameter.
13646 (extract_exception_regexp): Constify 'string' parameter.
13647 (catch_exception_command_1): Constify.
13648 * breakpoint.c (init_catchpoint)
13649 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13650 parameter.
13651 (ep_parse_optional_if_clause, catch_fork_command_1)
13652 (catch_exec_command_1): Constify.
13653 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13654 parameter.
13655 (ep_parse_optional_if_clause): Constify.
13656 * cli/cli-utils.c (remove_trailing_whitespace)
13657 (check_for_argument): Constify.
13658 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13659 non-const overload.
13660 (check_for_argument): Likewise.
13661
13662 2017-04-05 Pedro Alves <palves@redhat.com>
13663
13664 * event-top.c (command_line_handler): Add cast to execute_command
13665 call.
13666 * record-btrace.c (cmd_record_btrace_bts_start)
13667 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13668 (cmd_record_btrace_start): Add cast to execute_command call.
13669 * record-full.c (record_full_goto_insn):
13670 * record.c (record_start, record_stop): Add cast to
13671 execute_command_to_string calls.
13672 (cmd_record_start): Add cast to execute_command calls.
13673
13674 2017-04-05 Pedro Alves <palves@redhat.com>
13675
13676 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13677 static inline function.
13678 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13679 array and use gdb_PyArg_ParseTupleAndKeywords.
13680 * python/py-cmd.c (cmdpy_init): Likewise.
13681 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13682 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13683 (infpy_search_memory): Likewise.
13684 * python/py-objfile.c (objfpy_add_separate_debug_file)
13685 (gdbpy_lookup_objfile): Likewise.
13686 * python/py-symbol.c (gdbpy_lookup_symbol)
13687 (gdbpy_lookup_global_symbol): Likewise.
13688 * python/py-type.c (gdbpy_lookup_type): Likewise.
13689 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13690 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13691 Likewise.
13692
13693 2017-04-05 Pedro Alves <palves@redhat.com>
13694
13695 * python/python-internal.h (gdb_PyGetSetDef): New type.
13696 * python/py-block.c (block_object_getset)
13697 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13698 * python/py-event.c (event_object_getset)
13699 (finish_breakpoint_object_getset): Likewise.
13700 * python/py-inferior.c (inferior_object_getset): Likewise.
13701 * python/py-infthread.c (thread_object_getset): Likewise.
13702 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13703 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13704 * python/py-objfile.c (objfile_getset): Likewise.
13705 * python/py-progspace.c (pspace_getset): Likewise.
13706 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13707 Likewise.
13708 * python/py-record.c (recpy_record_getset): Likewise.
13709 * python/py-symbol.c (symbol_object_getset): Likewise.
13710 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13711 Likewise.
13712 * python/py-type.c (type_object_getset, field_object_getset):
13713 Likewise.
13714 * python/py-value.c (value_object_getset): Likewise.
13715
13716 2017-04-05 Pedro Alves <palves@redhat.com>
13717
13718 * python/python-internal.h (gdb_PyObject_CallMethod)
13719 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13720 New functions.
13721 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13722 (PySys_GetObject, PySys_SetPath): New macros.
13723
13724 2017-04-05 Pedro Alves <palves@redhat.com>
13725
13726 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13727 info_osdata_command.
13728 * osdata.c (info_osdata_command): Rename to ...
13729 (info_osdata): ... this. Constify 'type' parameter, and remove
13730 the 'from_tty' parameter. Accept NULL TYPE.
13731 (info_osdata_command): New function.
13732 * osdata.h (info_osdata_command): Remove declaration.
13733 (info_osdata): New declaration.
13734
13735 2017-04-05 Pedro Alves <palves@redhat.com>
13736
13737 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13738 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13739 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13740 parameter.
13741 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13742 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13743 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13744 parameter.
13745 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13746 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13747 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13748 (mi_cmd_file_list_exec_source_files)
13749 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13750 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13751 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13752 parameter.
13753 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13754 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13755 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13756 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13757 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13758 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13759 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13760 'command' parameter.
13761 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13762 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13763 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13764 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13765 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13766 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13767 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13768 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13769 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13770 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13771 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13772 parameter.
13773 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13774 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13775 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13776 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13777 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13778 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13779 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13780 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13781 (mi_cmd_data_list_changed_registers)
13782 (mi_cmd_data_write_register_values)
13783 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13784 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13785 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13786 (mi_cmd_list_features, mi_cmd_list_target_features)
13787 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13788 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13789 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13790 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13791 (mi_cmd_trace_frame_collected): Constify 'command'
13792 parameter.
13793 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13794 'command' parameter.
13795
13796 2017-04-05 Pedro Alves <palves@redhat.com>
13797
13798 * ada-lang.c (ada_completer_word_break_characters): Now a const
13799 array.
13800 (ada_get_gdb_completer_word_break_characters): Constify.
13801 * completer.c (gdb_completer_command_word_break_characters)
13802 (gdb_completer_file_name_break_characters)
13803 (gdb_completer_quote_characters): Now const arrays.
13804 (get_gdb_completer_quote_characters): Constify.
13805 (set_rl_completer_word_break_characters): New function.
13806 (set_gdb_completion_word_break_characters)
13807 (complete_line_internal): Use it.
13808 * completer.h (get_gdb_completer_quote_characters): Constify.
13809 (set_rl_completer_word_break_characters): Declare.
13810 * f-lang.c (f_word_break_characters): Constify.
13811 * language.c (default_word_break_characters): Constify.
13812 * language.h (language_defn::la_word_break_characters): Constify.
13813 (default_word_break_characters): Constify.
13814 * top.c (init_main): Use set_rl_completer_word_break_characters.
13815
13816 2017-04-05 Pedro Alves <palves@redhat.com>
13817
13818 * aix-thread.c (aix_thread_pid_to_str)
13819 (aix_thread_extra_thread_info): Constify.
13820 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13821 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13822 (bsd_uthread_pid_to_str): Constify.
13823 * corelow.c (core_pid_to_str): Constify.
13824 * darwin-nat.c (darwin_pid_to_str): Constify.
13825 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13826 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13827 Constify.
13828 * gnu-nat.c (gnu_pid_to_str): Constify.
13829 * go32-nat.c (go32_pid_to_str): Constify.
13830 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13831 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13832 * inferior.c (inferior_pid_to_str): Constify.
13833 * linux-nat.c (linux_nat_pid_to_str): Constify.
13834 * linux-tdep.c (linux_core_pid_to_str): Constify.
13835 * linux-thread-db.c (thread_db_pid_to_str)
13836 (thread_db_extra_thread_info): Constify.
13837 * nto-tdep.c (nto_extra_thread_info): Constify.
13838 * nto-tdep.h (nto_extra_thread_info): Constify.
13839 * obsd-nat.c (obsd_pid_to_str): Constify.
13840 * procfs.c (procfs_pid_to_str): Constify.
13841 * ravenscar-thread.c (ravenscar_extra_thread_info)
13842 (ravenscar_pid_to_str): Constify.
13843 * remote-sim.c (gdbsim_pid_to_str): Constify.
13844 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13845 Constify.
13846 * sol-thread.c (solaris_pid_to_str): Constify.
13847 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13848 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13849 * target.c (default_pid_to_str, target_pid_to_str)
13850 (normal_pid_to_str, default_pid_to_str): Constify.
13851 * target.h (target_ops::to_pid_to_str)
13852 (target_ops::to_extra_thread_info): Constify.
13853 (target_pid_to_str, normal_pid_to_str): Constify.
13854 * windows-nat.c (windows_pid_to_str): Constify.
13855 * gdbarch.sh (core_pid_to_str): Constify.
13856 * target-delegates.c: Regenerate.
13857 * gdbarch.h, gdbarch.c: Regenerate.
13858
13859 2017-04-05 Pedro Alves <palves@redhat.com>
13860
13861 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13862 the memory of the temporary warning_pre_print override.
13863 * utils.c (warning_pre_print): Constify.
13864 * utils.h (warning_pre_print): Constify.
13865
13866 2017-04-05 Pedro Alves <palves@redhat.com>
13867
13868 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13869 (shell_command): New function.
13870 (make_command): Use std::string.
13871 (init_cli_cmds): Register shell_command instead of shell_escape.
13872
13873 2017-04-05 Pedro Alves <palves@redhat.com>
13874
13875 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13876 * tracepoint.c (default_collect): Don't initialize.
13877
13878 2017-04-05 Pedro Alves <palves@redhat.com>
13879
13880 * macroexp.c (macro_buffer::shared): Now a bool.
13881 (init_buffer): Update.
13882 (init_shared_buffer): Constify 'addr' parameter.
13883 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13884 casts.
13885
13886 2017-04-05 Pedro Alves <palves@redhat.com>
13887
13888 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13889 * disasm.c (set_disassembler_options): Constify local.
13890 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13891
13892 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13893
13894 PR gdb/21352
13895 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13896 option.
13897
13898 2017-04-05 Yao Qi <yao.qi@linaro.org>
13899
13900 * frame.c (frame_unwind_register_unsigned): Call
13901 frame_unwind_register_value.
13902
13903 2017-04-05 Yao Qi <yao.qi@linaro.org>
13904
13905 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13906 Use gdb_test_multiple, and don't match anchor.
13907
13908 2017-04-05 Pedro Alves <palves@redhat.com>
13909
13910 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13911 (Write After Approval): Remove Simon Marchi.
13912
13913 2017-04-05 Pedro Alves <palves@redhat.com>
13914
13915 * common/gdb_optional.h (optional::optional): Make constexpr and
13916 initialize m_dummy.
13917
13918 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13919
13920 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13921 (amd64fbsd_jmp_buf_reg_offset): Remove.
13922 (amd64fbsd_supply_uthread): Remove function.
13923 (amd64fbsd_collect_uthread): Remove function.
13924 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13925 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13926 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13927 (fbsd-nat.c): Update comment.
13928 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13929 (i386fbsd_jmp_buf_reg_offset): Remove.
13930 (i386fbsd_supply_uthread): Remove function.
13931 (i386fbsd_collect_uthread): Remove function.
13932 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13933
13934 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13935
13936 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13937 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13938 * NEWS: Mention that support for FreeBSD/alpha was removed.
13939 * alpha-fbsd-tdep.c: Delete file.
13940 * config/alpha/fbsd.mh: Delete file.
13941 * configure.host: Delete alpha*-*-freebsd* and
13942 alpha*-*-kfreebsd*-gnu.
13943 * configure.tgt: Delete alpha*-*-freebsd* and
13944 alpha*-*-kfreebsd*-gnu.
13945
13946 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13947
13948 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13949 amd64bsd_store_inferior_registers): Use ptid from regcache.
13950
13951 2017-04-04 Pedro Alves <palves@redhat.com>
13952
13953 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13954 data fields, make them private and add "m_" prefixes.
13955 (lnp_state_machine::lnp_state_machine): New ctor.
13956 (record_line, check_line_address, handle_set_discriminator)
13957 (handle_set_address, handle_advance_pc, handle_special_opcode)
13958 (handle_advance_line, handle_set_file, handle_negate_stmt)
13959 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13960 (end_sequence, advance_line): New methods.
13961 (m_gdbarch, m_record_lines_p): New fields.
13962 (lnp_reader_state): Delete.
13963 (dwarf_record_line): Rename to ...
13964 (lnp_state_machine::record_line): ... adjust.
13965 (init_lnp_state_machine): Delete.
13966 (lnp_state_machine::lnp_state_machine): New.
13967 (check_line_address): Rename to ...
13968 (lnp_state_machine::check_line_address): This.
13969 (dwarf_decode_lines_1): Remove reference to "reader_state".
13970 Adjust lnp_state_machine having a non-default ctor. Use bool.
13971 State machine internal state manipulation moved to
13972 lnp_state_machine methods.
13973
13974 2017-04-04 Pedro Alves <palves@redhat.com>
13975
13976 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13977 unittests/offset-type-selftests.c.
13978 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13979 * common/offset-type.h: New file.
13980 * common/preprocessor.h: New file.
13981 * common/traits.h: New file.
13982 * common/valid-expr.h: New file.
13983 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13984 sect_offset and cu_offset strong typedefs throughout.
13985 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13986 typedefs throughout.
13987 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13988 sect_offset and cu_offset strong typedefs throughout.
13989 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13990 typedefs throughout.
13991 * gdbtypes.h: Include "common/offset-type.h".
13992 (cu_offset): Now an offset type (strong typedef) instead of a
13993 struct.
13994 (sect_offset): Likewise.
13995 (union call_site_parameter_u): Rename "param_offset" field to
13996 "param_cu_off".
13997 * unittests/offset-type-selftests.c: New file.
13998
13999 2017-04-04 Pedro Alves <palves@redhat.com>
14000
14001 * common/underlying.h: New file.
14002 * dwarf2read.c: Include "common/gdb_optional.h" and
14003 "common/underlying.h".
14004 (dir_index, file_name_index): New types.
14005 (file_entry): Use them.
14006 (file_entry::include): Use to_underlying.
14007 (line_header::add_file_name): Use dir_index.
14008 (read_formatted_entries): Use gdb::optional. Read form before
14009 writting to file_entry.
14010 (dwarf_decode_line_header): Use dir_index.
14011 (lnp_state_machine::current_file): Use to_underlying.
14012 (lnp_state_machine::file): Change type to file_name_index.
14013 (dwarf_record_line): Use to_underlying.
14014 (init_lnp_state_machine): Use file_name_index.
14015 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14016
14017 2017-04-04 Pedro Alves <palves@redhat.com>
14018
14019 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14020 operator bool, has_value and get methods.
14021
14022 2017-04-04 Pedro Alves <palves@redhat.com>
14023
14024 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14025 fields.
14026 (line_header): Initialize all data fields. Change type of
14027 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14028 Change type of include_dirs to std::vector<const char *>. Remove
14029 num_include_dirs, include_dirs_size. Change type of file_names to
14030 std::vector<file_entry>. Remove num_file_names, file_names_size.
14031 (line_header::line_header): New.
14032 (line_header::add_include_dir, line_header::add_file_name): New
14033 methods.
14034 (line_header::include_dir_at): Remove NULL check.
14035 (line_header::file_name_at): Add const overload.
14036 (line_header_up): New unique_ptr typedef.
14037 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14038 std::vector. Remove free_line_header call.
14039 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14040 free_line_header call.
14041 (free_cu_line_header): Delete.
14042 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14043 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14044 Adjust to use std::vector.
14045 (free_line_header): Delete.
14046 (free_line_header_voidp): Use delete.
14047 (add_include_dir): Replace with ...
14048 (line_header::add_include_dir): ... this method. Use std::vector.
14049 (add_file_name): Replace with ...
14050 (line_header::add_file_name): ... this method. Use std::vector.
14051 (add_include_dir_stub): Delete.
14052 (read_formatted_entries): Remove memset.
14053 (dwarf_decode_line_header): Return a line_header_up instead of a
14054 raw pointer. Remove cleanup handling. Pass lambdas to
14055 read_formatted_entries. Adjust to use line_header methods.
14056 (dwarf_decode_lines_1): Adjust to use line_header methods.
14057 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14058 use std::vector.
14059
14060 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14061
14062 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14063 instead of struct ptid.
14064
14065 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14066
14067 * frame.c (get_frame_register_bytes): Unwind using value.
14068 (put_frame_register_bytes): Likewise.
14069
14070 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14071
14072 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14073 aggregate-like.
14074
14075 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14076
14077 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14078
14079 2017-03-29 Yao Qi <yao.qi@linaro.org>
14080
14081 * gdbthread.h (struct thread_info): Declare constructor and
14082 destructor. Add some in-class member initializers.
14083 * thread.c (free_thread): Remove.
14084 (init_thread_list): Call delete instead of free_thread.
14085 (new_thread): Call thread_info constructor.
14086 (thread_info::thread_info): New function.
14087 (thread_info::~thread_info): New function.
14088 (delete_thread_1): Call delete instead of free_thread.
14089 (make_cleanup_restore_current_thread): Move tp and frame to
14090 inner block.
14091
14092 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14093
14094 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14095 (arc_skip_prologue): Likewise.
14096 (arc_make_frame_cache): Likewise.
14097 (arc_pv_get_operand): New function.
14098 (arc_is_in_prologue): Likewise.
14099 (arc_analyze_prologue): Likewise.
14100 (arc_print_frame_cache): Likewise.
14101 (MAX_PROLOGUE_LENGTH): New constant.
14102
14103 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14104
14105 * configure.tgt: Add arc-insn.o.
14106 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14107 (dump_arc_instruction_command): New function.
14108 (arc_fprintf_disasm): Likewise.
14109 (arc_disassemble_info): Likewise.
14110 (arc_insn_get_operand_value): Likewise.
14111 (arc_insn_get_operand_value_signed): Likewise.
14112 (arc_insn_get_memory_base_reg): Likewise.
14113 (arc_insn_get_memory_offset): Likewise.
14114 (arc_insn_get_branch_target): Likewise.
14115 (arc_insn_dump): Likewise.
14116 (arc_insn_get_linear_next_pc): Likewise.
14117 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14118 (arc_disassemble_info): Likewise.
14119 (arc_insn_get_branch_target): Likewise.
14120 (arc_insn_get_linear_next_pc): Likewise.
14121 * NEWS: Mention new "maint print arc arc-instruction".
14122
14123 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14124
14125 * arc-tdep (maintenance_print_arc_list): New variable.
14126 (maintenance_print_arc_command): New function.
14127
14128 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14129
14130 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14131 Add "limm" and "reserved".
14132 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14133 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14134 * arc-tdep.h (arc_regnum): Likewise.
14135
14136 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14137
14138 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14139 for THREADPTR register.
14140 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14141 register.
14142 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14143 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14144 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14145
14146 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14147
14148 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14149 registers above gdbarch_num_regs (gdbarch) as privileged in
14150 call0 ABI.
14151
14152 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14153
14154 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14155 for a single specified register or for all registers in
14156 a0_base..a0_base + C0_NREGS range.
14157 (supply_gregset_reg): Call regcache_raw_supply for a single
14158 specified register or for all registers in a0_base..a0_base +
14159 C0_NREGS range.
14160
14161 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14162
14163 * arch/xtensa.h (C0_NREGS): Add definition.
14164 * xtensa-tdep.c (C0_NREGS): Remove definition.
14165
14166 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14167
14168 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14169 Drop xtensa_default_isa initialization.
14170 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14171
14172 2017-03-27 Pedro Alves <palves@redhat.com>
14173
14174 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14175 (file_entry::include_dir): New method.
14176 (line_header::include_dir_at, line_header::file_name_at): New
14177 methods.
14178 (setup_type_unit_groups, setup_type_unit_groups)
14179 (psymtab_include_file_name): Simplify using the new methods.
14180 (lnp_state_machine) <the_line_header>: New field.
14181 <file>: Add comment.
14182 (lnp_state_machine::current_file): New method.
14183 (dwarf_record_line): Simplify using the new methods.
14184 (init_lnp_state_machine): Initialize the "the_line_header" field.
14185 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14186 Simplify using the new methods.
14187
14188 2017-03-27 Pedro Alves <palves@redhat.com>
14189
14190 * cp-name-parser.y (make_empty): Delete.
14191 (demangler_special, nested_name, ptr_operator, array_indicator)
14192 (direct_declarator, declarator_1): Use fill_comp instead of
14193 make_empty.
14194
14195 2017-03-27 Pedro Alves <palves@redhat.com>
14196
14197 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14198 to ATTRIBUTE_PRINTF.
14199 * solib-target.c (library_list_start_list): Print "string" not
14200 "version".
14201 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14202 gdb_xml_error call.
14203
14204 2017-03-27 Pedro Alves <palves@redhat.com>
14205
14206 * dwarf2read.c (struct file_and_directory): New.
14207 (dwarf2_get_dwz_file): Adjust to use std::string.
14208 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14209 (find_file_and_directory): Adjust to return a file_and_directory
14210 object.
14211 (read_file_scope): Adjust to use file_and_directory. Remove
14212 make_cleanup/do_cleanups calls.
14213 (open_and_init_dwp_file): Adjust to use std::string. Remove
14214 make_cleanup/do_cleanups calls.
14215 * python/python.c (do_start_initialization): Adjust to ldirname
14216 returning a std::string.
14217 * utils.c (ldirname): Now returns a std::string.
14218 * utils.h (ldirname): Change return type to std::string.
14219 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14220 returning a std::string.
14221 * xml-tdesc.c (file_read_description_xml): Likewise.
14222
14223 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14224
14225 * regcache.c (regcache_debug_print_register): New function.
14226 * regcache.h (regcache_debug_print_register): New declaration.
14227 * target.c (debug_print_register): Remove.
14228 (target_fetch_registers): Call regcache_debug_print_register.
14229 (target_store_registers): Likewise.
14230
14231 2017-03-24 Pádraig Brady <pbrady@fb.com>
14232
14233 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14234 reference beyond the 'lh->include_dirs' array before accessing to
14235 it.
14236 (psymtab_include_file_name): Likewise.
14237 (dwarf_decode_lines_1): Likewise.
14238 (dwarf_decode_lines): Likewise.
14239 (file_file_name): Likewise.
14240
14241 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14242
14243 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14244 inferior_ptid.
14245 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14246 ps_lsetfpregs): Likewise.
14247 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14248 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14249 ps_lsetfpregs): Likewise.
14250 * target.c (target_fetch_registers, target_store_registers):
14251 Remove asserts.
14252
14253 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14254
14255 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14256
14257 2017-03-23 Yao Qi <yao.qi@linaro.org>
14258
14259 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14260 (_initialize_aarch64_tdep): Register it.
14261 (aarch64_record_load_store): Handle PRFM instruction.
14262 (aarch64_process_record_test): New function.
14263
14264 2017-03-23 Yao Qi <yao.qi@linaro.org>
14265
14266 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14267 indentation.
14268
14269 2017-03-23 Yao Qi <yao.qi@linaro.org>
14270
14271 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14272
14273 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14274
14275 python/python.c (do_start_initialization): Fix memory leak.
14276
14277 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14278
14279 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14280 using get_ptrace_pid.
14281 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14282 inferior_ptid.
14283 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14284 inferior_ptid instead of pid.
14285
14286 2017-03-22 Yao Qi <yao.qi@linaro.org>
14287
14288 * aarch64-tdep.c: Wrap locally used classes in anonymous
14289 namespace.
14290 * arm-tdep.c: Likewise.
14291 * linespec.c: Likewise.
14292 * ui-out.c: Likewise.
14293
14294 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14295
14296 PR gdb/19637
14297 * python/lib/gdb/printer/bound_registers.py: Import sys.
14298
14299 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14300
14301 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14302 windows_thread_info parameter and use it instead of
14303 current_thread.
14304 (windows_fetch_inferior_registers): Don't set current_thread,
14305 pass the thread to do_windows_fetch_inferior_registers. Use
14306 ptid from regcache instead of inferior_ptid.
14307 (do_windows_store_inferior_registers): Add windows_thread_info
14308 parameter and use it instead of current_thread.
14309 (windows_store_inferior_registers): Don't set current_thread,
14310 pass the thread to do_windows_store_inferior_registers. Use
14311 ptid from regcache instead of inferior_ptid.
14312
14313 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14314
14315 * ser-mingw.c (ser_windows_raw): Remove reference to
14316 struct serial::current_timeout.
14317
14318 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14319
14320 PR tdep/20928
14321 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14322 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14323 (sparc64_fsr_type): Fix %fsr decoding.
14324
14325 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14326
14327 * python/py-record-btrace.c (btpy_insn_data): Change return type
14328 for Python 2.
14329
14330 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14331
14332 * spu-linux-nat.c (spu_fetch_inferior_registers,
14333 spu_store_inferior_registers): Use ptid from regcache, set and
14334 restore inferior_ptid.
14335 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14336 Likewise.
14337
14338 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14339
14340 * i386-linux-nat.c (fetch_register, store_register,
14341 i386_linux_fetch_inferior_registers,
14342 i386_linux_store_inferior_registers): Use ptid from regcache.
14343 * ia64-linux-nat.c (ia64_linux_fetch_register,
14344 ia64_linux_store_register): Likewise.
14345 * inf-ptrace.c (inf_ptrace_fetch_register,
14346 inf_ptrace_store_register): Likewise.
14347 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14348 m32r_linux_store_inferior_registers): Likewise.
14349 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14350 m68kbsd_store_inferior_registers): Likewise.
14351 * m68k-linux-nat.c (fetch_register, store_register,
14352 m68k_linux_fetch_inferior_registers,
14353 m68k_linux_store_inferior_registers): Likewise.
14354 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14355 m88kbsd_store_inferior_registers): Likewise.
14356 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14357 mips_fbsd_store_inferior_registers): Likewise.
14358 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14359 mips64_linux_regsets_store_registers): Likewise.
14360 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14361 mipsnbsd_store_inferior_registers): Likewise.
14362 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14363 mips64obsd_store_inferior_registers): Likewise.
14364 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14365 Likewise.
14366 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14367 ppcfbsd_store_inferior_registers): Likewise.
14368 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14369 ppc_linux_store_inferior_registers): Likewise.
14370 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14371 ppcnbsd_store_inferior_registers): Likewise.
14372 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14373 ppcobsd_store_registers): Likewise.
14374 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14375 Likewise.
14376 * ravenscar-thread.c (ravenscar_fetch_registers,
14377 ravenscar_store_registers, ravenscar_prepare_to_store):
14378 Likewise.
14379 * record-btrace.c (record_btrace_fetch_registers,
14380 record_btrace_store_registers, record_btrace_prepare_to_store):
14381 Likewise.
14382 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14383 Lookup inferior using ptid from regcache, instead of
14384 current_inferior.
14385 * remote.c (remote_fetch_registers, remote_store_registers): Use
14386 ptid from regcache.
14387 * rs6000-nat.c (fetch_register, store_register): Likewise.
14388 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14389 s390_linux_store_inferior_registers): Likewise.
14390 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14391 shnbsd_store_inferior_registers): Likewise.
14392 * sol-thread.c (sol_thread_fetch_registers,
14393 sol_thread_store_registers): Likewise.
14394 * sparc-nat.c (sparc_fetch_inferior_registers,
14395 sparc_store_inferior_registers): Likewise.
14396 * tilegx-linux-nat.c (fetch_inferior_registers,
14397 store_inferior_registers): Likewise.
14398 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14399 vaxbsd_store_inferior_registers): Likewise.
14400 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14401 store_xtregs): Likewise.
14402
14403 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14404
14405 PR gdb/14441
14406 * NEWS: Mention support for rvalue references in GDB and python.
14407 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14408 supports both lvalue and rvalue references.
14409
14410 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14411
14412 PR gdb/14441
14413 * gdbtypes.c (rank_one_type): Implement overloading
14414 resolution rules regarding rvalue references.
14415
14416 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14417
14418 PR gdb/14441
14419 * aarch64-tdep.c (aarch64_type_align)
14420 (aarch64_extract_return_value, aarch64_store_return_value): Change
14421 lvalue reference type checks to general reference type checks.
14422 * amd64-tdep.c (amd64_classify): Likewise.
14423 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14424 Likewise.
14425 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14426 (arm_store_return_value): Likewise.
14427 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14428 * c-typeprint.c (c_print_type): Likewise.
14429 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14430 (cplus_number_of_children, cplus_describe_child): Likewise.
14431 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14432 * completer.c (expression_completer): Likewise.
14433 * cp-support.c (make_symbol_overload_list_adl_namespace):
14434 Likewise.
14435 * darwin-nat-info.c (info_mach_region_command): Likewise.
14436 * dwarf2loc.c (entry_data_value_coerce_ref)
14437 (value_of_dwarf_reg_entry): Likewise.
14438 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14439 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14440 Likewise.
14441 * findvar.c (extract_typed_address, store_typed_address):
14442 Likewise.
14443 * gdbtypes.c (rank_one_type): Likewise.
14444 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14445 * infcall.c (value_arg_coerce): Likewise.
14446 * language.c (pointer_type): Likewise.
14447 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14448 Likewise.
14449 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14450 * mn10300-tdep.c (mn10300_type_align): Likewise.
14451 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14452 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14453 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14454 Likewise.
14455 * printcmd.c (print_formatted, x_command): Likewise.
14456 * python/py-type.c (typy_get_composite, typy_template_argument):
14457 Likewise.
14458 * python/py-value.c (valpy_referenced_value)
14459 (valpy_get_dynamic_type, value_has_field): Likewise.
14460 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14461 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14462 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14463 * spu-tdep.c (spu_scalar_value_p): Likewise.
14464 * symtab.c (lookup_symbol_aux): Likewise.
14465 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14466 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14467 Likewise.
14468 * valops.c (value_cast_pointers, value_cast)
14469 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14470 (value_struct_elt, value_struct_elt_bitpos)
14471 (value_find_oload_method_list, find_overload_match)
14472 (value_rtti_indirect_type): Likewise.
14473 * valprint.c (val_print_scalar_type_p, generic_val_print):
14474 Likewise.
14475 * value.c (value_actual_type, value_as_address, unpack_long)
14476 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14477 (coerce_ref): Likewise.
14478 * varobj.c (varobj_get_value_type): Likewise.
14479
14480 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14481
14482 PR gdb/14441
14483 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14484 table of constants.
14485 * python/lib/gdb/command/explore.py: Support exploring values
14486 of rvalue reference types.
14487 * python/lib/gdb/types.py: Implement get_basic_type() for
14488 rvalue reference types.
14489 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14490 constant.
14491 * python/py-value.c (valpy_getitem): Add an rvalue reference
14492 check.
14493 (valpy_reference_value): Add new parameter "refcode".
14494 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14495 New wrappers for valpy_reference_value().
14496 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14497 (gdbpy_invoke_xmethod): Likewise.
14498
14499 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14500
14501 PR gdb/14441
14502 * dwarf2read.c (process_die, read_type_die_1): Handle the
14503 DW_TAG_rvalue_reference_type DIE.
14504 (read_tag_reference_type): Add new parameter "refcode".
14505
14506 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14507
14508 PR gdb/14441
14509 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14510 (c_type_print_modifier, c_type_print_varspec_suffix)
14511 (c_type_print_base): Support printing rvalue reference types.
14512 * c-valprint.c (c_val_print, c_value_print): Support printing
14513 rvalue reference values.
14514
14515 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14516
14517 PR gdb/14441
14518 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14519 typename.
14520 * cp-support.c (replace_typedefs): Handle
14521 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14522 * python/py-type.c (typy_lookup_type): Likewise.
14523
14524 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14525
14526 PR gdb/14441
14527 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14528 * parse.c (insert_type): Change assert statement.
14529 (follow_types): Handle rvalue reference types.
14530 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14531 constant.
14532
14533 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14534
14535 PR gdb/14441
14536 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14537 value_ref() interface.
14538 * c-valprint.c (c_value_print): Likewise.
14539 * infcall.c (value_arg_coerce): Likewise.
14540 * python/py-value.c (valpy_reference_value): Likewise.
14541 * valops.c (value_cast, value_reinterpret_cast)
14542 (value_dynamic_cast, typecmp): Likewise.
14543 (value_ref): Parameterize by kind of return value reference type.
14544 * value.h (value_ref): Add new parameter "refcode".
14545
14546 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14547
14548 PR gdb/14441
14549 * dwarf2read.c (read_tag_reference_type): Use
14550 lookup_lvalue_reference_type() instead of lookup_reference_type().
14551 * eval.c (evaluate_subexp_standard): Likewise.
14552 * f-exp.y: Likewise.
14553 * gdbtypes.c (make_reference_type, lookup_reference_type):
14554 Generalize with rvalue reference types.
14555 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14556 convenience wrappers for lookup_reference_type().
14557 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14558 reference kind parameter.
14559 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14560 wrappers for lookup_reference_type().
14561 * guile/scm-type.c (gdbscm_type_reference): Use
14562 lookup_lvalue_reference_type() instead of lookup_reference_type().
14563 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14564 * parse.c (follow_types): Likewise.
14565 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14566 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14567 Likewise.
14568 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14569 (gdbpy_invoke_xmethod): Likewise.
14570 * stabsread.c: Provide extra argument to make_reference_type()
14571 call.
14572 * valops.c (value_ref, value_rtti_indirect_type): Use
14573 lookup_lvalue_reference_type() instead of lookup_reference_type().
14574
14575 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14576
14577 PR gdb/14441
14578 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14579 (TYPE_IS_REFERENCE): New macro.
14580 (struct type): Add rvalue_reference_type field.
14581 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14582
14583 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14584
14585 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14586 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14587 New function definition.
14588 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14589 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14590 New function declaration.
14591 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14592 * mi/mi-interp.h: New file.
14593 * solib.c (info_sharedlibrary_command): Replace for loop with
14594 ALL_SO_LIBS macro
14595 * solib.h (update_solib_list): New function declaration.
14596 (so_list_head): Move macro.
14597 * solist.h (ALL_SO_LIBS): New macro.
14598
14599 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14600
14601 * infcmd.c (post_create_inferior): Remove unused argument in
14602 call to solib_add.
14603 * remote.c (remote_start_remote): Likewise.
14604 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14605 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14606 (enable_break): Likewise.
14607 * solib.c (update_solib_list): Remove unused target argument
14608 and its documentation.
14609 (solib_add): Remove unused target argument. Remove unused
14610 argument in call to update_solib_list.
14611 (info_sharedlibrary_command): Remove unused argument in call
14612 to update_solib_list.
14613 (sharedlibrary_command): Remove unused argument in call to
14614 solib_add.
14615 (handle_solib_event): Likewise.
14616 (reload_shared_libraries): Likewise.
14617 * solib.h (solib_add): Remove unused target argument.
14618
14619 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14620
14621 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14622 (s390_displaced_step_fixup): Cover relative branches with the
14623 default fixup handling. This fixes lack of support for some
14624 relative branch instructions.
14625
14626 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14627
14628 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14629 ptid from regcache.
14630
14631 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14632
14633 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14634 i386_darwin_store_inferior_registers): Use ptid from regcache.
14635
14636 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14637
14638 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14639 i386bsd_store_inferior_registers): Use ptid from regcache.
14640
14641 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14642
14643 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14644 hppaobsd_store_registers): Use ptid from regcache.
14645
14646 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14647
14648 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14649 hppanbsd_store_registers): Use ptid from regcache.
14650
14651 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14652
14653 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14654 from regcache. Use get_ptrace_pid.
14655
14656 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14657
14658 * corelow.c (get_core_register_section): Use ptid from regcache,
14659 update doc.
14660
14661 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14662
14663 * bsd-uthread.c (bsd_uthread_fetch_registers,
14664 bsd_uthread_store_registers): Use ptid from regcache, set and
14665 restore inferior_ptid.
14666
14667 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14668
14669 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14670 fetch_fp_regs, store_register, store_regs, store_fp_register,
14671 store_fp_regs): Use ptid from regcache.
14672
14673 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14674
14675 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14676 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14677 store_vfp_regs): Use ptid from regcache.
14678
14679 2017-03-17 Pedro Alves <palves@redhat.com>
14680
14681 PR remote/21188
14682 * ser-base.c (ser_base_wait_for): Add comment.
14683 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14684 version.
14685 * ser-unix.c (hardwire_raw): Remove reference to
14686 scb->current_timeout.
14687 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14688 (hardwire_ops): Install ser_base_readchar instead of
14689 hardwire_readchar.
14690 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14691 Remove fields.
14692
14693 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14694
14695 PR gdb/19637
14696 * python/lib/gdb/printer/bound_registers.py: Add support for
14697 Python 3.
14698
14699 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14700
14701 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14702 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14703 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14704 byte_offset to subobj_byte_offset. Fix the handling of
14705 DWARF_VALUE_STACK on big-endian targets when coming via an
14706 implicit pointer.
14707 (dwarf2_evaluate_loc_desc): Adjust call to
14708 dwarf2_evaluate_loc_desc_full.
14709 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14710 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14711
14712 2017-03-16 Yao Qi <yao.qi@linaro.org>
14713
14714 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14715 and REVSH instructions.
14716
14717 2017-03-16 Yao Qi <yao.qi@linaro.org>
14718
14719 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14720 (arm_record_test): Declare.
14721 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14722 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14723 align with the manual.
14724 (thumb_record_misc): Adjust the code order to align with the
14725 manual.
14726 (thumb2_record_decode_insn_handler): Fix instruction matching.
14727 (instruction_reader_thumb): New class.
14728 (arm_record_test): New function.
14729
14730 2017-03-16 Yao Qi <yao.qi@linaro.org>
14731
14732 * arm-tdep.c (abstract_memory_reader): New class.
14733 (instruction_reader): New class.
14734 (extract_arm_insn): Add argument 'reader'. Callers updated.
14735 (decode_insn): Likewise.
14736
14737 2017-03-16 Doug Evans <dje@google.com>
14738
14739 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14740 member. Change type of TYPE member to SCM. All uses updated.
14741 (lsscm_make_lazy_string_smob): Add assert.
14742 (lsscm_make_lazy_string): Flag bad length values.
14743 (lsscm_elt_type): New function.
14744 (gdbscm_lazy_string_to_value): Rewrite to use
14745 lsscm_safe_lazy_string_to_value.
14746 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14747 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14748 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14749 in incoming type.
14750 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14751 * guile/scm-type.c (tyscm_scm_to_type): New function.
14752
14753 2017-03-15 Doug Evans <dje@google.com>
14754
14755 PR python/17728, python/18439, python/18779
14756 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14757 member. Change type of TYPE member to PyObject *. All uses updated.
14758 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14759 (gdbpy_create_lazy_string_object): Flag bad length values.
14760 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14761 Handle typedefs in incoming type.
14762 (stpy_lazy_string_elt_type): New function.
14763 (gdbpy_extract_lazy_string): Call it.
14764 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14765 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14766 typedefs in incoming type.
14767
14768 2017-03-16 Doug Evans <dje@google.com>
14769
14770 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14771 * guile/scm-type.c (tyscm_scm_to_type): New function.
14772
14773 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14774
14775 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14776 "ULONGEST" for "skip".
14777
14778 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14779
14780 PR gdb/21220
14781 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14782 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14783 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14784 over ptrace peek/poke until end of buffer or error.
14785
14786 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14787
14788 * parse.c (length_of_subexp): Make static.
14789 * parser-defs.h (length_of_subexp): Remove.
14790
14791 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14792
14793 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14794 as well.
14795
14796 2017-03-14 Pedro Alves <palves@redhat.com>
14797
14798 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14799 (main): Use std::unique_ptr. Remove calls to
14800 cp_demangled_name_parse_free.
14801
14802 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14803
14804 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14805 alphabsd_store_inferior_registers): Use regcache->ptid instead
14806 of inferior_ptid.
14807
14808 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14809
14810 * aix-thread.c (aix_thread_fetch_registers,
14811 aix_thread_store_registers): Use regcache->ptid instead of
14812 inferior_ptid.
14813
14814 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14815
14816 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14817 store_gregs_to_thread, fetch_fpregs_from_thread,
14818 store_fpregs_to_thread): Use regcache->ptid instead of
14819 inferior_ptid.
14820
14821 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14822
14823 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14824 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14825 instead of inferior_ptid.
14826
14827 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14828
14829 * target.c (target_fetch_registers, target_store_registers): Add
14830 assert.
14831
14832 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14833
14834 * regcache.h (regcache_get_ptid): New function.
14835 * regcache.c (regcache_get_ptid): New function.
14836
14837 2017-03-13 Mark Wielaard <mark@klomp.org>
14838
14839 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14840
14841 2017-03-10 Keith Seitz <keiths@redhat.com>
14842
14843 PR c++/8218
14844 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14845
14846 2017-03-08 Pedro Alves <palves@redhat.com>
14847
14848 PR gdb/18360
14849 * infrun.c (start_step_over, do_target_resume, resume)
14850 (restart_threads): Assert we're not resuming a thread that is
14851 meant to be stopped.
14852 (infrun_thread_stop_requested_callback): Delete.
14853 (infrun_thread_stop_requested): If the thread is internally
14854 stopped, queue a pending stop event and clear the thread's
14855 inline-frame state.
14856 (handle_stop_requested): New function.
14857 (handle_syscall_event, handle_inferior_event_1): Use
14858 handle_stop_requested.
14859 (handle_stop_requested): New function.
14860 (handle_signal_stop): Set the thread's stop_signal here instead of
14861 at caller.
14862 (finish_step_over): Clear step over info unconditionally.
14863 (handle_signal_stop): If the user had interrupted the event
14864 thread, consider the stop a random signal.
14865 (handle_signal_stop) <signal arrived while stepping over
14866 breakpoint>: Don't restart threads here.
14867 (stop_waiting): Don't clear step-over info here.
14868
14869 2017-03-08 Pedro Alves <palves@redhat.com>
14870
14871 PR 21206
14872 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14873 goes to argument 2, not 1.
14874
14875 2017-03-08 Pedro Alves <palves@redhat.com>
14876
14877 PR cli/21218
14878 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14879 display_gdb_prompt.
14880 (command_line_input): Add comment.
14881
14882 2017-03-08 Pedro Alves <palves@redhat.com>
14883
14884 PR tui/21216
14885 * tui/tui-file.c (tui_file::write): New.
14886 * tui/tui-file.h (tui_file): Override "write".
14887 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14888 factored out from ...
14889 (tui_puts): ... here.
14890 (tui_putc): Use them.
14891 (tui_write): New function.
14892 * tui/tui-io.h (tui_write): Declare.
14893
14894 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14895
14896 * Makefile.in (SFILES): Replace "environ.c" with
14897 "common/environ.c".
14898 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14899 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14900 to...
14901 * common/environ.c: ... here.
14902 * environ.h: Moved to...
14903 * common/environ.h: ... here.
14904
14905 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14906
14907 * gdbarch.sh (pstring_ptr): New static function.
14908 (gdbarch_disassembler_options): Use it.
14909 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14910 not valid_disassembler_option->name.
14911 * gdbarch.c: Regenerate.
14912
14913 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14914
14915 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14916
14917 2017-03-07 Pedro Alves <palves@redhat.com>
14918
14919 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14920
14921 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14922
14923 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14924 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14925 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14926 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14927
14928 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14929
14930 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14931
14932 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14933
14934 * remote.c (remote_add_target_side_commands): Use range-based
14935 for loop.
14936
14937 2017-03-03 Yao Qi <yao.qi@linaro.org>
14938
14939 PR gdb/21165
14940 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14941 value is lazy.
14942 * valprint.c (common_val_print): Likewise.
14943
14944 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14945
14946 * NEWS: Mention new set/show disassembler-options commands.
14947 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14948 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14949 (prospective_options): New static variable.
14950 (gdb_disassembler::gdb_disassembler): Initialize
14951 m_di.disassembler_options.
14952 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14953 (get_disassembler_options): New function.
14954 (set_disassembler_options): Likewise.
14955 (set_disassembler_options_sfunc): Likewise.
14956 (show_disassembler_options_sfunc): Likewise.
14957 (disassembler_options_completer): Likewise.
14958 (_initialize_disasm): Likewise.
14959 * disasm.h (get_disassembler_options): New prototype.
14960 (set_disassembler_options): Likewise.
14961 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14962 (gdbarch_verify_disassembler_options): Likewise.
14963 * gdbarch.c: Regenerate.
14964 * gdbarch.h: Likewise.
14965 * arm-tdep.c (num_disassembly_options): Delete.
14966 (set_disassembly_style): Likewise.
14967 (arm_disassembler_options): New static variable.
14968 (set_disassembly_style_sfunc): Convert short style name into long
14969 option name. Call set_disassembler_options.
14970 (show_disassembly_style_sfunc): New function.
14971 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14972 set_gdbarch_verify_disassembler_options.
14973 (_initialize_arm_tdep): Delete regnames variable and update callers.
14974 (arm_disassembler_options): Initialize.
14975 (disasm_options): New variable.
14976 (num_disassembly_options): Rename from this...
14977 (num_disassembly_styles): ...to this. Compute by scanning through
14978 disasm_options.
14979 (valid_disassembly_styles): Initialize using disasm_options.
14980 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14981 set_arm_regname_option.
14982 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14983 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14984 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14985 set_gdbarch_verify_disassembler_options.
14986 * s390-tdep.c (s390_disassembler_options): New static variable.
14987 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14988 set_gdbarch_verify_disassembler_options.
14989
14990 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14991
14992 * remote.c (remote_add_target_side_condition): Remove "struct"
14993 keyword from range-based for loop.
14994
14995 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14996
14997 * remote.c (remote_add_target_side_condition): Use range-based
14998 for loop. Update comment.
14999
15000 2017-02-27 Yao Qi <yao.qi@linaro.org>
15001
15002 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15003
15004 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15005
15006 * regcache.c (regcache_raw_update): New function.
15007 (regcache_raw_read): Move code to regcache_raw_update.
15008 * regcache.h (regcache_raw_update): New declaration.
15009 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15010
15011 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15012
15013 * dwarf2read.c (create_debug_type_hash_table): Initialize
15014 header.signature and header.type_offset_in_tu.
15015
15016 2017-02-24 Pedro Alves <palves@redhat.com>
15017
15018 * symtab.c (make_file_symbol_completion_list_1): Use
15019 add_symtab_completions.
15020
15021 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15022
15023 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15024
15025 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15026
15027 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15028 I386_MAX_REGISTER_SIZE.
15029 (i386_pseudo_register_write): Likewise.
15030 (i386_process_record): Likewise.
15031 * i387-tdep.c (i387_supply_xsave): Likewise.
15032 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15033 (store_register): Likewise.
15034
15035 2017-02-23 Pedro Alves <palves@redhat.com>
15036
15037 * ada-lang.c: Include "common/function-view.h".
15038 (ada_iterate_over_symbols): Adjust to use function_view as
15039 callback type.
15040 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15041 (ada_make_symbol_completion_list): Use a lambda.
15042 (ada_exc_search_name_matches): Delete.
15043 (name_matches_regex): New.
15044 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15045 * compile/compile-c-support.c: Include "common/function-view.h".
15046 (print_one_macro): Change prototype to accept a ui_file pointer.
15047 (write_macro_definitions): Use a lambda.
15048 * dwarf2read.c: Include "common/function-view.h".
15049 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15050 (dw2_expand_symtabs_matching): Adjust to use function_view as
15051 callback type.
15052 * language.h: Include "common/function-view.h".
15053 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15054 function_view as callback type.
15055 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15056 * linespec.c: Include "common/function-view.h".
15057 (collect_info::add_symbol): New method.
15058 (struct symbol_and_data_callback, iterate_inline_only, struct
15059 symbol_matcher_data, iterate_name_matcher): Delete.
15060 (iterate_over_all_matching_symtabs): Adjust to use function_view
15061 as callback type and lambdas.
15062 (iterate_over_file_blocks): Adjust to use function_view as
15063 callback type.
15064 (decode_compound_collector): Now a class with private fields.
15065 (decode_compound_collector::release_symbols): New method.
15066 (collect_one_symbol): Rename to...
15067 (decode_compound_collector::operator()): ... this and adjust.
15068 (lookup_prefix_sym): decode_compound_collector construction bits
15069 move to decode_compound_collector ctor. Pass the
15070 decode_compound_collector object directly as callback. Remove
15071 cleanups and use decode_compound_collector::release_symbols
15072 instead.
15073 (symtab_collector): Now a class with private fields.
15074 (symtab_collector::release_symtabs): New method.
15075 (add_symtabs_to_list): Rename to...
15076 (symtab_collector::operator()): ... this and adjust.
15077 (collect_symtabs_from_filename): symtab_collector construction
15078 bits move to symtab_collector ctor. Pass the symtab_collector
15079 object directly as callback. Remove cleanups and use
15080 symtab_collector::release_symtabs instead.
15081 (collect_symbols): Delete.
15082 (add_matching_symbols_to_info): Use lambdas.
15083 * macrocmd.c (print_macro_callback): Delete.
15084 (info_macro_command): Use a lambda.
15085 (info_macros_command): Pass print_macro_definition as callable
15086 directly.
15087 (print_one_macro): Remove 'ignore' parameter.
15088 (macro_list_command): Adjust.
15089 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15090 (macro_for_each_data::user_data): Delete field.
15091 (foreach_macro): Adjust to call the function_view.
15092 (macro_for_each): Adjust to use function_view as callback type.
15093 (foreach_macro_in_scope): Adjust to call the function_view.
15094 (macro_for_each_in_scope): Adjust to use function_view as callback
15095 type.
15096 * macrotab.h: Include "common/function-view.h".
15097 (macro_callback_fn): Declare a prototype instead of a pointer.
15098 Remove "user_data" parameter.
15099 (macro_for_each, macro_for_each_in_scope): Adjust to use
15100 function_view as callback type.
15101 * psymtab.c (partial_map_expand_apply)
15102 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15103 Adjust to use function_view as callback type and to return bool.
15104 (psym_expand_symtabs_matching): Adjust to use function_view as
15105 callback types.
15106 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15107 to use function_view as callback type and to return bool.
15108 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15109 callback types.
15110 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15111 as callback types.
15112 * symfile.h: Include "common/function-view.h".
15113 (expand_symtabs_file_matcher_ftype)
15114 (expand_symtabs_symbol_matcher_ftype)
15115 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15116 return bool.
15117 (quick_symbol_functions::map_symtabs_matching_filename)
15118 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15119 function_view as callback type and return bool.
15120 (expand_symtabs_matching): Adjust to use function_view as callback
15121 type.
15122 (maintenance_expand_name_matcher)
15123 (maintenance_expand_file_matcher): Delete.
15124 (maintenance_expand_symtabs): Use lambdas.
15125 * symtab.c (iterate_over_some_symtabs): Adjust to use
15126 function_view as callback types and return bool.
15127 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15128 of a cleanup.
15129 (lookup_symtab_callback): Delete.
15130 (lookup_symtab): Use a lambda.
15131 (iterate_over_symbols): Adjust to use function_view as callback
15132 type.
15133 (struct search_symbols_data, search_symbols_file_matches)
15134 (search_symbols_name_matches): Delete.
15135 (search_symbols): Use a pair of lambdas.
15136 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15137 (symtab_expansion_callback): Delete.
15138 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15139 * symtab.h: Include "common/function-view.h".
15140 (iterate_over_some_symtabs): Adjust to use function_view as
15141 callback type and return bool.
15142 (iterate_over_symtabs): Adjust to use function_view as callback
15143 type.
15144 (symbol_found_callback_ftype): Remove 'data' parameter and return
15145 bool.
15146 (iterate_over_symbols): Adjust to use function_view as callback
15147 type.
15148
15149 2017-02-23 Pedro Alves <palves@redhat.com>
15150
15151 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15152 (%.o) <unittests/%.c>: New pattern.
15153 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15154 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15155 * common/function-view.h: New file.
15156 * unittests/function-view-selftests.c: New file.
15157 * configure: Regenerate.
15158
15159 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15160
15161 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15162 inferior_ptid.
15163 * go32-nat.c (go32_thread_alive): Likewise.
15164
15165 2017-02-23 Yao Qi <yao.qi@linaro.org>
15166
15167 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15168 delete.
15169
15170 2017-02-23 Yao Qi <yao.qi@linaro.org>
15171
15172 * varobj.c (varobj_clear_saved_item): Use delete instead of
15173 xfree.
15174 (update_dynamic_varobj_children): Likewise.
15175
15176 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15177
15178 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15179
15180 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15181
15182 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15183 m_enum_value to 0 in default constructor.
15184
15185 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15186
15187 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15188 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15189 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15190 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15191 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15192 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15193 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15194 IS_STORE_CONDITIONAL_INSN.
15195
15196 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15197
15198 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15199
15200 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15201
15202 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15203
15204 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15205
15206 * dwarf2read.c (skip_one_die, read_attribute_value)
15207 (dwarf2_const_value_attr, dump_die_shallow)
15208 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15209 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15210
15211 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15212
15213 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15214 (dwarf_parse_macro_header): Accept DWARF version 5.
15215 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15216
15217 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15218
15219 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15220 DW_AT_GNU_*.
15221 * common/common-exceptions.h (enum errors): Likewise.
15222 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15223 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15224 (dwarf_expr_context::execute_stack_op): Likewise.
15225 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15226 Likewise.
15227 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15228 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15229 (show_entry_values_debug, call_site_to_target_addr)
15230 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15231 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15232 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15233 (value_of_dwarf_block_entry, indirect_pieced_value)
15234 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15235 (disassemble_dwarf_expression): Likewise.
15236 * dwarf2read.c (process_die, inherit_abstract_dies)
15237 (read_call_site_scope): Likewise.
15238 * gdbtypes.h (struct func_type, struct call_site_parameter)
15239 (struct call_site): Likewise.
15240 * stack.c (read_frame_arg): Likewise.
15241 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15242
15243 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15244
15245 * defs.h (read_unsigned_leb128): New declaration.
15246 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15247 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15248 (dwarf2_find_location_expression): Call also
15249 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15250 * dwarf2loc.h (dwarf2_version): New declaration.
15251 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15252 rnglists.
15253 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15254 .debug_rnglists.
15255 (struct dwop_section_names): Add loclists_dwo.
15256 (dwop_section_names): Add .debug_loclists.dwo.
15257 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15258 (struct dwarf2_per_cu_data): Add dwarf_version.
15259 (struct dwo_sections): Add loclists.
15260 (struct attr_abbrev): Add implicit_const.
15261 (read_indirect_line_string): New declaration.
15262 (read_unsigned_leb128): Delete declaration.
15263 (rcuh_kind): New definition.
15264 (read_and_check_comp_unit_head): Change parameter
15265 is_debug_types_section to section_kind.
15266 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15267 (read_comp_unit_head): Change parameter abfd to section, add parameter
15268 section_kind. Handle DWARF-5.
15269 (error_check_comp_unit_head): Accept also DWARF version 5.
15270 (read_and_check_comp_unit_head): Change parameter
15271 is_debug_types_section to section_kind.
15272 (read_and_check_type_unit_head): Delete function.
15273 (read_abbrev_offset): Handle DWARF-5.
15274 (create_debug_type_hash_table): Add parameter section_kind. Process
15275 only DW_UT_type. Use signature and type_offset_in_tu from struct
15276 comp_unit_head.
15277 (create_debug_types_hash_table): Update create_debug_type_hash_table
15278 caller.
15279 (create_all_type_units): Call create_debug_type_hash_table.
15280 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15281 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15282 caller.
15283 (skip_one_die): Handle DW_FORM_implicit_const.
15284 (dwarf2_rnglists_process): New function.
15285 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15286 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15287 (read_attribute_value): Handle DW_FORM_implicit_const,
15288 DW_FORM_line_strp.
15289 (read_attribute): Handle DW_FORM_implicit_const.
15290 (read_indirect_string_at_offset_from): New function from
15291 read_indirect_string_at_offset.
15292 (read_indirect_string_at_offset): Call
15293 read_indirect_string_at_offset_from.
15294 (read_indirect_line_string_at_offset): New function.
15295 (read_indirect_string): New function comment.
15296 (read_indirect_line_string): New function.
15297 (read_unsigned_leb128): Make it global.
15298 (dwarf2_string_attr): Handle DWARF-5.
15299 (add_include_dir_stub, read_formatted_entries): New functions.
15300 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15301 Handle DWARF-5.
15302 (per_cu_header_read_in): Update read_comp_unit_head caller.
15303 (dwarf2_version): New function.
15304 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15305 rnglists.
15306 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15307 fields.
15308
15309 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15310
15311 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15312
15313 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15314
15315 * dwarf2read.c (dwarf2_ranges_process): New function from
15316 dwarf2_ranges_read.
15317 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15318 dwarf2_ranges_process.
15319
15320 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15321
15322 * dwarf2read.c (create_debug_type_hash_table): New function from
15323 create_debug_types_hash_table.
15324 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15325 (create_all_type_units, open_and_init_dwo_file): Update
15326 create_debug_types_hash_table callers.
15327
15328 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15329
15330 PR gdb/16188
15331 * fork-child.c (trace_start_error): Fix thinko. va_end should
15332 refer to 'ap', not 'args'.
15333
15334 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15335 Pedro Alves <palves@redhat.com>
15336
15337 PR gdb/16188
15338 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15339 calls succeeded.
15340 * fork-child.c (trace_start_error): New function.
15341 (trace_start_error_with_name): Likewise.
15342 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15343 * inf-ptrace.c (inf_ptrace_me): Likewise.
15344 * inferior.h (trace_start_error): New prototype.
15345 (trace_start_error_with_name): Likewise.
15346
15347 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15348
15349 PR gdb/21164
15350 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15351 NULL before using it.
15352 * symmisc.c (maintenance_print_symbols): Likewise.
15353 (maintenance_print_msymbols): Likewise.
15354
15355 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15356
15357 * NEWS: Add record Python bindings entry.
15358
15359 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15360
15361 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15362 py-record-full.o.
15363 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15364 * python/py-record-btrace.c, python/py-record-btrace.h,
15365 python/py-record-full.c, python/py-record-full.h: New file.
15366 * python/py-record.c: Add include for py-record-btrace.h and
15367 py-record-full.h.
15368 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15369 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15370 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15371 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15372 New definition.
15373 (gdbpy_initialize_btrace): New export.
15374 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15375
15376 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15377
15378 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15379 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15380 * python/py-record.c: New file.
15381 * python/python-internal.h (gdbpy_start_recording,
15382 gdbpy_current_recording, gdpy_stop_recording,
15383 gdbpy_initialize_record): New export.
15384 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15385 (python_GdbMethods): Add gdbpy_start_recording,
15386 gdbpy_current_recording and gdbpy_stop_recording.
15387
15388 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15389
15390 * record-btrace.c (record_btrace_record_method): New function.
15391 (init_record_btrace_ops): Initialize to_record_method.
15392 * record-full.c (record_full_record_method): New function.
15393 (init_record_full_ops, init_record_full_core_ops): Add
15394 record_full_record_method.
15395 * record.h (enum record_method): New enum.
15396 * target-debug.h (target_debug_print_enum_record_method: New define.
15397 * target-delegates.c: Regenerate.
15398 * target.c (target_record_method): New function.
15399 * target.h: Include record.h.
15400 (struct target_ops) <to_record_method>: New field.
15401 (target_record_method): New export.
15402
15403 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15404
15405 * record.h (record_start, record_stop): New export.
15406 * record.c (record_start, record_stop): New function.
15407
15408 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15409
15410 * btrace.c (btrace_fetch): Copy function call segments pointer
15411 into a vector.
15412 (btrace_clear): Clear the vector.
15413 (btrace_find_insn_by_number): Use binary search to find the correct
15414 function call segment.
15415 * btrace.h (brace_fun_p): New typedef.
15416 (struct btrace_thread_info) <functions>: New field.
15417
15418 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15419
15420 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15421 * btrace.c (btrace_decode_error): ... here. New function.
15422 * btrace.h (btrace_decode_error): New export.
15423
15424 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15425
15426 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15427 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15428 btrace_find_insn_by_number): Remove special case for gaps.
15429 * btrace.h (btrace_insn_get_error): New export.
15430 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15431 * record-btrace.c (btrace_insn_history): Print number for gaps.
15432 (record_btrace_info, record_btrace_goto): Handle gaps.
15433
15434 2017-02-14 Tom Tromey <tom@tromey.com>
15435
15436 PR python/13598:
15437 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15438 event.
15439 * python/py-evts.c (gdbpy_initialize_py_events): Add
15440 before_prompt registry.
15441 * python/py-events.h (events_object) <before_prompt>: New field.
15442
15443 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15444
15445 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15446
15447 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15448
15449 * symfile (_initialize_symfile): Add usage text to the load command's
15450 help text.
15451
15452 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15453
15454 * utils.c (defaulted_query): Don't query on secondary UIs.
15455
15456 2017-02-10 Tom Tromey <tom@tromey.com>
15457
15458 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15459
15460 2017-02-10 Tom Tromey <tom@tromey.com>
15461
15462 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15463 "cleanup" local.
15464 * python/py-type.c (typy_legacy_template_argument): Remove
15465 unnecessary "cleanup" local.
15466
15467 2017-02-10 Tom Tromey <tom@tromey.com>
15468
15469 * python/python.c (do_start_initialization): New function, from
15470 _initialize_python.
15471 (_initialize_python): Call do_start_initialization.
15472 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15473 goto.
15474
15475 2017-02-10 Tom Tromey <tom@tromey.com>
15476
15477 * python/py-prettyprint.c (pretty_print_one_value): Use
15478 gdbpy_ref.
15479
15480 2017-02-10 Tom Tromey <tom@tromey.com>
15481
15482 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15483 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15484 gdbpy_ref.
15485 * python/py-type.c (field_new): Use gdbpy_ref.
15486 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15487 gdbpy_ref.
15488 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15489 (py_free_pspace): Likewise.
15490 (pspace_to_pspace_object): Likewise.
15491 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15492 (py_free_objfile): Likewise.
15493 (objfile_to_objfile_object): Likewise.
15494 * python/py-inferior.c (delete_thread_object): Use
15495 gdbpy_ref.
15496 (infpy_read_memory): Likewise.
15497 (py_free_inferior): Likewise.
15498 * python/py-evtregistry.c (create_eventregistry_object): Use
15499 gdbpy_ref.
15500 * python/py-event.c (create_event_object): Use gdbpy_ref.
15501
15502 2017-02-10 Tom Tromey <tom@tromey.com>
15503
15504 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15505 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15506 used.
15507 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15508 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15509 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15510 python/py-framefilter.c, python/py-function.c,
15511 python/py-inferior.c, python/py-infevents.c,
15512 python/py-linetable.c, python/py-newobjfileevent.c,
15513 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15514 python/py-signalevent.c, python/py-stopevent.c,
15515 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15516 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15517 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15518 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15519
15520 2017-02-10 Tom Tromey <tom@tromey.com>
15521
15522 * ui-out.h (ui_out_emit_type): New class.
15523 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15524 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15525 and ui_out_emit_tuple.
15526 (enumerate_locals): Likewise.
15527 (py_mi_print_variables, py_print_locals, py_print_args): Use
15528 ui_out_emit_list.
15529 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15530 ui_out_emit_list.
15531 * common/gdb_optional.h: New file.
15532
15533 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15534
15535 * MAINTAINERS (Write After Approval): Update my e-mail address.
15536
15537 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15538
15539 PR gdb/21122
15540 * breakpoint.c (_initialize_breakpoint): Update the help description
15541 of the 'commands' command to indicate that it takes a list argument.
15542
15543 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15544
15545 * interps.c (current_interp_set_logging): Remove "return".
15546
15547 2017-02-09 Gary Benson <gbenson@redhat.com>
15548
15549 * symtab.c (add_symtab_completions): Prevent NULL pointer
15550 dereference.
15551
15552 2017-02-08 Pedro Alves <palves@redhat.com>
15553
15554 * interps.c (interp::interp): Remove reference to quiet_p.
15555 (interp_set): Make static. Remove dead "Switching to" output
15556 code.
15557 (interp_quiet_p, interp_set_quiet): Delete.
15558 (interpreter_exec_cmd): Don't set the interpreter quiet.
15559 * interps.h (interp_quiet_p): Make static.
15560 (class interp) <quiet_p>: Remove field
15561
15562 2017-02-08 Jerome Guitton <guitton@adacore.com>
15563
15564 * cli/cli-decode.c (find_command_name_length): Make it extern.
15565 * cli/cli-decode.h (find_command_name_length): Declare.
15566 * cli/cli-script.c (command_name_equals, line_first_arg):
15567 New functions.
15568 (process_next_line): Use cli-decode to parse command names.
15569 (build_command_line): Make args a constant pointer.
15570
15571 2017-02-08 Jerome Guitton <guitton@adacore.com>
15572
15573 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15574 Remove case-insensitive search.
15575
15576 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15577
15578 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15579 at the end of the line. Avoids an ARI warning.
15580
15581 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15582
15583 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15584 rdseed instructions.
15585 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15586
15587 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15588
15589 PR tdep/20936
15590 Provide and use sparc32 and sparc64 target description XML files.
15591 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15592 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15593 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15594 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15595 * features/sparc/sparc32-solaris.xml: New file.
15596 * features/sparc/sparc64-solaris.xml: New file.
15597 * features/sparc/sparc32-solaris.c: Generated.
15598 * features/sparc/sparc64-solaris.c: Generated.
15599 * sparc-tdep.h: Account for differences in target descriptions.
15600 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15601 (sparc32_register_type): Use target provided registers.
15602 (validate_tdesc_registers): New function.
15603 (sparc32_gdbarch_init): Use tdesc_has_registers.
15604 Set pseudoregister functions.
15605 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15606 (sparc64_register_type): Use target provided registers.
15607 (sparc64_init_abi): Set pseudoregister functions.
15608
15609 2017-02-03 Tom Tromey <tom@tromey.com>
15610
15611 PR rust/21097:
15612 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15613 with a single member.
15614
15615 2017-02-03 Pedro Alves <palves@redhat.com>
15616
15617 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15618 (cli_interp_base::~cli_interp_base): New.
15619 (cli_interp): New struct.
15620 (as_cli_interp): Cast the interp itself to cli_interp.
15621 (cli_interpreter_pre_command_loop): Rename to ...
15622 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15623 parameter.
15624 (cli_interpreter_init): Rename to ...
15625 (cli_interp::init): ... this. Remove 'self' parameter. Use
15626 boolean. Make extern.
15627 (cli_interpreter_resume): Rename to ...
15628 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15629 extern.
15630 (cli_interpreter_suspend): Rename to ...
15631 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15632 extern.
15633 (cli_interpreter_exec): Rename to ...
15634 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15635 extern.
15636 (cli_interpreter_supports_command_editing): Rename to ...
15637 (cli_interp_base::supports_command_editing): ... this. Remove
15638 'interp' parameter. Make extern.
15639 (cli_ui_out): Rename to ...
15640 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15641 Make extern.
15642 (cli_set_logging): Rename to ...
15643 (cli_interp_base::set_logging): ... this. Remove 'interp'
15644 parameter. Make extern.
15645 (cli_interp_procs): Delete.
15646 (cli_interp_factory): Adjust to use "new".
15647 * cli/cli-interp.h: Include "interps.h".
15648 (struct cli_interp_base): New struct.
15649 * interps.c (struct interp): Delete. Fields moved to interps.h.
15650 (interp_new): Delete.
15651 (interp::interp, interp::~interp): New.
15652 (interp_set): Use bool, and return void. Assume the interpreter
15653 has suspend, init and resume methods, and that the all return
15654 void.
15655 (set_top_level_interpreter): interp_set returns void.
15656 (interp_ui_out): Adapt.
15657 (current_interp_set_logging): Adapt.
15658 (interp_data): Delete.
15659 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15660 (interp_exec): Adapt.
15661 (top_level_interpreter_data): Delete.
15662 * interps.h (interp_init_ftype, interp_resume_ftype)
15663 (interp_suspend_ftype, interp_exec_ftype)
15664 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15665 (class interp): New.
15666 (interp_new): Delete.
15667 (interp_set): Now returns void. Use bool.
15668 (interp_data, top_level_interpreter_data): Delete.
15669 * mi/mi-common.h: Include interps.h.
15670 (class mi_interp): Inherit from interp. Define a ctor. Declare
15671 init, resume, suspect, exec, interp_ui_out, set_logging and
15672 pre_command_loop methods.
15673 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15674 (mi_interpreter_init): Rename to ...
15675 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15676 bool, return void and make extern. Adjust.
15677 (mi_interpreter_resume): ... Rename to ...
15678 (mi_interp::resume): ... this. Remove the 'data' parameter,
15679 return void and make extern. Adjust.
15680 (mi_interpreter_suspend): ... Rename to ...
15681 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15682 return void and make extern. Adjust.
15683 (mi_interpreter_exec): ... Rename to ...
15684 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15685 extern. Adjust.
15686 (mi_interpreter_pre_command_loop): ... Rename to ...
15687 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15688 parameter and make extern.
15689 (mi_on_normal_stop_1): Adjust.
15690 (mi_ui_out): Rename to ...
15691 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15692 parameter and make extern. Adjust.
15693 (mi_set_logging): Rename to ...
15694 (mi_interp::set_logging): ... this. Remove the 'interp'
15695 parameter and make extern. Adjust.
15696 (mi_interp_procs): Delete.
15697 (mi_interp_factory): Adjust to use 'new'.
15698 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15699 (mi_print_exception, mi_execute_command, mi_load_progress):
15700 Adjust.
15701 * tui/tui-interp.c (tui_interp): New class.
15702 (as_tui_interp): Return a tui_interp pointer.
15703 (tui_on_normal_stop, tui_on_signal_received)
15704 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15705 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15706 to use interp::interp_ui_out.
15707 (tui_init): Rename to ...
15708 (tui_interp::init): ... this. Remove the 'self' parameter, use
15709 bool, return void and make extern. Adjust.
15710 (tui_resume): Rename to ...
15711 (tui_interp::resume): ... this. Remove the 'data' parameter,
15712 return void and make extern. Adjust.
15713 (tui_suspend): Rename to ...
15714 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15715 return void and make extern. Adjust.
15716 (tui_ui_out): Rename to ...
15717 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15718 parameter, and make extern. Adjust.
15719 (tui_exec): Rename to ...
15720 (tui_interp::exec): ... this. Remove the 'data' parameter and
15721 make extern.
15722 (tui_interp_procs): Delete.
15723 (tui_interp_factory): Use "new".
15724
15725 2017-02-02 Tom Tromey <tom@tromey.com>
15726
15727 * rust-exp.y (ends_raw_string, space_then_number)
15728 (rust_identifier_start_p): Return bool.
15729 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15730 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15731 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15732 (rust_chartype_p): Return bool.
15733 (val_print_struct, rust_print_struct_def, rust_print_type):
15734 Update.
15735 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15736 Return bool.
15737
15738 2017-02-02 Tom Tromey <tom@tromey.com>
15739
15740 * rust-lang.c: Reindent.
15741
15742 2017-02-02 Tom Tromey <tom@tromey.com>
15743
15744 * rust-lang.h (rust_crate_for_block): Update.
15745 * rust-lang.c (rust_crate_for_block): Return std::string.
15746 (rust_get_disr_info): Use std:;string, not
15747 gdb::unique_xmalloc_ptr.
15748 * rust-exp.y (crate_name): Update.
15749
15750 2017-02-02 Pedro Alves <palves@redhat.com>
15751
15752 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15753 field out of gdb_disassembler_test and make it static.
15754
15755 2017-02-02 Pedro Alves <palves@redhat.com>
15756
15757 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15758 mi1_interp and mi_interp fields.
15759
15760 2017-02-02 Pedro Alves <palves@redhat.com>
15761
15762 * cli/cli-interp.c (struct saved_output_files, saved_output):
15763 Moved from cli/cli-logging.c.
15764 (cli_set_logging): New function.
15765 (cli_interp_procs): Install cli_set_logging.
15766 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15767 Declare.
15768 * cli/cli-logging.c (struct saved_output_files, saved_output):
15769 Moved to cli/cli-interp.c.
15770 (pop_output_files): Don't save outputs here.
15771 (make_logging_output): New function.
15772 (handle_redirections): Don't build tee nor save previous outputs
15773 here.
15774 * interps.c (current_interp_set_logging): Change prototype.
15775 Assume there's always a set_logging_proc method installed.
15776 * interps.h (interp_set_logging_ftype): Change prototype.
15777 (current_interp_set_logging): Change prototype and adjust comment.
15778 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15779 use make_logging_output.
15780 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15781 2017-02-02 Pedro Alves <palves@redhat.com>
15782
15783 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15784 from ...
15785 (set_logging_overwrite): ... here.
15786 (logging_no_redirect_file): Delete.
15787 (set_logging_redirect): Don't handle redirection on the fly.
15788 Instead warn that "logging off" / "logging on" is necessary.
15789 (pop_output_files): Delete references to logging_no_redirect_file.
15790 (show_logging_command): Always speak in terms of what will happen
15791 once logging is reenabled.
15792
15793 2017-02-02 Pedro Alves <palves@redhat.com>
15794
15795 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15796
15797 2017-02-02 Pedro Alves <palves@redhat.com>
15798
15799 * disasm.c (gdb_pretty_print_insn): Rename to ...
15800 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15801 Remove gdbarch parameter. Adapt to clear the object's buffers
15802 instead of allocating new buffers, and to print using the object's
15803 gdb_disassembler instead of calling gdb_print_insn.
15804 (dump_insns): Use gdb_pretty_print_disassembler.
15805 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15806 (gdb_pretty_print_disassembler): New class.
15807 * record-btrace.c (btrace_insn_history): Use
15808 gdb_pretty_print_disassembler.
15809
15810 2017-02-02 Pedro Alves <palves@redhat.com>
15811
15812 * ada-lang.c (type_as_string): Use string_file.
15813 * ada-valprint.c (ada_print_floating): Use string_file.
15814 * ada-varobj.c (ada_varobj_scalar_image)
15815 (ada_varobj_get_value_image): Use string_file.
15816 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15817 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15818 * breakpoint.c (update_inserted_breakpoint_locations)
15819 (insert_breakpoint_locations, reattach_breakpoints)
15820 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15821 (print_it_watchpoint): Use string_file.
15822 (save_breakpoints): Use stdio_file.
15823 * c-exp.y (oper): Use string_file.
15824 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15825 tee_file.
15826 (pop_output_files): Use delete.
15827 (handle_redirections): Use stdio_file and tee_file.
15828 * cli/cli-setshow.c (do_show_command): Use string_file.
15829 * compile/compile-c-support.c (c_compute_program): Use
15830 string_file.
15831 * compile/compile-c-symbols.c (generate_vla_size): Take a
15832 'string_file &' instead of a 'ui_file *'.
15833 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15834 of a 'ui_file *'. Use string_file.
15835 (generate_c_for_variable_locations): Take a 'string_file &'
15836 instead of a 'ui_file *'.
15837 * compile/compile-internal.h (generate_c_for_for_one_variable):
15838 Take a 'string_file &' instead of a 'ui_file *'.
15839 * compile/compile-loc2c.c (push, pushf, unary, binary)
15840 (print_label, pushf_register_address, pushf_register)
15841 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15842 'ui_file *'. Adjust.
15843 * compile/compile.c (compile_to_object): Use string_file.
15844 * compile/compile.h (compile_dwarf_expr_to_c)
15845 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15846 'ui_file *'.
15847 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15848 (replace_typedefs_qualified_name): Use string_file and
15849 obstack_copy0.
15850 * disasm.c (gdb_pretty_print_insn): Use string_file.
15851 (gdb_disassembly): Adjust reference the null_stream global.
15852 (do_ui_file_delete): Delete.
15853 (gdb_insn_length): Use null_stream.
15854 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15855 * dwarf2loc.c (dwarf2_compile_property_to_c)
15856 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15857 'string_file &' instead of a 'ui_file *'.
15858 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15859 * dwarf2read.c (do_ui_file_peek_last): Delete.
15860 (dwarf2_compute_name): Use string_file.
15861 * event-top.c (gdb_setup_readline): Use stdio_file.
15862 * gdbarch.sh (verify_gdbarch): Use string_file.
15863 * gdbtypes.c (safe_parse_type): Use null_stream.
15864 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15865 string_file.
15866 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15867 'string_file *' instead of a 'ui_file *'.
15868 (gdbscm_arch_disassemble): Use string_file.
15869 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15870 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15871 inherits from ui_file.
15872 (ioscm_file_port_delete, ioscm_file_port_rewind)
15873 (ioscm_file_port_put): Delete.
15874 (ioscm_file_port_write): Rename to ...
15875 (ioscm_file_port::write): ... this. Remove file_port_magic
15876 checks.
15877 (ioscm_file_port_new): Delete.
15878 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15879 ui_file_up.
15880 * guile/scm-type.c (tyscm_type_name): Use string_file.
15881 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15882 Use string_file.
15883 * infcmd.c (print_return_value_1): Use string_file.
15884 * infrun.c (print_target_wait_results): Use string_file.
15885 * language.c (add_language): Use string_file.
15886 * location.c (explicit_to_string_internal): Use string_file.
15887 * main.c (captured_main_1): Use null_file.
15888 * maint.c (maintenance_print_architecture): Use stdio_file.
15889 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15890 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15891 event_channel>: Change type to mi_console_file pointer.
15892 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15893 (mi_console_file_delete): Delete.
15894 (struct mi_console_file): Delete.
15895 (mi_console_file_magic): Delete.
15896 (mi_console_file_new): Delete.
15897 (mi_console_file::mi_console_file): New.
15898 (mi_console_file_delete): Delete.
15899 (mi_console_file_fputs): Delete.
15900 (mi_console_file::write): New.
15901 (mi_console_raw_packet): Delete.
15902 (mi_console_file::flush): New.
15903 (mi_console_file_flush): Delete.
15904 (mi_console_set_raw): Rename to ...
15905 (mi_console_file::set_raw): ... this.
15906 * mi/mi-console.h (class mi_console_file): New class.
15907 (mi_console_file_new, mi_console_set_raw): Delete.
15908 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15909 (mi_set_logging): Use delete and tee_file. Adjust.
15910 * mi/mi-main.c (output_register): Use string_file.
15911 (mi_cmd_data_evaluate_expression): Use string_file.
15912 (mi_cmd_data_read_memory): Use string_file.
15913 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15914 * mi/mi-out.c (mi_ui_out::main_stream): New.
15915 (mi_ui_out::rewind): Use main_stream and
15916 string_file.
15917 (mi_ui_out::put): Use main_stream and string_file.
15918 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15919 Allocate a 'string_file' instead.
15920 (mi_out_new): Don't allocate a mem_fileopen stream here.
15921 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15922 (mi_ui_out::main_stream): Declare method.
15923 * printcmd.c (eval_command): Use string_file.
15924 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15925 * python/py-arch.c (archpy_disassemble): Use string_file.
15926 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15927 * python/py-frame.c (frapy_str): Use string_file.
15928 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15929 Use string_file.
15930 * python/py-type.c (typy_str): Use string_file.
15931 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15932 * python/py-value.c (valpy_str): Use string_file.
15933 * record-btrace.c (btrace_insn_history): Use string_file.
15934 * regcache.c (regcache_print): Use stdio_file.
15935 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15936 * remote.c (escape_buffer): Use string_file.
15937 * rust-lang.c (rust_get_disr_info): Use string_file.
15938 * serial.c (serial_open_ops_1): Use stdio_file.
15939 (do_serial_close): Use delete.
15940 * stack.c (print_frame_arg): Use string_file.
15941 (print_frame_args): Remove local mem_fileopen stream, not used.
15942 (print_frame): Use string_file.
15943 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15944 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15945 Take a 'string_file *' instead of a 'ui_file *'.
15946 * top.c (new_ui): Use stdio_file and stderr_file.
15947 (free_ui): Use delete.
15948 (execute_command_to_string): Use string_file.
15949 (quit_confirm): Use string_file.
15950 * tracepoint.c (collection_list::append_exp): Use string_file.
15951 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15952 * tui/tui-file.c: Don't include "ui-file.h".
15953 (enum streamtype, struct tui_stream): Delete.
15954 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15955 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15956 (tui_file::tui_file): New method.
15957 (tui_file_fputs): Delete.
15958 (tui_file_get_strbuf): Delete.
15959 (tui_file::puts): New method.
15960 (tui_file_adjust_strbuf): Delete.
15961 (tui_file_flush): Delete.
15962 (tui_file::flush): New method.
15963 * tui/tui-file.h: Tweak intro comment.
15964 Include ui-file.h.
15965 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15966 (tui_file_adjust_strbuf): Delete declarations.
15967 (class tui_file): New class.
15968 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15969 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15970 (tui_register_format): Use string_stream.
15971 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15972 (tui_get_function_from_frame): Use string_file.
15973 * typeprint.c (type_to_string): Use string_file.
15974 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15975 (null_stream): New global.
15976 (ui_file_delete): Delete.
15977 (ui_file::ui_file): New.
15978 (null_file_isatty): Delete.
15979 (ui_file::~ui_file): New.
15980 (null_file_rewind): Delete.
15981 (ui_file::printf): New.
15982 (null_file_put): Delete.
15983 (null_file_flush): Delete.
15984 (ui_file::putstr): New.
15985 (null_file_write): Delete.
15986 (ui_file::putstrn): New.
15987 (null_file_read): Delete.
15988 (ui_file::putc): New.
15989 (null_file_fputs): Delete.
15990 (null_file_write_async_safe): Delete.
15991 (ui_file::vprintf): New.
15992 (null_file_delete): Delete.
15993 (null_file::write): New.
15994 (null_file_fseek): Delete.
15995 (null_file::puts): New.
15996 (ui_file_data): Delete.
15997 (null_file::write_async_safe): New.
15998 (gdb_flush, ui_file_isatty): Adjust.
15999 (ui_file_put, ui_file_rewind): Delete.
16000 (ui_file_write): Adjust.
16001 (ui_file_write_for_put): Delete.
16002 (ui_file_write_async_safe, ui_file_read): Adjust.
16003 (ui_file_fseek): Delete.
16004 (fputs_unfiltered): Adjust.
16005 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16006 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16007 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16008 (set_ui_file_data): Delete.
16009 (string_file::~string_file, string_file::write)
16010 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16011 (do_ui_file_as_string, ui_file_as_string): Delete.
16012 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16013 (struct mem_file): Delete.
16014 (mem_file_new): Delete.
16015 (stdio_file::stdio_file): New.
16016 (mem_file_delete): Delete.
16017 (stdio_file::stdio_file): New.
16018 (mem_fileopen): Delete.
16019 (stdio_file::~stdio_file): New.
16020 (mem_file_rewind): Delete.
16021 (stdio_file::set_stream): New.
16022 (mem_file_put): Delete.
16023 (stdio_file::open): New.
16024 (mem_file_write): Delete.
16025 (stdio_file_magic, struct stdio_file): Delete.
16026 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16027 (stdio_file::flush): New.
16028 (stdio_file_read): Rename to ...
16029 (stdio_file::read): ... this. Adjust.
16030 (stdio_file_write): Rename to ...
16031 (stdio_file::write): ... this. Adjust.
16032 (stdio_file_write_async_safe): Rename to ...
16033 (stdio_file::write_async_safe) ... this. Adjust.
16034 (stdio_file_fputs): Rename to ...
16035 (stdio_file::puts) ... this. Adjust.
16036 (stdio_file_isatty): Delete.
16037 (stdio_file_fseek): Delete.
16038 (stdio_file::isatty): New.
16039 (stderr_file_write): Rename to ...
16040 (stderr_file::write) ... this. Adjust.
16041 (stderr_file_fputs): Rename to ...
16042 (stderr_file::puts) ... this. Adjust.
16043 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16044 (stderr_file::stderr_file): New.
16045 (tee_file_magic): Delete.
16046 (struct tee_file): Delete.
16047 (tee_file::tee_file): New.
16048 (tee_file_new): Delete.
16049 (tee_file::~tee_file): New.
16050 (tee_file_delete): Delete.
16051 (tee_file_flush): Rename to ...
16052 (tee_file::flush): ... this. Adjust.
16053 (tee_file_write): Rename to ...
16054 (tee_file::write): ... this. Adjust.
16055 (tee_file::write_async_safe): New.
16056 (tee_file_fputs): Rename to ...
16057 (tee_file::puts): ... this. Adjust.
16058 (tee_file_isatty): Rename to ...
16059 (tee_file::isatty): ... this. Adjust.
16060 * ui-file.h (struct obstack, struct ui_file): Don't
16061 forward-declare.
16062 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16063 (ui_file_write_ftype)
16064 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16065 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16066 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16067 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16068 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16069 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16070 (set_ui_file_fseek): Delete.
16071 (ui_file_data, ui_file_delete, ui_file_rewind)
16072 (struct ui_file): New.
16073 (ui_file_up): New.
16074 (class null_file): New.
16075 (null_stream): Declare.
16076 (ui_file_write_for_put, ui_file_put): Delete.
16077 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16078 Delete.
16079 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16080 (gdb_fopen, tee_file_new): Delete.
16081 (struct string_file): New.
16082 (struct stdio_file): New.
16083 (stdio_file_up): New.
16084 (struct stderr_file): New.
16085 (class tee_file): New.
16086 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16087 of a 'ui_file *'. Adjust.
16088 * ui-out.h (class ui_out) <field_stream>: Likewise.
16089 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16090 (null_stream): Delete.
16091 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16092 Adjust.
16093 * utils.h (struct ui_file): Delete forward declaration..
16094 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16095 (error_stream): Take a 'string_file &' instead of a
16096 'ui_file *'.
16097 * varobj.c (varobj_value_get_print_value): Use string_file.
16098 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16099 * gdbarch.c: Regenerate.
16100
16101 2017-02-02 Pedro Alves <palves@redhat.com>
16102
16103 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16104 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16105 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16106 Adjust to call gdb_print_insn instead of
16107 gdb_disassembler::print_insn.
16108 (dump_insns, do_mixed_source_and_assembly_deprecated)
16109 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16110 'gdbarch' parameter. Remove gdb_disassembler parameter.
16111 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16112 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16113 declaration.
16114 (gdb_pretty_print_insn): Re-add declaration.
16115 * record-btrace.c (btrace_insn_history): Don't allocate a
16116 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16117
16118 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16119
16120 * disasm.h (gdb_disassembly): Remove file_string parameter.
16121 * disasm.c (gdb_disassembly): Likewise.
16122 * cli/cli-cmds.c (print_disassembly): Adapt.
16123 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16124 * stack.c (do_gdb_disassembly): Likewise.
16125
16126 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16127
16128 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16129 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16130 targets. And if the implicit value is longer than needed, extract
16131 the first bytes instead of the "least significant" ones.
16132
16133 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16134
16135 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16136 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16137 (btrace_fetch): Assert can_access_registers_ptid.
16138 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16139 validate_registers_access.
16140
16141 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16142
16143 * gdbthread.h (can_access_registers_ptid): New.
16144 * thread.c (can_access_registers_ptid): New.
16145
16146 2017-02-01 Pedro Alves <palves@redhat.com>
16147
16148 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16149
16150 2017-01-31 Pedro Alves <palves@redhat.com>
16151
16152 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16153 Fix typos.
16154
16155 2017-01-31 Pedro Alves <palves@redhat.com>
16156
16157 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16158 not used.
16159
16160 2017-01-31 Pedro Alves <palves@redhat.com>
16161
16162 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16163
16164 2017-01-31 Pedro Alves <palves@redhat.com>
16165
16166 * common/scoped_restore.h
16167 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16168 change the value's parameter type to T2.
16169 (make_scoped_restore): Likewise.
16170
16171 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16172 Richard Henderson <rth@redhat.com>
16173
16174 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16175 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16176 GS_BASE for older kernels.
16177 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16178 GS_BASE for older kernels.
16179 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16180 and GS_BASE to the offset table.
16181 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16182 system register group.
16183 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16184 for older kernels.
16185 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16186 amd64 ABI.
16187 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16188 AMD64_GSBASE_REGNUM.
16189 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16190 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16191 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16192 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16193 i386/64bit-segments.xml in those rules.
16194 * features/i386/64bit-segments.xml: New file.
16195 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16196 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16197 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16198 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16199 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16200 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16201 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16202 * features/i386/amd64-avx-linux.c: Regenerated.
16203 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16204 * features/i386/amd64-avx-mpx.c: Regenerated.
16205 * features/i386/amd64-avx512-linux.c: Regenerated.
16206 * features/i386/amd64-linux.c: Regenerated.
16207 * features/i386/amd64-mpx-linux.c: Regenerated.
16208 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16209 * features/i386/i386-avx-mpx.c: Regenerated.
16210 * features/i386/x32-avx-linux.c: Regenerated.
16211 * features/i386/x32-avx512-linux.c: Regenerated.
16212 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16213 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16214 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16215 * regformats/i386/amd64-linux.dat: Regenerated.
16216 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16217 * regformats/i386/x32-avx-linux.dat: Regenerated.
16218 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16219 * regformats/i386/x32-linux.dat: Regenerated.
16220
16221 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16222
16223 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16224 Set to AMD64_NUM_REGS.
16225
16226 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16227
16228 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16229 that checks validity of a register number.
16230
16231 2017-01-27 Kees Cook <keescook@google.com>
16232
16233 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16234 fetch_fpregs if target has fpa registers.
16235 (arm_linux_store_inferior_registers): Call store_fpregs if target
16236 has fpa registers.
16237
16238 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16239
16240 * cris-tdep.c (cris_gdbarch_init): Remove check for
16241 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16242
16243 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16244
16245 * corelow.c (get_core_register_section): Check for regset
16246 existence before checking for REGSET_VARIABLE_SIZE.
16247
16248 2017-01-26 Yao Qi <yao.qi@linaro.org>
16249 Pedro Alves <palves@redhat.com>
16250
16251 PR gdb/20939
16252 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16253 call memory_error, save memaddr instead.
16254 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16255 negative, cal memory_error.
16256 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16257
16258 2017-01-26 Yao Qi <yao.qi@linaro.org>
16259
16260 * disasm-selftests.c (memory_error_test): New function.
16261 (_initialize_disasm_selftests): Register memory_error_test.
16262
16263 2017-01-26 Yao Qi <yao.qi@linaro.org>
16264
16265 * Makefile.in (SFILES): Add disasm-selftests.c and
16266 selftest-arch.c.
16267 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16268 * disasm-selftests.c: New file.
16269 * selftest-arch.c: New file.
16270 * selftest-arch.h: New file.
16271
16272 2017-01-26 Yao Qi <yao.qi@linaro.org>
16273
16274 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16275 to bfd_arch_mep. Don't return 0 if section is not
16276 found. Call print_insn_mep.
16277
16278 2017-01-26 Pedro Alves <palves@redhat.com>
16279 Yao Qi <yao.qi@linaro.org>
16280
16281 * arm-tdep.c: Include "disasm.h".
16282 (gdb_print_insn_arm): Update code to get gdbarch.
16283 * disasm.c (dis_asm_read_memory): Change it to
16284 gdb_disassembler::dis_asm_read_memory.
16285 (dis_asm_memory_error): Likewise.
16286 (dis_asm_print_address): Likewise.
16287 (gdb_pretty_print_insn): Change it to
16288 gdb_disassembler::pretty_print_insn.
16289 (dump_insns): Add one argument gdb_disassemlber. All
16290 callers updated.
16291 (do_mixed_source_and_assembly_deprecated): Likewise.
16292 (do_mixed_source_and_assembly): Likewise.
16293 (do_assembly_only): Likewise.
16294 (gdb_disassembler::gdb_disassembler): New.
16295 (gdb_disassembler::print_insn): New.
16296 * disasm.h (class gdb_disassembler): New.
16297 (gdb_pretty_print_insn): Remove declaration.
16298 (gdb_disassemble_info): Likewise.
16299 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16300 (gdbscm_disasm_read_memory_worker): Update.
16301 (gdbscm_disasm_read_memory): Update.
16302 (gdbscm_disasm_memory_error): Remove.
16303 (gdbscm_disasm_print_address): Remove.
16304 (gdbscm_disassembler::gdbscm_disassembler): New.
16305 (gdbscm_print_insn_from_port): Update.
16306 * mips-tdep.c: Include disasm.h.
16307 (gdb_print_insn_mips): Update code to get gdbarch.
16308 * record-btrace.c (btrace_insn_history): Update.
16309 * spu-tdep.c: Include disasm.h.
16310 (struct spu_dis_asm_data): Remove.
16311 (struct spu_dis_asm_info): New.
16312 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16313 SPU id.
16314 (gdb_print_insn_spu): Cast disassemble_info to
16315 spu_dis_asm_info.
16316
16317 2017-01-26 Yao Qi <yao.qi@linaro.org>
16318
16319 * disasm.c (do_ui_file_delete): Delete.
16320 (gdb_insn_length): Move code creating stream to ...
16321 * utils.c (null_stream): ... here. New function.
16322 * utils.h (null_stream): Declare.
16323
16324 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16325
16326 * python/py-inferior.c (find_thread_object): Return directly
16327 from the loop. Remove "found" variable.
16328
16329 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16330
16331 GDB 7.12.1 released.
16332
16333 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16334
16335 * python/py-function.c (fnpy_call): Reorder declarations to have
16336 the gdbpy_enter object declared first.
16337 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16338
16339 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16340
16341 PR python/21068
16342 * python/python-internal.h (PyMem_RawMalloc): Define for
16343 Python < 3.4.
16344 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16345 PyMem_RawMalloc instead of PyMem_Malloc.
16346
16347 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16348 Luis Machado <lgustavo@codesourcery.com>
16349
16350 * NEWS (New commands): Mention flash-erase.
16351 (New MI commands): Mention target-flash-erase.
16352 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16353 command.
16354 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16355 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16356 * target.c (flash_erase_command): New function.
16357 (initialize_targets): Add new flash-erase command.
16358 * target.h (flash_erase_command): New declaration.
16359
16360 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16361
16362 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16363 HAVE_SYS_PROCFS_H is defined.
16364
16365 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16366
16367 * remote.c (struct cached_reg): Change data into a pointer.
16368 * (stop_reply_dtr): Free data pointers before deleting vector.
16369 (process_stop_reply): Likewise.
16370 (remote_parse_stop_reply): Allocate space for data
16371
16372 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16373
16374 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16375 MAX_REGISTER_SIZE.
16376 (amd64_pseudo_register_read_value): Likewise.
16377 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16378 (store_register_using_P): Likewise.
16379 * regcache.c (regcache_xfer_part): Likewise.
16380
16381 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16382
16383 Split real and pseudo registers.
16384 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16385 (sparc32_pseudo_regnum): New enum.
16386 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16387 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16388 (SPARC32_CP0_REGISTERS): New macro.
16389 (sparc32_pseudo_register_name): New function.
16390 (sparc32_register_name): Use sparc32_pseudo_register_name.
16391 (sparc32_pseudo_register_type): New function.
16392 (sparc32_register_type): Use sparc32_pseudo_register_type.
16393 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16394 pseudo register numbers.
16395 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16396 (SPARC64_CP0_REGISTERS): New macro.
16397 (sparc64_pseudo_register_name): New function.
16398 (sparc64_register_name): Use sparc64_pseudo_register_name.
16399 (sparc64_pseudo_register_type): New function.
16400 (sparc64_register_type): Use sparc64_pseudo_register_type.
16401 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16402 pseudo register numbers.
16403 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16404 sparc64_store_arguments): Handle pseudo register numbers.
16405
16406 2017-01-13 Yao Qi <yao.qi@linaro.org>
16407
16408 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16409 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16410 output.
16411 (getpkt_or_notif_sane_1): Likewise.
16412
16413 2017-01-13 Yao Qi <yao.qi@linaro.org>
16414
16415 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16416 of CC. Pass "-x c++-header" instead of "-x c".
16417
16418 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16419
16420 * remote.c (remote_can_async_p): Update comment.
16421
16422 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16423
16424 * linux-nat.c (linux_nat_can_async_p): Update comment.
16425
16426 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16427
16428 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16429
16430 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16431
16432 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16433
16434 2017-01-10 Tom Tromey <tom@tromey.com>
16435
16436 * python/py-type.c (typy_legacy_template_argument): Update.
16437 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16438 ~demangle_parse_info): Declare new members.
16439 (cp_demangled_name_to_comp): Return unique_ptr.
16440 (cp_demangled_name_parse_free)
16441 (make_cleanup_cp_demangled_name_parse_free)
16442 (cp_new_demangle_parse_info): Remove.
16443 * cp-support.c (do_demangled_name_parse_free_cleanup)
16444 (make_cleanup_cp_demangled_name_parse_free): Remove.
16445 (inspect_type, cp_canonicalize_string_full)
16446 (cp_canonicalize_string): Update.
16447 (mangled_name_to_comp): Change return type.
16448 (cp_class_name_from_physname, method_name_from_physname)
16449 (cp_func_name, cp_remove_params): Update.
16450 * cp-name-parser.y (demangle_parse_info): New constructor, from
16451 cp_new_demangle_parse_info.
16452 (~demangle_parse_info): New destructor, from
16453 cp_demangled_name_parse_free.
16454 (cp_merge_demangle_parse_infos): Update.
16455 (cp_demangled_name_to_comp): Change return type.
16456
16457 2017-01-10 Tom Tromey <tom@tromey.com>
16458
16459 * top.c (prevent_dont_repeat): Change return type.
16460 * python/python.c (execute_gdb_command): Use std::string.
16461 Update.
16462 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16463 * command.h (prevent_dont_repeat): Change return type.
16464 * breakpoint.c (bpstat_do_actions_1): Update.
16465
16466 2017-01-10 Tom Tromey <tom@tromey.com>
16467
16468 * value.h (scoped_value_mark::~scoped_value_mark): Call
16469 free_to_mark.
16470 (scoped_value_mark::free_to_mark): New method.
16471 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16472 scoped_value_mark.
16473
16474 2017-01-10 Tom Tromey <tom@tromey.com>
16475
16476 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16477 (valpy_reference_value, valpy_const_value, valpy_get_address)
16478 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16479 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16480 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16481 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16482 scoped_value_mark.
16483 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16484 * value.h (scoped_value_mark): New class.
16485
16486 2017-01-10 Tom Tromey <tom@tromey.com>
16487
16488 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16489 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16490 * psymtab.c (discard_psymtabs_upto): Remove.
16491 (make_cleanup_discard_psymtabs): Remove.
16492 (struct psymtab_state): Remove.
16493
16494 2017-01-10 Tom Tromey <tom@tromey.com>
16495
16496 * record-full.c (record_full_save_cleanups): Remove.
16497 (record_full_save): Use gdb::unlinker.
16498 * gcore.c (do_bfd_delete_cleanup): Remove.
16499 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16500 cleanups.
16501 * dwarf2read.c (unlink_if_set): Remove.
16502 (write_psymtabs_to_index): Use gdb::unlinker.
16503 * common/gdb_unlinker.h: New file.
16504
16505 2017-01-10 Tom Tromey <tom@tromey.com>
16506
16507 * windows-tdep.c (windows_xfer_shared_library): Update.
16508 * windows-nat.c (windows_make_so): Update.
16509 * utils.h (make_cleanup_bfd_unref): Remove.
16510 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16511 * symfile.h (symfile_bfd_open)
16512 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16513 * symfile.c (read_symbols, symbol_file_add)
16514 (separate_debug_file_exists): Update.
16515 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16516 (generic_load, reread_symbols): Update.
16517 * symfile-mem.c (symbol_file_add_from_memory): Update.
16518 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16519 (spu_symbol_file_add_from_memory): Update.
16520 * solist.h (struct target_so_ops) <bfd_open>: Return
16521 gdb_bfd_ref_ptr.
16522 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16523 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16524 gdb_bfd_ref_ptr.
16525 (solib_map_sections, reload_shared_libraries_1): Update.
16526 * solib-svr4.c (enable_break): Update.
16527 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16528 * solib-frv.c (enable_break2): Update.
16529 * solib-dsbt.c (enable_break): Update.
16530 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16531 gdb_bfd_ref_ptr.
16532 (darwin_solib_get_all_image_info_addr_at_init): Update.
16533 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16534 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16535 * record-full.c (record_full_save): Update.
16536 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16537 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16538 * minidebug.c (find_separate_debug_file_in_section): Return
16539 gdb_bfd_ref_ptr.
16540 * machoread.c (macho_add_oso_symfile): Change abfd to
16541 gdb_bfd_ref_ptr.
16542 (macho_symfile_read_all_oso): Update.
16543 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16544 (macho_symfile_read): Update.
16545 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16546 (jit_bfd_try_read_symtab): Update.
16547 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16548 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16549 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16550 gdb_bfd_ref_ptr.
16551 (gdb_bfd_ref_policy): New struct.
16552 (gdb_bfd_ref_ptr): New typedef.
16553 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16554 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16555 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16556 gdb_bfd_ref_ptr.
16557 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16558 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16559 (gcore_command): Update.
16560 * exec.c (exec_file_attach): Update.
16561 * elfread.c (elf_symfile_read): Update.
16562 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16563 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16564 (open_and_init_dwo_file): Update.
16565 (open_dwp_file): Return gdb_bfd_ref_ptr.
16566 (open_and_init_dwp_file): Update.
16567 * corelow.c (core_open): Update.
16568 * compile/compile-object-load.c (compile_object_load): Update.
16569 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16570 * coffread.c (coff_symfile_read): Update.
16571 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16572 gdb_bfd_ref_ptr. Rename.
16573 (dump_bfd_file, restore_command): Update.
16574 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16575 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16576 (find_separate_debug_file_by_buildid): Update.
16577
16578 2017-01-10 Tom Tromey <tom@tromey.com>
16579
16580 * common/gdb_ref_ptr.h: New file.
16581 * python/py-ref.h (struct gdbpy_ref_policy): New.
16582 (gdbpy_ref): Now a typedef.
16583
16584 2017-01-10 Tom Tromey <tom@tromey.com>
16585
16586 * utils.h (make_cleanup_htab_delete): Don't declare.
16587 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16588 Remove.
16589 * linespec.c (decode_compound_collector): Add constructor,
16590 destructor.
16591 (lookup_prefix_sym): Remove cleanup.
16592 (symtab_collector): Add constructor, destructor.
16593 (collect_symtabs_from_filename): Remove cleanup.
16594 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16595 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16596 Use htab_up.
16597 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16598 * dwarf2read.c (dw2_expand_symtabs_matching)
16599 (dw2_map_symbol_filenames, dwarf_decode_macros)
16600 (write_psymtabs_to_index): Use htab_up.
16601 * dwarf2loc.c (func_verify_no_selftailcall)
16602 (call_site_find_chain_1, func_verify_no_selftailcall)
16603 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16604 std::vector, gdb::unique_xmalloc_ptr.
16605 (call_sitep): Remove typedef.
16606 (dwarf2_locexpr_baton_eval): Remove unused variable.
16607
16608 2017-01-10 Tom Tromey <tom@tromey.com>
16609
16610 * python/python-internal.h (make_cleanup_py_decref)
16611 (make_cleanup_py_xdecref): Don't declare.
16612 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16613 (py_xdecref, make_cleanup_py_xdecref): Remove.
16614
16615 2017-01-10 Tom Tromey <tom@tromey.com>
16616
16617 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16618 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16619
16620 2017-01-10 Tom Tromey <tom@tromey.com>
16621
16622 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16623
16624 2017-01-10 Tom Tromey <tom@tromey.com>
16625
16626 * python/py-utils.c (unicode_to_encoded_string)
16627 (python_string_to_target_string)
16628 (python_string_to_target_python_string)
16629 (python_string_to_host_string, gdbpy_obj_to_string)
16630 (get_addr_from_python): Use gdbpy_ref.
16631
16632 2017-01-10 Tom Tromey <tom@tromey.com>
16633
16634 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16635 gdbpy_ref.
16636
16637 2017-01-10 Tom Tromey <tom@tromey.com>
16638
16639 * python/python.c (eval_python_command, gdbpy_decode_line)
16640 (gdbpy_run_events, gdbpy_start_type_printers)
16641 (gdbpy_apply_type_printers): Use gdbpy_ref.
16642
16643 2017-01-10 Tom Tromey <tom@tromey.com>
16644
16645 * python/py-param.c (get_doc_string, compute_enum_values): Use
16646 gdbpy_ref.
16647
16648 2017-01-10 Tom Tromey <tom@tromey.com>
16649
16650 * python/py-inferior.c (find_thread_object, build_inferior_list):
16651 Use gdbpy_ref.
16652
16653 2017-01-10 Tom Tromey <tom@tromey.com>
16654
16655 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16656
16657 2017-01-10 Tom Tromey <tom@tromey.com>
16658
16659 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16660 gdbpy_ref.
16661
16662 2017-01-10 Tom Tromey <tom@tromey.com>
16663
16664 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16665 extra incref.
16666 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16667 Use gdbpy_ref.
16668
16669 2017-01-10 Tom Tromey <tom@tromey.com>
16670
16671 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16672 gdbpy_ref.
16673
16674 2017-01-10 Tom Tromey <tom@tromey.com>
16675
16676 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16677 decref results of PyArg_ParseTupleAndKeywords.
16678
16679 2017-01-10 Tom Tromey <tom@tromey.com>
16680
16681 * python/python.c (python_run_simple_file): Use
16682 unique_xmalloc_ptr, gdbpy_ref.
16683
16684 2017-01-10 Tom Tromey <tom@tromey.com>
16685
16686 * python/py-prettyprint.c (print_stack_unless_memory_error)
16687 (print_string_repr, print_children): Use gdbpy_ref.
16688 (dummy_python_frame): New class.
16689 (dummy_python_frame::dummy_python_frame): Rename from
16690 push_dummy_python_frame.
16691 (py_restore_tstate): Remove.
16692
16693 2017-01-10 Tom Tromey <tom@tromey.com>
16694
16695 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16696
16697 2017-01-10 Tom Tromey <tom@tromey.com>
16698
16699 * python/python.c (ensure_python_env, restore_python_env):
16700 Remove.
16701 * python/python-internal.h (ensure_python_env): Don't declare.
16702 * varobj.h (varobj_ensure_python_env): Don't declare.
16703 * varobj.c (varobj_ensure_python_env): Remove.
16704
16705 2017-01-10 Tom Tromey <tom@tromey.com>
16706
16707 * varobj.c (varobj_value_get_print_value): Use
16708 gdbpy_enter_varobj.
16709
16710 2017-01-10 Tom Tromey <tom@tromey.com>
16711
16712 * python/py-prettyprint.c (print_string_repr, print_children):
16713 Update.
16714 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16715 of "encoding".
16716 * varobj.c (varobj_value_get_print_value): Update.
16717 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16718
16719 2017-01-10 Tom Tromey <tom@tromey.com>
16720
16721 * varobj.c (varobj_get_display_hint)
16722 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16723 (varobj_set_visualizer, free_variable): Use
16724 gdbpy_enter_varobj.
16725
16726 2017-01-10 Tom Tromey <tom@tromey.com>
16727
16728 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16729 (do_finish_initialization): New function. Use gdbpy_ref.
16730 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16731 do_finish_initialization.
16732
16733 2017-01-10 Tom Tromey <tom@tromey.com>
16734
16735 * python/py-param.c (get_set_value, get_show_value): Use
16736 gdbpy_enter, gdbpy_ref.
16737
16738 2017-01-10 Tom Tromey <tom@tromey.com>
16739
16740 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16741
16742 2017-01-10 Tom Tromey <tom@tromey.com>
16743
16744 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16745
16746 2017-01-10 Tom Tromey <tom@tromey.com>
16747
16748 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16749 Use gdbpy_enter_varobj.
16750
16751 2017-01-10 Tom Tromey <tom@tromey.com>
16752
16753 * varobj.c (gdbpy_enter_varobj): New constructor.
16754 * python/python-internal.h (gdbpy_enter_varobj): New class.
16755 * python/py-varobj.c (py_varobj_get_iterator): Use
16756 gdbpy_enter_varobj.
16757
16758 2017-01-10 Tom Tromey <tom@tromey.com>
16759
16760 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16761 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16762 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16763 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16764 unique_xmalloc_ptr.
16765 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16766
16767 2017-01-10 Tom Tromey <tom@tromey.com>
16768
16769 * python/py-xmethods.c (invoke_match_method): Use
16770 gdbpy_ref.
16771
16772 2017-01-10 Tom Tromey <tom@tromey.com>
16773
16774 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16775 gdbpy_enter, gdbpy_ref.
16776
16777 2017-01-10 Tom Tromey <tom@tromey.com>
16778
16779 * python/python.c (python_interactive_command): Use gdbpy_enter.
16780
16781 2017-01-10 Tom Tromey <tom@tromey.com>
16782
16783 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16784 gdbpy_ref.
16785
16786 2017-01-10 Tom Tromey <tom@tromey.com>
16787
16788 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16789 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16790
16791 2017-01-10 Tom Tromey <tom@tromey.com>
16792
16793 * utils.h (htab_deleter): New struct.
16794 (htab_up): New typedef.
16795 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16796 gdbpy_enter, gdbpy_ref, htab_up.
16797
16798 2017-01-10 Tom Tromey <tom@tromey.com>
16799
16800 * python/py-unwind.c (pending_frame_invalidate): Remove.
16801 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16802
16803 2017-01-10 Tom Tromey <tom@tromey.com>
16804
16805 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16806 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16807
16808 2017-01-10 Tom Tromey <tom@tromey.com>
16809
16810 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16811
16812 2017-01-10 Tom Tromey <tom@tromey.com>
16813
16814 * python/python.c (gdbpy_eval_from_control_command)
16815 (gdbpy_source_script, gdbpy_run_events)
16816 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16817 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16818 gdbpy_enter.
16819
16820 2017-01-10 Tom Tromey <tom@tromey.com>
16821
16822 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16823
16824 2017-01-10 Tom Tromey <tom@tromey.com>
16825
16826 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16827
16828 2017-01-10 Tom Tromey <tom@tromey.com>
16829
16830 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16831 (python_on_inferior_call_pre, python_on_inferior_call_post)
16832 (python_on_memory_change, python_on_register_change)
16833 (python_inferior_exit, python_new_objfile, add_thread_object)
16834 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16835
16836 2017-01-10 Tom Tromey <tom@tromey.com>
16837
16838 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16839 (bpfinishpy_handle_exit): Use gdbpy_enter.
16840
16841 2017-01-10 Tom Tromey <tom@tromey.com>
16842
16843 * python/py-cmd.c (cmdpy_destroyer)
16844 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16845 gdbpy_enter.
16846
16847 2017-01-10 Tom Tromey <tom@tromey.com>
16848
16849 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16850 gdbpy_enter.
16851 (gdbpy_breakpoint_has_cond): Likewise.
16852
16853 2017-01-10 Tom Tromey <tom@tromey.com>
16854
16855 * python/python.c (gdbpy_enter): New constructor.
16856 (~gdbpy_enter): New destructor.
16857 (restore_python_env, ensure_python_env): Rewrite.
16858 * python/python-internal.h (gdbpy_enter): New class.
16859
16860 2017-01-10 Tom Tromey <tom@tromey.com>
16861
16862 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16863
16864 2017-01-10 Tom Tromey <tom@tromey.com>
16865
16866 * python/py-value.c (value_has_field, get_field_flag)
16867 (get_field_type, valpy_getitem, convert_value_from_python): Use
16868 gdbpy_ref.
16869
16870 2017-01-10 Tom Tromey <tom@tromey.com>
16871
16872 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16873 gdbpy_ref.
16874
16875 2017-01-10 Tom Tromey <tom@tromey.com>
16876
16877 * python/py-prettyprint.c (search_pp_list)
16878 (find_pretty_printer_from_objfiles)
16879 (find_pretty_printer_from_progspace)
16880 (find_pretty_printer_from_gdb, find_pretty_printer)
16881 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16882 gdbpy_ref.
16883
16884 2017-01-10 Tom Tromey <tom@tromey.com>
16885
16886 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16887
16888 2017-01-10 Tom Tromey <tom@tromey.com>
16889
16890 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16891 (ltpy_get_all_source_lines): Use gdbpy_ref.
16892
16893 2017-01-10 Tom Tromey <tom@tromey.com>
16894
16895 * python/py-framefilter.c (extract_sym, extract_value)
16896 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16897 gdbpy_ref.
16898
16899 2017-01-10 Tom Tromey <tom@tromey.com>
16900
16901 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16902
16903 2017-01-10 Tom Tromey <tom@tromey.com>
16904
16905 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16906
16907 2017-01-10 Tom Tromey <tom@tromey.com>
16908
16909 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16910 gdbpy_ref.
16911
16912 2017-01-10 Tom Tromey <tom@tromey.com>
16913
16914 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16915
16916 2017-01-10 Tom Tromey <tom@tromey.com>
16917
16918 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16919 (typy_range): Use gdbpy_ref.
16920
16921 2017-01-10 Tom Tromey <tom@tromey.com>
16922
16923 * python/py-threadevent.c (create_thread_event_object): Use
16924 gdbpy_ref.
16925 * python/py-stopevent.c (create_stop_event_object): Simplify.
16926 (emit_stop_event): Use gdbpy_ref.
16927 * python/py-signalevent.c (create_signal_event_object): Use
16928 gdbpy_ref.
16929 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16930 (emit_new_objfile_event, create_clear_objfiles_event_object)
16931 (emit_clear_objfiles_event): Use gdbpy_ref.
16932 * python/py-infevents.c (create_inferior_call_event_object)
16933 (create_register_changed_event_object)
16934 (create_memory_changed_event_object, emit_inferior_call_event)
16935 (emit_memory_changed_event, emit_register_changed_event): Use
16936 gdbpy_ref.
16937 * python/py-exitedevent.c (create_exited_event_object)
16938 (emit_exited_event): Use gdbpy_ref.
16939 * python/py-event.h (evpy_emit_event): Remove
16940 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16941 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16942 * python/py-continueevent.c (emit_continue_event): Use
16943 gdbpy_ref.
16944 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16945 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16946 gdbpy_ref.
16947 * python/py-bpevent.c (create_breakpoint_event_object): Use
16948 gdbpy_ref.
16949
16950 2017-01-10 Tom Tromey <tom@tromey.com>
16951
16952 * python/py-ref.h: New file.
16953
16954 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16955
16956 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16957 void.
16958 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16959 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16960 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16961 * ui-out.c (ui_out::redirect): Likewise.
16962 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16963 * cli/cli-logging.c (set_logging_redirect): Update call site of
16964 ui_out::redirect.
16965 (handle_redirections): Likewise.
16966 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16967 * top.c (execute_command_to_string): Likewise.
16968 * utils.c (do_ui_out_redirect_pop): Likewise.
16969
16970 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16971
16972 * stack.c (_initialize_stack): Update "frame" command help message.
16973
16974 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16975
16976 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16977
16978 2017-01-06 Yao Qi <yao.qi@linaro.org>
16979
16980 * x86-linux-nat.h: Include gdb_proc_service.h.
16981
16982 2017-01-06 Yao Qi <yao.qi@linaro.org>
16983
16984 * ser-base.h: Include serial.h.
16985
16986 2017-01-06 Yao Qi <yao.qi@linaro.org>
16987
16988 * ppc-linux-tdep.h: Include ppc-tdep.h.
16989
16990 2017-01-06 Yao Qi <yao.qi@linaro.org>
16991
16992 * nat/amd64-linux-siginfo.h: Include signal.h.
16993
16994 2017-01-06 Yao Qi <yao.qi@linaro.org>
16995
16996 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16997
16998 2017-01-06 Yao Qi <yao.qi@linaro.org>
16999
17000 * mi/mi-parse.h: Include mi-cmds.h.
17001
17002 2017-01-06 Yao Qi <yao.qi@linaro.org>
17003
17004 * inf-loop.c: Don't include "target.h".
17005 * inf-loop.h: Include it here.
17006
17007 2017-01-06 Yao Qi <yao.qi@linaro.org>
17008
17009 * dfp.h: Include "dboulest.h" and "expression.h".
17010
17011 2017-01-06 Yao Qi <yao.qi@linaro.org>
17012
17013 * ax-gdb.h: Include "ax.h".
17014
17015 2017-01-06 Yao Qi <yao.qi@linaro.org>
17016
17017 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17018 with nat/gdb_ptrace.h.
17019
17020 2017-01-05 Yao Qi <yao.qi@linaro.org>
17021
17022 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17023 new line.
17024 (mips64_fbsd_sigframe_init): Likewise.
17025
17026 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17027
17028 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17029 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17030
17031 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17032
17033 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17034 * NEWS: Mention new FreeBSD/mips native configuration.
17035 * config/mips/fbsd.mh: New file.
17036 * configure.host: Add mips*-*-freebsd*.
17037 * mips-fbsd-nat.c: New file.
17038
17039 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17040
17041 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17042 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17043 * NEWS: Mention new FreeBSD/mips target.
17044 * configure.tgt: Add mips*-*-freebsd*.
17045 * mips-fbsd-tdep.c: New file.
17046 * mips-fbsd-tdep.h: New file.
17047
17048 2017-01-04 Yao Qi <yao.qi@linaro.org>
17049
17050 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17051 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17052
17053 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17054
17055 Update copyright year range in all GDB files.
17056
17057 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17058
17059 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17060
17061 For older changes see ChangeLog-2016.
17062 \f
17063 Local Variables:
17064 mode: change-log
17065 left-margin: 8
17066 fill-column: 74
17067 version-control: never
17068 coding: utf-8
17069 End:
This page took 0.371419 seconds and 3 git commands to generate.