Move guile object files to guile subdirectory
[binutils-gdb.git] / gdb / ChangeLog
1 2017-11-27 Tom Tromey <tom@tromey.com>
2
3 * configure: Rebuild.
4 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
5 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
6 (CONFIG_SRC_SUBDIR): Add guile.
7 (%.o): Remove guile rule.
8
9 2017-11-27 Tom Tromey <tom@tromey.com>
10
11 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
12 (%.o): Remove unittests rule.
13 (CONFIG_SRC_SUBDIR): Add unittests.
14
15 2017-11-27 Tom Tromey <tom@tromey.com>
16
17 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
18 (CONFIG_SRC_SUBDIR): Add tui.
19 (%.o): Remove tui rule.
20
21 2017-11-27 Tom Tromey <tom@tromey.com>
22
23 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
24 (%.o): Remove compile rule.
25 (CONFIG_SRC_SUBDIR): Add compile.
26
27 2017-11-27 Tom Tromey <tom@tromey.com>
28
29 * Makefile.in (SUBDIR_MI_OBS): Redefine.
30 (%.o): Remove mi rule.
31 (CONFIG_SRC_SUBDIR): Add mi.
32 (COMMON_OBS): Use mi/mi-common.o
33
34 2017-11-27 Tom Tromey <tom@tromey.com>
35
36 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
37 (%.o): Remove cli rule.
38 (CONFIG_SRC_SUBDIR): Add cli.
39
40 2017-11-27 Tom Tromey <tom@tromey.com>
41
42 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
43 * configure: Rebuild.
44 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
45 (CONFIG_DEP_SUBDIR): New variable.
46 (%.o): Add order-only dependency.
47 ($(CONFIG_DEP_SUBDIR)): New target.
48
49 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
50
51 PR gdb/21945
52 * findcmd.c (_initialize_mem_search): Update find command help
53 text.
54
55 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * python/python.c (do_start_initialization): Change progname
58 type to gdb::unique_xmalloc_ptr. Release the pointer when using
59 Python 2.
60
61 2017-11-26 Tom Tromey <tom@tromey.com>
62
63 * common/format.h: Add include guards.
64
65 2017-11-26 Tom Tromey <tom@tromey.com>
66
67 * nat/linux-personality.h (class
68 maybe_disable_address_space_randomization): New class.
69 (maybe_disable_address_space_randomization): Don't declare
70 function.
71 * nat/linux-personality.c (restore_personality)
72 (make_disable_asr_cleanup): Remove.
73 (maybe_disable_address_space_randomization): Now a constructor.
74 (~maybe_disable_address_space_randomization): New destructor.
75 * linux-nat.c (linux_nat_create_inferior): Update.
76
77 2017-11-26 Tom Tromey <tom@tromey.com>
78
79 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
80
81 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
82
83 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
84 "cooked" register. Access only first four bytes of branch target
85 registers.
86
87 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
88
89 PR gdb/22491
90 * stap-probe.c (relocate_address): New function.
91 (stap_probe::get_relocated_address): Use 'relocate_address'.
92 (stap_probe::set_semaphore): Use 'relocate_address' and pass
93 'm_sem_addr'.
94 (stap_probe::clear_semaphore): Likewise.
95
96 2017-11-25 Pedro Alves <palves@redhat.com>
97
98 * dictionary.c: Include "safe-ctype.h".
99 * minsyms.c: Include "safe-ctype.h".
100 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
101
102 2017-11-25 Pedro Alves <palves@redhat.com>
103
104 * completer.c (complete_line_internal_1): Skip spaces until the
105 start of the command.
106
107 2017-11-24 Pedro Alves <palves@redhat.com>
108
109 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
110 cp_fq_symbol_name_matches. Pass language_cplus to
111 strncmp_with_mode.
112 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
113 (selftests::test_cp_symbol_name_cmp): New.
114 (_initialize_cp_support): Register "cp_symbol_name_matches"
115 selftests.
116 * language.c (default_symbol_name_matcher): Pass language_minimal
117 to strncmp_iw_with_mode.
118 * utils.c: Include "cp-support.h" and <algorithm>.
119 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
120 (cp_is_operator): New functions.
121 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
122 skip whitespace in the symbol name when the lookup name doesn't
123 have spaces, and vice versa.
124 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
125 * utils.h (strncmp_iw_with_mode): Add language parameter.
126
127 2017-11-24 Joel Brobecker <brobecker@adacore.com>
128
129 * ada-lang.c (ada_exception_message_1, ada_exception_message):
130 New functions.
131 (print_it_exception): If available, display the exception
132 message as well.
133 * NEWS: Document new feature.
134
135 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
136
137 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
138
139 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
140
141 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
142 (dtrace_probe::is_enabled, dtrace_probe::enable)
143 (dtrace_probe::disable): Remove keyword 'struct' at for-range
144 variable
145 * probe.c (gen_ui_out_table_header_info)
146 (print_ui_out_not_applicables): Remove keyword 'struct' at
147 for-range variable
148
149 2017-11-24 Alan Hayward <alan.hayward@arm.com>
150
151 * configure.tgt: Add arch/aarch64.o
152
153 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
154
155 * common/common-utils.h: Include poison.h.
156 (xfree): Remove declaration, add definition with static_assert.
157 * common/common-utils.c (xfree): Remove.
158 * common/poison.h (IsMallocatable): Define.
159 (IsFreeable): Define.
160 (free): Delete for non-freeable types.
161 (xnew): New.
162 (XNEW): Undef and redefine.
163 (xcnew): New.
164 (XCNEW): Undef and redefine.
165 (xdelete): New.
166 (XDELETE): Undef and redefine.
167 (xnewvec): New.
168 (XNEWVEC): Undef and redefine.
169 (xcnewvec): New.
170 (XCNEWVEC): Undef and redefine.
171 (xresizevec): New.
172 (XRESIZEVEC): Undef and redefine.
173 (xdeletevec): New.
174 (XDELETEVEC): Undef and redefine.
175 (xnewvar): New.
176 (XNEWVAR): Undef and redefine.
177 (xcnewvar): New.
178 (XCNEWVAR): Undef and redefine.
179 (xresizevar): New.
180 (XRESIZEVAR): Undef and redefine.
181
182 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
183
184 * gdbthread.h (private_thread_info): Define structure type, add
185 virtual pure destructor.
186 (thread_info) <priv>: Change type to unique_ptr.
187 <private_dtor>: Remove.
188 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
189 (private_thread_info::~private_thread_info): Provide default
190 implementation.
191 (thread_info::~thread_info): Don't call private_dtor nor
192 manually free priv.
193 * aix-thread.c (private_thread_info): Rename to ...
194 (aix_thread_info): ... this.
195 (get_aix_thread_info): New.
196 (sync_threadlists): Adjust.
197 (iter_tid): Adjust.
198 (aix_thread_resume): Adjust.
199 (aix_thread_fetch_registers): Adjust.
200 (aix_thread_store_registers): Adjust.
201 (aix_thread_extra_thread_info): Adjust.
202 * darwin-nat.h (private_thread_info): Rename to ...
203 (darwin_thread_info): ... this.
204 (get_darwin_thread_info): New.
205 * darwin-nat.c (darwin_init_thread_list): Adjust.
206 (darwin_check_new_threads): Adjust.
207 (thread_info_from_private_thread_info): Adjust.
208 * linux-thread-db.c (private_thread_info): Rename to ...
209 (thread_db_thread_info): ... this, initialize fields.
210 (get_thread_db_thread_info): New.
211 <dying>: Change type to bool.
212 (update_thread_state): Adjust to type rename.
213 (record_thread): Adjust to type rename an use of unique_ptr.
214 (thread_db_pid_to_str): Likewise.
215 (thread_db_extra_thread_info): Likewise.
216 (thread_db_thread_handle_to_thread_info): Likewise.
217 (thread_db_get_thread_local_address): Likewise.
218 * nto-tdep.h (private_thread_info): Rename to ...
219 (nto_thread_info): ... this, initialize fields.
220 (get_nto_thread_info): New.
221 <name>: Change type to std::string.
222 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
223 use of unique_ptr.
224 * nto-procfs.c (update_thread_private_data_name): Adjust to
225 std::string change, allocate nto_private_thread_info with new.
226 (update_thread_private_data): Adjust to unique_ptr.
227 * remote.c (private_thread_info): Rename to ...
228 (remote_thread_info): ... this, initialize data members with
229 default values.
230 <extra, name>: Change type to std::string.
231 <thread_handle>: Change type to non-pointer.
232 (free_private_thread_info): Remove.
233 (get_private_info_thread): Rename to...
234 (get_remote_thread_info): ... this, change return type, adjust to
235 use of unique_ptr, use remote_thread_info constructor.
236 (remote_add_thread): Adjust.
237 (get_private_info_ptid): Rename to...
238 (get_remote_thread_info): ...this, change return type.
239 (remote_thread_name): Use get_remote_thread_info, adjust to
240 change to std::string.
241 (struct thread_item) <~thread_item>: Remove.
242 <thread_handle>: Make non pointer.
243 (start_thread): Adjust to thread_item::thread_handle type
244 change.
245 (remote_update_thread_list): Adjust to type name change, move
246 strings from temporary to long-lived object instead of
247 duplicating.
248 (remote_threads_extra_info): Use get_remote_thread_info.
249 (process_initial_stop_replies): Likewise.
250 (resume_clear_thread_private_info): Likewise.
251 (remote_resume): Adjust to type name change.
252 (remote_commit_resume): Use get_remote_thread_info.
253 (process_stop_reply): Adjust to type name change.
254 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
255 (remote_stopped_by_hw_breakpoint): Likewise.
256 (remote_stopped_by_watchpoint): Likewise.
257 (remote_stopped_data_address): Likewise.
258 (remote_core_of_thread): Likewise.
259 (remote_thread_handle_to_thread_info): Use
260 get_private_info_thread, adjust to thread_handle field type
261 change.
262
263 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * remote.c (struct thread_item): Add constructor, disable copy
266 construction and copy assignment, define default move
267 construction and move assignment.
268 <extra, name>: Change type to std::string.
269 <core>: Initialize.
270 <thread_handle>: Make non-pointer.
271 (thread_item_t): Remove typedef.
272 (DEF_VEC_O(thread_item_t)): Remove.
273 (threads_listing_context) <contains_thread>: New method.
274 <remove_thread>: New method.
275 <items>: Change type to std::vector.
276 (clear_threads_listing_context): Remove.
277 (threads_listing_context_remove): Remove.
278 (remote_newthread_step): Use thread_item constructor, adjust to
279 change to std::vector.
280 (start_thread): Use thread_item constructor, adjust to change to
281 std::vector.
282 (end_thread): Adjust to change to std::vector and std::string.
283 (remote_get_threads_with_qthreadinfo): Use thread_item
284 constructor, adjust to std::vector.
285 (remote_update_thread_list): Adjust to change to std::vector and
286 std::string, use threads_listing_context methods.
287 (remove_child_of_pending_fork): Adjust.
288 (remove_new_fork_children): Adjust.
289 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
290 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
291 * unittests/rsp-low-selftests.c: New file.
292 * common/rsp-low.h: Include common/byte-vector.h.
293 (hex2bin): New overload.
294 * common/rsp-low.c (hex2bin): New overload.
295
296 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
297
298 * inferior.h (private_inferior): Define structure type, add
299 virtual pure destructor.
300 (inferior) <priv>: Change type to unique_ptr.
301 * inferior.c (private_inferior::~private_inferior): Provide
302 default implementation.
303 (inferior::~inferior): Don't free priv field.
304 (exit_inferior_1): Likewise.
305 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
306 (darwin_exception_info): Remove typedef.
307 (DEF_VEC_O (darwin_thread_t)); Remove.
308 (private_inferior): Rename to ...
309 (darwin_private_inferior): ... this, extend private_inferior.
310 (get_darwin_inferior): New.
311 <threads>: Change type to std::vector of darwin_thread_t pointers.
312 * darwin-nat.c (darwin_check_new_threads): Adjust.
313 (find_inferior_task_it): Adjust.
314 (darwin_find_thread); Adjust.
315 (darwin_suspend_inferior): Adjust.
316 (darwin_resume_inferior): Adjust.
317 (darwin_find_new_inferior): Adjust.
318 (darwin_decode_notify_message): Adjust.
319 (darwin_send_reply): Adjust.
320 (darwin_resume_inferior_threads): Adjust.
321 (darwin_suspend_inferior_threads): Adjust.
322 (darwin_decode_message): Adjust.
323 (darwin_wait): Adjust.
324 (darwin_interrupt): Adjust.
325 (darwin_deallocate_threads): Adjust.
326 (darwin_mourn_inferior): Adjust, don't free private data.
327 (darwin_reply_to_all_pending_messages): Adjust.
328 (darwin_stop_inferior): Adjust.
329 (darwin_setup_exceptions): Adjust.
330 (darwin_kill_inferior): Adjust.
331 (darwin_setup_request_notification): Adjust.
332 (darwin_attach_pid): Adjust.
333 (darwin_init_thread_list): Adjust.
334 (darwin_setup_fake_stop_event): Adjust.
335 (darwin_attach): Adjust.
336 (darwin_detach): Adjust.
337 (darwin_xfer_partial): Adjust.
338 (set_enable_mach_exceptions): Adjust.
339 (darwin_pid_to_exec_file): Adjust.
340 (darwin_get_ada_task_ptid): Adjust.
341 * darwin-nat-info.c (get_task_from_args): Adjust.
342 (info_mach_ports_command): Adjust.
343 (info_mach_region_command): Adjust.
344 (info_mach_exceptions_command): Adjust.
345 * remote.c (private_inferior): Rename to ...
346 (remote_private_inferior): ... this, initialize fields.
347 (get_remote_inferior); New.
348 (remote_commit_resume): Use get_remote_inferior.
349 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
350
351 2017-11-24 Pedro Alves <palves@redhat.com>
352
353 * NEWS: Mention linespecs and explicit locations, and completion
354 improvements.
355
356 2017-11-24 Yao Qi <yao.qi@linaro.org>
357
358 * regcache.c (regcache::dump): Remove footnote_register_size.
359
360 2017-11-24 Yao Qi <yao.qi@linaro.org>
361
362 * regcache.c (cooked_read_test): Add more test for readonly
363 regcache.
364
365 2017-11-24 Yao Qi <yao.qi@linaro.org>
366
367 * gdbarch-selftests.c (test_target_has_registers): Move it to
368 target.c.
369 (test_target_has_stack): Likewise.
370 (test_target_has_memory): Likewise.
371 (test_target_prepare_to_store): Likewise.
372 (test_target_store_registers): Likewise.
373 (test_target_ops): Likewise.
374 * regcache.c: Include selftest-arch.h and gdbthread.h.
375 (target_ops_no_register): New class.
376 (test_target_fetch_registers): New.
377 (test_target_store_registers): New.
378 (test_target_xfer_partial): New.
379 (readwrite_regcache): New.
380 (cooked_read_test): New.
381 (_initialize_regcache): Register the test.
382 * target.c: (test_target_has_registers): Moved from
383 gdbarch-selftests.c.
384 (test_target_has_stack): Likewise.
385 (test_target_has_memory): Likewise.
386 (test_target_prepare_to_store): Likewise.
387 (test_target_store_registers): Likewise.
388 * target.h (test_target_ops): New class.
389
390 2017-11-24 Alan Hayward <alan.hayward@arm.com>
391
392 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
393 selftest.
394
395 2017-11-24 Alan Hayward <alan.hayward@arm.com>
396
397 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
398 * arch/aarch64.c (aarch64_create_target_description): Create
399 new target description.
400 * features/Makefile: Add new files.
401 * features/aarch64.c: Remove file.
402 * features/aarch64-core.c: New autogenerated file.
403 * features/aarch64-fpu.c: New autogenerated file.
404 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
405
406 2017-11-24 Alan Hayward <alan.hayward@arm.com>
407
408 * Makefile.in: Add new files.
409 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
410 aarch64_read_description.
411 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
412 Call aarch64_read_description.
413 * aarch64-tdep.c (aarch64_read_description): New function.
414 (aarch64_gdbarch_init): Call aarch64_read_description.
415 * aarch64-tdep.h (aarch64_read_description): New function.
416 * arch/aarch64.c: New file.
417 * configure.tgt: Add new files.
418
419 2017-11-24 Yao Qi <yao.qi@linaro.org>
420
421 * mi/mi-main.c (register_changed_p): Update.
422 * value.c (value_contents_bits_eq): Change return type.
423 (value_contents_eq): Likewise.
424 * value.h: Update comments.
425
426 2017-11-24 Yao Qi <yao.qi@linaro.org>
427
428 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
429 local 'changed'. Remove error.
430 (register_changed_p): Change return type to bool.
431
432 2017-11-24 Yao Qi <yao.qi@linaro.org>
433
434 * arch/tic6x.c: New file.
435 * arch/tic6x.h: New file.
436 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
437 tic6x-core.xml and tic6x-gp.xml.
438 * features/tic6x-c6xp.c: Generated.
439 * features/tic6x-core.c: Generated.
440 * features/tic6x-gp.c: Generated.
441 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
442 "tic6x-".
443
444 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
445
446 * mi/mi-main.c (list_available_thread_groups): Change map value
447 type to std::vector.
448
449 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
450
451 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
452
453 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
454
455 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
456 back to...
457 <children_requested>: ... this.
458 (varobj_get_num_children, varobj_update): Adjust.
459
460 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
461
462 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
463 (ada_value_has_mutated): Likewise.
464 * c-varobj.c (varobj_is_anonymous_child): Likewise.
465 (c_is_path_expr_parent): Likewise.
466 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
467 (mi_cmd_var_set_frozen): Likewise.
468 (mi_cmd_var_update_iter): Likewise.
469 (mi_cmd_var_update): Likewise.
470 * varobj.c (pretty_printing): Likewise.
471 (varobj_enable_pretty_printing): Likewise.
472 (struct varobj_root) <floating, is_valid>: Likewise.
473 (struct varobj_dynamic) <children_requested>: Likewise.
474 (delete_variable): Likewise.
475 (delete_variable_1): Likewise.
476 (install_variable): Likewise.
477 (update_type_if_necessary): Likewise.
478 (install_new_value): Likewise.
479 (value_of_root): Likewise.
480 (is_root_p): Likewise.
481 (varobj_create): Likewise.
482 (varobj_delete): Likewise.
483 (varobj_has_more): Likewise.
484 (varobj_set_frozen): Likewise.
485 (varobj_get_frozen): Likewise.
486 (install_dynamic_child): Likewise.
487 (dynamic_varobj_has_child_method): Likewise.
488 (update_dynamic_varobj_children): Likewise.
489 (varobj_get_num_children): Likewise.
490 (varobj_list_children): Likewise.
491 (is_path_expr_parent): Likewise.
492 (varobj_default_is_path_expr_parent): Likewise.
493 (varobj_is_dynamic_p): Likewise.
494 (varobj_set_value): Likewise.
495 (varobj_value_has_mutated): Likewise.
496 (varobj_update): Likewise.
497 (check_scope): Likewise.
498 (value_of_root_1): Likewise.
499 (varobj_value_get_print_value): Likewise.
500 (varobj_editable_p): Likewise.
501 (varobj_value_is_changeable_p): Likewise.
502 (varobj_floating_p): Likewise.
503 (varobj_default_value_is_changeable_p): Likewise.
504 (varobj_invalidate_iter): Likewise.
505 * varobj.h (struct varobj_update_result) <type_changed,
506 children_changed, changed, value_installed>: Likewise.
507 (struct varobj) <updated, frozen, not_fetched>: Likewise.
508 (struct lang_varobj_ops) <value_is_changeable_p,
509 value_has_mutated, is_path_expr_parent>: Likewise.
510 (varobj_delete): Likewise.
511 (varobj_set_frozen): Likewise.
512 (varobj_get_frozen): Likewise.
513 (varobj_set_value): Likewise.
514 (varobj_update): Likewise.
515 (varobj_editable_p): Likewise.
516 (varobj_floating_p): Likewise.
517 (varobj_has_more): Likewise.
518 (varobj_is_dynamic_p): Likewise.
519 (varobj_default_value_is_changeable_p): Likewise.
520 (varobj_value_is_changeable_p): Likewise.
521 (varobj_is_anonymous_child): Likewise.
522 (varobj_default_is_path_expr_parent): Likewise.
523
524 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
525
526 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
527 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
528 <type_str>: Convert to 'std::string'.
529 <expr>: Convert to 'expression_up'.
530 (dtrace_probe_arg_s): Delete type and VEC.
531 (dtrace_probe_enabler_s): Likewise.
532 (struct dtrace_probe): Replace by...
533 (class dtrace_static_probe_ops): ...this and...
534 (class dtrace_probe): ...this.
535 (dtrace_probe_is_linespec): Rename to...
536 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
537 to reflect change.
538 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
539 Adjust code. Create new instance of 'dtrace_probe'.
540 (dtrace_build_arg_exprs): Rename to...
541 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
542 reflect change.
543 (dtrace_get_probes): Rename to...
544 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
545 to reflect change.
546 (dtrace_get_arg): Rename to...
547 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
548 reflect change.
549 (dtrace_probe_is_enabled): Rename to...
550 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
551 change.
552 (dtrace_get_probe_address): Rename to...
553 (dtrace_probe::get_relocated_address): ...this. Adjust code
554 to reflect change.
555 (dtrace_get_probe_argument_count): Rename to...
556 (dtrace_probe::get_argument_count): ...this. Adjust code to
557 reflect change.
558 (dtrace_can_evaluate_probe_arguments): Rename to...
559 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
560 to reflect change.
561 (dtrace_evaluate_probe_argument): Rename to...
562 (dtrace_probe::evaluate_argument): ...this. Adjust code to
563 reflect change.
564 (dtrace_compile_to_ax): Rename to...
565 (dtrace_probe::compile_to_ax): ...this. Adjust code to
566 reflect change.
567 (dtrace_probe_destroy): Delete.
568 (dtrace_type_name): Rename to...
569 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
570 reflect change.
571 (dtrace_probe::get_static_ops): New method.
572 (dtrace_gen_info_probes_table_header): Rename to...
573 (dtrace_static_probe_ops::gen_info_probes_table_header):
574 ...this. Adjust code to reflect change.
575 (dtrace_gen_info_probes_table_values): Rename to...
576 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
577 code to reflect change.
578 (dtrace_enable_probe): Rename to...
579 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
580 change.
581 (dtrace_disable_probe): Rename to...
582 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
583 change.
584 (struct probe_ops dtrace_probe_ops): Delete.
585 (info_probes_dtrace_command): Call 'info_probes_for_spops'
586 instead of 'info_probes_for_ops'.
587 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
588 of 'all_probe_ops'.
589
590 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
591 Simon Marchi <simark@simark.ca>
592
593 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
594 variable.
595 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
596 <aexpr>: Change type to 'expression_up'.
597 (stap_probe_arg_s): Delete type and VEC.
598 (struct stap_probe): Delete. Replace by...
599 (class stap_static_probe_ops): ...this and...
600 (class stap_probe): ...this. Rename variables to add 'm_'
601 prefix. Do not use 'union' for arguments anymore.
602 (stap_get_expected_argument_type): Receive probe name instead
603 of 'struct stap_probe'. Adjust code.
604 (stap_parse_probe_arguments): Rename to...
605 (stap_probe::parse_arguments): ...this. Adjust code to
606 reflect change.
607 (stap_get_probe_address): Rename to...
608 (stap_probe::get_relocated_address): ...this. Adjust code
609 to reflect change.
610 (stap_get_probe_argument_count): Rename to...
611 (stap_probe::get_argument_count): ...this. Adjust code
612 to reflect change.
613 (stap_get_arg): Rename to...
614 (stap_probe::get_arg_by_number'): ...this. Adjust code to
615 reflect change.
616 (can_evaluate_probe_arguments): Rename to...
617 (stap_probe::can_evaluate_arguments): ...this. Adjust code
618 to reflect change.
619 (stap_evaluate_probe_argument): Rename to...
620 (stap_probe::evaluate_argument): ...this. Adjust code
621 to reflect change.
622 (stap_compile_to_ax): Rename to...
623 (stap_probe::compile_to_ax): ...this. Adjust code to
624 reflect change.
625 (stap_probe_destroy): Delete.
626 (stap_modify_semaphore): Adjust comment.
627 (stap_set_semaphore): Rename to...
628 (stap_probe::set_semaphore): ...this. Adjust code to reflect
629 change.
630 (stap_clear_semaphore): Rename to...
631 (stap_probe::clear_semaphore): ...this. Adjust code to
632 reflect change.
633 (stap_probe::get_static_ops): New method.
634 (handle_stap_probe): Adjust code to create instance of
635 'stap_probe'.
636 (stap_get_probes): Rename to...
637 (stap_static_probe_ops::get_probes): ...this. Adjust code to
638 reflect change.
639 (stap_probe_is_linespec): Rename to...
640 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
641 reflect change.
642 (stap_type_name): Rename to...
643 (stap_static_probe_ops::type_name): ...this. Adjust code to
644 reflect change.
645 (stap_gen_info_probes_table_header): Rename to...
646 (stap_static_probe_ops::gen_info_probes_table_header):
647 ...this. Adjust code to reflect change.
648 (stap_gen_info_probes_table_values): Rename to...
649 (stap_probe::gen_info_probes_table_values): ...this. Adjust
650 code to reflect change.
651 (struct probe_ops stap_probe_ops): Delete.
652 (info_probes_stap_command): Use 'info_probes_for_spops'
653 instead of 'info_probes_for_ops'.
654 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
655 of 'all_probe_ops'.
656
657 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
658
659 * break-catch-throw.c (fetch_probe_arguments): Use
660 'probe.prob' instead of 'probe.probe'.
661 * breakpoint.c (create_longjmp_master_breakpoint): Call
662 'can_evaluate_arguments' and 'get_relocated_address' methods
663 from probe.
664 (create_exception_master_breakpoint): Likewise.
665 (add_location_to_breakpoint): Use 'sal->prob' instead of
666 'sal->probe'.
667 (bkpt_probe_insert_location): Call 'set_semaphore' method from
668 probe.
669 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
670 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
671 of 'probe_ops'.
672 (probe_key_free): Call 'delete' on probe.
673 (check_exception_resume): Use 'probe.prob' instead of
674 'probe.probe'.
675 * location.c (string_to_event_location_basic): Call
676 'probe_linespec_to_static_ops'.
677 * probe.c (class any_static_probe_ops): New class.
678 (any_static_probe_ops any_static_probe_ops): New variable.
679 (parse_probes_in_pspace): Receive 'static_probe_ops' as
680 argument. Adjust code to reflect change.
681 (parse_probes): Use 'static_probe_ops' instead of
682 'probe_ops'. Adjust code to reflect change.
683 (find_probes_in_objfile): Call methods to get name and
684 provider from probe.
685 (find_probe_by_pc): Use 'result.prob' instead of
686 'result.probe'. Call 'get_relocated_address' method from
687 probe.
688 (collect_probes): Adjust comment and argument list to receive
689 'static_probe_ops' instead of 'probe_ops'. Adjust code to
690 reflect change. Call necessary methods from probe.
691 (compare_probes): Call methods to get name and provider from
692 probes.
693 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
694 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
695 adjust code accordingly.
696 (print_ui_out_not_applicables): Likewise.
697 (info_probes_for_ops): Rename to...
698 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
699 as argument instead of 'probe_ops'. Adjust code. Call
700 necessary methods from probe.
701 (info_probes_command): Use 'info_probes_for_spops'.
702 (enable_probes_command): Pass correct argument to
703 'collect_probes'. Call methods from probe.
704 (disable_probes_command): Likewise.
705 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
706 (get_probe_argument_count): Move to
707 'any_static_probe_ops::get_argument_count'.
708 (can_evaluate_probe_arguments): Move to
709 'any_static_probe_ops::can_evaluate_arguments'.
710 (evaluate_probe_argument): Move to
711 'any_static_probe_ops::evaluate_argument'.
712 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
713 'probe.probe'.
714 (probe_linespec_to_ops): Rename to...
715 (probe_linespec_to_static_ops): ...this. Adjust code.
716 (probe_any_is_linespec): Rename to...
717 (any_static_probe_ops::is_linespec): ...this.
718 (probe_any_get_probes): Rename to...
719 (any_static_probe_ops::get_probes): ...this.
720 (any_static_probe_ops::type_name): New method.
721 (any_static_probe_ops::gen_info_probes_table_header): New
722 method.
723 (compute_probe_arg): Use 'pc_probe.prob' instead of
724 'pc_probe.probe'. Call methods from probe.
725 (compile_probe_arg): Likewise.
726 (std::vector<const probe_ops *> all_probe_ops): Delete.
727 (std::vector<const static_probe_ops *> all_static_probe_ops):
728 New variable.
729 (_initialize_probe): Use 'all_static_probe_ops' instead of
730 'all_probe_ops'.
731 * probe.h (struct info_probe_column) <field_name>: Delete
732 extraneous newline
733 (info_probe_column_s): Delete type and VEC.
734 (struct probe_ops): Delete. Replace with...
735 (class static_probe_ops): ...this and...
736 (clas probe): ...this.
737 (struct bound_probe) <bound_probe>: Delete extraneous
738 newline. Adjust constructor to receive 'probe' instead of
739 'struct probe'.
740 <probe>: Rename to...
741 <prob>: ...this. Delete extraneous newline.
742 <objfile>: Delete extraneous newline.
743 (register_probe_ops): Delete unused prototype.
744 (info_probes_for_ops): Rename to...
745 (info_probes_for_spops): ...this. Adjust comment.
746 (get_probe_address): Move to 'probe::get_address'.
747 (get_probe_argument_count): Move to
748 'probe::get_argument_count'.
749 (can_evaluate_probe_arguments): Move to
750 'probe::can_evaluate_arguments'.
751 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
752 * solib-svr4.c (struct svr4_info): Adjust comment.
753 (struct probe_and_action) <probe>: Rename to...
754 <prob>: ...this.
755 (register_solib_event_probe): Receive 'probe' instead of
756 'struct probe' as argument. Use 'prob' instead of 'probe'
757 when applicable.
758 (solib_event_probe_action): Call 'get_argument_count' method
759 from probe. Adjust comment.
760 (svr4_handle_solib_event): Adjust comment. Call
761 'evaluate_argument' method from probe.
762 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
763 from probe.
764 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
765 'struct probe'. Call 'can_evaluate_arguments' from probe.
766 * symfile.h: Forward declare 'class probe' instead of 'struct
767 probe'.
768 * symtab.h: Likewise.
769 (struct symtab_and_line) <probe>: Rename to...
770 <prob>: ...this.
771 * tracepoint.c (start_tracing): Use 'prob' when applicable.
772 Call probe methods.
773 (stop_tracing): Likewise.
774
775 2017-11-22 Joel Brobecker <brobecker@adacore.com>
776
777 * ravenscar-thread.c (ravenscar_inferior_created): Remove
778 trailing newline at end of string in call to warning.
779
780 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
781
782 * osdata.h: Include vector isntead of vec.h.
783 (osdata_column_s): Remove typedef.
784 (struct osdata_column): Add constructor.
785 <name, value>: Change type to std::string.
786 (DEF_VEC_O (osdata_column_s)): Remove.
787 (osdata_item_s): Remove typedef.
788 (struct osdata_item) <columns>: Change type to std::vector.
789 (DEF_VEC_O (osdata_item_s)): Remove.
790 (struct osdata): Add constructor.
791 <type>: Change type to std::string.
792 <items>: Change type to std::vector.
793 (osdata_p): Remove typedef.
794 (DEF_VEC_P (osdata_p)): Remove.
795 (osdata_parse): Return a unique_ptr.
796 (osdata_free): Remove.
797 (make_cleanup_osdata_free): Remove.
798 (get_osdata): Return a unique_ptr.
799 (get_osdata_column): Return pointer to std::string, take a
800 reference to osdata_item as parameter.
801 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
802 unique_ptr.
803 <property_name>: Change type to std::string.
804 (osdata_start_osdata): Allocate osdata with new and adjust.
805 (osdata_start_item): Adjust.
806 (osdata_start_column): Adjust.
807 (osdata_end_column): Adjust.
808 (clear_parsing_data): Remove.
809 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
810 (osdata_item_clear): Remove.
811 (get_osdata): return a unique_ptr and adjust.
812 (get_osdata_column): Return a pointer to std::string and adjust.
813 (info_osdata): Adjust.
814 * mi/mi-main.c: Include <map>.
815 (free_vector_of_osdata_items): Remove.
816 (list_available_thread_groups): Adjust, use std::map instead of
817 splay tree.
818
819 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
820
821 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
822 case in switch.
823
824 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
825
826 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
827
828 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
829
830 * varobj.h (struct varobj_update_result): Add constructor, add
831 move constructor, disable copy and assign, initialize fields.
832 <newobj>: Change type to std::vector.
833 (varobj_update): Return std::vector.
834 * varobj.c (install_dynamic_child): Change VEC parameters to
835 std::vector and adjust.
836 (update_dynamic_varobj_children): Likewise.
837 (varobj_update): Return std::vector and adjust.
838 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
839
840 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
841
842 * varobj.h (struct varobj) <parent>: Remove const.
843 <children>: Change type to std::vector.
844 (varobj_list_children): Return std::vector const reference.
845 (varobj_restrict_range): Change parameter type to std::vector
846 const reference.
847 * varobj.c (varobj_has_more): Adjust.
848 (varobj_restrict_range): Change parameter type to std::vector
849 const reference and adjust.
850 (install_dynamic_child): Adjust.
851 (update_dynamic_varobj_children): Adjust.
852 (varobj_list_children): Return std::vector const reference and
853 adjust.
854 (varobj_add_child): Adjust.
855 (update_type_if_necessary): Adjust.
856 (varobj_update): Adjust.
857 (delete_variable_1): Adjust.
858 * ada-varobj.c (ada_value_has_mutated): Adjust.
859 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
860
861 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * varobj.h (struct varobj): Add constructor and destructor,
864 initialize fields.
865 * varobj.c (struct varobj_root): Initialize fields.
866 (struct varobj_dynamic): Initialize fields.
867 (varobj_create): Use unique_ptr instead of cleanup. Create
868 varobj with new instead of new_root_variable.
869 (delete_variable_1): Free variable with delete instead of
870 free_variable.
871 (create_child_with_value): Create variable with new instead of
872 new_variable.
873 (varobj::varobj): New.
874 (varobj::~varobj): New (body mostly coming from free_variable).
875 (new_variable): Remove.
876 (free_variable): Remove.
877 (do_free_variable_cleanup): Remove.
878 (make_cleanup_free_variable): Remove.
879
880 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
881
882 * core-regset.c: Remove file.
883 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
884
885 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
886
887 * NEWS: Document use of GNU MPFR.
888 * README: Likewise.
889
890 * Makefile.in (LIBMPFR): Add define.
891 (CLIBS): Add $(LIBMPFR).
892 * configure.ac: Add --with-mpfr configure option.
893 * configure: Regenerate.
894 * config.in: Regenerate.
895
896 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
897 (class mpfr_float_ops): New type.
898 (mpfr_float_ops::from_target): Two new overloaded functions.
899 (mpfr_float_ops::to_target): Likewise.
900 (mpfr_float_ops::to_string): New function.
901 (mpfr_float_ops::from_string): Likewise.
902 (mpfr_float_ops::to_longest): Likewise.
903 (mpfr_float_ops::from_longest): Likewise.
904 (mpfr_float_ops::from_ulongest): Likewise.
905 (mpfr_float_ops::to_host_double): Likewise.
906 (mpfr_float_ops::from_host_double): Likewise.
907 (mpfr_float_ops::convert): Likewise.
908 (mpfr_float_ops::binop): Likewise.
909 (mpfr_float_ops::compare): Likewise.
910 (get_target_float_ops): Use mpfr_float_ops if available.
911
912 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
913
914 * target-float.c: Do not include <math.h>.
915 Include <cmath> and <limits>.
916 (DOUBLEST): Do not define.
917 (class target_float_ops): New type.
918 (class host_float_ops): New templated type.
919 (class decimal_float_ops): New type.
920
921 (floatformat_to_doublest): Rename to ...
922 (host_float_ops<T>::from_target): ... this. Use template type T
923 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
924 (host_float_ops<T>::from_target): New overload using a type argument.
925 (floatformat_from_doublest): Rename to ...
926 (host_float_ops<T>::to_target): ... this. Use template type T
927 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
928 (host_float_ops<T>::to_target): New overload using a type argument.
929 (floatformat_printf_format): New function.
930 (struct printf_length_modifier): New templated type.
931 (floatformat_to_string): Rename to ...
932 (host_float_ops<T>::to_string): ... this. Use type instead of
933 floatformat argument. Use floatformat_printf_format and
934 printf_length_modifier. Remove special handling of invalid numbers,
935 infinities and NaN (moved to target_float_to_string).
936 (struct scanf_length_modifier): New templated type.
937 (floatformat_from_string): Rename to ...
938 (host_float_ops<T>::from_string): ... this. Use type instead of
939 floatformat argument. Use scanf_length_modifier.
940 (floatformat_to_longest): Rename to ...
941 (host_float_ops<T>::to_longest): ... this. Use type instead of
942 floatformat argument. Handle out-of-range values deterministically.
943 (floatformat_from_longest): Rename to ...
944 (host_float_ops<T>::from_longest): ... this. Use type instead of
945 floatformat argument.
946 (floatformat_from_ulongest): Rename to ...
947 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
948 floatformat argument.
949 (floatformat_to_host_double): Rename to ...
950 (host_float_ops<T>::to_host_double): ... this. Use type instead of
951 floatformat argument.
952 (floatformat_from_host_double): Rename to ...
953 (host_float_ops<T>::from_host_double): ... this. Use type instead of
954 floatformat argument.
955 (floatformat_convert): Rename to ...
956 (host_float_ops<T>::convert): ... this. Use type instead of
957 floatformat arguments. Remove handling of no-op conversions.
958 (floatformat_binop): Rename to ...
959 (host_float_ops<T>::binop): ... this. Use type instead of
960 floatformat arguments.
961 (floatformat_compare): Rename to ...
962 (host_float_ops<T>::compare): ... this. Use type instead of
963 floatformat arguments.
964
965 (match_endianness): Use type instead of length/byte_order arguments.
966 (set_decnumber_context): Likewise.
967 (decimal_from_number): Likewise. Update calls.
968 (decimal_to_number): Likewise.
969 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
970 (decimal_float_ops::to_host_double): New dummy function.
971 (decimal_float_ops::from_host_double): Likewise.
972 (decimal_to_string): Rename to ...
973 (decimal_float_ops::to_string): ... this. Use type instead of
974 length/byte_order arguments. Update calls.
975 (decimal_from_string): Rename to ...
976 (decimal_float_ops::from_string): ... this. Use type instead of
977 length/byte_order arguments. Update calls.
978 (decimal_from_longest): Rename to ...
979 (decimal_float_ops::from_longest): ... this. Use type instead of
980 length/byte_order arguments. Update calls.
981 (decimal_from_ulongest): Rename to ...
982 (decimal_float_ops::from_ulongest): ... this. Use type instead of
983 length/byte_order arguments. Update calls.
984 (decimal_to_longest): Rename to ...
985 (decimal_float_ops::to_longest): ... this. Use type instead of
986 length/byte_order arguments. Update calls.
987 (decimal_binop): Rename to ...
988 (decimal_float_ops::binop): ... this. Use type instead of
989 length/byte_order arguments. Update calls.
990 (decimal_compare): Rename to ...
991 (decimal_float_ops::compare): ... this. Use type instead of
992 length/byte_order arguments. Update calls.
993 (decimal_convert): Rename to ...
994 (decimal_float_ops::convert): ... this. Use type instead of
995 length/byte_order arguments. Update calls.
996
997 (target_float_same_category_p): New function.
998 (target_float_same_format_p): Likewise.
999 (target_float_format_length): Likewise.
1000 (enum target_float_ops_kind): New type.
1001 (get_target_float_ops_kind): New function.
1002 (get_target_float_ops): Three new overloaded functions.
1003
1004 (target_float_is_zero): Update call.
1005 (target_float_to_string): Add special handling of invalid numbers,
1006 infinities and NaN (moved from floatformat_to_string). Use
1007 target_float_ops callback.
1008 (target_float_from_string): Use target_float_ops callback.
1009 (target_float_to_longest): Likewise.
1010 (target_float_from_longest): Likewise.
1011 (target_float_from_ulongest): Likewise.
1012 (target_float_to_host_double): Likewise.
1013 (target_float_from_host_double): Likewise.
1014 (target_float_convert): Add special case for no-op conversions.
1015 Use target_float_ops callback.
1016 (target_float_binop): Use target_float_ops callback.
1017 (target_float_compare): Likewise.
1018
1019 2017-11-22 Yao Qi <yao.qi@linaro.org>
1020
1021 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1022
1023 2017-11-22 Yao Qi <yao.qi@linaro.org>
1024
1025 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1026 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1027
1028 2017-11-21 Jerome Guitton <guitton@adacore.com>
1029
1030 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1031 with event ptid from the lower layer before doing the
1032 ravenscar-specific update.
1033
1034 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1035
1036 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1037 the ptid's TID is nonzero.
1038
1039 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1040
1041 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1042 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1043 Make non-static. Change return type to char *. Adjust code
1044 accordingly. Rewrite the function's documentation.
1045 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1046 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1047 we have enough debugging information in the runtime to support
1048 Ada task debugging before we enable the ravenscar-thread layer.
1049
1050 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1051
1052 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1053 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1054 * ravenscar-thread.c: Add into comment.
1055 (base_magic_null_ptid): Delete.
1056 (base_ptid): Change documentation.
1057 (ravenscar_active_task): Renames ravenscar_running_thread.
1058 All callers updated throughout.
1059 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1060 (ravenscar_task_is_currently_active): Likewise.
1061 (get_base_thread_from_ravenscar_task): Ditto.
1062 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1063 (ravenscar_runtime_initialized): Likewise.
1064 (get_running_thread_id): Add new parameter "cpu". Adjust
1065 implementation to handle this new parameter.
1066 (ravenscar_fetch_registers): Small adjustment to use
1067 is_ravenscar_task and ravenscar_task_is_currently_active in
1068 order to decide whether to use the target beneath or this
1069 module's arch_ops.
1070 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1071 (ravenscar_stopped_by_sw_breakpoint): Use
1072 get_base_thread_from_ravenscar_task to get the underlying
1073 thread, rather than using base_ptid.
1074 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1075 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1076 Likewise.
1077 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1078
1079 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1080
1081 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1082 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1083 (get_tcb_types_info): Set fieldnos.base_cpu.
1084 (read_atcb): Set task_info->base_cpu.
1085 (info_task): Print "Base CPU" info if set by runtime.
1086
1087 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1088
1089 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1090 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1091 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1092 New functions.
1093 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1094 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1095 to_stopped_data_address and to_core_of_thread fields of
1096 ravenscar_ops.
1097
1098 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1099
1100 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1101 (struct gdbarch_tdep): New member long_double_abi.
1102 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1103 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1104 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1105 format depending on long_double_abi tdep member.
1106 (ppc_floatformat_for_type): Handle __ibm128 type.
1107
1108 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1109
1110 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1111
1112 2017-11-21 Pedro Alves <palves@redhat.com>
1113
1114 * dwarf2read.c (mapped_index::find_name_components_bounds)
1115 <completion mode, upper bound>: Use std::lower_bound instead of
1116 std::upper_bound.
1117 (test_mapped_index_find_name_component_bounds): Remove incorrect
1118 "t1_fund" from expected symbols.
1119
1120 2017-11-21 Pedro Alves <palves@redhat.com>
1121
1122 * dwarf2read.c (mapped_index::name_components_casing): New field.
1123 (mapped_index) <build_name_components,
1124 find_name_components_bounds): Declare new methods.
1125 (mapped_index::find_name_components_bounds)
1126 (mapped_index::build_name_components): New methods, factored out
1127 from dw2_expand_symtabs_matching_symbol.
1128 (check_find_bounds_finds)
1129 (test_mapped_index_find_name_component_bounds): New.
1130 (run_test): Rename to ...
1131 (test_dw2_expand_symtabs_matching_symbol): ... this.
1132 (run_test): Reimplement.
1133
1134 2017-11-21 Pedro Alves <palves@redhat.com>
1135
1136 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1137 (symbol_end): Use cp_ident_is_alnum.
1138 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1139 * dwarf2read.c (make_sort_after_prefix_name): New function.
1140 (dw2_expand_symtabs_matching_symbol): Use it.
1141 (test_symbols): Add more symbols.
1142 (run_test): Add tests.
1143
1144 2017-11-17 Tom Tromey <tom@tromey.com>
1145
1146 * symtab.h (enum symbol_subclass_kind): New.
1147 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1148 Remove.
1149 <subclass>: New member.
1150 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1151 * rust-lang.c (rust_get_trait_object_pointer): Update.
1152 * dwarf2read.c (read_func_scope): Update.
1153 (read_variable): Update.
1154
1155 2017-11-17 Tom Tromey <tom@tromey.com>
1156
1157 * dwarf2read.c (read_func_scope): Update.
1158 * symtab.h (struct template_symbol): Derive from symbol.
1159 <base>: Remove.
1160
1161 2017-11-17 Tom Tromey <tom@tromey.com>
1162
1163 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1164 (struct rust_vtable_symbol): New.
1165 (find_symbol_at_address): Declare.
1166 * symtab.c (find_symbol_at_address): New function.
1167 * symfile.h (struct quick_symbol_functions)
1168 <find_compunit_symtab_by_address>: New member.
1169 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1170 function.
1171 (debug_sym_quick_functions): Link to
1172 debug_qf_find_compunit_symtab_by_address.
1173 * rust-lang.c (rust_get_trait_object_pointer): New function.
1174 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1175 rust_get_trait_object_pointer.
1176 * psymtab.c (psym_relocate): Clear psymbol_map.
1177 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1178 functions.
1179 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1180 * objfiles.h (struct objfile) <psymbol_map>: New member.
1181 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1182 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1183 (rust_containing_type, read_variable): New functions.
1184
1185 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1186
1187 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1188
1189 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1190
1191 * common/filestuff.c: Include <algorithm>.
1192 (open_fds): Change type to std::vector<int>.
1193 (do_mark_open_fd): Adjust.
1194 (unmark_fd_no_cloexec): Adjust.
1195 (do_close): Adjust.
1196
1197 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1198
1199 * breakpoint.c (output_thread_groups): Take an std::vector.
1200 (print_one_breakpoint_location): Adjust.
1201
1202 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1203
1204 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1205 (ada_evaluate_subexp_for_cast): New function.
1206 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1207 ada_evaluate_subexp_for_cast.
1208 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1209 eval_skip_value.
1210 * eval.c (evaluate_var_value): Make non-static.
1211 (evaluate_var_msym_value, eval_skip_value): Likewise.
1212 * value.h (evaluate_var_value, evaluate_var_msym_value)
1213 (eval_skip_value): Declare.
1214
1215 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1216
1217 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1218 Update all callers.
1219
1220 2017-11-16 Pedro Alves <palves@redhat.com>
1221
1222 * python/py-unwind.c (pyuw_sniffer): Translate
1223 PyExc_KeyboardInterrupt to a GDB Quit exception.
1224
1225 2017-11-16 Pedro Alves <palves@redhat.com>
1226
1227 * infrun.c (resume_cleanups): Delete.
1228 (resume): No longer install a resume_cleanups cleanup nor call
1229 QUIT.
1230 (proceed): Pass the terminal to the inferior.
1231 (keep_going_pass_signal): No longer install a resume_cleanups
1232 cleanup.
1233
1234 2017-11-16 Pedro Alves <palves@redhat.com>
1235
1236 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1237 if the prompt is blocked.
1238
1239 2017-11-16 Pedro Alves <palves@redhat.com>
1240
1241 * breakpoint.c (insert_bp_location): Replace bp_err and
1242 bp_err_message locals by a gdb_exception local.
1243
1244 2017-11-16 Pedro Alves <palves@redhat.com>
1245
1246 * inflow.c (scoped_ignore_sigttou): New class.
1247 (child_terminal_ours_1, new_tty): Use it.
1248
1249 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1250
1251 * target-float.c (decimal_from_number): Add byte_order argument and
1252 call match_endianness. Error if unknown floating-point type.
1253 (decimal_to_number): Add byte_order argument and call match_endianness.
1254 (decimal_from_longest): Update call. Do not call match_endianness.
1255 (decimal_from_ulongest): Likewise.
1256 (decimal_binop): Likewise.
1257 (decimal_is_zero): Likewise.
1258 (decimal_compare): Likewise.
1259 (decimal_convert): Likewise.
1260
1261 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1262
1263 * python/python.c (gdbpy_rbreak): New function.
1264 * NEWS: Document Python rbreak feature.
1265
1266 2017-11-16 Yao Qi <yao.qi@linaro.org>
1267
1268 * features/tic6x-c62x.xml: Remove.
1269 * features/tic6x-c64x.xml: Remove.
1270 * features/tic6x-c64xp.xml: Remove.
1271
1272 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1273
1274 * symtab.h: Include <array>.
1275
1276 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1277
1278 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1279 (bsd_kvm_proc_cmd): Likewise.
1280
1281 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1282
1283 * tui/tui-win.c (window_name_completer): Replace VEC with
1284 std::vector.
1285
1286 2017-11-15 Andrew Cagney <cagney@gnu.org>
1287
1288 * MAINTAINERS: Remove no-longer applicable entries.
1289
1290 2017-11-15 Andrew Cagney <cagney@gnu.org>
1291
1292 * MAINTAINERS: Move self to Past Maintainers.
1293
1294 2017-11-15 Yao Qi <yao.qi@linaro.org>
1295
1296 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1297 * features/nios2-linux.c: Remove.
1298 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1299 initialize_tdesc_nios2_linux.
1300
1301 2017-11-15 Yao Qi <yao.qi@linaro.org>
1302
1303 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1304 M68HC11_LAST_HARD_REG + 1.
1305
1306 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1307
1308 PR gdb/22388
1309 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1310 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1311 Return TARGET_XFER_EOF if size of returned data is 0.
1312
1313 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1314
1315 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1316 memory-map-selftests.c.
1317 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1318 * memory-map.c (memory_map_start_memory): Fix computation of hi
1319 address.
1320 * unittests/memory-map-selftests.c: New file.
1321
1322 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1323
1324 * ada-lang.c: Fix some typos in the general command documenting
1325 how Ada expressions are being evaluated and how their result
1326 is printed.
1327
1328 2017-11-09 Tom Tromey <tom@tromey.com>
1329
1330 * psymtab.c (psymbol_hash): Do not hash string contents.
1331 (psymbol_compare): Add comment.
1332
1333 2017-11-09 Tom Tromey <tom@tromey.com>
1334
1335 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1336
1337 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1338
1339 * ada-exp.y (write_var_from_sym): Remove parameter
1340 "orig_left_context". Update all callers.
1341
1342 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * tracepoint.h (class collection_list) <stringify>: Return
1345 std::vector<std::string>.
1346 (encode_actions_rsp): Change parameters to
1347 std::vector<std::string> *.
1348 * tracepoint.c (collection_list::stringify): Return
1349 std::vector<std::string> and adjust accordingly.
1350 (encode_actions_rsp): Changee parameters to
1351 std::vector<std::string> and adjust accordingly.
1352 * remote.c (free_actions_list),
1353 free_actions_list_cleanup_wrapper): Remove.
1354 (remote_download_tracepoint): Adjust to std::vector.
1355
1356 2017-11-08 Tom Tromey <tom@tromey.com>
1357
1358 * dwarf2read.c (symbolp): Remove typedef.
1359 (read_func_scope): Use std::vector.
1360 (process_structure_scope): Use std::vector.
1361
1362 2017-11-08 Pedro Alves <palves@redhat.com>
1363
1364 * ada-lang.c (ada_make_symbol_completion_list): Use
1365 completion_skip_symbol.
1366 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1367 (symbol_is_function_or_method(symbol*)): New.
1368 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1369 completion_skip_symbol.
1370 (default_collect_symbol_completion_matches_break_on): Use
1371 completion_skip_symbol. Pass down mode.
1372 (collect_file_symbol_completion_matches): Pass down mode.
1373 * symtab.h (symbol_is_function_or_method): New declarations.
1374 (completion_skip_symbol): New template function.
1375
1376 2017-11-08 Pedro Alves <palves@redhat.com>
1377
1378 * linespec.c (iterate_over_all_matching_symtabs): Add
1379 search_domain parameter. Pass it down to expand_symtabs_matching.
1380 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1381 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1382 search_domain.
1383 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1384 Pass it down.
1385 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1386 symbols.
1387 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1388 it down.
1389
1390 2017-11-08 Pedro Alves <palves@redhat.com>
1391
1392 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1393 text_len locals and don't pass them down.
1394 * symtab.c (completion_list_add_name): Remove
1395 sym_text/sym_text_len parameters and adjust.
1396 (completion_list_add_symbol, completion_list_add_msymbol)
1397 (completion_list_objc_symbol, completion_list_add_fields)
1398 (add_symtab_completions): Likewise.
1399 (default_collect_symbol_completion_matches_break_on)
1400 (collect_file_symbol_completion_matches): Remove sym_text_len
1401 local and don't pass it down.
1402 * symtab.h (completion_list_add_name): Remove
1403 sym_text/sym_text_len parameters.
1404
1405 2017-11-08 Pedro Alves <palves@redhat.com>
1406
1407 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1408 unittests/lookup_name_info-selftests.c.
1409 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1410 * cp-support.c: Include "selftest.h".
1411 (cp_remove_params_1): Rename from cp_remove_params. Add
1412 'require_param' parameter, and handle it.
1413 (cp_remove_params): Reimplement.
1414 (cp_remove_params_if_any): New.
1415 (selftests::quote): New.
1416 (selftests::check_remove_params): New.
1417 (selftests::test_cp_remove_params): New.
1418 (_initialize_cp_support): Install
1419 selftests::test_cp_remove_params.
1420 * cp-support.h (cp_remove_params_if_any): Declare.
1421 * dwarf2read.c :Include "selftest.h".
1422 (dw2_expand_symtabs_matching_symbol): Use
1423 lookup_name_info::make_ignore_params.
1424 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1425 (selftests::dw2_expand_symtabs_matching::string_or_null)
1426 (selftests::dw2_expand_symtabs_matching::check_match)
1427 (selftests::dw2_expand_symtabs_matching::test_symbols)
1428 (selftests::dw2_expand_symtabs_matching::run_test): New.
1429 (_initialize_dwarf2_read): Register
1430 selftests::dw2_expand_symtabs_matching::run_test.
1431 * psymtab.c (psym_expand_symtabs_matching): Use
1432 lookup_name_info::make_ignore_params.
1433 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1434 If the lookup name wants to ignore parameters, strip them.
1435 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1436 code handling '('.
1437 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1438 (default_collect_symbol_completion_matches_break_on): Don't try to
1439 strip parameters.
1440 * symtab.h (lookup_name_info::lookup_name_info): Add
1441 'ignore_parameters' parameter.
1442 (lookup_name_info::ignore_parameters)
1443 (lookup_name_info::make_ignore_params): New methods.
1444 (lookup_name_info::m_ignore_parameters): New field.
1445 * unittests/lookup_name_info-selftests.c: New file.
1446
1447 2017-11-08 Pedro Alves <palves@redhat.com>
1448
1449 * dwarf2read.c (dw2_expand_marked_cus)
1450 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1451 (dw2_expand_symtabs_matching): Move further below.
1452 (dw2_expand_marked_cus): Reindent.
1453
1454 2017-11-08 Pedro Alves <palves@redhat.com>
1455
1456 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1457 (struct name_component): New.
1458 (mapped_index::name_components): New field.
1459 (mapped_index::symbol_name_at): New method.
1460 (dwarf2_read_index): Call mapped_index ctor.
1461 (dw2_map_matching_symbols): Add comment about name_components
1462 table.
1463 (dw2_expand_symtabs_matching): Factor part to...
1464 (dw2_expand_symtabs_matching_symbol): ... this new function.
1465 Build name components table, and lookup symbols in it before
1466 calling the name matcher.
1467 (dw2_expand_marked_cus): New, factored out from
1468 dw2_expand_symtabs_matching.
1469 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1470
1471 2017-11-08 Pedro Alves <palves@redhat.com>
1472
1473 * ada-lang.c (ada_encode): Rename to ..
1474 (ada_encode_1): ... this. Add throw_errors parameter and handle
1475 it.
1476 (ada_encode): Reimplement.
1477 (match_name): Delete, folded into full_name.
1478 (resolve_subexp): No longer pass the encoded name to
1479 ada_lookup_symbol_list.
1480 (should_use_wild_match): Delete.
1481 (name_match_type_from_name): New.
1482 (ada_lookup_simple_minsym): Use lookup_name_info and the
1483 language's symbol_name_matcher_ftype.
1484 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1485 (ada_add_block_renamings): Adjust to use lookup_name_info.
1486 (ada_lookup_name): New.
1487 (add_nonlocal_symbols, ada_add_all_symbols)
1488 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1489 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1490 (ada_name_for_lookup): Delete.
1491 (ada_lookup_encoded_symbol): Construct a verbatim name.
1492 (wild_match): Reverse sense of return type. Use bool.
1493 (full_match): Reverse sense of return type. Inline bits of old
1494 match_name here.
1495 (ada_add_block_symbols): Adjust to use lookup_name_info.
1496 (symbol_completion_match): Delete, folded into...
1497 (ada_lookup_name_info::matches): ... .this new method.
1498 (symbol_completion_add): Delete.
1499 (ada_collect_symbol_completion_matches): Add name_match_type
1500 parameter. Adjust to use lookup_name_info and
1501 completion_list_add_name.
1502 (get_var_value, ada_add_global_exceptions): Adjust to use
1503 lookup_name_info.
1504 (ada_get_symbol_name_cmp): Delete.
1505 (do_wild_match, do_full_match): New functions.
1506 (ada_lookup_name_info::ada_lookup_name_info): New method.
1507 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1508 functions.
1509 (ada_language_defn): Install ada_get_symbol_name_matcher.
1510 * ada-lex.l (processId): If name starts with '<', copy it
1511 verbatim.
1512 * block.c (block_iter_match_step, block_iter_match_first)
1513 (block_iter_match_next, block_lookup_symbol)
1514 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1515 lookup_name_info.
1516 * block.h (block_iter_match_first, block_iter_match_next)
1517 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1518 * c-lang.c (c_language_defn, cplus_language_defn)
1519 (asm_language_defn, minimal_language_defn): Adjust comments to
1520 refer to la_get_symbol_name_matcher.
1521 * completer.c (complete_files_symbols)
1522 (collect_explicit_location_matches, symbol_completer): Pass a
1523 symbol_name_match_type down.
1524 * completer.h (class completion_match, completion_match_result):
1525 New classes.
1526 (completion_tracker::reset_completion_match_result): New method.
1527 (completion_tracker::m_completion_match_result): New field.
1528 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1529 lookup_name_info.
1530 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1531 functions.
1532 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1533 * d-lang.c: Adjust comments to refer to
1534 la_get_symbol_name_matcher.
1535 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1536 Adjust to use lookup_name_info.
1537 (dict_iter_match_first, dict_iter_match_next)
1538 (iter_match_first_hashed, iter_match_next_hashed)
1539 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1540 with a lookup_name_info.
1541 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1542 Likewise.
1543 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1544 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1545 (gdb_index_symbol_name_matcher): New class.
1546 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1547 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1548 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1549 with a symbol_name_match_type.
1550 (f_language_defn): Adjust comments to refer to
1551 la_get_symbol_name_matcher.
1552 * go-lang.c (go_language_defn): Adjust comments to refer to
1553 la_get_symbol_name_matcher.
1554 * language.c (default_symbol_name_matcher)
1555 (language_get_symbol_name_matcher): New functions.
1556 (unknown_language_defn, auto_language_defn): Adjust comments to
1557 refer to la_get_symbol_name_matcher.
1558 * language.h (symbol_name_cmp_ftype): Delete.
1559 (language_defn) <la_collect_symbol_completion_matches>: Add match
1560 type parameter.
1561 <la_get_symbol_name_cmp>: Delete field.
1562 <la_get_symbol_name_matcher>: New field.
1563 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1564 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1565 Declare.
1566 * linespec.c (iterate_over_all_matching_symtabs)
1567 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1568 (find_methods): Add language parameter, and use lookup_name_info
1569 and the language's symbol_name_matcher_ftype.
1570 (linespec_complete_function): Adjust.
1571 (lookup_prefix_sym): Use lookup_name_info.
1572 (add_all_symbol_names_from_pspace): Adjust.
1573 (find_superclass_methods): Add language parameter and pass it
1574 down.
1575 (find_method): Pass symbol language down.
1576 (find_linespec_symbols): Don't demangle or Ada encode here.
1577 (search_minsyms_for_name): Add lookup_name_info parameter.
1578 (add_matching_symbols_to_info): Add name_match_type parameter.
1579 Use lookup_name_info.
1580 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1581 la_get_symbol_name_matcher.
1582 * minsyms.c: Include <algorithm>.
1583 (add_minsym_to_demangled_hash_table): Remove table parameter and
1584 add objfile parameter. Use search_name_hash, and add language to
1585 demangled languages vector.
1586 (struct found_minimal_symbols): New struct.
1587 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1588 New functions.
1589 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1590 input names here. Use lookup_name_info instead. Lookup up
1591 demangled names once for each language in the demangled names
1592 vector.
1593 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1594 demangled names once for each language in the demangled names
1595 vector.
1596 (build_minimal_symbol_hash_tables): Adjust.
1597 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1598 lookup_name_info.
1599 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1600 la_get_symbol_name_matcher.
1601 * objfiles.h: Include <vector>.
1602 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1603 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1604 la_get_symbol_name_matcher.
1605 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1606 la_get_symbol_name_matcher.
1607 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1608 (match_partial_symbol): Use symbol_name_match_type,
1609 lookup_name_info and psymbol_name_matches.
1610 (lookup_partial_symbol): Use lookup_name_info.
1611 (map_block): Use symbol_name_match_type and lookup_name_info.
1612 (psym_map_matching_symbols): Use symbol_name_match_type.
1613 (psymbol_name_matches): New.
1614 (recursively_search_psymtabs): Use lookup_name_info and
1615 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1616 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1617 'kind' parameter to 'domain'.
1618 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1619 la_get_symbol_name_matcher.
1620 * symfile-debug.c (debug_qf_map_matching_symbols)
1621 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1622 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1623 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1624 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1625 Adjust to use symbol_name_match_type.
1626 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1627 (expand_symtabs_matching): Adjust to use lookup_name_info.
1628 * symmisc.c (maintenance_expand_symtabs): Use
1629 lookup_name_info::match_any ().
1630 * symtab.c (symbol_matches_search_name): New.
1631 (eq_symbol_entry): Adjust to use lookup_name_info and the
1632 language's matcher.
1633 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1634 (lookup_name_info::match_any): New.
1635 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1636 (compare_symbol_name): Add language, lookup_name_info and
1637 completion_match_result parameters, and use them.
1638 (completion_list_add_name): Make extern. Add language and
1639 lookup_name_info parameters. Use them.
1640 (completion_list_add_symbol, completion_list_add_msymbol)
1641 (completion_list_objc_symbol): Add lookup_name_info parameters and
1642 adjust. Pass down language.
1643 (completion_list_add_fields): Add lookup_name_info parameters and
1644 adjust. Pass down language.
1645 (add_symtab_completions): Add lookup_name_info parameters and
1646 adjust.
1647 (default_collect_symbol_completion_matches_break_on): Add
1648 name_match_type parameter, and use it. Use lookup_name_info.
1649 (default_collect_symbol_completion_matches)
1650 (collect_symbol_completion_matches): Add name_match_type
1651 parameter, and pass it down.
1652 (collect_symbol_completion_matches_type): Adjust.
1653 (collect_file_symbol_completion_matches): Add name_match_type
1654 parameter, and use lookup_name_info.
1655 * symtab.h: Include <string> and "common/gdb_optional.h".
1656 (enum class symbol_name_match_type): New.
1657 (class ada_lookup_name_info): New.
1658 (struct demangle_for_lookup_info): New.
1659 (class lookup_name_info): New.
1660 (symbol_name_matcher_ftype): New.
1661 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1662 (symbol_matches_search_name): Declare.
1663 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1664 (default_collect_symbol_completion_matches)
1665 (collect_symbol_completion_matches)
1666 (collect_file_symbol_completion_matches): Add name_match_type
1667 parameter.
1668 (iterate_over_symbols): Use lookup_name_info.
1669 (completion_list_add_name): Declare.
1670 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1671 (strncmp_iw_with_mode): Now extern.
1672 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1673 (strncmp_iw_with_mode): Declare.
1674
1675 2017-11-08 Keith Seitz <keiths@redhat.com>
1676 Pedro Alves <palves@redhat.com>
1677
1678 * ada-lang.c (ada_language_defn): Install
1679 default_search_name_hash.
1680 * buildsym.c (struct buildsym_compunit): <language>: New field.
1681 (finish_block_internal): Pass language when creating dictionaries.
1682 (start_buildsym_compunit, start_symtab): New language parameters.
1683 Use them.
1684 (restart_symtab): Pass down compilation unit's language.
1685 * buildsym.h (enum language): Forward declare.
1686 (start_symtab): New 'language' parameter.
1687 * c-lang.c (c_language_defn, cplus_language_defn)
1688 (asm_language_defn, minimal_language_defn): Install
1689 default_search_name_hash.
1690 * coffread.c (coff_start_symtab): Adjust.
1691 * d-lang.c (d_language_defn): Install default_search_name_hash.
1692 * dbxread.c (struct symloc): Add 'pst_language' field.
1693 (PST_LANGUAGE): Define.
1694 (start_psymtab, read_ofile_symtab): Use it.
1695 (process_one_symbol): New 'language' parameter. Pass it down.
1696 * dictionary.c (struct dictionary) <language>: New field.
1697 (DICT_LANGUAGE): Define.
1698 (dict_create_hashed, dict_create_hashed_expandable)
1699 (dict_create_linear, dict_create_linear_expandable): New parameter
1700 'language'. Set the dictionary's language.
1701 (iter_match_first_hashed): Adjust to rename.
1702 (insert_symbol_hashed): Assert we don't see mismatching
1703 languages. Adjust to rename.
1704 (dict_hash): Rename to ...
1705 (default_search_name_hash): ... this and make extern.
1706 * dictionary.h (struct language_defn): Forward declare.
1707 (dict_create_hashed): New parameter 'language'.
1708 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1709 * f-lang.c (f_language_defn): Install default_search_name_hash.
1710 * go-lang.c (go_language_defn): Install default_search_name_hash.
1711 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1712 creation.
1713 * language.c (unknown_language_defn, auto_language_defn):
1714 * language.h (language_defn::la_search_name_hash): New field.
1715 (default_search_name_hash): Declare.
1716 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1717 * mdebugread.c (new_block): New parameter 'language'.
1718 * mdebugread.c (parse_symbol): Pass symbol language to block
1719 allocation.
1720 (psymtab_to_symtab_1): Pass down language.
1721 (new_symtab): Pass compunit's language to block allocation.
1722 * objc-lang.c (objc_language_defn): Install
1723 default_search_name_hash.
1724 * opencl-lang.c (opencl_language_defn):
1725 * p-lang.c (pascal_language_defn): Install
1726 default_search_name_hash.
1727 * rust-lang.c (rust_language_defn): Install
1728 default_search_name_hash.
1729 * stabsread.h (enum language): Forward declare.
1730 (process_one_symbol): Add 'language' parameter.
1731 * symtab.c (search_name_hash): New function.
1732 * symtab.h (search_name_hash): Declare.
1733 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1734
1735 2017-11-08 Pedro Alves <palves@redhat.com>
1736
1737 * cp-name-parser.y (main): Don't initialize extra_chars.
1738
1739 2017-11-07 Tom Tromey <tom@tromey.com>
1740
1741 * event-top.h (command_handler): Constify.
1742 * record-full.c (cmd_record_full_start): Update.
1743 * thread.c (thread_apply_all_command): Update.
1744 * printcmd.c (eval_command): Update.
1745 * mi/mi-main.c (mi_execute_cli_command): Update.
1746 (mi_execute_async_cli_command): Update.
1747 * tui/tui-stack.c (tui_update_command): Update.
1748 * cli/cli-interp.c (safe_execute_command): Constify.
1749 * record.c (record_start): Update.
1750 (record_start, record_stop, cmd_record_start): Update.
1751 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1752 (cmd_record_btrace_pt_start): Update.
1753 (cmd_record_btrace_start): Update.
1754 (cmd_record_btrace_start): Update.
1755 * reverse.c (exec_reverse_once): Update.
1756 * python/python.c (execute_gdb_command): Don't copy the command.
1757 * event-top.c (command_line_handler): Update.
1758 (command_handler): Constify.
1759 * defs.h (deprecated_call_command_hook): Constify.
1760 * cli/cli-script.h (execute_user_command): Constify.
1761 * cli/cli-script.c (execute_user_command): Constify.
1762 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1763 (enum command_control_type): Update.
1764 * main.c (catch_command_errors): Remove non-const overload.
1765 (catch_command_errors_ftype): Remove.
1766 * python/py-cmd.c (cmdpy_function): Constify.
1767 * guile/scm-cmd.c (cmdscm_function): Constify.
1768 * cli/cli-dump.c (call_dump_func): Constify.
1769 * cli/cli-decode.c (do_const_cfunc): Constify.
1770 (do_sfunc): Constify.
1771 (cmd_func): Constify.
1772 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1773 * top.h (execute_command): Constify.
1774 * top.c (execute_command): Constify.
1775 (execute_command_to_string): Constify.
1776 (deprecated_call_command_hook): Constify.
1777 * command.h (cmd_func): Constify.
1778 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1779
1780 2017-11-07 Tom Tromey <tom@tromey.com>
1781
1782 * ada-lang.c (catch_ada_exception_command): Constify.
1783 (catch_assert_command): Constify.
1784 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1785 (catch_rethrow_command): Constify.
1786 (catch_exception_command_1): Constify.
1787 * breakpoint.h (add_catch_command): Constify.
1788 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1789 (catch_syscall_split_args): Constify.
1790 * break-catch-sig.c (catch_signal_command): Constify.
1791 (catch_signal_split_args): Constify.
1792 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1793 cmd_const_sfunc_ftype.
1794 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1795 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1796 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1797 (add_setshow_string_cmd, struct cmd_list_element)
1798 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1799 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1800 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1801 Constify.
1802 (set_cmd_sfunc): Constify.
1803 (empty_sfunc): Constify.
1804 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1805 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1806 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1807 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1808 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1809 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1810 Constify.
1811 (set_cmd_sfunc): Constify.
1812 (cmd_sfunc_ftype): Remove.
1813 * compile/compile.c (set_compile_args): Constify.
1814 * infrun.c (set_disable_randomization): Constify.
1815 * infcmd.c (set_args_command, set_cwd_command): Constify.
1816 * breakpoint.c (set_condition_evaluation_mode): Constify.
1817 (add_catch_command): Constify.
1818 (catch_fork_command_1, catch_exec_command_1)
1819 (catch_load_command_1, catch_unload_command_1): Constify.
1820 (catch_load_or_unload): Constify.
1821 * guile/scm-param.c (pascm_set_func): Constify.
1822 (add_setshow_generic): Constify.
1823 * python/py-param.c (get_set_value): Constify.
1824 * top.h (set_verbose): Constify.
1825 * tui/tui-win.c (tui_set_var_cmd): Constify.
1826 * mi/mi-main.c (set_mi_async_command): Constify.
1827 * cli/cli-logging.c (set_logging_overwrite)
1828 (set_logging_redirect): Constify.
1829 * value.c (set_max_value_size): Constify.
1830 * valprint.c (set_input_radix, set_output_radix): Constify.
1831 * utils.c (set_width_command, set_height_command): Constify.
1832 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1833 * tracepoint.c (set_disconnected_tracing)
1834 (set_circular_trace_buffer, set_trace_buffer_size)
1835 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1836 * top.c (set_history_size_command, set_verbose, set_editing)
1837 (set_gdb_datadir, set_history_filename): Constify.
1838 * target.c (set_targetdebug, maint_set_target_async_command)
1839 (maint_set_target_non_stop_command, set_target_permissions)
1840 (set_write_memory_permission): Constify.
1841 (open_target): Constify.
1842 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1843 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1844 * symtab.c (set_symbol_cache_size_handler): Constify.
1845 * symfile.c (set_ext_lang_command): Constify.
1846 * symfile-debug.c (set_debug_symfile): Constify.
1847 * source.c (set_directories_command): Constify.
1848 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1849 * serial.c (set_parity): Constify.
1850 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1851 * remote.c (set_remote_exec_file, set_remotebreak)
1852 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1853 * record.c (set_record_insn_history_size)
1854 (set_record_call_history_size): Constify.
1855 * record-full.c (set_record_full_insn_max_num): Constify.
1856 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1857 * osabi.c (set_osabi): Constify.
1858 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1859 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1860 * maint.c (maintenance_set_profile_cmd): Constify.
1861 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1862 * language.c (set_language_command, set_range_command)
1863 (set_case_command): Constify.
1864 * infrun.c (set_non_stop, set_observer_mode)
1865 (set_stop_on_solib_events, set_schedlock_func)
1866 (set_exec_direction_func): Constify.
1867 * infcmd.c (set_inferior_tty_command): Constify.
1868 * disasm.c (set_disassembler_options_sfunc): Constify.
1869 * demangle.c (set_demangling_command): Constify.
1870 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1871 * cris-tdep.c (set_cris_version, set_cris_mode)
1872 (set_cris_dwarf2_cfi): Constify.
1873 * corefile.c (set_gnutarget_command): Constify.
1874 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1875 (set_target_wide_charset_sfunc): Constify.
1876 * breakpoint.c (update_dprintf_commands): Constify.
1877 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1878 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1879 (set_disassembly_style_sfunc): Constify.
1880 * arch-utils.c (set_endian, set_architecture): Constify.
1881 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1882 * agent.c (set_can_use_agent): Constify.
1883
1884 2017-11-07 Tom Tromey <tom@tromey.com>
1885
1886 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1887 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1888 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1889 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1890 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1891 (parse_int_arg, show_thread_default_detach_sc_cmd)
1892 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1893 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1894 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1895 (show_task_pause_cmd, set_task_detach_sc_cmd)
1896 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1897 (set_noninvasive_cmd, set_thread_pause_cmd)
1898 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1899 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1900 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1901 * windows-nat.c (display_selectors): Constify.
1902 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1903 non-const "cfunc".
1904 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1905 (cmd_cfunc_eq): Likewise.
1906 (struct cmd_list_element): Likewise.
1907 (do_cfunc): Remove.
1908 (cli_user_command_p): Update.
1909 * command.h (add_cmd): Remove non-const overload.
1910 (cmd_cfunc_ftype): Remove typedef.
1911 (cmd_cfunc_eq): Remove non-const overload.
1912 * value.c (show_values): Constify.
1913 * thread.c (thread_apply_all_command): Constify.
1914 * symfile.c (load_command): Constify.
1915 * source.c (directory_command): Constify.
1916 * maint.c (maintenance_internal_error)
1917 (maintenance_demangler_warning, maintenance_space_display)
1918 (maintenance_print_architecture, maintenance_translate_address)
1919 (maintenance_info_selftests, maintenance_internal_warning):
1920 Constify.
1921 * breakpoint.c (disable_trace_command, enable_trace_command):
1922 Constify.
1923 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1924 Constify.
1925 (add_auto_load_safe_path): Constify.
1926 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1927 * top.h (show_commands): Constify.
1928 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1929 * sparc64-tdep.c (adi_examine_command): Constify.
1930 (adi_assign_command): Constify.
1931
1932 2017-11-07 Tom Tromey <tom@tromey.com>
1933
1934 * frame.h (info_locals_command, info_args_command): Constify.
1935 * auto-load.h (auto_load_info_scripts): Constify.
1936 * inferior.h (registers_info): Constify.
1937 * copying.c: Rebuild.
1938 * copying.awk: Constify generated commands.
1939 * auto-load.c (auto_load_info_scripts)
1940 (info_auto_load_gdb_scripts): Constify.
1941 * cli/cli-decode.c (struct cmd_list_element): Take a
1942 cmd_const_cfunc_ftype.
1943 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1944 * tui/tui-win.c (tui_all_windows_info): Constify.
1945 * python/py-auto-load.c (info_auto_load_python_scripts):
1946 Constify.
1947 * cli/cli-cmds.c (show_command): Remove non-const overload.
1948 * tracepoint.c (info_tvariables_command, info_scope_command):
1949 Constify.
1950 (info_static_tracepoint_markers_command): Constify.
1951 * thread.c (info_threads_command): Constify.
1952 (print_thread_info_1): Constify.
1953 * target.c (info_target_command): Constify.
1954 * symtab.c (info_sources_command, info_functions_command)
1955 (info_types_command): Constify.
1956 (info_variables_command): Remove non-const overload.
1957 * symfile.c (info_ext_lang_command): Constify.
1958 * stack.c (info_frame_command, info_locals_command)
1959 (info_args_command): Constify.
1960 (backtrace_command): Remove non-const overload.
1961 * source.c (info_source_command, info_line_command): Constify.
1962 * solib.c (info_sharedlibrary_command): Constify.
1963 * skip.c (info_skip_command): Constify.
1964 * ser-go32.c (info_serial_command): Constify.
1965 * reverse.c (info_bookmarks_command): Constify.
1966 * printcmd.c (info_symbol_command, info_address_command)
1967 (info_display_command): Constify.
1968 * osdata.c (info_osdata_command): Constify.
1969 * objc-lang.c (info_selectors_command, info_classes_command):
1970 Constify.
1971 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1972 * memattr.c (info_mem_command): Constify.
1973 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1974 * linux-fork.c (info_checkpoints_command): Constify.
1975 * infrun.c (info_signals_command): Constify.
1976 * inflow.c (info_terminal_command): Constify.
1977 * inferior.c (info_inferiors_command): Constify.
1978 (print_inferior): Constify.
1979 * infcmd.c (info_program_command, info_all_registers_command)
1980 (info_registers_command, info_vector_command)
1981 (info_float_command): Constify.
1982 (registers_info): Constify.
1983 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1984 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1985 Constify.
1986 * f-valprint.c (info_common_command): Constify.
1987 * dcache.c (info_dcache_command): Constify.
1988 (dcache_info_1): Constify.
1989 * darwin-nat-info.c (info_mach_tasks_command)
1990 (info_mach_task_command, info_mach_ports_command)
1991 (info_mach_port_command, info_mach_threads_command)
1992 (info_mach_thread_command, info_mach_regions_command)
1993 (info_mach_regions_recurse_command, info_mach_region_command)
1994 (info_mach_exceptions_command): Constify.
1995 (get_task_from_args): Constify.
1996 * cp-support.c (info_vtbl_command): Constify.
1997 * breakpoint.c (info_watchpoints_command)
1998 (info_tracepoints_command): Constify.
1999 (info_breakpoints_command): Remove non-const overload.
2000 * avr-tdep.c (avr_io_reg_read_command): Constify.
2001 * auxv.c (info_auxv_command): Constify.
2002 * ada-tasks.c (info_tasks_command): Constify.
2003 (info_task): Constify.
2004 * ada-lang.c (info_exceptions_command): Constify.
2005
2006 2017-11-07 Tom Tromey <tom@tromey.com>
2007
2008 * solib.h (no_shared_libraries): Constify.
2009 * frame.h (return_command): Constify.
2010 * cli/cli-cmds.h (quit_command): Constify.
2011 * top.h (quit_command, execute_command): Constify.
2012 * target.h (flash_erase_command): Constify.
2013 * inferior.h (set_inferior_args, attach_command): Constify.
2014 * tracepoint.h (start_tracing, stop_tracing): Constify.
2015 * breakpoint.h (break_command, tbreak_command)
2016 (hbreak_command_wrapper, thbreak_command_wrapper)
2017 (rbreak_command_wrapper, watch_command_wrapper)
2018 (awatch_command_wrapper, rwatch_command_wrapper)
2019 (get_tracepoint_by_number): Constify.
2020 * symtab.c (info_variables_command, rbreak_command)
2021 (symtab_symbol_info): Constify.
2022 (info_variables_command): Add non-const overload.
2023 * top.c (dont_repeat_command): Constify.
2024 * breakpoint.c (ignore_command, commands_command)
2025 (condition_command, tbreak_command, hbreak_command)
2026 (thbreak_command, clear_command, break_command)
2027 (info_breakpoints_command, watch_command, rwatch_command)
2028 (awatch_command, trace_command, ftrace_command, strace_command)
2029 (trace_pass_command, break_range_command, dprintf_command)
2030 (agent_printf_command, get_tracepoint_by_number)
2031 (watch_maybe_just_location, trace_pass_command): Constify.
2032 (info_breakpoints_command): Add non-const overload.
2033 * tracefile.c (tsave_command): Constify.
2034 * infcmd.c (attach_command, disconnect_command, signal_command)
2035 (queue_signal_command, stepi_command, nexti_command)
2036 (finish_command, next_command, step_command, until_command)
2037 (advance_command, jump_command, continue_command, run_command)
2038 (start_command, starti_command, interrupt_command)
2039 (run_command_1, set_inferior_args, step_1): Constify.
2040 * inferior.c (add_inferior_command, remove_inferior_command)
2041 (clone_inferior_command): Constify.
2042 * linux-fork.c (checkpoint_command, restart_command): Constify.
2043 * windows-nat.c (signal_event_command): Constify.
2044 * guile/guile.c (guile_repl_command, guile_command): Constify.
2045 * printcmd.c (x_command, display_command, printf_command)
2046 (output_command, set_command, call_command, print_command)
2047 (eval_command): Constify.
2048 (non_const_set_command): Remove.
2049 (_initialize_printcmd): Update.
2050 * source.c (forward_search_command, reverse_search_command):
2051 Constify.
2052 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2053 Constify.
2054 * infrun.c (handle_command): Constify.
2055 * memattr.c (mem_command): Constify.
2056 * stack.c (return_command, up_command, up_silently_command)
2057 (down_command, down_silently_command, frame_command)
2058 (backtrace_command, func_command, backtrace_command_1): Constify.
2059 (backtrace_command): Add non-const overload.
2060 * remote-sim.c (simulator_command): Constify.
2061 * exec.c (set_section_command): Constify.
2062 * tracepoint.c (tdump_command, trace_variable_command)
2063 (tstatus_command, tstop_command, tstart_command)
2064 (end_actions_pseudocommand, while_stepping_pseudocommand)
2065 (collect_pseudocommand, teval_pseudocommand, actions_command)
2066 (start_tracing, stop_tracing): Constify.
2067 * value.c (init_if_undefined_command): Constify.
2068 * tui/tui-stack.c (tui_update_command): Constify.
2069 * tui/tui-win.c (tui_refresh_all_command)
2070 (tui_set_tab_width_command, tui_set_win_height_command)
2071 (tui_set_focus_command, tui_scroll_forward_command)
2072 (tui_scroll_backward_command, tui_scroll_left_command)
2073 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2074 (tui_set_win_height): Constify.
2075 * tui/tui-layout.c (tui_layout_command): Constify.
2076 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2077 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2078 (proc_untrace_sysexit_cmd): Constify.
2079 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2080 (threadset_test_cmd, threadlist_update_test_cmd)
2081 (threadalive_test): Constify.
2082 * objc-lang.c (print_object_command): Constify.
2083 * command.h (add_com): Constify.
2084 * cli/cli-dump.c (restore_command): Constify.
2085 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2086 (help_command, complete_command, shell_command, edit_command)
2087 (list_command, disassemble_command, make_command)
2088 (apropos_command, alias_command): Constify.
2089 * cli/cli-script.c (document_command, define_command)
2090 (while_command, if_command, validate_comname): Constify.
2091 * cli/cli-decode.c (struct cmd_list_element): Change type of
2092 "fun".
2093 * target.c (do_monitor_command, flash_erase_command): Constify.
2094 * regcache.c (reg_flush_command): Constify.
2095 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2096 (reverse_nexti, reverse_continue, reverse_finish)
2097 (save_bookmark_command, goto_bookmark_command)
2098 (exec_reverse_once): Constify.
2099 * python/python.c (python_interactive_command, python_command):
2100 Constify.
2101 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2102 Constify.
2103 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2104 * gcore.c (gcore_command): Constify.
2105
2106 2017-11-07 Tom Tromey <tom@tromey.com>
2107
2108 * printcmd.c (x_command): Call set_repeat_arguments.
2109 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2110 * top.c (repeat_arguments): New global.
2111 (set_repeat_arguments): New function.
2112 (execute_command): Handle repeat_arguments.
2113 (show_commands): Calls set_repeat_arguments.
2114 * command.h (set_repeat_arguments): Declare.
2115
2116 2017-11-07 Tom Tromey <tom@tromey.com>
2117
2118 * stack.c (backtrace_command): Use std::string.
2119 (backtrace_command_1): Make "count_exp" const.
2120
2121 2017-11-07 Tom Tromey <tom@tromey.com>
2122
2123 * source.c (directory_switch, mod_path, add_path): Constify.
2124 * defs.h (add_path, mod_path, directory_switch): Constify.
2125 * mi/mi-cmd-env.c (env_mod_path): Constify.
2126
2127 2017-11-07 Tom Tromey <tom@tromey.com>
2128
2129 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2130 (run_command_1, continue_command, step_1, jump_command)
2131 (signal_command, until_command, advance_command, finish_command)
2132 (attach_command): Update.
2133
2134 2017-11-07 Tom Tromey <tom@tromey.com>
2135
2136 * command.h (set_cmd_cfunc): Don't declare.
2137 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2138
2139 2017-11-07 Tom Tromey <tom@tromey.com>
2140
2141 * stack.c (select_frame_command): Constify.
2142 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2143 * command.h (add_com_suppress_notification): Constify.
2144
2145 2017-11-07 Tom Tromey <tom@tromey.com>
2146
2147 * breakpoint.c (stop_command): Constify.
2148 * cli/cli-decode.c (struct cmd_list_element): Constify.
2149 * command.h (add_abbrev_prefix_cmd): Constify.
2150
2151 2017-11-07 Pedro Alves <palves@redhat.com>
2152
2153 * breakpoint.c (extract_bp_kind): New enum.
2154 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2155 factored out from ...
2156 (extract_bp_number_and_location): ... here.
2157 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2158
2159 2017-11-07 Pedro Alves <palves@redhat.com>
2160
2161 * breakpoint.c (extract_bp_number_and_location): Change return
2162 type to void. Throw error instead of warning.
2163 (enable_disable_command): Adjust.
2164
2165 2017-11-07 Xavier Roirand <roirand@adacore.com>
2166 Pedro Alves <palves@redhat.com>
2167
2168 * breakpoint.c (map_breakpoint_number_range): New, factored out
2169 from ...
2170 (map_breakpoint_numbers): ... here.
2171 (find_location_by_number): Change parameters from string to
2172 breakpoint number and location.
2173 (extract_bp_number_and_location): New function.
2174 (enable_disable_bp_num_loc)
2175 (enable_disable_breakpoint_location_range)
2176 (enable_disable_command): New functions, factored out ...
2177 (enable_command, disable_command): ... these functions, and
2178 adjusted to support ranges.
2179 * NEWS: Document enable/disable breakpoint location range feature.
2180
2181 2017-11-06 Luis Machado <luis.machado@linaro.org>
2182
2183 * MAINTAINERS (Write After Approval): Update my e-mail address.
2184
2185 2017-11-06 Pedro Alves <palves@redhat.com>
2186
2187 * gnu-nat.c (gnu_terminal_init): Delete.
2188 (gnu_target): Don't install gnu_terminal_init.
2189 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2190 (child_terminal_init): ... this function.
2191
2192 2017-11-06 Pedro Alves <palves@redhat.com>
2193
2194 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2195 sgtty.h.
2196 * config.in, configure: Regenerate.
2197
2198 2017-11-06 Pedro Alves <palves@redhat.com>
2199
2200 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2201 (async_init_signals): Adjust.
2202 (handle_stop_sig): Rename to ...
2203 (handle_sigtstp): ... this.
2204 (async_stop_sig): Rename to ...
2205 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2206 SIGTSTP path.
2207 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2208 instead of STOP_SIGNAL thoughout.
2209 (handle_stop_sig): Rename to ...
2210 (handle_sigtstp): ... this.
2211 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2212
2213 2017-11-06 Pedro Alves <palves@redhat.com>
2214
2215 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2216 longer set flags twice in row.
2217
2218 2017-11-06 Pedro Alves <palves@redhat.com>
2219
2220 * Makefile.in (SER_HARDWIRE): Update comment.
2221 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2222 * common/gdb_termios.h: Delete file.
2223 * common/job-control.c: Include termios.h and unistd.h instead of
2224 gdb_termios.h.
2225 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2226 check.
2227 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2228 Remove sgtty code.
2229 * configure.ac: No longer check for termio.h and sgtty.h.
2230 * configure: Regenerate.
2231 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2232 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2233 Replace PROCESS_GROUP_TYPE references with pid_t references
2234 throughout.
2235 (gdb_getpgrp): Delete.
2236 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2237 (child_terminal_inferior): Remove comment. Remove sgtty code.
2238 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2239 gdb_getpgrp. Use serial_set_tty_state instead aof
2240 serial_noflush_set_tty_state. Remove sgtty code.
2241 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2242 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2243 (inferior_process_group): Now returns pid_t.
2244 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2245 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2246 * ser-event.c (serial_event_ops): Update.
2247 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2248 (dos_ops): Update.
2249 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2250 * ser-pipe.c (pipe_ops): Update.
2251 * ser-tcp.c (tcp_ops): Update.
2252 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2253 HAVE_TERMIOS checks.
2254 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2255 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2256 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2257 assume termios.
2258 (hardwire_noflush_set_tty_state): Delete.
2259 (hardwire_print_tty_state, hardwire_drain_output)
2260 (hardwire_flush_output, hardwire_flush_input)
2261 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2262 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2263 code, and assume termios.
2264 (hardwire_ops): Update.
2265 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2266 * serial.c (serial_noflush_set_tty_state): Delete.
2267 * serial.h (serial_noflush_set_tty_state): Delete.
2268 (serial_ops::noflush_set_tty_state): Delete.
2269
2270 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2271
2272 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2273 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2274 (COMMON_OBS): Remove doublest.o and dfp.o.
2275 Do not build target-float.c (instead of doublest.c)
2276 with -Wformat-nonliteral.
2277
2278 * doublest.c: Remove file.
2279 * doublest.h: Remove file.
2280 * dfp.c: Remove file.
2281 * dfp.h: Remove file.
2282
2283 * target-float.c: Do not include "doublest.h" and "dfp.h".
2284 (DOUBLEST): Move here from doublest.h.
2285 (enum float_kind): Likewise.
2286 (FLOATFORMAT_CHAR_BIT): Likewise.
2287 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2288 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2289 (floatformat_precision): Likewise.
2290 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2291 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2292 Likewise.
2293 (host_float_format, host_double_format, host_long_double_format):
2294 Likewise.
2295 (floatformat_to_string, floatformat_from_string): Likewise.
2296 (floatformat_to_doublest): Likewise. Also, inline the original
2297 convert_floatformat_to_doublest.
2298 (floatformat_from_doublest): Likewise. Also, inline the original
2299 convert_floatformat_from_doublest.
2300
2301 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2302 (MAX_DECIMAL_STRING): Move here from dfp.c.
2303 (match_endianness): Likewise.
2304 (set_decnumber_context, decimal_check_errors): Likewise.
2305 (decimal_from_number, decimal_to_number): Likewise.
2306 (decimal_to_string, decimal_from_string): Likewise. Make static.
2307 (decimal_from_longest, decimal_from_ulongest): Likewise.
2308 (decimal_to_longest): Likewise.
2309 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2310 (decimal_convert): Likewise.
2311
2312 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2313
2314 * doublest.c: Do not include "gdbtypes.h".
2315 (extract_typed_floating): Remove.
2316 (store_typed_floating): Remove.
2317 (convert_typed_floating): Remove.
2318 * doublest.h (struct type): Remove.
2319 (DOUBLEST_PRINT_FORMAT): Remove.
2320 (DOUBLEST_SCAN_FORMAT): Remove.
2321 (extract_typed_floating): Remove.
2322 (store_typed_floating): Remove.
2323 (convert_typed_floating): Remove.
2324
2325 * dfp.c (decimal_from_doublest): Remove.
2326 (decimal_to_doublest): Remove.
2327 * dfp.h: Do not include "doublest.h".
2328 (decimal_from_doublest): Remove.
2329 (decimal_to_doublest): Remove.
2330
2331 * value.c: Do not include "doublest.h" and "dfp.h".
2332 (value_as_double): Remove.
2333 (unpack_double): Remove.
2334 (value_from_double): Remove.
2335 (value_from_decfloat): Remove.
2336 * value.h: Do not include "doublest.h".
2337 (value_as_double): Remove.
2338 (unpack_double): Remove.
2339 (value_from_double): Remove.
2340 (value_from_decfloat): Remove.
2341
2342 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2343
2344 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2345 (i386_extract_return_value): Use target_float_convert.
2346 (i386_store_return_value): Likewise.
2347 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2348 (i387_value_to_register): Likewise.
2349 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2350 (ia64_register_to_value): Use target_float_convert.
2351 (ia64_value_to_register): Likewise.
2352 (ia64_extract_return_value): Likewise.
2353 (ia64_store_return_value): Likewise.
2354 (ia64_push_dummy_call): Likewise.
2355 * m68k-tdep.c: Include "target-float.h".
2356 (m68k_register_to_value): Use target_float_convert.
2357 (m68k_value_to_register): Likewise.
2358 (m68k_svr4_extract_return_value): Likewise.
2359 (m68k_svr4_store_return_value): Likewise.
2360 * ppc-sysv-tdep.c: Include "target-float.h".
2361 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2362 (do_ppc_sysv_return_value): Likewise.
2363 (ppc64_sysv_abi_push_freg): Likewise.
2364 (ppc64_sysv_abi_return_value_base): Likewise.
2365 * rs6000-aix-tdep.c: Include "target-float.h".
2366 (rs6000_push_dummy_call): Use target_float_convert.
2367 (rs6000_return_value): Likewise.
2368 * rs6000-lynx178-tdep.c: Include "target-float.h".
2369 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2370 (rs6000_lynx178_return_value): Likewise.
2371 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2372 (rs6000_register_to_value): Use target_float_convert.
2373 (rs6000_value_to_register): Likewise.
2374 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2375 (arm_extract_return_value): Use target_float_convert.
2376 (arm_store_return_value): Likewise.
2377 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2378 (sh_register_convert_to_virtual): Use target_float_convert.
2379 (sh_register_convert_to_raw): Likewise.
2380 * sh64-tdep.c: Include "target-float.h".
2381 (sh64_extract_return_value): Use target_float_convert.
2382 (sh64_register_convert_to_virtual): Likewise.
2383 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2384
2385 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2386
2387 * target-float.c (floatformat_to_host_double): New function.
2388 (floatformat_from_host_double): Likewise.
2389 (target_float_to_host_double): Likewise.
2390 (target_float_from_host_double): Likewise.
2391 * target-float.h (target_float_to_host_double): Add prototype.
2392 (target_float_from_host_double): Likewise.
2393
2394 * guile/scm-value.c: Include "target-float.h".
2395 (gdbscm_value_to_real): Use target_float_to_host_double.
2396 Handle integer source values via value_as_long.
2397 * guile/scm-math.c: Include "target-float.h". Do not include
2398 "doublest.h", "dfp.h", and "expression.h".
2399 (vlscm_convert_typed_number): Use target_float_from_host_double.
2400 (vlscm_convert_number): Likewise.
2401
2402 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2403 (convert_value_from_python): Use target_float_from_host_double.
2404
2405 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2406
2407 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2408 (cast_from_fixed): Likewise.
2409 (ada_scaling_type): New function.
2410 (ada_delta): Return value instead of DOUBLEST. Perform target
2411 arithmetic instead of host arithmetic.
2412 (scaling_factor): Rename to ...
2413 (ada_scaling_factor) ... this. Make non-static. Return value instead
2414 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2415 (ada_fixed_to_float): Remove.
2416 (ada_float_to_fixed): Remove.
2417 * ada-lang.h (ada_fixed_to_float): Remove.
2418 (ada_float_to_fixed): Remove.
2419 (ada_delta): Return value instead of DOUBLEST.
2420 (ada_scaling_factor): Add prototype.
2421
2422 * ada-typeprint.c: Include "target-float.h".
2423 (print_fixed_point_type): Perform target arithmetic instead of
2424 host arithmetic.
2425 * ada-valprint.c: Include "target-float.h".
2426 (ada_val_print_num): Perform target arithmetic instead of
2427 host arithmetic for fixed-point types.
2428
2429 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2430
2431 * target-float.c: Include <math.h>.
2432 (floatformat_binop): New function.
2433 (floatformat_compare): Likewise.
2434 (target_float_binop): Likewise.
2435 (target_float_compare): Likewise.
2436 * target-float.h: Include "expression.h".
2437 (target_float_binop): Add prototype.
2438 (target_float_compare): Likewise.
2439
2440 * valarith.c: Do not include "doublest.h" and "dfp.h".
2441 Include "common/byte-vector.h".
2442 (value_args_as_decimal): Remove, replace by ...
2443 (value_args_as_target_float): ... this function. Handle both
2444 binary and decimal target floating-point formats.
2445 (scalar_binop): Handle both binary and decimal FP using
2446 value_args_as_target_float and target_float_binop.
2447 (value_equal): Handle both binary and decimal FP using
2448 value_args_as_target_float and target_float_compare.
2449 (value_less): Likewise.
2450 (value_pos): Handle all scalar types as simple copy.
2451 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2452 * dfp.c (decimal_binop): Throw error instead of internal_error
2453 when called with an unsupported operation code.
2454
2455 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2456
2457 * target-float.c (target_float_to_string): New function.
2458 (target_float_from_string): New function.
2459 * target-float.h (target_float_to_string): Add prototype.
2460 (target_float_from_string): Add prototype.
2461
2462 * valprint.c: Include "target-float.h". Do not include
2463 "doublest.h" and "dfp.h".
2464 (print_floating): Use target_float_to_string.
2465 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2466 (printf_floating): Use target_float_to_string.
2467 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2468 (print_i387_value): Use target_float_to_string.
2469 * mips-tdep.c: Include "target-float.h".
2470 (mips_print_fp_register): Use target_float_to_string.
2471 * sh64-tdep.c: Include "target-float.h".
2472 (sh64_do_fp_register): Use target_float_to_string.
2473
2474 * parse.c: Include "target-float.h". Do not include
2475 "doublest.h" and "dfp.h".
2476 (parse_float): Use target_float_from_string.
2477 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2478 (define_symbol): Use target_float_from_string.
2479 * gdbarch-selftests.c: Include "target-float.h".
2480 (register_to_value_test): Use target_float_from_string.
2481
2482 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2483
2484 * Makefile.c (SFILES): Add target-float.c.
2485 (HFILES_NO_SRCDIR): Add target-float.h.
2486 (COMMON_OBS): Add target-float.o.
2487 * target-float.h: New file.
2488 * target-float.c: New file.
2489
2490 * doublest.c (floatformat_classify): Fix detection of float_zero.
2491
2492 * gdbtypes.c (is_floating_type): New function.
2493 * gdbtypes.h (is_floating_type): Add prototype.
2494
2495 * value.c: Do not include "floatformat.h".
2496 (unpack_double): Use target_float_is_valid.
2497 (is_floating_value): New function.
2498 * value.h (is_floating_value): Add prototype-
2499
2500 * valarith.c: Include "target-float.h".
2501 (value_logical_not): Use target_float_is_zero.
2502
2503 * python/py-value.c: Include "target-float.h".
2504 (valpy_nonzero): Use target_float_is_zero.
2505
2506 2017-11-04 Tom Tromey <tom@tromey.com>
2507
2508 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2509
2510 2017-11-04 Tom Tromey <tom@tromey.com>
2511
2512 * breakpoint.c (set_momentary_breakpoint): Return
2513 breakpoint_up.
2514 (until_break_command): Update.
2515 (new_until_break_fsm): Change argument types to
2516 breakpoint_up.
2517 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2518 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2519 Remove.
2520 * infcmd.c (finish_forward): Update.
2521 * breakpoint.h (set_momentary_breakpoint)
2522 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2523 (make_cleanup_delete_breakpoint): Remove.
2524 (struct breakpoint_deleter): New.
2525 (breakpoint_up): New typedef.
2526 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2527 (insert_exception_resume_breakpoint): Update.
2528 (insert_exception_resume_from_probe): Update.
2529 (insert_longjmp_resume_breakpoint): Update.
2530 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2531 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2532 * infcall.c (call_function_by_hand_dummy): Update
2533
2534 2017-11-04 Tom Tromey <tom@tromey.com>
2535
2536 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2537
2538 2017-11-04 Tom Tromey <tom@tromey.com>
2539
2540 * linux-tdep.c (linux_core_info_proc_mappings): Use
2541 gdb::def_vector.
2542 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2543 "size" argument.
2544 (linux_corefile_thread): Update.
2545 (linux_make_corefile_notes): Remove unused variable.
2546
2547 2017-11-04 Tom Tromey <tom@tromey.com>
2548
2549 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2550 gdb::byte_vector.
2551
2552 2017-11-04 Tom Tromey <tom@tromey.com>
2553
2554 * objfiles.c (do_free_objfile_cleanup): Remove.
2555 * compile/compile-object-load.c (compile_object_load): Update.
2556 * objfiles.h (make_cleanup_free_objfile): Remove.
2557
2558 2017-11-04 Tom Tromey <tom@tromey.com>
2559
2560 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2561 (adi_read_versions): Change "tags" to "gdb_byte *".
2562 (adi_print_versions): Likewise.
2563
2564 2017-11-04 Tom Tromey <tom@tromey.com>
2565
2566 * breakpoint.c
2567 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2568 from start_rbreak_breakpoints.
2569 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2570 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2571 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2572 * symtab.c (do_end_rbreak_breakpoints): Remove.
2573 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2574
2575 2017-11-04 Tom Tromey <tom@tromey.com>
2576
2577 * cp-namespace.c (reset_directive_searched): Remove.
2578 (cp_lookup_symbol_via_imports): Use scoped_restore.
2579 * cp-support.c (reset_directive_searched): Remove.
2580 (make_symbol_overload_list_using): Use scoped_restore.
2581 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2582 (reset_directive_searched): Remove.
2583
2584 2017-11-04 Tom Tromey <tom@tromey.com>
2585
2586 * symfile.c (find_separate_debug_file_by_debuglink): Use
2587 unique_xmalloc_ptr.
2588
2589 2017-11-04 Tom Tromey <tom@tromey.com>
2590
2591 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2592 type of "info".
2593 (compute_stack_depth): Likewise.
2594 (do_compile_dwarf_expr_to_c): Use std::vector.
2595
2596 2017-11-04 Tom Tromey <tom@tromey.com>
2597
2598 * compile/compile-object-load.c (link_callbacks_einfo): Use
2599 std::string.
2600
2601 2017-11-04 Tom Tromey <tom@tromey.com>
2602
2603 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2604 Use scoped_free_pendings.
2605 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2606 scoped_free_pendings.
2607 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2608 (xcoff_initial_scan): Likewise.
2609 * buildsym.c (reset_symtab_globals): Update comment.
2610 (scoped_free_pendings): Rename from really_free_pendings.
2611 (prepare_for_building): Update comment.
2612 (buildsym_init): Likewise.
2613 * buildsym.h (class scoped_free_pendings): New class.
2614 (really_free_pendings): Don't declare.
2615
2616 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2617
2618 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2619 output when converting a zero value to a special byteorder format.
2620
2621 2017-11-02 Yao Qi <yao.qi@linaro.org>
2622
2623 * frame.c (do_frame_register_read): Remove aspace.
2624 * jit.c (jit_frame_sniffer): Likwise.
2625 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2626 * regcache.c (regcache::regcache): Pass nullptr.
2627 (regcache_print): Caller updated.
2628 * regcache.h (regcache::regcache): Remove one constructor
2629 parameter aspace.
2630
2631 2017-11-02 Yao Qi <yao.qi@linaro.org>
2632
2633 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2634
2635 2017-11-02 Yao Qi <yao.qi@linaro.org>
2636
2637 * breakpoint.c (insert_single_step_breakpoints): Update.
2638 * frame.c (struct frame_info) <aspace>: Add const.
2639 (frame_save_as_regcache): Add const.
2640 (get_frame_address_space): Return const address_space *.
2641 * frame.h (get_frame_address_space): Update declaration.
2642 * infrun.c (struct step_over_info) <aspace>: Add const.
2643 (set_step_over_info): Make aspace const.
2644 (displaced_step_prepare_throw): Change variable const.
2645 (resume): Likewise.
2646 (proceed): Likewise.
2647 (adjust_pc_after_break): Likewise.
2648 (save_waitstatus): Likewise.
2649 (handle_signal_stop): Likewise.
2650 (keep_going_pass_signal): Likewise.
2651 * jit.c (jit_frame_sniffer): Add const.
2652 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2653 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2654 * record-full.c (record_full_wait_1): Likewise.
2655 * regcache.c (regcache::regcache): Change parameter to const.
2656 * regcache.h (regcache::regcache): Likewise.
2657 (regcache::aspace): Return const address_space *.
2658 (regcache) <m_aspace>: Add const.
2659
2660 2017-11-02 Yao Qi <yao.qi@linaro.org>
2661
2662 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2663 * frame.c (create_sentinel_frame): Likewise.
2664 * infrun.c (displaced_step_prepare_throw): Likewise.
2665 (resume): Likewise.
2666 (thread_still_needs_step_over_bp): Likewise.
2667 (proceed): Likewise.
2668 (do_target_wait): Likewise.
2669 (adjust_pc_after_break): Likewise.
2670 (handle_syscall_event): Likewise.
2671 (save_waitstatus): Likewise.
2672 (handle_inferior_event_1): Likewise.
2673 (handle_signal_stop): Likewise.
2674 (keep_going_pass_signal): Likewise.
2675 * linux-nat.c (status_callback): Likewise.
2676 (save_stop_reason): Likewise.
2677 (resume_stopped_resumed_lwps): Likewise.
2678 * record-full.c (record_full_exec_insn): Likewise.
2679 (record_full_wait_1): Likewise.
2680 * regcache.c (get_regcache_aspace): Remove.
2681 * regcache.h (get_regcache_aspace): Remove.
2682
2683 2017-11-02 Yao Qi <yao.qi@linaro.org>
2684
2685 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2686 (init_regcache_descr): Use gdbarch_num_regs.
2687 (regcache::regcache): Likewise.
2688 (regcache::get_register_status): Likewise.
2689 (regcache::assert_raw_regnum): Likewise.
2690 (regcache::cooked_read): Likewise.
2691 (regcache::cooked_read_value): Likewise.
2692 (regcache::cooked_write): Likewise.
2693 (regcache::dump): Likewise.
2694 (regcache::num_raw_registers): New method.
2695 * regcache.h (class regcache) <num_raw_registers>: New.
2696
2697 2017-11-02 Yao Qi <yao.qi@linaro.org>
2698
2699 * regcache.c (regcache::assert_regnum): New method.
2700 (regcache::invalidate): Call assert_regnum.
2701 (regcache::raw_update): Likewise.
2702 (regcache::raw_write): Likewise.
2703 (regcache::raw_read_part): Likewise.
2704 (regcache::raw_write_part): Likewise.
2705 (regcache::raw_supply): Likewise.
2706 (regcache::raw_supply_integer): Likewise.
2707 (regcache::raw_supply_zeroed): Likewise.
2708 (regcache::raw_collect): Likewise.
2709 (regcache::raw_collect_integer): Likewise.
2710 * regcache.h (regcache::assert_regnum): Declare.
2711
2712 2017-11-02 Yao Qi <yao.qi@linaro.org>
2713
2714 * regcache.c (regcache::dump): Remove code.
2715
2716 2017-11-02 Yao Qi <yao.qi@linaro.org>
2717
2718 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2719 Remove.
2720 <sizeof_cooked_register_status>: Remove.
2721 (init_regcache_descr): Update.
2722 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2723 (regcache::save): Likewise.
2724 (regcache::dump): Likewise.
2725
2726 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2727
2728 * ft32-tdep.c (ft32_fetch_instruction): New function.
2729 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2730
2731 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2732
2733 * cli/cli-script.c (execute_control_command): Rename to ...
2734 (execute_control_command_1): ... this.
2735 (execute_control_command): New function.
2736
2737 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2738
2739 * tracepoint.c (tfind_command): Remove const_cast.
2740
2741 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2742
2743 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2744
2745 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2746
2747 * common/common-utils.h (in_inclusive_range): New function.
2748 * arm-tdep.c (arm_record_extension_space): Use
2749 in_inclusive_range.
2750 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2751 * cris-tdep.c (cris_spec_reg_applicable): Use
2752 in_inclusive_range.
2753
2754 2017-10-30 Pedro Alves <palves@redhat.com>
2755 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2758 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2759
2760 2017-10-30 Pedro Alves <palves@redhat.com>
2761
2762 * common/common-utils.c (string_appendf, string_vappendf): New
2763 functions.
2764 * common/common-utils.h (string_appendf, string_vappendf): New
2765 declarations.
2766 * unittests/common-utils-selftests.c (string_appendf_func)
2767 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2768 (string_vappendf_tests): New functions.
2769 (_initialize_common_utils_selftests): Register "string_appendf" and
2770 "string_vappendf tests".
2771
2772 2017-10-30 Pedro Alves <palves@redhat.com>
2773
2774 * unittests/common-utils-selftests.c (format_func): New typedef.
2775 (string_printf_tests, string_vprintf_tests): Tests factored out
2776 and merged to ...
2777 (test_format_func): ... this new function.
2778 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2779 test_format_func.
2780
2781 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2782
2783 * darwin-nat.c: Remove include of gdb.h.
2784
2785 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2786
2787 * xtensa-xtregs.c: Fix formatting issues.
2788
2789 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2790
2791 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2792
2793 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2794
2795 PR python/21213
2796 * python/py-infthread.c (thpy_get_inferior): Increment reference
2797 of inferior before returning it.
2798
2799 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2800
2801 * unittests/common-utils-selftests.c (format): Add
2802 ATTRIBUTE_PRINTF.
2803
2804 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2805
2806 * xml-syscall.c (struct syscall_desc): Add constructor.
2807 <name>: Change type to std::string.
2808 (syscall_desc_up): New typedef.
2809 (syscall_desc_p): Remove typeder.
2810 (DEF_VEC_P(syscall_desc_p)): Remove.
2811 (struct syscall_group_desc): Add constructor.
2812 <name>: Change type to std::string.
2813 <syscalls>: Change type to std::vector.
2814 (syscall_group_desc_up): New typedef.
2815 (syscall_group_desc_p): Remove typedef.
2816 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2817 (struct syscalls_info) <syscalls>: Change type to std::vector of
2818 unique_ptr.
2819 <groups>: Likewise.
2820 <my_gdb_datadir>: Change type to std::string.
2821 (syscalls_info_up): New typedef.
2822 (allocate_syscalls_info): Remove.
2823 (syscalls_info_free_syscalls_desc): Remove.
2824 (syscalls_info_free_syscall_group_desc): Remove.
2825 (free_syscalls_info): Remove.
2826 (make_cleanup_free_syscalls_info): Remove.
2827 (syscall_group_create_syscall_group_desc): Adjust.
2828 (syscall_group_add_syscall): Adjust.
2829 (syscall_create_syscall_desc): Adjust.
2830 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2831 (init_syscalls_info): Adjust.
2832 (syscall_group_get_group_by_name): Adjust.
2833 (xml_get_syscall_number): Adjust.
2834 (xml_get_syscall_name): Adjust.
2835 (xml_list_of_syscalls): Adjust.
2836 (xml_list_syscalls_by_group): Adjust.
2837 (xml_list_of_groups): Adjust.
2838
2839 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2840
2841 * probe.h: Don't include gdb_vecs.h.
2842 (DEF_VEC_P (probe_p)): Remove.
2843 (find_probes_in_objfile): Return an std::vector.
2844 * probe.c (find_probes_in_objfile): Likewise.
2845 * breakpoint.c (breakpoint_objfile_data)
2846 <longjmp_probes>: Change type to std::vector.
2847 <exception_probes>: Likewise.
2848 (free_breakpoint_probes): Don't manually free vectors.
2849 (create_longjmp_master_breakpoint): Adjust.
2850 (create_exception_master_breakpoint): Adjust.
2851 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2852 parameter type, adjust.
2853 (svr4_create_solib_event_breakpoints): Adjust.
2854
2855 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2856
2857 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2858 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2859 with new.
2860 (free_breakpoint_probes): Rename to ...
2861 (free_breakpoint_objfile_data): ... this, and call delete on
2862 bp_objfile_data..
2863
2864 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2865
2866 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2867 (loaded_script_ptr): Remove typedef.
2868 (DEF_VEC_P (loaded_script_ptr)): Remove.
2869 (struct collect_matching_scripts_data): Add constructor.
2870 <scripts_p>: Change type to (pointer to) std::vector.
2871 (collect_matching_scripts_data): Adjust.
2872 (sort_scripts_by_name): Make suitable for std::sort.
2873 (print_scripts): Don't sort vector, adjust to std::vector.
2874 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2875
2876 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2877
2878 * symfile.c (filename_language): Make struct, not typedef. Add
2879 constructor.
2880 <ext>: Change type to std::string.
2881 (DEF_VEC_O (filename_language)): Remove.
2882 (filename_language_table): Change type to std::vector.
2883 (add_filename_language): Adjust.
2884 (set_ext_lang_command): Adjust.
2885 (info_ext_lang_command): Adjust.
2886 (deduce_language_from_filename): Adjust.
2887 (class scoped_restore_filename_language_table): Remove.
2888 (test_filename_language): Use scoped_restore.
2889 (test_set_ext_lang_command): Use scoped_restore, adjust to
2890 std::vector change.
2891
2892 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2893
2894 * symfile.c: Include selftest.h.
2895 (class scoped_restore_filename_language_table): New.
2896 (test_filename_language): New test.
2897 (test_set_ext_lang_command): New test.
2898 (_initialize_symfile): Register tests.
2899
2900 2017-10-27 Keith Seitz <keiths@redhat.com>
2901
2902 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2903 in the bp_location, falling back to find_pc_sect_function when
2904 needed.
2905 (add_location_to_breakpoint): Save sal->symbol.
2906 * breakpoint.h (struct bp_location) <symbol>: New field.
2907 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2908 * symtab.h (struct symtab_and_line) <symbol>: New field.
2909
2910 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2911
2912 PR gdb/13669
2913 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2914 to rewind obstack.
2915
2916 2017-10-26 Pedro Alves <palves@redhat.com>
2917
2918 * remote.c (remote_async_terminal_ours_p): Delete.
2919 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2920 Remove references to 'remote_async_terminal_ours_p'.
2921
2922 2017-10-26 Yao Qi <yao.qi@linaro.org>
2923
2924 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2925
2926 2017-10-26 Yao Qi <yao.qi@linaro.org>
2927
2928 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2929 aspace const.
2930 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2931 Likewise.
2932 * breakpoint.c (bpstat_check_location): Remove cast.
2933 (breakpoint_hit_catch_fork): Make aspce const.
2934 (breakpoint_hit_catch_solib): Likewise.
2935 (breakpoint_hit_catch_exec): Likewise.
2936 (breakpoint_hit_ranged_breakpoint): Likewise.
2937 (breakpoint_hit_watchpoint): Likewise.
2938 (base_breakpoint_breakpoint_hit): Likewise.
2939 (bkpt_breakpoint_hit): Likewise.
2940 (dprintf_breakpoint_hit): Likewise.
2941 (tracepoint_breakpoint_hit): Likewise.
2942 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2943
2944 2017-10-26 Yao Qi <yao.qi@linaro.org>
2945
2946 * breakpoint.c (breakpoint_location_address_match): Change
2947 "struct address_space *" to "const address_space".
2948 (breakpoint_location_address_range_overlap): Likewise.
2949 (breakpoint_here_p): Likewise.
2950 (breakpoint_in_range_p): Likewise.
2951 (moribund_breakpoint_here_p): Likewise.
2952 (bp_location_inserted_here_p): Likewise.
2953 (software_breakpoint_inserted_here_p): Likewise.
2954 (hardware_breakpoint_inserted_here_p): Likewise.
2955 (hardware_watchpoint_inserted_in_range): Likewise.
2956 (bpstat_check_location): Likewise.
2957 (bpstat_stop_status): Likewise.
2958 (breakpoint_address_match): Likewise.
2959 (breakpoint_address_match_range): Likewise.
2960 (breakpoint_location_address_match): Likewise.
2961 (breakpoint_location_address_range_overlap): Likewise.
2962 (insert_single_step_breakpoint): Likewise.
2963 (breakpoint_has_location_inserted_here): Likewise.
2964 (single_step_breakpoint_inserted_here_p): Likewise.
2965 (pc_at_non_inline_function): Likewise.
2966 * breakpoint.h (bpstat_stop_status): Update declaration.
2967 (breakpoint_here_p): Likewise.
2968 (breakpoint_in_range_p): Likewise.
2969 (moribund_breakpoint_here_p): Likewise.
2970 (breakpoint_inserted_here_p): Likewise.
2971 (software_breakpoint_inserted_here_p): Likewise.
2972 (hardware_breakpoint_inserted_here_p): Likewise.
2973 (breakpoint_has_location_inserted_here): Likewise.
2974 (single_step_breakpoint_inserted_here_p): Likewise.
2975 (hardware_watchpoint_inserted_in_range): Likewise.
2976 (breakpoint_address_match): Likewise.
2977 (insert_single_step_breakpoint): Likewise.
2978 (pc_at_non_inline_function): Likewise.
2979 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2980 * record.c (record_check_stopped_by_breakpoint): Likewise.
2981 * record.h (record_check_stopped_by_breakpoint): Likewise.
2982 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2983
2984 2017-10-25 Yao Qi <yao.qi@linaro.org>
2985
2986 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2987 regcache->arch () instead get_regcache_arch.
2988 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2989 Likewise.
2990 (aarch64_fbsd_store_inferior_registers): Likewise.
2991 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2992 (store_gregs_to_thread): Likewise.
2993 (fetch_fpregs_from_thread): Likewise.
2994 (store_fpregs_to_thread): Likewise.
2995 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2996 (aarch64_store_return_value): Likewise.
2997 (aarch64_software_single_step): Likewise.
2998 * aix-thread.c (aix_thread_wait): Likewise.
2999 (supply_reg32): Likewise.
3000 (supply_sprs64): Likewise.
3001 (supply_sprs32): Likewise.
3002 (fill_gprs64): Likewise.
3003 (fill_gprs32): Likewise.
3004 (fill_sprs64): Likewise.
3005 (fill_sprs32): Likewise.
3006 (store_regs_user_thread): Likewise.
3007 (store_regs_kernel_thread): Likewise.
3008 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3009 (alphabsd_store_inferior_registers): Likewise.
3010 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3011 (alpha_store_return_value): Likewise.
3012 (alpha_deal_with_atomic_sequence): Likewise.
3013 (alpha_next_pc): Likewise.
3014 (alpha_software_single_step): Likewise.
3015 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3016 (amd64bsd_store_inferior_registers): Likewise.
3017 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3018 Likewise.
3019 (amd64_linux_store_inferior_registers): Likewise.
3020 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3021 (amd64_collect_native_gregset): Likewise.
3022 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3023 (amd64obsd_collect_uthread): Likewise.
3024 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3025 (amd64_collect_fpregset): Likewise.
3026 (amd64_supply_fxsave): Likewise.
3027 (amd64_supply_xsave): Likewise.
3028 (amd64_collect_fxsave): Likewise.
3029 (amd64_collect_xsave): Likewise.
3030 * arc-tdep.c (arc_write_pc): Likewise.
3031 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3032 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3033 (arm_fbsd_store_inferior_registers): Likewise.
3034 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3035 (store_vfp_regs): Likewise.
3036 (arm_linux_fetch_inferior_registers): Likewise.
3037 (arm_linux_store_inferior_registers): Likewise.
3038 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3039 (arm_linux_sigreturn_next_pc): Likewise.
3040 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3041 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3042 (fetch_register): Likewise.
3043 (store_register): Likewise.
3044 * arm-tdep.c (arm_is_thumb): Likewise.
3045 (displaced_in_arm_mode): Likewise.
3046 (bx_write_pc): Likewise.
3047 (arm_get_next_pcs_addr_bits_remove): Likewise.
3048 (arm_software_single_step): Likewise.
3049 (arm_extract_return_value): Likewise.
3050 (arm_store_return_value): Likewise.
3051 (arm_write_pc): Likewise.
3052 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3053 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3054 (bsd_uthread_store_registers): Likewise.
3055 * core-regset.c (fetch_core_registers): Likewise.
3056 * corelow.c (get_core_registers): Likewise.
3057 * cris-tdep.c (cris_store_return_value): Likewise.
3058 (cris_extract_return_value): Likewise.
3059 (find_step_target): Likewise.
3060 (find_step_target): Likewise.
3061 (cris_software_single_step): Likewise.
3062 * ctf.c (ctf_fetch_registers): Likewise.
3063 * darwin-nat.c (cancel_breakpoint): Likewise.
3064 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3065 * frv-tdep.c (frv_extract_return_value): Likewise.
3066 * ft32-tdep.c (ft32_store_return_value): Likewise.
3067 (ft32_extract_return_value): Likewise.
3068 * go32-nat.c (fetch_register): Likewise.
3069 (go32_fetch_registers): Likewise.
3070 (go32_store_registers): Likewise.
3071 (store_register): Likewise.
3072 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3073 (h8300_store_return_value): Likewise.
3074 * hppa-linux-nat.c (fetch_register): Likewise.
3075 (store_register): Likewise.
3076 (hppa_linux_fetch_inferior_registers): Likewise.
3077 (hppa_linux_store_inferior_registers): Likewise.
3078 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3079 (i386_darwin_store_inferior_registers): Likewise.
3080 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3081 (gnu_store_registers): Likewise.
3082 * i386-linux-nat.c (fetch_register): Likewise.
3083 (store_register): Likewise.
3084 (supply_gregset): Likewise.
3085 (fill_gregset): Likewise.
3086 (i386_linux_fetch_inferior_registers): Likewise.
3087 (i386_linux_store_inferior_registers): Likewise.
3088 (i386_linux_resume): Likewise.
3089 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3090 Likewise.
3091 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3092 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3093 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3094 (i386obsd_collect_uthread): Likewise.
3095 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3096 (i386_supply_gregset): Likewise.
3097 (i386_collect_gregset): Likewise.
3098 (i386_supply_fpregset): Likewise.
3099 (i386_collect_fpregset): Likewise.
3100 (i386_mpx_bd_base): Likewise.
3101 * i386-v4-nat.c (supply_fpregset): Likewise.
3102 (fill_fpregset): Likewise.
3103 * i387-tdep.c (i387_supply_fsave): Likewise.
3104 (i387_collect_fsave): Likewise.
3105 (i387_supply_fxsave): Likewise.
3106 (i387_collect_fxsave): Likewise.
3107 (i387_supply_xsave): Likewise.
3108 (i387_collect_xsave): Likewise.
3109 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3110 (ia64_linux_store_registers): Likewise.
3111 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3112 (ia64_extract_return_value): Likewise.
3113 (ia64_store_return_value): Likewise.
3114 (find_func_descr): Likewise.
3115 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3116 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3117 (inf_ptrace_store_registers): Likewise.
3118 * infrun.c (use_displaced_stepping): Likewise.
3119 (displaced_step_prepare_throw): Likewise.
3120 (resume): Likewise.
3121 (proceed): Likewise.
3122 (do_target_wait): Likewise.
3123 (adjust_pc_after_break): Likewise.
3124 (handle_inferior_event_1): Likewise.
3125 (handle_signal_stop): Likewise.
3126 (save_infcall_suspend_state): Likewise.
3127 (restore_infcall_suspend_state): Likewise.
3128 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3129 * jit.c (jit_frame_prev_register): Likewise.
3130 * linux-nat.c (save_stop_reason): Likewise.
3131 (linux_nat_wait_1): Likewise.
3132 (resume_stopped_resumed_lwps): Likewise.
3133 * linux-record.c (record_linux_sockaddr): Likewise.
3134 (record_linux_msghdr): Likewise.
3135 (record_linux_system_call): Likewise.
3136 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3137 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3138 (lm32_store_return_value): Likewise.
3139 * m32c-tdep.c (m32c_read_flg): Likewise.
3140 (m32c_pseudo_register_read): Likewise.
3141 (m32c_pseudo_register_write): Likewise.
3142 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3143 (m32r_linux_collect_gregset): Likewise.
3144 * m32r-tdep.c (m32r_store_return_value): Likewise.
3145 (m32r_extract_return_value): Likewise.
3146 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3147 (m68kbsd_collect_fpregset): Likewise.
3148 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3149 * m68k-linux-nat.c (fetch_register): Likewise.
3150 (old_fetch_inferior_registers): Likewise.
3151 (old_store_inferior_registers): Likewise.
3152 (store_regs): Likewise.
3153 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3154 (m68k_svr4_store_return_value): Likewise.
3155 * m88k-tdep.c (m88k_store_arguments): Likewise.
3156 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3157 (mi_cmd_data_write_register_values): Likewise.
3158 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3159 (mips_fbsd_store_inferior_registers): Likewise.
3160 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3161 (mips_fbsd_supply_gregs): Likewise.
3162 (mips_fbsd_collect_fpregs): Likewise.
3163 (mips_fbsd_collect_gregs): Likewise.
3164 (mips_fbsd_supply_fpregset): Likewise.
3165 (mips_fbsd_collect_fpregset): Likewise.
3166 (mips_fbsd_supply_gregset): Likewise.
3167 (mips_fbsd_collect_gregset): Likewise.
3168 * mips-linux-nat.c (supply_gregset): Likewise.
3169 (fill_gregset): Likewise.
3170 (supply_fpregset): Likewise.
3171 (fill_fpregset): Likewise.
3172 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3173 (mips_fill_gregset): Likewise.
3174 (mips_supply_fpregset): Likewise.
3175 (mips_fill_fpregset): Likewise.
3176 (mips64_supply_gregset): Likewise.
3177 (micromips_linux_sigframe_validate): Likewise.
3178 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3179 (mipsnbsd_fetch_inferior_registers): Likewise.
3180 (mipsnbsd_store_inferior_registers): Likewise.
3181 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3182 (mipsnbsd_supply_gregset): Likewise.
3183 (mipsnbsd_iterate_over_regset_sections): Likewise.
3184 (mipsnbsd_supply_reg): Likewise.
3185 (mipsnbsd_supply_fpreg): Likewise.
3186 * mips-tdep.c (mips_in_frame_stub): Likewise.
3187 (mips_dummy_id): Likewise.
3188 (is_octeon_bbit_op): Likewise.
3189 (micromips_bc1_pc): Likewise.
3190 (extended_mips16_next_pc): Likewise.
3191 (mips16_next_pc): Likewise.
3192 (deal_with_atomic_sequence): Likewise.
3193 * moxie-tdep.c (moxie_process_readu): Likewise.
3194 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3195 * nto-procfs.c (procfs_store_registers): Likewise.
3196 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3197 (ppcfbsd_store_inferior_registers): Likewise.
3198 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3199 (fetch_altivec_register): Likewise.
3200 (get_spe_registers): Likewise.
3201 (fetch_spe_register): Likewise.
3202 (fetch_altivec_registers): Likewise.
3203 (fetch_all_gp_regs): Likewise.
3204 (fetch_all_fp_regs): Likewise.
3205 (store_vsx_register): Likewise.
3206 (store_altivec_register): Likewise.
3207 (set_spe_registers): Likewise.
3208 (store_spe_register): Likewise.
3209 (store_altivec_registers): Likewise.
3210 (store_all_gp_regs): Likewise.
3211 (store_all_fp_regs): Likewise.
3212 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3213 (ppc_linux_collect_gregset): Likewise.
3214 (ppc_canonicalize_syscall): Likewise.
3215 (ppc_linux_record_signal): Likewise.
3216 (ppu2spu_prev_register): Likewise.
3217 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3218 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3219 (ppcobsd_store_registers): Likewise.
3220 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3221 Likewise.
3222 (ppc_ravenscar_generic_store_registers): Likewise.
3223 * procfs.c (procfs_fetch_registers): Likewise.
3224 (procfs_store_registers): Likewise.
3225 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3226 (ravenscar_store_registers): Likewise.
3227 (ravenscar_prepare_to_store): Likewise.
3228 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3229 * record-full.c (record_full_wait_1): Likewise.
3230 (record_full_registers_change): Likewise.
3231 (record_full_store_registers): Likewise.
3232 (record_full_core_fetch_registers): Likewise.
3233 (record_full_save): Likewise.
3234 (record_full_goto_insn): Likewise.
3235 * regcache.c (regcache_register_size): Likewise.
3236 (get_regcache_arch): Remove.
3237 (regcache_read_pc): Likewise.
3238 * regcache.h (get_regcache_arch): Remove.
3239 * remote-sim.c (gdbsim_fetch_register): Likewise.
3240 (gdbsim_store_register): Likewise.
3241 * remote.c (fetch_register_using_p): Likewise.
3242 (send_g_packet): Likewise.
3243 (remote_prepare_to_store): Likewise.
3244 (store_registers_using_G): Likewise.
3245 * reverse.c (save_bookmark_command): Likewise.
3246 (goto_bookmark_command): Likewise.
3247 * rs6000-aix-tdep.c (branch_dest): Likewise.
3248 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3249 (fetch_register): Likewise.
3250 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3251 (ppc_collect_reg): Likewise.
3252 (ppc_collect_gregset): Likewise.
3253 (ppc_collect_fpregset): Likewise.
3254 (ppc_collect_vsxregset): Likewise.
3255 (ppc_collect_vrregset): Likewise.
3256 (ppc_displaced_step_hw_singlestep): Likewise.
3257 (rs6000_pseudo_register_read): Likewise.
3258 (rs6000_pseudo_register_write): Likewise.
3259 * s390-linux-nat.c (supply_gregset): Likewise.
3260 (fill_gregset): Likewise.
3261 (s390_linux_fetch_inferior_registers): Likewise.
3262 * s390-linux-tdep.c (s390_write_pc): Likewise.
3263 (s390_software_single_step): Likewise.
3264 (s390_all_but_pc_registers_record): Likewise.
3265 (s390_linux_syscall_record): Likewise.
3266 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3267 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3268 (shnbsd_store_inferior_registers): Likewise.
3269 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3270 (sh_extract_return_value_fpu): Likewise.
3271 (sh_store_return_value_nofpu): Likewise.
3272 (sh_corefile_supply_regset): Likewise.
3273 (sh_corefile_collect_regset): Likewise.
3274 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3275 (sh64_store_return_value): Likewise.
3276 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3277 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3278 (sparc_store_inferior_registers): Likewise.
3279 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3280 (sparc_ravenscar_prepare_to_store): Likewise.
3281 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3282 (sparc_analyze_control_transfer): Likewise.
3283 (sparc_step_trap): Likewise.
3284 (sparc_software_single_step): Likewise.
3285 (sparc32_gdbarch_init): Likewise.
3286 (sparc_supply_rwindow): Likewise.
3287 (sparc_collect_rwindow): Likewise.
3288 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3289 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3290 (sparc64nbsd_collect_gregset): Likewise.
3291 (sparc64nbsd_supply_fpregset): Likewise.
3292 (sparc64nbsd_collect_fpregset): Likewise.
3293 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3294 (sparc64_supply_gregset): Likewise.
3295 (sparc64_collect_gregset): Likewise.
3296 (sparc64_supply_fpregset): Likewise.
3297 (sparc64_collect_fpregset): Likewise.
3298 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3299 * spu-tdep.c (spu_unwind_sp): Likewise.
3300 (spu2ppu_prev_register): Likewise.
3301 (spu_memory_remove_breakpoint): Likewise.
3302 * stack.c (return_command): Likewise.
3303 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3304 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3305 * tracefile.c (trace_save_ctf): Likewise.
3306 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3307 (do_windows_store_inferior_registers): Likewise.
3308 (windows_resume): Likewise.
3309 * xtensa-linux-nat.c (fill_gregset): Likewise.
3310 (supply_gregset_reg): Likewise.
3311 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3312 (xtensa_register_read_masked): Likewise.
3313 (xtensa_supply_gregset): Likewise.
3314 (xtensa_extract_return_value): Likewise.
3315 (xtensa_store_return_value): Likewise.
3316
3317 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3318
3319 * doublest.c (floatformat_from_string): New function.
3320 * doublest.h (floatformat_from_string): Add prototype.
3321
3322 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3323 (OP_FLOAT): ... this.
3324 * expression.h: Do not include "doublest.h".
3325 (union exp_element): Replace doubleconst and decfloatconst by
3326 new element floatconst.
3327 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3328 (ada_evaluate_subexp): Likewise.
3329 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3330 OP_DOUBLE and OP_DECFLOAT.
3331 * expprint.c (print_subexp_standard): Likewise.
3332 (dump_subexp_body_standard): Likewise.
3333 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3334
3335 * parse.c: Include "dfp.h".
3336 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3337 (write_exp_elt_floatcst): New function.
3338 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3339 and OP_DECFLOAT.
3340 (operator_check_standard): Likewise.
3341 (parse_float): Do not accept suffix. Take type as input. Return bool.
3342 Return target format buffer instead of host DOUBLEST.
3343 Use floatformat_from_string and decimal_from_string to parse
3344 either binary or decimal floating-point types.
3345 (parse_c_float): Remove.
3346 * parser-defs.h: Do not include "doublest.h".
3347 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3348 (write_exp_elt_floatcst): Add prototype.
3349 (parse_float): Update prototype.
3350 (parse_c_float): Remove.
3351
3352 * c-exp.y: Do not include "dfp.h".
3353 (typed_val_float): Use byte buffer instead of DOUBLEST.
3354 (typed_val_decfloat): Remove.
3355 (DECFLOAT): Remove.
3356 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3357 (parse_number): Update to new parse_float interface.
3358 Parse suffixes and determine type before calling parse_float.
3359 Handle decimal and binary FP types the same way.
3360
3361 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3362 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3363 (parse_number): Update to new parse_float interface.
3364 Parse suffixes and determine type before calling parse_float.
3365
3366 * f-exp.y: Replace dval by typed_val_float.
3367 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3368 (parse_number): Use parse_float instead of atof.
3369
3370 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3371 (parse_go_float): Remove.
3372 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3373 (parse_number): Call parse_float instead of parse_go_float.
3374 Parse suffixes and determine type before calling parse_float.
3375
3376 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3377 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3378 (parse_number): Update to new parse_float interface.
3379 Parse suffixes and determine type before calling parse_float.
3380
3381 * m2-exp.y: Replace dval by byte buffer val.
3382 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3383 (parse_number): Call parse_float instead of atof.
3384
3385 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3386 (lex_number): Call parse_float instead of strtod.
3387 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3388 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3389 Use write_exp_elt_floatcst.
3390 (unit_testing): Remove static variable.
3391 (rust_type): Do not check unit_testing.
3392 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3393
3394 * ada-exp.y (type_float, type_double): Remove.
3395 (typed_val_float): Use byte buffer instead of DOUBLEST.
3396 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3397 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3398
3399 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3400
3401 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3402 * arch/aarch64.h: New file.
3403
3404 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3405
3406 * dfp.h (decimal_from_string): Use const reference for argument.
3407 * dfp.c (decimal_from_string): Likewise.
3408
3409 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3410
3411 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3412 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3413 * mips-tdep.c (mips_print_fp_register): Likewise.
3414
3415 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3416
3417 * common/format.h (enum argclass): Replace decfloat_arg by
3418 dec32float_arg, dec64float_arg, and dec128float_arg.
3419 * common/format.c (parse_format_string): Update to return
3420 new decimal float argument classes.
3421
3422 * printcmd.c (printf_decfloat): Rename to ...
3423 (printf_floating): ... this. Add argclass argument, and use it
3424 instead of parsing the format string again. Add support for
3425 binary floating-point values, using floatformat_to_string.
3426 Convert value to the target format if it doesn't already match.
3427 (ui_printf): Call printf_floating instead of printf_decfloat,
3428 also for double_arg / long_double_arg. Pass argclass.
3429
3430 * dfp.c (decimal_to_string): Add format string argument.
3431 * dfp.h (decimal_to_string): Likewise.
3432
3433 * doublest.c (floatformat_to_string): Add format string argument.
3434 * doublest.h (floatformat_to_string): Likewise.
3435
3436 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3437
3438 * doublest.c (floatformat_precision): New routine.
3439 (floatformat_to_string): Likewise.
3440 * doublest.c (floatformat_to_string): Add prototype.
3441
3442 * printcmd.c (print_scalar_formatted): Only call print_floating
3443 on floating-point types.
3444 * valprint.c: Do not include "floatformat.h".
3445 (generic_val_print_decfloat): Remove.
3446 (generic_val_print): Call generic_val_print_float for both
3447 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3448 (print_floating): Use floatformat_to_string. Handle decimal float.
3449 (print_decimal_floating): Remove, merge into floatformat_to_string.
3450 * value.h (print_decimal_floating): Remove.
3451
3452 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3453
3454 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3455
3456 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3457
3458 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3459
3460 * memattr.h: Don't include vec.h.
3461 (struct mem_attrib): Initialize fields.
3462 <unknown>: New static method.
3463 (struct mem_region): Add constructors, operator<, initialize
3464 fields.
3465 * memattr.c: Include algorithm.
3466 (default_mem_attrib, unknown_mem_attrib): Remove.
3467 (user_mem_region_list): New global.
3468 (target_mem_region_list, mem_region_list): Change type to
3469 std::vector<mem_region>.
3470 (mem_use_target): Now a function.
3471 (target_mem_regions_valid): Change type to bool.
3472 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3473 (require_user_regions): Adjust.
3474 (require_target_regions): Adjust.
3475 (create_mem_region): Adjust.
3476 (lookup_mem_region): Adjust.
3477 (invalidate_target_mem_regions): Adjust.
3478 (mem_clear): Rename to...
3479 (user_mem_clear): ... this, and adjust.
3480 (mem_command): Adjust.
3481 (info_mem_command): Adjust.
3482 (mem_enable, enable_mem_command, mem_disable,
3483 disable_mem_command): Adjust.
3484 (mem_delete): Adjust.
3485 (delete_mem_command): Adjust.
3486 * memory-map.h (parse_memory_map): Return an std::vector.
3487 * memory-map.c (parse_memory_map): Likewise.
3488 (struct memory_map_parsing_data): Add constructor.
3489 <memory_map>: Point to std::vector.
3490 (memory_map_start_memory): Adjust.
3491 (memory_map_end_memory): Adjust.
3492 (memory_map_end_property): Adjust.
3493 (clear_result): Remove.
3494 * remote.c (remote_memory_map): Return an std::vector.
3495 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3496 Remove.
3497 (target_debug_print_mem_region_vector): New.
3498 * target-delegates.c: Regenerate.
3499 * target.h (mem_region_vector): New typedef.
3500 (to_memory_map): Return mem_region_vector.
3501 (target_memory_map): Return an std::vector.
3502 * target.c (target_memory_map): Return an std::vector.
3503 (flash_erase_command): Adjust.
3504
3505 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3506
3507 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3508 Change type to std::string.
3509 (memory_map_start_property): Adjust.
3510 (memory_map_end_property): Adjust.
3511
3512 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3513
3514 * infrun.h: Include common/byte-vector.h.
3515 (struct displaced_step_closure): New struct.
3516 (struct buf_displaced_step_closure): New struct.
3517 * infrun.c (displaced_step_closure::~displaced_step_closure):
3518 Provide default implementation.
3519 (displaced_step_clear): Deallocate step closure with delete.
3520 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3521 (aarch64_displaced_step_closure): ... this, extend
3522 displaced_step_closure.
3523 (aarch64_displaced_step_data) <dsc>: Change type to
3524 aarch64_displaced_step_closure.
3525 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3526 unique_ptr.
3527 (aarch64_displaced_step_fixup): Add cast for displaced step
3528 closure.
3529 * amd64-tdep.c (displaced_step_closure): Rename to ...
3530 (amd64_displaced_step_closure): ... this, extend
3531 displaced_step_closure.
3532 <insn_buf>: Change type to std::vector<gdb_byte>.
3533 <max_len>: Remove.
3534 (fixup_riprel): Change type of DSC parameter, adjust to type
3535 change of insn_buf.
3536 (fixup_displaced_copy): Change type of DSC parameter.
3537 (amd64_displaced_step_copy_insn): Instantiate
3538 amd64_displaced_step_closure.
3539 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3540 to type change of insn_buf.
3541 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3542 parameter DSC.
3543 (arm_linux_copy_svc): Likewise.
3544 (cleanup_kernel_helper_return): Likewise.
3545 (arm_catch_kernel_helper_return): Likewise.
3546 (arm_linux_displaced_step_copy_insn): Instantiate
3547 arm_displaced_step_closure.
3548 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3549 (displaced_read_reg): Change type of parameter DSC.
3550 (branch_write_pc): Likewise.
3551 (load_write_pc): Likewise.
3552 (alu_write_pc): Likewise.
3553 (displaced_write_reg): Likewise.
3554 (arm_copy_unmodified): Likewise.
3555 (thumb_copy_unmodified_32bit): Likewise.
3556 (thumb_copy_unmodified_16bit): Likewise.
3557 (cleanup_preload): Likewise.
3558 (install_preload): Likewise.
3559 (arm_copy_preload): Likewise.
3560 (thumb2_copy_preload): Likewise.
3561 (install_preload_reg): Likewise.
3562 (arm_copy_preload_reg): Likewise.
3563 (cleanup_copro_load_store): Likewise.
3564 (install_copro_load_store): Likewise.
3565 (arm_copy_copro_load_store) Likewise.
3566 (thumb2_copy_copro_load_store): Likewise.
3567 (cleanup_branch): Likewise.
3568 (install_b_bl_blx): Likewise.
3569 (arm_copy_b_bl_blx): Likewise.
3570 (thumb2_copy_b_bl_blx): Likewise.
3571 (thumb_copy_b): Likewise.
3572 (install_bx_blx_reg): Likewise.
3573 (arm_copy_bx_blx_reg): Likewise.
3574 (thumb_copy_bx_blx_reg): Likewise.
3575 (cleanup_alu_imm): Likewise.
3576 (arm_copy_alu_imm): Likewise.
3577 (thumb2_copy_alu_imm): Likewise.
3578 (cleanup_alu_reg): Likewise.
3579 (install_alu_reg): Likewise.
3580 (arm_copy_alu_reg): Likewise.
3581 (thumb_copy_alu_reg): Likewise.
3582 (cleanup_alu_shifted_reg): Likewise.
3583 (install_alu_shifted_reg): Likewise.
3584 (arm_copy_alu_shifted_reg): Likewise.
3585 (cleanup_load): Likewise.
3586 (cleanup_store): Likewise.
3587 (arm_copy_extra_ld_st): Likewise.
3588 (install_load_store): Likewise.
3589 (thumb2_copy_load_literal): Likewise.
3590 (thumb2_copy_load_reg_imm): Likewise.
3591 (arm_copy_ldr_str_ldrb_strb): Likewise.
3592 (cleanup_block_load_all): Likewise.
3593 (cleanup_block_store_pc): Likewise.
3594 (cleanup_block_load_pc): Likewise.
3595 (arm_copy_block_xfer): Likewise.
3596 (thumb2_copy_block_xfer): Likewise.
3597 (cleanup_svc): Likewise.
3598 (install_svc): Likewise.
3599 (arm_copy_svc): Likewise.
3600 (thumb_copy_svc): Likewise.
3601 (arm_copy_undef): Likewise.
3602 (thumb_32bit_copy_undef): Likewise.
3603 (arm_copy_unpred): Likewise.
3604 (arm_decode_misc_memhint_neon): Likewise.
3605 (arm_decode_unconditional): Likewise.
3606 (arm_decode_miscellaneous): Likewise.
3607 (arm_decode_dp_misc): Likewise.
3608 (arm_decode_ld_st_word_ubyte): Likewise.
3609 (arm_decode_media): Likewise.
3610 (arm_decode_b_bl_ldmstm): Likewise.
3611 (arm_decode_ext_reg_ld_st): Likewise.
3612 (thumb2_decode_dp_shift_reg): Likewise.
3613 (thumb2_decode_ext_reg_ld_st): Likewise.
3614 (arm_decode_svc_copro): Likewise.
3615 (thumb2_decode_svc_copro): Likewise.
3616 (install_pc_relative): Likewise.
3617 (thumb_copy_pc_relative_16bit): Likewise.
3618 (thumb_decode_pc_relative_16bit): Likewise.
3619 (thumb_copy_pc_relative_32bit): Likewise.
3620 (thumb_copy_16bit_ldr_literal): Likewise.
3621 (thumb_copy_cbnz_cbz): Likewise.
3622 (thumb2_copy_table_branch): Likewise.
3623 (cleanup_pop_pc_16bit_all): Likewise.
3624 (thumb_copy_pop_pc_16bit): Likewise.
3625 (thumb_process_displaced_16bit_insn): Likewise.
3626 (decode_thumb_32bit_ld_mem_hints): Likewise.
3627 (thumb_process_displaced_32bit_insn): Likewise.
3628 (thumb_process_displaced_insn): Likewise.
3629 (arm_process_displaced_insn): Likewise.
3630 (arm_displaced_init_closure): Likewise.
3631 (arm_displaced_step_fixup): Add cast for closure.
3632 * arm-tdep.h: Include infrun.h.
3633 (displaced_step_closure): Rename to ...
3634 (arm_displaced_step_closure): ... this, extend
3635 displaced_step_closure.
3636 <u::svc::copy_svc_os>: Change type of parameter DSC.
3637 <cleanup>: Likewise.
3638 (arm_process_displaced_insn): Likewise.
3639 (arm_displaced_init_closure): Likewise.
3640 (displaced_read_reg): Likewise.
3641 (displaced_write_reg): Likewise.
3642 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3643 Adjust.
3644 * i386-tdep.h: Include infrun.h.
3645 (i386_displaced_step_closure): New typedef.
3646 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3647 i386_displaced_step_closure.
3648 (i386_displaced_step_fixup): Adjust.
3649 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3650 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3651 and unique_ptr.
3652 (ppc_displaced_step_fixup): Adjust.
3653 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3654 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3655 and unique_ptr.
3656 (s390_displaced_step_fixup): Adjust.
3657
3658 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3659
3660 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3661 Remove declarations.
3662
3663 2017-10-20 Tom Tromey <tom@tromey.com>
3664
3665 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3666 std::vector.
3667 (gdb_bfd_record_inclusion): Update.
3668 (bfdp): Remove typedef.
3669
3670 2017-10-20 Tom Tromey <tom@tromey.com>
3671
3672 * gdb_bfd.c (gdb_bfd_ref): Use new.
3673 (struct gdb_bfd_data): Add constructor, destructor, and member
3674 initializers.
3675 (gdb_bfd_unref): Use delete.
3676
3677 2017-10-20 Tom Tromey <tom@tromey.com>
3678
3679 * exec.c (exec_file_attach): Use new_bfd_ref.
3680 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3681 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3682 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3683 new_bfd_ref.
3684 * gdb_bfd.h (new_bfd_ref): New function.
3685
3686 2017-10-20 Pedro Alves <palves@redhat.com>
3687
3688 * main.c (captured_command_loop): Add attribute noinline.
3689
3690 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3691
3692 * interps.c (struct interp_factory): Add constructor.
3693 (interp_factory_p): Remove typedef.
3694 (DEF_VEC_P(interp_factory_p)): Remove.
3695 (interpreter_factories): Change type to std::vector.
3696 (interp_factory_register): Adjust.
3697 (interp_lookup): Adjust.
3698 (interpreter_completer): Adjust.
3699
3700 2017-10-19 Tom Tromey <tom@tromey.com>
3701
3702 * break-catch-syscall.c (catch_syscall_completer): Use
3703 std::string, gdb::unique_xmalloc_ptr.
3704
3705 2017-10-19 Tom Tromey <tom@tromey.com>
3706
3707 * infcall.c (call_function_by_hand_dummy): Use std::string.
3708
3709 2017-10-19 Tom Tromey <tom@tromey.com>
3710
3711 * mi/mi-main.c (mi_cmd_execute): Update.
3712 * top.h (prepare_execute_command): Return scoped_value_mark.
3713 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3714 Add move constructor.
3715 * top.c (prepare_execute_command): Return scoped_value_mark.
3716 (execute_command): Update.
3717
3718 2017-10-19 Pedro Alves <palves@redhat.com>
3719
3720 * xml-support.c (xml_fetch_content_from_file): Check fread's
3721 return.
3722
3723 2017-10-19 Pedro Alves <palves@redhat.com>
3724
3725 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3726 async.
3727 (handle_error_fd): New function.
3728 (ser_base_async): Add/delete an event loop file handler for
3729 error_fd.
3730
3731 2017-10-19 Pedro Alves <palves@redhat.com>
3732
3733 * xml-support.c (xml_fetch_content_from_file): Don't read in
3734 chunks. Instead use fseek to determine the file's size, and read
3735 it in one go.
3736
3737 2017-11-18 Keith Seitz <keiths@redhat.com>
3738
3739 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3740 types.
3741 Add whitespace to front of type name.
3742
3743 2017-10-18 Keith Seitz <keiths@redhat.com>
3744
3745 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3746 DW_AT_accessibility.
3747
3748 2017-10-18 Yao Qi <yao.qi@linaro.org>
3749
3750 * features/tic6x-c62x-linux.c: Remove.
3751
3752 2017-10-17 Tom Tromey <tom@tromey.com>
3753
3754 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3755 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3756 (do_mixed_source_and_assembly): Likewise.
3757
3758 2017-10-17 Tom Tromey <tom@tromey.com>
3759
3760 * regcache.c (regcache::xfer_part): Remove assertion.
3761
3762 2017-10-17 Pedro Alves <palves@redhat.com>
3763
3764 * xml-support.c (xml_fetch_content_from_file): Call
3765 unique_ptr::release() instead unique_ptr::get() when passing
3766 through xrealloc.
3767
3768 2017-10-17 Yao Qi <yao.qi@linaro.org>
3769
3770 * regcache.c (regcache::xfer_part): Remove parameters read and
3771 write, add parameter is_raw. All callers are updated.
3772
3773 2017-10-16 Keith Seitz <keiths@redhat.com>
3774
3775 * c-typeprint.c (enum access_specifier): Moved here from
3776 c_type_print_base.
3777 (output_access_specifier): New function.
3778 (c_type_print_base): Consider typedefs when assessing
3779 whether access labels are needed.
3780 Use output_access_specifier as needed.
3781 Output access specifier for typedefs, if needed.
3782 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3783 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3784 fields.
3785 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3786 accessor macros.
3787
3788 2017-10-16 Tom Tromey <tom@tromey.com>
3789
3790 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3791 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3792 * target.c (target_fileio_read_stralloc): Update.
3793 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3794 * target.h (target_fileio_read_stralloc): Return
3795 unique_xmalloc_ptr.
3796
3797 2017-10-16 Tom Tromey <tom@tromey.com>
3798
3799 * xml-syscall.c (xml_init_syscalls_info): Update.
3800 * xml-support.c (xinclude_start_include): Update.
3801 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3802 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3803 (xml_fetch_content_from_file): Likewise.
3804 * osdata.c (get_osdata): Update.
3805 * target.h (target_read_stralloc, target_get_osdata): Return
3806 unique_xmalloc_ptr.
3807 * solib-aix.c (solib_aix_get_library_list): Update.
3808 * solib-target.c (solib_target_current_sos): Update.
3809 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3810 * xml-tdesc.c (fetch_available_features_from_target): Update.
3811 (target_fetch_description_xml): Update.
3812 (file_read_description_xml): Update.
3813 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3814 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3815 (remote_pid_to_exec_file): Update.
3816 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3817 (target_get_osdata): Likewise.
3818
3819 2017-10-16 Tom Tromey <tom@tromey.com>
3820
3821 * remote.c (remote_register_number_and_offset): Use std::vector.
3822 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3823 (putpkt_binary): Use gdb::def_vector.
3824 (compare_sections_command): Use gdb::byte_vector.
3825
3826 2017-10-16 Tom Tromey <tom@tromey.com>
3827
3828 * ppc-linux-nat.c (hwdebug_insert_point): Use
3829 gdb::unique_xmalloc_ptr, XDUP.
3830
3831 2017-10-16 Tom Tromey <tom@tromey.com>
3832
3833 * probe.c (parse_probes): Use std::string.
3834 (info_probes_for_ops, enable_probes_command)
3835 (disable_probes_command): Remove cleanups.
3836
3837 2017-10-16 Tom Tromey <tom@tromey.com>
3838
3839 * buildsym.c (block_compar): Remove.
3840 (end_symtab_get_static_block): Use std::vector.
3841
3842 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3843
3844 * memrange.h (struct mem_range): Define operator< and operator==.
3845 (mem_range_s): Remove.
3846 (DEF_VEC_O (mem_range_s)): Remove.
3847 (normalize_mem_ranges): Change parameter type to std::vector.
3848 * memrange.c (compare_mem_ranges): Remove.
3849 (normalize_mem_ranges): Change parameter type to std::vector,
3850 adjust to vector change.
3851 * exec.c (section_table_available_memory): Return vector, remove
3852 parameter.
3853 (section_table_read_available_memory): Adjust to std::vector
3854 change.
3855 * remote.c (remote_read_bytes): Adjust to std::vector
3856 change.
3857 * tracepoint.h (traceframe_available_memory): Change parameter
3858 type to std::vector.
3859 * tracepoint.c (traceframe_available_memory): Change parameter
3860 type to std::vector, adjust.
3861 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3862 std::vector change.
3863 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3864 unittests/memrange-selftests.c.
3865 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3866 * gdb/unittests/memrange-selftests.c: New file.
3867
3868 2017-10-16 Pedro Alves <palves@redhat.com>
3869
3870 * elfread.c (probe_key_free): Rename range-for variable.
3871 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3872 (find_probe_by_pc, collect_probes): Rename range-for variable.
3873
3874 2017-10-16 Yao Qi <yao.qi@linaro.org>
3875
3876 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3877 * features/tic6x-c62x.c: Remove.
3878 * features/tic6x-c64x-linux.c: Remove.
3879 * features/tic6x-c64x.c: Remove.
3880 * features/tic6x-c64xp-linux.c: Remove.
3881 * features/tic6x-c64xp.c: Remove.
3882 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3883 initialize_tdesc_tic6x_*_linux functions.
3884 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3885 initialize_tdesc_tic6x_* functions.
3886
3887 2017-10-16 Yao Qi <yao.qi@linaro.org>
3888
3889 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3890 tic6x-c62x.
3891 * regformats/tic6x-c62x.dat: Remove.
3892 * regformats/tic6x-c64x.dat: Remove.
3893 * regformats/tic6x-c64xp.dat: Remove.
3894
3895 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3896
3897 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3898 (the !HAVE_LIBEXPAT version).
3899
3900 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3901
3902 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3903 const.
3904
3905 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3906
3907 * target.h: Include tracepoint.h.
3908 (enum trace_find_type): Move to tracepoint.h.
3909 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3910 * tracepoint.h: Don't include target.h
3911 (enum trace_find_type): Move from target.h.
3912 (parse_traceframe_info): Return a unique ptr.
3913 * tracepoint.c (current_traceframe_info): Change type to unique
3914 ptr.
3915 (free_traceframe_info): Remove.
3916 (clear_traceframe_info): Don't manually free
3917 current_traceframe_info.
3918 (free_result): Remove.
3919 (parse_traceframe_info): Return a unique ptr.
3920 (get_traceframe_info): Adjust to unique ptr.
3921 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3922 * remote.c (remote_traceframe_info): Return a unique ptr.
3923 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3924 ptr.
3925 * target-debug.h (target_debug_print_traceframe_info_up): New
3926 macro.
3927 * target-delegates.c: Regenerate.
3928
3929 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3930
3931 * memrange.h (struct mem_range): Add constructors.
3932 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3933 std::vector<mem_range>.
3934 * tracepoint.c (free_traceframe_info): Don't manually free
3935 vector.
3936 (traceframe_info_start_memory): Adjust to vector change.
3937 (traceframe_available_memory): Likewise.
3938 * tracefile-tfile.c (build_traceframe_info): Likewise.
3939 * ctf.c (ctf_traceframe_info): Likewise.
3940
3941 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3942
3943 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3944 std::vector<int>.
3945 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3946 (traceframe_info_start_tvar): Adjust to vector change.
3947 (parse_traceframe_info): Allocate with new.
3948 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3949 vector change.
3950 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3951 change.
3952 tfile_traceframe_info): Allocate with new.
3953 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3954 change.
3955
3956 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3957
3958 * tracepoint.c (traceframe_info): Rename to...
3959 (current_traceframe_info): ...this.
3960 (clear_traceframe_info): Adjust.
3961 (get_traceframe_info): Adjust.
3962
3963 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3964
3965 * nat/linux-osdata.c: Include algorithm.
3966 (compare_processes): Remove.
3967 (struct pid_pgid_entry): New struct.
3968 (linux_xfer_osdata_processgroups): Use std::vector instead of
3969 XNEWVEC.
3970
3971 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3972
3973 * objfiles.h: Don't include symfile.h.
3974 (struct partial_symbol): Remove forward-declaration.
3975 (struct objfile) <global_psymbols, static_psymbols>: Change type
3976 to std::vector<partial_symbol *>.
3977 * objfiles.c (objfile::objfile): Don't memset those fields.
3978 (objfile::~objfile): Don't free those fields.
3979 * psympriv.h (struct psymbol_allocation_list): Remove
3980 forward-declaration.
3981 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3982 to std::vector.
3983 (start_psymtab_common): Change parameters to std::vector.
3984 * psymtab.c: Include algorithm.
3985 (require_partial_symbols): Call shrink_to_fit.
3986 (find_pc_sect_psymbol): Adjust to vector change.
3987 (match_partial_symbol): Likewise.
3988 (lookup_partial_symbol): Likewise.
3989 (psym_relocate): Likewise.
3990 (dump_psymtab): Likewise.
3991 (recursively_search_psymtabs): Likewise.
3992 (compare_psymbols): Remove.
3993 (sort_pst_symbols): Adjust to vector change.
3994 (start_psymtab_common): Likewise.
3995 (end_psymtab_common): Likewise.
3996 (psymbol_bcache_full): De-constify return value.
3997 (add_psymbol_to_bcache): Likewise.
3998 (extend_psymbol_list): Remove.
3999 (append_psymbol_to_list): Adjust to vector change.
4000 (add_psymbol_to_list): Likewise.
4001 (init_psymbol_list): Likewise.
4002 (maintenance_info_psymtabs): Likewise.
4003 (maintenance_check_psymtabs): Likewise.
4004 * symfile.h (struct psymbol_allocation_list): Remove.
4005 * symfile.c (reread_symbols): Adjust to vector change.
4006 * dbxread.c (start_psymtab): Change type of parameters.
4007 (dbx_symfile_read): Adjust to vector change.
4008 (read_dbx_symtab): Likewise.
4009 (start_psymtab): Change type of parameters.
4010 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4011 (create_partial_symtab): Likewise.
4012 (add_partial_symbol): Likewise.
4013 (write_one_signatured_type): Likewise.
4014 (recursively_write_psymbols): Likewise.
4015 * mdebugread.c (parse_partial_symbols): Likewise.
4016 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4017 (scan_xcoff_symtab): Adjust to vector change.
4018 (xcoff_initial_scan): Likewise.
4019
4020 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4021
4022 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4023
4024 2017-10-13 Yao Qi <yao.qi@linaro.org>
4025
4026 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4027 Remove s390x-*-expedite, add s390x-expedite.
4028
4029 2017-10-13 Yao Qi <yao.qi@linaro.org>
4030
4031 * features/s390-gs-linux64.c: Regenerated.
4032 * features/s390x-gs-linux64.c: Regenerated.
4033
4034 2017-10-13 Tom Tromey <tom@tromey.com>
4035
4036 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4037 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4038 delete.
4039 * symfile.c (symbol_file_add_with_addrs): Use new.
4040 (symbol_file_add_separate): Update comment.
4041 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4042 * jit.c (jit_object_close_impl): Use new.
4043 (jit_unregister_code): Use delete.
4044 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4045 (~objfile): Rename from free_objfile.
4046 (free_objfile_separate_debug, do_free_objfile_cleanup)
4047 (free_all_objfiles, objfile_purge_solibs): Use delete.
4048 * objfiles.h (struct objfile): Add constructor and destructor.
4049 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4050 (allocate_objfile, free_objfile): Don't declare.
4051 (struct objstats): Add initializers.
4052
4053 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4054
4055 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4056 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4057 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4058 * gdbarch.h: Regenerate.
4059 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4060 Adjust comment.
4061 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4062 (i386_displaced_step_fixup): Adjust comment.
4063 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4064
4065 2017-10-12 Tom Tromey <tom@tromey.com>
4066
4067 * prologue-value.h (pv_area::store_would_trash): Return bool.
4068 (pv_area::find_reg): Likewise.
4069 * prologue-value.c (pv_area::store_would_trash): Return bool.
4070 (pv_area::find_reg): Likewise.
4071
4072 2017-10-12 Tom Tromey <tom@tromey.com>
4073
4074 * s390-linux-tdep.c (s390_store, s390_load)
4075 (s390_check_for_saved, s390_analyze_prologue): Update.
4076 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4077 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4078 * prologue-value.h (class pv_area): Move from prologue-value.c.
4079 Change names of members. Add constructor, destructor, member
4080 functions.
4081 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4082 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4083 (pv_area_fetch, pv_area_scan): Don't declare.
4084 * prologue-value.c (struct pv_area::area_entry): Now member of
4085 pv_area.
4086 (struct pv_area): Move to prologue-value.h.
4087 (pv_area::pv_area): Rename from make_pv_area.
4088 (pv_area::~pv_area): Rename from free_pv_area.
4089 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4090 (clear_entries, find_entry, overlaps, store_would_trash, store)
4091 (fetch, find_reg, scan): Now member of pv_area.
4092 Remove "area" argument. Update.
4093 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4094 Update.
4095 * mn10300-tdep.c (push_reg, check_for_saved)
4096 (mn10300_analyze_prologue): Update.
4097 * mep-tdep.c (is_arg_spill, check_for_saved)
4098 (mep_analyze_prologue): Update.
4099 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4100 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4101 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4102 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4103 Update.
4104 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4105 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4106
4107 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4108
4109 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4110 * linux-nat.c (linux_nat_delete_thread): New variable.
4111 (lwp_free): Invoke linux_nat_delete_thread if set.
4112 (linux_nat_set_delete_thread): New function.
4113 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4114 thread delete callback.
4115 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4116 (_initialize_arm_linux_nat): Assign thread delete callback.
4117 * s390-linux-nat.c (s390_delete_thread): New function.
4118 (_initialize_s390_nat): Assign thread delete callback.
4119 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4120 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4121 function.
4122 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4123 declaration.
4124 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4125 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4126
4127 2017-10-09 Tom Tromey <tom@tromey.com>
4128
4129 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4130 std::string.
4131 * tui/tui-layout.c (enum tui_status): Use std::string.
4132
4133 2017-10-11 Tom Tromey <tom@tromey.com>
4134
4135 * gdbthread.h (thread_command): Constify.
4136 * inferior.h (detach_command): Constify.
4137 * top.h (set_history, show_history): Constify.
4138 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4139 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4140 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4141 * printcmd.c (set_command): Constify.
4142 (non_const_set_command): New function.
4143 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4144 * breakpoint.c (enable_command, disable_command, delete_command)
4145 (catch_command, tcatch_command, set_breakpoint_cmd)
4146 (show_breakpoint_cmd): Constify.
4147 * macrocmd.c (macro_command): Constify.
4148 * infcmd.c (unset_command, kill_command, detach_command)
4149 (info_proc_cmd): Constify.
4150 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4151 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4152 (info_auto_load_cmd): Constify.
4153 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4154 (unset_tdesc_cmd): Constify.
4155 * ada-lang.c (set_ada_command, show_ada_command)
4156 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4157 * guile/guile.c (set_guile_command, show_guile_command)
4158 (info_guile_command): Constify.
4159 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4160 Constify.
4161 * skip.c (skip_command): Constify.
4162 * compile/compile.c (_initialize_compile): Constify.
4163 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4164 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4165 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4166 (maint_btrace_pt_show_cmd): Constify.
4167 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4168 Constify.
4169 * python/python.c (user_show_python, user_set_python): Constify.
4170 * mips-tdep.c (set_mips_command, show_mips_command)
4171 (set_mipsfpu_command): Constify.
4172 * record-btrace.c (cmd_record_btrace_start)
4173 (cmd_set_record_btrace, cmd_show_record_btrace)
4174 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4175 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4176 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4177 Constify.
4178 * symfile.c (overlay_command): Constify.
4179 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4180 * cli/cli-logging.c (set_logging_command, show_logging_command):
4181 Constify.
4182 * cli/cli-dump.c (dump_command, append_command)
4183 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4184 (tekhex_dump_command, binary_dump_command)
4185 (binary_append_command): Constify.
4186 * cli/cli-decode.c (struct cmd_list_element): Change type of
4187 "fun".
4188 * cli/cli-cmds.c (info_command, show_command, set_debug)
4189 (show_debug): Constify.
4190 (show_command): Add non-const overload.
4191 * top.c (set_history, show_history): Constify.
4192 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4193 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4194 * target.c (target_command): Constify.
4195 * sparc64-tdep.c (info_adi_command): Constify.
4196 * record-full.c (cmd_record_full_start): Constify.
4197 (set_record_full_command): Constify. Fix typo.
4198 (show_record_full_command): Constify.
4199 * thread.c (thread_command, thread_apply_command): Constify.
4200 * memattr.c (dummy_cmd): Constify.
4201 * value.c (function_command): Constify.
4202 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4203 * probe.c (info_probes_command): Constify.
4204 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4205 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4206 (show_thread_cmd, set_thread_default_cmd)
4207 (show_thread_default_cmd): Constify.
4208 (check_empty): Constify.
4209 * tracepoint.c (tfind_command): Constify.
4210 * cp-support.c (maint_cplus_command): Constify.
4211 * windows-tdep.c (info_w32_command): Constify.
4212 * record.c (cmd_record_start, set_record_command)
4213 (show_record_command, info_record_command, cmd_record_goto):
4214 Constify.
4215 * ravenscar-thread.c (set_ravenscar_command)
4216 (show_ravenscar_command): Constify.
4217 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4218 Constify.
4219 (add_internal_problem_command): Remove casts.
4220 * arc-tdep.c (maintenance_print_arc_command): Constify.
4221 * valprint.c (set_print, show_print, set_print_raw)
4222 (show_print_raw): Constify.
4223 * maint.c (maintenance_command, maintenance_info_command)
4224 (maintenance_print_command, maintenance_set_cmd)
4225 (maintenance_show_cmd, set_per_command_cmd)
4226 (show_per_command_cmd, maintenance_check_command): Constify.
4227 * language.c (set_check, show_check): Constify.
4228 * typeprint.c (show_print_type, set_print_type): Constify.
4229 * go32-nat.c (go32_info_dos_command): Constify.
4230
4231 2017-10-11 Tom Tromey <tom@tromey.com>
4232
4233 * breakpoint.c (prepare_re_set_context): Remove.
4234 (breakpoint_re_set_one): Update. Don't use cleanups.
4235 (breakpoint_re_set): Use scoped_restore, std::string, and
4236 scoped_restore_current_language.
4237
4238 2017-10-11 Tom Tromey <tom@tromey.com>
4239
4240 * breakpoint.c (commands_command_1): Use std::string.
4241 (cleanup_executing_breakpoints): Remove.
4242 (bpstat_do_actions_1): Use scoped_restore.
4243 (bpstat_check_watchpoint): Use std::string.
4244 (decode_static_tracepoint_spec): Likewise.
4245 (break_range_command): Likewise.
4246 (watch_command_1): Likewise.
4247 (compare_breakpoints): Change argument types.
4248 (clear_command): Use std::vector.
4249 (cleanup_executing_breakpoints): Remove.
4250 (update_global_location_list): Use unique_xmalloc_ptr.
4251 (strace_command): Remove unused declaration.
4252
4253 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4254
4255 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4256 * NEWS: Mention new FreeBSD/arm native configuration.
4257 * configure.host: Add arm*-*-freebsd*.
4258 * configure.nat: Likewise.
4259 * arm-fbsd-nat.c: New file.
4260
4261 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4262
4263 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4264 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4265 * NEWS: Mention new FreeBSD/arm target.
4266 * configure.tgt: Add arm*-*-freebsd*.
4267 * arm-fbsd-tdep.c: New file.
4268 * arm-fbsd-tdep.h: New file.
4269
4270 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4271
4272 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4273 `gdbarch_elfcore_write_linux_prpsinfo'.
4274 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4275 method.
4276 (elf_internal_linux_prpsinfo): Remove declaration.
4277 * gdbarch.h: Regenerate.
4278 * gdbarch.c: Regenerate.
4279
4280 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4281
4282 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4283 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4284
4285 2017-10-11 Pedro Alves <palves@redhat.com>
4286
4287 * breakpoint.c (reattach_breakpoints): Delete.
4288 * breakpoint.h (reattach_breakpoints): Delete.
4289
4290 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4291
4292 * symfile.c (registered_sym_fns): Make struct, not typedef.
4293 (DEF_VEC_O (registered_sym_fns)): Remove.
4294 (symtab_fns): Change type to std::vector.
4295 (add_symtab_fns): Adjust.
4296 (find_sym_fns): Adjust.
4297
4298 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4299
4300 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4301 * arc-tdep.h (arc_arch_is_em): New function.
4302 (arc_arch_is_hs): Likewise.
4303
4304 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4305
4306 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4307 parentheses in the declaration.
4308 (macro_lookup_inclusion): Likewise.
4309 (macro_lookup_definition): Likewise.
4310 * p-lang.h (pascal_builtin_types): Likewise.
4311 * tui/tui-data.c (tui_win_list): Likewise.
4312 * tui/tui-data.h (tui_win_list): Likewise.
4313 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4314
4315 2017-10-11 Mark Rages <markrages@gmail.com>
4316
4317 * target-memory.c (block_boundaries): Fix for block address not
4318 aligned on block size.
4319
4320 2017-10-10 Pedro Alves <palves@redhat.com>
4321 Tom Tromey <tom@tromey.com>
4322
4323 * breakpoint.c (struct captured_breakpoint_query_args)
4324 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4325 (print_breakpoint): New.
4326 * breakpoint.h (print_breakpoint): Declare.
4327 * common/common-exceptions.h (enum return_reason): Remove
4328 references to catch_exceptions.
4329 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4330 Delete.
4331 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4332 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4333 * gdb.h: Delete.
4334 * gdbthread.h (thread_select): Declare.
4335 * mi/mi-cmd-break.c: Don't include gdb.h.
4336 (breakpoint_notify): Use print_breakpoint.
4337 * mi/mi-cmd-catch.c: Don't include gdb.h.
4338 * mi/mi-interp.c: Don't include gdb.h.
4339 (mi_print_breakpoint_for_event): New.
4340 (mi_breakpoint_created, mi_breakpoint_modified): Use
4341 mi_print_breakpoint_for_event.
4342 * mi/mi-main.c: Don't include gdb.h.
4343 (mi_cmd_thread_select): Parse the global thread ID here. Use
4344 thread_select instead of gdb_thread_select.
4345 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4346 of using gdb_list_thread_ids.
4347 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4348 FILEIO_ENOSYS here.
4349 (remote_fileio_request): Use TRY/CATCH instead of
4350 catch_exceptions.
4351 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4352 (symbol_file_add_from_memory_wrapper): Delete.
4353 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4354 * thread.c: Don't include gdb.h.
4355 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4356 (thread_alive): Use thread_select.
4357 (do_captured_thread_select): Delete, parts salvaged as ...
4358 (thread_select): ... this new function.
4359 (gdb_thread_select): Delete.
4360
4361 2017-10-10 Pedro Alves <palves@redhat.com>
4362 Tom Tromey <tom@tromey.com>
4363
4364 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4365 and reverse logic.
4366 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4367 No longer macros. Instead ...
4368 (enum wp_check_result): They're now values of this new
4369 enumeration.
4370 (watchpoint_check): Change return type to wp_check_result and
4371 parameter type to bpstat.
4372 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4373 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4374 catch_errors. Reverse logic of watchpoint_check call.
4375 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4376 pointer as parameter.
4377 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4378 * common/common-exceptions.c (throw_exception_sjlj): Update
4379 comments to avoid mentioning catch_errors.
4380 * exceptions.c (catch_errors): Delete.
4381 * exceptions.h: Update comments to avoid mentioning catch_errors.
4382 (catch_errors_ftype, catch_errors): Delete.
4383 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4384 (hook_stop_stub): Delete.
4385 (restore_selected_frame): Change return type to void, and
4386 parameter type to const frame_id &.
4387 (restore_infcall_control_state): Use TRY/CATCH instead of
4388 catch_errors.
4389 * main.c (captured_command_loop): Return void and remove
4390 parameter. Remove references to catch_errors.
4391 (captured_main): Use TRY/CATCH instead of catch_errors.
4392 * objc-lang.c (objc_submethod_helper_data)
4393 (find_objc_msgcall_submethod_helper): Delete.
4394 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4395 catch_errors.
4396 * record-full.c (record_full_message): Return void.
4397 (record_full_message_args, record_full_message_wrapper): Delete.
4398 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4399 instead of catch_errors.
4400 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4401 parameter type to int.
4402 * solib-darwin.c (open_symbol_file_object): Ditto.
4403 * solib-dsbt.c (open_symbol_file_object): Ditto.
4404 * solib-frv.c (open_symbol_file_object): Ditto.
4405 * solib-svr4.c (open_symbol_file_object): Ditto.
4406 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4407 * solib.c (update_solib_list): Use TRY/CATCH instead of
4408 catch_errors.
4409 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4410 Change type.
4411 * symmisc.c (struct print_symbol_args): Remove.
4412 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4413 (print_symbol): Change type.
4414 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4415 and remove parameters.
4416 (catch_errors): New.
4417 (get_windows_debug_event): Adjust.
4418
4419 2017-10-09 Tom Tromey <tom@tromey.com>
4420
4421 * mi/mi-main.c (free_splay_tree): Remove.
4422 (list_available_thread_groups): Use splay_tree_up.
4423 * common/gdb_splay_tree.h: New file.
4424
4425 2017-10-09 Tom Tromey <tom@tromey.com>
4426
4427 * mi/mi-main.c (do_nothing): Remove.
4428 (list_available_thread_groups): Update.
4429
4430 2017-10-09 Pedro Alves <palves@redhat.com>
4431
4432 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4433 reading registers when switching context.
4434
4435 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4436
4437 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4438 (fbsd_convert_siginfo): Likewise.
4439 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4440
4441 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4442
4443 * configure.ac (try_guile_versions): Remove guile-2.2.
4444 * configure: Regenerate.
4445
4446 2017-10-09 Tom Tromey <tom@tromey.com>
4447
4448 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4449 (COMPILE.pre): Use $(CXX).
4450
4451 2017-10-09 Pedro Alves <palves@redhat.com>
4452
4453 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4454 Use bool.
4455 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4456 * cp-support.h (cp_remove_params): Now returns a
4457 gdb::unique_xmalloc_ptr.
4458 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4459 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4460 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4461 returning a gdb::unique_xmalloc_ptr.
4462 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4463 * stack.c (find_frame_funname): Adjust to cp_remove_params
4464 returning a gdb::unique_xmalloc_ptr.
4465
4466 2017-10-08 Tom Tromey <tom@tromey.com>
4467
4468 * dwarf2read.c (dwarf2_get_dwz_file): Use
4469 gdb::unique_xmalloc_ptr.
4470 (find_slot_in_mapped_hash): Likewise.
4471 (dwarf2_physname): Likewise.
4472 (create_dwo_unit_in_dwp_v1): Use std::string.
4473 (create_dwo_unit_in_dwp_v2): Likewise.
4474 (lookup_dwo_cutu): Likewise.
4475 (inherit_abstract_dies): Use std::vector.
4476 (read_array_type): Likewise.
4477 (dwarf_decode_macros): Remove unused declaration.
4478 (unsigned_int_compar): Remove.
4479 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4480 (psymtabs_addrmap_cleanup): Remove.
4481
4482 2017-10-08 Tom Tromey <tom@tromey.com>
4483
4484 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4485 * frame.h (frame_cleanup_after_sniffer): Declare.
4486 (frame_prepare_for_sniffer): Return void.
4487 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4488 type of argument.
4489 (frame_prepare_for_sniffer): Return void.
4490
4491 2017-10-08 Tom Tromey <tom@tromey.com>
4492
4493 * utils.h (make_cleanup_value_free): Remove.
4494 * utils.c (do_value_free, struct cleanup): Remove.
4495 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4496 Use gdb_value_up.
4497 * value.h (struct value_deleter): New.
4498 (gdb_value_up): New typedef.
4499
4500 2017-10-08 Tom Tromey <tom@tromey.com>
4501
4502 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4503 (make_cleanup_free_search_symbols): Remove.
4504 (search_symbols): Return std::vector.
4505 (symbol_search::compare_search_syms): Now member of
4506 symbol_search. Change arguments.
4507 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4508 (symtab_symbol_info, rbreak_command): Update.
4509 * symtab.h (struct symbol_search) <next>: Remove.
4510 Add constructors.
4511 (symbol_search::operator<): New function.
4512 (symbol_search::operator==): New function.
4513 (search_symbols): Remove std::vector.
4514 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4515 (symbol_search::compare_search_syms): Declare.
4516
4517 2017-10-06 Yao Qi <yao.qi@linaro.org>
4518
4519 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4520 arch/aarch64-insn.o.
4521 Remove one rule.
4522 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4523
4524 2017-10-06 Yao Qi <yao.qi@linaro.org>
4525
4526 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4527 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4528 arch/arm-linux.o respectively.
4529 * configure.tgt: Likewise.
4530
4531 2017-10-06 Yao Qi <yao.qi@linaro.org>
4532
4533 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4534 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4535
4536 2017-10-06 Pedro Alves <palves@redhat.com>
4537
4538 * windows-nat.c: Include <algorithm>.
4539
4540 2017-10-06 Yao Qi <yao.qi@linaro.org>
4541
4542 * configure.tgt (i386_tobjs): New variable.
4543 (amd64_tobjs): New variable.
4544 Set $cpu_obs and $os_obs.
4545
4546 2017-10-06 Yao Qi <yao.qi@linaro.org>
4547
4548 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4549 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4550 (clean): Remove object files and dependency files.
4551 (distclean): Remove the directory.
4552 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4553 * configure: Re-generated.
4554 * configure.tgt: Replace amd64.o with arch/amd64.o.
4555
4556 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4557
4558 PR build/22188
4559 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4560 and SETEND.
4561
4562 2017-10-05 Pedro Alves <palves@redhat.com>
4563
4564 * linux-nat.c (linux_child_follow_fork): When following the parent
4565 and detaching the child, consult the parent thread's architecture
4566 instead of the child's.
4567
4568 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4569
4570 * ax.h: Do not include "doublest.h".
4571 (union agent_val): Remove.
4572
4573 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4574
4575 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4576 (decimal_to_string): Return std::string object.
4577 (decimal_from_string): Accept std::string object. Return bool.
4578 (decimal_from_integral, decimal_from_doublest): Remove.
4579 (decimal_from_longest): Add prototype.
4580 (decimal_from_ulongest): Likewise.
4581 (decimal_to_longest): Likewise.
4582 (decimal_from_doublest): Likewise.
4583 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4584 (MAX_DECIMAL_STRING): Move here.
4585 (decimal_to_string): Return std::string object.
4586 (decimal_from_string): Accept std::string object. Return bool.
4587 (decimal_from_integral): Remove, replace by ...
4588 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4589 (decimal_to_longest): New function.
4590 (decimal_from_floating): Remove, replace by ...
4591 (decimal_from_doublest): ... this new function.
4592 (decimal_to_doublest): Update to new decimal_to_string interface.
4593
4594 * value.c (unpack_long): Use decimal_to_longest.
4595 * valops.c (value_cast): Use decimal_from_doublest instead of
4596 decimal_from_floating. Use decimal_from_[u]longest isntead of
4597 decimal_from_integral.
4598 * valarith.c (value_args_as_decimal): Likewise.
4599 * valprint.c (print_decimal_floating): Update to new
4600 decimal_to_string interface.
4601 * printcmd.c (printf_decfloat): Likewise.
4602 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4603
4604 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4605
4606 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4607 * gdbtypes.c: Include "floatformat.h".
4608 * value.c: Likewise.
4609 * m68k-tdep.c: Likewise.
4610
4611 * findvar.c: Do not include "floatformat.h".
4612 * amd64-darwin-tdep.c: Likewise.
4613 * arm-linux-tdep.c: Likewise.
4614 * i386-darwin-tdep.c: Likewise.
4615 * i387-tdep.c: Likewise.
4616 * m68k-linux-tdep.c: Likewise.
4617 * mep-tdep.c: Likewise.
4618 * mips-tdep.c: Likewise.
4619 * nios2-tdep.c: Likewise.
4620 * s390-linux-tdep.c: Likewise.
4621 * sparc-obsd-tdep.c: Likewise.
4622 * sparc-tdep.c: Likewise.
4623 * sparc64-tdep.c: Likewise.
4624 * spu-tdep.c: Likewise.
4625 * tic6x-tdep.c: Likewise.
4626 * tilegx-tdep.c: Likewise.
4627 * vax-tdep.c: Likewise.
4628 * xstormy16-tdep.c: Likewise.
4629 * xtensa-tdep.c: Likewise.
4630
4631 * top.c: Do not include "doublest.h".
4632 * aarch64-tdep.c: Likewise.
4633 * alpha-tdep.c: Likewise.
4634 * arm-linux-tdep.c: Likewise.
4635 * m68k-linux-tdep.c: Likewise.
4636 * tilegx-tdep.c: Likewise.
4637 * xstormy16-tdep.c: Likewise.
4638
4639 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4640
4641 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4642 (mipsn32_fbsd_sigframe): Define.
4643 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4644 for FreeBSD/mipsn32.
4645
4646 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4647
4648 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4649 AT_HWCAP.
4650
4651 2017-10-05 Tristan Gingold <tgingold@free.fr>
4652
4653 * MAINTAINERS (Misc): Update my email address.
4654
4655 2017-10-04 Pedro Alves <palves@redhat.com>
4656
4657 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4658 it instead of target_gdbarch.
4659 (get_remote_state, get_remote_packet_size): Adjust
4660 get_remote_arch_state calls, passing down target_gdbarch
4661 explicitly.
4662 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4663 'gdbarch' and use it instead of target_gdbarch.
4664 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4665 passing down target_gdbarch explicitly.
4666 (struct stop_reply) <arch>: New field.
4667 (remote_parse_stop_reply): Use the stopped thread's architecture,
4668 not the current inferior's. Save the architecture in the
4669 stop_reply.
4670 (process_stop_reply): Use the stop reply's architecture.
4671 (process_g_packet, remote_fetch_registers)
4672 (remote_prepare_to_store, store_registers_using_G)
4673 (remote_store_registers): Adjust get_remote_arch_state calls,
4674 using the regcache's architecture.
4675 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4676 passing down target_gdbarch explicitly.
4677 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4678 beneath instead of calling target_gdbarch.
4679 * target.c (default_thread_architecture): Use the specified
4680 inferior's architecture, instead of the current inferior's
4681 architecture (via target_gdbarch).
4682
4683 2017-10-04 Pedro Alves <palves@redhat.com>
4684
4685 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4686 case.
4687 (regcache_print): Handle !target_has_registers here instead.
4688
4689 2017-10-04 Pedro Alves <palves@redhat.com>
4690
4691 * frame.c (create_test_frame): Delete.
4692 * frame.h (create_test_frame): Delete.
4693 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4694 (class regcache_test): Delete.
4695 (test_target_has_registers, test_target_has_stack)
4696 (test_target_has_memory, test_target_prepare_to_store)
4697 (test_target_store_registers): New functions.
4698 (test_target_ops): New class.
4699 (register_to_value_test): Error out if there's already a
4700 process_stratum (or higher) target pushed. Create a fuller mock
4701 environment, with mock target_ops, inferior, address space, thread
4702 and inferior_ptid.
4703 * progspace.c (struct address_space): Move to ...
4704 * progspace.h (struct address_space): ... here.
4705 * regcache.h (regcache::~regcache, regcache::raw_write)
4706 [GDB_SELF_TEST]: No longer virtual.
4707
4708 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4709
4710 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4711
4712 2017-10-04 Pedro Alves <palves@redhat.com>
4713
4714 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4715 out of 'between TRY and CATCH'.
4716
4717 2017-10-04 Pedro Alves <palves@redhat.com>
4718
4719 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4720 * common/common-exceptions.h (TRY): Open an outermost scope.
4721 Expand intro comment.
4722 (CATCH): Reindent.
4723 (END_CATCH): Close the outermost scope.
4724 * completer.c (complete_line_internal): Add missing END_CATCH.
4725
4726 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4727
4728 * NEWS (Changes since GDB 8.0): Add entry about new
4729 'set-cwd-on-gdbserver' feature.
4730 (New remote packets): Add entry for QSetWorkingDir.
4731 * common/common-inferior.h (set_inferior_cwd): New prototype.
4732 * infcmd.c (set_inferior_cwd): Remove "static".
4733 (show_cwd_command): Expand text to include remote debugging.
4734 * remote.c: Add PACKET_QSetWorkingDir.
4735 (remote_protocol_features) <QSetWorkingDir>: New entry for
4736 PACKET_QSetWorkingDir.
4737 (extended_remote_set_inferior_cwd): New function.
4738 (extended_remote_create_inferior): Call
4739 "extended_remote_set_inferior_cwd".
4740 (_initialize_remote): Call "add_packet_config_cmd" for
4741 QSetWorkingDir.
4742
4743 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4744
4745 * NEWS (New commands): Mention "set/show cwd".
4746 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4747 "cd" command's help text.
4748 * common/common-inferior.h (get_inferior_cwd): New prototype.
4749 * infcmd.c (inferior_cwd_scratch): New global variable.
4750 (set_inferior_cwd): New function.
4751 (get_inferior_cwd): Likewise.
4752 (set_cwd_command): Likewise.
4753 (show_cwd_command): Likewise.
4754 (_initialize_infcmd): Add "set/show cwd" commands.
4755 * inferior.h (class inferior) <cwd>: New field.
4756 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4757 (fork_inferior): Change inferior's cwd before its execution.
4758 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4759 to CreateProcess.
4760
4761 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4762
4763 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4764 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4765 (COMMON_OBS): Add gdb_tilde_expand.o.
4766 * common/gdb_tilde_expand.c: New file.
4767 * common/gdb_tilde_expand.h: Likewise.
4768
4769 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4770
4771 * gdbarch.sh (objfile): Remove duplicate declaration.
4772 * gdbarch.h: Regenerate.
4773
4774 2017-10-03 Tom Tromey <tom@tromey.com>
4775
4776 * utils.c (internal_vproblem): Use string_vprintf.
4777
4778 2017-10-03 Tom Tromey <tom@tromey.com>
4779
4780 * printcmd.c (info_symbol_command): Use std::string.
4781
4782 2017-10-03 Tom Tromey <tom@tromey.com>
4783
4784 * top.c (gdb_safe_append_history): Use std::string.
4785
4786 2017-10-03 Tom Tromey <tom@tromey.com>
4787
4788 * event-top.c (stdin_event_handler): Update.
4789 * main.c (captured_main_1): Update.
4790 * top.h (make_delete_ui_cleanup): Remove.
4791 (struct ui): Add constructor and destructor.
4792 (new_ui, delete_ui): Remove.
4793 * top.c (make_delete_ui_cleanup): Remove.
4794 (new_ui_command): Use std::unique_ptr.
4795 (delete_ui_cleanup): Remove.
4796 (ui::ui): Rename from new_ui. Update.
4797 (free_ui): Remove.
4798 (ui::~ui): Rename from delete_ui. Update.
4799
4800 2017-10-03 Tom Tromey <tom@tromey.com>
4801
4802 * symfile.c (load_progress): Use gdb::byte_vector.
4803
4804 2017-10-03 Tom Tromey <tom@tromey.com>
4805
4806 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4807 declaration.
4808 * printcmd.c (x_command): Remove unused declaration.
4809 * symfile.c (symbol_file_command): Remove unused declaration.
4810
4811 2017-10-03 Tom Tromey <tom@tromey.com>
4812
4813 * utils.c (internal_vproblem): Use std::string.
4814 (defaulted_query): Likewise.
4815
4816 2017-10-03 Tom Tromey <tom@tromey.com>
4817
4818 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4819 * top.c (execute_command_to_string): Update.
4820 * utils.c (make_cleanup_restore_page_info): Remove.
4821 (do_restore_page_info_cleanup): Remove.
4822 (set_batch_flag_and_restore_page_info):
4823 New.
4824 (make_cleanup_restore_page_info): Remove.
4825 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4826 (~set_batch_flag_and_restore_page_info): New
4827 (make_cleanup_restore_uinteger): Remove.
4828 (make_cleanup_restore_integer): Remove.
4829 (struct restore_integer_closure): Remove.
4830 (restore_integer): Remove.
4831 * utils.h (struct set_batch_flag_and_restore_page_info): New
4832 class.
4833 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4834 (make_cleanup_restore_page_info): Remove.
4835 (make_cleanup_restore_uinteger) Remove.
4836 (make_cleanup_restore_integer) Remove.
4837
4838 2017-10-03 Tom Tromey <tom@tromey.com>
4839
4840 * record-full.h (record_full_gdb_operation_disable_set): Return
4841 scoped_restore_tmpl<int>.
4842 * infrun.c (adjust_pc_after_break): Update.
4843 (handle_signal_stop): Update.
4844 * record-full.c (record_full_gdb_operation_disable_set): Return
4845 scoped_restore_tmpl<int>.
4846 (record_full_wait_1, record_full_insert_breakpoint)
4847 (record_full_remove_breakpoint, record_full_save)
4848 (record_full_goto_insn): Update.
4849
4850 2017-10-02 Tom Tromey <tom@tromey.com>
4851
4852 PR rust/22236:
4853 * rust-lang.c (rust_val_print_str): New function.
4854 (val_print_struct): Call it.
4855 (rust_subscript): Preserve name of slice type.
4856
4857 2017-10-02 Tom Tromey <tom@tromey.com>
4858
4859 * rust-lang.c (rust_subscript): Handle slices in
4860 EVAL_AVOID_SIDE_EFFECTS case.
4861
4862 2017-10-02 Tom Tromey <tom@tromey.com>
4863
4864 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4865
4866 2017-10-02 Tom Tromey <tom@tromey.com>
4867
4868 * rust-lang.h (rust_slice_type): Add "extern".
4869
4870 2017-10-02 Tom Tromey <tom@tromey.com>
4871 Pedro Alves <palves@redhat.com>
4872
4873 * ada-lang.h (ada_exc_info::operator<): Make const.
4874 (ada_exc_info::operator==): Make const.
4875 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4876 Make const.
4877
4878 2017-09-29 Tom Tromey <tom@tromey.com>
4879
4880 * target.c (read_whatever_is_readable): Change type of "result".
4881 Update.
4882 (free_memory_read_result_vector): Remove.
4883 (read_memory_robust): Change return type. Update.
4884 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4885 bin2hex, std::string.
4886 * target.h (memory_read_result_s): Remove typedef.
4887 (free_memory_read_result_vector): Remove.
4888 (read_memory_robust): Return std::vector.
4889
4890 2017-09-29 Tom Tromey <tom@tromey.com>
4891
4892 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4893
4894 2017-09-29 Tom Tromey <tom@tromey.com>
4895
4896 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4897 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4898 operator< and operator==.
4899 (ada_exceptions_list): Return a std::vector.
4900 * ada-lang.c (ada_exc_info::operator<): Rename from
4901 compare_ada_exception_info.
4902 (ada_exc_info::operator==): New.
4903 (sort_remove_dups_ada_exceptions_list): Change type of
4904 "exceptions".
4905 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4906 (ada_add_global_exceptions): Likewise.
4907 (ada_exceptions_list_1): Return a std::vector.
4908 (ada_exceptions_list): Likewise.
4909
4910 2017-09-29 Tom Tromey <tom@tromey.com>
4911
4912 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4913 'std::set *'.
4914 (print_one_inferior): Update.
4915 (free_vector_of_ints): Remove.
4916 (list_available_thread_groups): Change "ids" to std::set.
4917 (mi_cmd_list_thread_groups): Update.
4918 (struct collect_cores_data) <core>: Now a std::set.
4919 (collect_cores): Update.
4920 (unique): Remove.
4921 (print_one_inferior): Update.
4922
4923 2017-09-29 Tom Tromey <tom@tromey.com>
4924
4925 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4926 (mi_execute_async_cli_command): Likewise.
4927 (mi_cmd_trace_frame_collected): Use field_fmt.
4928
4929 2017-09-29 Tom Tromey <tom@tromey.com>
4930
4931 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4932 gdb::byte_vector.
4933
4934 2017-09-29 Tom Tromey <tom@tromey.com>
4935
4936 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4937
4938 2017-09-29 Tom Tromey <tom@tromey.com>
4939
4940 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4941
4942 2017-09-29 Tom Tromey <tom@tromey.com>
4943
4944 * varobj.h (varobj_gen_name): Return std::string.
4945 * varobj.c (varobj_gen_name): Return std::string.
4946 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4947 (mi_cmd_var_delete): Don't copy "name".
4948
4949 2017-09-29 Tom Tromey <tom@tromey.com>
4950
4951 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4952 (mi_cmd_break_insert_1): Update.
4953
4954 2017-09-29 Tom Tromey <tom@tromey.com>
4955
4956 * target.h (make_scoped_defer_target_commit_resume): Update.
4957 * target.c (make_scoped_defer_target_commit_resume): Rename from
4958 make_cleanup_defer_target_commit_resume. Return a
4959 scoped_restore.
4960 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4961
4962 2017-09-29 Tom Tromey <tom@tromey.com>
4963
4964 * main.c (captured_main_1): Remove unused declaration.
4965 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4966
4967 2017-09-29 Tom Tromey <tom@tromey.com>
4968
4969 * symtab.c (search_symbols): Remove unused outer cleanup.
4970 (make_source_files_completion_list): Remove unused declaration.
4971
4972 2017-09-29 Tom Tromey <tom@tromey.com>
4973
4974 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4975
4976 2017-09-29 Tom Tromey <tom@tromey.com>
4977
4978 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4979 gdb::byte_vector.
4980
4981 2017-09-29 Tom Tromey <tom@tromey.com>
4982
4983 * complaints.c (vcomplaint): Use std::string.
4984
4985 2017-09-29 Tom Tromey <tom@tromey.com>
4986
4987 * tracepoint.c (trace_variable_command): Use std::string.
4988 (encode_actions_1): Remove unused declarations.
4989 (create_tsv_from_upload): Use std::string.
4990
4991 2017-09-29 Tom Tromey <tom@tromey.com>
4992
4993 * cp-support.c (gdb_demangle): Use std::string.
4994
4995 2017-09-29 Tom Tromey <tom@tromey.com>
4996
4997 * stack.c (parse_frame_specification): Use std::string
4998 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4999
5000 2017-09-29 Tom Tromey <tom@tromey.com>
5001
5002 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5003
5004 2017-09-29 Tom Tromey <tom@tromey.com>
5005
5006 * utils.c (vfprintf_maybe_filtered): Use std::string.
5007 (vfprintf_unfiltered): Likewise.
5008
5009 2017-09-29 Tom Tromey <tom@tromey.com>
5010
5011 * event-top.c (top_level_prompt): Return std::string.
5012 (display_gdb_prompt): Update.
5013
5014 2017-09-29 Tom Tromey <tom@tromey.com>
5015
5016 * unittests/common-utils-selftests.c (format): New function.
5017 (string_vprintf_tests): New function.
5018 (_initialize_common_utils_selftests): Register new tests.
5019 * common/common-utils.c (string_vprintf): New function.
5020 * common/common-utils.h (string_vprintf): Declare.
5021
5022 2017-09-29 Pedro Alves <palves@redhat.com>
5023
5024 * common/rsp-low.c (unpack_varlen_hex): Constify.
5025 * common/rsp-low.h (unpack_varlen_hex): Constify.
5026 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5027 Constify.
5028 * remote.c (remote_set_permissions, read_ptid)
5029 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5030 (remote_static_tracepoint_marker_at)
5031 (remote_static_tracepoint_markers_by_strid)
5032 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5033 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5034 (parse_tracepoint_definition, parse_tsv_definition)
5035 (parse_static_tracepoint_marker_definition): Constify.
5036 * tracepoint.h (parse_static_tracepoint_marker_definition)
5037 (parse_trace_status, parse_tracepoint_status)
5038 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5039
5040 2017-09-29 Pedro Alves <palves@redhat.com>
5041
5042 * remote.c (target_buf, target_buf_size): Delete.
5043 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5044 Use the connection's packet buffer instead.
5045 All callers adjusted.
5046 (_initialize_remote): Remove references to target_buf and
5047 target_buf_size.
5048
5049 2017-09-28 Pedro Alves <palves@redhat.com>
5050
5051 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5052 unittests/common-utils-selftests.c.
5053 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5054 (COMMON_OBS): Remove utils-selftests.o.
5055 * utils-selftests.c: Move to ...
5056 * unittests/common-utils-selftests.c: ... here and rename self
5057 test to "string_printf".
5058
5059 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5060
5061 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5062 having NULL cus or tus.
5063
5064 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5065
5066 * arm-tdep.c: (convert_from_extended): Remove.
5067 (convert_to_extended): Likewise.
5068 (arm_extract_return_value): Use convert_typed_floating.
5069 (arm_store_return_value): Likewise.
5070
5071 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5072 * sh-tdep.c: Do not include "floatformat.h".
5073 (sh_littlebyte_bigword_type): New function.
5074 (sh_register_convert_to_virtual): Use convert_typed_floating.
5075 (sh_register_convert_to_raw): Likewise.
5076 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5077 (sh64_littlebyte_bigword_type): New function.
5078 (sh64_extract_return_value): Use convert_typed_floating.
5079 (sh64_register_convert_to_virtual): Likewise.
5080 (sh64_register_convert_to_raw): Likewise.
5081
5082 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5083
5084 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5085 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5086
5087 * gdbtypes.h (union type_specific): Make field floatformat hold
5088 just a single struct floatformat, not an array.
5089 (floatformat_from_type): Move here.
5090 * gdbtypes.c (floatformat_from_type): Move here. Update to
5091 changed TYPE_FLOATFORMAT definition.
5092 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5093 (recursive_dump_type): Likewise.
5094 (init_float_type): Install correct floatformat for byte order.
5095 (arch_float_type): Likewise.
5096
5097 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5098
5099 * gdbtypes.c (init_type): Change incoming argument from
5100 length-in-bytes to length-in-bits. Assert length is a
5101 multiple of TARGET_CHAR_BITS.
5102 (arch_type, arch_flags_type): Likewise.
5103 (init_integer_type): Update call to init_type.
5104 (init_character_type): Likewise.
5105 (init_boolean_type): Likewise.
5106 (init_float_type): Likewise.
5107 (init_decfloat_type): Likewise.
5108 (init_complex_type): Likewise.
5109 (init_pointer_type): Likewise.
5110 (objfile_type): Likewise.
5111 (arch_integer_type): Update call to arch_type.
5112 (arch_character_type): Likewise.
5113 (arch_boolean_type): Likewise.
5114 (arch_float_type): Likewise.
5115 (arch_decfloat_type): Likewise.
5116 (arch_complex_type): Likewise.
5117 (arch_pointer_type): Likewise.
5118 (gdbtypes_post_init): Likewise.
5119
5120 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5121 (read_base_type): Likewise.
5122 * mdebugread.c (basic_type): Likewise.
5123 * stabsread.c (dbx_init_float_type): Likewise.
5124 (rs6000_builtin_type): Likewise.
5125 (read_range_type): Likewise. Also, fix call to init_integer_type
5126 with erroneous length argument.
5127
5128 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5129 * d-lang.c (build_d_types): Likewise.
5130 * f-lang.c (build_fortran_types): Likewise.
5131 * go-lang.c (build_go_types): Likewise.
5132 * opencl-lang.c (build_opencl_types): Likewise.
5133 * jit.c (finalize_symtab): Likewise.
5134 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5135 (build_std_type_info_type): Likewise.
5136 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5137 update call to arch_flags_type.
5138
5139 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5140 arch_type.
5141 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5142 * windows-tdep.c (windows_get_tlb_type): Likewise.
5143
5144 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5145 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5146 * m32c-tdep.c (make_types): Likewise.
5147 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5148 (rl78_psw_type): Update call to arch_flags_type.
5149 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5150 * rx-tdep.c (rx_psw_type): Likewise.
5151 (rx_fpsw_type): Likewise.
5152 * sparc-tdep.c (sparc_psr_type): Likewise.
5153 (sparc_fsr_type): Likewise.
5154 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5155 (sparc64_ccr_type): Likewise.
5156 (sparc64_fsr_type): Likewise.
5157 (sparc64_fprs_type): Likewise.
5158
5159 2017-09-27 Tom Tromey <tom@tromey.com>
5160
5161 * findcmd.c (find_command): Constify.
5162
5163 2017-09-27 Tom Tromey <tom@tromey.com>
5164
5165 * ada-tasks.c (task_command_1, task_command): Constify.
5166
5167 2017-09-27 Tom Tromey <tom@tromey.com>
5168
5169 * symtab.c (maintenance_print_symbol_cache)
5170 (maintenance_flush_symbol_cache)
5171 (maintenance_print_symbol_cache_statistics): Constify.
5172
5173 2017-09-27 Tom Tromey <tom@tromey.com>
5174
5175 * inferior.c (detach_inferior_command, kill_inferior_command)
5176 (inferior_command): Constify.
5177
5178 2017-09-27 Tom Tromey <tom@tromey.com>
5179
5180 * regcache.c (regcache_print, maintenance_print_registers)
5181 (maintenance_print_raw_registers)
5182 (maintenance_print_cooked_registers)
5183 (maintenance_print_register_groups)
5184 (maintenance_print_remote_registers): Constify.
5185
5186 2017-09-27 Tom Tromey <tom@tromey.com>
5187
5188 * printcmd.c (map_display_numbers, undisplay_command)
5189 (enable_disable_display_command, enable_display_command)
5190 (disable_display_command): Constify.
5191
5192 2017-09-27 Tom Tromey <tom@tromey.com>
5193
5194 * breakpoint.h (delete_command): Don't declare.
5195 * breakpoint.c (delete_command, enable_once_command)
5196 (enable_count_command, enable_delete_command, breakpoint_1)
5197 (maintenance_info_breakpoints, stopin_command, stopat_command)
5198 (delete_command, delete_trace_command, save_breakpoints)
5199 (save_breakpoints_command, save_tracepoints_command): Constify.
5200
5201 2017-09-27 Tom Tromey <tom@tromey.com>
5202
5203 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5204 (skip_ws, extract_identifier, macro_define_command)
5205 (macro_undef_command, macro_list_command): Constify.
5206
5207 2017-09-27 Tom Tromey <tom@tromey.com>
5208
5209 * infcmd.c (environment_info, set_environment_command)
5210 (unset_environment_command, path_info, info_proc_cmd_1)
5211 (info_proc_cmd_mappings, info_proc_cmd_stat)
5212 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5213 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5214
5215 2017-09-27 Tom Tromey <tom@tromey.com>
5216
5217 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5218 Constify.
5219
5220 2017-09-27 Tom Tromey <tom@tromey.com>
5221
5222 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5223
5224 2017-09-27 Tom Tromey <tom@tromey.com>
5225
5226 * demangle.c (demangle_command): Constify.
5227
5228 2017-09-27 Tom Tromey <tom@tromey.com>
5229
5230 * progspace.c (maintenance_info_program_spaces_command):
5231 Constify.
5232
5233 2017-09-27 Tom Tromey <tom@tromey.com>
5234
5235 * compile/compile.c (check_raw_argument, compile_file_command)
5236 (compile_code_command, compile_print_command): Constify.
5237
5238 2017-09-27 Tom Tromey <tom@tromey.com>
5239
5240 * reggroups.c (maintenance_print_reggroups): Constify.
5241
5242 2017-09-27 Tom Tromey <tom@tromey.com>
5243
5244 * dwarf2read.c (save_gdb_index_command): Constify.
5245
5246 2017-09-27 Tom Tromey <tom@tromey.com>
5247
5248 * stap-probe.c (info_probes_stap_command): Constify.
5249
5250 2017-09-27 Tom Tromey <tom@tromey.com>
5251
5252 * fork-child.c (unset_exec_wrapper_command): Constify.
5253
5254 2017-09-27 Tom Tromey <tom@tromey.com>
5255
5256 * btrace.c (get_uint, get_context_size, no_chunk)
5257 (maint_btrace_packet_history_cmd)
5258 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5259 (maint_info_btrace_cmd): Constify.
5260
5261 2017-09-27 Tom Tromey <tom@tromey.com>
5262
5263 * reverse.c (delete_bookmark_command): Constify.
5264
5265 2017-09-27 Tom Tromey <tom@tromey.com>
5266
5267 * remote.c (set_memory_packet_size)
5268 (set_memory_write_packet_size, show_memory_write_packet_size)
5269 (set_memory_read_packet_size, show_memory_read_packet_size)
5270 (compare_sections_command, packet_command, remote_put_command)
5271 (remote_get_command, remote_delete_command): Constify.
5272
5273 2017-09-27 Tom Tromey <tom@tromey.com>
5274
5275 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5276 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5277 (set_mipsfpu_auto_command): Constify.
5278
5279 2017-09-27 Tom Tromey <tom@tromey.com>
5280
5281 * cli/cli-cmds.h (cd_command): Constify.
5282 * cli/cli-cmds.c (cd_command): Constify.
5283
5284 2017-09-27 Tom Tromey <tom@tromey.com>
5285
5286 * thread.c (thread_name_command, thread_find_command): Constify.
5287
5288 2017-09-27 Tom Tromey <tom@tromey.com>
5289
5290 * probe.c (enable_probes_command, disable_probes_command):
5291 Constify.
5292
5293 2017-09-27 Tom Tromey <tom@tromey.com>
5294
5295 * symfile.c (symbol_file_command): Constify.
5296 * gdbcore.h (deprecated_file_changed_hook): Constify.
5297 * exec.c (deprecated_file_changed_hook, exec_file_command)
5298 (file_command): Constify.
5299 * defs.h (symbol_file_command): Constify.
5300
5301 2017-09-27 Tom Tromey <tom@tromey.com>
5302
5303 * remote-fileio.c (set_system_call_allowed)
5304 (show_system_call_allowed): Constify.
5305
5306 2017-09-27 Tom Tromey <tom@tromey.com>
5307
5308 * tracepoint.c (delete_trace_variable_command)
5309 (tfind_end_command, tfind_start_command, tfind_pc_command)
5310 (tfind_tracepoint_command, tfind_line_command)
5311 (tfind_range_command, tfind_outside_command): Constify.
5312
5313 2017-09-27 Tom Tromey <tom@tromey.com>
5314
5315 * ax-gdb.c (maint_agent_printf_command, agent_command)
5316 (agent_eval_command): Constify.
5317
5318 2017-09-27 Tom Tromey <tom@tromey.com>
5319
5320 * tracepoint.c (info_scope_command): Constify.
5321 * python/python.c (gdbpy_decode_line): Constify.
5322 * python/py-breakpoint.c (bppy_init): Constify.
5323 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5324 * location.h: (new_linespec_location)
5325 (string_to_event_location_basic, string_to_event_location):
5326 Constify.
5327 * location.c (new_linespec_location)
5328 (string_to_event_location_basic, string_to_event_location):
5329 Constify.
5330 * linespec.h (decode_line_with_current_source)
5331 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5332 * linespec.c (linespec_lex_to_end)
5333 (decode_line_with_current_source)
5334 (decode_line_with_last_displayed): Constify.
5335 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5336 Constify.
5337 * cli/cli-cmds.c (edit_command, list_command): Constify.
5338 * breakpoint.h (until_break_command, watch_command_wrapper)
5339 (awatch_command_wrapper, rwatch_command_wrapper)
5340 (init_ada_exception_breakpoint): Constify.
5341 * breakpoint.c (break_command_1, dprintf_command)
5342 (break_range_command, watch_command_wrapper)
5343 (rwatch_command_wrapper, awatch_command_wrapper)
5344 (until_break_command, init_ada_exception_breakpoint)
5345 (strace_marker_create_sals_from_location, trace_command)
5346 (ftrace_command, strace_command, struct tracepoint): Constify.
5347 * ax-gdb.c (agent_command_1): Constify.
5348 * ada-lang.c (ada_exception_sal): Constify.
5349
5350 2017-09-27 Tom Tromey <tom@tromey.com>
5351
5352 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5353 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5354 (get_context_size, no_chunk, get_insn_history_modifiers)
5355 (cmd_record_insn_history, get_call_history_modifiers)
5356 (cmd_record_call_history): Constify.
5357
5358 2017-09-27 Tom Tromey <tom@tromey.com>
5359
5360 * source.c (show_substitute_path_command)
5361 (unset_substitute_path_command, set_substitute_path_command):
5362 Constify.
5363
5364 2017-09-27 Tom Tromey <tom@tromey.com>
5365
5366 * typeprint.c (maintenance_print_type): Constify.
5367 * maint.c (maintenance_dump_me, maintenance_demangle)
5368 (maintenance_time_display, maintenance_info_sections)
5369 (maintenance_print_statistics, maintenance_deprecate)
5370 (maintenance_undeprecate): Constify.
5371 (maintenance_do_deprecate): Constify. Use std::string.
5372 (maintenance_selftest): Constify.
5373 * gdbtypes.h (maintenance_print_type): Constify.
5374
5375 2017-09-27 Tom Tromey <tom@tromey.com>
5376
5377 * hppa-tdep.c (unwind_command): Constify.
5378
5379 2017-09-27 Tom Tromey <tom@tromey.com>
5380
5381 * target-descriptions.c (unset_tdesc_filename_cmd)
5382 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5383 Constify.
5384
5385 2017-09-27 Tom Tromey <tom@tromey.com>
5386
5387 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5388
5389 2017-09-27 Tom Tromey <tom@tromey.com>
5390
5391 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5392
5393 2017-09-27 Tom Tromey <tom@tromey.com>
5394
5395 * tui/tui-regs.c (tui_reg_command): Constify.
5396
5397 2017-09-27 Tom Tromey <tom@tromey.com>
5398
5399 * skip.c (skip_file_command, skip_function_command)
5400 (skip_enable_command, skip_disable_command, skip_delete_command):
5401 Constify.
5402
5403 2017-09-27 Tom Tromey <tom@tromey.com>
5404
5405 * record-btrace.c (cmd_record_btrace_bts_start)
5406 (cmd_record_btrace_pt_start): Constify.
5407
5408 2017-09-27 Tom Tromey <tom@tromey.com>
5409
5410 * symmisc.c (maintenance_print_symbols)
5411 (maintenance_print_msymbols, maintenance_print_objfiles)
5412 (maintenance_info_symtabs, maintenance_check_symtabs)
5413 (maintenance_expand_symtabs, maintenance_info_line_tables):
5414 Constify.
5415
5416 2017-09-27 Tom Tromey <tom@tromey.com>
5417
5418 * top.c (new_ui_command): Constify.
5419
5420 2017-09-27 Tom Tromey <tom@tromey.com>
5421
5422 * symfile.c (add_symbol_file_command)
5423 (remove_symbol_file_command, list_overlays_command)
5424 (map_overlay_command, unmap_overlay_command)
5425 (overlay_auto_command, overlay_manual_command)
5426 (overlay_off_command, overlay_load_command): Constify.
5427
5428 2017-09-27 Tom Tromey <tom@tromey.com>
5429
5430 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5431 (info_spu_mailbox_command, info_spu_dma_command)
5432 (info_spu_proxydma_command): Constify.
5433
5434 2017-09-27 Tom Tromey <tom@tromey.com>
5435
5436 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5437
5438 2017-09-27 Tom Tromey <tom@tromey.com>
5439
5440 * cli/cli-script.c (user_defined_command): Constify.
5441
5442 2017-09-27 Tom Tromey <tom@tromey.com>
5443
5444 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5445 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5446 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5447 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5448 (dump_binary_value, append_binary_memory, append_binary_value):
5449 Constify.
5450 (struct dump_context) <func>: Constify.
5451 (add_dump_command): Update.
5452
5453 2017-09-27 Tom Tromey <tom@tromey.com>
5454
5455 * cli/cli-cmds.c (show_version, show_configuration)
5456 (source_command, show_user): Constify.
5457
5458 2017-09-27 Tom Tromey <tom@tromey.com>
5459
5460 * target.c (maintenance_print_target_stack): Constify.
5461
5462 2017-09-27 Tom Tromey <tom@tromey.com>
5463
5464 * interps.c (interpreter_exec_cmd): Constify.
5465
5466 2017-09-27 Tom Tromey <tom@tromey.com>
5467
5468 * record-full.c (cmd_record_full_restore): Constify.
5469
5470 2017-09-27 Tom Tromey <tom@tromey.com>
5471
5472 * memattr.c (enable_mem_command, disable_mem_command)
5473 (delete_mem_command): Constify.
5474
5475 2017-09-27 Tom Tromey <tom@tromey.com>
5476
5477 * value.c (show_convenience): Constify.
5478
5479 2017-09-27 Tom Tromey <tom@tromey.com>
5480
5481 * gdbcore.h (core_file_command): Update.
5482 * corefile.c (core_file_command): Constify.
5483
5484 2017-09-27 Tom Tromey <tom@tromey.com>
5485
5486 * user-regs.c (maintenance_print_user_registers): Constify.
5487
5488 2017-09-27 Tom Tromey <tom@tromey.com>
5489
5490 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5491
5492 2017-09-27 Tom Tromey <tom@tromey.com>
5493
5494 * cp-support.c (first_component_command): Constify.
5495
5496 2017-09-27 Tom Tromey <tom@tromey.com>
5497
5498 * psymtab.c (maintenance_print_psymbols)
5499 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5500 Constify.
5501
5502 2017-09-27 Tom Tromey <tom@tromey.com>
5503
5504 * windows-tdep.c (display_tib): Constify.
5505
5506 2017-09-27 Tom Tromey <tom@tromey.com>
5507
5508 * linux-fork.c (delete_checkpoint_command)
5509 (detach_checkpoint_command): Constify.
5510
5511 2017-09-27 Tom Tromey <tom@tromey.com>
5512
5513 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5514
5515 2017-09-27 Tom Tromey <tom@tromey.com>
5516
5517 * arc-tdep.c (dump_arc_instruction_command): Constify.
5518
5519 2017-09-27 Tom Tromey <tom@tromey.com>
5520
5521 * valprint.c (set_radix, show_radix): Constify.
5522
5523 2017-09-27 Tom Tromey <tom@tromey.com>
5524
5525 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5526
5527 2017-09-27 Tom Tromey <tom@tromey.com>
5528
5529 * command.h (not_just_help_class_command): Update.
5530 * cli/cli-decode.h (not_just_help_class_command): Update.
5531 * cli/cli-decode.c (not_just_help_class_command): Constify.
5532
5533 2017-09-27 Tom Tromey <tom@tromey.com>
5534
5535 * gdb_bfd.c (maintenance_info_bfds): Constify.
5536
5537 2017-09-27 Tom Tromey <tom@tromey.com>
5538
5539 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5540 overloads.
5541 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5542 (do_const_cfunc): New function.
5543 (cmd_cfunc_eq): New overload.
5544 (cli_user_command_p): Check do_const_cfunc.
5545 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5546 const_cfunc.
5547 * command.h (add_cmd): Add const overload and no-function
5548 overload.
5549 (set_cmd_cfunc): Add const overload.
5550 (cmd_const_cfunc_ftype): Declare.
5551 (cmd_cfunc_eq): Add const overload.
5552 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5553 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5554 overload.
5555
5556 2017-09-27 Tom Tromey <tom@tromey.com>
5557
5558 * macroexp.c (get_next_token_for_substitution): New function.
5559 (substitute_args): Call it. Check for __VA_OPT__.
5560
5561 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5562 Pedro Alves <palves@redhat.com>
5563
5564 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5565 producer_is_icc_lt_14.
5566 (producer_is_icc_lt_14): New function.
5567 (check_producer): Add code for checking version of ICC.
5568 (producer_is_icc): Move to producer.c.
5569 (read_structure_type): Restrict ICC workaround to ICC<14.
5570 * producer.c: Include selftest.h.
5571 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5572 New functions.
5573 * producer.h (producer_is_icc): New declaration.
5574
5575 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5576
5577 * Makefile.in (SFILES): Add producer.c.
5578 (COMMON_OBS): Add producer.o
5579 * amd64-tdep.c (producer.h): Add new include.
5580 * dwarf2read.c (producer.h): Add new include.
5581 * producer.c: New file.
5582 * producer.h: New file.
5583 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5584 producer.c.
5585 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5586 producer.h.
5587
5588 2017-09-26 Matthias Klose <doko@ubuntu.com>
5589
5590 * configure.ac: Search ncursesw before ncurses.
5591 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5592 * gdb_curses.h: Include <ncursesw/ncurses.h>
5593 * config.in, configure: Regenerate.
5594
5595 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5596
5597 PR gdb/22185
5598 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5599 obsolete.
5600 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5601 Remove i386sol2 support.
5602 * configure.nat <i386sol2>: Remove.
5603 <sol2-64>: Fold into ...
5604 <sol2>: ... this.
5605 Move common settings to default section.
5606 Add sol-thread.o.
5607 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5608 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5609 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5610 <i[34567]86-*-solaris*>: Remove.
5611 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5612
5613 * configure.ac: Remove wctype in libw check.
5614 (_MSE_INT_H): Don't define on Solaris 7-9.
5615 <solaris*>: Remove libthread_db.so.1 check.
5616 * configure: Regenerate.
5617 * config.in: Regenerate.
5618
5619 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5620 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5621 (gdb_ps_size_t): Remove.
5622 Use base types in users.
5623 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5624
5625 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5626
5627 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5628
5629 PR build/22206
5630 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5631 (adi_is_addr_mapped): Likewise.
5632 (PSR_ICC): Don't redefine.
5633 (PSR_IMPL): Likewise.
5634
5635 2017-09-25 Tom Tromey <tom@tromey.com>
5636
5637 * regcache.c (regcache::dump): Use string_printf.
5638
5639 2017-09-25 Tom Tromey <tom@tromey.com>
5640
5641 * regcache.c (class regcache_invalidator): New.
5642 (struct register_to_invalidate): Remove.
5643 (make_cleanup_regcache_invalidate): Remove.
5644 (regcache::raw_write): Use regcache_invalidator.
5645
5646 2017-09-25 Tom Tromey <tom@tromey.com>
5647
5648 * spu-tdep.c (spu2ppu_sniffer): Update.
5649 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5650 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5651 Remove.
5652 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5653 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5654 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5655 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5656 (frame_pop): Update.
5657
5658 2017-09-25 Tom Tromey <tom@tromey.com>
5659
5660 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5661 * regcache.h (regcache_xfree): Don't declare.
5662 * regcache.c (regcache_xfree): Remove.
5663 (do_regcache_xfree): Use delete.
5664 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5665 * linux-fork.c (free_fork): Use delete.
5666 (fork_save_infrun_state): Likewise.
5667 * jit.c (jit_dealloc_cache): Use delete.
5668 * infrun.c (discard_infcall_suspend_state): Use delete.
5669
5670 2017-09-25 Tom Tromey <tom@tromey.com>
5671
5672 * regcache.h (regcache_xmalloc): Don't declare.
5673 (regcache_raw_set_cached_value): Update comment.
5674 * regcache.c (regcache_xmalloc): Remove.
5675 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5676 * jit.c (jit_frame_sniffer): Use new.
5677 * frame.c (frame_save_as_regcache): Use new.
5678
5679 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5680
5681 * NEWS: Advertise support for guarded-storage registers on IBM z.
5682
5683 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5684
5685 * s390-linux-nat.c (have_regset_gs): New static variable.
5686 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5687 control block and guarded-storage broadcast control regsets.
5688 (s390_read_description): Detect whether the target has
5689 guarded-storage support, return appropriate tdesc.
5690 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5691 (features/s390x-gs-linux64.c): Likewise.
5692 (struct gdbarch_tdep) <have_gs>: New field.
5693 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5694 (s390_gsbc_regset): New variables.
5695 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5696 and s390_gsbc_regset, if applicable.
5697 (s390_core_read_description): Check whether core file was from a
5698 target with guarded-storage support; include appropriate regsets.
5699 (s390_gdbarch_init): Add registers for guarded-storage support.
5700 (_initialize_s390_tdep): Initialize new target descriptions that
5701 include registers for guarded-storage support.
5702 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5703 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5704 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5705 (S390_NUM_REGS): Adjust macro definition.
5706 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5707 (tdesc_s390x_gs_linux64): New declarations.
5708
5709 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5710
5711 * features/s390-gs-linux64.xml: New file.
5712 * features/s390-gs.xml: New file.
5713 * features/s390-gsbc.xml: New file.
5714 * features/s390x-gs-linux64.xml: New file.
5715 * features/Makefile (WHICH): Add s390-gs-linux64 and
5716 s390x-gs-linux64.
5717 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5718 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5719 * features/s390-gs-linux64.c: New generated file.
5720 * features/s390x-gs-linux64.c: New file.
5721 * regformats/s390-gs-linux64.dat: New file.
5722 * regformats/s390x-gs-linux64.dat: New file.
5723
5724 2017-09-23 Tom Tromey <tom@tromey.com>
5725
5726 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5727
5728 2017-09-22 Tom Tromey <tom@tromey.com>
5729
5730 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5731 type to scoped_restore_tmpl.
5732 <scoped_input_handler>: Initialize m_quit_handler directly.
5733
5734 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5735
5736 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5737 (cd_command): Likewise. Free "current_directory" before
5738 assigning to it.
5739 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5740 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5741 * top.c (gdb_dirbuf): Remove global declaration.
5742 * top.h (gdb_dirbuf): Likewise.
5743
5744 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5745
5746 * gnulib/aclocal.m4: Regenerate.
5747 * gnulib/config.in: Regenerate.
5748 * gnulib/configure: Regenerate.
5749 * gnulib/import/Makefile.am: Regenerate.
5750 * gnulib/import/Makefile.in: Regenerate.
5751 * gnulib/import/assure.h: New file.
5752 * gnulib/import/at-func.c: Likewise
5753 * gnulib/import/chdir-long.c: New file.
5754 * gnulib/import/chdir-long.h: New file.
5755 * gnulib/import/cloexec.c: New file.
5756 * gnulib/import/cloexec.h: New file.
5757 * gnulib/import/close.c: New file.
5758 * gnulib/import/closedir.c: New file.
5759 * gnulib/import/dirent-private.h: New file.
5760 * gnulib/import/dup-safer.c: New file.
5761 * gnulib/import/dup.c: New file.
5762 * gnulib/import/dup2.c: New file.
5763 * gnulib/import/error.c: New file.
5764 * gnulib/import/error.h: New file.
5765 * gnulib/import/exitfail.c: New file.
5766 * gnulib/import/exitfail.h: New file.
5767 * gnulib/import/fchdir.c: New file.
5768 * gnulib/import/fcntl.c: New file.
5769 * gnulib/import/fcntl.in.h: New file.
5770 * gnulib/import/fd-hook.c: New file.
5771 * gnulib/import/fd-hook.h: New file.
5772 * gnulib/import/fd-safer.c: New file.
5773 * gnulib/import/fdopendir.c: New file.
5774 * gnulib/import/filename.h: New file.
5775 * gnulib/import/filenamecat-lgpl.c: New file.
5776 * gnulib/import/filenamecat.h: New file.
5777 * gnulib/import/fstat.c: New file.
5778 * gnulib/import/fstatat.c: New file.
5779 * gnulib/import/getcwd-lgpl.c: New file.
5780 * gnulib/import/getcwd.c: New file.
5781 * gnulib/import/getdtablesize.c: New file.
5782 * gnulib/import/getlogin_r.c: New file.
5783 * gnulib/import/getprogname.c: New file.
5784 * gnulib/import/getprogname.h: New file.
5785 * gnulib/import/gettext.h: New file.
5786 * gnulib/import/glob-libc.h: New file.
5787 * gnulib/import/glob.c: New file.
5788 * gnulib/import/glob.in.h: New file.
5789 * gnulib/import/intprops.h: New file.
5790 * gnulib/import/m4/chdir-long.m4: New file.
5791 * gnulib/import/m4/close.m4: New file.
5792 * gnulib/import/m4/closedir.m4: New file.
5793 * gnulib/import/m4/d-ino.m4: New file.
5794 * gnulib/import/m4/d-type.m4: New file.
5795 * gnulib/import/m4/dup.m4: New file.
5796 * gnulib/import/m4/dup2.m4: New file.
5797 * gnulib/import/m4/error.m4: New file.
5798 * gnulib/import/m4/fchdir.m4: New file.
5799 * gnulib/import/m4/fcntl.m4: New file.
5800 * gnulib/import/m4/fcntl_h.m4: New file.
5801 * gnulib/import/m4/fdopendir.m4: New file.
5802 * gnulib/import/m4/filenamecat.m4: New file.
5803 * gnulib/import/m4/fstat.m4: New file.
5804 * gnulib/import/m4/fstatat.m4: New file.
5805 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5806 * gnulib/import/m4/getcwd-path-max.m4: New file.
5807 * gnulib/import/m4/getcwd.m4: New file.
5808 * gnulib/import/m4/getdtablesize.m4: New file.
5809 * gnulib/import/m4/getlogin_r.m4: New file.
5810 * gnulib/import/m4/getprogname.m4: New file.
5811 * gnulib/import/m4/glob.m4: New file.
5812 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5813 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5814 * gnulib/import/m4/mempcpy.m4: New file.
5815 * gnulib/import/m4/memrchr.m4: New file.
5816 * gnulib/import/m4/mode_t.m4: New file.
5817 * gnulib/import/m4/msvc-inval.m4: New file.
5818 * gnulib/import/m4/msvc-nothrow.m4: New file.
5819 * gnulib/import/m4/open.m4: New file.
5820 * gnulib/import/m4/openat.m4: New file.
5821 * gnulib/import/m4/opendir.m4: New file.
5822 * gnulib/import/m4/readdir.m4: New file.
5823 * gnulib/import/m4/realloc.m4: New file.
5824 * gnulib/import/m4/rewinddir.m4: New file.
5825 * gnulib/import/m4/save-cwd.m4: New file.
5826 * gnulib/import/m4/strdup.m4: New file.
5827 * gnulib/import/m4/strerror.m4: New file.
5828 * gnulib/import/m4/unistd-safer.m4: New file.
5829 * gnulib/import/mempcpy.c: New file.
5830 * gnulib/import/memrchr.c: New file.
5831 * gnulib/import/msvc-inval.c: New file.
5832 * gnulib/import/msvc-inval.h: New file.
5833 * gnulib/import/msvc-nothrow.c: New file.
5834 * gnulib/import/msvc-nothrow.h: New file.
5835 * gnulib/import/open.c: New file.
5836 * gnulib/import/openat-die.c: New file.
5837 * gnulib/import/openat-priv.h: New file.
5838 * gnulib/import/openat-proc.c: New file.
5839 * gnulib/import/openat.c: New file.
5840 * gnulib/import/openat.h: New file.
5841 * gnulib/import/opendir.c: New file.
5842 * gnulib/import/pipe-safer.c: New file.
5843 * gnulib/import/readdir.c: New file.
5844 * gnulib/import/realloc.c: New file.
5845 * gnulib/import/rewinddir.c: New file.
5846 * gnulib/import/save-cwd.c: New file.
5847 * gnulib/import/save-cwd.h: New file.
5848 * gnulib/import/strdup.c: New file.
5849 * gnulib/import/strerror-override.c: New file.
5850 * gnulib/import/strerror-override.h: New file.
5851 * gnulib/import/strerror.c: New file.
5852 * gnulib/import/unistd--.h: New file.
5853 * gnulib/import/unistd-safer.h: New file.
5854 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5855 "getcwd" and "glob".
5856 * ser-tcp.c: Undefine "close" before redefining it.
5857
5858 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5859
5860 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5861 get rid of res_val.
5862
5863 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5864
5865 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5866 <sol2,sparc>: Likewise.
5867 <sol2-64,i386>: Likewise.
5868
5869 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5870 -Wdeprecated-declarations on *-*-solaris*.
5871 * configure: Regenerate.
5872
5873 * procfs.c: Include "nat/inferior.h".
5874 (procfs_info_proc): Fix typo.
5875
5876 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5877
5878 * remote.c (vector): Include.
5879 (struct private_thread_info): Add field, thread_handle.
5880 (free_private_thread_info): Deallocate storage associated with
5881 thread handle.
5882 (get_private_info_thread): Initialize `thread_handle' field.
5883 (struct thread_item): Add field, thread_handle.
5884 (clear_threads_listing_context): Deallocate storage associated
5885 with thread handle.
5886 (start_thread): Add support for "handle" attribute.
5887 (thread_attributes): Add "handle".
5888 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5889 field.
5890 (remote_update_thread_list): Update thread_handle.
5891 (remote_thread_handle_to_thread_info): New function.
5892 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5893
5894 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5895
5896 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5897 function.
5898 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5899 * python/python-internal.h (thread_object_type): Declare.
5900
5901 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5902
5903 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5904 (target_thread_handle_to_thread_info): Declare.
5905 * target.c (target_thread_handle_to_thread_info): New function.
5906 * target-delegates.c: Regenerate.
5907 * gdbthread.h (find_thread_by_handle): Declare.
5908 * thread.c (find_thread_by_handle): New function.
5909 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5910 function.
5911 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5912
5913 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5914
5915 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5916
5917 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5918
5919 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5920
5921 2017-09-21 Yao Qi <yao.qi@linaro.org>
5922
5923 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5924 to gdb_target_obs.
5925
5926 2017-09-20 Tom Tromey <tom@tromey.com>
5927
5928 * breakpoint.c (struct counted_command_line): Remove.
5929 (breakpoint_commands): Update.
5930 (alloc_counted_command_line, incref_counted_command_line)
5931 (decref_counted_command_line, do_cleanup_counted_command_line)
5932 (make_cleanup_decref_counted_command_line): Remove.
5933 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5934 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5935 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5936 (save_breakpoints): Update.
5937 * breakpoint.h (counted_command_line): Now a typedef to
5938 shared_ptr.
5939 (struct breakpoint) <commands>: Now a counted_command_line.
5940 (struct bpstats) <command>: Likewise.
5941
5942 2017-09-20 Tom Tromey <tom@tromey.com>
5943
5944 * breakpoint.c (struct commands_info, do_map_commands_command):
5945 Remove.
5946 (commands_command_1): Update.
5947 (iterate_over_related_breakpoints): Take a function_view.
5948 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5949 (delete_command): Update.
5950 (map_breakpoint_numbers): Take a function_view.
5951 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5952 (disable_command): Update.
5953 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5954 (enable_command): Update.
5955 (struct disp_data, do_enable_breakpoint_disp)
5956 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5957 (do_map_enable_delete_breakpoint): Remove.
5958 (enable_once_command, enable_count_command, enable_delete_command)
5959 (delete_trace_variable_command): Update.
5960
5961 2017-09-20 Tom Tromey <tom@tromey.com>
5962
5963 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5964 (bpstat_clear): Use delete.
5965 (bpstats): New constructors.
5966 (bpstat_copy, bpstat_stop_status): Use new.
5967 (dprintf_after_condition_true): Update.
5968 * breakpoint.h (bpstats::bpstats): Add constructors.
5969 (bpstats::~bpstats): Add destructor.
5970
5971 2017-09-20 Pedro Alves <palves@redhat.com>
5972
5973 * eval.c (make_params): Delete, refactored as ...
5974 (class fake_method): ... this new type's ctor.
5975 (fake_method::~fake_method): New.
5976 (evaluate_subexp_standard): Use 'fake_method'.
5977
5978 2017-09-20 Tom Tromey <tom@tromey.com>
5979
5980 * windows-nat.c (get_windows_debug_event, windows_wait)
5981 (do_initial_windows_stuff, windows_attach): Update.
5982 * utils.c (vwarning, internal_vproblem): Update.
5983 (ui_unregister_input_event_handler_cleanup)
5984 (prepare_to_handle_input): Remove.
5985 (class scoped_input_handler): New.
5986 (defaulted_query, prompt_for_continue): Update.
5987 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5988 Update.
5989 * top.c (undo_terminal_modifications_before_exit): Update.
5990 * target/target.h (target_terminal_init, target_terminal_inferior)
5991 (target_terminal_ours): Don't declare.
5992 (class target_terminal): New.
5993 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5994 (target_terminal_ours_for_output)
5995 (make_cleanup_restore_target_terminal): Don't declare.
5996 (target_terminal_info): Remove.
5997 * target.c (enum terminal_state, terminal_state): Remove.
5998 (target_terminal::terminal_state): Define.
5999 (target_terminal::init): Rename from target_terminal_init.
6000 (target_terminal::inferior): Rename from
6001 target_terminal_inferior.
6002 (target_terminal::ours): Rename from target_terminal_ours.
6003 (target_terminal::ours_for_output): Rename from
6004 target_terminal_ours_for_output.
6005 (target_terminal::info): New method.
6006 (cleanup_restore_target_terminal)
6007 (make_cleanup_restore_target_terminal): Remove.
6008 * solib.c (handle_solib_event): Update.
6009 * remote.c (remote_serial_quit_handler): Update.
6010 (remote_terminal_inferior, remote_wait_as): Update.
6011 * record-full.c (record_full_wait_1): Update.
6012 * nto-procfs.c (procfs_create_inferior): Update.
6013 * nat/fork-inferior.c (startup_inferior): Update.
6014 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6015 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6016 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6017 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6018 (mi_breakpoint_created, mi_breakpoint_deleted)
6019 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6020 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6021 (mi_user_selected_context_changed, report_initial_inferior):
6022 Update.
6023 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6024 (linux_nat_terminal_inferior): Update.
6025 * infrun.c (follow_fork_inferior)
6026 (handle_vfork_child_exec_or_exit, do_target_resume)
6027 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6028 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6029 Update.
6030 * inflow.c (child_terminal_init, info_terminal_command): Update.
6031 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6032 (attach_command): Update.
6033 * infcall.c (call_thread_fsm_should_stop): Update.
6034 * gnu-nat.c (gnu_attach): Update.
6035 * extension.c (struct active_ext_lang_state)
6036 (restore_active_ext_lang): Update.
6037 * exceptions.c (print_flush): Update.
6038 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6039 (struct quit_handler_cleanup_data, restore_quit_handler)
6040 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6041 Remove.
6042 * cp-support.c (gdb_demangle): Update.
6043 * breakpoint.c (update_inserted_breakpoint_locations)
6044 (insert_breakpoint_locations, handle_jit_event)
6045 (disable_breakpoints_in_unloaded_shlib): Update.
6046 * annotate.c (annotate_breakpoints_invalid)
6047 (annotate_frames_invalid): Update.
6048
6049 2017-09-20 Tom Tromey <tom@tromey.com>
6050
6051 * main.c (catch_command_errors): Rename from
6052 catch_command_errors_const.
6053 (captured_main_1): Update.
6054
6055 2017-09-20 Pedro Alves <palves@redhat.com>
6056
6057 * cli/cli-cmds.c (list_command): Use print_sal_location.
6058 (print_sal_location): New function.
6059 (ambiguous_line_spec): Use print_sal_location.
6060 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6061 * symtab.c (find_function_start_sal): Likewise.
6062 * symtab.h (symtab_and_line::symbol): New field.
6063
6064 2017-09-20 Pedro Alves <palves@redhat.com>
6065
6066 * linespec.c (minsym_found): Handle non-text minsyms.
6067 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6068
6069 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6070
6071 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6072 backslash.
6073
6074 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6075
6076 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6077 vmovups instead vmovaps.
6078 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6079
6080 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6081
6082 * NEWS (Changes since GDB 8.0): Add starti.
6083 * infcmd.c (enum run_break): New.
6084 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6085 case.
6086 (run_command): Use enum run_how.
6087 (start_command): Likewise.
6088 (starti_command): New function.
6089 (RUN_ARGS_HELP): New macro.
6090 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6091 commands. Add starti command.
6092
6093 2017-09-19 Yao Qi <yao.qi@linaro.org>
6094
6095 * Makefile.in (monitor.o): Remove the rule.
6096
6097 2017-09-19 Yao Qi <yao.qi@linaro.org>
6098
6099 * annotate.h (struct annotate_arg_emitter): Use
6100 DISABLE_COPY_AND_ASSIGN.
6101 * common/refcounted-object.h (refcounted_object): Likewise.
6102 * completer.h (struct completion_result): Likewise.
6103 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6104 * filename-seen-cache.h (filename_seen_cache): Likewise.
6105 * gdbcore.h (thread_section_name): Likewise.
6106 * gdb_regex.h (compiled_regex): Likewise.
6107 * gdbthread.h (scoped_restore_current_thread): Likewise.
6108 * inferior.h (scoped_restore_current_inferior): Likewise.
6109 * jit.c (jit_reader): Likewise.
6110 * linespec.h (struct linespec_result): Likewise.
6111 * mi/mi-parse.h (struct mi_parse): Likewise.
6112 * nat/fork-inferior.c (execv_argv): Likewise.
6113 * progspace.h (scoped_restore_current_program_space): Likewise.
6114 * python/python-internal.h (class gdbpy_enter): Likewise.
6115 * regcache.h (regcache): Likewise.
6116 * target-descriptions.c (struct tdesc_reg): Likewise.
6117 (struct tdesc_type): Likewise.
6118 (struct tdesc_feature): Likewise.
6119 * ui-out.h (ui_out_emit_type): Likewise.
6120
6121 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6122
6123 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6124 label abort_expression.
6125
6126 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6127
6128 * common/buffer.c (buffer_xml_printf): Adjust.
6129 * common/xml-utils.c (xml_escape_text): Change return type to
6130 std::string, update code accordingly.
6131 * common/xml-utils.h (xml_escape_text): Change return type to
6132 std::string.
6133 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6134 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6135 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6136 Adjust.
6137
6138 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6139
6140 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6141 (SUBDIR_UNITTESTS_OBS): Add new object file.
6142 * unittests/xml-utils-selftests.c: New file.
6143
6144 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6145
6146 * common/selftest.h (selftest): New struct/interface.
6147 (register_test): Add name parameter, add new overload.
6148 (run_tests): Add filter parameter.
6149 (for_each_selftest_ftype): New typedef.
6150 (for_each_selftest): New declaration.
6151 * common/selftest.c (tests): Change type to
6152 map<string, unique_ptr<selftest>>.
6153 (simple_selftest): New struct.
6154 (register_test): New function.
6155 (register_test): Add name parameter and use it.
6156 (run_tests): Add filter parameter and use it. Add prints.
6157 Adjust to vector -> map change.
6158 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6159 registering selftests.
6160 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6161 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6162 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6163 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6164 * findvar.c (_initialize_findvar): Likewise.
6165 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6166 * maint.c (maintenance_selftest): Update call to run_tests.
6167 (maintenance_info_selftests): New function.
6168 (_initialize_maint_cmds): Register "maintenance info selftests"
6169 command. Update "maintenance selftest" doc.
6170 * regcache.c (_initialize_regcache): Add names when registering
6171 selftests.
6172 * rust-exp.y (_initialize_rust_exp): Likewise.
6173 * selftest-arch.c (gdbarch_selftest): New struct.
6174 (gdbarch_tests): Remove.
6175 (register_test_foreach_arch): Add name parameter. Call
6176 register_test.
6177 (tests_with_arch): Remove, move most content to
6178 gdbarch_selftest::operator().
6179 (_initialize_selftests_foreach_arch): Remove.
6180 * selftest-arch.h (register_test_foreach_arch): Add name
6181 parameter.
6182 (run_tests_with_arch): New declaration.
6183 * utils-selftests.c (_initialize_utils_selftests): Add names
6184 when registering selftests.
6185 * utils.c (_initialize_utils): Likewise.
6186 * unittests/array-view-selftests.c
6187 (_initialize_array_view_selftests): Likewise.
6188 * unittests/environ-selftests.c (_initialize_environ_selftests):
6189 Likewise.
6190 * unittests/function-view-selftests.c
6191 (_initialize_function_view_selftests): Likewise.
6192 * unittests/offset-type-selftests.c
6193 (_initialize_offset_type_selftests): Likewise.
6194 * unittests/optional-selftests.c
6195 (_initialize_optional_selftests): Likewise.
6196 * unittests/scoped_restore-selftests.c
6197 (_initialize_scoped_restore_selftests): Likewise.
6198 * NEWS: Document "maintenance selftest" and "maint info
6199 selftests".
6200
6201 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6202
6203 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6204 scoped_restore.
6205
6206 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6207
6208 * mi/mi-main.c (mi_load_progress): Make uiout variable
6209 a unique_ptr.
6210
6211 2017-09-15 Pedro Alves <palves@redhat.com>
6212
6213 * compile/compile-c-types.c (convert_enum, convert_int)
6214 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6215
6216 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6217
6218 * dwarf2read.c (copy_string): Remove.
6219 (parse_macro_definition): Replace copy_string with savestring.
6220
6221 2017-09-15 Yao Qi <yao.qi@linaro.org>
6222
6223 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6224 gdb_target_obs.
6225 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6226 Likewise.
6227 (i[34567]86-*-linux*): Likewise.
6228
6229 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6230
6231 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6232 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6233 <stack>: Change type to std::vector.
6234 <stack_len, stack_allocated>: Remove.
6235 <grow_stack>: Remove.
6236 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6237 (dwarf_expr_context::~dwarf_expr_context): Remove.
6238 (dwarf_expr_context::grow_stack): Remove.
6239 (dwarf_expr_context::push): Adjust.
6240 (dwarf_expr_context::pop): Adjust.
6241 (dwarf_expr_context::fetch): Adjust.
6242 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6243 (dwarf_expr_context::stack_empty_p): Adjust.
6244 (dwarf_expr_context::execute_stack_op): Adjust.
6245
6246 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6247
6248 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6249 return type to bool.
6250 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6251
6252 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6253
6254 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6255 Change type to bool.
6256 (dwarf_stack_value) <in_stack_memory>: Likewise.
6257 (dwarf_expr_context) <push_address>: Change parameter type to
6258 bool.
6259 <fetch_in_stack_memory>: Change return type to bool.
6260 <push>: Change parameter type to bool.
6261 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6262 to bool.
6263 (dwarf_expr_context::push_address): Likewise.
6264 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6265 to bool.
6266 (dwarf_expr_context::execute_stack_op): Adjust.
6267 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6268
6269 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6270
6271 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6272 (struct dwarf_expr_context) <n_pieces>: Remove.
6273 <pieces>: Change type to std::vector.
6274 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6275 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6276 pieces.
6277 (dwarf_expr_context::add_piece): Adjust.
6278 * dwarf2loc.c (struct piece_closure): Initialize fields.
6279 <n_pieces>: Remove.
6280 <pieces>: Change type to std::vector.
6281 (allocate_piece_closure): Adjust, change parameter to
6282 std::vector rvalue and std::move it to piece_closure.
6283 (rw_pieced_value): Adjust.
6284 (check_pieced_synthetic_pointer): Adjust.
6285 (indirect_synthetic_pointer): Adjust.
6286 (coerce_pieced_ref): Adjust.
6287 (free_pieced_value_closure): Adjust. Use delete to free
6288 piece_closure.
6289 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6290 to allocate_piece_closure.
6291 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6292
6293 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6294
6295 * probe.h (probe_ops_cp): Remove typedef.
6296 (DEF_VEC_P (probe_ops_cp)): Remove.
6297 (all_probe_ops): Change type to std::vector.
6298 * probe.c (info_probes_for_ops): Adjust to vector change.
6299 (probe_linespec_to_ops): Likewise.
6300 (all_probe_ops): Change type to std::vector.
6301 (_initialize_probe): Adjust to vector change.
6302 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6303 * elfread.c (elf_get_probes): Likewise.
6304 * stap-probe.c (_initialize_stap_probe): Likewise.
6305
6306 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6307
6308 * probe.h (struct bound_probe): Define constructors.
6309 * probe.c (bound_probe_s): Remove typedef.
6310 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6311 (collect_probes): Change return type to std::vector, remove
6312 cleanup.
6313 (compare_probes): Return bool, change parameter type. Change
6314 semantic to "less than".
6315 (gen_ui_out_table_header_info): Change parameter to std::vector
6316 and update.
6317 (exists_probe_with_pops): Likewise.
6318 (info_probes_for_ops): Update to std::vector change.
6319 (enable_probes_command): Likewise.
6320 (disable_probes_command): Likewise.
6321
6322 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6323
6324 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6325 vec to std::vector.
6326 * probe.c (parse_probes_in_pspace): Update.
6327 (find_probes_in_objfile): Update.
6328 (find_probe_by_pc): Update.
6329 (collect_probes): Update.
6330 (probe_any_get_probes): Update.
6331 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6332 return type to reference to std::vector.
6333 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6334 std::vector and update.
6335 (dtrace_process_dof): Likewise.
6336 (dtrace_get_probes): Likewise.
6337 * elfread.c (elf_get_probes): Change return type to std::vector,
6338 store an std::vector in bfd_data.
6339 (probe_key_free): Update to std::vector.
6340 * stap-probe.c (handle_stap_probe): Change parameter to
6341 std::vector and update.
6342 (stap_get_probes): Likewise.
6343 * symfile-debug.c (debug_sym_get_probes): Change return type to
6344 std::vector and update.
6345
6346 2017-09-11 Tom Tromey <tom@tromey.com>
6347
6348 * breakpoint.c (program_breakpoint_here_p): Update.
6349 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6350 from make_show_memory_breakpoints_cleanup. Return a
6351 scoped_restore_tmpl<int>.
6352 (restore_show_memory_breakpoints): Remove.
6353 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6354 * mem-break.c (memory_validate_breakpoint): Update.
6355 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6356 (ia64_memory_remove_breakpoint): Update.
6357 (ia64_breakpoint_from_pc): Update.
6358 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6359 from make_show_memory_breakpoints_cleanup.
6360
6361 2017-09-11 Tom Tromey <tom@tromey.com>
6362
6363 * d-namespace.c (d_lookup_symbol): Use std::string.
6364 (find_symbol_in_baseclass): Likewise.
6365
6366 2017-09-11 Tom Tromey <tom@tromey.com>
6367
6368 * ctf.c (ctf_start): Use std::string.
6369
6370 2017-09-11 Tom Tromey <tom@tromey.com>
6371
6372 * ada-lang.c (is_known_support_routine): Update.
6373 (ada_unhandled_exception_name_addr_from_raise): Update.
6374 * guile/scm-frame.c (gdbscm_frame_name): Update.
6375 * python/py-frame.c (frapy_name): Update.
6376 (frapy_function): Update.
6377 * stack.h (find_frame_funname): Update.
6378 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6379 (print_frame): Update.
6380
6381 2017-09-11 Tom Tromey <tom@tromey.com>
6382
6383 * findcmd.c (put_bits): Take a gdb::byte_vector.
6384 (parse_find_args): Return gdb::byte_vector. "args" now const.
6385 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6386 cleanups.
6387 (find_command): Update.
6388
6389 2017-09-11 Tom Tromey <tom@tromey.com>
6390
6391 * cli/cli-script.c (class scoped_restore_hook_in): New.
6392 (clear_hook_in_cleanup): Remove.
6393 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6394 scoped_restore_hook_in.
6395
6396 2017-09-11 Tom Tromey <tom@tromey.com>
6397
6398 * cli/cli-script.c (restore_interp): Remove.
6399 (read_command_lines): Use scoped_restore_interp.
6400 * interps.c (scoped_restore_interp::set_temp): Rename from
6401 interp_set_temp.
6402 * interps.h (class scoped_restore_interp): New.
6403 (interp_set_temp): Remove.
6404
6405 2017-09-11 Tom Tromey <tom@tromey.com>
6406
6407 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6408 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6409 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6410 scoped_restore.
6411 (mi_cmd_break_insert_1): Update.
6412 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6413 scoped_restore.
6414
6415 2017-09-11 Tom Tromey <tom@tromey.com>
6416
6417 * demangle.c (demangle_command): Update.
6418 * breakpoint.c (disable_command): Update.
6419 (enable_command): Update.
6420 (find_location_by_number): Make "number" const. Use
6421 get_number_trailer.
6422 * cli/cli-utils.c (extract_arg): Return std::string.
6423 * probe.c (parse_probe_linespec): Update. Change types.
6424 (collect_probes): Take string arguments.
6425 (parse_probe_linespec): Likewise.
6426 (info_probes_for_ops): Update.
6427 (enable_probes_command): Update.
6428 (disable_probes_command): Update.
6429 * break-catch-sig.c (catch_signal_split_args): Update.
6430 * mi/mi-parse.c (mi_parse): Update.
6431
6432 2017-09-11 Tom Tromey <tom@tromey.com>
6433
6434 * language.h (language_enum): Make argument const.
6435 * language.c (language_enum): Make argument const.
6436
6437 2017-09-11 Tom Tromey <tom@tromey.com>
6438
6439 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6440 as function.
6441 (skip_to_space): Rename from skip_to_space_const.
6442 * common/common-utils.c (skip_to_space): New function.
6443 (skip_to_space): Rename from skip_to_space_const.
6444 * cli/cli-utils.h (get_number): Rename from get_number_const.
6445 (extract_arg): Rename from extract_arg_const.
6446 * cli/cli-utils.c (get_number): Rename from get_number_const.
6447 (extract_arg): Rename from extract_arg_const.
6448 (number_or_range_parser::get_number): Use ::get_number.
6449 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6450 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6451 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6452 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6453 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6454 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6455 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6456 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6457
6458 2017-09-11 Tom Tromey <tom@tromey.com>
6459
6460 * python/python.c (do_start_initialization): Use
6461 py-event-types.def to initialize types.
6462 Define all object type structures.
6463 * python/python-internal.h: Don't declare event initialization
6464 functions.
6465 * python/py-threadevent.c (thread_event_object_type): Don't
6466 define.
6467 * python/py-stopevent.c (stop_event_object_type): Don't define.
6468 * python/py-signalevent.c (signal_event_object_type): Don't
6469 declare or define.
6470 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6471 (clear_objfiles_event_object_type): Don't declare or define.
6472 * python/py-infevents.c (inferior_call_pre_event_object_type)
6473 (inferior_call_post_event_object_type)
6474 (register_changed_event_object_type)
6475 (memory_changed_event_object_type): Don't declare or define.
6476 * python/py-inferior.c (new_thread_event_object_type)
6477 (new_inferior_event_object_type)
6478 (inferior_deleted_event_object_type): Don't declare or define.
6479 * python/py-exitedevent.c (exited_event_object_type): Don't
6480 declare or define.
6481 * python/py-evts.c (gdbpy_initialize_py_events): Use
6482 py-all-events.def.
6483 * python/py-events.h (thread_event_object_type): Don't declare.
6484 (events_object): Use py-all-events.def.
6485 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6486 py-event-types.def.
6487 * python/py-event-types.def: New file.
6488 * python/py-continueevent.c (create_continue_event_object): Don't
6489 declare or define.
6490 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6491 declare or define.
6492 * python/py-all-events.def: New file.
6493
6494 2017-09-11 Tom Tromey <tom@tromey.com>
6495
6496 * python/py-threadevent.c (create_thread_event_object): Return
6497 gdbpy_ref.
6498 * python/py-stopevent.h (create_stop_event_object)
6499 (create_breakpoint_event_object, create_signal_event_object):
6500 Update.
6501 * python/py-stopevent.c (create_stop_event_object): Return
6502 gdbpy_ref.
6503 (emit_stop_event): Update.
6504 * python/py-signalevent.c (create_signal_event_object): Return
6505 gdbpy_ref.
6506 * python/py-infevents.c (create_inferior_call_event_object):
6507 Update.
6508 * python/py-event.h (create_event_object)
6509 (create_thread_event_object): Update.
6510 * python/py-event.c (create_event_object): Return gdbpy_ref.
6511 * python/py-continueevent.c: Return gdbpy_ref.
6512 * python/py-bpevent.c (create_breakpoint_event_object): Return
6513 gdbpy_ref.
6514
6515 2017-09-11 Tom Tromey <tom@tromey.com>
6516
6517 PR python/15622:
6518 * NEWS: Add entry.
6519 * python/python.c (do_start_initialization): Initialize new event
6520 types.
6521 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6522 (gdbpy_initialize_inferior_deleted_event)
6523 (gdbpy_initialize_new_thread_event): Declare.
6524 * python/py-threadevent.c (create_thread_event_object): Add option
6525 "thread" parameter.
6526 * python/py-inferior.c (new_thread_event_object_type)
6527 (new_inferior_event_object_type)
6528 (inferior_deleted_event_object_type): Declare.
6529 (python_new_inferior, python_inferior_deleted): New functions.
6530 (add_thread_object): Emit new_thread event.
6531 (gdbpy_initialize_inferior): Attach new functions to corresponding
6532 observers.
6533 (new_thread, new_inferior, inferior_deleted): Define new event
6534 types.
6535 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6536 registries.
6537 * python/py-events.h (events_object) <new_inferior,
6538 inferior_deleted, new_thread>: New fields.
6539 * python/py-event.h (create_thread_event_breakpoint): Add optional
6540 "thread" parameter.
6541
6542 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6543
6544 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6545 check current_ui instead.
6546 (internal_vproblem): Likewise.
6547
6548 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6549
6550 * thread.c (print_thread_info_1): Remove unnecessary calls to
6551 uiout->is_mi_like_p.
6552
6553 2017-09-09 Tom Tromey <tom@tromey.com>
6554
6555 * namespace.h (add_using_directive): Update.
6556 * namespace.c (add_using_directive): Change type of excludes to
6557 std::vector.
6558 * dwarf2read.c (read_import_statement): Use std::vector.
6559 (read_namespace): Update.
6560 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6561
6562 2017-09-09 Tom Tromey <tom@tromey.com>
6563
6564 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6565
6566 2017-09-09 Tom Tromey <tom@tromey.com>
6567
6568 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6569
6570 2017-09-09 Tom Tromey <tom@tromey.com>
6571
6572 * stack.c (func_command): Use gdb::def_vector.
6573
6574 2017-09-09 Tom Tromey <tom@tromey.com>
6575
6576 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6577 ui_out_emit_list, ui_out_emit_tuple.
6578 (mi_cmd_var_update): Likewise.
6579
6580 2017-09-09 Tom Tromey <tom@tromey.com>
6581
6582 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6583 ui_out_redirect_pop.
6584 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6585 ui_out_redirect_pop.
6586 * utils.c (do_ui_out_redirect_pop)
6587 (make_cleanup_ui_out_redirect_pop): Remove.
6588 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6589 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6590 * ui-out.h (ui_out_redirect_pop): New class.
6591
6592 2017-09-09 Tom Tromey <tom@tromey.com>
6593
6594 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6595 (list_available_thread_groups, mi_cmd_list_thread_groups)
6596 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6597 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6598 Likewise.
6599
6600 2017-09-09 Tom Tromey <tom@tromey.com>
6601
6602 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6603 ui_out_emit_tuple.
6604
6605 2017-09-09 Tom Tromey <tom@tromey.com>
6606
6607 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6608 * stack.c (print_frame): Use ui_out_emit_tuple.
6609 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6610 (info_spu_mailbox_command, info_spu_dma_command)
6611 (info_spu_proxydma_command): Likewise.
6612 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6613 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6614 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6615 ui_out_emit_tuple.
6616 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6617
6618 2017-09-09 Tom Tromey <tom@tromey.com>
6619
6620 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6621 (class ui_out_emit_table): Update comment.
6622 * ui-out.c (do_cleanup_table_end)
6623 (make_cleanup_ui_out_table_begin_end): Remove.
6624 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6625 (info_spu_dma_cmdlist): Likewise.
6626 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6627 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6628 ui_out_emit_table.
6629
6630 2017-09-09 Tom Tromey <tom@tromey.com>
6631
6632 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6633 ui_out_emit_list, gdb::optional.
6634
6635 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6636
6637 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6638 prototype.
6639 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6640 prototype.
6641 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6642 prototype.
6643 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6644 * ada-exp.y: Remove _initialize_ada_exp prototype.
6645 * ada-lang.c: Remove _initialize_ada_language prototype.
6646 * ada-tasks.c: Remove _initialize_tasks prototype.
6647 * addrmap.c: Remove _initialize_addrmap prototype.
6648 * agent.c: Remove _initialize_agent prototype.
6649 * aix-thread.c: Remove _initialize_aix_thread prototype.
6650 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6651 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6652 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6653 prototype.
6654 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6655 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6656 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6657 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6658 prototype.
6659 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6660 prototype.
6661 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6662 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6663 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6664 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6665 prototype.
6666 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6667 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6668 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6669 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6670 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6671 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6672 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6673 prototype.
6674 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6675 prototype.
6676 * annotate.c: Remove _initialize_annotate prototype.
6677 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6678 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6679 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6680 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6681 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6682 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6683 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6684 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6685 prototype.
6686 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6687 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6688 * auto-load.c: Remove _initialize_auto_load prototype.
6689 * auxv.c: Remove _initialize_auxv prototype.
6690 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6691 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6692 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6693 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6694 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6695 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6696 prototype.
6697 * break-catch-throw.c: Remove _initialize_break_catch_throw
6698 prototype.
6699 * breakpoint.c: Remove _initialize_breakpoint prototype.
6700 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6701 * btrace.c: Remove _initialize_btrace prototype.
6702 * charset.c: Remove _initialize_charset prototype.
6703 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6704 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6705 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6706 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6707 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6708 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6709 * coffread.c: Remove _initialize_coffread prototype.
6710 * compile/compile.c: Remove _initialize_compile prototype.
6711 * complaints.c: Remove _initialize_complaints prototype.
6712 * completer.c: Remove _initialize_completer prototype.
6713 * copying.awk: Remove _initialize_copying prototype.
6714 * copying.c: Regenerate.
6715 * core-regset.c: Remove _initialize_core_regset prototype.
6716 * corefile.c: Remove _initialize_core prototype.
6717 * corelow.c: Remove _initialize_corelow prototype.
6718 * cp-abi.c: Remove _initialize_cp_abi prototype.
6719 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6720 * cp-support.c: Remove _initialize_cp_support prototype.
6721 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6722 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6723 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6724 * ctf.c: Remove _initialize_ctf prototype.
6725 * d-lang.c: Remove _initialize_d_language prototype.
6726 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6727 prototype.
6728 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6729 * dbxread.c: Remove _initialize_dbxread prototype.
6730 * dcache.c: Remove _initialize_dcache prototype.
6731 * demangle.c: Remove _initialize_demangler prototype.
6732 * disasm-selftests.c: Remove _initialize_disasm_selftests
6733 prototype.
6734 * disasm.c: Remove _initialize_disasm prototype.
6735 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6736 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6737 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6738 prototype.
6739 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6740 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6741 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6742 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6743 * elfread.c: Remove _initialize_elfread prototype.
6744 * exec.c: Remove _initialize_exec prototype.
6745 * extension.c: Remove _initialize_extension prototype.
6746 * f-lang.c: Remove _initialize_f_language prototype.
6747 * f-valprint.c: Remove _initialize_f_valprint prototype.
6748 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6749 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6750 * filesystem.c: Remove _initialize_filesystem prototype.
6751 * findcmd.c: Remove _initialize_mem_search prototype.
6752 * fork-child.c: Remove _initialize_fork_child prototype.
6753 * frame-base.c: Remove _initialize_frame_base prototype.
6754 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6755 * frame.c: Remove _initialize_frame prototype.
6756 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6757 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6758 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6759 * gcore.c: Remove _initialize_gcore prototype.
6760 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6761 * gdbarch.c: Regenerate.
6762 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6763 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6764 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6765 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6766 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6767 * go-lang.c: Remove _initialize_go_language prototype.
6768 * go32-nat.c: Remove _initialize_go32_nat prototype.
6769 * guile/guile.c: Remove _initialize_guile prototype.
6770 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6771 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6772 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6773 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6774 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6775 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6776 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6777 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6778 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6779 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6780 prototype.
6781 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6782 prototype.
6783 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6784 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6785 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6786 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6787 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6788 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6789 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6790 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6791 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6792 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6793 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6794 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6795 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6796 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6797 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6798 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6799 prototype.
6800 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6801 prototype.
6802 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6803 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6804 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6805 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6806 * infcall.c: Remove _initialize_infcall prototype.
6807 * infcmd.c: Remove _initialize_infcmd prototype.
6808 * inferior.c: Remove _initialize_inferiors prototype.
6809 * inflow.c: Remove _initialize_inflow prototype.
6810 * infrun.c: Remove _initialize_infrun prototype.
6811 * interps.c: Remove _initialize_interpreter prototype.
6812 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6813 * jit.c: Remove _initialize_jit prototype.
6814 * language.c: Remove _initialize_language prototype.
6815 * linux-fork.c: Remove _initialize_linux_fork prototype.
6816 * linux-nat.c: Remove _initialize_linux_nat prototype.
6817 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6818 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6819 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6820 * m2-lang.c: Remove _initialize_m2_language prototype.
6821 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6822 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6823 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6824 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6825 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6826 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6827 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6828 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6829 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6830 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6831 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6832 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6833 * machoread.c: Remove _initialize_machoread prototype.
6834 * macrocmd.c: Remove _initialize_macrocmd prototype.
6835 * macroscope.c: Remove _initialize_macroscope prototype.
6836 * maint.c: Remove _initialize_maint_cmds prototype.
6837 * mdebugread.c: Remove _initialize_mdebugread prototype.
6838 * memattr.c: Remove _initialize_mem prototype.
6839 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6840 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6841 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6842 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6843 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6844 * microblaze-linux-tdep.c: Remove
6845 _initialize_microblaze_linux_tdep prototype.
6846 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6847 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6848 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6849 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6850 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6851 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6852 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6853 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6854 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6855 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6856 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6857 prototype.
6858 * mipsread.c: Remove _initialize_mipsread prototype.
6859 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6860 prototype.
6861 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6862 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6863 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6864 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6865 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6866 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6867 prototype.
6868 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6869 * nto-procfs.c: Remove _initialize_procfs prototype.
6870 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6871 * objc-lang.c: Remove _initialize_objc_language prototype.
6872 * objfiles.c: Remove _initialize_objfiles prototype.
6873 * observer.c: Remove observer_test_first_notification_function,
6874 observer_test_second_notification_function,
6875 observer_test_third_notification_function, and
6876 _initialize_observer prototypes.
6877 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6878 * osabi.c: Remove _initialize_gdb_osabi prototype.
6879 * osdata.c: Remove _initialize_osdata prototype.
6880 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6881 * parse.c: Remove _initialize_parse prototype.
6882 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6883 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6884 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6885 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6886 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6887 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6888 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6889 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6890 * printcmd.c: Remove _initialize_printcmd prototype.
6891 * probe.c: Remove _initialize_probe prototype.
6892 * proc-api.c: Remove _initialize_proc_api prototype.
6893 * proc-events.c: Remove _initialize_proc_events prototype.
6894 * proc-service.c: Remove _initialize_proc_service prototype.
6895 * procfs.c: Remove _initialize_procfs prototype.
6896 * psymtab.c: Remove _initialize_psymtab prototype.
6897 * python/python.c: Remove _initialize_python prototype.
6898 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6899 * record-btrace.c: Remove _initialize_record_btrace prototype.
6900 * record-full.c: Remove _initialize_record_full prototype.
6901 * record.c: Remove _initialize_record prototype.
6902 * regcache.c: Remove _initialize_regcache prototype.
6903 * reggroups.c: Remove _initialize_reggroup prototype.
6904 * remote-notif.c: Remove _initialize_notif prototype.
6905 * remote-sim.c: Remove _initialize_remote_sim prototype.
6906 * remote.c: Remove _initialize_remote prototype.
6907 * reverse.c: Remove _initialize_reverse prototype.
6908 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6909 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6910 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6911 prototype.
6912 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6913 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6914 * rust-exp.y: Remove _initialize_rust_exp prototype.
6915 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6916 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6917 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6918 * score-tdep.c: Remove _initialize_score_tdep prototype.
6919 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6920 prototype.
6921 * ser-go32.c: Remove _initialize_ser_dos prototype.
6922 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6923 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6924 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6925 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6926 * serial.c: Remove _initialize_serial prototype.
6927 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6928 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6929 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6930 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6931 * skip.c: Remove _initialize_step_skip prototype.
6932 * sol-thread.c: Remove _initialize_sol_thread prototype.
6933 * solib-aix.c: Remove _initialize_solib_aix prototype.
6934 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6935 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6936 * solib-frv.c: Remove _initialize_frv_solib prototype.
6937 * solib-spu.c: Remove _initialize_spu_solib prototype.
6938 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6939 * solib-target.c: Remove _initialize_solib_target prototype.
6940 * solib.c: Remove _initialize_solib prototype.
6941 * source.c: Remove _initialize_source prototype.
6942 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6943 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6944 prototype.
6945 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6946 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6947 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6948 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6949 prototype.
6950 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6951 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6952 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6953 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6954 prototype.
6955 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6956 prototype.
6957 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6958 prototype.
6959 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6960 prototype.
6961 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6962 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6963 prototype.
6964 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6965 prototype.
6966 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6967 prototype.
6968 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6969 prototype.
6970 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6971 prototype.
6972 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6973 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6974 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6975 * stabsread.c: Remove _initialize_stabsread prototype.
6976 * stack.c: Remove _initialize_stack prototype.
6977 * stap-probe.c: Remove _initialize_stap_probe prototype.
6978 * std-regs.c: Remove _initialize_frame_reg prototype.
6979 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6980 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6981 * symfile.c: Remove _initialize_symfile prototype.
6982 * symmisc.c: Remove _initialize_symmisc prototype.
6983 * symtab.c: Remove _initialize_symtab prototype.
6984 * target-dcache.c: Remove _initialize_target_dcache prototype.
6985 * target-descriptions.c: Remove _initialize_target_descriptions
6986 prototype.
6987 * thread.c: Remove _initialize_thread prototype.
6988 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6989 prototype.
6990 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6991 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6992 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6993 prototype.
6994 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6995 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6996 * tracefile.c: Remove _initialize_tracefile prototype.
6997 * tracepoint.c: Remove _initialize_tracepoint prototype.
6998 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6999 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7000 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7001 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7002 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7003 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7004 * tui/tui.c: Remove _initialize_tui prototype.
7005 * typeprint.c: Remove _initialize_typeprint prototype.
7006 * user-regs.c: Remove _initialize_user_regs prototype.
7007 * utils.c: Remove _initialize_utils prototype.
7008 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7009 * valarith.c: Remove _initialize_valarith prototype.
7010 * valops.c: Remove _initialize_valops prototype.
7011 * valprint.c: Remove _initialize_valprint prototype.
7012 * value.c: Remove _initialize_values prototype.
7013 * varobj.c: Remove _initialize_varobj prototype.
7014 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7015 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7016 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7017 * windows-nat.c: Remove _initialize_windows_nat,
7018 _initialize_check_for_gdb_ini, and _initialize_loadable
7019 prototypes.
7020 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7021 * xcoffread.c: Remove _initialize_xcoffread prototype.
7022 * xml-support.c: Remove _initialize_xml_support prototype.
7023 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7024 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7025 prototype.
7026 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7027 prototype.
7028 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7029
7030 2017-09-08 Keith Seitz <keiths@redhat.com>
7031
7032 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7033 field.
7034
7035 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7036
7037 * f-valprint.c (f_val_print): Remove check for one byte
7038 sized integers. Remove printing of character type.
7039
7040 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7041 Christoph Weinmann <christoph.t.weinmann@intel.com>
7042 Bernhard Heckel <bernhard.heckel@intel.com>
7043
7044 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7045 to maintain proper indentation when printing pointers/refs.
7046
7047 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7048
7049 GDB 8.0.1 released.
7050
7051 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7052
7053 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7054
7055 2017-09-05 Tom Tromey <tom@tromey.com>
7056
7057 * parse.c (funcall_chain): Now a std::vector.
7058 (start_arglist, end_arglist): Simplify.
7059 (free_funcalls): Remove.
7060 (parse_exp_in_context_1): Remove cleanup.
7061
7062 2017-09-05 Tom Tromey <tom@tromey.com>
7063
7064 * go-exp.y (go_parse): Don't create a cleanup.
7065
7066 2017-09-05 Tom Tromey <tom@tromey.com>
7067
7068 * d-exp.y (PrimaryExpression): Use std::string.
7069 (d_parse): Don't create a cleanup.
7070
7071 2017-09-05 Tom Tromey <tom@tromey.com>
7072
7073 * utils.c (do_clear_parser_state): Remove.
7074 (make_cleanup_clear_parser_state): Remove.
7075 * p-exp.y (pascal_parse): Use scoped_restore.
7076 * m2-exp.y (m2_parse): Use scoped_restore.
7077 * f-exp.y (f_parse): Use scoped_restore.
7078 * d-exp.y (d_parse): Use scoped_restore.
7079 * c-exp.y (c_parse): Use scoped_restore.
7080 * ada-exp.y (ada_parse): Use scoped_restore.
7081 * utils.h (make_cleanup_clear_parser_state): Remove.
7082
7083 2017-09-06 Keith Seitz <keiths@redhat.com>
7084
7085 * dwarf2read.c (dw2_linkage_name_attr): New function.
7086 (dw2_linkage_name): New function.
7087 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7088 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7089 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7090
7091 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7092
7093 * config/djgpp/djconfig.sh: Correct shell portability issue.
7094
7095 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7096
7097 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7098
7099 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7100
7101 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7102 * NEWS: Mention new FreeBSD/mips native configuration.
7103 * configure.host: Add aarch64*-*-freebsd*.
7104 * configure.nat: Likewise.
7105 * aarch64-fbsd-nat.c: New file.
7106
7107 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7108
7109 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7110 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7111 * NEWS: Mention new FreeBSD/aarch64 target.
7112 * configure.tgt: Add aarch64*-*-freebsd*.
7113 * aarch64-fbsd-tdep.c: New file.
7114 * aarch64-fbsd-tdep.h: New file.
7115
7116 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7117
7118 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7119
7120 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7121
7122 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7123 of TLS symbols.
7124
7125 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7126
7127 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7128 call.
7129
7130 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7131
7132 * infrun.c (follow_exec): Call add_thread after
7133 target_find_description.
7134
7135 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7136
7137 * infrun.c (handle_inferior_event_1): When exec'ing, read
7138 stop_pc after follow_exec.
7139
7140 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7141
7142 * remote.c (process_g_packet): Update error message.
7143
7144 2017-09-05 Yao Qi <yao.qi@linaro.org>
7145
7146 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7147 targets.
7148
7149 2017-09-05 Pedro Alves <palves@redhat.com>
7150
7151 * eval.c (eval_call, evaluate_funcall): New functions, factored
7152 out from ...
7153 (evaluate_subexp_standard): ... this.
7154
7155 2017-09-05 Yao Qi <yao.qi@linaro.org>
7156
7157 * amd64-tdep.c (amd64_target_description): Create target
7158 descriptions.
7159 (_initialize_amd64_tdep): Don't call functions
7160 initialize_tdesc_amd64_*. Add self tests.
7161 * arch/amd64.c (amd64_create_target_description): Add parameter
7162 is_linux. Call set_tdesc_osabi if is_linux is true.
7163 * arch/amd64.h (amd64_create_target_description): Update the
7164 declaration.
7165 * arch/i386.c (i386_create_target_description): Add parameter
7166 is_linux. Call set_tdesc_osabi if is_linux is true.
7167 * arch/i386.h (i386_create_target_description): Update
7168 declaration.
7169 * configure.tgt: Add i386.o to gdb_target_obs.
7170 * features/Makefile (XMLTOC): Remove i386/*.xml.
7171 * features/i386/amd64-avx-avx512.c: Remove.
7172 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7173 * features/i386/amd64-avx-mpx.c: Remove.
7174 * features/i386/amd64-avx.c: Remove.
7175 * features/i386/amd64-mpx.c: Remove.
7176 * features/i386/amd64.c: Remove.
7177 * features/i386/i386-avx-avx512.c: Remove.
7178 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7179 * features/i386/i386-avx-mpx.c: Remove.
7180 * features/i386/i386-avx.c: Remove.
7181 * features/i386/i386-mmx.c: Remove.
7182 * features/i386/i386-mpx.c: Remove.
7183 * features/i386/i386.c: Remove.
7184 * i386-tdep.c: Don't include features/i386/i386*.c., include
7185 target-descriptions.h and arch/i386.h.
7186 (i386_target_description): Create target descriptions.
7187 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7188 functions. Do self tests.
7189
7190 2017-09-05 Yao Qi <yao.qi@linaro.org>
7191
7192 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7193 * features/i386/amd64-avx-avx512-linux.c: Removed.
7194 * features/i386/amd64-avx-linux.c: Removed.
7195 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7196 * features/i386/amd64-avx-mpx-linux.c: Removed.
7197 * features/i386/amd64-linux.c: Removed.
7198 * features/i386/amd64-mpx-linux.c: Removed.
7199 * features/i386/x32-avx-avx512-linux.c: Removed.
7200 * features/i386/x32-avx-linux.c: Removed.
7201 * features/i386/x32-linux.c: Removed.
7202
7203 2017-09-05 Yao Qi <yao.qi@linaro.org>
7204
7205 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7206 features/i386/*.c.
7207 (amd64_linux_read_description): Call
7208 amd64_create_target_description.
7209 * arch/amd64.c: New file.
7210 * arch/amd64.h: New file.
7211 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7212 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7213
7214 2017-09-05 Yao Qi <yao.qi@linaro.org>
7215
7216 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7217 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7218 (amd64_linux_read_description): Create target descriptions.
7219 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7220 functions. Add unit tests.
7221 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7222 x32-core.xml.
7223 * features/i386/64bit-avx.c: Generated.
7224 * features/i386/64bit-avx512.c: Generated.
7225 * features/i386/64bit-core.c: Generated.
7226 * features/i386/64bit-linux.c: Generated.
7227 * features/i386/64bit-mpx.c: Generated.
7228 * features/i386/64bit-pkeys.c: Generated.
7229 * features/i386/64bit-segments.c: Generated.
7230 * features/i386/64bit-sse.c: Generated.
7231 * features/i386/x32-core.c: Generated.
7232 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7233 c files for amd64-linux and x32-linux.
7234
7235 2017-09-05 Yao Qi <yao.qi@linaro.org>
7236
7237 * amd64-linux-tdep.c (amd64_linux_read_description): New
7238 function.
7239 (amd64_linux_core_read_description): Call
7240 amd64_linux_read_description.
7241 (amd64_linux_init_abi): Likewise.
7242 (amd64_x32_linux_init_abi): Likewise.
7243 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7244 * x86-linux-nat.c (x86_linux_read_description): Call
7245 amd64_linux_read_description.
7246
7247 2017-09-05 Yao Qi <yao.qi@linaro.org>
7248
7249 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7250 comments.
7251
7252 2017-09-05 Yao Qi <yao.qi@linaro.org>
7253
7254 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7255 * features/i386/i386-avx-avx512-linux.c: Remove.
7256 * features/i386/i386-avx-linux.c: Remove.
7257 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7258 * features/i386/i386-avx-mpx-linux.c: Remove.
7259 * features/i386/i386-linux.c: Remove.
7260 * features/i386/i386-mmx-linux.c: Remove.
7261 * features/i386/i386-mpx-linux.c: Remove.
7262
7263 2017-09-05 Yao Qi <yao.qi@linaro.org>
7264
7265 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7266 (SFILES): Add arch/i386.c.
7267 (HFILES_NO_SRCDIR): Add arch/i386.h.
7268 * arch/i386.c: New file.
7269 * arch/i386.h: New file.
7270 * arch/tdesc.h (allocate_target_description): Declare.
7271 (set_tdesc_architecture): Declare.
7272 (set_tdesc_osabi): Declare.
7273 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7274 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7275 include arch/i386.h.
7276 (i386_linux_read_description): Remove code and call
7277 i386_create_target_description.
7278 (set_tdesc_architecture): New function.
7279 (set_tdesc_osabi): New function.
7280 * target-descriptions.h (allocate_target_description): Remove.
7281
7282 2017-09-05 Yao Qi <yao.qi@linaro.org>
7283
7284 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7285 * target-descriptions.c (tdesc_create_feature): Likewise, and
7286 adjust code.
7287 * features/i386/32bit-avx.c: Re-generated.
7288 * features/i386/32bit-avx512.c: Re-generated.
7289 * features/i386/32bit-core.c: Re-generated.
7290 * features/i386/32bit-linux.c: Re-generated.
7291 * features/i386/32bit-mpx.c: Re-generated.
7292 * features/i386/32bit-pkeys.c: Re-generated.
7293 * features/i386/32bit-sse.c: Re-generated.
7294
7295 2017-09-05 Yao Qi <yao.qi@linaro.org>
7296
7297 * regformats/regdef.h (struct reg): Override operator == and !=.
7298
7299 2017-09-05 Yao Qi <yao.qi@linaro.org>
7300
7301 * arch/tdesc.h: New file.
7302 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7303 * target-descriptions.c: Update comments.
7304 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7305 declarations.
7306 * features/i386/32bit-avx.c: Re-generated.
7307 * features/i386/32bit-avx512.c: Re-generated.
7308 * features/i386/32bit-core.c: Re-generated.
7309 * features/i386/32bit-linux.c: Re-generated.
7310 * features/i386/32bit-mpx.c: Re-generated.
7311 * features/i386/32bit-pkeys.c: Re-generated.
7312 * features/i386/32bit-sse.c: Re-generated.
7313
7314 2017-09-05 Yao Qi <yao.qi@linaro.org>
7315
7316 * regformats/regdat.sh: Update generated code.
7317
7318 2017-09-05 Yao Qi <yao.qi@linaro.org>
7319
7320 * regformats/regdat.sh: Adjust code order.
7321
7322 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7323
7324 * expprint.c (dump_subexp_body_standard): Use constant format
7325 string in fprintf_filtered call.
7326
7327 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7328
7329 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7330 NetBSD/i386.
7331 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7332
7333 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7334
7335 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7336
7337 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7338
7339 * bsd-kvm.o: Define _KMEMUSER.
7340 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7341 * configure: Regenerate.
7342
7343 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7344
7345 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7346 * i386-fbsd-nat.c: Likewise.
7347
7348 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7349
7350 * unittests/array-view-selftests.c: Add include of <array>.
7351
7352 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7353
7354 * spu-tdep.c (flush_ea_cache): Add missing argument to
7355 call_function_by_hand.
7356
7357 2017-09-04 Pedro Alves <palves@redhat.com>
7358
7359 * NEWS (Safer support for debugging with no debug info): New.
7360
7361 2017-09-04 Pedro Alves <palves@redhat.com>
7362
7363 * c-exp.y (function_method, function_method_void): Add current
7364 instance flags to TYPE_INSTANCE.
7365 * dwarf2read.c (check_modifier): New.
7366 (compute_delayed_physnames): Assert that only C++ adds delayed
7367 physnames. Mark fn_fields as const/volatile depending on
7368 physname.
7369 * eval.c (make_params): New type_instance_flags parameter. Use
7370 it as the new type's instance flags.
7371 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7372 flags element and pass it to make_params.
7373 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7374 instance flags element.
7375 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7376 * gdbtypes.h: Include "enum-flags.h".
7377 (type_instance_flags): New enum-flags type.
7378 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7379 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7380 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7381 (follow_type_instance_flags): New function.
7382 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7383 * parser-defs.h (follow_type_instance_flags): Declare.
7384 * valops.c (value_struct_elt_for_reference): const/volatile must
7385 match too.
7386
7387 2017-09-04 Pedro Alves <palves@redhat.com>
7388
7389 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7390 function/method scopes; lookup the nested name as a function local
7391 static variable.
7392
7393 2017-09-04 Pedro Alves <palves@redhat.com>
7394
7395 (%type <voidval>): Add function_method.
7396 * c-exp.y (exp): New production for calls with no arguments.
7397 (function_method, function_method_void_or_typelist): New
7398 productions.
7399 (exp): New production for "method()::static_var".
7400 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7401 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7402 Handle OP_FUNC_STATIC_VAR.
7403 * parse.c (operator_length_standard):
7404 Handle OP_FUNC_STATIC_VAR.
7405
7406 2017-09-04 Pedro Alves <palves@redhat.com>
7407
7408 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7409 handling.
7410 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7411 Ditto.
7412 * parse.c (operator_length_standard, operator_check_standard):
7413 Ditto.
7414 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7415
7416 2017-09-04 Pedro Alves <palves@redhat.com>
7417
7418 * ax-gdb.c: Include "typeprint.h".
7419 (gen_expr_for_cast): New function.
7420 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7421 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7422 type is unknown.
7423 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7424 nodebug_data_symbol.
7425 * eval.c: Include "typeprint.h".
7426 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7427 Error out if symbol has unknown type.
7428 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7429 evaluate_subexp_for_cast.
7430 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7431 OP_VAR_MSYM_VALUE.
7432 (evaluate_subexp_for_cast): New function.
7433 * gdbtypes.c (init_nodebug_var_type): New function.
7434 (objfile_type): Use it to initialize types of variables with no
7435 debug info.
7436 * typeprint.c (error_unknown_type): New.
7437 * typeprint.h (error_unknown_type): New declaration.
7438 * compile/compile-c-types.c (convert_type_basic): Handle
7439 TYPE_CODE_ERROR; warn and fallback to int for variables with
7440 unknown type.
7441
7442 2017-09-04 Pedro Alves <palves@redhat.com>
7443
7444 * eval.c (evaluate_var_value): New function, factored out from ...
7445 (evaluate_subexp_standard): ... here.
7446
7447 2017-09-04 Pedro Alves <palves@redhat.com>
7448
7449 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7450 Remove useless assignments to 'op'.
7451
7452 2017-09-04 Pedro Alves <palves@redhat.com>
7453
7454 * eval.c (eval_skip_value): New function.
7455 (evaluate_subexp_standard): Use it.
7456
7457 2017-09-04 Pedro Alves <palves@redhat.com>
7458
7459 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7460 function name from symbol/minsym and pass it to
7461 error_call_unknown_return_type.
7462
7463 2017-09-04 Pedro Alves <palves@redhat.com>
7464
7465 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7466 * ax-gdb.c (gen_msym_var_ref): New function.
7467 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7468 * eval.c (evaluate_var_msym_value): New function.
7469 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7470 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7471 to call_function_by_hand.
7472 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7473 Handle OP_VAR_MSYM_VALUE.
7474 (union exp_element) <msymbol>: New field.
7475 * minsyms.h (struct type): Forward declare.
7476 (find_minsym_type_and_address): Declare.
7477 * parse.c (write_exp_elt_msym): New function.
7478 (write_exp_msymbol): Delete, refactored as ...
7479 (find_minsym_type_and_address): ... this new function.
7480 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7481 (operator_length_standard, operator_check_standard): Handle
7482 OP_VAR_MSYM_VALUE.
7483 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7484
7485 2017-09-04 Pedro Alves <palves@redhat.com>
7486
7487 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7488 TYPE_GNU_IFUNC specially here. Throw error if return type is
7489 unknown.
7490 * ada-typeprint.c (print_func_type): Handle functions with unknown
7491 return type.
7492 * c-typeprint.c (c_type_print_base): Handle functions and methods
7493 with unknown return type.
7494 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7495 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7496 * compile/compile-c-types.c: Include "objfiles.h".
7497 (convert_func): For functions with unknown return type, warn and
7498 default to int.
7499 * compile/compile-object-run.c (compile_object_run): Adjust call
7500 to call_function_by_hand_dummy.
7501 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7502 call_function_by_hand.
7503 * eval.c (evaluate_subexp_standard): Adjust calls to
7504 call_function_by_hand. Handle functions and methods with unknown
7505 return type. Pass expect_type to call_function_by_hand.
7506 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7507 return type.
7508 * gcore.c (call_target_sbrk): Adjust call to
7509 call_function_by_hand.
7510 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7511 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7512 an integer address type instead of nodebug.
7513 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7514 call_function_by_hand.
7515 * infcall.c (error_call_unknown_return_type): New function.
7516 (call_function_by_hand): New "default_return_type" parameter.
7517 Pass it down.
7518 (call_function_by_hand_dummy): New "default_return_type"
7519 parameter. Use it instead of defaulting to int. If there's no
7520 default and the return type is unknown, throw an error. If
7521 there's a default return type, and the called function has no
7522 debug info, then assume the function is prototyped.
7523 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7524 New "default_return_type" parameter.
7525 (error_call_unknown_return_type): New declaration.
7526 * linux-fork.c (call_lseek): Cast return type of lseek.
7527 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7528 call_function_by_hand.
7529 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7530 calls to call_function_by_hand.
7531 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7532 return type.
7533 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7534 (value_nsstring, print_object_command): Adjust calls to
7535 call_function_by_hand.
7536 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7537 functions with unknown return type.
7538 (pascal_type_print_func_varspec_suffix): New function.
7539 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7540 TYPE_CODE_METHOD>: Use it.
7541 * python/py-value.c (valpy_call): Adjust call to
7542 call_function_by_hand.
7543 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7544 call_function_by_hand.
7545 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7546 call_function_by_hand.
7547 * valops.c (value_allocate_space_in_inferior): Adjust call to
7548 call_function_by_hand.
7549 * typeprint.c (type_print_unknown_return_type): New function.
7550 * typeprint.h (type_print_unknown_return_type): New declaration.
7551
7552 2017-09-04 Pedro Alves <palves@redhat.com>
7553
7554 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7555 types with more than one parameter as prototyped.
7556
7557 2017-09-04 Pedro Alves <palves@redhat.com>
7558
7559 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7560 (disassemble_command): Use gdb_disassembly_flags instead of bare
7561 int.
7562 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7563 (dump_insns, do_mixed_source_and_assembly_deprecated)
7564 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7565 Use gdb_disassembly_flags instead of bare int.
7566 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7567 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7568 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7569 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7570 (enum gdb_disassembly_flag): ... values of this new enumeration.
7571 (gdb_disassembly_flags): Define.
7572 (gdb_disassembly)
7573 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7574 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7575 gdb_disassembly_flags instead of bare int.
7576 * record-btrace.c (btrace_insn_history)
7577 (record_btrace_insn_history, record_btrace_insn_history_range)
7578 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7579 instead of bare int.
7580 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7581 Use gdb_disassembly_flags instead of bare int.
7582 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7583 Define.
7584 * target-delegates.c: Regenerate.
7585 * target.c (target_insn_history, target_insn_history_from)
7586 (target_insn_history_range): Use gdb_disassembly_flags instead of
7587 bare int.
7588 * target.h: Include "disasm.h".
7589 (struct target_ops) <to_insn_history, to_insn_history_from,
7590 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7591 int.
7592 (target_insn_history, target_insn_history_from)
7593 (target_insn_history_range): Use gdb_disassembly_flags instead of
7594 bare int.
7595
7596 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7597
7598 * cli/cli-script.c (build_command_line): For if/while commands,
7599 check whether args is empty.
7600
7601 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7602
7603 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7604 (enum command_control_type): Likewise.
7605 (struct command_line): Likewise.
7606 (free_command_lines): Likewise.
7607 (struct command_lines_deleter): Likewise.
7608 (command_line_up): Likewise.
7609 (read_command_lines): Likewise.
7610 (read_command_lines_1): Likewise.
7611 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7612 (enum command_control_type): Likewise.
7613 (struct command_line): Likewise.
7614 (free_command_lines): Likewise.
7615 (struct command_lines_deleter): Likewise.
7616 (command_line_up): Likewise.
7617 (read_command_lines): Likewise.
7618 (read_command_lines_1): Likewise.
7619 * breakpoint.h: Include cli/cli-script.h.
7620 * extension-priv.h: Likewise.
7621 * gdbcmd.h: Likewise.
7622
7623 2017-09-04 Pedro Alves <palves@redhat.com>
7624
7625 * ada-lang.c (is_known_support_routine): Move sal declaration to
7626 where it is initialized.
7627 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7628 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7629 (clear_command, update_static_tracepoint): Remove init_sal
7630 references. Move declarations closer to initializations.
7631 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7632 initializations.
7633 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7634 references. Move sal declarations closer to initializations.
7635 * frame.c (find_frame_sal): Return a symtab_and_line via function
7636 return instead of output parameter. Remove init_sal references.
7637 * frame.h (find_frame_sal): Return a symtab_and_line via function
7638 return instead of output parameter.
7639 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7640 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7641 instead of memset.
7642 (gdbscm_find_pc_line): Remove init_sal reference.
7643 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7644 references. Move declarations closer to initializations.
7645 * infcmd.c (set_step_frame): Update. Move declarations closer to
7646 initializations.
7647 (finish_backward): Remove init_sal references. Move declarations
7648 closer to initializations.
7649 * infrun.c (process_event_stop_test, handle_step_into_function)
7650 (insert_hp_step_resume_breakpoint_at_frame)
7651 (insert_step_resume_breakpoint_at_caller): Likewise.
7652 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7653 (symbol_to_sal): Likewise.
7654 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7655 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7656 to its initialization.
7657 * reverse.c (save_bookmark_command): Use new/delete. Remove
7658 init_sal references. Move declarations closer to initializations.
7659 * source.c (get_current_source_symtab_and_line): Remove brace
7660 initialization.
7661 (set_current_source_symtab_and_line): Now takes the sal by const
7662 reference. Remove brace initialization.
7663 (line_info): Remove init_sal reference.
7664 * source.h (set_current_source_symtab_and_line): Now takes a
7665 symtab_and_line via const reference.
7666 * stack.c (set_current_sal_from_frame): Adjust.
7667 (print_frame_info): Adjust.
7668 (get_last_displayed_sal): Return the sal via function return
7669 instead of via output parameter. Simplify.
7670 (frame_info): Adjust.
7671 * stack.h (get_last_displayed_sal): Return the sal via function
7672 return instead of via output parameter.
7673 * symtab.c (init_sal): Delete.
7674 (find_pc_sect_line): Remove init_sal references. Move
7675 declarations closer to initializations.
7676 (find_function_start_sal): Remove init_sal references. Move
7677 declarations closer to initializations.
7678 * symtab.h (struct symtab_and_line): In-class initialize all
7679 fields.
7680 * tracepoint.c (set_traceframe_context)
7681 (print_one_static_tracepoint_marker): Remove init_sal references.
7682 Move declarations closer to initializations.
7683 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7684 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7685 declarations closer to initializations.
7686 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7687 init_sal references. Adjust.
7688
7689 2017-09-04 Pedro Alves <palves@redhat.com>
7690
7691 * ax-gdb.c (agent_command_1): Use range-for.
7692 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7693 * breakpoint.c: Include "common/array-view.h".
7694 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7695 parameter from struct symtabs_and_lines to
7696 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7697 (breakpoint_sals_to_pc): Change sals parameter from struct
7698 symtabs_and_lines to std::vector reference.
7699 (check_fast_tracepoint_sals): Change sals parameter from struct
7700 symtabs_and_lines to std::array_view. Use range-for.
7701 (decode_static_tracepoint_spec): Return a std::vector instead of
7702 symtabs_and_lines. Update.
7703 (create_breakpoint): Update.
7704 (break_range_command, until_break_command, clear_command): Update.
7705 (base_breakpoint_decode_location, bkpt_decode_location)
7706 (bkpt_probe_create_sals_from_location)
7707 (bkpt_probe_decode_location, tracepoint_decode_location)
7708 (tracepoint_probe_decode_location)
7709 (strace_marker_create_sals_from_location): Return a std::vector
7710 instead of symtabs_and_lines.
7711 (strace_marker_create_breakpoints_sal): Update.
7712 (strace_marker_decode_location): Return a std::vector instead of
7713 symtabs_and_lines. Update.
7714 (update_breakpoint_locations): Change struct symtabs_and_lines
7715 parameters to gdb::array_view. Adjust.
7716 (location_to_sals): Return a std::vector instead of
7717 symtabs_and_lines. Update.
7718 (breakpoint_re_set_default): Use std::vector instead of struct
7719 symtabs_and_lines.
7720 (decode_location_default): Return a std::vector instead of
7721 symtabs_and_lines. Update.
7722 * breakpoint.h: Include "common/array-view.h".
7723 (struct breakpoint_ops) <decode_location>: Now returns a
7724 std::vector instead of returning a symtabs_and_lines via output
7725 parameter.
7726 (update_breakpoint_locations): Change sals parameters to use
7727 gdb::array_view.
7728 * cli/cli-cmds.c (edit_command, list_command): Update to use
7729 std::vector and gdb::array_view.
7730 (ambiguous_line_spec): Adjust to use gdb::array_view and
7731 range-for.
7732 (compare_symtabs): Rename to ...
7733 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7734 const reference and adjust.
7735 (filter_sals): Rewrite using std::vector and standard algorithms.
7736 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7737 (jump_command): Update to use std::vector.
7738 * linespec.c (struct linespec_state) <canonical_names>: Update
7739 comment.
7740 (add_sal_to_sals_basic): Delete.
7741 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7742 (decode_line_2, create_sals_line_offset)
7743 (convert_address_location_to_sals, convert_linespec_to_sals)
7744 (convert_explicit_location_to_sals, parse_linespec)
7745 (event_location_to_sals, decode_line_full, decode_line_1)
7746 (decode_line_with_current_source)
7747 (decode_line_with_last_displayed, decode_objc)
7748 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7749 (linespec_result::~linespec_result): Adjust to use std::vector
7750 instead of symtabs_and_lines.
7751 * linespec.h (linespec_sals::sals): Now a std::vector.
7752 (struct linespec_result): Use std::vector, bool, and in-class
7753 initialization.
7754 (decode_line_1, decode_line_with_current_source)
7755 (decode_line_with_last_displayed): Return std::vector.
7756 * macrocmd.c (info_macros_command): Use std::vector.
7757 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7758 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7759 std::vector.
7760 * probe.h (parse_probes): Return a std::vector.
7761 * python/python.c (gdbpy_decode_line): Use std::vector and
7762 gdb::array_view.
7763 * source.c (select_source_symtab, line_info): Use std::vector.
7764 * stack.c (func_command): Use std::vector.
7765 * symtab.h (struct symtabs_and_lines): Delete.
7766 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7767
7768 2017-09-04 Pedro Alves <palves@redhat.com>
7769
7770 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7771 unittests/array-view-selftests.c.
7772 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7773 * common/array-view.h: New file.
7774 * unittests/array-view-selftests.c: New file.
7775
7776 2017-09-04 Pedro Alves <palves@redhat.com>
7777
7778 * cli/cli-cmds.c (edit_command): Pass message to
7779 ambiguous_line_spec.
7780 (list_command): Pass message to ambiguous_line_spec. Say
7781 "first"/"last" instead of "start" and "end" to be consistent with
7782 the manual.
7783 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7784 them to print formatted message.
7785
7786 2017-09-04 Pedro Alves <palves@redhat.com>
7787
7788 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7789 ftrace_update_insns by reference instead of pointer.
7790
7791 2017-09-04 Yao Qi <yao.qi@linaro.org>
7792
7793 * i386-go32-tdep.c: Include x86-xstate.h.
7794 (i386_go32_init_abi): Call i386_target_description.
7795 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7796 if xcr0 is X86_XSTATE_X87_MASK.
7797 * i386-tdep.h (tdesc_i386): Remove the declaration.
7798 (tdesc_i386_mmx): Likewise.
7799
7800 2017-09-04 Yao Qi <yao.qi@linaro.org>
7801
7802 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7803 X86_XSTATE_SSE_MASK instead of 0.
7804
7805 2017-09-04 Yao Qi <yao.qi@linaro.org>
7806
7807 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7808 i386_target_description.
7809 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7810 i386_target_description.
7811 * i386-tdep.c (i386_gdbarch_init): Likewise.
7812
7813 2017-09-04 Yao Qi <yao.qi@linaro.org>
7814
7815 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7816 (x86_darwin_init_abi_64): Call amd64_target_description.
7817 * amd64-dicos-tdep.c: Likewise.
7818 * amd64-fbsd-nat.c: Likewise.
7819 * amd64-fbsd-tdep.c: Likewise.
7820 * amd64-nbsd-tdep.c: Likewise.
7821 * amd64-obsd-tdep.c: Likewise.
7822 * amd64-sol2-tdep.c: Likewise.
7823 * amd64-windows-tdep.c: Likewise.
7824 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7825
7826 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7827
7828 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7829 (btrace_function) <insn>: Change type to use std::vector.
7830 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7831 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7832 ftrace_update_insns, ftrace_compute_global_level_offset,
7833 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7834 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7835 change to std::vector.
7836 (ftrace_update_insns): Adjust to change to std::vector, change
7837 type of INSN parameter.
7838 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7839 * record-btrace.c (btrace_call_history_insn_range,
7840 btrace_compute_src_line_range,
7841 record_btrace_frame_prev_register): Adjust to change to
7842 std::vector.
7843 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7844 to change to std::vector.
7845
7846 2017-09-03 Tom Tromey <tom@tromey.com>
7847
7848 * corefile.c (reopen_exec_file): Use std::string.
7849
7850 2017-09-03 Tom Tromey <tom@tromey.com>
7851
7852 * compile/compile.c (compile_register_name_mangled): Return
7853 std::string.
7854 * compile/compile-loc2c.c (pushf_register_address): Update.
7855 (pushf_register): Update.
7856 * compile/compile-c-types.c (convert_array): Update.
7857 * compile/compile-c-symbols.c (generate_vla_size): Update.
7858 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7859 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7860 (convert_one_symbol): Update.
7861 (generate_c_for_for_one_variable): Update.
7862 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7863 std::string.
7864 (generate_register_struct): Update.
7865 * compile/compile-internal.h (c_get_range_decl_name): Return a
7866 std::string.
7867 (compile_register_name_mangled): Return std::string.
7868
7869 2017-09-03 Tom Tromey <tom@tromey.com>
7870
7871 * utils.c (perror_string): Return a std::string.
7872 (throw_perror_with_name, perror_warning_with_name): Update.
7873
7874 2017-09-03 Tom Tromey <tom@tromey.com>
7875
7876 * demangle.c (demangle_command): Use std::string,
7877 unique_xmalloc_ptr.
7878
7879 2017-09-03 Tom Tromey <tom@tromey.com>
7880
7881 * cli/cli-setshow.c (do_set_command): Use std::string.
7882
7883 2017-09-03 Tom Tromey <tom@tromey.com>
7884
7885 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7886
7887 2017-09-03 Tom Tromey <tom@tromey.com>
7888
7889 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7890
7891 2017-09-03 Tom Tromey <tom@tromey.com>
7892
7893 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7894 gdb::unique_xmalloc_ptr.
7895
7896 2017-09-03 Tom Tromey <tom@tromey.com>
7897
7898 * thread.c (print_thread_info_1): Use string_printf.
7899 (thread_apply_command, thread_apply_all_command): Use
7900 std::string.
7901
7902 2017-09-03 Tom Tromey <tom@tromey.com>
7903
7904 * valprint.c (val_print_string): Update.
7905 * gdbcore.h (memory_error_message): Return std::string.
7906 * corefile.c (memory_error_message): Return std::string.
7907 (memory_error): Update.
7908 * breakpoint.c (insert_bp_location): Update.
7909
7910 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7911
7912 * target/waitstatus.h (target_waitstatus_to_string): Change
7913 return type to std::string.
7914 * target/waitstatus.c (target_waitstatus_to_string): Return
7915 std::string.
7916 * target.h (target_waitstatus_to_string): Remove declaration.
7917 * infrun.c (resume, clear_proceed_status_thread,
7918 print_target_wait_results, do_target_wait, save_waitstatus,
7919 stop_all_threads): Adjust.
7920 * record-btrace.c (record_btrace_wait): Adjust.
7921 * target-debug.h
7922 (target_debug_print_struct_target_waitstatus_p): Adjust.
7923
7924 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7925
7926 PR gdb/22046
7927 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7928 detection.
7929
7930 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7931
7932 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7933 for setting/unsetting environment variables on the remote target.
7934 (New remote packets): Add entries for QEnvironmentHexEncoded,
7935 QEnvironmentUnset and QEnvironmentReset.
7936 * common/environ.c (gdb_environ::operator=): Extend method to
7937 handle m_user_set_env_list and m_user_unset_env_list.
7938 (gdb_environ::clear): Likewise.
7939 (match_var_in_string): Change type of first parameter from 'char
7940 *' to 'const char *'.
7941 (gdb_environ::set): Extend method to handle
7942 m_user_set_env_list and m_user_unset_env_list.
7943 (gdb_environ::unset): Likewise.
7944 (gdb_environ::clear_user_set_env): New method.
7945 (gdb_environ::user_set_envp): Likewise.
7946 (gdb_environ::user_unset_envp): Likewise.
7947 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7948 m_user_unset_env_list on move constructor/assignment.
7949 (unset): Add new default parameter 'update_unset_list = true'.
7950 (clear_user_set_env): New method.
7951 (user_set_envp): Likewise.
7952 (user_unset_envp): Likewise.
7953 (m_user_set_env_list): New std::set.
7954 (m_user_unset_env_list): Likewise.
7955 * common/rsp-low.c (hex2str): New function.
7956 (bin2hex): New overload for bin2hex function.
7957 * common/rsp-low.c (hex2str): New prototype.
7958 (str2hex): New overload prototype.
7959 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7960 QEnvironmentUnset and QEnvironmentReset.
7961 (remote_protocol_features): Add QEnvironmentHexEncoded,
7962 QEnvironmentUnset and QEnvironmentReset packets.
7963 (send_environment_packet): New function.
7964 (extended_remote_environment_support): Likewise.
7965 (extended_remote_create_inferior): Call
7966 extended_remote_environment_support.
7967 (_initialize_remote): Add QEnvironmentHexEncoded,
7968 QEnvironmentUnset and QEnvironmentReset packet configs.
7969 * unittests/environ-selftests.c (gdb_selftest_env_var):
7970 New variable.
7971 (test_vector_initialization): New function.
7972 (test_init_from_host_environ): Likewise.
7973 (test_reinit_from_host_environ): Likewise.
7974 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7975 Likewise.
7976 (test_unset_set_empty_vector): Likewise.
7977 (test_vector_clear): Likewise.
7978 (test_std_move): Likewise.
7979 (test_move_constructor):
7980 (test_self_move): Likewise.
7981 (test_set_unset_reset): Likewise.
7982 (run_tests): Rewrite in terms of the functions above.
7983
7984 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7985
7986 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7987 (adi_available): Use a temp variable of type CORE_ADDR as argument
7988 3 when calling target_auxv_search.
7989 (adi_normalize_address): Use masks and xor operators to calculate
7990 normalized address.
7991 (adi_read_versions, adi_write_versions, adi_print_versions)
7992 (do_examine, do_assign): Use paddress.
7993
7994 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7995
7996 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7997 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7998 out of loop and add supply of FIR.
7999 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8000 add collect of FIR.
8001
8002 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8003
8004 PR gdb/21827
8005 * cli/cli-script.c (define_command): Don't convert command name
8006 to lower case.
8007
8008 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8009
8010 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8011 Update all callers accordingly. Remove all code blocks handling
8012 the case where DISPP is not NULL.
8013
8014 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8015
8016 PR symtab/22003
8017 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8018 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8019 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8020
8021 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8022
8023 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8024 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8025 (read_comp_units_from_section): New parameter abbrev_section, use
8026 read_and_check_comp_unit_head, allocate signatured_type if needed.
8027 (create_all_comp_units): Update read_comp_units_from_section caller.
8028
8029 2017-08-23 Pedro Alves <palves@redhat.com>
8030
8031 PR remote/21852
8032 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8033 to null_ptid and switch to thread without reading the registers
8034 after adding the inferior.
8035
8036 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8037
8038 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8039 compile-gcc.
8040 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8041 (compile_to_object): Implement compile_gcc.
8042 (_initialize_compile): Install "set compile-gcc". Initialize
8043 compile_gcc.
8044
8045 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8046
8047 * compile/compile.c (compile_to_object): Conditionally call
8048 set_verbose. Conditionally call compile or compile_v0.
8049
8050 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8051
8052 * sparc64-tdep.h: (adi_normalize_address): New export.
8053 * sparc-nat.h: (open_adi_tag_fd): New export.
8054 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8055 * sparc64-linux-tdep.c:
8056 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8057 (sparc64_linux_handle_segmentation_fault): New function.
8058 (sparc64_linux_init_abi): Register
8059 sparc64_linux_handle_segmentation_fault
8060 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8061 (sparc64_addr_bits_remove): New function.
8062 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8063 (MAX_PROC_NAME_SIZE): New macro.
8064 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8065 (sparc64adilist): New variable.
8066 (adi_proc_list): New variable.
8067 (find_adi_info): New function.
8068 (add_adi_info): New function.
8069 (get_adi_info_proc): New function.
8070 (get_adi_info): New function.
8071 (info_adi_command): New function.
8072 (read_maps_entry): New function.
8073 (adi_available): New function.
8074 (adi_normalize_address): New function.
8075 (adi_align_address): New function.
8076 (adi_convert_byte_count): New function.
8077 (adi_tag_fd): New function.
8078 (adi_is_addr_mapped): New function.
8079 (adi_read_versions): New function.
8080 (adi_write_versions): New function.
8081 (adi_print_versions): New function.
8082 (do_examine): New function.
8083 (do_assign): New function.
8084 (adi_examine_command): New function.
8085 (adi_assign_command): New function.
8086 (_initialize_sparc64_adi_tdep): New function.
8087
8088 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8089
8090 * breakpoint.c (breakpoints_info): Rename to ...
8091 (info_breakpoints_command): ... this.
8092 (watchpoints_info): Rename to ...
8093 (info_watchpoints_command): ... this.
8094 (tracepoints_info): Rename to ...
8095 (info_tracepoints_command): ... this.
8096 (_initialize_breakpoint): Adjust.
8097 * dcache.c (dcache_info): Rename to ...
8098 (info_display_command): ... this.
8099 (_initialize_dcache): Adjust.
8100 * frame.h (args_info): Rename to ...
8101 (info_args_command): ... this.
8102 (locals_info): Rename to ...
8103 (info_locals_command): ... this.
8104 * infcmd.c (nofp_registers_info): Rename to ...
8105 (info_registers_command): ... this.
8106 (float_info): Rename to ...
8107 (info_float_command): ... this.
8108 (program_info): Rename to ...
8109 (info_program_command): ... this.
8110 (all_registers_info): Rename to ...
8111 (info_all_registers_command): ... this.
8112 (vector_info): Rename to ...
8113 (info_vector_command): ... this.
8114 (float_info): Rename to ...
8115 (info_float_command): ... this.
8116 (_initialize_infcmd): Adjust.
8117 * inferior.h (term_info): Rename to ...
8118 (info_terminal_command): ... this.
8119 * inflow.c (term_info): Rename to ...
8120 (info_terminal_command): ... this.
8121 (_initialize_inflow): Adjust.
8122 * infrun.c (signals_info): Rename to ...
8123 (info_signals_command): ... this.
8124 (_initialize_infrun): Adjust.
8125 * objc-lang.c (classes_info): Rename to ...
8126 (info_classes_command): ... this.
8127 (selectors_info): Rename to ...
8128 (info_selectors_command): ... this.
8129 (_initialize_objc_language): Adjust.
8130 * printcmd.c (sym_info): Rename to ...
8131 (info_symbol_command): ... this.
8132 (address_info): Rename to ...
8133 (info_address_command): ... this.
8134 (display_info): Rename to ...
8135 (info_display_command): ... this.
8136 (_initialize_printcmd): Adjust.
8137 * reverse.c (bookmarks_info): Rename to ...
8138 (info_breakpoints_command): ... this.
8139 (_initialize_reverse): Adjust.
8140 * ser-go32.c (dos_info): Rename to ...
8141 (info_serial_command): ... this.
8142 (_initialize_ser_dos): Adjust.
8143 * skip.c (skip_info): Rename to ...
8144 (info_skip_command): ... this.
8145 (_initialize_step_skip): Adjust.
8146 * source.c (line_info): Rename to ...
8147 (info_line_command): ... this.
8148 (source_info): Rename to ...
8149 (info_source_command)
8150 * stack.c (frame_info): Rename to ...
8151 (info_frame_command): ... this.
8152 (locals_info): Rename to ...
8153 (info_locals_command): ... this.
8154 (args_info): Rename to ...
8155 (info_args_command): ... this.
8156 (_initialize_stack): Adjust.
8157 * symtab.c (sources_info): Rename to ...
8158 (info_sources_command): ... this.
8159 (variables_info): Rename to ...
8160 (info_variables_command): ... this.
8161 (functions_info): Rename to ...
8162 (info_functions_command): ... this.
8163 (types_info): Rename to ...
8164 (info_types_command): ... this.
8165 (_initialize_symtab): Adjust.
8166 * target.c (target_info): Rename to ...
8167 (info_target_command): ... this.
8168 (initialize_targets): Adjust.
8169 * tracepoint.c (tvariables_info): Rename to ...
8170 (info_tvariables_command): ... this.
8171 (scope_info): Rename to ...
8172 (info_scope_command): ... this.
8173 (trace_dump_actions): Adjust.
8174 (_initialize_tracepoint): Adjust.
8175
8176 2017-08-22 Tom Tromey <tom@tromey.com>
8177
8178 * breakpoint.h (install_breakpoint): Update.
8179 * breakpoint.c (add_solib_catchpoint): Update.
8180 (install_breakpoint): Change argument to a std::unique_ptr.
8181 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8182 (create_breakpoint_sal, create_breakpoint): Update.
8183 (watch_command_1, catch_exec_command_1)
8184 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8185 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8186 Return the breakpoint.
8187 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8188 (new_single_step_breakpoint): Update.
8189 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8190 std::unique_ptr.
8191 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8192 std::unique_ptr.
8193 * break-catch-sig.c (create_signal_catchpoint): Use
8194 std::unique_ptr.
8195 * ada-lang.c (create_ada_exception_catchpoint): Use
8196 std::unique_ptr.
8197
8198 2017-08-22 Tom Tromey <tom@tromey.com>
8199
8200 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8201
8202 2017-08-22 Tom Tromey <tom@tromey.com>
8203
8204 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8205 (lookup_partial_symbol): Update.
8206
8207 2017-08-22 Tom Tromey <tom@tromey.com>
8208
8209 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8210 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8211 (find_and_open_source, symtab_to_fullname): Update.
8212 * psymtab.c (psymtab_to_fullname): Update.
8213
8214 2017-08-22 Tom Tromey <tom@tromey.com>
8215
8216 * exec.c (exec_file_attach): Update.
8217 * linux-thread-db.c (try_thread_db_load): Update.
8218 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8219 * utils.c (gdb_realpath): Change return type.
8220 (gdb_realpath_keepfile): Update.
8221 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8222 (_initialize_utils): Register the new self test.
8223 * source.c (openp): Update.
8224 (find_and_open_source): Update.
8225 * nto-tdep.c (nto_find_and_open_solib): Update.
8226 * main.c (set_gdb_data_directory): Update.
8227 (captured_main_1): Update.
8228 * dwarf2read.c (dwarf2_get_dwz_file): Update
8229 (dw2_map_symbol_filenames): Update.
8230 * auto-load.c (auto_load_safe_path_vec_update): Update.
8231 (filename_is_in_auto_load_safe_path_vec): Change type of
8232 "filename_realp".
8233 (auto_load_objfile_script): Update.
8234 (file_is_auto_load_safe): Update. Use std::string.
8235 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8236
8237 2017-08-22 Tom Tromey <tom@tromey.com>
8238
8239 * utils.c (gdb_realpath_keepfile): Return a
8240 gdb::unique_xmalloc_ptr.
8241 * exec.c (exec_file_attach): Update.
8242 * utils.h (gdb_realpath_keepfile): Return a
8243 gdb::unique_xmalloc_ptr.
8244
8245 2017-08-22 Tom Tromey <tom@tromey.com>
8246
8247 * compile/compile.c (compile_file_command): Use
8248 gdb::unique_xmalloc_ptr, std::string.
8249 * utils.c (gdb_abspath): Change return type.
8250 * source.c (openp): Update.
8251 * objfiles.c (allocate_objfile): Update.
8252 * main.c (set_gdb_data_directory): Update.
8253 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8254
8255 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8256
8257 * cli-cmds.c (list_commands): List actual code around more than
8258 one location.
8259
8260 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8261
8262 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8263
8264 2017-08-21 Pedro Alves <palves@redhat.com>
8265
8266 PR gdb/19487
8267 * c-exp.y (variable production): Handle function aliases.
8268 * minsyms.c (msymbol_is_text): New function.
8269 * minsyms.h (msymbol_is_text): Declare.
8270 * symtab.c (find_function_alias_target): New function.
8271 * symtab.h (find_function_alias_target): Declare.
8272
8273 2017-08-21 Pedro Alves <palves@redhat.com>
8274
8275 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8276 typedefs.
8277 * typeprint.c (whatis_exp): If handling "whatis", and expression
8278 is OP_TYPE, strip one typedef level. Otherwise don't strip
8279 typedefs here.
8280 * valops.c (value_cast): Save "to" type before resolving
8281 stubs/typedefs. Use that type as resulting value's type.
8282
8283 2017-08-18 Tom Tromey <tom@tromey.com>
8284 Pedro Alves <palves@redhat.com>
8285
8286 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8287 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8288 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8289 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8290 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8291 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8292 (linux_get_siginfo_data): Add "thread" argument. Use
8293 scoped_restore.
8294 * linux-nat.c (linux_child_follow_fork)
8295 (check_stopped_by_watchpoint): Use scoped_restore.
8296 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8297 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8298 (restore_inferior_ptid, save_inferior_ptid): Remove.
8299 * btrace.c (btrace_fetch): Use scoped_restore.
8300 * bsd-uthread.c (bsd_uthread_fetch_registers)
8301 (bsd_uthread_store_registers): Use scoped_restore.
8302 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8303 scoped_restore.
8304 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8305 (aix_thread_xfer_partial): Use scoped_restore.
8306 * inferior.h (save_inferior_ptid): Remove.
8307
8308 2017-08-18 Yao Qi <yao.qi@linaro.org>
8309
8310 PR tdep/21818
8311 * arm-tdep.c (gdb_print_insn_arm): Mark
8312 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8313
8314 2017-08-18 Yao Qi <yao.qi@linaro.org>
8315
8316 * NEWS: Mention GDBserver's new option "--selftest".
8317 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8318 * selftest.c: Move it to common/selftest.c.
8319 * selftest.h: Move it to common/selftest.h.
8320 * selftest-arch.c (reset): New function.
8321 (tests_with_arch): Call reset.
8322
8323 2017-08-18 Yao Qi <yao.qi@linaro.org>
8324
8325 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8326 instead of exception_fprintf and printf_filtered.
8327
8328 2017-08-18 Yao Qi <yao.qi@linaro.org>
8329
8330 * selftest.c (register_self_test): Rename it to
8331 selftests::register_test.
8332 (run_self_tests): selftest::run_tests.
8333 * selftest.h: Update declarations.
8334 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8335 selftests::register_test_foreach_arch.
8336 * selftest-arch.h: Update declaration.
8337 * aarch64-tdep.c: Update.
8338 * arm-tdep.c: Likewise.
8339 * disasm-selftests.c: Likewise.
8340 * dwarf2loc.c: Likewise.
8341 * dwarf2-frame.c: Likewise.
8342 * findvar.c: Likewise.
8343 * gdbarch-selftests.c: Likewise.
8344 * maint.c (maintenance_selftest): Likewise.
8345 * regcache.c: Likewise.
8346 * rust-exp.y: Likewise.
8347 * selftest-arch.c: Likewise.
8348 * unittests/environ-selftests.c: Likewise.
8349 * unittests/function-view-selftests.c: Likewise.
8350 * unittests/offset-type-selftests.c: Likewise.
8351 * unittests/optional-selftests.c: Likewise.
8352 * unittests/scoped_restore-selftests.c: Likewise.
8353 * utils-selftests.c: Likewise.
8354
8355 2017-08-17 Pedro Alves <palves@redhat.com>
8356
8357 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8358 local.
8359
8360 2017-08-17 Pedro Alves <palves@redhat.com>
8361
8362 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8363 field.
8364 (reset_die_in_process): Delete, replaced by ...
8365 (process_die_scope): ... this new class. Make it responsible for
8366 freeing cu->line_header too.
8367 (process_die): Use process_die_scope.
8368 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8369 cu->line_header_die_owner. Don't release the line header if it's
8370 owned by the CU.
8371 (setup_type_unit_groups): Make the CU/DIE own the line header.
8372 Don't release the line header here.
8373
8374 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8375
8376 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8377
8378 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8379
8380 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8381 Single-Key mode
8382
8383 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8384
8385 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8386 mode command list.
8387
8388 2017-08-15 Stafford Horne <shorne@gmail.com>
8389
8390 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8391
8392 2017-08-15 Stafford Horne <shorne@gmail.com>
8393
8394 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8395
8396 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8397
8398 PR gdb/21954
8399 * infcmd.c (unset_environment_command): Use the 'clear' method on
8400 the environment instead of resetting it.
8401
8402 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8403
8404 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8405 platforms.
8406
8407 2017-08-14 Tom Tromey <tom@tromey.com>
8408
8409 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8410 (print_binary_chars): Likewise.
8411 (BITS_IN_BYTES): Remove.
8412
8413 2017-08-14 Tom Tromey <tom@tromey.com>
8414
8415 PR gdb/21675
8416 * valprint.c (LOW_ZERO): Change value to 034.
8417 (print_octal_chars): Add static_asserts for octal constants.
8418 * printcmd.c (print_scalar_formatted): Add 'd' case.
8419
8420 2017-08-11 Tom Tromey <tom@tromey.com>
8421
8422 * symfile.c (add_symbol_file_command): Use std::vector.
8423
8424 2017-08-14 Tom Tromey <tom@tromey.com>
8425
8426 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8427 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8428 std::move.
8429 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8430
8431 2017-08-11 Pedro Alves <palves@redhat.com>
8432
8433 * infrun.c (process_event_stop_test): Adjust
8434 function_name_is_marked_for_skip call.
8435 * skip.c: Include <list>.
8436 (skiplist_entry): Make it a class with private fields, and
8437 getters/setters.
8438 (skiplist_entry_chain): Delete.
8439 (skiplist_entries): New.
8440 (skiplist_entry_count): Delete.
8441 (highest_skiplist_entry_num): New.
8442 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8443 (add_skiplist_entry): Delete.
8444 (skiplist_entry::skiplist_entry): New.
8445 (skiplist_entry::add_entry): New.
8446 (skip_file_command, skip_function): Adjust.
8447 (compile_skip_regexp): Delete.
8448 (skip_command): Don't compile regexp here. Adjust to use
8449 skiplist_entry::add_entry.
8450 (skip_info): Adjust to use range-for and getters.
8451 (skip_enable_command, skip_disable_command): Adjust to use
8452 range-for and setters.
8453 (skip_delete_command): Adjust to use std::list.
8454 (add_skiplist_entry): Delete.
8455 (skip_file_p): Delete, refactored as ...
8456 (skiplist_entry::do_skip_file_p): ... this new method.
8457 (skip_gfile_p): Delete, refactored as ...
8458 (skiplist_entry::do_gskip_file_p): ... this new method.
8459 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8460 (skiplist_entry::skip_function_p): ... this new method.
8461 (function_name_is_marked_for_skip): Now returns bool, and takes
8462 the function sal by const reference. Adjust to use range-for and
8463 skiplist_entry methods.
8464 (_initialize_step_skip): Remove references to
8465 skiplist_entry_chain, skiplist_entry_count.
8466 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8467 takes the function sal by const reference.
8468
8469 2017-08-11 Yao Qi <yao.qi@linaro.org>
8470
8471 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8472 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8473 (dwarf2_frame_cache):
8474 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8475 RETURN_MASK_ALL and set *this_case to NULL.
8476 * frame-unwind.h: Update comments.
8477
8478 2017-08-11 Yao Qi <yao.qi@linaro.org>
8479
8480 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8481 (dwarf2_frame_state_copy_regs): Remove.
8482 (dwarf2_frame_state_free_regs): Remove.
8483 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8484 (dwarf2_restore_rule): Call method .alloc_regs instead of
8485 dwarf2_frame_state_alloc_regs.
8486 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8487 constructor. Call std::move.
8488 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8489 (dwarf2_frame_cache): Likewise.
8490
8491 [GDB_SELF_TEST]: Include selftest.h and
8492 selftest-arch.h.
8493 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8494 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8495 execute_cfa_program_test.
8496
8497 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8498 copy ctor, assignment operator, move assignment.
8499 <alloc_regs>: New method.
8500 <swap>: New method.
8501 (struct dwarf2_frame_state): Delete dtor.
8502 (dwarf2_frame_state_alloc_regs): Remove declaration.
8503 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8504 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8505
8506 2017-08-11 Yao Qi <yao.qi@linaro.org>
8507
8508 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8509 (dwarf2_frame_state::dwarf2_frame_state): New.
8510 (dwarf2_frame_state::~dwarf2_frame_state): New.
8511 (dwarf2_fetch_cfa_info): Update.
8512 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8513 rather than a pointer. Update code.
8514 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8515 dtor.
8516 <data_align, code_align, retaddr_column>: Change them to const.
8517 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8518 to bool.
8519
8520 2017-08-11 Yao Qi <yao.qi@linaro.org>
8521
8522 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8523 <loc.exp>: New field.
8524 * dwarf2-frame.c (execute_cfa_program): Update.
8525 (dwarf2_frame_prev_register): Update.
8526
8527 2017-08-10 Pedro Alves <palves@redhat.com>
8528
8529 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8530
8531 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8532
8533 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8534 (fbsd_pending_children): Use std::list.
8535 (fbsd_remember_child): Likewise.
8536 (fbsd_is_child_pending): Likewise.
8537 (fbsd_pending_vfork_done): Use std::forward_list.
8538 (fbsd_add_vfork_done): Likewise.
8539 (fbsd_is_vfork_done_pending): Likewise.
8540 (fbsd_next_vfork_done): Likewise.
8541
8542 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8543
8544 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8545 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8546 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8547 for `mapfilename'.
8548 (fbsd_xfer_partial): Use gdb::byte_vector.
8549 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8550
8551 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8552
8553 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8554 "filestuff.h".
8555 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8556
8557 2017-08-09 Tom Tromey <tom@tromey.com>
8558
8559 * skip.c (skiplist_entry): New constructor.
8560 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8561 (skiplist_entry::file_is_glob): Now bool.
8562 (skiplist_entry::file, skiplist_entry::function): Now
8563 std::string.
8564 (make_skip_entry): Return a unique_ptr. Use new.
8565 (free_skiplist_entry, free_skiplist_entry_cleanup)
8566 (make_free_skiplist_entry_cleanup): Remove.
8567 (skip_command, skip_disable_command, add_skiplist_entry)
8568 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8569 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8570 (function_name_is_marked_for_skip): Update.
8571 (skip_delete_command): Update. Use delete.
8572
8573 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8574
8575 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8576 (aarch64_linux_core_read_description): New function.
8577 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8578
8579 2017-08-09 Pedro Alves <palves@redhat.com>
8580
8581 * cp-name-parser.y (cp_comp_to_string): Return a
8582 gdb::unique_xmalloc_ptr<char>.
8583 * cp-support.c (replace_typedefs_qualified_name)
8584 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8585 (cp_canonicalize_string_full): Use op= instead of explicit
8586 convertion.
8587 (cp_class_name_from_physname, method_name_from_physname)
8588 (cp_func_name, cp_remove_params): Adjust to use
8589 gdb::unique_xmalloc_ptr<char>.
8590 * cp-support.h (cp_comp_to_string): Return a
8591 gdb::unique_xmalloc_ptr<char>.
8592 * python/py-type.c (typy_lookup_type): Adjust to use
8593 gdb::unique_xmalloc_ptr<char>.
8594
8595 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8596
8597 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8598
8599 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8600 Yao Qi <yao.qi@linaro.org>
8601
8602 * cp-support.c (cp_canonicalize_string_full): Use
8603 gdb::unique_xmalloc_ptr<char>.
8604 (cp_canonicalize_string): Likewise.
8605
8606 2017-08-09 Yao Qi <yao.qi@linaro.org>
8607
8608 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8609 * regformats/i386/amd64-avx-avx512.dat: Remove.
8610 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8611 * regformats/i386/amd64-avx-mpx.dat:Remove.
8612 * regformats/i386/amd64-avx.dat: Remove.
8613 * regformats/i386/amd64-mpx.dat: Remove.
8614 * regformats/i386/i386-avx-avx512.dat: Remove.
8615 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8616 * regformats/i386/i386-avx-mpx.dat: Remove.
8617 * regformats/i386/i386-mmx.dat: Remove.
8618 * regformats/i386/i386-mpx.dat: Remove.
8619
8620 2017-08-09 Yao Qi <yao.qi@linaro.org>
8621
8622 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8623 * amd64-tdep.c: Don't include features/i386/x32*.c.
8624 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8625 functions.
8626 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8627 and i386/x32-avx-avx512.
8628 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8629 and i386/x32.xml.
8630 * features/i386/x32-avx-avx512.c: Removed.
8631 * features/i386/x32-avx-avx512.xml: Removed.
8632 * features/i386/x32-avx.c: Removed.
8633 * features/i386/x32-avx.xml: Removed.
8634 * features/i386/x32.c: Removed.
8635 * features/i386/x32.xml: Removed.
8636 * regformats/i386/x32-avx-avx512.dat: Removed.
8637 * regformats/i386/x32-avx.dat: Removed.
8638 * regformats/i386/x32.dat: Removed.
8639
8640 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8641
8642 PR breakpoints/21886
8643 * mem-break.c (default_memory_insert_breakpoint): Use
8644 `->placed_address' rather than `->reqstd_address' for the
8645 breakpoint location.
8646
8647 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8648
8649 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8650 assertions.
8651
8652 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8653
8654 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8655 a union of `tdep_info', `tdesc_data' and `id'.
8656 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8657 rather than `info.tdep_info'.
8658 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8659 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8660 * i386-tdep.c (i386_gdbarch_init): Likewise.
8661 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8662 * mips-tdep.c (mips_gdbarch_init): Likewise.
8663 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8664 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8665 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8666 `info.tdep_info'.
8667 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8668 `info.tdep_info'.
8669 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8670 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8671 `info.tdep_info'.
8672 * spu-tdep.c (spu_gdbarch_init): Likewise.
8673 * gdbarch.h: Regenerate.
8674
8675 2017-08-07 Leszek Swirski <leszeks@google.com>
8676
8677 PR symtab/20899
8678 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8679
8680 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8681
8682 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8683 (gdbsim_open): Rename gdb_argv args object to argv.
8684
8685 2017-08-05 Tom Tromey <tom@tromey.com>
8686
8687 * compile/compile-object-load.c (compile_object_load): Use
8688 gdb::unique_xmalloc_ptr.
8689 * cli/cli-dump.c (scan_filename): Rename from
8690 scan_filename_with_cleanup. Change return type.
8691 (scan_expression): Rename from scan_expression_with_cleanup.
8692 Change return type.
8693 (dump_memory_to_file, dump_value_to_file, restore_command):
8694 Use gdb::unique_xmalloc_ptr. Update.
8695 * cli/cli-cmds.c (find_and_open_script): Use
8696 gdb::unique_xmalloc_ptr.
8697 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8698 * symmisc.c (maintenance_print_symbols)
8699 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8700 * symfile.c (symfile_bfd_open, generic_load)
8701 (add_symbol_file_command, remove_symbol_file_command): Use
8702 gdb::unique_xmalloc_ptr.
8703 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8704 * psymtab.c (maintenance_print_psymbols): Use
8705 gdb::unique_xmalloc_ptr.
8706 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8707 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8708 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8709 (reload_shared_libraries_1): Likewise.
8710
8711 2017-08-05 Tom Tromey <tom@tromey.com>
8712
8713 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8714 (rust_op_vector, rust_set_vector): New typedefs.
8715 (current_parser): New global.
8716 (work_obstack): Change to pointer type. Update all users.
8717 (rust_ast, pstate): Remove globals.
8718 (struct rust_parser): New.
8719 (%union) <params, field_inits>: Change type.
8720 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8721 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8722 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8723 (convert_params_to_types, convert_params_to_expression): Change
8724 type of "params".
8725 (ast_string): Change type of "fields".
8726 (rust_parse): Make a rust_parser. Remove cleanups.
8727 (rust_lex_tests): Make and install an auto_obstack.
8728
8729 2017-08-04 Yao Qi <yao.qi@linaro.org>
8730
8731 * configure.srv (ipa_x32_linux_regobj): New.
8732 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8733 instead of X86_TDESC_AVX512.
8734 (initialize_low_tracepoint): Call
8735 init_registers_x32_avx_avx512_linux.
8736
8737 2017-08-04 Yao Qi <yao.qi@linaro.org>
8738
8739 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8740
8741 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8742
8743 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8744
8745 2017-08-03 Tom Tromey <tom@tromey.com>
8746
8747 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8748 Remove.
8749 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8750
8751 2017-08-03 Tom Tromey <tom@tromey.com>
8752
8753 * python/py-param.c (compute_enum_values): Use gdb_argv.
8754
8755 2017-08-03 Tom Tromey <tom@tromey.com>
8756
8757 * utils.h (struct gdb_argv_deleter): New.
8758 (gdb_argv): New class.
8759 * utils.c (gdb_argv::reset): New method.
8760 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8761 * tracefile.c (tsave_command): Use gdb_argv.
8762 * top.c (new_ui_command): Use gdb_argv.
8763 * symmisc.c (maintenance_print_symbols)
8764 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8765 * symfile.c (symbol_file_command, generic_load)
8766 (remove_symbol_file_command): Use gdb_argv.
8767 * stack.c (backtrace_command): Use gdb_argv.
8768 * source.c (add_path, show_substitute_path_command)
8769 (unset_substitute_path_command, set_substitute_path_command):
8770 Use gdb_argv.
8771 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8772 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8773 * remote.c (extended_remote_run, remote_put_command)
8774 (remote_get_command, remote_delete_command): Use gdb_argv.
8775 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8776 (gdbsim_open): Use gdb_argv.
8777 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8778 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8779 * procfs.c (procfs_info_proc): Use gdb_argv.
8780 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8781 * infrun.c (handle_command): Use gdb_argv.
8782 * inferior.c (add_inferior_command, clone_inferior_command):
8783 Use gdb_argv.
8784 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8785 * exec.c (exec_file_command): Use gdb_argv.
8786 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8787 * compile/compile.c (build_argc_argv): Use gdb_argv.
8788
8789 2017-08-03 Tom Tromey <tom@tromey.com>
8790
8791 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8792
8793 2017-08-03 Tom Tromey <tom@tromey.com>
8794
8795 * python/python.c (compute_python_string): Return std::string.
8796 (gdbpy_eval_from_control_command): Update.
8797 (do_start_initialization): Use std::string.
8798 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8799 xstrprintf.
8800 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8801 xstrprintf.
8802
8803 2017-08-03 Tom Tromey <tom@tromey.com>
8804
8805 * top.h (do_restore_instream_cleanup): Remove.
8806 * top.c (do_restore_instream_cleanup): Remove.
8807 (read_command_file): Use scoped_restore.
8808 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8809
8810 2017-08-03 Tom Tromey <tom@tromey.com>
8811
8812 * cli/cli-script.c (execute_user_command)
8813 (execute_control_command): Use scoped_restore.
8814
8815 2017-08-03 Tom Tromey <tom@tromey.com>
8816
8817 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8818 (execute_user_command): Remove user_call_depth; use
8819 user_args_stack's size instead.
8820
8821 2017-08-03 Tom Tromey <tom@tromey.com>
8822
8823 * top.h (in_user_command): Remove.
8824 * top.c (in_user_command): Remove.
8825 * cli/cli-script.c (do_restore_user_call_depth)
8826 (execute_user_command): Update.
8827
8828 2017-08-03 Tom Tromey <tom@tromey.com>
8829
8830 * valops.c (search_struct_method): Use gdb::byte_vector.
8831 * valarith.c (value_concat): Use std::vector.
8832 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8833 (simple_search_memory): Likewise.
8834 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8835 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8836 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8837 * elfread.c (elf_rel_plt_read): Use std::string.
8838 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8839 * cli/cli-dump.c (restore_section_callback): Use
8840 gdb::byte_vector.
8841
8842 2017-08-03 Tom Tromey <tom@tromey.com>
8843
8844 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8845
8846 2017-08-03 Tom Tromey <tom@tromey.com>
8847
8848 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8849 (tui_register_format): Use scoped_restore.
8850
8851 2017-08-03 Tom Tromey <tom@tromey.com>
8852
8853 * reverse.c (exec_direction_default): Remove.
8854 (exec_reverse_once): Use scoped_restore.
8855 * remote.c (restore_remote_timeout): Remove.
8856 (remote_flash_erase, remote_flash_write, remote_flash_done)
8857 (readchar, remote_serial_write): Use scoped_restore.
8858 * cli/cli-script.c (struct source_cleanup_lines_args)
8859 (source_cleanup_lines): Remove.
8860 (script_from_file): Use scoped_restore.
8861 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8862 (source_command): Use scoped_restore.
8863
8864 2017-08-03 Tom Tromey <tom@tromey.com>
8865
8866 * utils.h (make_cleanup_free_so): Remove.
8867 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8868 * solist.h (struct so_deleter): New.
8869 (so_list_up): New typedef.
8870 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8871
8872 2017-08-03 Tom Tromey <tom@tromey.com>
8873
8874 * utils.h (make_cleanup_restore_current_language): Remove.
8875 * utils.c (do_restore_current_language)
8876 (make_cleanup_restore_current_language): Remove.
8877 * parse.c (parse_exp_in_context_1)
8878 (parse_expression_with_language): Use
8879 scoped_restore_current_language.
8880 * mi/mi-main.c (mi_cmd_execute): Use
8881 scoped_restore_current_language.
8882 * language.h (scoped_restore_current_language): New class.
8883
8884 2017-08-03 Tom Tromey <tom@tromey.com>
8885
8886 * compile/compile.c (cleanup_unlink_file): Remove.
8887 (compile_to_object): Use gdb::unlinker.
8888 (eval_compile_command): Likewise.
8889
8890 2017-08-03 Tom Tromey <tom@tromey.com>
8891
8892 * utils.h (make_cleanup_fclose): Remove.
8893 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8894
8895 2017-08-03 Tom Tromey <tom@tromey.com>
8896
8897 * top.c (open_terminal_stream): Return gdb_file_up.
8898 (new_ui_command): Update.
8899
8900 2017-08-03 Tom Tromey <tom@tromey.com>
8901
8902 * source.c (print_source_lines_base, forward_search_command)
8903 (reverse_search_command): Use gdb_file_up.
8904
8905 2017-08-03 Tom Tromey <tom@tromey.com>
8906
8907 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8908
8909 2017-08-03 Tom Tromey <tom@tromey.com>
8910
8911 * cli/cli-cmds.c (find_and_open_script): Change return type.
8912 Remove "streamp" and "full_path" parameters.
8913 (source_script_with_search): Update.
8914 * auto-load.c (source_script_file): Update.
8915 * cli/cli-cmds.h (find_and_open_script): Change type.
8916 (open_script): New struct.
8917
8918 2017-08-03 Tom Tromey <tom@tromey.com>
8919
8920 * xml-support.c (xml_fetch_content_from_file): Update.
8921 * ui-file.c (stdio_file::open): Update.
8922 * tracefile-tfile.c (tfile_start): Update.
8923 * remote.c (remote_file_put, remote_file_get): Update.
8924 * nat/linux-procfs.c (linux_proc_get_int)
8925 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8926 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8927 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8928 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8929 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8930 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8931 * linux-nat.c (linux_proc_pending_signals): Update.
8932 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8933 (file_closer): Remove.
8934 * compile/compile.c (compile_to_object): Update.
8935 * common/filestuff.h (struct gdb_file_deleter): New.
8936 (gdb_file_up): New typedef.
8937 (gdb_fopen_cloexec): Change return type.
8938 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8939 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8940 (dump_binary_file, restore_binary_file): Update.
8941 * auto-load.c (auto_load_objfile_script_1): Update.
8942
8943 2017-08-03 Tom Tromey <tom@tromey.com>
8944
8945 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8946 (info_static_tracepoint_markers_command): Likewise.
8947 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8948 * skip.c (skip_info): Use ui_out_emit_table.
8949 * progspace.c (print_program_space): Use ui_out_emit_table.
8950 * osdata.c (info_osdata): Use ui_out_emit_table.
8951 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8952 ui_out_emit_table.
8953 * linux-thread-db.c (info_auto_load_libthread_db): Use
8954 ui_out_emit_table.
8955 * inferior.c (print_inferior): Use ui_out_emit_table.
8956 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8957 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8958 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8959 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8960 * ui-out.h (class ui_out_emit_table): New.
8961
8962 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8963
8964 * mips-tdep.c (mips_fpu_type_str): New function.
8965 (mips_dump_tdep): Call it.
8966
8967 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8968
8969 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8970 `->mips_fpu_type'.
8971
8972 2017-07-31 Xavier Roirand <roirand@adacore.com>
8973
8974 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8975
8976 2017-07-27 Xavier Roirand <roirand@adacore.com>
8977
8978 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8979
8980 2017-07-26 Yao Qi <yao.qi@linaro.org>
8981
8982 * cli/cli-cmds.c (maintenancechecklist): New variable.
8983 * gdbcmd.h (maintenancechecklist): Declare it.
8984 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8985 Call i386_linux_read_description with different masks.
8986 * maint.c (maintenance_check_command): New function.
8987 (_initialize_maint_cmds): Call add_prefix_cmd.
8988 * target-descriptions.c (tdesc_reg): override operator != and ==.
8989 (tdesc_type): Likewise.
8990 (tdesc_feature): Likewise.
8991 (target_desc): Likewise.
8992 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8993 (maintenance_check_xml_descriptions): New function.
8994 (_initialize_target_descriptions) Add command "xml-descriptions".
8995 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8996
8997 2017-07-26 Yao Qi <yao.qi@linaro.org>
8998
8999 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9000 Include features/i386/32bit-*.c.
9001 (i386_linux_read_description): Generate target description if it
9002 doesn't exist.
9003 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9004 functions.
9005 * features/i386/32bit-linux.c: Re-generated.
9006 * features/i386/32bit-sse.c: Likewise.
9007 * target-descriptions.c (print_c_feature::visit): Print code to
9008 set register number if needed.
9009 (print_c_feature) <m_next_regnum>: New field.
9010
9011 2017-07-26 Yao Qi <yao.qi@linaro.org>
9012
9013 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9014 (FEATURE_XMLFILES): New.
9015 (FEATURE_CFILES): New.
9016 New rules.
9017 (clean-cfiles): Remove generated c files.
9018 * features/i386/32bit-avx.c: Generated.
9019 * features/i386/32bit-avx512.c: Generated.
9020 * features/i386/32bit-core.c: Generated.
9021 * features/i386/32bit-linux.c: Generated.
9022 * features/i386/32bit-mpx.c: Generated.
9023 * features/i386/32bit-pkeys.c: Generated.
9024 * features/i386/32bit-sse.c: Generated.
9025 * target-descriptions.c: Include algorithm.
9026 (tdesc_element_visitor): Add method visit_end.
9027 (print_c_tdesc): Implement visit_end.
9028 (print_c_tdesc:: m_filename_after_features): Move it to
9029 protected.
9030 (print_c_feature): New class.
9031 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9032 name starts with "i386/32bit-".
9033
9034 2017-07-26 Yao Qi <yao.qi@linaro.org>
9035
9036 * target-descriptions.c (tdesc_element_visitor): New class.
9037 (tdesc_element): New class.
9038 (tdesc_reg): Inherit from tdesc_element.
9039 (tdesc_reg::accept): New function.
9040 (tdesc_type): Inherit from tdesc_element.
9041 (tdesc_type::accept): New function.
9042 (tdesc_feature): Inherit from tdesc_element.
9043 (tdesc_feature::accept): New function.
9044 (target_desc): Inherit from tdesc_element.
9045 (target_desc::target_desc): New.
9046 (target_desc::~target_desc): New.
9047 (target_desc::accept): New.
9048 (allocate_target_description): Use new.
9049 (free_target_description): Use delete.
9050 (print_c_tdesc): New class.
9051 (maint_print_c_tdesc_cmd): Adjust.
9052
9053 * features/aarch64.c: Re-generated.
9054 * features/arc-arcompact.c: Re-generated.
9055 * features/arc-v2.c: Re-generated.
9056 * features/arm/arm-with-iwmmxt.c: Re-generated.
9057 * features/arm/arm-with-m.c: Re-generated.
9058 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9059 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9060 * features/arm/arm-with-neon.c: Re-generated.
9061 * features/arm/arm-with-vfpv2.c: Re-generated.
9062 * features/arm/arm-with-vfpv3.c: Re-generated.
9063 * features/i386/amd64-avx-avx512.c: Re-generated.
9064 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9065 * features/i386/amd64-avx.c: Re-generated.
9066 * features/i386/amd64-avx-linux.c: Re-generated.
9067 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9068 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9069 * features/i386/amd64-avx-mpx.c: Re-generated.
9070 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9071 * features/i386/amd64.c: Re-generated.
9072 * features/i386/amd64-linux.c: Re-generated.
9073 * features/i386/amd64-mpx.c: Re-generated.
9074 * features/i386/amd64-mpx-linux.c: Re-generated.
9075 * features/i386/i386-avx-avx512.c: Re-generated.
9076 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9077 * features/i386/i386-avx.c: Re-generated.
9078 * features/i386/i386-avx-linux.c: Re-generated.
9079 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9080 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9081 * features/i386/i386-avx-mpx.c: Re-generated.
9082 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9083 * features/i386/i386.c: Re-generated.
9084 * features/i386/i386-linux.c: Re-generated.
9085 * features/i386/i386-mmx.c: Re-generated.
9086 * features/i386/i386-mmx-linux.c: Re-generated.
9087 * features/i386/i386-mpx.c: Re-generated.
9088 * features/i386/i386-mpx-linux.c: Re-generated.
9089 * features/i386/x32-avx-avx512.c: Re-generated.
9090 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9091 * features/i386/x32-avx.c: Re-generated.
9092 * features/i386/x32-avx-linux.c: Re-generated.
9093 * features/i386/x32.c: Re-generated.
9094 * features/i386/x32-linux.c: Re-generated.
9095 * features/microblaze.c: Re-generated.
9096 * features/microblaze-with-stack-protect.c: Re-generated.
9097 * features/mips64-dsp-linux.c: Re-generated.
9098 * features/mips64-linux.c: Re-generated.
9099 * features/mips-dsp-linux.c: Re-generated.
9100 * features/mips-linux.c: Re-generated.
9101 * features/nds32.c: Re-generated.
9102 * features/nios2.c: Re-generated.
9103 * features/nios2-linux.c: Re-generated.
9104 * features/rs6000/powerpc-32.c: Re-generated.
9105 * features/rs6000/powerpc-32l.c: Re-generated.
9106 * features/rs6000/powerpc-403.c: Re-generated.
9107 * features/rs6000/powerpc-403gc.c : Re-generated.
9108 * features/rs6000/powerpc-405.c: Re-generated.
9109 * features/rs6000/powerpc-505.c: Re-generated.
9110 * features/rs6000/powerpc-601.c: Re-generated.
9111 * features/rs6000/powerpc-602.c: Re-generated.
9112 * features/rs6000/powerpc-603.c: Re-generated.
9113 * features/rs6000/powerpc-604.c: Re-generated.
9114 * features/rs6000/powerpc-64.c: Re-generated.
9115 * features/rs6000/powerpc-64l.c: Re-generated.
9116 * features/rs6000/powerpc-7400.c: Re-generated.
9117 * features/rs6000/powerpc-750.c: Re-generated.
9118 * features/rs6000/powerpc-860.c: Re-generated.
9119 * features/rs6000/powerpc-altivec32.c: Re-generated.
9120 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9121 * features/rs6000/powerpc-altivec64.c: Re-generated.
9122 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9123 * features/rs6000/powerpc-cell32l.c: Re-generated.
9124 * features/rs6000/powerpc-cell64l.c: Re-generated.
9125 * features/rs6000/powerpc-e500.c: Re-generated.
9126 * features/rs6000/powerpc-e500l.c: Re-generated.
9127 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9128 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9129 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9130 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9131 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9132 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9133 * features/rs6000/powerpc-vsx32.c: Re-generated.
9134 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9135 * features/rs6000/powerpc-vsx64.c: Re-generated.
9136 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9137 * features/rs6000/rs6000.c: Re-generated.
9138 * features/s390-linux32.c: Re-generated.
9139 * features/s390-linux32v1.c: Re-generated.
9140 * features/s390-linux32v2.c: Re-generated.
9141 * features/s390-linux64.c: Re-generated.
9142 * features/s390-linux64v1.c: Re-generated.
9143 * features/s390-linux64v2.c: Re-generated.
9144 * features/s390-te-linux64.c: Re-generated.
9145 * features/s390-tevx-linux64.c: Re-generated.
9146 * features/s390-vx-linux64.c: Re-generated.
9147 * features/s390x-linux64.c: Re-generated.
9148 * features/s390x-linux64v1.c: Re-generated.
9149 * features/s390x-linux64v2.c: Re-generated.
9150 * features/s390x-te-linux64.c: Re-generated.
9151 * features/s390x-tevx-linux64.c: Re-generated.
9152 * features/s390x-vx-linux64.c: Re-generated.
9153 * features/sparc/sparc32-solaris.c: Re-generated.
9154 * features/sparc/sparc64-solaris.c: Re-generated.
9155 * features/tic6x-c62x.c: Re-generated.
9156 * features/tic6x-c62x-linux.c: Re-generated.
9157 * features/tic6x-c64x.c: Re-generated.
9158 * features/tic6x-c64x-linux.c: Re-generated.
9159 * features/tic6x-c64xp.c: Re-generated.
9160 * features/tic6x-c64xp-linux.c: Re-generated.
9161
9162 2017-07-26 Yao Qi <yao.qi@linaro.org>
9163
9164 * i386-linux-tdep.c (i386_linux_read_description): New function.
9165 (i386_linux_core_read_description): Call
9166 i386_linux_read_description.
9167 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9168 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9169 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9170 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9171 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9172 * x86-linux-nat.c (x86_linux_read_description): Call
9173 i386_linux_read_description.
9174
9175 2017-07-26 Yao Qi <yao.qi@linaro.org>
9176
9177 * NEWS: Mention it.
9178 * features/Makefile (%.c: %.xml): Pass the xml file name to
9179 command "maint print c-tdesc".
9180 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9181 name from 'arg'.
9182
9183 2017-07-26 Yao Qi <yao.qi@linaro.org>
9184
9185 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9186 in-class initialization.
9187 (tdesc_create_feature): Call new instead of XCNEW.
9188 (free_target_description): Ue delete.
9189
9190 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9191
9192 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9193
9194 2017-07-25 Yao Qi <yao.qi@linaro.org>
9195
9196 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9197 constant.
9198 (amd64_x32_init_abi): Likewise.
9199 * amd64-tdep.h (amd64_init_abi): Update declaration.
9200 (amd64_x32_init_abi): Likewise.
9201
9202 2017-07-25 Yao Qi <yao.qi@linaro.org>
9203
9204 PR tdep/21717
9205 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9206 condition for FPSCR.
9207 (arm_linux_store_inferior_registers): Likewise.
9208
9209 2017-07-22 Tom Tromey <tom@tromey.com>
9210
9211 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9212 <syscalls_counts>: Now a std::vector.
9213 (get_catch_syscall_inferior_data): Use "new".
9214 (catch_syscall_inferior_data_cleanup): Use "delete".
9215 (insert_catch_syscall, remove_catch_syscall)
9216 (clear_syscall_counts): Update.
9217
9218 2017-07-22 Tom Tromey <tom@tromey.com>
9219
9220 * break-catch-syscall.c (syscall_catchpoint)
9221 <syscalls_to_be_caught>: Now a std::vector<int>
9222 (~syscall_catchpoint): Remove.
9223 (insert_catch_syscall, remove_catch_syscall)
9224 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9225 (print_mention_catch_syscall, print_recreate_catch_syscall):
9226 Update.
9227 (create_syscall_event_catchpoint): Change type of "filter"
9228 parameter.
9229 (catch_syscall_split_args): Return a std::vector.
9230 (catch_syscall_command_1, catching_syscall_number_1): Update.
9231
9232 2017-07-22 Tom Tromey <tom@tromey.com>
9233
9234 * break-catch-throw.c (struct exception_catchpoint)
9235 <exception_rx>: Now a std::string.
9236 (~exception_catchpoint): Remove.
9237 (print_one_detail_exception_catchpoint): Update.
9238 (handle_gnu_v3_exceptions): Change type of except_rx.
9239 (extract_exception_regexp): Return a std::string.
9240 (catch_exception_command_1): Update.
9241
9242 2017-07-22 Tom Tromey <tom@tromey.com>
9243
9244 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9245 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9246 std::vector.
9247 <catch_all>: Now a bool.
9248 (~signal_catchpoint): Remove.
9249 (signal_catchpoint_insert_location)
9250 (signal_catchpoint_remove_location)
9251 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9252 (signal_catchpoint_print_mention)
9253 (signal_catchpoint_print_recreate)
9254 (signal_catchpoint_explains_signal): Update.
9255 (create_signal_catchpoint): Change type of "filter" and
9256 "catch_all".
9257 (catch_signal_split_args): Return a std::vector. Change type of
9258 "catch_all".
9259 (catch_signal_command): Update.
9260
9261 2017-07-20 Pedro Alves <palves@redhat.com>
9262
9263 * ada-lang.c (ada_language_defn): Make extern.
9264 (_initialize_ada_language): Remove add_language call.
9265 * c-lang.c (c_language_defn, cplus_language_defn)
9266 (asm_language_defn, minimal_language_defn): Make extern.
9267 (_initialize_c_language): Delete.
9268 * completer.c (compare_cstrings): Delete, moved to utils.h.
9269 * d-lang.c (d_language_defn): Make extern.
9270 (_initialize_d_language): Remove add_language calls.
9271 * defs.h (enum language): Add comment.
9272 * f-lang.c (f_language_defn): Make extern.
9273 (_initialize_f_language): Remove add_language call.
9274 * go-lang.c (go_language_defn): Make extern.
9275 (_initialize_go_language): Remove add_language call.
9276 * language.c: Include <algorithm>.
9277 (languages): Redefine as const array.
9278 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9279 (set_language_command): Handle "local". Use for-range loop.
9280 (set_language): Remove loop.
9281 (language_enum): Rewrite.
9282 (language_def, language_str): Remove loops.
9283 (add_language): Delete.
9284 (add_set_language_command): New, based on add_languages.
9285 (skip_language_trampoline): Adjust.
9286 (local_language_defn): Delete.
9287 (language_gdbarch_post_init): Adjust.
9288 (_initialize_language): Remove add_language calls. Call
9289 add_set_language_command.
9290 * language.h (add_language): Delete.
9291 (auto_language_defn)
9292 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9293 (asm_language_defn, c_language_defn, cplus_language_defn)
9294 (d_language_defn, f_language_defn, go_language_defn)
9295 (m2_language_defn, objc_language_defn, opencl_language_defn)
9296 (pascal_language_defn, rust_language_defn): Declare.
9297 * m2-lang.c (m2_language_defn): Make extern.
9298 (_initialize_m2_language): Remove add_language call.
9299 * objc-lang.c (objc_language_defn): Make extern.
9300 (_initialize_objc_language): Remove add_language call.
9301 * opencl-lang.c (opencl_language_defn): Make extern.
9302 (_initialize_opencl_language): Remove add_language call.
9303 * p-lang.c (pascal_language_defn): Make extern.
9304 (_initialize_pascal_language): Delete.
9305 * rust-lang.c (rust_language_defn): Make extern.
9306 (_initialize_rust_language): Delete.
9307 * utils.h (compare_cstrings): New static inline function.
9308
9309 2017-07-20 Pedro Alves <palves@redhat.com>
9310
9311 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9312 (get_var_value): Constify parameters.
9313 (get_int_var_value): Change prototype.
9314 (to_fixed_range_type): Adjust.
9315 * ada-lang.h (get_int_var_value): Change prototype.
9316
9317 2017-07-20 Pedro Alves <palves@redhat.com>
9318
9319 * dwarf2read.c (dw2_lookup_symbol): Use
9320 SYMBOL_MATCHES_SEARCH_NAME.
9321 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9322
9323 2017-07-20 Pedro Alves <palves@redhat.com>
9324
9325 * block.c (block_iter_name_step, block_iter_name_first)
9326 (block_iter_name_next): Delete.
9327 (block_lookup_symbol_primary): Adjust to use
9328 dict_iter_match_first/dict_iter_match_next.
9329 * block.h (block_iter_name_first, block_iter_name_next): Delete
9330 declarations.
9331 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9332 dict_iter_match_first/dict_iter_match_next.
9333
9334 2017-07-20 Pedro Alves <palves@redhat.com>
9335
9336 * cp-support.c (cp_find_first_component_aux): Add missing case for
9337 end of string.
9338
9339 2017-07-18 David Blaikie <dblaikie@gmail.com>
9340
9341 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9342 of dwo_cu's dwo_file.
9343
9344 2017-07-18 Yao Qi <yao.qi@linaro.org>
9345
9346 * remote.c (store_registers_using_G): Remove one line comment.
9347
9348 2017-07-18 Yao Qi <yao.qi@linaro.org>
9349
9350 * regcache.c (regcache_cpy): Simplify it.
9351 (regcache::cpy_no_passthrough): Remove it.
9352 * regcache.h (cpy_no_passthrough): Remove it.
9353 (regcache_dup, regcache_cpy): Update comments.
9354
9355 2017-07-18 Pedro Alves <palves@redhat.com>
9356
9357 * remote-sim.c (sim_command_completer): Adjust to work with a
9358 completion_tracker instead of a VEC.
9359
9360 2017-07-17 Pedro Alves <palves@redhat.com>
9361
9362 * completer.c (complete_source_filenames): New function.
9363 (complete_address_and_linespec_locations): New function.
9364 (location_completer): Use complete_address_and_linespec_locations.
9365 (completion_tracker::build_completion_result): Honor the tracker's
9366 request to suppress append.
9367 * completer.h (completion_tracker::suppress_append_ws)
9368 (completion_tracker::set_suppress_append_ws): New methods.
9369 (completion_tracker::m_suppress_append_ws): New field.
9370 (complete_source_filenames): New declaration.
9371 * linespec.c (linespec_complete_what): New.
9372 (struct ls_parser) <complete_what, completion_word,
9373 completion_quote_char, completion_quote_end, completion_tracker>:
9374 New fields.
9375 (string_find_incomplete_keyword_at_end): New.
9376 (linespec_lexer_lex_string): Record quote char. If in completion
9377 mode, don't throw.
9378 (linespec_lexer_consume_token): Advance the completion word point.
9379 (linespec_lexer_peek_token): Save/restore completion info.
9380 (save_stream_and_consume_token): New.
9381 (set_completion_after_number): New.
9382 (linespec_parse_basic): Set what to complete next depending on
9383 token. Handle function and label completions specially.
9384 (parse_linespec): Disable objc shortcut in completion mode. Set
9385 what to complete next depending on token type. Skip keyword if in
9386 completion mode.
9387 (complete_linespec_component, linespec_complete): New.
9388 * linespec.h (linespec_complete): Declare.
9389
9390 2017-07-17 Pedro Alves <palves@redhat.com>
9391
9392 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9393 Handle 'operator<' / 'operator<<'.
9394
9395 2017-07-17 Pedro Alves <palves@redhat.com>
9396
9397 * completer.c (collect_explicit_location_matches): Handle
9398 MATCH_LABEL.
9399 (convert_explicit_location_to_linespec): New, factored out from
9400 ...
9401 (convert_explicit_location_to_sals): ... this.
9402 (complete_label): New.
9403 (linespec_complete_label, find_label_symbols_in_block): New.
9404 (find_label_symbols): Add completion_mode parameter and adjust to
9405 call find_label_symbols_in_block.
9406 * linespec.h (linespec_complete_label): Declare.
9407
9408 2017-07-17 Pedro Alves <palves@redhat.com>
9409
9410 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9411 complete_symbol_mode parameter.
9412 * cli/cli-cmds.c (complete_command): Get the completion result out
9413 of the handle_brkchars tracker if used a custom word point.
9414 * completer.c: Include "linespec.h".
9415 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9416 (advance_to_expression_complete_word_point): New.
9417 (completion_tracker::completes_to_completion_word): New.
9418 (complete_files_symbols): Pass down
9419 complete_symbol_mode::EXPRESSION.
9420 (explicit_options, probe_options): New.
9421 (collect_explicit_location_matches): Complete on the
9422 explictit_loc->foo instead of word. Use
9423 linespec_complete_function. Handle MATCH_LINE. Handle offering
9424 keyword and options completions.
9425 (backup_text_ptr): Delete.
9426 (skip_keyword): New.
9427 (complete_explicit_location): Remove 'word' parameter. Add
9428 language, quoted_arg_start and quoted_arg_end parameters.
9429 Rewrite, parsing left to right.
9430 (location_completer): Rewrite.
9431 (location_completer_handle_brkchars): New function.
9432 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9433 (enum complete_line_internal_reason): Adjust comments.
9434 (completion_tracker::discard_completions): New.
9435 (completer_handle_brkchars_func_for_completer): Handle
9436 location_completer.
9437 (gdb_custom_word_point_brkchars)
9438 (gdb_org_rl_basic_quote_characters): New.
9439 (gdb_completion_word_break_characters_throw)
9440 (completion_find_completion_word): Handle trackers that use a
9441 custom word point.
9442 (completion_tracker::advance_custom_word_point_by): New.
9443 (completion_tracker::build_completion_result): Don't rely on
9444 readline appending the quote char.
9445 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9446 use a custom word point.
9447 (gdb_rl_attempted_completion_function): Restore
9448 rl_basic_quote_characters.
9449 * completer.h (class completion_tracker): Extend intro comment.
9450 (completion_tracker::set_quote_char)
9451 (completion_tracker::quote_char)
9452 (completion_tracker::set_use_custom_word_point)
9453 (completion_tracker::use_custom_word_point)
9454 (completion_tracker::custom_word_point)
9455 (completion_tracker::set_custom_word_point)
9456 (completion_tracker::advance_custom_word_point_by)
9457 (completion_tracker::completes_to_completion_word)
9458 (completion_tracker::discard_completions): New methods.
9459 (completion_tracker::m_quote_char)
9460 (completion_tracker::m_use_custom_word_point)
9461 (completion_tracker::m_custom_word_point): New fields.
9462 (advance_to_expression_complete_word_point): Declare.
9463 * f-lang.c (f_collect_symbol_completion_matches): Add
9464 complete_symbol_mode parameter.
9465 * language.h (struct language_defn)
9466 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9467 parameter.
9468 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9469 (linespec_complete_function): New function.
9470 (linespec_lexer_lex_keyword): Adjust.
9471 * linespec.h (linespec_keywords, linespec_complete_function): New
9472 declarations.
9473 * location.c (find_end_quote): New function.
9474 (explicit_location_lex_one): Add explicit_completion_info
9475 parameter. Save quoting info. Don't throw if being called for
9476 completion. Don't handle Ada operators here.
9477 (is_cp_operator, skip_op_false_positives, first_of)
9478 (explicit_location_lex_one_function): New function.
9479 (string_to_explicit_location): Replace 'dont_throw' parameter with
9480 an explicit_completion_info pointer parameter. Handle it. Don't
9481 use explicit_location_lex_one to lex function names. Use
9482 explicit_location_lex_one_function instead.
9483 * location.h (struct explicit_completion_info): New.
9484 (string_to_explicit_location): Replace 'dont_throw' parameter with
9485 an explicit_completion_info pointer parameter.
9486 * symtab.c (default_collect_symbol_completion_matches_break_on):
9487 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9488 (default_collect_symbol_completion_matches)
9489 (collect_symbol_completion_matches): Add complete_symbol_mode
9490 parameter.
9491 (collect_symbol_completion_matches_type): Pass down
9492 complete_symbol_mode::EXPRESSION.
9493 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9494 parameter. Handle LINESPEC mode.
9495 * symtab.h (complete_symbol_mode): New.
9496 (default_collect_symbol_completion_matches_break_on)
9497 (default_collect_symbol_completion_matches)
9498 (collect_symbol_completion_matches)
9499 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9500 parameter.
9501
9502 2017-07-17 Pedro Alves <palves@redhat.com>
9503
9504 * utils.c (enum class strncmp_iw_mode): New.
9505 (strcmp_iw): Rename to ...
9506 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9507 parameters. Handle them.
9508 (strncmp_iw): New.
9509 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9510 * utils.h (strncmp_iw): Declare.
9511 (strcmp_iw): Move describing comments here.
9512
9513 2017-07-17 Pedro Alves <palves@redhat.com>
9514
9515 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9516 CP_OPERATOR_STR.
9517 * c-typeprint.c (is_type_conversion_operator): Use
9518 CP_OPERATOR_STR.
9519 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9520 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9521 CP_OPERATOR_LEN.
9522 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9523 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9524 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9525 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9526 CP_OPERATOR_STR.
9527 * location.c: Include "cp-support.h".
9528 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9529 CP_OPERATOR_STR.
9530 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9531 CP_OPERATOR_LEN.
9532
9533 2017-07-17 Pedro Alves <palves@redhat.com>
9534
9535 * cli/cli-cmds.c (complete_command): Use a completion tracker
9536 along with completion_find_completion_word for handle_brkchars
9537 phase.
9538 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9539 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9540 (struct gdb_rl_completion_word_info): New.
9541 (gdb_rl_find_completion_word): New.
9542 (completion_find_completion_word): New.
9543 * completer.h (completion_find_completion_word): Declare.
9544
9545 2017-07-17 Pedro Alves <palves@redhat.com>
9546
9547 * ada-lang.c (symbol_completion_match): Adjust comments.
9548 (symbol_completion_add): Replace vector parameter with
9549 completion_tracker parameter. Use it.
9550 (ada_make_symbol_completion_list): Rename to...
9551 (ada_collect_symbol_completion_matches): ... this. Add
9552 completion_tracker parameter and use it.
9553 (ada_language_defn): Adjust.
9554 * break-catch-syscall.c (catch_syscall_completer): Adjust
9555 prototype and work with completion_tracker instead of VEC.
9556 * breakpoint.c (condition_completer): Adjust prototype and work
9557 with completion_tracker instead of VEC.
9558 * c-lang.c (c_language_defn, cplus_language_defn)
9559 (asm_language_defn, minimal_language_defn): Adjust to renames.
9560 * cli/cli-cmds.c (complete_command): Rework using
9561 completion_tracker. Catch exceptions when completing.
9562 * cli/cli-decode.c (integer_unlimited_completer)
9563 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9564 with completion_tracker instead of VEC.
9565 * command.h (struct completion_tracker): Forward declare.
9566 (completer_ftype, completer_handle_brkchars_ftype): Change
9567 types.
9568 (complete_on_cmdlist, complete_on_enum): Adjust.
9569 * completer.c: Include <algorithm>.
9570 (struct gdb_completer_state): New.
9571 (current_completion): New global.
9572 (readline_line_completion_function): Delete.
9573 (noop_completer, filename_completer)
9574 (filename_completer_handle_brkchars, complete_files_symbols)
9575 (linespec_location_completer): Adjust to work with a
9576 completion_tracker instead of a VEC.
9577 (string_or_empty): New.
9578 (collect_explicit_location_matches): Adjust to work with a
9579 completion_tracker instead of a VEC.
9580 (explicit_location_completer): Rename to ...
9581 (complete_explicit_location): ... this and adjust to work with a
9582 completion_tracker instead of a VEC.
9583 (location_completer): Adjust to work with a completion_tracker
9584 instead of a VEC.
9585 (add_struct_fields): Adjust to work with a completion_list instead
9586 of VEC.
9587 (expression_completer): Rename to ...
9588 (complete_expression): ... this and adjust to work with a
9589 completion_tracker instead of a VEC. Use complete_files_symbols.
9590 (expression_completer): Reimplement on top of complete_expression.
9591 (symbol_completer): Adjust to work with a completion_tracker
9592 instead of a VEC.
9593 (enum complete_line_internal_reason): Add describing comments.
9594 (complete_line_internal_normal_command): Adjust to work with a
9595 completion_tracker instead of a VEC.
9596 (complete_line_internal): Rename to ...
9597 (complete_line_internal_1): ... this and adjust to work with a
9598 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9599 handle_brkchars phase.
9600 (new_completion_tracker): Delete.
9601 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9602 complete_line_internal_1.
9603 (free_completion_tracker): Delete.
9604 (INITIAL_COMPLETION_HTAB_SIZE): New.
9605 (completion_tracker::completion_tracker)
9606 (completion_tracker::~completion_tracker): New.
9607 (maybe_add_completion): Delete.
9608 (completion_tracker::maybe_add_completion)
9609 (completion_tracker::add_completion)
9610 (completion_tracker::add_completions): New.
9611 (throw_max_completions_reached_error): Delete.
9612 (complete_line): Adjust to work with a completion_tracker instead
9613 of a VEC. Don't create a completion_tracker_t or check for max
9614 completions here.
9615 (command_completer, command_completer_handle_brkchars)
9616 (signal_completer, reg_or_group_completer_1)
9617 (reg_or_group_completer, default_completer_handle_brkchars):
9618 Adjust to work with a completion_tracker.
9619 (gdb_completion_word_break_characters_throw): New.
9620 (gdb_completion_word_break_characters): Reimplement.
9621 (line_completion_function): Delete.
9622 (completion_tracker::recompute_lowest_common_denominator)
9623 (expand_preserving_ws)
9624 (completion_tracker::build_completion_result)
9625 (completion_result::completion_result)
9626 (completion_result::completion_result)
9627 (completion_result::~completion_result)
9628 (completion_result::completion_result)
9629 (completion_result::release_match_list, compare_cstrings)
9630 (completion_result::sort_match_list)
9631 (completion_result::reset_match_list)
9632 (gdb_rl_attempted_completion_function_throw)
9633 (gdb_rl_attempted_completion_function): New.
9634 * completer.h (completion_list, struct completion_result)
9635 (class completion_tracker): New.
9636 (complete_line): Add completion_tracker parameter.
9637 (readline_line_completion_function): Delete.
9638 (gdb_rl_attempted_completion_function): New.
9639 (noop_completer, filename_completer, expression_completer)
9640 (location_completer, symbol_completer, command_completer)
9641 (signal_completer, reg_or_group_completer): Update prototypes.
9642 (completion_tracker_t, new_completion_tracker)
9643 (make_cleanup_free_completion_tracker): Delete.
9644 (enum maybe_add_completion_enum): Delete.
9645 (maybe_add_completion): Delete.
9646 (throw_max_completions_reached_error): Delete.
9647 * corefile.c (complete_set_gnutarget): Adjust to work with a
9648 completion_tracker instead of a VEC.
9649 * cp-abi.c (cp_abi_completer): Adjust to work with a
9650 completion_tracker instead of a VEC.
9651 * d-lang.c (d_language_defn): Adjust.
9652 * disasm.c (disassembler_options_completer): Adjust to work with a
9653 completion_tracker instead of a VEC.
9654 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9655 (f_collect_symbol_completion_matches): ... this. Adjust to work
9656 with a completion_tracker instead of a VEC.
9657 (f_language_defn): Adjust.
9658 * go-lang.c (go_language_defn): Adjust.
9659 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9660 Adjust to work with a completion_tracker instead of a VEC.
9661 * infrun.c (handle_completer): Likewise.
9662 * interps.c (interpreter_completer): Likewise.
9663 * interps.h (interpreter_completer): Likewise.
9664 * language.c (unknown_language_defn, auto_language_defn)
9665 (local_language_defn): Adjust.
9666 * language.h (language_defn::la_make_symbol_completion_list):
9667 Rename to ...
9668 (language_defn::la_collect_symbol_completion_matches): ... this
9669 and adjust to work with a completion_tracker instead of a VEC.
9670 * m2-lang.c (m2_language_defn): Adjust.
9671 * objc-lang.c (objc_language_defn): Adjust.
9672 * opencl-lang.c (opencl_language_defn): Adjust.
9673 * p-lang.c (pascal_language_defn): Adjust.
9674 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9675 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9676 with a completion_tracker.
9677 * rust-lang.c (rust_language_defn): Adjust.
9678 * symtab.c (free_completion_list, do_free_completion_list)
9679 (return_val, completion_tracker): Delete.
9680 (completion_list_add_name, completion_list_add_symbol)
9681 (completion_list_add_msymbol, completion_list_objc_symbol)
9682 (completion_list_add_fields, add_symtab_completions): Add
9683 completion_tracker parameter and use it.
9684 (default_make_symbol_completion_list_break_on_1): Rename to...
9685 (default_collect_symbol_completion_matches_break_on): ... this.
9686 Add completion_tracker parameter and use it instead of allocating
9687 a completion tracker here.
9688 (default_make_symbol_completion_list_break_on): Delete old
9689 implementation.
9690 (default_make_symbol_completion_list): Delete.
9691 (default_collect_symbol_completion_matches): New.
9692 (make_symbol_completion_list): Delete.
9693 (collect_symbol_completion_matches): New.
9694 (make_symbol_completion_type): Rename to ...
9695 (collect_symbol_completion_matches_type): ... this. Add
9696 completion_tracker parameter and use it instead of VEC.
9697 (make_file_symbol_completion_list_1): Rename to...
9698 (collect_file_symbol_completion_matches): ... this. Add
9699 completion_tracker parameter and use it instead of VEC.
9700 (make_file_symbol_completion_list): Delete.
9701 (add_filename_to_list): Use completion_list instead of a VEC.
9702 (add_partial_filename_data::list): Now a completion_list.
9703 (make_source_files_completion_list): Work with a completion_list
9704 instead of a VEC.
9705 * symtab.h: Include "completer.h".
9706 (default_make_symbol_completion_list_break_on)
9707 (default_make_symbol_completion_list, make_symbol_completion_list)
9708 (make_symbol_completion_type, make_file_symbol_completion_list)
9709 (make_source_files_completion_list): Delete.
9710 (default_collect_symbol_completion_matches_break_on)
9711 (default_collect_symbol_completion_matches)
9712 (collect_symbol_completion_matches)
9713 (collect_symbol_completion_matches_type)
9714 (collect_file_symbol_completion_matches)
9715 (make_source_files_completion_list): New.
9716 * top.c (init_main): Don't install a rl_completion_entry_function
9717 hook. Install a rl_attempted_completion_function hook instead.
9718 * tui/tui-layout.c (layout_completer): Adjust to work with a
9719 completion_tracker.
9720 * tui/tui-regs.c (tui_reggroup_completer):
9721 * tui/tui-win.c (window_name_completer, focus_completer)
9722 (winheight_completer): Adjust to work with a completion_tracker.
9723 * value.c: Include "completer.h".
9724 (complete_internalvar): Adjust to work with a completion_tracker.
9725 * value.h (complete_internalvar): Likewise.
9726
9727 2017-07-17 Pedro Alves <palves@redhat.com>
9728
9729 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9730 renames.
9731 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9732 comments to completer_ftype's declaration.
9733 <completer_handle_brkchars>: Change type to
9734 completer_handle_brkchars_ftype.
9735 * command.h (completer_ftype): Add describing comment and give
9736 names to parameters.
9737 (completer_ftype_void): Rename to ...
9738 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9739 (set_cmd_completer_handle_brkchars): Adjust.
9740 * completer.c (filename_completer_handle_brkchars): New function.
9741 (complete_line_internal_normal_command): New function, factored
9742 out from ...
9743 (complete_line_internal): ... here.
9744 (command_completer_handle_brkchars)
9745 (default_completer_handle_brkchars)
9746 (completer_handle_brkchars_func_for_completer): New functions.
9747 * completer.h (set_gdb_completion_word_break_characters): Delete
9748 declaration.
9749 (completer_handle_brkchars_func_for_completer): New declaration.
9750 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9751 completer_handle_brkchars_func_for_completer.
9752
9753 2017-07-17 Pedro Alves <palves@redhat.com>
9754
9755 * completer.c (symbol_completer): New function, based on
9756 make_symbol_completion_list_fn.
9757 * completer.h (symbol_completer): New declaration.
9758 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9759 * python/py-cmd.c (completers): Adjust.
9760 * symtab.c (make_symbol_completion_list_fn): Delete.
9761 * symtab.h (make_symbol_completion_list_fn): Delete.
9762 * cli/cli-decode.c (add_cmd): Adjust.
9763
9764 2017-07-17 Pedro Alves <palves@redhat.com>
9765
9766 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9767 * dwarf2read.c: Include "filename-seen-cache.h".
9768 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9769 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9770 * filename-seen-cache.c: New file.
9771 * filename-seen-cache.h: New file.
9772 * symtab.c: Include "filename-seen-cache.h".
9773 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9774 (create_filename_seen_cache, clear_filename_seen_cache)
9775 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9776 to filename-seen-cache.h/filename-seen-cache.c.
9777 (output_source_filename, sources_info)
9778 (maybe_add_partial_symtab_filename)
9779 (make_source_files_completion_list): Adjust to use
9780 filename_seen_cache.
9781
9782 2017-07-17 Pedro Alves <palves@redhat.com>
9783
9784 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9785 fields.
9786 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9787 dwarf2_debug_sections*)): New.
9788 (dwarf2_per_objfile::dwarf2_per_objfile(const
9789 dwarf2_per_objfile&)): Declare as deleted.
9790 (dwarf2_per_objfile::operator=): Declare as deleted.
9791 (dwarf2_per_objfile::dwarf2_per_objfile)
9792 (dwarf2_per_objfile::~dwarf2_per_objfile)
9793 (dwarf2_per_objfile::free_cached_comp_units): New.
9794 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9795 ctor. Call dwarf2_per_objfile's ctor manually.
9796 (dwarf2_locate_sections): Deleted/refactored as ...
9797 (dwarf2_per_objfile::locate_sections): ... this new method.
9798 (free_cached_comp_units): Defer to
9799 dwarf2_per_objfile::free_cached_comp_units.
9800 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9801
9802 2017-07-14 Tom Tromey <tom@tromey.com>
9803
9804 PR rust/21764:
9805 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9806 parameter.
9807 <UNOP_SIZEOF>: Split into separate case.
9808 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9809
9810 2017-07-14 Tom Tromey <tom@tromey.com>
9811
9812 PR rust/21763:
9813 * symtab.c (symbol_matches_domain): Add language_rust to special
9814 case.
9815 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9816 treat LOC_TYPEDEF symbols as variables.
9817
9818 2017-07-14 Pedro Alves <palves@redhat.com>
9819
9820 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9821 symtabs matching all symtabs with SRCFILE as file name instead of
9822 only considering the first hit, with lookup_symtab.
9823
9824 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9825
9826 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9827 operator_name parameters.
9828 (gen_expr): Update function call.
9829
9830 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9831
9832 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9833 parameter.
9834 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9835 Likewise.
9836 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9837 parameter, use agent_expr::gdbarch instead, update function
9838 calls.
9839 (locexpr_tracepoint_var_ref): Likewise.
9840 (loclist_tracepoint_var_ref): Likewise.
9841 * ax-gdb.c (gen_trace_static_fields): Likewise.
9842 (gen_traced_pop): Likewise.
9843 (gen_frame_args_address): Likewise.
9844 (gen_frame_locals_address): Likewise.
9845 (gen_var_ref): Likewise.
9846 (gen_struct_ref_recursive): Likewise.
9847 (gen_static_field): Likewise.
9848 (gen_maybe_namespace_elt): Likewise.
9849 (gen_expr): Likewise.
9850 (gen_trace_for_var): Likewise.
9851 (gen_trace_for_expr): Likewise.
9852 (gen_trace_for_return_address): Likewise.
9853
9854 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9855
9856 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9857 parameter.
9858 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9859
9860 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9861
9862 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9863 from ax, update calls.
9864 (gen_usual_arithmetic): Likewise.
9865 (gen_integral_promotions): Likewise.
9866 (gen_bitfield_ref): Likewise.
9867 (gen_primitive_field): Likewise.
9868 (gen_struct_ref_recursive): Likewise.
9869 (gen_struct_ref): Likewise.
9870 (gen_maybe_namespace_elt): Likewise.
9871 (gen_struct_elt_for_reference): Likewise.
9872 (gen_namespace_elt): Likewise.
9873 (gen_aggregate_elt_ref): Likewise.
9874 (gen_expr): Get gdbarch from ax, update calls.
9875 (gen_expr_binop_rest): Likewise.
9876
9877 2017-07-13 Pedro Alves <palves@redhat.com>
9878
9879 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9880 as default tdesc.
9881 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9882 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9883 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9884 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9885 tdep.
9886 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9887 Get final tdesc from the tdep.
9888 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9889 default tdesc.
9890 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9891 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9892 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9893 Use it as default tdesc.
9894 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9895 down to amd_init_abi. No longer handle fallback tdesc here.
9896 * amd64-tdep.h (tdesc_x32): Declare.
9897 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9898 parameter.
9899 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9900 as default tdesc.
9901
9902 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9903
9904 * s390-linux-tdep.c (s390_process_record): Add support for
9905 instructions new in arch12.
9906
9907 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9908
9909 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9910 PT_GETFSBASE and PT_GETGSBASE.
9911 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9912 PT_SETGSBASE.
9913
9914 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9915
9916 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9917 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9918 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9919 those rules.
9920 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9921 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9922 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9923 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9924 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9925 * features/i386/amd64.xml: Add 64bit-segments.xml.
9926 * features/i386/amd64-avx-avx512.c: Regenerated.
9927 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9928 * features/i386/amd64-avx-mpx.c: Regenerated.
9929 * features/i386/amd64-avx.c: Regenerated.
9930 * features/i386/amd64-mpx.c: Regenerated.
9931 * features/i386/amd64.c: Regenerated.
9932 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9933 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9934 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9935 * regformats/i386/amd64-avx.dat: Regenerated.
9936 * regformats/i386/amd64-mpx.dat: Regenerated.
9937 * regformats/i386/amd64.dat: Regenerated.
9938
9939 2017-07-10 Yao Qi <yao.qi@linaro.org>
9940
9941 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9942 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9943
9944 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9945
9946 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9947 unsetenv.
9948 * gnulib/aclocal.m4: Regenerate.
9949 * gnulib/config.in: Regenerate.
9950 * gnulib/configure: Regenerate.
9951 * gnulib/import/Makefile.am: Regenerate.
9952 * gnulib/import/Makefile.in: Regenerate.
9953 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9954 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9955 * gnulib/import/m4/environ.m4: New file.
9956 * gnulib/import/m4/setenv.m4: New file.
9957 * gnulib/import/setenv.c: New file.
9958 * gnulib/import/unsetenv.c: New file.
9959
9960 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9961
9962 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9963 address when op is DW_OP_addr.
9964
9965 2017-07-09 Tom Tromey <tom@tromey.com>
9966
9967 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9968 check and apply to outer type.
9969
9970 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9971
9972 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9973 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9974 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9975 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9976
9977 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9978
9979 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9980
9981 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9982
9983 * corelow.c (get_core_siginfo): Remove.
9984 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9985 instead of get_core_siginfo.
9986 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9987 * gdbarch.h: Re-generate.
9988 * gdbarch.c: Re-generate.
9989 * linux-tdep.c (linux_core_xfer_siginfo): New.
9990 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9991
9992 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9993
9994 * corelow.c (thread_section_name): Move to ...
9995 * gdbcore.h (thread_section_name): ... here.
9996
9997 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9998
9999 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10000 (struct siginfo32): New.
10001 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10002 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10003 via ptrace(PT_LWPINFO).
10004
10005 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10006
10007 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10008 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10009 (fbsd_get_siginfo_type): New.
10010 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10011 (_initialize_fbsd_tdep): New.
10012
10013 2017-07-06 David Blaikie <dblaikie@gmail.com>
10014
10015 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10016 a singular dwo_unit*) to support multiple CUs in the same way that
10017 multiple TUs are supported.
10018 (create_cus_hash_table): Replace create_dwo_cu with a function for
10019 parsing multiple CUs from a DWO file.
10020 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10021 create_dwo_cu.
10022 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10023 htab_find, rather than comparing the signature to a singleton CU in
10024 the dwo_file.
10025
10026 2017-07-06 Pedro Alves <palves@redhat.com>
10027
10028 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10029
10030 2017-07-04 Pedro Alves <palves@redhat.com>
10031
10032 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10033 * gdbtypes.h (TYPE_STATIC): Delete.
10034 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10035 is_synchronized, is_native>: Delete.
10036 <dummy>: Bump.
10037 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10038 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10039 (TYPE_FN_FIELD_ABSTRACT): Delete.
10040
10041 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10042
10043 * buffer.h (buffer_finish): Fix spelling mistakes.
10044
10045 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10046
10047 * .dir-locals.el: Automatically switch to C-style comments in
10048 versions of Emacs that support the feature.
10049
10050 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10051 Pedro Alves <palves@redhat.com>
10052
10053 PR cli/21688
10054 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10055 (process_next_line): New variable 'inline_cmd'.
10056 Adjust 'if' clauses for "python", "compile" and "guile" to use
10057 'command_name_equals' and check for '!inline_cmd'.
10058
10059 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10060
10061 PR cli/21688
10062 * cli/cli-script.c (command_name_equals_not_inline): New function.
10063 (process_next_line): Adjust 'if' clauses for "python", "compile"
10064 and "guile" to use command_name_equals_not_inline.
10065
10066 2017-06-29 Pedro Alves <palves@redhat.com>
10067
10068 * completer.c (expression_completer): Call
10069 linespec_location_completer instead of location_completer.
10070
10071 2017-06-29 Pedro Alves <palves@redhat.com>
10072
10073 * completer.c (expression_completer): Remove code that recomputes
10074 'text' from 'word'.
10075
10076 2017-06-29 Yao Qi <yao.qi@linaro.org>
10077
10078 * regformats/regdat.sh: Generate code with
10079 "ifndef IN_PROCESS_AGENT".
10080
10081 2017-06-28 Pedro Alves <palves@redhat.com>
10082
10083 * command.h: Include "common/scoped_restore.h".
10084
10085 2017-06-28 Yao Qi <yao.qi@linaro.org>
10086
10087 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10088 instead of obstack_grow.
10089
10090 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10091
10092 PR gdb/21337
10093 * symfile.c (reread_symbols): Call objfiles_changed just before
10094 read_symbols.
10095
10096 2017-06-27 Pedro Alves <palves@redhat.com>
10097
10098 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10099 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10100 (completion_list_add_symbol, completion_list_add_msymbol):
10101 ... these new functions.
10102 (add_symtab_completions)
10103 (default_make_symbol_completion_list_break_on_1): Adjust.
10104
10105 2017-06-27 Pedro Alves <palves@redhat.com>
10106
10107 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10108 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10109 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10110 dtor.
10111 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10112 'storage_obstack' field an auto_obstack. In-class initialize all
10113 non-bitfield fields. Make minsyms_read bool.
10114 * symfile.c (read_symbols): Adjust.
10115
10116 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10117
10118 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10119 (gdbsim_store_register): Likewise.
10120
10121 2017-06-27 Pedro Alves <palves@redhat.com>
10122
10123 * c-exp.y (name_obstack): Now an auto_obstack.
10124 (yylex): Use auto_obstack::clear.
10125 (c_parse): Use auto_obstack::clear instead of reinitializing and
10126 freeing the obstack.
10127 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10128 * d-exp.y (name_obstack): Now an auto_obstack.
10129 (yylex): Use auto_obstack::clear.
10130 (d_parse): Use auto_obstack::clear instead of reinitializing and
10131 freeing the obstack.
10132 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10133 auto_obstack.
10134 * dwarf2read.c (create_addrmap_from_index)
10135 (dwarf2_build_psymtabs_hard)
10136 (update_enumeration_type_from_children): Likewise.
10137 * gdb_obstack.h (auto_obstack): New type.
10138 * go-exp.y (name_obstack): Now an auto_obstack.
10139 (build_packaged_name): Use auto_obstack::clear.
10140 (go_parse): Use auto_obstack::clear instead of reinitializing and
10141 freeing the obstack.
10142 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10143 auto_obstack.
10144 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10145 * rust-exp.y (work_obstack): Now an auto_obstack.
10146 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10147 reinitializing and freeing the obstack.
10148 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10149 (host_char_to_target): Use auto_obstack.
10150 * utils.h (make_cleanup_obstack_free): Delete declaration.
10151 * valprint.c (generic_emit_char, generic_printstr): Use
10152 auto_obstack.
10153
10154 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10155
10156 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10157 thread.
10158 (darwin_init_thread_list): Don't update dummy thread.
10159 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10160
10161 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10162
10163 * record-full.c (netorder16): Remove.
10164
10165 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10166
10167 * common/diagnostics.h: Define macros for GCC.
10168 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10169 * common/vec.h: Include diagnostics.h.
10170 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10171 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10172 warning.
10173
10174 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10175
10176 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10177 New macro.
10178 * ada-lex.l: Ignore deprecated register warnings.
10179
10180 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10181
10182 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10183 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10184
10185 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10186
10187 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10188 its own line.
10189
10190 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10191
10192 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10193
10194 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10195
10196 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10197 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10198 (xtensa_register_read_masked): Likewise.
10199
10200 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10201
10202 * common/environ.c (gdb_environ::unset): Update comment.
10203
10204 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10205
10206 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10207 registers.
10208
10209 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10210
10211 * record-full.c (record_full_exec_insn): Use byte_vector.
10212
10213 2017-06-22 Yao Qi <yao.qi@linaro.org>
10214
10215 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10216 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10217
10218 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10219
10220 * remote.c (cached_reg): Move from here...
10221 * regcache.h (cached_reg): ...to here.
10222 * python/py-unwind.c (struct reg_info): Remove.
10223 (cached_frame_info): Use cached_reg_t.
10224 (pyuw_prev_register): Likewise.
10225 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10226 (pyuw_dealloc_cache): Free all registers.
10227
10228 2017-06-22 Pedro Alves <palves@redhat.com>
10229 Simon Marchi <simon.marchi@ericsson.com>
10230
10231 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10232 warning.
10233 * common/diagnostics.h: New file.
10234
10235 2017-06-22 Pedro Alves <palves@redhat.com>
10236
10237 * common/agent.h: Add include guards.
10238
10239 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10240
10241 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10242 talk about addressable units instead of bytes.
10243
10244 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10245
10246 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10247 of '::const_iterator'.
10248
10249 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10250
10251 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10252 'unittests/environ-selftests.c'.
10253 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10254 * charset.c (find_charset_names): Declare object 'iconv_env'.
10255 Update code to use 'iconv_env' object. Remove call to
10256 'free_environ'.
10257 * common/environ.c: Include <utility>.
10258 (make_environ): Delete function.
10259 (free_environ): Delete function.
10260 (gdb_environ::clear): New function.
10261 (gdb_environ::operator=): New function.
10262 (gdb_environ::get): Likewise.
10263 (environ_vector): Delete function.
10264 (set_in_environ): Delete function.
10265 (gdb_environ::set): New function.
10266 (unset_in_environ): Delete function.
10267 (gdb_environ::unset): New function.
10268 (gdb_environ::envp): Likewise.
10269 * common/environ.h: Include <vector>.
10270 (struct gdb_environ): Delete; transform into...
10271 (class gdb_environ): ... this class.
10272 (free_environ): Delete prototype.
10273 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10274 environ_vector): Likewise.
10275 * infcmd.c (run_command_1): Update code to call
10276 'envp' from 'gdb_environ' class.
10277 (environment_info): Update code to call methods from 'gdb_environ'
10278 class.
10279 (unset_environment_command): Likewise.
10280 (path_info): Likewise.
10281 (path_command): Likewise.
10282 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10283 (inferior::inferior): Initialize 'environment' using the host's
10284 information.
10285 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10286 Include "environ.h".
10287 (class inferior) <environment>: Change type from 'struct
10288 gdb_environ' to 'gdb_environ'.
10289 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10290 methods from 'gdb_environ' class.
10291 * solib.c (solib_find_1): Likewise
10292 * unittests/environ-selftests.c: New file.
10293
10294 2017-06-20 Yao Qi <yao.qi@linaro.org>
10295
10296 * features/i386/i386-linux.xml: Exchange the order of including
10297 32bit-linux.xml and 32bit-sse.xml.
10298 * features/i386/i386-linux.c: Regenerated.
10299
10300 2017-06-20 Yao Qi <yao.qi@linaro.org>
10301
10302 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10303 Delete copy ctor and assignment operator.
10304 (tdesc_type): Likewise.
10305 (tdesc_feature): Likewise.
10306 (tdesc_free_reg): Remove.
10307 (tdesc_create_reg): Use new.
10308 (tdesc_free_type): Remove.
10309 (tdesc_create_vector): Use new.
10310 (tdesc_create_union): Likewise.
10311 (tdesc_create_flags): Likewise.
10312 (tdesc_create_enum): Likewise.
10313 (tdesc_free_feature): Delete.
10314 (free_target_description): Use delete.
10315
10316 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10317
10318 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10319 registers.
10320
10321 2017-06-19 Pedro Alves <palves@redhat.com>
10322
10323 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10324 after gdb::unlinker.
10325
10326 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10327
10328 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10329 gdb_environ to access an environment variable.
10330
10331 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10332
10333 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10334 gdb_byte*.
10335
10336 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10337
10338 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10339
10340 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10341
10342 * configure: Re-generate.
10343 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10344
10345 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10346
10347 * configure: Re-generate.
10348 * warning.m4: Pass -Werror to compiler when checking for
10349 supported warning flags.
10350
10351 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10352
10353 * Makefile.in (COMPILE.pre): Add "-x c++".
10354
10355 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10356 Pedro Alves <palves@redhat.com>
10357 Yao Qi <yao.qi@linaro.org>
10358
10359 * defs.h (RequireLongest): New.
10360 (extract_integer): Declare function template.
10361 (extract_signed_integer): Remove the declaration, but define it
10362 static inline.
10363 (extract_unsigned_integer): Likewise.
10364 (store_integer): Declare function template.
10365 (store_signed_integer): Remove the declaration, but define it
10366 static inline.
10367 (store_unsigned_integer): Likewise.
10368 * findvar.c (extract_integer): New function template.
10369 (extract_signed_integer): Remove.
10370 (extract_unsigned_integer): Remove.
10371 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10372 instantiations.
10373 (store_integer): New function template.
10374 (store_signed_integer): Remove.
10375 (store_unsigned_integer): Remove.
10376 (store_integer): Explicit instantiations.
10377 * regcache.c (regcache_raw_read_signed): Update.
10378 (regcache::raw_read): New function.
10379 (regcache::raw_read_signed): Remove.
10380 (regcache::raw_read_unsigned): Remove.
10381 (regcache_raw_read_unsigned): Update.
10382 (regcache_raw_write_unsigned): Update.
10383 (regcache::raw_write_signed): Remove.
10384 (regcache::raw_write): New function.
10385 (regcache_cooked_read_signed): Update.
10386 (regcache::raw_write_unsigned): Remove.
10387 (regcache::cooked_read_signed): Remove.
10388 (regcache_cooked_read_unsigned): Update.
10389 (regcache::cooked_read_unsigned): Remove.
10390 (regcache_cooked_write_signed): Update.
10391 (regcache_cooked_write_unsigned): Update.
10392 * regcache.h (regcache) <raw_read_signed>: Remove.
10393 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10394 <raw_read, raw_write>: New.
10395 <cooked_read_signed, cooked_write_signed>: Remove.
10396 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10397 <cooked_read, cooked_write>: New.
10398 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10399 (sh64_pseudo_register_write): Update.
10400
10401 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10402
10403 * arc-tdep.c (arc_disassembler_options): New variable.
10404 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10405 of default_print_insn.
10406 (arc_delayed_print_insn): Set info->section when needed,
10407 use default_print_insn to retrieve a disassembler.
10408
10409 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10410
10411 PR gdb/21574
10412 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10413 to mention $SHELL and startup-with-shell.
10414
10415 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10416
10417 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10418
10419 2017-06-14 Yao Qi <yao.qi@linaro.org>
10420
10421 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10422 default_print_insn instead of print_insn_aarch64.
10423 * arm-tdep.c (gdb_print_insn_arm): Call
10424 default_print_insn instead of print_insn_big_arm
10425 and print_insn_little_arm.
10426 * i386-tdep.c (i386_print_insn): Call default_print_insn
10427 instead of print_insn_i386.
10428 * ia64-tdep.c (ia64_print_insn): Call
10429 default_print_insn instead of print_insn_ia64.
10430 * mips-tdep.c (gdb_print_insn_mips): Call
10431 default_print_insn instead of print_insn_big_mips
10432 and print_insn_little_mips.
10433 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10434 instead of print_insn_spu.
10435
10436 2017-06-14 Pedro Alves <palves@redhat.com>
10437
10438 * ada-lang.c: Include "common/byte-vector.h".
10439 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10440 * charset.c (wchar_iterator::iterate): Resize the vector instead
10441 of reserving it.
10442 * common/byte-vector.h: Include "common/def-vector.h".
10443 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10444 * cli/cli-dump.c: Include "common/byte-vector.h".
10445 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10446 * common/byte-vector.h: New file.
10447 * common/def-vector.h: New file.
10448 * common/default-init-alloc.h: New file.
10449 * dwarf2loc.c: Include "common/byte-vector.h".
10450 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10451 instead of reserving it.
10452 * dwarf2read.c: Include "common/byte-vector.h".
10453 (data_buf::m_vec): Now a gdb::byte_vector.
10454 * gdb_regex.c: Include "common/def-vector.h".
10455 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10456 * mi/mi-main.c: Include "common/byte-vector.h".
10457 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10458 * printcmd.c: Include "common/byte-vector.h".
10459 (print_scalar_formatted): Use gdb::byte_vector.
10460 * valprint.c: Include "common/byte-vector.h".
10461 (maybe_negate_by_bytes, print_decimal_chars): Use
10462 gdb::byte_vector.
10463
10464 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10465
10466 * darwin-nat.c: Include "nat/fork-inferior.h".
10467
10468 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10469
10470 * configure.nat: Factor out Darwin bits that are not
10471 architecture-specific. Add fork-inferior.o.
10472
10473 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10474
10475 * configure.nat: Factor out AIX bits that are not
10476 architecture-specific. Add fork-inferior.o.
10477
10478 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10479
10480 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10481 (read_pieced_value, write_pieced_value): ...here. Reduce to
10482 wrappers that just call rw_pieced_value.
10483
10484 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10485
10486 * dwarf2loc.c (write_pieced_value): When writing the data for a
10487 memory piece, use write_memory_with_notification instead of
10488 write_memory.
10489
10490 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10491
10492 * valops.c (read_value_memory): Change embedded_offset to
10493 represent a bit offset instead of a byte offset.
10494 * value.h (read_value_memory): Adjust comment.
10495
10496 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10497
10498 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10499 dest_offset_bits and source_offset_bits.
10500 (write_pieced_value): Likewise.
10501
10502 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10503
10504 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10505 given by DW_OP_bit_piece.
10506 (write_pieced_value): Likewise.
10507
10508 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10509
10510 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10511 some other preparations to the places where sufficient information
10512 is available.
10513 (write_pieced_value): Likewise.
10514
10515 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10516
10517 * dwarf2loc.c (bits_to_bytes): New function.
10518 (read_pieced_value): Fix offset calculations for register pieces
10519 on big-endian targets.
10520 (write_pieced_value): Likewise.
10521
10522 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10523
10524 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10525 (write_pieced_value): Likewise.
10526
10527 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10528
10529 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10530 transfer the source value's least significant bits, instead of its
10531 lowest-addressed ones. Rename type_len to max_offset.
10532 (read_pieced_value): Mirror above changes to write_pieced_value as
10533 applicable.
10534
10535 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10536
10537 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10538 truncate full bytes from dest_offset_bits before using it as an
10539 offset into the buffer.
10540
10541 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10542
10543 * dwarf2loc.c (write_pieced_value): Include transfer size in
10544 byte-wise check.
10545
10546 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10547
10548 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10549 calculation of this_size.
10550
10551 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10552
10553 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10554 when targeting a bit-field.
10555 (write_pieced_value): Likewise.
10556
10557 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10558
10559 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10560 (allocate_piece_closure): Drop addr_size parameter.
10561 (dwarf2_evaluate_loc_desc_full): Adjust call to
10562 allocate_piece_closure.
10563
10564 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10565
10566 PR gdb/21226
10567 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10568 the LSB end, independent of endianness.
10569
10570 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10571
10572 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10573 size capping.
10574
10575 2017-06-13 Yao Qi <yao.qi@linaro.org>
10576
10577 * mips-linux-nat.c: Move include features/mips*-linux.c to
10578 mips-linux-tdep.c.
10579 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10580 to mips-linux-tdep.c.
10581 * mips-linux-tdep.c: Include features/mips*-linux.c
10582 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10583 functions.
10584 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10585 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10586 (tdesc_mips64_dsp_linux): Declare.
10587
10588 2017-06-12 Tom Tromey <tom@tromey.com>
10589
10590 * valprint.h (val_print_type_code_int): Remove.
10591 * valprint.c (generic_val_print_int): Always call
10592 val_print_scalar_formatted.
10593 (val_print_type_code_int): Remove.
10594 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10595 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10596 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10597 * ada-valprint.c (ada_val_print_num): Use
10598 val_print_scalar_formatted.
10599
10600 2017-06-12 Tom Tromey <tom@tromey.com>
10601
10602 * printcmd.c (print_scalar_formatted): Unify the two switches.
10603 Don't convert scalars to LONGEST.
10604
10605 2017-06-12 Tom Tromey <tom@tromey.com>
10606
10607 PR exp/16225:
10608 * valprint.h (print_decimal_chars): Update.
10609 * valprint.c (maybe_negate_by_bytes): New function.
10610 (print_decimal_chars): Add "is_signed" argument.
10611 * printcmd.c (print_scalar_formatted): Update.
10612
10613 2017-06-12 Tom Tromey <tom@tromey.com>
10614
10615 PR exp/16225:
10616 * valprint.h (print_binary_chars, print_hex_chars): Update.
10617 * valprint.c (val_print_type_code_int): Update.
10618 (print_binary_chars): Add "zero_pad" argument.
10619 (emit_octal_digit): New function.
10620 (print_octal_chars): Don't zero-pad.
10621 (print_decimal_chars): Likewise.
10622 (print_hex_chars): Add "zero_pad" argument.
10623 * sh64-tdep.c (sh64_do_fp_register): Update.
10624 * regcache.c (regcache::dump): Update.
10625 * printcmd.c (print_scalar_formatted): Update.
10626 * infcmd.c (default_print_one_register_info): Update.
10627
10628 2017-06-12 Pedro Alves <palves@redhat.com>
10629 Alan Hayward <alan.hayward@arm.com>
10630
10631 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10632 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10633 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10634 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10635 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10636
10637 2017-06-12 Pedro Alves <palves@redhat.com>
10638
10639 * dwarf2read.c (mapped_symtab::data): Now a vector of
10640 symtab_index_entry instead of vector of
10641 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10642 whether an element's name is NULL instead of checking whether the
10643 element itself is NULL.
10644 (find_slot): Change return type. Adjust.
10645 (hash_expand, , add_index_entry, uniquify_cu_indices)
10646 (write_hash_table): Adjust.
10647
10648 2017-06-12 Pedro Alves <palves@redhat.com>
10649
10650 * dwarf2read.c (recursively_count_psymbols): New function.
10651 (write_psymtabs_to_index): Call it to compute number of psyms and
10652 pass estimate size of psyms_seen to unordered_set's ctor.
10653
10654 2017-06-12 Pedro Alves <palves@redhat.com>
10655
10656 * dwarf2read.c (write_hash_table): Check if key already exists
10657 before emplacing.
10658
10659 2017-06-12 Pedro Alves <palves@redhat.com>
10660
10661 * dwarf2read.c (data_buf::append_space): Rename to...
10662 (data_buf::grow): ... this, and make private. Adjust all callers.
10663 (data_buf::append_uint): New method.
10664 (add_address_entry, write_one_signatured_type)
10665 (write_psymtabs_to_index): Use it.
10666
10667 2017-06-12 Pedro Alves <palves@redhat.com>
10668
10669 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10670 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10671 (data_buf::file_write): Call ::fwrite directly.
10672
10673 2017-06-12 Pedro Alves <palves@redhat.com>
10674
10675 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10676 std::vector::erase.
10677
10678 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10679
10680 Code cleanup: C++ify .gdb_index producer.
10681 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10682 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10683 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10684 (create_strtab, add_string): Remove.
10685 (file_write, data_buf): New.
10686 (struct symtab_index_entry): Use std::vector for cu_indices.
10687 (struct mapped_symtab): Use std::vector for data.
10688 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10689 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10690 Remove.
10691 (find_slot): Change return type. Update it to the new data structures.
10692 (hash_expand, add_index_entry): Update it to the new data structures.
10693 (offset_type_compare): Remove.
10694 (uniquify_cu_indices): Update it to the new data structures.
10695 (c_str_view, c_str_view_hasher, vector_hasher): New.
10696 (add_indices_to_cpool): Remove.
10697 (write_hash_table): Update it to the new data structures.
10698 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10699 (eq_psymtab_cu_index): Remove.
10700 (psym_index_map): New typedef.
10701 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10702 reference and std::unordered_map for cu_index_htab.
10703 (add_address_entry, add_address_entry_worker, write_address_map)
10704 (write_psymbols): Update it to the new data structures.
10705 (write_obstack): Remove.
10706 (struct signatured_type_index_data): Change types_list to a data_buf
10707 reference and psyms_seen to a std::unordered_set reference.
10708 (write_one_signatured_type, recursively_write_psymbols)
10709 (write_psymtabs_to_index): Update it to the new data structures.
10710
10711 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10712
10713 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10714 separate-debug-file commands.
10715 * symfile.h (separate_debug_file_debug): New global.
10716 * symfile.c (separate_debug_file_debug): New global.
10717 (separate_debug_file_exists, find_separate_debug_file): Add
10718 debug output.
10719 (_initialize_symfile): Add "set debug separate-debug-file"
10720 command.
10721 * build-id.c (build_id_to_debug_bfd,
10722 find_separate_debug_file_by_buildid): Add debug output.
10723
10724 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10725
10726 * gdbarch.sh (displaced_step_free_closure): Remove.
10727 * gdbarch.h, gdbarch.c: Re-generate.
10728 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10729 displaced_step_free_closure.
10730 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10731 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10732 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10733 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10734 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10735 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10736 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10737 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10738 * infrun.c (displaced_step_clear): Call xfree instead of
10739 gdbarch_displaced_step_free_closure.
10740
10741 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10742
10743 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10744 NULL".
10745
10746 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10747
10748 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10749 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10750 (mn10300_push_dummy_call): Likewise.
10751
10752 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10753
10754 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10755
10756 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10757
10758 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10759
10760 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10761
10762 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10763 able to start inferiors using a shell.
10764 (New remote packets): Announce new packet "QStartupWithShell".
10765 * remote.c: Add PACKET_QStartupWithShell.
10766 (extended_remote_create_inferior): Handle new
10767 PACKET_QStartupWithShell.
10768 (remote_protocol_features) <QStartupWithShell>: New entry for
10769 PACKET_QStartupWithShell.
10770 (_initialize_remote): Call "add_packet_config_cmd" for
10771 QStartupShell.
10772
10773 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10774 Pedro Alves <palves@redhat.com>
10775
10776 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10777 and "nat/fork-inferior.h".
10778 * common/common-inferior.h: New file, with contents from
10779 "gdb/inferior.h".
10780 * commom/common-utils.c: Include "common-utils.h".
10781 (stringify_argv): New function.
10782 * common/common-utils.h (stringify_argv): New prototype.
10783 * configure.nat: Add "fork-inferior.o" as a dependency for
10784 "*linux*", "fbsd*" and "nbsd*" hosts.
10785 * corefile.c (get_exec_file): Update comment.
10786 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10787 instead of "startup_inferior".
10788 (darwin_create_inferior): Call "add_thread_silent" after
10789 "fork_inferior".
10790 * fork-child.c: Cleanup unnecessary includes.
10791 (SHELL_FILE): Move to "common/common-fork-child.c".
10792 (environ): Likewise.
10793 (exec_wrapper): Initialize.
10794 (get_exec_wrapper): New function.
10795 (breakup_args): Move to "common/common-fork-child.c"; rename to
10796 "breakup_args_for_exec".
10797 (escape_bang_in_quoted_argument): Move to
10798 "common/common-fork-child.c".
10799 (saved_ui): New variable.
10800 (prefork_hook): New function.
10801 (postfork_hook): Likewise.
10802 (postfork_child_hook): Likewise.
10803 (gdb_startup_inferior): Likewise.
10804 (fork_inferior): Move to "common/common-fork-child.c". Update
10805 function to support gdbserver.
10806 (startup_inferior): Likewise.
10807 * gdbcore.h (get_exec_file): Remove declaration.
10808 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10809 instead of "startup_inferior". Call "add_thread_silent" after
10810 "fork_inferior".
10811 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10812 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10813 instead of "startup_inferior". Call "add_thread_silent" after
10814 "fork_inferior".
10815 * inferior.h: Include "common-inferior.h".
10816 (trace_start_error): Move to "common/common-utils.h".
10817 (trace_start_error_with_name): Likewise.
10818 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10819 (startup_inferior): Likewise.
10820 (gdb_startup_inferior): New prototype.
10821 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10822 * nat/fork-inferior.h: New file.
10823 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10824 instead of "startup_inferior". Call "add_thread_silent" after
10825 "fork_inferior".
10826 * target.h (target_terminal_init): Move prototype to
10827 "target/target.h".
10828 (target_terminal_inferior): Likewise.
10829 (target_terminal_ours): Likewise.
10830 * target/target.h (target_terminal_init): New prototype, moved
10831 from "target.h".
10832 (target_terminal_inferior): Likewise.
10833 (target_terminal_ours): Likewise.
10834 * utils.c (gdb_flush_out_err): New function.
10835
10836 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10837
10838 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10839 * common/common-gdbthread.h: New file, with parts from
10840 "gdb/gdbthread.h".
10841 * gdbthread.h: Include "common-gdbthread.h".
10842 (switch_to_thread): Moved to "common/common-gdbthread.h".
10843
10844 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10845
10846 * Makefile.in (SFILES): Add "common/job-control.c".
10847 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10848 (COMMON_OBS): Add "job-control.o".
10849 * common/job-control.c: New file, with contents from
10850 "gdb/inflow.c".
10851 * common/job-control.h: New file, with contents from "terminal.h".
10852 * fork-child.c: Include "job-control.h".
10853 * inflow.c: Include "job-control.h".
10854 (gdb_setpgid): Move to "common/common-inflow.c".
10855 (_initialize_inflow): Move setting of "job_control" to
10856 "handle_job_control".
10857 * terminal.h (job_control): Moved to "common/common-terminal.h".
10858 (gdb_setpgid): Likewise.
10859 * top.c: Include "job_control.h".
10860 * utils.c: Likewise.
10861 (job_control): Moved to "job-control.c".
10862
10863 2017-06-07 Pedro Alves <palves@redhat.com>
10864
10865 * Makefile.in (SFILES): Add gdb_regex.c.
10866 (COMMON_OBS): Add gdb_regex.o.
10867 * ada-lang.c (ada_add_standard_exceptions)
10868 (ada_add_exceptions_from_frame, name_matches_regex)
10869 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10870 parameter type to compiled_regex. Adjust.
10871 (ada_exceptions_list): Use compiled_regex.
10872 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10873 std::unique_ptr<compiled_regex>.
10874 (exception_catchpoint::~exception_catchpoint): Remove regfree
10875 call.
10876 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10877 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10878 * breakpoint.c (solib_catchpoint::compiled): Now a
10879 std::unique_ptr<compiled_regex>.
10880 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10881 (check_status_catch_solib): Adjust to use compiled_regex.
10882 (add_solib_catchpoint): Adjust to use compiled_regex.
10883 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10884 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10885 compiled_regex reference. Adjust to use it.
10886 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10887 declaration. Include "gdb_regex.h".
10888 (apropos_cmd): Change regex parameter to compiled_regex reference.
10889 * gdb_regex.c: New file.
10890 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10891 declarations.
10892 (class compiled_regex): New.
10893 * linux-tdep.c: Include "common/gdb_optional.h".
10894 (struct mapping_regexes): New, factored out from
10895 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10896 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10897 gdb::optional and remove cleanups. Adjust to compiled_regex.
10898 * probe.c: Include "common/gdb_optional.h".
10899 (collect_probes): Use compiled_regex and gdb::optional and remove
10900 cleanups.
10901 * skip.c: Include "common/gdb_optional.h".
10902 (skiplist_entry::compiled_function_regexp): Now a
10903 gdb::optional<compiled_regex>.
10904 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10905 (free_skiplist_entry): Remove regfree call.
10906 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10907 compiled_regex and gdb::optional.
10908 * symtab.c: Include "common/gdb_optional.h".
10909 (search_symbols): Use compiled_regex and gdb::optional.
10910 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10911 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10912 to gdb_regex.c.
10913
10914 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10915
10916 * regcache.c (regcache::save): Avoid buffer use.
10917 (regcache::dump): Likewise.
10918
10919 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10920
10921 * sh-tdep.c (sh_pseudo_register_read): Remove
10922 MAX_REGISTER_SIZE.
10923 (sh_pseudo_register_write): Likewise.
10924 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10925 (sh64_pseudo_register_write): Likewise
10926
10927 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10928
10929 * aarch64-tdep.c (aarch64_store_return_value): Use
10930 V_REGISTER_SIZE.
10931 (aarch64_pseudo_read_value): Likewise.
10932 (aarch64_pseudo_write): Likewise.
10933
10934 2017-06-06 Yao Qi <yao.qi@linaro.org>
10935
10936 * regformats/regdef.h (set_register_cache): Remove the
10937 declaration.
10938
10939 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10940
10941 * frame.c (frame_unwind_register_signed): Use
10942 frame_unwind_register_value.
10943
10944 2017-06-06 Pedro Alves <palves@redhat.com>
10945
10946 PR breakpoints/21553
10947 * breakpoint.c (create_breakpoints_sal_default)
10948 (init_breakpoint_sal, create_breakpoint_sal): Use
10949 gdb::unique_xmalloc_ptr for string parameters.
10950 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10951 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10952 (base_breakpoint_create_breakpoints_sal)
10953 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10954 (strace_marker_create_breakpoints_sal)
10955 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10956 string parameters.
10957 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10958 gdb::unique_xmalloc_ptr for string parameters.
10959 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10960 parameters.
10961
10962 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10963
10964 * alpha-tdep.c (alpha_register_to_value): Use
10965 get_frame_register_value.
10966 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10967
10968 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10969
10970 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10971 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10972 (ia64_value_to_register): Likewise.
10973 (ia64_extract_return_value): Likewise.
10974 (ia64_store_return_value): Likewise.
10975 (ia64_push_dummy_call): Likewise.
10976
10977 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10978
10979 GDB 8.0 released.
10980
10981 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10982
10983 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10984
10985 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10986
10987 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10988 parameter.
10989 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10990
10991 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10992
10993 * event-loop.c (poll_timers): Unallocate timer using delete
10994 instead of xfree.
10995
10996 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10997
10998 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10999 (struct breakpoint) <~breakpoint>: New.
11000 (struct watchpoint): Inherit from breakpoint.
11001 <~watchpoint>: New.
11002 <base>: Remove.
11003 (struct tracepoint): Inherit from breakpoint.
11004 <base>: Remove.
11005 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11006 (struct longjmp_breakpoint): Inherit from breakpoint.
11007 <~longjmp_breakpoint>: New.
11008 <base>: Remove.
11009 (new_breakpoint_from_type): Remove casts.
11010 (watchpoint_in_thread_scope): Remove reference to base field.
11011 (watchpoint_del_at_next_stop): Likewise.
11012 (update_watchpoint): Likewise.
11013 (watchpoint_check): Likewise.
11014 (bpstat_check_watchpoint): Likewise.
11015 (set_longjmp_breakpoint): Likewise.
11016 (struct fork_catchpoint): Inherit from breakpoint.
11017 <base>: Remove.
11018 (struct solib_catchpoint): Inherit from breakpoint.
11019 <~solib_catchpoint>: New.
11020 <base>: Remove.
11021 (dtor_catch_solib): Change to ...
11022 (solib_catchpoint::~solib_catchpoint): ... this.
11023 (breakpoint_hit_catch_solib): Remove reference to base field.
11024 (add_solib_catchpoint): Likewise.
11025 (create_fork_vfork_event_catchpoint): Likewise.
11026 (struct exec_catchpoint): Inherit from breakpoint.
11027 <~exec_catchpoint>: New.
11028 <base>: Remove.
11029 (dtor_catch_exec): Change to ...
11030 (exec_catchpoint::~exec_catchpoint): ... this.
11031 (dtor_watchpoint): Change to ...
11032 (watchpoint::~watchpoint): ... this.
11033 (watch_command_1): Remove reference to base field.
11034 (catch_exec_command_1): Likewise.
11035 (base_breakpoint_dtor): Change to ...
11036 (breakpoint::~breakpoint): ... this.
11037 (base_breakpoint_ops): Remove dtor field value.
11038 (longjmp_bkpt_dtor): Change to ...
11039 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11040 (strace_marker_create_breakpoints_sal): Remove reference to base
11041 field.
11042 (delete_breakpoint): Don't manually call breakpoint destructor.
11043 (create_tracepoint_from_upload): Remove reference to base field.
11044 (trace_pass_set_count): Likewise.
11045 (initialize_breakpoint_ops): Don't initialize
11046 momentary_breakpoint_ops, don't set dtors.
11047 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11048 <~ada_catchpoint>: New.
11049 <base>: Remove.
11050 (create_excep_cond_exprs): Remove reference to base field.
11051 (dtor_exception): Change to ...
11052 (ada_catchpoint::~ada_catchpoint): ... this.
11053 (dtor_catch_exception): Remove.
11054 (dtor_catch_exception_unhandled): Remove.
11055 (dtor_catch_assert): Remove.
11056 (create_ada_exception_catchpoint): Remove reference to base
11057 field.
11058 (initialize_ada_catchpoint_ops): Don't set dtors.
11059 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11060 breakpoint.
11061 <~signal_catchpoint>: New.
11062 <base>: Remove.
11063 (signal_catchpoint_dtor): Change to ...
11064 (signal_catchpoint::~signal_catchpoint): ... this.
11065 (create_signal_catchpoint): Remove reference to base field.
11066 (initialize_signal_catchpoint_ops): Don't set dtor.
11067 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11068 from breakpoint.
11069 <~syscall_catchpoint>: New.
11070 <base>: Remove.
11071 (dtor_catch_syscall): Change to ...
11072 (syscall_catchpoint::~syscall_catchpoint): ... this.
11073 (create_syscall_event_catchpoint): Remove reference to base
11074 field.
11075 (initialize_syscall_catchpoint_ops): Don't set dtor.
11076 * break-catch-throw.c (struct exception_catchpoint): Inherit
11077 from breakpoint.
11078 <~exception_catchpoint>: New.
11079 <base>: Remove.
11080 (dtor_exception_catchpoint): Change to ...
11081 (exception_catchpoint::~exception_catchpoint): ... this.
11082 (handle_gnu_v3_exceptions): Remove reference to base field.
11083 (initialize_throw_catchpoint_ops): Don't set dtor.
11084 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11085 field.
11086 * remote.c (remote_get_tracepoint_status): Likewise.
11087 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11088 * tracefile.c (tracefile_fetch_registers): Likewise.
11089 * tracepoint.c (actions_command): Likewise.
11090 (validate_actionline): Likewise.
11091 (tfind_1): Likewise.
11092 (get_traceframe_location): Likewise.
11093 (find_matching_tracepoint_location): Likewise.
11094 (parse_tracepoint_status): Likewise.
11095 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11096
11097 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11098
11099 * breakpoint.c (struct longjmp_breakpoint): New struct.
11100 (is_tracepoint_type): Change return type to bool.
11101 (is_longjmp_type): New function.
11102 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11103 (set_raw_breakpoint_without_location): Use
11104 new_breakpoint_from_type.
11105 (set_raw_breakpoint): Likewise.
11106
11107 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11108
11109 * breakpoint.c (new_breakpoint_from_type): New function.
11110 (create_breakpoint_sal): Use new_breakpoint_from_type and
11111 unique_ptr.
11112 (create_breakpoint): Likewise.
11113
11114 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11115
11116 * memattr.c (mem_info_command): Rename to ...
11117 (info_mem_command): ... this.
11118 (mem_enable_command): Rename to ...
11119 (enable_mem_command): ... this.
11120 (mem_disable_command): Rename to ...
11121 (disable_mem_command): ... this.
11122 (mem_delete_command): Rename to ...
11123 (delete_mem_command): ... this.
11124 (_initialize_mem): Adjust function names.
11125
11126 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11127
11128 * btrace.c (handle_pt_insn_events): New.
11129 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11130 STATUS. Split into this and ...
11131 (handle_pt_insn_event_flags): ... this.
11132
11133 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11134
11135 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11136 and struct pt_insn.resynced.
11137 * configure: Regenerated.
11138 * config.in: Regenerated.
11139
11140 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11141
11142 * btrace.c (ftrace_find_call_by_number): New function.
11143 (ftrace_new_function): Store objects, not pointers.
11144 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11145 ftrace_new_gap, ftrace_update_function,
11146 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11147 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11148 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11149 btrace_ends_with_single_insn, btrace_call_get): Account for
11150 btrace_thread_info::functions now storing objects.
11151 * btrace.h (struct btrace_thread_info): Add constructor.
11152 (struct btrace_thread_info) <functions>: Make std::vector.
11153 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11154 Initialize with default values.
11155 * record-btrace.c (record_btrace_frame_sniffer): Account for
11156 btrace_thread_info::functions now storing objects.
11157
11158 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11159
11160 * btrace.c: Remove typedef bfun_s.
11161 (ftrace_new_gap): Directly add gaps to the list of gaps.
11162 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11163 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11164 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11165 instead of gdb VEC.
11166
11167 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11168
11169 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11170 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11171 with btrace_thread_info::next_segment and
11172 btrace_thread_info::prev_segment.
11173 * btrace.h: Remove struct btrace_func_link.
11174 (struct btrace_function): Replace pair of function segment pointers
11175 with pair of indices.
11176 * python/py-record-btrace.c (btpy_call_prev_sibling,
11177 btpy_call_next_sibling): Replace references to
11178 btrace_thread_info::segment with btrace_thread_info::next_segment and
11179 btrace_thread_info::prev_segment.
11180 * record-btrace.c (record_btrace_frame_this_id): Use
11181 btrace_find_call_by_number.
11182
11183 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11184
11185 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11186 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11187 btrace_insn_next, btrace_insn_prev): Remove references to
11188 btrace_thread_info::flow.
11189 * btrace.h (struct btrace_function): Remove FLOW.
11190
11191 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11192
11193 * btrace.c (ftrace_find_call_by_number): New function.
11194 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11195 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11196 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11197 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11198 index.
11199 * btrace.h (struct btrace_function): Turn UP into an index.
11200 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11201 as an index.
11202 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11203 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11204 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11205
11206 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11207
11208 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11209 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11210 ftrace_update_function, ftrace_compute_global_level_offset,
11211 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11212 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11213 btrace_insn_end, btrace_is_empty): Remove references to
11214 btrace_thread_info::begin and btrace_thread_info::end.
11215 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11216 (struct btrace_thread_info) <functions>: Adjust comment.
11217 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11218 btrace_thread_info::begin.
11219
11220 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11221
11222 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11223 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11224 ftrace_update_function): Remove arguments that implicitly were always
11225 BTINFO->END.
11226 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11227 Don't pass BTINFO->END.
11228
11229 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11230
11231 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11232 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11233 btrace_find_insn_by_number): Replace function segment pointer with
11234 index.
11235 (btrace_insn_cmp): Simplify.
11236 * btrace.h: (struct btrace_insn_iterator) Rename index to
11237 insn_index. Replace function segment pointer with index into function
11238 segment vector.
11239 * record-btrace.c (record_btrace_call_history): Replace function
11240 segment pointer use with index.
11241 (record_btrace_frame_sniffer): Retrieve function call segment through
11242 vector.
11243 (record_btrace_set_replay): Remove defunc't safety check.
11244
11245 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11246
11247 * btrace.c (btrace_ends_with_single_insn): New function.
11248 (btrace_call_get, btrace_call_number, btrace_call_begin,
11249 btrace_call_end, btrace_call_next, btrace_call_prev,
11250 btrace_find_call_by_number): Use index into call segment vector
11251 instead of pointer.
11252 (btrace_call_cmp): Simplify.
11253 * btrace.h (struct btrace_call_iterator): Replace function call segment
11254 pointer with index into vector.
11255 * record-btrace.c (record_btrace_call_history): Use index instead of
11256 pointer.
11257
11258 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11259
11260 * btrace.c (btrace_insn_begin, btrace_insn_end,
11261 btrace_find_insn_by_number): Add btinfo to iterator.
11262 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11263
11264 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11265
11266 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11267 and save pointers directly.
11268 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11269 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11270 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11271 changed signature of functions.
11272 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11273 (btrace_fetch): Remove code that adds btrace_function pointers to
11274 vector of btrace_functions.
11275 (btrace_clear): Simplify freeing vector of btrace_functions.
11276
11277 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11278
11279 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11280 Replace VEC_* with std::vector functions.
11281 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11282 (struct btrace_thread_info)<functions>: Change type to std::vector.
11283
11284 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11285
11286 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11287 "Removed targets and native configurations" up. Merge duplicate
11288 "New commands" sub-sections. Add "New options" sub-sections.
11289
11290 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11291
11292 * defs.h (copy_integer_to_size): New declaration.
11293 * findvar.c (copy_integer_to_size): New function.
11294 (do_cint_test): New selftest function.
11295 (copy_integer_to_size_test): Likewise.
11296 (_initialize_findvar): Likewise.
11297 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11298 (mips_fbsd_collect_reg): Use raw_collect_integer.
11299 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11300 (mips64_fill_gregset): Use raw_collect_integer
11301 (mips64_fill_fpregset): Use raw_supply_integer.
11302 * regcache.c (regcache::raw_supply_integer): New function.
11303 (regcache::raw_collect_integer): Likewise.
11304 * regcache.h: (regcache::raw_supply_integer): New declaration.
11305 (regcache::raw_collect_integer): Likewise.
11306
11307 2017-05-24 Yao Qi <yao.qi@linaro.org>
11308
11309 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11310 (COMMON_OBS): Add gdbarch-selftests.o.
11311 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11312 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11313 * gdbarch-selftests.c: New file.
11314 * regcache.h (regcache) <~regcache>: Mark it virtual if
11315 GDB_SELF_TEST.
11316 <raw_write>: Likewise.
11317
11318 2017-05-24 Yao Qi <yao.qi@linaro.org>
11319
11320 * regcache.c (current_regcache): Change it to
11321 regcache::current_regcache.
11322 (regcache_observer_target_changed): Update.
11323 (regcache_thread_ptid_changed): Make it a regcache static
11324 method.
11325 (regcache_thread_ptid_changed): Update.
11326 (class regcache_access): New.
11327 (current_regcache_test): Update.
11328 (_initialize_regcache): Update.
11329 * regcache.h: Include forward_list.
11330 (regcache): Declare regcache_thread_ptid_changed and declare
11331 registers_changed_ptid as friend.
11332
11333 2017-05-24 Yao Qi <yao.qi@linaro.org>
11334
11335 * i387-tdep.c (i387_register_to_value): Use register_size
11336 instead of TYPE_LENGTH.
11337 * m68k-tdep.c (m68k_register_to_value): Likewise.
11338
11339 2017-05-24 Yao Qi <yao.qi@linaro.org>
11340
11341 * i387-tdep.c (i387_convert_register_p): Return false if type
11342 code isn't TYPE_CODE_FLT.
11343
11344 2017-05-24 Yao Qi <yao.qi@linaro.org>
11345
11346 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11347 length is 4.
11348 (alpha_register_to_value): Remove type length check.
11349 (alpha_value_to_register): Likewise.
11350
11351 2017-05-24 Yao Qi <yao.qi@linaro.org>
11352
11353 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11354 TYPE_CODE_FLT.
11355
11356 2017-05-24 Yao Qi <yao.qi@linaro.org>
11357
11358 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11359 TYPE_CODE_FLT or not.
11360
11361 2017-05-24 Yao Qi <yao.qi@linaro.org>
11362
11363 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11364 * avr-tdep.c (avr_gdbarch_init): Likewise.
11365 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11366 * cris-tdep.c (cris_gdbarch_init): Likewise.
11367 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11368 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11369 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11370 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11371 * mep-tdep.c (mep_gdbarch_init): Likewise.
11372 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11373 * mips-tdep.c (mips_gdbarch_init): Likewise.
11374 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11375 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11376 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11377 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11378 * v850-tdep.c (v850_gdbarch_init): Likewise.
11379
11380 2017-05-24 Yao Qi <yao.qi@linaro.org>
11381
11382 * selftest-arch.c (tests_with_arch): Call registers_changed
11383 and reinit_frame_cache.
11384 * selftest.c (run_self_tests): Likewise.
11385
11386 2017-05-24 Yao Qi <yao.qi@linaro.org>
11387
11388 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11389 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11390
11391 2017-05-24 Yao Qi <yao.qi@linaro.org>
11392
11393 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11394 set_gdbarch_print_insn.
11395
11396 2017-05-24 Yao Qi <yao.qi@linaro.org>
11397
11398 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11399 set_gdbarch_print_insn.
11400
11401 2017-05-24 Yao Qi <yao.qi@linaro.org>
11402
11403 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11404 set_gdbarch_print_insn.
11405 * arc-tdep.c (arc_gdbarch_init): Likewise.
11406 * arch-utils.c: include dis-asm.h.
11407 (default_print_insn): New function.
11408 * arch-utils.h (default_print_insn): Declare.
11409 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11410 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11411 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11412 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11413 * frv-tdep.c (frv_gdbarch_init): Likewise.
11414 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11415 * gdbarch.sh (print_insn): Use default_print_insn.
11416 * gdbarch.c: Regenerated.
11417 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11418 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11419 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11420 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11421 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11422 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11423 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11424 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11425 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11426 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11427 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11428 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11429 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11430 * mt-tdep.c (mt_gdbarch_init): Likewise.
11431 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11432 * nios2-tdep.c (nios2_print_insn): Remove.
11433 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11434 * rx-tdep.c (rx_gdbarch_init): Likewise.
11435 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11436 * score-tdep.c (score_print_insn): Remove.
11437 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11438 * sh-tdep.c (sh_gdbarch_init): Likewise.
11439 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11440 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11441 * tic6x-tdep.c (tic6x_print_insn): Remove.
11442 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11443 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11444 * v850-tdep.c (v850_gdbarch_init): Likewise.
11445 * vax-tdep.c (vax_gdbarch_init): Likewise.
11446 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11447 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11448
11449 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11450
11451 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11452 (MIPS_FP0_REGNUM): Remove.
11453 (MIPS_FSR_REGNUM): Remove.
11454 (mips_fbsd_supply_fpregs): Use mips_regnum.
11455 (mips_fbsd_supply_gregs): Likewise.
11456 (mips_fbsd_collect_fpregs): Likewise.
11457 (mips_fbsd_collect_gregs): Likewise.
11458
11459 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11460
11461 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11462 (getpfpregs_supplies): New function.
11463 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11464 getfpregs_supplies.
11465 (mips_fbsd_store_inferior_registers): Likewise.
11466
11467 2017-05-22 Pedro Alves <palves@redhat.com>
11468
11469 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11470 maintainer.
11471
11472 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11473
11474 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11475 (store_register): Likewise.
11476 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11477 (get_decimal_float_return_value): Likewise.
11478 (do_ppc_sysv_return_value): Likewise.
11479 (ppc64_sysv_abi_push_integer): Likewise.
11480 (ppc64_sysv_abi_push_freg): Likewise.
11481 (ppc64_sysv_abi_return_value_base): Likewise.
11482 (ppc64_sysv_abi_return_value): Likewise.
11483 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11484 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11485 * rs6000-nat.c: Likewise.
11486 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11487 (rs6000_value_to_register): Likewise.
11488 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11489
11490 2017-05-21 Tom Tromey <tom@tromey.com>
11491
11492 PR rust/21466:
11493 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11494 arrays as "[T]", not "[T; ]".
11495
11496 2017-05-19 Tom Tromey <tom@tromey.com>
11497
11498 PR rust/21484:
11499 * rust-lang.c (exp_descriptor_rust): New function.
11500 (rust_language_defn): Use it.
11501 * p-lang.c (pascal_language_defn): Update.
11502 * opencl-lang.c (opencl_language_defn): Update.
11503 * objc-lang.c (objc_language_defn): Update.
11504 * m2-lang.c (m2_language_defn): Update.
11505 * language.h (struct language_defn)
11506 <la_watch_location_expression>: New member.
11507 * language.c (unknown_language_defn, auto_language_defn)
11508 (local_language_defn): Update.
11509 * go-lang.c (go_language_defn): Update.
11510 * f-lang.c (f_language_defn): Update.
11511 * d-lang.c (d_language_defn): Update.
11512 * c-lang.h (c_watch_location_expression): Declare.
11513 * c-lang.c (c_watch_location_expression): New function.
11514 (c_language_defn, cplus_language_defn, asm_language_defn)
11515 (minimal_language_defn): Use it.
11516 * breakpoint.c (watch_command_1): Call
11517 la_watch_location_expression.
11518 * ada-lang.c (ada_language_defn): Update.
11519
11520 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11521
11522 PR tui/21482
11523 * gdb_curses.h (NOMACROS): Define.
11524 (NCURSES_NOMACROS): Define.
11525
11526 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11527
11528 PR tui/21482
11529 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11530 arg to char *.
11531 * tui/tui-wingeneral.c (box_win): Likewise.
11532 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11533 (tui_show_source_line): Likewise.
11534 (tui_show_exec_info_content): Likewise.
11535
11536 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11537
11538 * sparc-tdep.c (sparc_structure_return_p)
11539 (sparc_arg_on_registers_p): New functions.
11540 (sparc32_store_arguments): Use them.
11541 * sparc64-tdep.c (sparc64_16_byte_align_p)
11542 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11543 Handle TYPE_CODE_ARRAY.
11544
11545 2017-05-17 Yao Qi <yao.qi@linaro.org>
11546
11547 * cli/cli-decode.c (add_alias_cmd): New function.
11548 * command.h (add_alias_cmd): Declare.
11549 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11550 instead call add_alias_cmd.
11551
11552 2017-05-17 Pedro Alves <palves@redhat.com>
11553
11554 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11555 (nat_makefile_frag): ... this. All references updated.
11556 * configure.ac: Likewise.
11557 * configure.nat: Likewise. Enhance comments.
11558 * configure: Regenerate.
11559
11560 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11561
11562 * procfs.c (procfs_create_inferior): Change prototype to match
11563 definition.
11564
11565 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11566
11567 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11568 C++ compiler warning.
11569
11570 2017-05-12 Tom Tromey <tom@tromey.com>
11571
11572 PR rust/21483:
11573 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11574 recurse, just call value_struct_elt directly.
11575
11576 2017-05-12 Tom Tromey <tom@tromey.com>
11577
11578 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11579 OP_RUST_ARRAY>: Fix.
11580
11581 2017-05-12 Tom Tromey <tom@tromey.com>
11582
11583 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11584
11585 2017-05-09 Yao Qi <yao.qi@linaro.org>
11586
11587 * regcache.c: Include <forward_list>.
11588 (struct regcache_list): Remove.
11589 (current_regcache): Update.
11590 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11591 (regcache_thread_ptid_changed): Likewise.
11592 (registers_changed_ptid): Likewise.
11593 (current_regcache_size): Likewise.
11594
11595 2017-05-09 Yao Qi <yao.qi@linaro.org>
11596
11597 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11598 (current_regcache_size): New function.
11599 (current_regcache_test): New function.
11600 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11601
11602 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11603
11604 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11605 (print_gp_register_row): Use get_frame_register_value.
11606
11607 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11608
11609 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11610 (mips_supply_fpregset): Likewise.
11611 (mips64_supply_gregset): Likewise.
11612
11613 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11614
11615 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11616 regcache->raw_supply_zeroed.
11617
11618 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11619
11620 * configure.nat: Rearrange 'case' statements to match
11621 host before cpu.
11622
11623 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11624
11625 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11626 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11627 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11628 "@nat_extra_makefile_frag@".
11629 (Makefile): Remove dependency on "@frags@".
11630 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11631 (data-directory/Makefile): Likewise.
11632 * config/aarch64/linux.mh: Deleted; moved contents to
11633 "gdb/configure.nat".
11634 * config/alpha/alpha-linux.mh: Likewise.
11635 * config/alpha/nbsd.mh: Likewise.
11636 * config/arm/linux.mh: Likewise.
11637 * config/arm/nbsdelf.mh: Likewise.
11638 * config/i386/cygwin.mh: Likewise.
11639 * config/i386/cygwin64.mh: Likewise.
11640 * config/i386/darwin.mh: Likewise.
11641 * config/i386/fbsd.mh: Likewise.
11642 * config/i386/fbsd64.mh: Likewise.
11643 * config/i386/go32.mh: Likewise.
11644 * config/i386/i386gnu.mh: Likewise.
11645 * config/i386/i386sol2.mh: Likewise.
11646 * config/i386/linux.mh: Likewise.
11647 * config/i386/linux64.mh: Likewise.
11648 * config/i386/mingw.mh: Likewise.
11649 * config/i386/mingw64.mh: Likewise.
11650 * config/i386/nbsd64.mh: Likewise.
11651 * config/i386/nbsdelf.mh: Likewise.
11652 * config/i386/nto.mh: Likewise.
11653 * config/i386/obsd.mh: Likewise.
11654 * config/i386/obsd64.mh: Likewise.
11655 * config/i386/sol2-64.mh: Likewise.
11656 * config/ia64/linux.mh: Likewise.
11657 * config/m32r/linux.mh: Likewise.
11658 * config/m68k/linux.mh: Likewise.
11659 * config/m68k/nbsdelf.mh: Likewise.
11660 * config/m68k/obsd.mh: Likewise.
11661 * config/m88k/obsd.mh: Likewise.
11662 * config/mips/fbsd.mh: Likewise.
11663 * config/mips/linux.mh: Likewise.
11664 * config/mips/nbsd.mh: Likewise.
11665 * config/mips/obsd64.mh: Likewise.
11666 * config/pa/linux.mh: Likewise.
11667 * config/pa/nbsd.mh: Likewise.
11668 * config/pa/obsd.mh: Likewise.
11669 * config/powerpc/aix.mh: Likewise.
11670 * config/powerpc/fbsd.mh: Likewise.
11671 * config/powerpc/linux.mh: Likewise.
11672 * config/powerpc/nbsd.mh: Likewise.
11673 * config/powerpc/obsd.mh: Likewise.
11674 * config/powerpc/ppc64-linux.mh: Likewise.
11675 * config/powerpc/spu-linux.mh: Likewise.
11676 * config/s390/linux.mh: Likewise.
11677 * config/sh/nbsd.mh: Likewise.
11678 * config/sparc/fbsd.mh: Likewise.
11679 * config/sparc/linux.mh: Likewise.
11680 * config/sparc/linux64.mh: Likewise.
11681 * config/sparc/nbsd64.mh: Likewise.
11682 * config/sparc/nbsdelf.mh: Likewise.
11683 * config/sparc/obsd64.mh: Likewise.
11684 * config/sparc/sol2.mh: Likewise.
11685 * config/tilegx/linux.mh: Likewise.
11686 * config/vax/nbsdelf.mh: Likewise.
11687 * config/vax/obsd.mh: Likewise.
11688 * config/xtensa/linux.mh: Likewise.
11689 * config/i386/i386gnu.mn: New file, with excerpts from
11690 "config/i386/i386gnu.mh".
11691 * configure: Regenerate.
11692 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11693 *.mh files under "gdb/config".
11694 * configure.nat: New file, with contents from the
11695 "gdb/config/*/*.mh" files.
11696
11697 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11698
11699 * btrace.c (btrace_clear): Free insn vector.
11700
11701 2017-05-05 Pedro Alves <palves@redhat.com>
11702
11703 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11704 * configure: Regenerate.
11705
11706 2017-05-04 Pedro Alves <palves@redhat.com>
11707
11708 * Makefile.in (SFILES): Add progspace-and-thread.c.
11709 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11710 (COMMON_OBS): Add progspace-and-thread.o.
11711 * breakpoint.c: Include "progspace-and-thread.h".
11712 (update_inserted_breakpoint_locations)
11713 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11714 Use scoped_restore_current_pspace_and_thread.
11715 (create_std_terminate_master_breakpoint): Use
11716 scoped_restore_current_program_space.
11717 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11718 (print_breakpoint_location): Use
11719 scoped_restore_current_program_space.
11720 (bp_loc_is_permanent): Use
11721 scoped_restore_current_pspace_and_thread.
11722 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11723 (download_tracepoint_locations): Use
11724 scoped_restore_current_pspace_and_thread.
11725 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11726 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11727 (enum step_over_calls_kind): Moved from inferior.h.
11728 (class scoped_restore_current_thread): New class.
11729 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11730 declaration.
11731 (scoped_restore_current_thread): New class.
11732 * infcmd.c: Include "common/gdb_optional.h".
11733 (continue_1, proceed_after_attach): Use
11734 scoped_restore_current_thread.
11735 (notice_new_inferior): Use scoped_restore_current_thread.
11736 * inferior.c: Include "progspace-and-thread.h".
11737 (restore_inferior, save_current_inferior): Delete.
11738 (add_inferior_command, clone_inferior_command): Use
11739 scoped_restore_current_pspace_and_thread.
11740 * inferior.h (scoped_restore_current_inferior): New class.
11741 * infrun.c: Include "progspace-and-thread.h" and
11742 "common/gdb_optional.h".
11743 (follow_fork_inferior): Use
11744 scoped_restore_current_pspace_and_thread.
11745 (scoped_restore_exited_inferior): New class.
11746 (handle_vfork_child_exec_or_exit): Use
11747 scoped_restore_exited_inferior,
11748 scoped_restore_current_pspace_and_thread,
11749 scoped_restore_current_thread and scoped_restore.
11750 (fetch_inferior_event): Use scoped_restore_current_thread.
11751 * linespec.c (decode_line_full, decode_line_1): Use
11752 scoped_restore_current_program_space.
11753 * mi/mi-main.c: Include "progspace-and-thread.h".
11754 (exec_continue): Use scoped_restore_current_thread.
11755 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11756 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11757 * proc-service.c (ps_pglobal_lookup): Use
11758 scoped_restore_current_program_space.
11759 * progspace-and-thread.c: New file.
11760 * progspace-and-thread.h: New file.
11761 * progspace.c (release_program_space, clone_program_space): Use
11762 scoped_restore_current_program_space.
11763 (restore_program_space, save_current_program_space)
11764 (save_current_space_and_thread): Delete.
11765 (switch_to_program_space_and_thread): Moved to
11766 progspace-and-thread.c.
11767 * progspace.h (save_current_program_space)
11768 (save_current_space_and_thread): Delete declarations.
11769 (scoped_restore_current_program_space): New class.
11770 * remote.c (remote_btrace_maybe_reopen): Use
11771 scoped_restore_current_thread.
11772 * symtab.c: Include "progspace-and-thread.h".
11773 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11774 * thread.c (print_thread_info_1): Use
11775 scoped_restore_current_thread.
11776 (struct current_thread_cleanup): Delete.
11777 (do_restore_current_thread_cleanup)
11778 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11779 (scoped_restore_current_thread::~scoped_restore_current_thread):
11780 ... this new dtor.
11781 (make_cleanup_restore_current_thread): Rename/convert to ...
11782 (scoped_restore_current_thread::scoped_restore_current_thread):
11783 ... this new ctor.
11784 (thread_apply_all_command): Use scoped_restore_current_thread.
11785 (thread_apply_command): Use scoped_restore_current_thread.
11786 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11787 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11788
11789 2017-05-04 Pedro Alves <palves@redhat.com>
11790
11791 * thread.c (make_cleanup_restore_current_thread): Move
11792 find_thread_ptid call before the is_stopped call. Assert that the
11793 thread is found. Replace is_stopped call by checking the thread's
11794 state directly. Remove unnecessary NULL-thread check.
11795
11796 2017-05-04 Pedro Alves <palves@redhat.com>
11797
11798 * corelow.c (thread_section_name): New class.
11799 (get_core_register_section, get_core_siginfo): Use it.
11800
11801 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11802
11803 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11804 (get_core_register_section): Remove xfree of NULL pointer.
11805
11806 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11807
11808 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11809 * regcache.c (regcache::raw_supply_zeroed): New function.
11810 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11811
11812 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11813
11814 * gdbarch.sh: Remove commented out definition of
11815 TARGET_CHAR_BIT.
11816 * gdbarch.h: Re-generate.
11817
11818 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11819
11820 * configure: Regenerate.
11821
11822 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11823
11824 * solib-target.c (solib_target_relocate_section_addresses):
11825 Remove num_section_bases, num_bases, segment_bases variables.
11826
11827 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11828
11829 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11830
11831 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11832
11833 * solib-target.c: Include <vector>
11834 (struct lm_info_target) <~lm_info_target>: Remove.
11835 <segment_bases, section_bases>: Change type to
11836 std::vector<CORE_ADDR>.
11837 (library_list_start_segment, library_list_start_section,
11838 library_list_end_library,
11839 solib_target_relocate_section_addresses): Adjust.
11840
11841 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11842
11843 * gdbarch.sh (software_single_step): Change return type to
11844 std::vector<CORE_ADDR>.
11845 * gdbarch.c, gdbarch.h: Re-generate.
11846 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11847 Adjust.
11848 (arm_deal_with_atomic_sequence_raw): Adjust.
11849 (thumb_get_next_pcs_raw): Adjust.
11850 (arm_get_next_pcs_raw): Adjust.
11851 (arm_get_next_pcs): Adjust.
11852 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11853 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11854 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11855 (alpha_software_single_step): Adjust.
11856 * alpha-tdep.h (alpha_software_single_step): Adjust.
11857 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11858 * arm-tdep.c (arm_software_single_step): Adjust.
11859 (arm_breakpoint_kind_from_current_state): Adjust.
11860 * arm-tdep.h (arm_software_single_step): Adjust.
11861 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11862 * cris-tdep.c (cris_software_single_step): Adjust.
11863 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11864 (micromips_deal_with_atomic_sequence): Adjust.
11865 (deal_with_atomic_sequence): Adjust.
11866 (mips_software_single_step): Adjust.
11867 * mips-tdep.h (mips_software_single_step): Adjust.
11868 * moxie-tdep.c (moxie_software_single_step): Adjust.
11869 * nios2-tdep.c (nios2_software_single_step): Adjust.
11870 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11871 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11872 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11873 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11874 * sparc-tdep.c (sparc_software_single_step): Adjust.
11875 * spu-tdep.c (spu_software_single_step): Adjust.
11876 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11877
11878 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11879
11880 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11881 * gdbarch.h: Re-generate.
11882
11883 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11884
11885 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11886 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11887 * python/py-instruction.c, python/py-instruction.h: New file.
11888 * python/py-record.c: Add py-instruction.h include.
11889 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11890 gdb.RecordInstruction.
11891 * python/python-internal.h: Add gdbpy_initialize_instruction
11892 declaration.
11893 * python/python.c (do_start_initialization): Add
11894 gdbpy_initialize_instruction.
11895
11896 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11897
11898 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11899 Remove.
11900 (btrace_func_from_recpy_func): New function.
11901 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11902 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11903 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11904 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11905 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11906 Also, use new helper functions.
11907 (btpy_list_item): Use new helper functions.
11908 (recpy_bt_function_call_history): Use new type name.
11909 (btpy_call_getset): Remove.
11910 (gdbpy_initialize_btrace): Remove code to initialize
11911 gdb.BtraceFunctionCall.
11912 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11913 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11914 recpy_bt_func_prev, recpy_bt_func_next): New export.
11915 * python/py-record.c (recpy_func_type): New static object.
11916 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11917 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11918 recpy_func_next): New function.
11919 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11920 (recpy_func_getset): New static object.
11921 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11922 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11923
11924 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11925
11926 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11927 (btpy_object, btpy_insn_type, btpy_new): Remove.
11928 (btpy_list_object): Use gdb.RecordInstruction type instead of
11929 gdb.BtraceInstruction type.
11930 (btrace_insn_from_recpy_insn): New function.
11931 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11932 btpy_new.
11933 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11934 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11935 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11936 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11937 instead of btpy_object.
11938 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11939 btpy_insn_data, btpy_insn_decode): Rename to ...
11940 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11941 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11942 recpy_bt_insn_decode): This. Also, use new helper functions.
11943 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11944 recpy_insn_type.
11945 (btpy_insn_getset): Remove.
11946 (gdbpy_initialize_btrace): Remove code to initialize
11947 gdb.BtraceInstruction. Use recpy_element_object.
11948 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11949 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11950 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11951 * python/py-record.c (recpy_insn_type): New static object.
11952 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11953 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11954 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11955 New function.
11956 (recpy_insn_getset): New static object.
11957 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11958 * python/py-record.h (recpy_element_object): New typedef.
11959 (recpy_insn_type, recpy_insn_new): New export.
11960
11961 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11962
11963 * py-record-btrace.c (btpy_insn_new): Removed.
11964 (btpy_insn_or_gap_new): New function.
11965 (btpy_insn_error): Removed.
11966 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11967 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11968 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11969 btpy_insn_or_gap_new instead of btpy_insn_new.
11970 (btpy_insn_getset): Remove btpy_insn_error.
11971 * py-record.c (recpy_gap_type): New static object.
11972 (recpy_gap_object): New typedef.
11973 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11974 recpy_gap_reason_string): New function.
11975 (recpy_gap_getset): New static object.
11976 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11977 * py-record.h (recpy_gap_new): New export.
11978
11979 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11980
11981 * python/py-record.c (recpy_ptid): Remove.
11982 (recpy_record_getset): Remove recpy_ptid.
11983
11984 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11985
11986 * btrace.c (btrace_fetch): Set inferior_ptid.
11987 * python/py-record-btrace.c: Add "py-record.h" include.
11988 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11989 recpy_bt_end, recpy_bt_instruction_history,
11990 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11991 in gdb.Record object instead of current ptid.
11992 * python/py-record.c: Include new "py-record.h" file.
11993 (recpy_record_object): Moved to py-record.h.
11994 * python/py-record.h: New file.
11995
11996 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11997
11998 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11999 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12000 indentation.
12001
12002 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12003
12004 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12005 the past maintainers section.
12006
12007 2017-04-28 Yao Qi <yao.qi@linaro.org>
12008
12009 * infcmd.c (get_return_value): Use regcache ctor, and remove
12010 cleanup.
12011
12012 2017-04-28 Yao Qi <yao.qi@linaro.org>
12013 Pedro Alves <palves@redhat.com>
12014
12015 * regcache.c (regcache::regcache): New tag dispatch ctor.
12016 (do_cooked_read): Moved above.
12017 (regcache_dup): Use the tag dispatch ctor..
12018 * regcache.h (regcache): Declare ctor, delete copy ctor and
12019 assignment operator, remove friend regcache_dup.
12020
12021 2017-04-28 Yao Qi <yao.qi@linaro.org>
12022
12023 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12024 call method save instead of regcache_cpy.
12025 * regcache.h (struct regcache): Make regcache_dup a friend.
12026
12027 2017-04-28 Yao Qi <yao.qi@linaro.org>
12028
12029 * regcache.c (struct regcache): Move to regcache.h
12030 (regcache::arch): New method.
12031 (regcache_get_ptid): Update.
12032 (get_regcache_arch): Call arch method.
12033 (get_regcache_aspace): Call method aspace.
12034 (register_buffer): Change it to method.
12035 (regcache_save): Change it to regcache::save.
12036 (regcache_restore): Likewise.
12037 (regcache_cpy_no_passthrough): Remove the declaration.
12038 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12039 (regcache_cpy_no_passthrough): Change it to method
12040 cpy_no_passthrough.
12041 (regcache_register_status): Change it to method
12042 get_register_status.
12043 (regcache_invalidate): Change it to method invalidate.
12044 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12045 (regcache_raw_update): Change it to method raw_update.
12046 (regcache_raw_read): Likewise.
12047 (regcache_raw_read_signed): Likewise.
12048 (regcache_raw_read_unsigned): Likewise.
12049 (regcache_raw_write_signed): Likewise.
12050 (regcache_raw_write_unsigned): Likewise.
12051 (regcache_cooked_read): Likewise.
12052 (regcache_cooked_read_value): Likewise.
12053 (regcache_cooked_read_signed): Likewise.
12054 (regcache_cooked_read_unsigned): Likewise.
12055 (regcache_cooked_write_signed): Likewise.
12056 (regcache_cooked_write_unsigned): Likewise.
12057 (regcache_raw_set_cached_value): Likewise.
12058 (regcache_raw_write): Likewise.
12059 (regcache_cooked_write): Likewise.
12060 (regcache_xfer_part): Likewise.
12061 (regcache_raw_read_part): Likewise.
12062 (regcache_raw_write_part): Likewise.
12063 (regcache_cooked_read_part): Likewise.
12064 (regcache_cooked_write_part): Likewise.
12065 (regcache_raw_supply): Likewise.
12066 (regcache_raw_collect): Likewise.
12067 (regcache_transfer_regset): Likewise.
12068 (regcache_supply_regset): Likewise.
12069 (regcache_collect_regset): Likewise.
12070 (regcache_debug_print_register): Likewise.
12071 (enum regcache_dump_what): Move it to regcache.h.
12072 (regcache_dump): Change it to method dump.
12073 * regcache.h (enum regcache_dump_what): New.
12074 (class regcache): New.
12075 * target.c (target_fetch_registers): Call method
12076 debug_print_register.
12077 (target_store_registers): Likewise.
12078
12079 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12080
12081 * windows-nat.c (struct lm_info_windows): Initialize field.
12082 (windows_make_so): Allocate lm_info_windows with new.
12083 (windows_free_so): Free lm_info_windows with delete.
12084
12085 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12086
12087 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12088 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12089 cleanup.
12090 (darwin_free_so): Free lm_info_darwin with delete.
12091
12092 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12093
12094 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12095 <l_addr_p>: Change type to bool.
12096 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12097 (svr4_free_so): Free lm_info_svr4 with delete.
12098 (svr4_copy_library_list): Replace memcpy with call to copy
12099 constructor.
12100 (library_list_start_library, svr4_default_sos): Allocate
12101 lm_info_svr4 with new.
12102
12103 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12104
12105 * solib-target.c (struct lm_info_target): Add destructor,
12106 initialize fields.
12107 <name>: Change type to std::string.
12108 (library_list_start_library): Allocate lm_info_target with new.
12109 (solib_target_free_library_list): Free lm_info_target with
12110 delete.
12111 (solib_target_current_sos): Adapt to std::string.
12112 (solib_target_free_so): Free lm_info_target with delete.
12113
12114 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12115
12116 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12117 fields.
12118 (frv_current_sos): Allocate lm_info_frv with new.
12119 (frv_relocate_main_executable): Free lm_info_frv with delete,
12120 allocate with new.
12121 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12122
12123 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12124
12125 * solib-frv.c (struct lm_info_frv): Fix indentation.
12126
12127 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12128
12129 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12130 map field.
12131 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12132 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12133 and allocate with new.
12134 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12135
12136 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12137
12138 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12139 <filename, member_name>: Change type to std::string.
12140 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12141 (library_list_start_library): Allocate lm_info_aix with new.
12142 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12143 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12144 with copy constructor.
12145
12146 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12147
12148 * solist.h (struct lm_info): Remove.
12149 (struct lm_info_base): New class.
12150 (struct so_list) <lm_info>: Change type to lm_info_base *.
12151 * nto-tdep.c (struct lm_info): Remove.
12152 (lm_addr): Adjust.
12153 * solib-aix.c (struct lm_info): Rename to ...
12154 (struct lm_info_aix): ... this. Extend lm_info_base.
12155 (lm_info_p): Rename to ...
12156 (lm_info_aix_p): ... this, and adjust.
12157 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12158 solib_aix_parse_libraries, library_list_start_library,
12159 solib_aix_free_library_list, solib_aix_parse_libraries,
12160 solib_aix_get_library_list,
12161 solib_aix_relocate_section_addresses, solib_aix_free_so,
12162 solib_aix_get_section_offsets,
12163 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12164 Adjust.
12165 (struct solib_aix_inferior_data) <library_list>: Adjust.
12166 * solib-darwin.c (struct lm_info): Rename to ...
12167 (struct lm_info_darwin): ... this. Extend lm_info_base.
12168 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12169 * solib-dsbt.c (struct lm_info): Rename to ...
12170 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12171 (struct dsbt_info) <main_executable_lm_info): Adjust.
12172 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12173 dsbt_relocate_section_addresses): Adjust.
12174 * solib-frv.c (struct lm_info): Rename to ...
12175 (struct lm_info_frv): ... this. Extend lm_info_base.
12176 (main_executable_lm_info): Adjust.
12177 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12178 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12179 find_canonical_descriptor_in_load_object,
12180 frv_fdpic_find_canonical_descriptor): Adjust.
12181 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12182 to lm_info_svr4.
12183 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12184 svr4_clear_so, svr4_copy_library_list,
12185 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12186 svr4_current_sos, svr4_fetch_objfile_link_map,
12187 solist_update_incremental): Adjust.
12188 * solib-svr4.h (struct lm_info_svr4): Move here from
12189 solib-svr4.c.
12190 * solib-target.c (struct lm_info): Rename to ...
12191 (struct lm_info_target): ... this. Extend lm_info_base.
12192 (lm_info_p): Rename to ...
12193 (lm_info_target_p): ... this.
12194 (solib_target_parse_libraries, library_list_start_segment,
12195 library_list_start_section, library_list_start_library,
12196 library_list_end_library, solib_target_free_library_list,
12197 solib_target_current_sos, solib_target_free_so,
12198 solib_target_relocate_section_addresses): Adjust.
12199 * windows-nat.c (struct lm_info): Rename to ...
12200 (struct lm_info_windows): ... this. Extend lm_info_base.
12201 (windows_make_so, handle_load_dll, handle_unload_dll,
12202 windows_xfer_shared_libraries): Adjust.
12203
12204 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12205
12206 * solib-darwin.c (struct darwin_so_list): Remove.
12207 (darwin_current_sos): Allocate an so_list object instead of a
12208 darwin_so_list, separately allocate an lm_info object.
12209 (darwin_free_so): Free lm_info.
12210
12211 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12212
12213 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12214 with fprintf_filtered.
12215
12216 2017-04-28 Yao Qi <yao.qi@linaro.org>
12217
12218 * regcache.c (regcache::regcache): New function.
12219 (regcache::~regcache): New function.
12220 (regcache_xmalloc_1): Remove.
12221 (regcache_xmalloc): Call new regcache.
12222 (regcache_xfree): Call delete regcache.
12223 (get_thread_arch_aspace_regcache): Call new regcache.
12224
12225 2017-04-28 Yao Qi <yao.qi@linaro.org>
12226
12227 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12228 lwp instead of ptid_get_lwp.
12229
12230 2017-04-28 Yao Qi <yao.qi@linaro.org>
12231
12232 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12233 lwp_info instead of getting from inferior_ptid.
12234
12235 2017-04-27 Keith Seitz <keiths@redhat.com>
12236
12237 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12238 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12239 (CV_CONVERSION_BADNESS): Define.
12240 (rank_one_type): Remove overly restrictive rvalue reference
12241 rank checks.
12242 Add cv-qualifier checks and subranks for type equality.
12243 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12244 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12245 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12246
12247 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12248
12249 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12250 count when creating the object.
12251
12252 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12253 Ulrich Weigand <uweigand@de.ibm.com>
12254
12255 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12256 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12257 is used in AIX.
12258 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12259 (process_xcoff_symbol): Likewise.
12260 (scan_xcoff_symtab): Likewise.
12261
12262 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12263
12264 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12265 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12266 (ia64_access_reg): Use get_frame_register_unsigned.
12267 (ia64_access_rse_reg): Likewise.
12268 (ia64_libunwind_frame_prev_register): Likewise.
12269
12270 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12271
12272 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12273 * gdbarch.c: Regenerated.
12274 * gdbarch.h: Regenerated.
12275 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12276 visibility external.
12277 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12278 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12279 (enum cfa_how_kind): Move to ...
12280 (struct dwarf2_frame_state_reg_info): Likewise.
12281 (struct dwarf2_frame_state): Likewise.
12282 * dwarf2-frame.h: ... here.
12283 (dwarf2_frame_state_alloc_regs): New declaration.
12284 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12285 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12286
12287 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12288
12289 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12290 regcache_raw_read_unsigned.
12291 (xtensa_pseudo_register_write): Likewise.
12292
12293 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12294
12295 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12296 (nds32_pseudo_register_write): Likewise.
12297
12298 2017-04-25 Yao Qi <yao.qi@linaro.org>
12299
12300 * regcache.c (struct regcache) <readonly_p>: Change its type
12301 to bool.
12302 (regcache_xmalloc_1): Update parameter type and callers update.
12303
12304 2017-04-25 Yao Qi <yao.qi@linaro.org>
12305
12306 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12307 set_gdbarch_wchar_bit.
12308 * arm-tdep.c (arm_gdbarch_init): Likewise.
12309
12310 2017-04-25 Pedro Alves <palves@redhat.com>
12311
12312 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12313 (BothAreRelocatable, memcopy, memmove): Don't define.
12314 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12315 macros.
12316
12317 2017-04-25 Pedro Alves <palves@redhat.com>
12318
12319 * common/common-defs.h: Include "common/poison.h".
12320 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12321 and adjust.
12322 * common/poison.h: New file.
12323 * common/traits.h: Include <type_traits>.
12324 (Not, Or, Requires): New, moved from common/function-view.h.
12325
12326 2017-04-25 Pedro Alves <palves@redhat.com>
12327
12328 * breakpoint.h (struct breakpoint): In-class initialize all
12329 fields. Make boolean fields "bool".
12330 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12331 memset call and initializations no longer necessary.
12332
12333 2017-04-25 Pedro Alves <palves@redhat.com>
12334
12335 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12336 reference.
12337 (pt_btrace_insn): New function.
12338 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12339
12340 2017-04-25 Pedro Alves <palves@redhat.com>
12341
12342 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12343 "base" field and inherit from "bp_location" instead. Add
12344 non-default ctor.
12345 (allocate_location_exception): Use new non-default ctor.
12346 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12347 (init_bp_location): Convert to ...
12348 (bp_location::bp_location): ... this new ctor, and remove memset
12349 call.
12350 (base_breakpoint_allocate_location): Use the new non-default ctor.
12351 * breakpoint.h (bp_location): Now a class. Declare default and
12352 non-default ctors. In-class initialize all members.
12353 (init_bp_location): Remove declaration.
12354
12355 2017-04-25 Pedro Alves <palves@redhat.com>
12356
12357 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12358 assignment operator.
12359
12360 2017-04-24 Yao Qi <yao.qi@linaro.org>
12361
12362 * doublest.c (convert_doublest_to_floatformat): Call
12363 floatformat_totalsize_bytes.
12364
12365 2017-04-22 Tom Tromey <tom@tromey.com>
12366
12367 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12368 ui_out_emit_list.
12369 * stack.c (print_frame): Use ui_out_emit_list.
12370 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12371 ui_out_emit_list.
12372 * mi/mi-main.c (print_one_inferior)
12373 (mi_cmd_data_list_register_names)
12374 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12375 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12376 ui_out_emit_list.
12377 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12378 (mi_output_solib_attribs): Use ui_out_emit_list,
12379 ui_out_emit_tuple.
12380 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12381 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12382 (mi_cmd_stack_list_args, list_args_or_locals): Use
12383 ui_out_emit_list.
12384 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12385 * breakpoint.c (print_solib_event, output_thread_groups): Use
12386 ui_out_emit_list.
12387
12388 2017-04-22 Tom Tromey <tom@tromey.com>
12389
12390 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12391 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12392 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12393
12394 2017-04-22 Tom Tromey <tom@tromey.com>
12395
12396 * tracepoint.c (tvariables_info_1)
12397 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12398
12399 2017-04-22 Tom Tromey <tom@tromey.com>
12400
12401 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12402 annotate_arg_emitter.
12403 * breakpoint.c (print_mention_watchpoint)
12404 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12405 * annotate.h (struct annotate_arg_emitter): New.
12406
12407 2017-04-22 Tom Tromey <tom@tromey.com>
12408
12409 * record-btrace.c (record_btrace_insn_history)
12410 (record_btrace_insn_history_range, record_btrace_call_history)
12411 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12412 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12413 ui_out_emit_tuple.
12414 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12415 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12416 * skip.c (skip_info): Use ui_out_emit_tuple.
12417 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12418 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12419 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12420 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12421 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12422 ui_out_emit_tuple.
12423 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12424 (output_register, mi_cmd_data_read_memory)
12425 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12426 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12427 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12428 Use ui_out_emit_tuple.
12429 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12430 ui_out_emit_tuple.
12431 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12432 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12433 * linux-thread-db.c (info_auto_load_libthread_db): Use
12434 ui_out_emit_tuple.
12435 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12436 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12437 * disasm.c (do_mixed_source_and_assembly_deprecated)
12438 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12439 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12440 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12441 * breakpoint.c (print_one_breakpoint_location)
12442 (print_one_breakpoint): Use ui_out_emit_tuple.
12443 * auto-load.c (print_script, info_auto_load_cmd): Use
12444 ui_out_emit_tuple.
12445 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12446
12447 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12448
12449 * thread.c (print_thread_info_1): Remove dead code.
12450
12451 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12452
12453 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12454 GDB_SELF_TEST.
12455 * arm-tdep.c (selftests::arm_record_test): Likewise.
12456
12457 2017-04-21 Yao Qi <yao.qi@linaro.org>
12458
12459 * regcache.c (regcache_restore): Remove argument 2. Replace
12460 argument 3 with regcache. Get register status from
12461 src->register_status and get register contents from
12462 register_buffer (src, regnum).
12463 (regcache_cpy): Update.
12464
12465 2017-04-19 Pedro Alves <palves@redhat.com>
12466
12467 * gdbthread.h (thread): Add missing closing parenthesis in
12468 comment.
12469
12470 2017-04-19 Pedro Alves <palves@redhat.com>
12471
12472 * common/refcounted-object.h: New file.
12473 * gdbthread.h: Include "common/refcounted-object.h".
12474 (thread_info): Inherit from refcounted_object and add comments.
12475 (thread_info::incref, thread_info::decref)
12476 (thread_info::m_refcount): Delete.
12477 (thread_info::deletable): Use the refcounted_object::refcount()
12478 method.
12479 * inferior.c (current_inferior_): Add comment.
12480 (set_current_inferior): Increment/decrement refcounts.
12481 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12482 not-deletable instead of comparing with the current inferior.
12483 (initialize_inferiors): Increment the initial inferior's refcount.
12484 * inferior.h (struct inferior): Forward declare.
12485 Include "common/refcounted-object.h".
12486 (current_inferior, set_current_inferior): Move declaration to
12487 before struct inferior's definition, and fix comment.
12488 (inferior): Inherit from refcounted_object. Add comments.
12489 * thread.c (switch_to_thread_no_regs): Reference the thread's
12490 inferior pointer directly instead of doing a ptid lookup.
12491 (switch_to_no_thread): New function.
12492 (switch_to_thread(thread_info *)): New function, factored out
12493 from ...
12494 (switch_to_thread(ptid_t)): ... this.
12495 (restore_current_thread): Delete.
12496 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12497 fields, and add 'inf' field.
12498 (do_restore_current_thread_cleanup): Check whether old->inf is
12499 alive instead of looking up an inferior by ptid. Use
12500 switch_to_thread and switch_to_no_thread.
12501 (restore_current_thread_cleanup_dtor): Use old->inf directly
12502 instead of lookup up an inferior by id. Decref the inferior.
12503 Don't restore 'removable'.
12504 (make_cleanup_restore_current_thread): Same the inferior pointer
12505 in old, instead of the inferior number. Incref the inferior.
12506 Don't save/clear 'removable'.
12507
12508 2017-04-19 Pedro Alves <palves@redhat.com>
12509
12510 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12511 unittests/scoped_restore-selftests.c.
12512 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12513 * common/scoped_restore.h (scoped_restore_base): Make "class".
12514 (scoped_restore_base::release): New public method.
12515 (scoped_restore_base::scoped_restore_base): New protected ctor.
12516 (scoped_restore_base::m_saved_var): New protected field.
12517 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12518 scoped_restore_base base class instead of m_saved_var directly.
12519 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12520 (scoped_restore_tmpl::scoped_restore_tmpl(const
12521 scoped_restore_tmpl<T>&)): Likewise.
12522 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12523 method.
12524 (scoped_restore_tmpl::saved_var): New method.
12525 (scoped_restore_tmpl::m_saved_var): Delete.
12526 * inferior.h (inferior::detaching): Now a bool.
12527 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12528 cleanup.
12529 * unittests/scoped_restore-selftests.c: New file.
12530
12531 2017-04-19 Pedro Alves <palves@redhat.com>
12532
12533 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12534 Re-sort in alphabetic order.
12535
12536 2017-04-18 Pedro Alves <palves@redhat.com>
12537
12538 * xml-support.c (obstack_xml_printf): Delete.
12539 * xml-support.h (obstack_xml_printf): Delete.
12540
12541 2017-04-18 Pedro Alves <palves@redhat.com>
12542
12543 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12544 vdebug, verror, body_text, start_element, end_element, name,
12545 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12546 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12547 is_xinclude>: Make private and add m_ prefix.
12548 (gdb_xml_parser::body_text): New method, based on ...
12549 (gdb_xml_body_text): ... this. Adjust.
12550 (gdb_xml_parser::vdebug): New method, based on ...
12551 (gdb_xml_debug): ... this. Adjust.
12552 (gdb_xml_parser::verror): New method, based on ...
12553 (gdb_xml_error): ... this. Adjust.
12554 (gdb_xml_parser::start_element): New method, based on ...
12555 (gdb_xml_start_element): ... this. Adjust.
12556 (gdb_xml_start_element_wrapper): Defer to
12557 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12558 (gdb_xml_parser::end_element): New method, based on ...
12559 (gdb_xml_end_element_wrapper): ... this. Adjust.
12560 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12561 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12562 (gdb_xml_parser::use_dtd): New method, based on ...
12563 (gdb_xml_use_dtd): ... this. Adjust.
12564 (gdb_xml_parser::parse): New method, based on ...
12565 (gdb_xml_parse): ... this. Adjust.
12566 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12567 (xinclude_start_include): Adjust to call the parser's name method.
12568 (xml_xinclude_default, xml_xinclude_start_doctype)
12569 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12570 method.
12571 (xml_process_xincludes): Adjust to call parser methods.
12572 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12573 declarations.
12574
12575 2017-04-18 Pedro Alves <palves@redhat.com>
12576
12577 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12578 gdb::optional<std::string>.
12579 * xml-support.c: Include <string>.
12580 (scope_level::scope_level(scope_level &&))
12581 (scope_level::~scope_level): Delete.
12582 (scope_level::body): Now a std::string.
12583 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12584 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12585 parameter.
12586 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12587 (xinclude_parsing_data::output): Now a std::string reference.
12588 (xinclude_start_include): Adjust.
12589 (xml_xinclude_default): Adjust.
12590 (xml_process_xincludes): Add 'output' parameter, and return bool.
12591 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12592 and return bool.
12593 * xml-tdesc.c: Include <unordered_map> and <string>.
12594 (tdesc_xml_cache): Delete.
12595 (tdesc_xml_cache_s): Delete.
12596 (xml_cache): Now an std::unordered_map.
12597 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12598 (target_fetch_description_xml): Change return type to
12599 gdb::optional<std::string>, and adjust.
12600 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12601 (target_fetch_description_xml): Change return type to
12602 gdb::optional<std::string>.
12603
12604 2017-04-18 Pedro Alves <palves@redhat.com>
12605
12606 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12607 unittests/optional-selftests.c.
12608 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12609 * unittests/optional-selftests.c: New file.
12610 * unittests/optional/assignment/1.cc: New file.
12611 * unittests/optional/assignment/2.cc: New file.
12612 * unittests/optional/assignment/3.cc: New file.
12613 * unittests/optional/assignment/4.cc: New file.
12614 * unittests/optional/assignment/5.cc: New file.
12615 * unittests/optional/assignment/6.cc: New file.
12616 * unittests/optional/assignment/7.cc: New file.
12617 * unittests/optional/cons/copy.cc: New file.
12618 * unittests/optional/cons/default.cc: New file.
12619 * unittests/optional/cons/move.cc: New file.
12620 * unittests/optional/cons/value.cc: New file.
12621 * unittests/optional/in_place.cc: New file.
12622 * unittests/optional/observers/1.cc: New file.
12623 * unittests/optional/observers/2.cc: New file.
12624
12625 2017-04-18 Pedro Alves <palves@redhat.com>
12626
12627 * common/gdb_optional.h: Include common/traits.h.
12628 (in_place_t): New type.
12629 (in_place): New constexpr variable.
12630 (optional::optional): Remove member initialization of
12631 m_instantiated.
12632 (optional::optional(in_place_t...)): New constructor.
12633 (optional::~optional): Use reset.
12634 (optional::optional(const optional&)): New.
12635 (optional::optional(const optional&&)): New.
12636 (optional::optional(T &)): New.
12637 (optional::optional(T &&)): New.
12638 (operator::operator=(const optional &)): New.
12639 (operator::operator=(optional &&)): New.
12640 (operator::operator= (const T &))
12641 (operator::operator= (T &&))
12642 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12643 (operator::reset): New.
12644 (operator::m_instantiated):: Add in-class initializer.
12645 * common/traits.h: Include <type_traits>.
12646 (struct And): New types.
12647
12648 2017-04-18 Pedro Alves <palves@redhat.com>
12649
12650 * xml-support.c: Include <vector>.
12651 (scope_level::scope_level(const gdb_xml_element *))
12652 (scope_level::scope_level(scope_level&&)): New.
12653 (scope_level::~scope_level): New.
12654 (scope_level_s): Delete.
12655 (gdb_xml_parser::scopes): Now a std::vector.
12656 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12657 Use std::vector.
12658 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12659 scope cleanup code.
12660 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12661 of the scopes member. Use std::vector::emplace_back.
12662
12663 2017-04-18 Pedro Alves <palves@redhat.com>
12664
12665 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12666 a bool.
12667 (gdb_xml_end_element): Change type of first parameter.
12668 (gdb_xml_cleanup): Rename to ...
12669 (gdb_xml_parser::~gdb_xml_parser): ... this.
12670 (gdb_xml_create_parser_and_cleanup): Delete with ...
12671 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12672 to this new ctor.
12673 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12674 using gdb_xml_create_parser_and_cleanup.
12675 (xinclude_parsing_data): Add ctor/dtor.
12676 (xml_xinclude_cleanup): Delete.
12677 (xml_process_xincludes): Create a local xinclude_parsing_data
12678 instead of heap-allocating one. Create a local gdb_xml_parser
12679 instead of heap-allocating one with
12680 gdb_xml_create_parser_and_cleanup.
12681
12682 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12683
12684 PR threads/20743
12685 * fbsd-nat.c (resume_one_thread_cb): Remove.
12686 (resume_all_threads_cb): Remove.
12687 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12688 iterate_over_threads.
12689
12690 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12691
12692 * NEWS: Create a new section for the next release branch.
12693 Rename the section of the current branch, now that it has
12694 been cut.
12695
12696 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12697
12698 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12699 * version.in: Bump version to 8.0.50.DATE-git.
12700
12701 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12702
12703 PR gdb/21385
12704 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12705 independently of the host, and fix build breakage on Cygwin.
12706
12707 2017-04-13 Pedro Alves <palves@redhat.com>
12708
12709 * inferior.c (free_inferior): Convert to ...
12710 (inferior::~inferior): ... this dtor.
12711 (inferior::inferior): New ctor, factored out from ...
12712 (add_inferior_silent): ... here. Allocate the inferior with a new
12713 expression.
12714 (delete_inferior): Call delete instead of free_inferior.
12715 * inferior.h (gdb_environ, continuation): Forward declare.
12716 (inferior): Now a class. Add in-class initialization to all
12717 members. Make boolean fields bool, except 'detaching'.
12718 (inferior::inferior): New explicit ctor.
12719 (inferior::~inferior): New.
12720
12721 2017-04-13 Pedro Alves <palves@redhat.com>
12722
12723 * inferior.c (init_inferior_list): Delete.
12724 * inferior.h (init_inferior_list): Delete.
12725
12726 2017-04-13 Pedro Alves <palves@redhat.com>
12727
12728 PR threads/13217
12729 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12730 (top level): Call it twice, with different thread sets.
12731
12732 2017-04-13 Pedro Alves <palves@redhat.com>
12733
12734 * thread.c: Include <algorithm>.
12735 (thread_array_cleanup): Delete.
12736 (scoped_inc_dec_ref): New class.
12737 (live_threads_count): New function.
12738 (set_thread_refcount): Delete.
12739 (tp_array_compar_ascending): Now a bool.
12740 (tp_array_compar): Convert to a std::sort comparison function.
12741 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12742 and live_threads_count.
12743
12744 2017-04-13 Pedro Alves <palves@redhat.com>
12745
12746 * infrun.c (follow_fork_inferior): Also switch the current
12747 inferior.
12748
12749 2017-04-13 Pedro Alves <palves@redhat.com>
12750
12751 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12752 before calling create_internal_breakpoint.
12753
12754 2017-04-13 Pedro Alves <palves@redhat.com>
12755
12756 * fork-child.c (execv_argv): New class.
12757 (breakup_args): Refactored as ...
12758 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12759 Copy arguments to storage and replace separators with NULL
12760 terminators in place.
12761 (escape_bang_in_quoted_argument): Adjust to return bool.
12762 (execv_argv::execv_argv): New ctor.
12763 (execv_argv::init_for_shell): New method, factored out from
12764 fork_inferior. Don't strdup strings into the vector.
12765 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12766 Remove free_vector_argv call.
12767
12768 2017-04-13 Yao Qi <yao.qi@linaro.org>
12769
12770 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12771 tdep->rx_psw_type.
12772
12773 2017-04-13 Yao Qi <yao.qi@linaro.org>
12774
12775 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12776 * rx-tdep.c (rx_gdbarch_init): Likewise.
12777
12778 2017-04-13 Pedro Alves <palves@redhat.com>
12779
12780 * breakpoint.h (struct breakpoint): Reindent.
12781
12782 2017-04-13 Pedro Alves <palves@redhat.com>
12783
12784 * breakpoint.c (bp_location): Rename to ...
12785 (bp_locations): ... this. All references updated.
12786 (bp_location_count): Rename to ...
12787 (bp_locations_count): ... this. All references updated.
12788 (bp_location_placed_address_before_address_max): Rename to ...
12789 (bp_locations_placed_address_before_address_max): ... this. All
12790 references updated.
12791 (bp_location_shadow_len_after_address_max): Rename to ...
12792 (bp_locations_shadow_len_after_address_max): ... this. All
12793 references updated.
12794 (bp_location_compare_addrs): Rename to ...
12795 (bp_locations_compare_addrs): ... this. All references updated.
12796 (bp_location_compare):Rename to ...
12797 (bp_locations_compare): ... this. All references updated.
12798 (bp_location_target_extensions_update): Rename to ...
12799 (bp_locations_target_extensions_update): ... this. All references
12800 updated.
12801
12802 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12803
12804 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12805 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12806 'sgtty.h'.
12807 * common/gdb_termios.h: New file, with parts of "terminal.h".
12808 * inflow.c: Include "gdb_termios.h".
12809 * ser-unix.c: Include "gdb_termios.h".
12810 * terminal.h: Move terminal-related defines to
12811 "common/gdb_termios.h".
12812
12813 2017-04-12 Tom Tromey <tom@tromey.com>
12814
12815 * probe.c (parse_probes): Update.
12816 * location.h (delete_event_location): Don't declare.
12817 (event_location_deleter::operator()): Update.
12818 * location.c (event_location_deleter::operator()): Rename from
12819 delete_event_location.
12820 * linespec.h (linespec_result) <location>: Change type to
12821 event_location_up.
12822 * linespec.c (canonicalize_linespec, event_location_to_sals)
12823 (decode_objc): Update.
12824 (linespec_result): Don't call delete_event_location.
12825 * breakpoint.c (create_breakpoints_sal)
12826 (bkpt_probe_create_sals_from_location)
12827 (strace_marker_create_sals_from_location): Update.
12828
12829 2017-04-12 Tom Tromey <tom@tromey.com>
12830
12831 * linespec.h (struct linespec_result): Add constructor and
12832 destructor.
12833 (init_linespec_result, destroy_linespec_result)
12834 (make_cleanup_destroy_linespec_result): Don't declare.
12835 * linespec.c (init_linespec_result): Remove.
12836 (linespec_result::~linespec_result): Rename from
12837 destroy_linespec_result. Update.
12838 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12839 Remove.
12840 * breakpoint.c (create_breakpoint, break_range_command)
12841 (decode_location_default): Update.
12842 * ax-gdb.c (agent_command_1): Update.
12843
12844 2017-04-12 Tom Tromey <tom@tromey.com>
12845
12846 * remote.c (remote_download_tracepoint): Update.
12847 * python/py-breakpoint.c (bppy_get_location): Update.
12848 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12849 (gdbscm_breakpoint_location): Update.
12850 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12851 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12852 Change type to event_location_up.
12853 * breakpoint.c (create_overlay_event_breakpoint)
12854 (create_longjmp_master_breakpoint)
12855 (create_std_terminate_master_breakpoint)
12856 (create_exception_master_breakpoint)
12857 (breakpoint_event_location_empty_p, print_breakpoint_location)
12858 (print_one_breakpoint_location, create_thread_event_breakpoint)
12859 (init_breakpoint_sal, create_breakpoint)
12860 (print_recreate_ranged_breakpoint, break_range_command)
12861 (init_ada_exception_breakpoint, say_where): Update.
12862 (base_breakpoint_dtor): Don't call delete_event_location.
12863 (bkpt_print_recreate, tracepoint_print_recreate)
12864 (dprintf_print_recreate, update_static_tracepoint)
12865 (breakpoint_re_set_default): Update.
12866
12867 2017-04-12 Tom Tromey <tom@tromey.com>
12868
12869 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12870 type of "to_do". Update.
12871 (compute_stack_depth): Use std::vector.
12872
12873 2017-04-12 Tom Tromey <tom@tromey.com>
12874
12875 * printcmd.c (find_instruction_backward): Use std::vector.
12876
12877 2017-04-12 Tom Tromey <tom@tromey.com>
12878
12879 * symfile.c (objfilep): Remove typedef.
12880 (reread_symbols): Use a std::vector.
12881
12882 2017-04-12 Tom Tromey <tom@tromey.com>
12883
12884 * mi/mi-main.c (exec_direction_forward): Remove.
12885 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12886 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12887 scoped_restore.
12888 * guile/guile.c (guile_repl_command, guile_command)
12889 (gdbscm_execute_gdb_command): Use scoped_restore.
12890 * go-exp.y (go_parse): Use scoped_restore.
12891 * d-exp.y (d_parse): Use scoped_restore.
12892 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12893 * c-exp.y (c_parse): Use scoped_restore.
12894
12895 2017-04-12 Tom Tromey <tom@tromey.com>
12896
12897 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12898 (mi_parse): Update return type.
12899 (mi_parse_free): Remove.
12900 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12901 (mi_parse::~mi_parse): Rename from mi_parse_free.
12902 (mi_parse_cleanup): Remove.
12903 (mi_parse): Return a unique_ptr. Use new.
12904 * mi/mi-main.c (mi_execute_command): Update.
12905
12906 2017-04-12 Tom Tromey <tom@tromey.com>
12907
12908 * location.c (explicit_location_lex_one): Return a
12909 unique_xmalloc_ptr.
12910 (string_to_explicit_location): Update. Remove cleanups.
12911
12912 2017-04-12 Tom Tromey <tom@tromey.com>
12913
12914 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12915 (compare_value_and_voffset): Change type. Update.
12916 (compute_vtable_size): Change type of "offset_vec".
12917 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12918 (gnuv3_get_typeid): Remove extraneous declaration.
12919
12920 2017-04-12 Tom Tromey <tom@tromey.com>
12921
12922 * charset.h (wchar_iterator): Fix comment.
12923
12924 2017-04-12 Tom Tromey <tom@tromey.com>
12925
12926 * charset.c (iconv_wrapper): New class.
12927 (cleanup_iconv): Remove.
12928 (convert_between_encodings): Use it.
12929
12930 2017-04-12 Tom Tromey <tom@tromey.com>
12931
12932 * symfile.h (increment_reading_symtab): Update type.
12933 * symfile.c (decrement_reading_symtab): Remove.
12934 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12935 * psymtab.c (psymtab_to_symtab): Update.
12936 * dwarf2read.c (dw2_instantiate_symtab): Update.
12937
12938 2017-04-12 Tom Tromey <tom@tromey.com>
12939
12940 * jit.c (struct jit_reader): Declare separately. Add constructor
12941 and destructor. Change type of "handle".
12942 (loaded_jit_reader): Define separately.
12943 (jit_reader_load): Update. New "new".
12944 (jit_reader_unload_command): Use "delete".
12945 * gdb-dlfcn.h (struct dlclose_deleter): New.
12946 (gdb_dlhandle_up): New typedef.
12947 (gdb_dlopen, gdb_dlsym): Update types.
12948 (gdb_dlclose): Remove.
12949 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12950 (gdb_dlsym): Change type of "handle".
12951 (make_cleanup_dlclose): Remove.
12952 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12953 * compile/compile-c-support.c (load_libcc): Update.
12954
12955 2017-04-12 Tom Tromey <tom@tromey.com>
12956
12957 * symtab.h (find_pcs_for_symtab_line): Change return type.
12958 * symtab.c (find_pcs_for_symtab_line): Change return type.
12959 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12960 type of "vec". Update.
12961 (ltpy_get_pcs_for_line): Update.
12962 * linespec.c (decode_digits_ordinary): Update.
12963
12964 2017-04-12 Tom Tromey <tom@tromey.com>
12965
12966 * tracepoint.c (actions_command): Update.
12967 * python/python.c (python_command, python_interactive_command):
12968 Update.
12969 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12970 * guile/guile.c (guile_command): Update.
12971 * defs.h (read_command_lines, read_command_lines_1): Return
12972 command_line_up.
12973 (command_lines_deleter): New struct.
12974 (command_line_up): New typedef.
12975 * compile/compile.c (compile_code_command)
12976 (compile_print_command): Update.
12977 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12978 command_line_up.
12979 (make_cleanup_free_command_lines): Remove.
12980 * cli/cli-script.c (get_command_line, read_command_lines_1)
12981 (copy_command_lines): Return command_line_up.
12982 (while_command, if_command, read_command_lines, define_command)
12983 (document_command): Update.
12984 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12985 Remove.
12986 * breakpoint.h (breakpoint_set_commands): Change type of
12987 "commands".
12988 * breakpoint.c (breakpoint_set_commands): Change type of
12989 "commands". Update.
12990 (do_map_commands_command, update_dprintf_command_list)
12991 (create_tracepoint_from_upload): Update.
12992
12993 2017-04-12 Tom Tromey <tom@tromey.com>
12994
12995 * tracepoint.c (scope_info): Update.
12996 * spu-tdep.c (spu_catch_start): Update.
12997 * python/python.c (gdbpy_decode_line): Update.
12998 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12999 * python/py-breakpoint.c (bppy_init): Update.
13000 * probe.c (parse_probes): Update.
13001 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13002 * location.h (event_location_deleter): New struct.
13003 (event_location_up): New typedef.
13004 (new_linespec_location, new_address_location, new_probe_location)
13005 (new_explicit_location, copy_event_location)
13006 (string_to_event_location, string_to_event_location_basic)
13007 (string_to_explicit_location): Update return type.
13008 (make_cleanup_delete_event_location): Remove.
13009 * location.c (new_linespec_location, new_address_location)
13010 (new_probe_location, new_explicit_location, copy_event_location):
13011 Return event_location_up.
13012 (delete_event_location_cleanup)
13013 (make_cleanup_delete_event_location): Remove.
13014 (string_to_explicit_location, string_to_event_location_basic)
13015 (string_to_event_location): Return event_location_up.
13016 * linespec.c (canonicalize_linespec, event_location_to_sals)
13017 (decode_line_with_current_source)
13018 (decode_line_with_last_displayed, decode_objc): Update.
13019 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13020 * completer.c (location_completer): Update.
13021 * cli/cli-cmds.c (edit_command, list_command): Update.
13022 * breakpoint.c (create_overlay_event_breakpoint)
13023 (create_longjmp_master_breakpoint)
13024 (create_std_terminate_master_breakpoint)
13025 (create_exception_master_breakpoint)
13026 (create_thread_event_breakpoint): Update.
13027 (init_breakpoint_sal): Update. Remove some dead code.
13028 (create_breakpoint_sal): Change type of "location". Update.
13029 (create_breakpoints_sal, create_breakpoint, break_command_1)
13030 (dprintf_command, break_range_command, until_break_command)
13031 (init_ada_exception_breakpoint)
13032 (strace_marker_create_sals_from_location)
13033 (update_static_tracepoint, trace_command, ftrace_command)
13034 (strace_command, create_tracepoint_from_upload): Update.
13035 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13036 * ax-gdb.c (agent_command_1): Update.
13037
13038 2017-04-12 Pedro Alves <palves@redhat.com>
13039
13040 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13041 * configure.tgt: Handle i[34567]86-*-go32* and
13042 i[34567]86-*-msdosdjgpp*.
13043 * i386-tdep.c (i386_svr4_reg_to_regnum):
13044 Make extern.
13045 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13046 i386-go32-tdep.c.
13047 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13048 * i386-go32-tdep.c: New file.
13049 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13050 declarations.
13051
13052 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13053
13054 * aix-thread.c (pd_status2str): Change return type to const char *.
13055
13056 2017-04-12 Pedro Alves <palves@redhat.com>
13057
13058 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13059 calls to set_gdbarch_gnu_triplet_regexp.
13060
13061 2017-04-12 Pedro Alves <palves@redhat.com>
13062
13063 PR gdb/21323
13064 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13065 New enum value.
13066 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13067 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13068 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13069 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13070 * gdbarch.h, gdbarch.c: Regenerate.
13071 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13072 gdbarch_wchar_bit and gdbarch_wchar_signed.
13073 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13074 * arm-tdep.c (arm_gdbarch_init): Likewise.
13075 * avr-tdep.c (avr_gdbarch_init): Likewise.
13076 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13077 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13078 * i386-tdep.c (i386_go32_init_abi): Likewise.
13079 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13080 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13081 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13082 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13083 * sh-tdep.c (sh_gdbarch_init): Likewise.
13084 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13085 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13086 * windows-tdep.c (windows_init_abi): Likewise.
13087 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13088
13089 2017-04-12 Pedro Alves <palves@redhat.com>
13090
13091 PR c++/21323
13092 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13093 cplus_primitive_type_char32_t>: New enum values.
13094 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13095 and cplus_primitive_type_char32_t.
13096 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13097 32, use the archtecture's built-in type for char16_t and char32_t,
13098 respectively. Otherwise, fallback to init_integer_type as before,
13099 but make the type unsigned, and issue a complaint.
13100 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13101
13102 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13103
13104 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13105 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13106
13107 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13108
13109 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13110 'const char *'.
13111
13112 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13113
13114 * common/common-utils.c (free_vector_argv): New function.
13115 * common/common-utils.h: Include <vector>.
13116 (free_vector_argv): New prototype.
13117 * darwin-nat.c (darwin_create_inferior): Rewrite function
13118 prototype in order to constify "exec_file" and accept a
13119 "std::string" for "allargs".
13120 * fork-child.c: Include <vector>.
13121 (breakup_args): Rewrite function, using C++.
13122 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13123 and accept "std::string" for "allargs". Update the code to
13124 calculate "argv" based on "allargs". Update calls to "exec_fun"
13125 and "execvp".
13126 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13127 order to constify "exec_file" and accept a "std::string" for
13128 "allargs".
13129 * go32-nat.c (go32_create_inferior): Likewise.
13130 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13131 * infcmd.c (run_command_1): Constify "exec_file". Use
13132 "std::string" for inferior arguments.
13133 * inferior.h (fork_inferior): Update prototype.
13134 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13135 prototype in order to constify "exec_file" and accept a
13136 "std::string" for "allargs".
13137 * nto-procfs.c (procfs_create_inferior): Likewise.
13138 * procfs.c (procfs_create_inferior): Likewise.
13139 * remote-sim.c (gdbsim_create_inferior): Likewise.
13140 * remote.c (extended_remote_run): Update code to accept
13141 "std::string" as argument.
13142 (extended_remote_create_inferior): Rewrite function prototype in
13143 order to constify "exec_file" and accept a "std::string" for
13144 "allargs".
13145 * rs6000-nat.c (super_create_inferior): Likewise.
13146 (rs6000_create_inferior): Likewise.
13147 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13148 * windows-nat.c (windows_create_inferior): Likewise.
13149
13150 2017-04-11 Pedro Alves <palves@redhat.com>
13151
13152 * thread.c: Fix whitespace throughout.
13153
13154 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13155
13156 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13157
13158 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13159
13160 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13161
13162 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13163
13164 PR gdb/21364
13165 * osdata.c (info_osdata): Check if 'type' is an empty string
13166 instead of NULL.
13167
13168 2017-04-10 Pedro Alves <palves@redhat.com>
13169
13170 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13171 (ptid_to_global_thread_id, in_thread_list)
13172 (do_captured_list_thread_ids, set_resumed, set_running)
13173 (set_executing, set_stop_requested, finish_thread_state)
13174 (validate_registers_access, can_access_registers_ptid)
13175 (print_thread_info_1, switch_to_thread)
13176 (do_restore_current_thread_cleanup)
13177 (make_cleanup_restore_current_thread, thread_command)
13178 (thread_name_command): Use operator== instead of ptid_equal.
13179
13180 2017-04-10 Pedro Alves <palves@redhat.com>
13181
13182 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13183 (current_thread_cleanup_chain): Delete.
13184 (restore_current_thread_cleanup_dtor)
13185 (make_cleanup_restore_current_thread): Remove references to
13186 current_thread_cleanup_chain.
13187
13188 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13189
13190 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13191 REG_UNKNOWN.
13192
13193 2017-04-10 Yao Qi <yao.qi@linaro.org>
13194
13195 PR gdb/19942
13196 * gdbthread.h (thread_info::deletable): New method.
13197 (thread_info::incref): New method.
13198 (thread_info::decref): New method.
13199 (thread_info::refcount): Move it to private.
13200 * infrun.c (save_stop_context): Call inc_refcount.
13201 (release_stop_context_cleanup): Likewise.
13202 * thread.c (set_thread_exited): New function.
13203 (init_thread_list): Delete "tp" only it is deletable, otherwise
13204 call set_thread_exited.
13205 (delete_thread_1): Call set_thread_exited.
13206 (current_thread_cleanup) <inferior_pid>: Remove.
13207 <thread>: New field.
13208 (restore_current_thread_ptid_changed): Removed.
13209 (do_restore_current_thread_cleanup): Adjust.
13210 (restore_current_thread_cleanup_dtor): Don't call
13211 find_thread_ptid.
13212 (set_thread_refcount): Use dec_refcount.
13213 (make_cleanup_restore_current_thread): Adjust.
13214 (thread_apply_all_command): Call inc_refcount.
13215 (_initialize_thread): Don't call
13216 observer_attach_thread_ptid_changed.
13217
13218 2017-04-10 Yao Qi <yao.qi@linaro.org>
13219
13220 * thread.c (delete_thread_1): Hoist code on marking thread as
13221 exited.
13222
13223 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13224
13225 * windows-nat.c (windows_detach): Initialize ptid with
13226 minus_one_ptid.
13227
13228 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13229
13230 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13231
13232 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13233
13234 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13235 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13236 (bfin_pseudo_register_write): Likewise
13237
13238 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13239
13240 * common/ptid.h (struct ptid): Change to...
13241 (class ptid_t): ... this.
13242 <ptid_t>: New constructors.
13243 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13244 matches>: New methods.
13245 <make_null, make_minus_one>: New static methods.
13246 <pid>: Rename to...
13247 <m_pid>: ...this.
13248 <lwp>: Rename to...
13249 <m_lwp>: ...this.
13250 <tid>: Rename to...
13251 <m_tid>: ...this.
13252 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13253 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13254 as references, move comment to class ptid_t.
13255 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13256 ptid_t static methods.
13257 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13258 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13259 Take ptid arguments as references, implement using ptid_t methods.
13260 * unittests/ptid-selftests.c: New file.
13261 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13262 unittests/ptid-selftests.c.
13263 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13264
13265 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13266
13267 * python/python.c (python_run_simple_file): Cast mode literal to
13268 non-const char pointer as expected by PyFile_FromString.
13269
13270 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13271
13272 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13273 minus_one_ptid and null_ptid.
13274
13275 2017-04-05 Pedro Alves <palves@redhat.com>
13276
13277 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13278 * configure: Regenerate.
13279
13280 2017-04-05 Pedro Alves <palves@redhat.com>
13281
13282 * ada-exp.y (yyerror): Constify.
13283 * ada-lang.c (bound_name, get_selections)
13284 (ada_variant_discrim_type)
13285 (ada_variant_discrim_name, ada_value_struct_elt)
13286 (ada_lookup_struct_elt_type, is_unchecked_variant)
13287 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13288 (catch_ada_exception_command_split)
13289 (catch_ada_assert_command_split, catch_assert_command)
13290 (ada_op_name): Constify.
13291 * ada-lang.h (ada_yyerror, get_selections)
13292 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13293 * arc-tdep.c (arc_print_frame_cache): Constify.
13294 * arm-tdep.c (arm_skip_stub): Constify.
13295 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13296 (gen_aggregate_elt_ref): Constify.
13297 * bcache.c (print_bcache_statistics): Constify.
13298 * bcache.h (print_bcache_statistics): Constify.
13299 * break-catch-throw.c (catch_exception_command_1):
13300 * breakpoint.c (struct ep_type_description::description):
13301 Constify.
13302 (add_solib_catchpoint): Constify.
13303 (catch_fork_command_1): Add cast.
13304 (add_catch_command): Constify.
13305 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13306 Constify.
13307 * bsd-uthread.c (bsd_uthread_state): Constify.
13308 * buildsym.c (patch_subfile_names): Constify.
13309 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13310 Constify.
13311 * c-exp.y (yyerror): Constify.
13312 (token::oper): Constify.
13313 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13314 * c-varobj.c (cplus_describe_child): Constify.
13315 * charset.c (find_charset_names): Add cast.
13316 (find_charset_names): Constify array and add const_cast.
13317 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13318 (edit_command): Constify.
13319 * cli/cli-decode.c (lookup_cmd): Constify.
13320 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13321 Constify.
13322 (struct dump_context): Constify.
13323 (add_dump_command, restore_command): Constify.
13324 * cli/cli-script.c (get_command_line): Constify.
13325 * cli/cli-script.h (get_command_line): Constify.
13326 * cli/cli-utils.c (check_for_argument): Constify.
13327 * cli/cli-utils.h (check_for_argument): Constify.
13328 * coff-pe-read.c (struct read_pe_section_data): Constify.
13329 * command.h (lookup_cmd): Constify.
13330 * common/print-utils.c (decimal2str): Constify.
13331 * completer.c (gdb_print_filename): Constify.
13332 * corefile.c (set_gnutarget): Constify.
13333 * cp-name-parser.y (yyerror): Constify.
13334 * cp-valprint.c (cp_print_class_member): Constify.
13335 * cris-tdep.c (cris_register_name, crisv32_register_name):
13336 Constify.
13337 * d-exp.y (yyerror): Constify.
13338 (struct token::oper): Constify.
13339 * d-lang.h (d_yyerror): Constify.
13340 * dbxread.c (struct header_file_location::name): Constify.
13341 (add_old_header_file, add_new_header_file, last_function_name)
13342 (dbx_next_symbol_text, add_bincl_to_list)
13343 (find_corresponding_bincl_psymtab, set_namestring)
13344 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13345 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13346 * defs.h (command_line_input, print_address_symbolic)
13347 (deprecated_readline_begin_hook): Constify.
13348 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13349 Constify.
13350 * event-top.c (handle_line_of_input): Constify and add cast.
13351 * exceptions.c (catch_errors): Constify.
13352 * exceptions.h (catch_errors): Constify.
13353 * expprint.c (print_subexp_standard, op_string, op_name)
13354 (op_name_standard, dump_raw_expression, dump_raw_expression):
13355 * expression.h (op_name, op_string, dump_raw_expression):
13356 Constify.
13357 * f-exp.y (yyerror): Constify.
13358 (struct token::oper): Constify.
13359 (struct f77_boolean_val::name): Constify.
13360 * f-lang.c (f_word_break_characters): Constify.
13361 * f-lang.h (f_yyerror): Constify.
13362 * fork-child.c (fork_inferior): Add cast.
13363 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13364 (new_variant): Constify.
13365 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13366 * gdbarch.c: Regenerate.
13367 * gdbcore.h (set_gnutarget): Constify.
13368 * go-exp.y (yyerror): Constify.
13369 (token::oper): Constify.
13370 * go-lang.h (go_yyerror): Constify.
13371 * go32-nat.c (go32_sysinfo): Constify.
13372 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13373 * guile/scm-cmd.c (cmdscm_function): Constify.
13374 * guile/scm-param.c (pascm_param_value): Constify.
13375 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13376 (h8300sx_register_name): Constify.
13377 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13378 Constify.
13379 * ia64-tdep.c (ia64_register_names): Constify.
13380 * infcmd.c (construct_inferior_arguments): Constify.
13381 (path_command, attach_post_wait): Constify.
13382 * language.c (show_range_command, show_case_command)
13383 (unk_lang_error): Constify.
13384 * language.h (language_defn::la_error)
13385 (language_defn::la_name_of_this): Constify.
13386 * linespec.c (decode_line_2): Constify.
13387 * linux-thread-db.c (thread_db_err_str): Constify.
13388 * lm32-tdep.c (lm32_register_name): Constify.
13389 * m2-exp.y (yyerror): Constify.
13390 * m2-lang.h (m2_yyerror): Constify.
13391 * m32r-tdep.c (m32r_register_names): Constify and make static.
13392 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13393 * m88k-tdep.c (m88k_register_name): Constify.
13394 * macroexp.c (appendmem): Constify.
13395 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13396 (upgrade_type, parse_external, parse_partial_symbols)
13397 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13398 (new_symbol): Constify.
13399 * memattr.c (mem_info_command): Constify.
13400 * mep-tdep.c (register_name_from_keyword): Constify.
13401 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13402 Constify.
13403 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13404 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13405 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13406 cast.
13407 (mi_execute_async_cli_command): Constify.
13408 * mips-tdep.c (mips_register_name): Constify.
13409 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13410 (am33_register_name, am33_2_register_name)
13411 * moxie-tdep.c (moxie_register_names): Constify.
13412 * nat/linux-osdata.c (osdata_type): Constify fields.
13413 * nto-tdep.c (nto_parse_redirection): Constify.
13414 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13415 (lookup_child_selector): Constify.
13416 (objc_methcall::name): Constify.
13417 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13418 (lookup_struct_typedef): Constify.
13419 * objfiles.c (pc_in_section): Constify.
13420 * objfiles.h (pc_in_section): Constify.
13421 * p-exp.y (struct token::oper): Constify.
13422 (yyerror): Constify.
13423 * p-lang.h (pascal_yyerror): Constify.
13424 * parser-defs.h (op_name_standard): Constify.
13425 (op_print::string): Constify.
13426 (exp_descriptor::op_name): Constify.
13427 * printcmd.c (print_address_symbolic): Constify.
13428 * psymtab.c (print_partial_symbols): Constify.
13429 * python/py-breakpoint.c (stop_func): Constify.
13430 (bppy_get_expression): Constify.
13431 * python/py-cmd.c (cmdpy_completer::name): Constify.
13432 (cmdpy_function): Constify.
13433 * python/py-event.c (evpy_add_attribute)
13434 (gdbpy_initialize_event_generic): Constify.
13435 * python/py-event.h (evpy_add_attribute)
13436 (gdbpy_initialize_event_generic): Constify.
13437 * python/py-evts.c (add_new_registry): Constify.
13438 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13439 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13440 * python/py-inferior.c (get_buffer): Add cast.
13441 * python/py-param.c (parm_constant::name): Constify.
13442 * python/py-unwind.c (fprint_frame_id): Constify.
13443 * python/python.c (gdbpy_parameter_value): Constify.
13444 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13445 * remote.c (memory_packet_config::name): Constify.
13446 (show_packet_config_cmd, remote_write_bytes)
13447 (remote_buffer_add_string):
13448 * reverse.c (exec_reverse_once): Constify.
13449 * rs6000-tdep.c (variant::name, variant::description): Constify.
13450 * rust-exp.y (rustyyerror): Constify.
13451 * rust-lang.c (rust_op_name): Constify.
13452 * rust-lang.h (rustyyerror): Constify.
13453 * serial.h (serial_ops::name): Constify.
13454 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13455 (sh_sh3e_register_name, sh_sh2e_register_name)
13456 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13457 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13458 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13459 (sh_sh4al_dsp_register_name): Constify.
13460 * sh64-tdep.c (sh64_register_name): Constify.
13461 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13462 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13463 * stabsread.c (patch_block_stabs, read_type_number)
13464 (ref_map::stabs, ref_add, process_reference)
13465 (symbol_reference_defined, define_symbol, define_symbol)
13466 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13467 (read_one_struct_field, read_struct_fields, read_baseclasses)
13468 (read_tilde_fields, read_struct_type, read_array_type)
13469 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13470 (read_huge_number, read_range_type, read_args, common_block_start)
13471 (find_name_end): Constify.
13472 * stabsread.h (common_block_start, define_symbol)
13473 (process_one_symbol, symbol_reference_defined, ref_add):
13474 * symfile.c (get_section_index, add_symbol_file_command):
13475 * symfile.h (get_section_index): Constify.
13476 * target-descriptions.c (tdesc_type::name): Constify.
13477 (tdesc_free_type): Add cast.
13478 * target.c (find_default_run_target):
13479 (add_deprecated_target_alias, find_default_run_target)
13480 (target_announce_detach): Constify.
13481 (do_option): Constify.
13482 * target.h (add_deprecated_target_alias): Constify.
13483 * thread.c (print_thread_info_1): Constify.
13484 * top.c (deprecated_readline_begin_hook, command_line_input):
13485 Constify.
13486 (init_main): Add casts.
13487 * top.h (handle_line_of_input): Constify.
13488 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13489 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13490 (tfind_command): Rename to ...
13491 (tfind_command_1): ... this and constify.
13492 (tfind_command): New function.
13493 (tfind_end_command, tfind_start_command): Adjust.
13494 (encode_source_string): Constify.
13495 * tracepoint.h (encode_source_string): Constify.
13496 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13497 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13498 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13499 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13500 * tui/tui-win.c (parse_scrolling_args): Constify.
13501 * tui/tui-windata.c (tui_erase_data_content): Constify.
13502 * tui/tui-windata.h (tui_erase_data_content): Constify.
13503 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13504 * tui/tui.c (tui_enable): Add cast.
13505 * utils.c (defaulted_query): Constify.
13506 (init_page_info): Add cast.
13507 (puts_debug, subset_compare): Constify.
13508 * utils.h (subset_compare): Constify.
13509 * varobj.c (varobj_format_string): Constify.
13510 * varobj.h (varobj_format_string): Constify.
13511 * vax-tdep.c (vax_register_name): Constify.
13512 * windows-nat.c (windows_detach): Constify.
13513 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13514 * xml-support.c (gdb_xml_end_element): Constify.
13515 * xml-tdesc.c (tdesc_start_reg): Constify.
13516 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13517 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13518 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13519
13520 2017-04-05 Pedro Alves <palves@redhat.com>
13521
13522 * proc-api.c (struct trans): Constify.
13523 (procfs_note): Constify.
13524 * proc-events.c (struct trans, syscall_table):
13525 * proc-flags.c (struct trans): Constify.
13526 * proc-utils.h (procfs_note): Constify.
13527 * proc-why.c (struct trans): Constify.
13528 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13529 (procfs_detach): Constify.
13530 * sol-thread.c (struct string_map): Constify.
13531 (td_err_string, td_state_string): Constify.
13532
13533 2017-04-05 Pedro Alves <palves@redhat.com>
13534
13535 * proc-api.c (procfs_filename): Don't initialize
13536 procfs_filename.
13537 (prepare_to_trace): Assume procfs_filename is non-NULL.
13538 (_initialize_proc_api): Give procfs_filename a default value here.
13539
13540 2017-04-05 Pedro Alves <palves@redhat.com>
13541
13542 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13543 'cond_string' parameter.
13544 (extract_exception_regexp): Constify 'string' parameter.
13545 (catch_exception_command_1): Constify.
13546 * breakpoint.c (init_catchpoint)
13547 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13548 parameter.
13549 (ep_parse_optional_if_clause, catch_fork_command_1)
13550 (catch_exec_command_1): Constify.
13551 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13552 parameter.
13553 (ep_parse_optional_if_clause): Constify.
13554 * cli/cli-utils.c (remove_trailing_whitespace)
13555 (check_for_argument): Constify.
13556 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13557 non-const overload.
13558 (check_for_argument): Likewise.
13559
13560 2017-04-05 Pedro Alves <palves@redhat.com>
13561
13562 * event-top.c (command_line_handler): Add cast to execute_command
13563 call.
13564 * record-btrace.c (cmd_record_btrace_bts_start)
13565 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13566 (cmd_record_btrace_start): Add cast to execute_command call.
13567 * record-full.c (record_full_goto_insn):
13568 * record.c (record_start, record_stop): Add cast to
13569 execute_command_to_string calls.
13570 (cmd_record_start): Add cast to execute_command calls.
13571
13572 2017-04-05 Pedro Alves <palves@redhat.com>
13573
13574 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13575 static inline function.
13576 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13577 array and use gdb_PyArg_ParseTupleAndKeywords.
13578 * python/py-cmd.c (cmdpy_init): Likewise.
13579 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13580 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13581 (infpy_search_memory): Likewise.
13582 * python/py-objfile.c (objfpy_add_separate_debug_file)
13583 (gdbpy_lookup_objfile): Likewise.
13584 * python/py-symbol.c (gdbpy_lookup_symbol)
13585 (gdbpy_lookup_global_symbol): Likewise.
13586 * python/py-type.c (gdbpy_lookup_type): Likewise.
13587 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13588 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13589 Likewise.
13590
13591 2017-04-05 Pedro Alves <palves@redhat.com>
13592
13593 * python/python-internal.h (gdb_PyGetSetDef): New type.
13594 * python/py-block.c (block_object_getset)
13595 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13596 * python/py-event.c (event_object_getset)
13597 (finish_breakpoint_object_getset): Likewise.
13598 * python/py-inferior.c (inferior_object_getset): Likewise.
13599 * python/py-infthread.c (thread_object_getset): Likewise.
13600 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13601 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13602 * python/py-objfile.c (objfile_getset): Likewise.
13603 * python/py-progspace.c (pspace_getset): Likewise.
13604 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13605 Likewise.
13606 * python/py-record.c (recpy_record_getset): Likewise.
13607 * python/py-symbol.c (symbol_object_getset): Likewise.
13608 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13609 Likewise.
13610 * python/py-type.c (type_object_getset, field_object_getset):
13611 Likewise.
13612 * python/py-value.c (value_object_getset): Likewise.
13613
13614 2017-04-05 Pedro Alves <palves@redhat.com>
13615
13616 * python/python-internal.h (gdb_PyObject_CallMethod)
13617 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13618 New functions.
13619 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13620 (PySys_GetObject, PySys_SetPath): New macros.
13621
13622 2017-04-05 Pedro Alves <palves@redhat.com>
13623
13624 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13625 info_osdata_command.
13626 * osdata.c (info_osdata_command): Rename to ...
13627 (info_osdata): ... this. Constify 'type' parameter, and remove
13628 the 'from_tty' parameter. Accept NULL TYPE.
13629 (info_osdata_command): New function.
13630 * osdata.h (info_osdata_command): Remove declaration.
13631 (info_osdata): New declaration.
13632
13633 2017-04-05 Pedro Alves <palves@redhat.com>
13634
13635 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13636 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13637 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13638 parameter.
13639 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13640 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13641 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13642 parameter.
13643 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13644 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13645 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13646 (mi_cmd_file_list_exec_source_files)
13647 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13648 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13649 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13650 parameter.
13651 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13652 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13653 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13654 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13655 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13656 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13657 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13658 'command' parameter.
13659 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13660 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13661 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13662 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13663 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13664 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13665 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13666 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13667 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13668 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13669 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13670 parameter.
13671 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13672 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13673 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13674 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13675 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13676 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13677 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13678 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13679 (mi_cmd_data_list_changed_registers)
13680 (mi_cmd_data_write_register_values)
13681 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13682 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13683 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13684 (mi_cmd_list_features, mi_cmd_list_target_features)
13685 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13686 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13687 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13688 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13689 (mi_cmd_trace_frame_collected): Constify 'command'
13690 parameter.
13691 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13692 'command' parameter.
13693
13694 2017-04-05 Pedro Alves <palves@redhat.com>
13695
13696 * ada-lang.c (ada_completer_word_break_characters): Now a const
13697 array.
13698 (ada_get_gdb_completer_word_break_characters): Constify.
13699 * completer.c (gdb_completer_command_word_break_characters)
13700 (gdb_completer_file_name_break_characters)
13701 (gdb_completer_quote_characters): Now const arrays.
13702 (get_gdb_completer_quote_characters): Constify.
13703 (set_rl_completer_word_break_characters): New function.
13704 (set_gdb_completion_word_break_characters)
13705 (complete_line_internal): Use it.
13706 * completer.h (get_gdb_completer_quote_characters): Constify.
13707 (set_rl_completer_word_break_characters): Declare.
13708 * f-lang.c (f_word_break_characters): Constify.
13709 * language.c (default_word_break_characters): Constify.
13710 * language.h (language_defn::la_word_break_characters): Constify.
13711 (default_word_break_characters): Constify.
13712 * top.c (init_main): Use set_rl_completer_word_break_characters.
13713
13714 2017-04-05 Pedro Alves <palves@redhat.com>
13715
13716 * aix-thread.c (aix_thread_pid_to_str)
13717 (aix_thread_extra_thread_info): Constify.
13718 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13719 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13720 (bsd_uthread_pid_to_str): Constify.
13721 * corelow.c (core_pid_to_str): Constify.
13722 * darwin-nat.c (darwin_pid_to_str): Constify.
13723 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13724 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13725 Constify.
13726 * gnu-nat.c (gnu_pid_to_str): Constify.
13727 * go32-nat.c (go32_pid_to_str): Constify.
13728 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13729 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13730 * inferior.c (inferior_pid_to_str): Constify.
13731 * linux-nat.c (linux_nat_pid_to_str): Constify.
13732 * linux-tdep.c (linux_core_pid_to_str): Constify.
13733 * linux-thread-db.c (thread_db_pid_to_str)
13734 (thread_db_extra_thread_info): Constify.
13735 * nto-tdep.c (nto_extra_thread_info): Constify.
13736 * nto-tdep.h (nto_extra_thread_info): Constify.
13737 * obsd-nat.c (obsd_pid_to_str): Constify.
13738 * procfs.c (procfs_pid_to_str): Constify.
13739 * ravenscar-thread.c (ravenscar_extra_thread_info)
13740 (ravenscar_pid_to_str): Constify.
13741 * remote-sim.c (gdbsim_pid_to_str): Constify.
13742 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13743 Constify.
13744 * sol-thread.c (solaris_pid_to_str): Constify.
13745 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13746 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13747 * target.c (default_pid_to_str, target_pid_to_str)
13748 (normal_pid_to_str, default_pid_to_str): Constify.
13749 * target.h (target_ops::to_pid_to_str)
13750 (target_ops::to_extra_thread_info): Constify.
13751 (target_pid_to_str, normal_pid_to_str): Constify.
13752 * windows-nat.c (windows_pid_to_str): Constify.
13753 * gdbarch.sh (core_pid_to_str): Constify.
13754 * target-delegates.c: Regenerate.
13755 * gdbarch.h, gdbarch.c: Regenerate.
13756
13757 2017-04-05 Pedro Alves <palves@redhat.com>
13758
13759 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13760 the memory of the temporary warning_pre_print override.
13761 * utils.c (warning_pre_print): Constify.
13762 * utils.h (warning_pre_print): Constify.
13763
13764 2017-04-05 Pedro Alves <palves@redhat.com>
13765
13766 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13767 (shell_command): New function.
13768 (make_command): Use std::string.
13769 (init_cli_cmds): Register shell_command instead of shell_escape.
13770
13771 2017-04-05 Pedro Alves <palves@redhat.com>
13772
13773 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13774 * tracepoint.c (default_collect): Don't initialize.
13775
13776 2017-04-05 Pedro Alves <palves@redhat.com>
13777
13778 * macroexp.c (macro_buffer::shared): Now a bool.
13779 (init_buffer): Update.
13780 (init_shared_buffer): Constify 'addr' parameter.
13781 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13782 casts.
13783
13784 2017-04-05 Pedro Alves <palves@redhat.com>
13785
13786 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13787 * disasm.c (set_disassembler_options): Constify local.
13788 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13789
13790 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13791
13792 PR gdb/21352
13793 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13794 option.
13795
13796 2017-04-05 Yao Qi <yao.qi@linaro.org>
13797
13798 * frame.c (frame_unwind_register_unsigned): Call
13799 frame_unwind_register_value.
13800
13801 2017-04-05 Yao Qi <yao.qi@linaro.org>
13802
13803 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13804 Use gdb_test_multiple, and don't match anchor.
13805
13806 2017-04-05 Pedro Alves <palves@redhat.com>
13807
13808 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13809 (Write After Approval): Remove Simon Marchi.
13810
13811 2017-04-05 Pedro Alves <palves@redhat.com>
13812
13813 * common/gdb_optional.h (optional::optional): Make constexpr and
13814 initialize m_dummy.
13815
13816 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13817
13818 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13819 (amd64fbsd_jmp_buf_reg_offset): Remove.
13820 (amd64fbsd_supply_uthread): Remove function.
13821 (amd64fbsd_collect_uthread): Remove function.
13822 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13823 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13824 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13825 (fbsd-nat.c): Update comment.
13826 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13827 (i386fbsd_jmp_buf_reg_offset): Remove.
13828 (i386fbsd_supply_uthread): Remove function.
13829 (i386fbsd_collect_uthread): Remove function.
13830 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13831
13832 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13833
13834 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13835 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13836 * NEWS: Mention that support for FreeBSD/alpha was removed.
13837 * alpha-fbsd-tdep.c: Delete file.
13838 * config/alpha/fbsd.mh: Delete file.
13839 * configure.host: Delete alpha*-*-freebsd* and
13840 alpha*-*-kfreebsd*-gnu.
13841 * configure.tgt: Delete alpha*-*-freebsd* and
13842 alpha*-*-kfreebsd*-gnu.
13843
13844 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13845
13846 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13847 amd64bsd_store_inferior_registers): Use ptid from regcache.
13848
13849 2017-04-04 Pedro Alves <palves@redhat.com>
13850
13851 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13852 data fields, make them private and add "m_" prefixes.
13853 (lnp_state_machine::lnp_state_machine): New ctor.
13854 (record_line, check_line_address, handle_set_discriminator)
13855 (handle_set_address, handle_advance_pc, handle_special_opcode)
13856 (handle_advance_line, handle_set_file, handle_negate_stmt)
13857 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13858 (end_sequence, advance_line): New methods.
13859 (m_gdbarch, m_record_lines_p): New fields.
13860 (lnp_reader_state): Delete.
13861 (dwarf_record_line): Rename to ...
13862 (lnp_state_machine::record_line): ... adjust.
13863 (init_lnp_state_machine): Delete.
13864 (lnp_state_machine::lnp_state_machine): New.
13865 (check_line_address): Rename to ...
13866 (lnp_state_machine::check_line_address): This.
13867 (dwarf_decode_lines_1): Remove reference to "reader_state".
13868 Adjust lnp_state_machine having a non-default ctor. Use bool.
13869 State machine internal state manipulation moved to
13870 lnp_state_machine methods.
13871
13872 2017-04-04 Pedro Alves <palves@redhat.com>
13873
13874 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13875 unittests/offset-type-selftests.c.
13876 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13877 * common/offset-type.h: New file.
13878 * common/preprocessor.h: New file.
13879 * common/traits.h: New file.
13880 * common/valid-expr.h: New file.
13881 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13882 sect_offset and cu_offset strong typedefs throughout.
13883 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13884 typedefs throughout.
13885 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13886 sect_offset and cu_offset strong typedefs throughout.
13887 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13888 typedefs throughout.
13889 * gdbtypes.h: Include "common/offset-type.h".
13890 (cu_offset): Now an offset type (strong typedef) instead of a
13891 struct.
13892 (sect_offset): Likewise.
13893 (union call_site_parameter_u): Rename "param_offset" field to
13894 "param_cu_off".
13895 * unittests/offset-type-selftests.c: New file.
13896
13897 2017-04-04 Pedro Alves <palves@redhat.com>
13898
13899 * common/underlying.h: New file.
13900 * dwarf2read.c: Include "common/gdb_optional.h" and
13901 "common/underlying.h".
13902 (dir_index, file_name_index): New types.
13903 (file_entry): Use them.
13904 (file_entry::include): Use to_underlying.
13905 (line_header::add_file_name): Use dir_index.
13906 (read_formatted_entries): Use gdb::optional. Read form before
13907 writting to file_entry.
13908 (dwarf_decode_line_header): Use dir_index.
13909 (lnp_state_machine::current_file): Use to_underlying.
13910 (lnp_state_machine::file): Change type to file_name_index.
13911 (dwarf_record_line): Use to_underlying.
13912 (init_lnp_state_machine): Use file_name_index.
13913 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13914
13915 2017-04-04 Pedro Alves <palves@redhat.com>
13916
13917 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13918 operator bool, has_value and get methods.
13919
13920 2017-04-04 Pedro Alves <palves@redhat.com>
13921
13922 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13923 fields.
13924 (line_header): Initialize all data fields. Change type of
13925 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13926 Change type of include_dirs to std::vector<const char *>. Remove
13927 num_include_dirs, include_dirs_size. Change type of file_names to
13928 std::vector<file_entry>. Remove num_file_names, file_names_size.
13929 (line_header::line_header): New.
13930 (line_header::add_include_dir, line_header::add_file_name): New
13931 methods.
13932 (line_header::include_dir_at): Remove NULL check.
13933 (line_header::file_name_at): Add const overload.
13934 (line_header_up): New unique_ptr typedef.
13935 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13936 std::vector. Remove free_line_header call.
13937 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13938 free_line_header call.
13939 (free_cu_line_header): Delete.
13940 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13941 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13942 Adjust to use std::vector.
13943 (free_line_header): Delete.
13944 (free_line_header_voidp): Use delete.
13945 (add_include_dir): Replace with ...
13946 (line_header::add_include_dir): ... this method. Use std::vector.
13947 (add_file_name): Replace with ...
13948 (line_header::add_file_name): ... this method. Use std::vector.
13949 (add_include_dir_stub): Delete.
13950 (read_formatted_entries): Remove memset.
13951 (dwarf_decode_line_header): Return a line_header_up instead of a
13952 raw pointer. Remove cleanup handling. Pass lambdas to
13953 read_formatted_entries. Adjust to use line_header methods.
13954 (dwarf_decode_lines_1): Adjust to use line_header methods.
13955 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13956 use std::vector.
13957
13958 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13959
13960 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13961 instead of struct ptid.
13962
13963 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13964
13965 * frame.c (get_frame_register_bytes): Unwind using value.
13966 (put_frame_register_bytes): Likewise.
13967
13968 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13969
13970 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13971 aggregate-like.
13972
13973 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13974
13975 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13976
13977 2017-03-29 Yao Qi <yao.qi@linaro.org>
13978
13979 * gdbthread.h (struct thread_info): Declare constructor and
13980 destructor. Add some in-class member initializers.
13981 * thread.c (free_thread): Remove.
13982 (init_thread_list): Call delete instead of free_thread.
13983 (new_thread): Call thread_info constructor.
13984 (thread_info::thread_info): New function.
13985 (thread_info::~thread_info): New function.
13986 (delete_thread_1): Call delete instead of free_thread.
13987 (make_cleanup_restore_current_thread): Move tp and frame to
13988 inner block.
13989
13990 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13991
13992 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13993 (arc_skip_prologue): Likewise.
13994 (arc_make_frame_cache): Likewise.
13995 (arc_pv_get_operand): New function.
13996 (arc_is_in_prologue): Likewise.
13997 (arc_analyze_prologue): Likewise.
13998 (arc_print_frame_cache): Likewise.
13999 (MAX_PROLOGUE_LENGTH): New constant.
14000
14001 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14002
14003 * configure.tgt: Add arc-insn.o.
14004 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14005 (dump_arc_instruction_command): New function.
14006 (arc_fprintf_disasm): Likewise.
14007 (arc_disassemble_info): Likewise.
14008 (arc_insn_get_operand_value): Likewise.
14009 (arc_insn_get_operand_value_signed): Likewise.
14010 (arc_insn_get_memory_base_reg): Likewise.
14011 (arc_insn_get_memory_offset): Likewise.
14012 (arc_insn_get_branch_target): Likewise.
14013 (arc_insn_dump): Likewise.
14014 (arc_insn_get_linear_next_pc): Likewise.
14015 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14016 (arc_disassemble_info): Likewise.
14017 (arc_insn_get_branch_target): Likewise.
14018 (arc_insn_get_linear_next_pc): Likewise.
14019 * NEWS: Mention new "maint print arc arc-instruction".
14020
14021 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14022
14023 * arc-tdep (maintenance_print_arc_list): New variable.
14024 (maintenance_print_arc_command): New function.
14025
14026 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14027
14028 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14029 Add "limm" and "reserved".
14030 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14031 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14032 * arc-tdep.h (arc_regnum): Likewise.
14033
14034 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14035
14036 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14037 for THREADPTR register.
14038 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14039 register.
14040 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14041 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14042 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14043
14044 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14045
14046 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14047 registers above gdbarch_num_regs (gdbarch) as privileged in
14048 call0 ABI.
14049
14050 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14051
14052 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14053 for a single specified register or for all registers in
14054 a0_base..a0_base + C0_NREGS range.
14055 (supply_gregset_reg): Call regcache_raw_supply for a single
14056 specified register or for all registers in a0_base..a0_base +
14057 C0_NREGS range.
14058
14059 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14060
14061 * arch/xtensa.h (C0_NREGS): Add definition.
14062 * xtensa-tdep.c (C0_NREGS): Remove definition.
14063
14064 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14065
14066 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14067 Drop xtensa_default_isa initialization.
14068 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14069
14070 2017-03-27 Pedro Alves <palves@redhat.com>
14071
14072 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14073 (file_entry::include_dir): New method.
14074 (line_header::include_dir_at, line_header::file_name_at): New
14075 methods.
14076 (setup_type_unit_groups, setup_type_unit_groups)
14077 (psymtab_include_file_name): Simplify using the new methods.
14078 (lnp_state_machine) <the_line_header>: New field.
14079 <file>: Add comment.
14080 (lnp_state_machine::current_file): New method.
14081 (dwarf_record_line): Simplify using the new methods.
14082 (init_lnp_state_machine): Initialize the "the_line_header" field.
14083 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14084 Simplify using the new methods.
14085
14086 2017-03-27 Pedro Alves <palves@redhat.com>
14087
14088 * cp-name-parser.y (make_empty): Delete.
14089 (demangler_special, nested_name, ptr_operator, array_indicator)
14090 (direct_declarator, declarator_1): Use fill_comp instead of
14091 make_empty.
14092
14093 2017-03-27 Pedro Alves <palves@redhat.com>
14094
14095 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14096 to ATTRIBUTE_PRINTF.
14097 * solib-target.c (library_list_start_list): Print "string" not
14098 "version".
14099 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14100 gdb_xml_error call.
14101
14102 2017-03-27 Pedro Alves <palves@redhat.com>
14103
14104 * dwarf2read.c (struct file_and_directory): New.
14105 (dwarf2_get_dwz_file): Adjust to use std::string.
14106 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14107 (find_file_and_directory): Adjust to return a file_and_directory
14108 object.
14109 (read_file_scope): Adjust to use file_and_directory. Remove
14110 make_cleanup/do_cleanups calls.
14111 (open_and_init_dwp_file): Adjust to use std::string. Remove
14112 make_cleanup/do_cleanups calls.
14113 * python/python.c (do_start_initialization): Adjust to ldirname
14114 returning a std::string.
14115 * utils.c (ldirname): Now returns a std::string.
14116 * utils.h (ldirname): Change return type to std::string.
14117 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14118 returning a std::string.
14119 * xml-tdesc.c (file_read_description_xml): Likewise.
14120
14121 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14122
14123 * regcache.c (regcache_debug_print_register): New function.
14124 * regcache.h (regcache_debug_print_register): New declaration.
14125 * target.c (debug_print_register): Remove.
14126 (target_fetch_registers): Call regcache_debug_print_register.
14127 (target_store_registers): Likewise.
14128
14129 2017-03-24 Pádraig Brady <pbrady@fb.com>
14130
14131 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14132 reference beyond the 'lh->include_dirs' array before accessing to
14133 it.
14134 (psymtab_include_file_name): Likewise.
14135 (dwarf_decode_lines_1): Likewise.
14136 (dwarf_decode_lines): Likewise.
14137 (file_file_name): Likewise.
14138
14139 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14140
14141 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14142 inferior_ptid.
14143 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14144 ps_lsetfpregs): Likewise.
14145 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14146 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14147 ps_lsetfpregs): Likewise.
14148 * target.c (target_fetch_registers, target_store_registers):
14149 Remove asserts.
14150
14151 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14152
14153 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14154
14155 2017-03-23 Yao Qi <yao.qi@linaro.org>
14156
14157 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14158 (_initialize_aarch64_tdep): Register it.
14159 (aarch64_record_load_store): Handle PRFM instruction.
14160 (aarch64_process_record_test): New function.
14161
14162 2017-03-23 Yao Qi <yao.qi@linaro.org>
14163
14164 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14165 indentation.
14166
14167 2017-03-23 Yao Qi <yao.qi@linaro.org>
14168
14169 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14170
14171 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14172
14173 python/python.c (do_start_initialization): Fix memory leak.
14174
14175 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14176
14177 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14178 using get_ptrace_pid.
14179 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14180 inferior_ptid.
14181 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14182 inferior_ptid instead of pid.
14183
14184 2017-03-22 Yao Qi <yao.qi@linaro.org>
14185
14186 * aarch64-tdep.c: Wrap locally used classes in anonymous
14187 namespace.
14188 * arm-tdep.c: Likewise.
14189 * linespec.c: Likewise.
14190 * ui-out.c: Likewise.
14191
14192 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14193
14194 PR gdb/19637
14195 * python/lib/gdb/printer/bound_registers.py: Import sys.
14196
14197 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14198
14199 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14200 windows_thread_info parameter and use it instead of
14201 current_thread.
14202 (windows_fetch_inferior_registers): Don't set current_thread,
14203 pass the thread to do_windows_fetch_inferior_registers. Use
14204 ptid from regcache instead of inferior_ptid.
14205 (do_windows_store_inferior_registers): Add windows_thread_info
14206 parameter and use it instead of current_thread.
14207 (windows_store_inferior_registers): Don't set current_thread,
14208 pass the thread to do_windows_store_inferior_registers. Use
14209 ptid from regcache instead of inferior_ptid.
14210
14211 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14212
14213 * ser-mingw.c (ser_windows_raw): Remove reference to
14214 struct serial::current_timeout.
14215
14216 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14217
14218 PR tdep/20928
14219 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14220 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14221 (sparc64_fsr_type): Fix %fsr decoding.
14222
14223 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14224
14225 * python/py-record-btrace.c (btpy_insn_data): Change return type
14226 for Python 2.
14227
14228 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14229
14230 * spu-linux-nat.c (spu_fetch_inferior_registers,
14231 spu_store_inferior_registers): Use ptid from regcache, set and
14232 restore inferior_ptid.
14233 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14234 Likewise.
14235
14236 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14237
14238 * i386-linux-nat.c (fetch_register, store_register,
14239 i386_linux_fetch_inferior_registers,
14240 i386_linux_store_inferior_registers): Use ptid from regcache.
14241 * ia64-linux-nat.c (ia64_linux_fetch_register,
14242 ia64_linux_store_register): Likewise.
14243 * inf-ptrace.c (inf_ptrace_fetch_register,
14244 inf_ptrace_store_register): Likewise.
14245 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14246 m32r_linux_store_inferior_registers): Likewise.
14247 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14248 m68kbsd_store_inferior_registers): Likewise.
14249 * m68k-linux-nat.c (fetch_register, store_register,
14250 m68k_linux_fetch_inferior_registers,
14251 m68k_linux_store_inferior_registers): Likewise.
14252 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14253 m88kbsd_store_inferior_registers): Likewise.
14254 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14255 mips_fbsd_store_inferior_registers): Likewise.
14256 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14257 mips64_linux_regsets_store_registers): Likewise.
14258 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14259 mipsnbsd_store_inferior_registers): Likewise.
14260 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14261 mips64obsd_store_inferior_registers): Likewise.
14262 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14263 Likewise.
14264 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14265 ppcfbsd_store_inferior_registers): Likewise.
14266 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14267 ppc_linux_store_inferior_registers): Likewise.
14268 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14269 ppcnbsd_store_inferior_registers): Likewise.
14270 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14271 ppcobsd_store_registers): Likewise.
14272 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14273 Likewise.
14274 * ravenscar-thread.c (ravenscar_fetch_registers,
14275 ravenscar_store_registers, ravenscar_prepare_to_store):
14276 Likewise.
14277 * record-btrace.c (record_btrace_fetch_registers,
14278 record_btrace_store_registers, record_btrace_prepare_to_store):
14279 Likewise.
14280 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14281 Lookup inferior using ptid from regcache, instead of
14282 current_inferior.
14283 * remote.c (remote_fetch_registers, remote_store_registers): Use
14284 ptid from regcache.
14285 * rs6000-nat.c (fetch_register, store_register): Likewise.
14286 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14287 s390_linux_store_inferior_registers): Likewise.
14288 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14289 shnbsd_store_inferior_registers): Likewise.
14290 * sol-thread.c (sol_thread_fetch_registers,
14291 sol_thread_store_registers): Likewise.
14292 * sparc-nat.c (sparc_fetch_inferior_registers,
14293 sparc_store_inferior_registers): Likewise.
14294 * tilegx-linux-nat.c (fetch_inferior_registers,
14295 store_inferior_registers): Likewise.
14296 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14297 vaxbsd_store_inferior_registers): Likewise.
14298 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14299 store_xtregs): Likewise.
14300
14301 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14302
14303 PR gdb/14441
14304 * NEWS: Mention support for rvalue references in GDB and python.
14305 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14306 supports both lvalue and rvalue references.
14307
14308 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14309
14310 PR gdb/14441
14311 * gdbtypes.c (rank_one_type): Implement overloading
14312 resolution rules regarding rvalue references.
14313
14314 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14315
14316 PR gdb/14441
14317 * aarch64-tdep.c (aarch64_type_align)
14318 (aarch64_extract_return_value, aarch64_store_return_value): Change
14319 lvalue reference type checks to general reference type checks.
14320 * amd64-tdep.c (amd64_classify): Likewise.
14321 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14322 Likewise.
14323 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14324 (arm_store_return_value): Likewise.
14325 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14326 * c-typeprint.c (c_print_type): Likewise.
14327 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14328 (cplus_number_of_children, cplus_describe_child): Likewise.
14329 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14330 * completer.c (expression_completer): Likewise.
14331 * cp-support.c (make_symbol_overload_list_adl_namespace):
14332 Likewise.
14333 * darwin-nat-info.c (info_mach_region_command): Likewise.
14334 * dwarf2loc.c (entry_data_value_coerce_ref)
14335 (value_of_dwarf_reg_entry): Likewise.
14336 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14337 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14338 Likewise.
14339 * findvar.c (extract_typed_address, store_typed_address):
14340 Likewise.
14341 * gdbtypes.c (rank_one_type): Likewise.
14342 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14343 * infcall.c (value_arg_coerce): Likewise.
14344 * language.c (pointer_type): Likewise.
14345 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14346 Likewise.
14347 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14348 * mn10300-tdep.c (mn10300_type_align): Likewise.
14349 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14350 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14351 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14352 Likewise.
14353 * printcmd.c (print_formatted, x_command): Likewise.
14354 * python/py-type.c (typy_get_composite, typy_template_argument):
14355 Likewise.
14356 * python/py-value.c (valpy_referenced_value)
14357 (valpy_get_dynamic_type, value_has_field): Likewise.
14358 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14359 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14360 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14361 * spu-tdep.c (spu_scalar_value_p): Likewise.
14362 * symtab.c (lookup_symbol_aux): Likewise.
14363 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14364 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14365 Likewise.
14366 * valops.c (value_cast_pointers, value_cast)
14367 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14368 (value_struct_elt, value_struct_elt_bitpos)
14369 (value_find_oload_method_list, find_overload_match)
14370 (value_rtti_indirect_type): Likewise.
14371 * valprint.c (val_print_scalar_type_p, generic_val_print):
14372 Likewise.
14373 * value.c (value_actual_type, value_as_address, unpack_long)
14374 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14375 (coerce_ref): Likewise.
14376 * varobj.c (varobj_get_value_type): Likewise.
14377
14378 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14379
14380 PR gdb/14441
14381 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14382 table of constants.
14383 * python/lib/gdb/command/explore.py: Support exploring values
14384 of rvalue reference types.
14385 * python/lib/gdb/types.py: Implement get_basic_type() for
14386 rvalue reference types.
14387 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14388 constant.
14389 * python/py-value.c (valpy_getitem): Add an rvalue reference
14390 check.
14391 (valpy_reference_value): Add new parameter "refcode".
14392 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14393 New wrappers for valpy_reference_value().
14394 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14395 (gdbpy_invoke_xmethod): Likewise.
14396
14397 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14398
14399 PR gdb/14441
14400 * dwarf2read.c (process_die, read_type_die_1): Handle the
14401 DW_TAG_rvalue_reference_type DIE.
14402 (read_tag_reference_type): Add new parameter "refcode".
14403
14404 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14405
14406 PR gdb/14441
14407 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14408 (c_type_print_modifier, c_type_print_varspec_suffix)
14409 (c_type_print_base): Support printing rvalue reference types.
14410 * c-valprint.c (c_val_print, c_value_print): Support printing
14411 rvalue reference values.
14412
14413 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14414
14415 PR gdb/14441
14416 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14417 typename.
14418 * cp-support.c (replace_typedefs): Handle
14419 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14420 * python/py-type.c (typy_lookup_type): Likewise.
14421
14422 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14423
14424 PR gdb/14441
14425 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14426 * parse.c (insert_type): Change assert statement.
14427 (follow_types): Handle rvalue reference types.
14428 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14429 constant.
14430
14431 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14432
14433 PR gdb/14441
14434 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14435 value_ref() interface.
14436 * c-valprint.c (c_value_print): Likewise.
14437 * infcall.c (value_arg_coerce): Likewise.
14438 * python/py-value.c (valpy_reference_value): Likewise.
14439 * valops.c (value_cast, value_reinterpret_cast)
14440 (value_dynamic_cast, typecmp): Likewise.
14441 (value_ref): Parameterize by kind of return value reference type.
14442 * value.h (value_ref): Add new parameter "refcode".
14443
14444 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14445
14446 PR gdb/14441
14447 * dwarf2read.c (read_tag_reference_type): Use
14448 lookup_lvalue_reference_type() instead of lookup_reference_type().
14449 * eval.c (evaluate_subexp_standard): Likewise.
14450 * f-exp.y: Likewise.
14451 * gdbtypes.c (make_reference_type, lookup_reference_type):
14452 Generalize with rvalue reference types.
14453 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14454 convenience wrappers for lookup_reference_type().
14455 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14456 reference kind parameter.
14457 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14458 wrappers for lookup_reference_type().
14459 * guile/scm-type.c (gdbscm_type_reference): Use
14460 lookup_lvalue_reference_type() instead of lookup_reference_type().
14461 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14462 * parse.c (follow_types): Likewise.
14463 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14464 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14465 Likewise.
14466 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14467 (gdbpy_invoke_xmethod): Likewise.
14468 * stabsread.c: Provide extra argument to make_reference_type()
14469 call.
14470 * valops.c (value_ref, value_rtti_indirect_type): Use
14471 lookup_lvalue_reference_type() instead of lookup_reference_type().
14472
14473 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14474
14475 PR gdb/14441
14476 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14477 (TYPE_IS_REFERENCE): New macro.
14478 (struct type): Add rvalue_reference_type field.
14479 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14480
14481 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14482
14483 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14484 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14485 New function definition.
14486 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14487 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14488 New function declaration.
14489 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14490 * mi/mi-interp.h: New file.
14491 * solib.c (info_sharedlibrary_command): Replace for loop with
14492 ALL_SO_LIBS macro
14493 * solib.h (update_solib_list): New function declaration.
14494 (so_list_head): Move macro.
14495 * solist.h (ALL_SO_LIBS): New macro.
14496
14497 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14498
14499 * infcmd.c (post_create_inferior): Remove unused argument in
14500 call to solib_add.
14501 * remote.c (remote_start_remote): Likewise.
14502 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14503 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14504 (enable_break): Likewise.
14505 * solib.c (update_solib_list): Remove unused target argument
14506 and its documentation.
14507 (solib_add): Remove unused target argument. Remove unused
14508 argument in call to update_solib_list.
14509 (info_sharedlibrary_command): Remove unused argument in call
14510 to update_solib_list.
14511 (sharedlibrary_command): Remove unused argument in call to
14512 solib_add.
14513 (handle_solib_event): Likewise.
14514 (reload_shared_libraries): Likewise.
14515 * solib.h (solib_add): Remove unused target argument.
14516
14517 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14518
14519 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14520 (s390_displaced_step_fixup): Cover relative branches with the
14521 default fixup handling. This fixes lack of support for some
14522 relative branch instructions.
14523
14524 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14525
14526 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14527 ptid from regcache.
14528
14529 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14530
14531 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14532 i386_darwin_store_inferior_registers): Use ptid from regcache.
14533
14534 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14535
14536 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14537 i386bsd_store_inferior_registers): Use ptid from regcache.
14538
14539 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14540
14541 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14542 hppaobsd_store_registers): Use ptid from regcache.
14543
14544 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14545
14546 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14547 hppanbsd_store_registers): Use ptid from regcache.
14548
14549 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14550
14551 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14552 from regcache. Use get_ptrace_pid.
14553
14554 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14555
14556 * corelow.c (get_core_register_section): Use ptid from regcache,
14557 update doc.
14558
14559 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14560
14561 * bsd-uthread.c (bsd_uthread_fetch_registers,
14562 bsd_uthread_store_registers): Use ptid from regcache, set and
14563 restore inferior_ptid.
14564
14565 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14566
14567 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14568 fetch_fp_regs, store_register, store_regs, store_fp_register,
14569 store_fp_regs): Use ptid from regcache.
14570
14571 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14572
14573 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14574 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14575 store_vfp_regs): Use ptid from regcache.
14576
14577 2017-03-17 Pedro Alves <palves@redhat.com>
14578
14579 PR remote/21188
14580 * ser-base.c (ser_base_wait_for): Add comment.
14581 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14582 version.
14583 * ser-unix.c (hardwire_raw): Remove reference to
14584 scb->current_timeout.
14585 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14586 (hardwire_ops): Install ser_base_readchar instead of
14587 hardwire_readchar.
14588 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14589 Remove fields.
14590
14591 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14592
14593 PR gdb/19637
14594 * python/lib/gdb/printer/bound_registers.py: Add support for
14595 Python 3.
14596
14597 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14598
14599 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14600 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14601 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14602 byte_offset to subobj_byte_offset. Fix the handling of
14603 DWARF_VALUE_STACK on big-endian targets when coming via an
14604 implicit pointer.
14605 (dwarf2_evaluate_loc_desc): Adjust call to
14606 dwarf2_evaluate_loc_desc_full.
14607 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14608 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14609
14610 2017-03-16 Yao Qi <yao.qi@linaro.org>
14611
14612 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14613 and REVSH instructions.
14614
14615 2017-03-16 Yao Qi <yao.qi@linaro.org>
14616
14617 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14618 (arm_record_test): Declare.
14619 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14620 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14621 align with the manual.
14622 (thumb_record_misc): Adjust the code order to align with the
14623 manual.
14624 (thumb2_record_decode_insn_handler): Fix instruction matching.
14625 (instruction_reader_thumb): New class.
14626 (arm_record_test): New function.
14627
14628 2017-03-16 Yao Qi <yao.qi@linaro.org>
14629
14630 * arm-tdep.c (abstract_memory_reader): New class.
14631 (instruction_reader): New class.
14632 (extract_arm_insn): Add argument 'reader'. Callers updated.
14633 (decode_insn): Likewise.
14634
14635 2017-03-16 Doug Evans <dje@google.com>
14636
14637 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14638 member. Change type of TYPE member to SCM. All uses updated.
14639 (lsscm_make_lazy_string_smob): Add assert.
14640 (lsscm_make_lazy_string): Flag bad length values.
14641 (lsscm_elt_type): New function.
14642 (gdbscm_lazy_string_to_value): Rewrite to use
14643 lsscm_safe_lazy_string_to_value.
14644 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14645 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14646 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14647 in incoming type.
14648 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14649 * guile/scm-type.c (tyscm_scm_to_type): New function.
14650
14651 2017-03-15 Doug Evans <dje@google.com>
14652
14653 PR python/17728, python/18439, python/18779
14654 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14655 member. Change type of TYPE member to PyObject *. All uses updated.
14656 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14657 (gdbpy_create_lazy_string_object): Flag bad length values.
14658 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14659 Handle typedefs in incoming type.
14660 (stpy_lazy_string_elt_type): New function.
14661 (gdbpy_extract_lazy_string): Call it.
14662 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14663 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14664 typedefs in incoming type.
14665
14666 2017-03-16 Doug Evans <dje@google.com>
14667
14668 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14669 * guile/scm-type.c (tyscm_scm_to_type): New function.
14670
14671 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14672
14673 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14674 "ULONGEST" for "skip".
14675
14676 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14677
14678 PR gdb/21220
14679 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14680 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14681 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14682 over ptrace peek/poke until end of buffer or error.
14683
14684 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14685
14686 * parse.c (length_of_subexp): Make static.
14687 * parser-defs.h (length_of_subexp): Remove.
14688
14689 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14690
14691 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14692 as well.
14693
14694 2017-03-14 Pedro Alves <palves@redhat.com>
14695
14696 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14697 (main): Use std::unique_ptr. Remove calls to
14698 cp_demangled_name_parse_free.
14699
14700 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14701
14702 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14703 alphabsd_store_inferior_registers): Use regcache->ptid instead
14704 of inferior_ptid.
14705
14706 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14707
14708 * aix-thread.c (aix_thread_fetch_registers,
14709 aix_thread_store_registers): Use regcache->ptid instead of
14710 inferior_ptid.
14711
14712 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14713
14714 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14715 store_gregs_to_thread, fetch_fpregs_from_thread,
14716 store_fpregs_to_thread): Use regcache->ptid instead of
14717 inferior_ptid.
14718
14719 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14720
14721 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14722 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14723 instead of inferior_ptid.
14724
14725 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14726
14727 * target.c (target_fetch_registers, target_store_registers): Add
14728 assert.
14729
14730 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14731
14732 * regcache.h (regcache_get_ptid): New function.
14733 * regcache.c (regcache_get_ptid): New function.
14734
14735 2017-03-13 Mark Wielaard <mark@klomp.org>
14736
14737 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14738
14739 2017-03-10 Keith Seitz <keiths@redhat.com>
14740
14741 PR c++/8218
14742 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14743
14744 2017-03-08 Pedro Alves <palves@redhat.com>
14745
14746 PR gdb/18360
14747 * infrun.c (start_step_over, do_target_resume, resume)
14748 (restart_threads): Assert we're not resuming a thread that is
14749 meant to be stopped.
14750 (infrun_thread_stop_requested_callback): Delete.
14751 (infrun_thread_stop_requested): If the thread is internally
14752 stopped, queue a pending stop event and clear the thread's
14753 inline-frame state.
14754 (handle_stop_requested): New function.
14755 (handle_syscall_event, handle_inferior_event_1): Use
14756 handle_stop_requested.
14757 (handle_stop_requested): New function.
14758 (handle_signal_stop): Set the thread's stop_signal here instead of
14759 at caller.
14760 (finish_step_over): Clear step over info unconditionally.
14761 (handle_signal_stop): If the user had interrupted the event
14762 thread, consider the stop a random signal.
14763 (handle_signal_stop) <signal arrived while stepping over
14764 breakpoint>: Don't restart threads here.
14765 (stop_waiting): Don't clear step-over info here.
14766
14767 2017-03-08 Pedro Alves <palves@redhat.com>
14768
14769 PR 21206
14770 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14771 goes to argument 2, not 1.
14772
14773 2017-03-08 Pedro Alves <palves@redhat.com>
14774
14775 PR cli/21218
14776 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14777 display_gdb_prompt.
14778 (command_line_input): Add comment.
14779
14780 2017-03-08 Pedro Alves <palves@redhat.com>
14781
14782 PR tui/21216
14783 * tui/tui-file.c (tui_file::write): New.
14784 * tui/tui-file.h (tui_file): Override "write".
14785 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14786 factored out from ...
14787 (tui_puts): ... here.
14788 (tui_putc): Use them.
14789 (tui_write): New function.
14790 * tui/tui-io.h (tui_write): Declare.
14791
14792 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14793
14794 * Makefile.in (SFILES): Replace "environ.c" with
14795 "common/environ.c".
14796 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14797 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14798 to...
14799 * common/environ.c: ... here.
14800 * environ.h: Moved to...
14801 * common/environ.h: ... here.
14802
14803 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14804
14805 * gdbarch.sh (pstring_ptr): New static function.
14806 (gdbarch_disassembler_options): Use it.
14807 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14808 not valid_disassembler_option->name.
14809 * gdbarch.c: Regenerate.
14810
14811 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14812
14813 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14814
14815 2017-03-07 Pedro Alves <palves@redhat.com>
14816
14817 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14818
14819 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14820
14821 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14822 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14823 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14824 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14825
14826 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14827
14828 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14829
14830 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14831
14832 * remote.c (remote_add_target_side_commands): Use range-based
14833 for loop.
14834
14835 2017-03-03 Yao Qi <yao.qi@linaro.org>
14836
14837 PR gdb/21165
14838 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14839 value is lazy.
14840 * valprint.c (common_val_print): Likewise.
14841
14842 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14843
14844 * NEWS: Mention new set/show disassembler-options commands.
14845 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14846 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14847 (prospective_options): New static variable.
14848 (gdb_disassembler::gdb_disassembler): Initialize
14849 m_di.disassembler_options.
14850 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14851 (get_disassembler_options): New function.
14852 (set_disassembler_options): Likewise.
14853 (set_disassembler_options_sfunc): Likewise.
14854 (show_disassembler_options_sfunc): Likewise.
14855 (disassembler_options_completer): Likewise.
14856 (_initialize_disasm): Likewise.
14857 * disasm.h (get_disassembler_options): New prototype.
14858 (set_disassembler_options): Likewise.
14859 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14860 (gdbarch_verify_disassembler_options): Likewise.
14861 * gdbarch.c: Regenerate.
14862 * gdbarch.h: Likewise.
14863 * arm-tdep.c (num_disassembly_options): Delete.
14864 (set_disassembly_style): Likewise.
14865 (arm_disassembler_options): New static variable.
14866 (set_disassembly_style_sfunc): Convert short style name into long
14867 option name. Call set_disassembler_options.
14868 (show_disassembly_style_sfunc): New function.
14869 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14870 set_gdbarch_verify_disassembler_options.
14871 (_initialize_arm_tdep): Delete regnames variable and update callers.
14872 (arm_disassembler_options): Initialize.
14873 (disasm_options): New variable.
14874 (num_disassembly_options): Rename from this...
14875 (num_disassembly_styles): ...to this. Compute by scanning through
14876 disasm_options.
14877 (valid_disassembly_styles): Initialize using disasm_options.
14878 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14879 set_arm_regname_option.
14880 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14881 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14882 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14883 set_gdbarch_verify_disassembler_options.
14884 * s390-tdep.c (s390_disassembler_options): New static variable.
14885 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14886 set_gdbarch_verify_disassembler_options.
14887
14888 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14889
14890 * remote.c (remote_add_target_side_condition): Remove "struct"
14891 keyword from range-based for loop.
14892
14893 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14894
14895 * remote.c (remote_add_target_side_condition): Use range-based
14896 for loop. Update comment.
14897
14898 2017-02-27 Yao Qi <yao.qi@linaro.org>
14899
14900 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14901
14902 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14903
14904 * regcache.c (regcache_raw_update): New function.
14905 (regcache_raw_read): Move code to regcache_raw_update.
14906 * regcache.h (regcache_raw_update): New declaration.
14907 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14908
14909 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14910
14911 * dwarf2read.c (create_debug_type_hash_table): Initialize
14912 header.signature and header.type_offset_in_tu.
14913
14914 2017-02-24 Pedro Alves <palves@redhat.com>
14915
14916 * symtab.c (make_file_symbol_completion_list_1): Use
14917 add_symtab_completions.
14918
14919 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14920
14921 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14922
14923 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14924
14925 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14926 I386_MAX_REGISTER_SIZE.
14927 (i386_pseudo_register_write): Likewise.
14928 (i386_process_record): Likewise.
14929 * i387-tdep.c (i387_supply_xsave): Likewise.
14930 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14931 (store_register): Likewise.
14932
14933 2017-02-23 Pedro Alves <palves@redhat.com>
14934
14935 * ada-lang.c: Include "common/function-view.h".
14936 (ada_iterate_over_symbols): Adjust to use function_view as
14937 callback type.
14938 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14939 (ada_make_symbol_completion_list): Use a lambda.
14940 (ada_exc_search_name_matches): Delete.
14941 (name_matches_regex): New.
14942 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14943 * compile/compile-c-support.c: Include "common/function-view.h".
14944 (print_one_macro): Change prototype to accept a ui_file pointer.
14945 (write_macro_definitions): Use a lambda.
14946 * dwarf2read.c: Include "common/function-view.h".
14947 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14948 (dw2_expand_symtabs_matching): Adjust to use function_view as
14949 callback type.
14950 * language.h: Include "common/function-view.h".
14951 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14952 function_view as callback type.
14953 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14954 * linespec.c: Include "common/function-view.h".
14955 (collect_info::add_symbol): New method.
14956 (struct symbol_and_data_callback, iterate_inline_only, struct
14957 symbol_matcher_data, iterate_name_matcher): Delete.
14958 (iterate_over_all_matching_symtabs): Adjust to use function_view
14959 as callback type and lambdas.
14960 (iterate_over_file_blocks): Adjust to use function_view as
14961 callback type.
14962 (decode_compound_collector): Now a class with private fields.
14963 (decode_compound_collector::release_symbols): New method.
14964 (collect_one_symbol): Rename to...
14965 (decode_compound_collector::operator()): ... this and adjust.
14966 (lookup_prefix_sym): decode_compound_collector construction bits
14967 move to decode_compound_collector ctor. Pass the
14968 decode_compound_collector object directly as callback. Remove
14969 cleanups and use decode_compound_collector::release_symbols
14970 instead.
14971 (symtab_collector): Now a class with private fields.
14972 (symtab_collector::release_symtabs): New method.
14973 (add_symtabs_to_list): Rename to...
14974 (symtab_collector::operator()): ... this and adjust.
14975 (collect_symtabs_from_filename): symtab_collector construction
14976 bits move to symtab_collector ctor. Pass the symtab_collector
14977 object directly as callback. Remove cleanups and use
14978 symtab_collector::release_symtabs instead.
14979 (collect_symbols): Delete.
14980 (add_matching_symbols_to_info): Use lambdas.
14981 * macrocmd.c (print_macro_callback): Delete.
14982 (info_macro_command): Use a lambda.
14983 (info_macros_command): Pass print_macro_definition as callable
14984 directly.
14985 (print_one_macro): Remove 'ignore' parameter.
14986 (macro_list_command): Adjust.
14987 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14988 (macro_for_each_data::user_data): Delete field.
14989 (foreach_macro): Adjust to call the function_view.
14990 (macro_for_each): Adjust to use function_view as callback type.
14991 (foreach_macro_in_scope): Adjust to call the function_view.
14992 (macro_for_each_in_scope): Adjust to use function_view as callback
14993 type.
14994 * macrotab.h: Include "common/function-view.h".
14995 (macro_callback_fn): Declare a prototype instead of a pointer.
14996 Remove "user_data" parameter.
14997 (macro_for_each, macro_for_each_in_scope): Adjust to use
14998 function_view as callback type.
14999 * psymtab.c (partial_map_expand_apply)
15000 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15001 Adjust to use function_view as callback type and to return bool.
15002 (psym_expand_symtabs_matching): Adjust to use function_view as
15003 callback types.
15004 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15005 to use function_view as callback type and to return bool.
15006 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15007 callback types.
15008 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15009 as callback types.
15010 * symfile.h: Include "common/function-view.h".
15011 (expand_symtabs_file_matcher_ftype)
15012 (expand_symtabs_symbol_matcher_ftype)
15013 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15014 return bool.
15015 (quick_symbol_functions::map_symtabs_matching_filename)
15016 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15017 function_view as callback type and return bool.
15018 (expand_symtabs_matching): Adjust to use function_view as callback
15019 type.
15020 (maintenance_expand_name_matcher)
15021 (maintenance_expand_file_matcher): Delete.
15022 (maintenance_expand_symtabs): Use lambdas.
15023 * symtab.c (iterate_over_some_symtabs): Adjust to use
15024 function_view as callback types and return bool.
15025 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15026 of a cleanup.
15027 (lookup_symtab_callback): Delete.
15028 (lookup_symtab): Use a lambda.
15029 (iterate_over_symbols): Adjust to use function_view as callback
15030 type.
15031 (struct search_symbols_data, search_symbols_file_matches)
15032 (search_symbols_name_matches): Delete.
15033 (search_symbols): Use a pair of lambdas.
15034 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15035 (symtab_expansion_callback): Delete.
15036 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15037 * symtab.h: Include "common/function-view.h".
15038 (iterate_over_some_symtabs): Adjust to use function_view as
15039 callback type and return bool.
15040 (iterate_over_symtabs): Adjust to use function_view as callback
15041 type.
15042 (symbol_found_callback_ftype): Remove 'data' parameter and return
15043 bool.
15044 (iterate_over_symbols): Adjust to use function_view as callback
15045 type.
15046
15047 2017-02-23 Pedro Alves <palves@redhat.com>
15048
15049 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15050 (%.o) <unittests/%.c>: New pattern.
15051 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15052 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15053 * common/function-view.h: New file.
15054 * unittests/function-view-selftests.c: New file.
15055 * configure: Regenerate.
15056
15057 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15058
15059 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15060 inferior_ptid.
15061 * go32-nat.c (go32_thread_alive): Likewise.
15062
15063 2017-02-23 Yao Qi <yao.qi@linaro.org>
15064
15065 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15066 delete.
15067
15068 2017-02-23 Yao Qi <yao.qi@linaro.org>
15069
15070 * varobj.c (varobj_clear_saved_item): Use delete instead of
15071 xfree.
15072 (update_dynamic_varobj_children): Likewise.
15073
15074 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15075
15076 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15077
15078 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15079
15080 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15081 m_enum_value to 0 in default constructor.
15082
15083 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15084
15085 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15086 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15087 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15088 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15089 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15090 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15091 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15092 IS_STORE_CONDITIONAL_INSN.
15093
15094 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15095
15096 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15097
15098 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15099
15100 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15101
15102 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15103
15104 * dwarf2read.c (skip_one_die, read_attribute_value)
15105 (dwarf2_const_value_attr, dump_die_shallow)
15106 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15107 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15108
15109 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15110
15111 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15112 (dwarf_parse_macro_header): Accept DWARF version 5.
15113 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15114
15115 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15116
15117 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15118 DW_AT_GNU_*.
15119 * common/common-exceptions.h (enum errors): Likewise.
15120 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15121 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15122 (dwarf_expr_context::execute_stack_op): Likewise.
15123 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15124 Likewise.
15125 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15126 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15127 (show_entry_values_debug, call_site_to_target_addr)
15128 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15129 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15130 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15131 (value_of_dwarf_block_entry, indirect_pieced_value)
15132 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15133 (disassemble_dwarf_expression): Likewise.
15134 * dwarf2read.c (process_die, inherit_abstract_dies)
15135 (read_call_site_scope): Likewise.
15136 * gdbtypes.h (struct func_type, struct call_site_parameter)
15137 (struct call_site): Likewise.
15138 * stack.c (read_frame_arg): Likewise.
15139 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15140
15141 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15142
15143 * defs.h (read_unsigned_leb128): New declaration.
15144 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15145 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15146 (dwarf2_find_location_expression): Call also
15147 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15148 * dwarf2loc.h (dwarf2_version): New declaration.
15149 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15150 rnglists.
15151 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15152 .debug_rnglists.
15153 (struct dwop_section_names): Add loclists_dwo.
15154 (dwop_section_names): Add .debug_loclists.dwo.
15155 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15156 (struct dwarf2_per_cu_data): Add dwarf_version.
15157 (struct dwo_sections): Add loclists.
15158 (struct attr_abbrev): Add implicit_const.
15159 (read_indirect_line_string): New declaration.
15160 (read_unsigned_leb128): Delete declaration.
15161 (rcuh_kind): New definition.
15162 (read_and_check_comp_unit_head): Change parameter
15163 is_debug_types_section to section_kind.
15164 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15165 (read_comp_unit_head): Change parameter abfd to section, add parameter
15166 section_kind. Handle DWARF-5.
15167 (error_check_comp_unit_head): Accept also DWARF version 5.
15168 (read_and_check_comp_unit_head): Change parameter
15169 is_debug_types_section to section_kind.
15170 (read_and_check_type_unit_head): Delete function.
15171 (read_abbrev_offset): Handle DWARF-5.
15172 (create_debug_type_hash_table): Add parameter section_kind. Process
15173 only DW_UT_type. Use signature and type_offset_in_tu from struct
15174 comp_unit_head.
15175 (create_debug_types_hash_table): Update create_debug_type_hash_table
15176 caller.
15177 (create_all_type_units): Call create_debug_type_hash_table.
15178 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15179 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15180 caller.
15181 (skip_one_die): Handle DW_FORM_implicit_const.
15182 (dwarf2_rnglists_process): New function.
15183 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15184 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15185 (read_attribute_value): Handle DW_FORM_implicit_const,
15186 DW_FORM_line_strp.
15187 (read_attribute): Handle DW_FORM_implicit_const.
15188 (read_indirect_string_at_offset_from): New function from
15189 read_indirect_string_at_offset.
15190 (read_indirect_string_at_offset): Call
15191 read_indirect_string_at_offset_from.
15192 (read_indirect_line_string_at_offset): New function.
15193 (read_indirect_string): New function comment.
15194 (read_indirect_line_string): New function.
15195 (read_unsigned_leb128): Make it global.
15196 (dwarf2_string_attr): Handle DWARF-5.
15197 (add_include_dir_stub, read_formatted_entries): New functions.
15198 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15199 Handle DWARF-5.
15200 (per_cu_header_read_in): Update read_comp_unit_head caller.
15201 (dwarf2_version): New function.
15202 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15203 rnglists.
15204 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15205 fields.
15206
15207 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15208
15209 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15210
15211 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15212
15213 * dwarf2read.c (dwarf2_ranges_process): New function from
15214 dwarf2_ranges_read.
15215 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15216 dwarf2_ranges_process.
15217
15218 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15219
15220 * dwarf2read.c (create_debug_type_hash_table): New function from
15221 create_debug_types_hash_table.
15222 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15223 (create_all_type_units, open_and_init_dwo_file): Update
15224 create_debug_types_hash_table callers.
15225
15226 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15227
15228 PR gdb/16188
15229 * fork-child.c (trace_start_error): Fix thinko. va_end should
15230 refer to 'ap', not 'args'.
15231
15232 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15233 Pedro Alves <palves@redhat.com>
15234
15235 PR gdb/16188
15236 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15237 calls succeeded.
15238 * fork-child.c (trace_start_error): New function.
15239 (trace_start_error_with_name): Likewise.
15240 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15241 * inf-ptrace.c (inf_ptrace_me): Likewise.
15242 * inferior.h (trace_start_error): New prototype.
15243 (trace_start_error_with_name): Likewise.
15244
15245 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15246
15247 PR gdb/21164
15248 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15249 NULL before using it.
15250 * symmisc.c (maintenance_print_symbols): Likewise.
15251 (maintenance_print_msymbols): Likewise.
15252
15253 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15254
15255 * NEWS: Add record Python bindings entry.
15256
15257 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15258
15259 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15260 py-record-full.o.
15261 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15262 * python/py-record-btrace.c, python/py-record-btrace.h,
15263 python/py-record-full.c, python/py-record-full.h: New file.
15264 * python/py-record.c: Add include for py-record-btrace.h and
15265 py-record-full.h.
15266 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15267 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15268 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15269 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15270 New definition.
15271 (gdbpy_initialize_btrace): New export.
15272 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15273
15274 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15275
15276 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15277 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15278 * python/py-record.c: New file.
15279 * python/python-internal.h (gdbpy_start_recording,
15280 gdbpy_current_recording, gdpy_stop_recording,
15281 gdbpy_initialize_record): New export.
15282 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15283 (python_GdbMethods): Add gdbpy_start_recording,
15284 gdbpy_current_recording and gdbpy_stop_recording.
15285
15286 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15287
15288 * record-btrace.c (record_btrace_record_method): New function.
15289 (init_record_btrace_ops): Initialize to_record_method.
15290 * record-full.c (record_full_record_method): New function.
15291 (init_record_full_ops, init_record_full_core_ops): Add
15292 record_full_record_method.
15293 * record.h (enum record_method): New enum.
15294 * target-debug.h (target_debug_print_enum_record_method: New define.
15295 * target-delegates.c: Regenerate.
15296 * target.c (target_record_method): New function.
15297 * target.h: Include record.h.
15298 (struct target_ops) <to_record_method>: New field.
15299 (target_record_method): New export.
15300
15301 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15302
15303 * record.h (record_start, record_stop): New export.
15304 * record.c (record_start, record_stop): New function.
15305
15306 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15307
15308 * btrace.c (btrace_fetch): Copy function call segments pointer
15309 into a vector.
15310 (btrace_clear): Clear the vector.
15311 (btrace_find_insn_by_number): Use binary search to find the correct
15312 function call segment.
15313 * btrace.h (brace_fun_p): New typedef.
15314 (struct btrace_thread_info) <functions>: New field.
15315
15316 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15317
15318 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15319 * btrace.c (btrace_decode_error): ... here. New function.
15320 * btrace.h (btrace_decode_error): New export.
15321
15322 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15323
15324 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15325 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15326 btrace_find_insn_by_number): Remove special case for gaps.
15327 * btrace.h (btrace_insn_get_error): New export.
15328 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15329 * record-btrace.c (btrace_insn_history): Print number for gaps.
15330 (record_btrace_info, record_btrace_goto): Handle gaps.
15331
15332 2017-02-14 Tom Tromey <tom@tromey.com>
15333
15334 PR python/13598:
15335 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15336 event.
15337 * python/py-evts.c (gdbpy_initialize_py_events): Add
15338 before_prompt registry.
15339 * python/py-events.h (events_object) <before_prompt>: New field.
15340
15341 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15342
15343 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15344
15345 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15346
15347 * symfile (_initialize_symfile): Add usage text to the load command's
15348 help text.
15349
15350 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15351
15352 * utils.c (defaulted_query): Don't query on secondary UIs.
15353
15354 2017-02-10 Tom Tromey <tom@tromey.com>
15355
15356 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15357
15358 2017-02-10 Tom Tromey <tom@tromey.com>
15359
15360 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15361 "cleanup" local.
15362 * python/py-type.c (typy_legacy_template_argument): Remove
15363 unnecessary "cleanup" local.
15364
15365 2017-02-10 Tom Tromey <tom@tromey.com>
15366
15367 * python/python.c (do_start_initialization): New function, from
15368 _initialize_python.
15369 (_initialize_python): Call do_start_initialization.
15370 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15371 goto.
15372
15373 2017-02-10 Tom Tromey <tom@tromey.com>
15374
15375 * python/py-prettyprint.c (pretty_print_one_value): Use
15376 gdbpy_ref.
15377
15378 2017-02-10 Tom Tromey <tom@tromey.com>
15379
15380 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15381 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15382 gdbpy_ref.
15383 * python/py-type.c (field_new): Use gdbpy_ref.
15384 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15385 gdbpy_ref.
15386 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15387 (py_free_pspace): Likewise.
15388 (pspace_to_pspace_object): Likewise.
15389 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15390 (py_free_objfile): Likewise.
15391 (objfile_to_objfile_object): Likewise.
15392 * python/py-inferior.c (delete_thread_object): Use
15393 gdbpy_ref.
15394 (infpy_read_memory): Likewise.
15395 (py_free_inferior): Likewise.
15396 * python/py-evtregistry.c (create_eventregistry_object): Use
15397 gdbpy_ref.
15398 * python/py-event.c (create_event_object): Use gdbpy_ref.
15399
15400 2017-02-10 Tom Tromey <tom@tromey.com>
15401
15402 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15403 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15404 used.
15405 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15406 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15407 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15408 python/py-framefilter.c, python/py-function.c,
15409 python/py-inferior.c, python/py-infevents.c,
15410 python/py-linetable.c, python/py-newobjfileevent.c,
15411 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15412 python/py-signalevent.c, python/py-stopevent.c,
15413 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15414 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15415 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15416 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15417
15418 2017-02-10 Tom Tromey <tom@tromey.com>
15419
15420 * ui-out.h (ui_out_emit_type): New class.
15421 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15422 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15423 and ui_out_emit_tuple.
15424 (enumerate_locals): Likewise.
15425 (py_mi_print_variables, py_print_locals, py_print_args): Use
15426 ui_out_emit_list.
15427 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15428 ui_out_emit_list.
15429 * common/gdb_optional.h: New file.
15430
15431 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15432
15433 * MAINTAINERS (Write After Approval): Update my e-mail address.
15434
15435 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15436
15437 PR gdb/21122
15438 * breakpoint.c (_initialize_breakpoint): Update the help description
15439 of the 'commands' command to indicate that it takes a list argument.
15440
15441 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15442
15443 * interps.c (current_interp_set_logging): Remove "return".
15444
15445 2017-02-09 Gary Benson <gbenson@redhat.com>
15446
15447 * symtab.c (add_symtab_completions): Prevent NULL pointer
15448 dereference.
15449
15450 2017-02-08 Pedro Alves <palves@redhat.com>
15451
15452 * interps.c (interp::interp): Remove reference to quiet_p.
15453 (interp_set): Make static. Remove dead "Switching to" output
15454 code.
15455 (interp_quiet_p, interp_set_quiet): Delete.
15456 (interpreter_exec_cmd): Don't set the interpreter quiet.
15457 * interps.h (interp_quiet_p): Make static.
15458 (class interp) <quiet_p>: Remove field
15459
15460 2017-02-08 Jerome Guitton <guitton@adacore.com>
15461
15462 * cli/cli-decode.c (find_command_name_length): Make it extern.
15463 * cli/cli-decode.h (find_command_name_length): Declare.
15464 * cli/cli-script.c (command_name_equals, line_first_arg):
15465 New functions.
15466 (process_next_line): Use cli-decode to parse command names.
15467 (build_command_line): Make args a constant pointer.
15468
15469 2017-02-08 Jerome Guitton <guitton@adacore.com>
15470
15471 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15472 Remove case-insensitive search.
15473
15474 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15475
15476 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15477 at the end of the line. Avoids an ARI warning.
15478
15479 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15480
15481 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15482 rdseed instructions.
15483 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15484
15485 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15486
15487 PR tdep/20936
15488 Provide and use sparc32 and sparc64 target description XML files.
15489 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15490 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15491 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15492 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15493 * features/sparc/sparc32-solaris.xml: New file.
15494 * features/sparc/sparc64-solaris.xml: New file.
15495 * features/sparc/sparc32-solaris.c: Generated.
15496 * features/sparc/sparc64-solaris.c: Generated.
15497 * sparc-tdep.h: Account for differences in target descriptions.
15498 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15499 (sparc32_register_type): Use target provided registers.
15500 (validate_tdesc_registers): New function.
15501 (sparc32_gdbarch_init): Use tdesc_has_registers.
15502 Set pseudoregister functions.
15503 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15504 (sparc64_register_type): Use target provided registers.
15505 (sparc64_init_abi): Set pseudoregister functions.
15506
15507 2017-02-03 Tom Tromey <tom@tromey.com>
15508
15509 PR rust/21097:
15510 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15511 with a single member.
15512
15513 2017-02-03 Pedro Alves <palves@redhat.com>
15514
15515 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15516 (cli_interp_base::~cli_interp_base): New.
15517 (cli_interp): New struct.
15518 (as_cli_interp): Cast the interp itself to cli_interp.
15519 (cli_interpreter_pre_command_loop): Rename to ...
15520 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15521 parameter.
15522 (cli_interpreter_init): Rename to ...
15523 (cli_interp::init): ... this. Remove 'self' parameter. Use
15524 boolean. Make extern.
15525 (cli_interpreter_resume): Rename to ...
15526 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15527 extern.
15528 (cli_interpreter_suspend): Rename to ...
15529 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15530 extern.
15531 (cli_interpreter_exec): Rename to ...
15532 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15533 extern.
15534 (cli_interpreter_supports_command_editing): Rename to ...
15535 (cli_interp_base::supports_command_editing): ... this. Remove
15536 'interp' parameter. Make extern.
15537 (cli_ui_out): Rename to ...
15538 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15539 Make extern.
15540 (cli_set_logging): Rename to ...
15541 (cli_interp_base::set_logging): ... this. Remove 'interp'
15542 parameter. Make extern.
15543 (cli_interp_procs): Delete.
15544 (cli_interp_factory): Adjust to use "new".
15545 * cli/cli-interp.h: Include "interps.h".
15546 (struct cli_interp_base): New struct.
15547 * interps.c (struct interp): Delete. Fields moved to interps.h.
15548 (interp_new): Delete.
15549 (interp::interp, interp::~interp): New.
15550 (interp_set): Use bool, and return void. Assume the interpreter
15551 has suspend, init and resume methods, and that the all return
15552 void.
15553 (set_top_level_interpreter): interp_set returns void.
15554 (interp_ui_out): Adapt.
15555 (current_interp_set_logging): Adapt.
15556 (interp_data): Delete.
15557 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15558 (interp_exec): Adapt.
15559 (top_level_interpreter_data): Delete.
15560 * interps.h (interp_init_ftype, interp_resume_ftype)
15561 (interp_suspend_ftype, interp_exec_ftype)
15562 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15563 (class interp): New.
15564 (interp_new): Delete.
15565 (interp_set): Now returns void. Use bool.
15566 (interp_data, top_level_interpreter_data): Delete.
15567 * mi/mi-common.h: Include interps.h.
15568 (class mi_interp): Inherit from interp. Define a ctor. Declare
15569 init, resume, suspect, exec, interp_ui_out, set_logging and
15570 pre_command_loop methods.
15571 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15572 (mi_interpreter_init): Rename to ...
15573 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15574 bool, return void and make extern. Adjust.
15575 (mi_interpreter_resume): ... Rename to ...
15576 (mi_interp::resume): ... this. Remove the 'data' parameter,
15577 return void and make extern. Adjust.
15578 (mi_interpreter_suspend): ... Rename to ...
15579 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15580 return void and make extern. Adjust.
15581 (mi_interpreter_exec): ... Rename to ...
15582 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15583 extern. Adjust.
15584 (mi_interpreter_pre_command_loop): ... Rename to ...
15585 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15586 parameter and make extern.
15587 (mi_on_normal_stop_1): Adjust.
15588 (mi_ui_out): Rename to ...
15589 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15590 parameter and make extern. Adjust.
15591 (mi_set_logging): Rename to ...
15592 (mi_interp::set_logging): ... this. Remove the 'interp'
15593 parameter and make extern. Adjust.
15594 (mi_interp_procs): Delete.
15595 (mi_interp_factory): Adjust to use 'new'.
15596 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15597 (mi_print_exception, mi_execute_command, mi_load_progress):
15598 Adjust.
15599 * tui/tui-interp.c (tui_interp): New class.
15600 (as_tui_interp): Return a tui_interp pointer.
15601 (tui_on_normal_stop, tui_on_signal_received)
15602 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15603 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15604 to use interp::interp_ui_out.
15605 (tui_init): Rename to ...
15606 (tui_interp::init): ... this. Remove the 'self' parameter, use
15607 bool, return void and make extern. Adjust.
15608 (tui_resume): Rename to ...
15609 (tui_interp::resume): ... this. Remove the 'data' parameter,
15610 return void and make extern. Adjust.
15611 (tui_suspend): Rename to ...
15612 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15613 return void and make extern. Adjust.
15614 (tui_ui_out): Rename to ...
15615 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15616 parameter, and make extern. Adjust.
15617 (tui_exec): Rename to ...
15618 (tui_interp::exec): ... this. Remove the 'data' parameter and
15619 make extern.
15620 (tui_interp_procs): Delete.
15621 (tui_interp_factory): Use "new".
15622
15623 2017-02-02 Tom Tromey <tom@tromey.com>
15624
15625 * rust-exp.y (ends_raw_string, space_then_number)
15626 (rust_identifier_start_p): Return bool.
15627 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15628 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15629 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15630 (rust_chartype_p): Return bool.
15631 (val_print_struct, rust_print_struct_def, rust_print_type):
15632 Update.
15633 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15634 Return bool.
15635
15636 2017-02-02 Tom Tromey <tom@tromey.com>
15637
15638 * rust-lang.c: Reindent.
15639
15640 2017-02-02 Tom Tromey <tom@tromey.com>
15641
15642 * rust-lang.h (rust_crate_for_block): Update.
15643 * rust-lang.c (rust_crate_for_block): Return std::string.
15644 (rust_get_disr_info): Use std:;string, not
15645 gdb::unique_xmalloc_ptr.
15646 * rust-exp.y (crate_name): Update.
15647
15648 2017-02-02 Pedro Alves <palves@redhat.com>
15649
15650 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15651 field out of gdb_disassembler_test and make it static.
15652
15653 2017-02-02 Pedro Alves <palves@redhat.com>
15654
15655 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15656 mi1_interp and mi_interp fields.
15657
15658 2017-02-02 Pedro Alves <palves@redhat.com>
15659
15660 * cli/cli-interp.c (struct saved_output_files, saved_output):
15661 Moved from cli/cli-logging.c.
15662 (cli_set_logging): New function.
15663 (cli_interp_procs): Install cli_set_logging.
15664 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15665 Declare.
15666 * cli/cli-logging.c (struct saved_output_files, saved_output):
15667 Moved to cli/cli-interp.c.
15668 (pop_output_files): Don't save outputs here.
15669 (make_logging_output): New function.
15670 (handle_redirections): Don't build tee nor save previous outputs
15671 here.
15672 * interps.c (current_interp_set_logging): Change prototype.
15673 Assume there's always a set_logging_proc method installed.
15674 * interps.h (interp_set_logging_ftype): Change prototype.
15675 (current_interp_set_logging): Change prototype and adjust comment.
15676 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15677 use make_logging_output.
15678 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15679 2017-02-02 Pedro Alves <palves@redhat.com>
15680
15681 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15682 from ...
15683 (set_logging_overwrite): ... here.
15684 (logging_no_redirect_file): Delete.
15685 (set_logging_redirect): Don't handle redirection on the fly.
15686 Instead warn that "logging off" / "logging on" is necessary.
15687 (pop_output_files): Delete references to logging_no_redirect_file.
15688 (show_logging_command): Always speak in terms of what will happen
15689 once logging is reenabled.
15690
15691 2017-02-02 Pedro Alves <palves@redhat.com>
15692
15693 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15694
15695 2017-02-02 Pedro Alves <palves@redhat.com>
15696
15697 * disasm.c (gdb_pretty_print_insn): Rename to ...
15698 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15699 Remove gdbarch parameter. Adapt to clear the object's buffers
15700 instead of allocating new buffers, and to print using the object's
15701 gdb_disassembler instead of calling gdb_print_insn.
15702 (dump_insns): Use gdb_pretty_print_disassembler.
15703 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15704 (gdb_pretty_print_disassembler): New class.
15705 * record-btrace.c (btrace_insn_history): Use
15706 gdb_pretty_print_disassembler.
15707
15708 2017-02-02 Pedro Alves <palves@redhat.com>
15709
15710 * ada-lang.c (type_as_string): Use string_file.
15711 * ada-valprint.c (ada_print_floating): Use string_file.
15712 * ada-varobj.c (ada_varobj_scalar_image)
15713 (ada_varobj_get_value_image): Use string_file.
15714 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15715 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15716 * breakpoint.c (update_inserted_breakpoint_locations)
15717 (insert_breakpoint_locations, reattach_breakpoints)
15718 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15719 (print_it_watchpoint): Use string_file.
15720 (save_breakpoints): Use stdio_file.
15721 * c-exp.y (oper): Use string_file.
15722 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15723 tee_file.
15724 (pop_output_files): Use delete.
15725 (handle_redirections): Use stdio_file and tee_file.
15726 * cli/cli-setshow.c (do_show_command): Use string_file.
15727 * compile/compile-c-support.c (c_compute_program): Use
15728 string_file.
15729 * compile/compile-c-symbols.c (generate_vla_size): Take a
15730 'string_file &' instead of a 'ui_file *'.
15731 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15732 of a 'ui_file *'. Use string_file.
15733 (generate_c_for_variable_locations): Take a 'string_file &'
15734 instead of a 'ui_file *'.
15735 * compile/compile-internal.h (generate_c_for_for_one_variable):
15736 Take a 'string_file &' instead of a 'ui_file *'.
15737 * compile/compile-loc2c.c (push, pushf, unary, binary)
15738 (print_label, pushf_register_address, pushf_register)
15739 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15740 'ui_file *'. Adjust.
15741 * compile/compile.c (compile_to_object): Use string_file.
15742 * compile/compile.h (compile_dwarf_expr_to_c)
15743 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15744 'ui_file *'.
15745 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15746 (replace_typedefs_qualified_name): Use string_file and
15747 obstack_copy0.
15748 * disasm.c (gdb_pretty_print_insn): Use string_file.
15749 (gdb_disassembly): Adjust reference the null_stream global.
15750 (do_ui_file_delete): Delete.
15751 (gdb_insn_length): Use null_stream.
15752 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15753 * dwarf2loc.c (dwarf2_compile_property_to_c)
15754 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15755 'string_file &' instead of a 'ui_file *'.
15756 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15757 * dwarf2read.c (do_ui_file_peek_last): Delete.
15758 (dwarf2_compute_name): Use string_file.
15759 * event-top.c (gdb_setup_readline): Use stdio_file.
15760 * gdbarch.sh (verify_gdbarch): Use string_file.
15761 * gdbtypes.c (safe_parse_type): Use null_stream.
15762 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15763 string_file.
15764 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15765 'string_file *' instead of a 'ui_file *'.
15766 (gdbscm_arch_disassemble): Use string_file.
15767 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15768 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15769 inherits from ui_file.
15770 (ioscm_file_port_delete, ioscm_file_port_rewind)
15771 (ioscm_file_port_put): Delete.
15772 (ioscm_file_port_write): Rename to ...
15773 (ioscm_file_port::write): ... this. Remove file_port_magic
15774 checks.
15775 (ioscm_file_port_new): Delete.
15776 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15777 ui_file_up.
15778 * guile/scm-type.c (tyscm_type_name): Use string_file.
15779 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15780 Use string_file.
15781 * infcmd.c (print_return_value_1): Use string_file.
15782 * infrun.c (print_target_wait_results): Use string_file.
15783 * language.c (add_language): Use string_file.
15784 * location.c (explicit_to_string_internal): Use string_file.
15785 * main.c (captured_main_1): Use null_file.
15786 * maint.c (maintenance_print_architecture): Use stdio_file.
15787 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15788 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15789 event_channel>: Change type to mi_console_file pointer.
15790 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15791 (mi_console_file_delete): Delete.
15792 (struct mi_console_file): Delete.
15793 (mi_console_file_magic): Delete.
15794 (mi_console_file_new): Delete.
15795 (mi_console_file::mi_console_file): New.
15796 (mi_console_file_delete): Delete.
15797 (mi_console_file_fputs): Delete.
15798 (mi_console_file::write): New.
15799 (mi_console_raw_packet): Delete.
15800 (mi_console_file::flush): New.
15801 (mi_console_file_flush): Delete.
15802 (mi_console_set_raw): Rename to ...
15803 (mi_console_file::set_raw): ... this.
15804 * mi/mi-console.h (class mi_console_file): New class.
15805 (mi_console_file_new, mi_console_set_raw): Delete.
15806 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15807 (mi_set_logging): Use delete and tee_file. Adjust.
15808 * mi/mi-main.c (output_register): Use string_file.
15809 (mi_cmd_data_evaluate_expression): Use string_file.
15810 (mi_cmd_data_read_memory): Use string_file.
15811 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15812 * mi/mi-out.c (mi_ui_out::main_stream): New.
15813 (mi_ui_out::rewind): Use main_stream and
15814 string_file.
15815 (mi_ui_out::put): Use main_stream and string_file.
15816 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15817 Allocate a 'string_file' instead.
15818 (mi_out_new): Don't allocate a mem_fileopen stream here.
15819 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15820 (mi_ui_out::main_stream): Declare method.
15821 * printcmd.c (eval_command): Use string_file.
15822 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15823 * python/py-arch.c (archpy_disassemble): Use string_file.
15824 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15825 * python/py-frame.c (frapy_str): Use string_file.
15826 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15827 Use string_file.
15828 * python/py-type.c (typy_str): Use string_file.
15829 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15830 * python/py-value.c (valpy_str): Use string_file.
15831 * record-btrace.c (btrace_insn_history): Use string_file.
15832 * regcache.c (regcache_print): Use stdio_file.
15833 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15834 * remote.c (escape_buffer): Use string_file.
15835 * rust-lang.c (rust_get_disr_info): Use string_file.
15836 * serial.c (serial_open_ops_1): Use stdio_file.
15837 (do_serial_close): Use delete.
15838 * stack.c (print_frame_arg): Use string_file.
15839 (print_frame_args): Remove local mem_fileopen stream, not used.
15840 (print_frame): Use string_file.
15841 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15842 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15843 Take a 'string_file *' instead of a 'ui_file *'.
15844 * top.c (new_ui): Use stdio_file and stderr_file.
15845 (free_ui): Use delete.
15846 (execute_command_to_string): Use string_file.
15847 (quit_confirm): Use string_file.
15848 * tracepoint.c (collection_list::append_exp): Use string_file.
15849 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15850 * tui/tui-file.c: Don't include "ui-file.h".
15851 (enum streamtype, struct tui_stream): Delete.
15852 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15853 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15854 (tui_file::tui_file): New method.
15855 (tui_file_fputs): Delete.
15856 (tui_file_get_strbuf): Delete.
15857 (tui_file::puts): New method.
15858 (tui_file_adjust_strbuf): Delete.
15859 (tui_file_flush): Delete.
15860 (tui_file::flush): New method.
15861 * tui/tui-file.h: Tweak intro comment.
15862 Include ui-file.h.
15863 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15864 (tui_file_adjust_strbuf): Delete declarations.
15865 (class tui_file): New class.
15866 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15867 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15868 (tui_register_format): Use string_stream.
15869 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15870 (tui_get_function_from_frame): Use string_file.
15871 * typeprint.c (type_to_string): Use string_file.
15872 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15873 (null_stream): New global.
15874 (ui_file_delete): Delete.
15875 (ui_file::ui_file): New.
15876 (null_file_isatty): Delete.
15877 (ui_file::~ui_file): New.
15878 (null_file_rewind): Delete.
15879 (ui_file::printf): New.
15880 (null_file_put): Delete.
15881 (null_file_flush): Delete.
15882 (ui_file::putstr): New.
15883 (null_file_write): Delete.
15884 (ui_file::putstrn): New.
15885 (null_file_read): Delete.
15886 (ui_file::putc): New.
15887 (null_file_fputs): Delete.
15888 (null_file_write_async_safe): Delete.
15889 (ui_file::vprintf): New.
15890 (null_file_delete): Delete.
15891 (null_file::write): New.
15892 (null_file_fseek): Delete.
15893 (null_file::puts): New.
15894 (ui_file_data): Delete.
15895 (null_file::write_async_safe): New.
15896 (gdb_flush, ui_file_isatty): Adjust.
15897 (ui_file_put, ui_file_rewind): Delete.
15898 (ui_file_write): Adjust.
15899 (ui_file_write_for_put): Delete.
15900 (ui_file_write_async_safe, ui_file_read): Adjust.
15901 (ui_file_fseek): Delete.
15902 (fputs_unfiltered): Adjust.
15903 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15904 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15905 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15906 (set_ui_file_data): Delete.
15907 (string_file::~string_file, string_file::write)
15908 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15909 (do_ui_file_as_string, ui_file_as_string): Delete.
15910 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15911 (struct mem_file): Delete.
15912 (mem_file_new): Delete.
15913 (stdio_file::stdio_file): New.
15914 (mem_file_delete): Delete.
15915 (stdio_file::stdio_file): New.
15916 (mem_fileopen): Delete.
15917 (stdio_file::~stdio_file): New.
15918 (mem_file_rewind): Delete.
15919 (stdio_file::set_stream): New.
15920 (mem_file_put): Delete.
15921 (stdio_file::open): New.
15922 (mem_file_write): Delete.
15923 (stdio_file_magic, struct stdio_file): Delete.
15924 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15925 (stdio_file::flush): New.
15926 (stdio_file_read): Rename to ...
15927 (stdio_file::read): ... this. Adjust.
15928 (stdio_file_write): Rename to ...
15929 (stdio_file::write): ... this. Adjust.
15930 (stdio_file_write_async_safe): Rename to ...
15931 (stdio_file::write_async_safe) ... this. Adjust.
15932 (stdio_file_fputs): Rename to ...
15933 (stdio_file::puts) ... this. Adjust.
15934 (stdio_file_isatty): Delete.
15935 (stdio_file_fseek): Delete.
15936 (stdio_file::isatty): New.
15937 (stderr_file_write): Rename to ...
15938 (stderr_file::write) ... this. Adjust.
15939 (stderr_file_fputs): Rename to ...
15940 (stderr_file::puts) ... this. Adjust.
15941 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15942 (stderr_file::stderr_file): New.
15943 (tee_file_magic): Delete.
15944 (struct tee_file): Delete.
15945 (tee_file::tee_file): New.
15946 (tee_file_new): Delete.
15947 (tee_file::~tee_file): New.
15948 (tee_file_delete): Delete.
15949 (tee_file_flush): Rename to ...
15950 (tee_file::flush): ... this. Adjust.
15951 (tee_file_write): Rename to ...
15952 (tee_file::write): ... this. Adjust.
15953 (tee_file::write_async_safe): New.
15954 (tee_file_fputs): Rename to ...
15955 (tee_file::puts): ... this. Adjust.
15956 (tee_file_isatty): Rename to ...
15957 (tee_file::isatty): ... this. Adjust.
15958 * ui-file.h (struct obstack, struct ui_file): Don't
15959 forward-declare.
15960 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15961 (ui_file_write_ftype)
15962 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15963 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15964 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15965 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15966 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15967 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15968 (set_ui_file_fseek): Delete.
15969 (ui_file_data, ui_file_delete, ui_file_rewind)
15970 (struct ui_file): New.
15971 (ui_file_up): New.
15972 (class null_file): New.
15973 (null_stream): Declare.
15974 (ui_file_write_for_put, ui_file_put): Delete.
15975 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15976 Delete.
15977 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15978 (gdb_fopen, tee_file_new): Delete.
15979 (struct string_file): New.
15980 (struct stdio_file): New.
15981 (stdio_file_up): New.
15982 (struct stderr_file): New.
15983 (class tee_file): New.
15984 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15985 of a 'ui_file *'. Adjust.
15986 * ui-out.h (class ui_out) <field_stream>: Likewise.
15987 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15988 (null_stream): Delete.
15989 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15990 Adjust.
15991 * utils.h (struct ui_file): Delete forward declaration..
15992 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15993 (error_stream): Take a 'string_file &' instead of a
15994 'ui_file *'.
15995 * varobj.c (varobj_value_get_print_value): Use string_file.
15996 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15997 * gdbarch.c: Regenerate.
15998
15999 2017-02-02 Pedro Alves <palves@redhat.com>
16000
16001 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16002 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16003 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16004 Adjust to call gdb_print_insn instead of
16005 gdb_disassembler::print_insn.
16006 (dump_insns, do_mixed_source_and_assembly_deprecated)
16007 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16008 'gdbarch' parameter. Remove gdb_disassembler parameter.
16009 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16010 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16011 declaration.
16012 (gdb_pretty_print_insn): Re-add declaration.
16013 * record-btrace.c (btrace_insn_history): Don't allocate a
16014 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16015
16016 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16017
16018 * disasm.h (gdb_disassembly): Remove file_string parameter.
16019 * disasm.c (gdb_disassembly): Likewise.
16020 * cli/cli-cmds.c (print_disassembly): Adapt.
16021 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16022 * stack.c (do_gdb_disassembly): Likewise.
16023
16024 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16025
16026 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16027 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16028 targets. And if the implicit value is longer than needed, extract
16029 the first bytes instead of the "least significant" ones.
16030
16031 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16032
16033 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16034 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16035 (btrace_fetch): Assert can_access_registers_ptid.
16036 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16037 validate_registers_access.
16038
16039 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16040
16041 * gdbthread.h (can_access_registers_ptid): New.
16042 * thread.c (can_access_registers_ptid): New.
16043
16044 2017-02-01 Pedro Alves <palves@redhat.com>
16045
16046 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16047
16048 2017-01-31 Pedro Alves <palves@redhat.com>
16049
16050 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16051 Fix typos.
16052
16053 2017-01-31 Pedro Alves <palves@redhat.com>
16054
16055 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16056 not used.
16057
16058 2017-01-31 Pedro Alves <palves@redhat.com>
16059
16060 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16061
16062 2017-01-31 Pedro Alves <palves@redhat.com>
16063
16064 * common/scoped_restore.h
16065 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16066 change the value's parameter type to T2.
16067 (make_scoped_restore): Likewise.
16068
16069 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16070 Richard Henderson <rth@redhat.com>
16071
16072 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16073 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16074 GS_BASE for older kernels.
16075 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16076 GS_BASE for older kernels.
16077 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16078 and GS_BASE to the offset table.
16079 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16080 system register group.
16081 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16082 for older kernels.
16083 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16084 amd64 ABI.
16085 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16086 AMD64_GSBASE_REGNUM.
16087 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16088 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16089 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16090 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16091 i386/64bit-segments.xml in those rules.
16092 * features/i386/64bit-segments.xml: New file.
16093 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16094 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16095 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16096 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16097 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16098 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16099 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16100 * features/i386/amd64-avx-linux.c: Regenerated.
16101 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16102 * features/i386/amd64-avx-mpx.c: Regenerated.
16103 * features/i386/amd64-avx512-linux.c: Regenerated.
16104 * features/i386/amd64-linux.c: Regenerated.
16105 * features/i386/amd64-mpx-linux.c: Regenerated.
16106 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16107 * features/i386/i386-avx-mpx.c: Regenerated.
16108 * features/i386/x32-avx-linux.c: Regenerated.
16109 * features/i386/x32-avx512-linux.c: Regenerated.
16110 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16111 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16112 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16113 * regformats/i386/amd64-linux.dat: Regenerated.
16114 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16115 * regformats/i386/x32-avx-linux.dat: Regenerated.
16116 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16117 * regformats/i386/x32-linux.dat: Regenerated.
16118
16119 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16120
16121 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16122 Set to AMD64_NUM_REGS.
16123
16124 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16125
16126 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16127 that checks validity of a register number.
16128
16129 2017-01-27 Kees Cook <keescook@google.com>
16130
16131 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16132 fetch_fpregs if target has fpa registers.
16133 (arm_linux_store_inferior_registers): Call store_fpregs if target
16134 has fpa registers.
16135
16136 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16137
16138 * cris-tdep.c (cris_gdbarch_init): Remove check for
16139 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16140
16141 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16142
16143 * corelow.c (get_core_register_section): Check for regset
16144 existence before checking for REGSET_VARIABLE_SIZE.
16145
16146 2017-01-26 Yao Qi <yao.qi@linaro.org>
16147 Pedro Alves <palves@redhat.com>
16148
16149 PR gdb/20939
16150 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16151 call memory_error, save memaddr instead.
16152 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16153 negative, cal memory_error.
16154 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16155
16156 2017-01-26 Yao Qi <yao.qi@linaro.org>
16157
16158 * disasm-selftests.c (memory_error_test): New function.
16159 (_initialize_disasm_selftests): Register memory_error_test.
16160
16161 2017-01-26 Yao Qi <yao.qi@linaro.org>
16162
16163 * Makefile.in (SFILES): Add disasm-selftests.c and
16164 selftest-arch.c.
16165 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16166 * disasm-selftests.c: New file.
16167 * selftest-arch.c: New file.
16168 * selftest-arch.h: New file.
16169
16170 2017-01-26 Yao Qi <yao.qi@linaro.org>
16171
16172 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16173 to bfd_arch_mep. Don't return 0 if section is not
16174 found. Call print_insn_mep.
16175
16176 2017-01-26 Pedro Alves <palves@redhat.com>
16177 Yao Qi <yao.qi@linaro.org>
16178
16179 * arm-tdep.c: Include "disasm.h".
16180 (gdb_print_insn_arm): Update code to get gdbarch.
16181 * disasm.c (dis_asm_read_memory): Change it to
16182 gdb_disassembler::dis_asm_read_memory.
16183 (dis_asm_memory_error): Likewise.
16184 (dis_asm_print_address): Likewise.
16185 (gdb_pretty_print_insn): Change it to
16186 gdb_disassembler::pretty_print_insn.
16187 (dump_insns): Add one argument gdb_disassemlber. All
16188 callers updated.
16189 (do_mixed_source_and_assembly_deprecated): Likewise.
16190 (do_mixed_source_and_assembly): Likewise.
16191 (do_assembly_only): Likewise.
16192 (gdb_disassembler::gdb_disassembler): New.
16193 (gdb_disassembler::print_insn): New.
16194 * disasm.h (class gdb_disassembler): New.
16195 (gdb_pretty_print_insn): Remove declaration.
16196 (gdb_disassemble_info): Likewise.
16197 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16198 (gdbscm_disasm_read_memory_worker): Update.
16199 (gdbscm_disasm_read_memory): Update.
16200 (gdbscm_disasm_memory_error): Remove.
16201 (gdbscm_disasm_print_address): Remove.
16202 (gdbscm_disassembler::gdbscm_disassembler): New.
16203 (gdbscm_print_insn_from_port): Update.
16204 * mips-tdep.c: Include disasm.h.
16205 (gdb_print_insn_mips): Update code to get gdbarch.
16206 * record-btrace.c (btrace_insn_history): Update.
16207 * spu-tdep.c: Include disasm.h.
16208 (struct spu_dis_asm_data): Remove.
16209 (struct spu_dis_asm_info): New.
16210 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16211 SPU id.
16212 (gdb_print_insn_spu): Cast disassemble_info to
16213 spu_dis_asm_info.
16214
16215 2017-01-26 Yao Qi <yao.qi@linaro.org>
16216
16217 * disasm.c (do_ui_file_delete): Delete.
16218 (gdb_insn_length): Move code creating stream to ...
16219 * utils.c (null_stream): ... here. New function.
16220 * utils.h (null_stream): Declare.
16221
16222 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16223
16224 * python/py-inferior.c (find_thread_object): Return directly
16225 from the loop. Remove "found" variable.
16226
16227 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16228
16229 GDB 7.12.1 released.
16230
16231 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16232
16233 * python/py-function.c (fnpy_call): Reorder declarations to have
16234 the gdbpy_enter object declared first.
16235 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16236
16237 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16238
16239 PR python/21068
16240 * python/python-internal.h (PyMem_RawMalloc): Define for
16241 Python < 3.4.
16242 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16243 PyMem_RawMalloc instead of PyMem_Malloc.
16244
16245 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16246 Luis Machado <lgustavo@codesourcery.com>
16247
16248 * NEWS (New commands): Mention flash-erase.
16249 (New MI commands): Mention target-flash-erase.
16250 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16251 command.
16252 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16253 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16254 * target.c (flash_erase_command): New function.
16255 (initialize_targets): Add new flash-erase command.
16256 * target.h (flash_erase_command): New declaration.
16257
16258 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16259
16260 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16261 HAVE_SYS_PROCFS_H is defined.
16262
16263 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16264
16265 * remote.c (struct cached_reg): Change data into a pointer.
16266 * (stop_reply_dtr): Free data pointers before deleting vector.
16267 (process_stop_reply): Likewise.
16268 (remote_parse_stop_reply): Allocate space for data
16269
16270 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16271
16272 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16273 MAX_REGISTER_SIZE.
16274 (amd64_pseudo_register_read_value): Likewise.
16275 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16276 (store_register_using_P): Likewise.
16277 * regcache.c (regcache_xfer_part): Likewise.
16278
16279 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16280
16281 Split real and pseudo registers.
16282 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16283 (sparc32_pseudo_regnum): New enum.
16284 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16285 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16286 (SPARC32_CP0_REGISTERS): New macro.
16287 (sparc32_pseudo_register_name): New function.
16288 (sparc32_register_name): Use sparc32_pseudo_register_name.
16289 (sparc32_pseudo_register_type): New function.
16290 (sparc32_register_type): Use sparc32_pseudo_register_type.
16291 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16292 pseudo register numbers.
16293 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16294 (SPARC64_CP0_REGISTERS): New macro.
16295 (sparc64_pseudo_register_name): New function.
16296 (sparc64_register_name): Use sparc64_pseudo_register_name.
16297 (sparc64_pseudo_register_type): New function.
16298 (sparc64_register_type): Use sparc64_pseudo_register_type.
16299 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16300 pseudo register numbers.
16301 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16302 sparc64_store_arguments): Handle pseudo register numbers.
16303
16304 2017-01-13 Yao Qi <yao.qi@linaro.org>
16305
16306 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16307 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16308 output.
16309 (getpkt_or_notif_sane_1): Likewise.
16310
16311 2017-01-13 Yao Qi <yao.qi@linaro.org>
16312
16313 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16314 of CC. Pass "-x c++-header" instead of "-x c".
16315
16316 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16317
16318 * remote.c (remote_can_async_p): Update comment.
16319
16320 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16321
16322 * linux-nat.c (linux_nat_can_async_p): Update comment.
16323
16324 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16325
16326 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16327
16328 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16329
16330 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16331
16332 2017-01-10 Tom Tromey <tom@tromey.com>
16333
16334 * python/py-type.c (typy_legacy_template_argument): Update.
16335 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16336 ~demangle_parse_info): Declare new members.
16337 (cp_demangled_name_to_comp): Return unique_ptr.
16338 (cp_demangled_name_parse_free)
16339 (make_cleanup_cp_demangled_name_parse_free)
16340 (cp_new_demangle_parse_info): Remove.
16341 * cp-support.c (do_demangled_name_parse_free_cleanup)
16342 (make_cleanup_cp_demangled_name_parse_free): Remove.
16343 (inspect_type, cp_canonicalize_string_full)
16344 (cp_canonicalize_string): Update.
16345 (mangled_name_to_comp): Change return type.
16346 (cp_class_name_from_physname, method_name_from_physname)
16347 (cp_func_name, cp_remove_params): Update.
16348 * cp-name-parser.y (demangle_parse_info): New constructor, from
16349 cp_new_demangle_parse_info.
16350 (~demangle_parse_info): New destructor, from
16351 cp_demangled_name_parse_free.
16352 (cp_merge_demangle_parse_infos): Update.
16353 (cp_demangled_name_to_comp): Change return type.
16354
16355 2017-01-10 Tom Tromey <tom@tromey.com>
16356
16357 * top.c (prevent_dont_repeat): Change return type.
16358 * python/python.c (execute_gdb_command): Use std::string.
16359 Update.
16360 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16361 * command.h (prevent_dont_repeat): Change return type.
16362 * breakpoint.c (bpstat_do_actions_1): Update.
16363
16364 2017-01-10 Tom Tromey <tom@tromey.com>
16365
16366 * value.h (scoped_value_mark::~scoped_value_mark): Call
16367 free_to_mark.
16368 (scoped_value_mark::free_to_mark): New method.
16369 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16370 scoped_value_mark.
16371
16372 2017-01-10 Tom Tromey <tom@tromey.com>
16373
16374 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16375 (valpy_reference_value, valpy_const_value, valpy_get_address)
16376 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16377 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16378 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16379 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16380 scoped_value_mark.
16381 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16382 * value.h (scoped_value_mark): New class.
16383
16384 2017-01-10 Tom Tromey <tom@tromey.com>
16385
16386 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16387 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16388 * psymtab.c (discard_psymtabs_upto): Remove.
16389 (make_cleanup_discard_psymtabs): Remove.
16390 (struct psymtab_state): Remove.
16391
16392 2017-01-10 Tom Tromey <tom@tromey.com>
16393
16394 * record-full.c (record_full_save_cleanups): Remove.
16395 (record_full_save): Use gdb::unlinker.
16396 * gcore.c (do_bfd_delete_cleanup): Remove.
16397 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16398 cleanups.
16399 * dwarf2read.c (unlink_if_set): Remove.
16400 (write_psymtabs_to_index): Use gdb::unlinker.
16401 * common/gdb_unlinker.h: New file.
16402
16403 2017-01-10 Tom Tromey <tom@tromey.com>
16404
16405 * windows-tdep.c (windows_xfer_shared_library): Update.
16406 * windows-nat.c (windows_make_so): Update.
16407 * utils.h (make_cleanup_bfd_unref): Remove.
16408 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16409 * symfile.h (symfile_bfd_open)
16410 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16411 * symfile.c (read_symbols, symbol_file_add)
16412 (separate_debug_file_exists): Update.
16413 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16414 (generic_load, reread_symbols): Update.
16415 * symfile-mem.c (symbol_file_add_from_memory): Update.
16416 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16417 (spu_symbol_file_add_from_memory): Update.
16418 * solist.h (struct target_so_ops) <bfd_open>: Return
16419 gdb_bfd_ref_ptr.
16420 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16421 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16422 gdb_bfd_ref_ptr.
16423 (solib_map_sections, reload_shared_libraries_1): Update.
16424 * solib-svr4.c (enable_break): Update.
16425 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16426 * solib-frv.c (enable_break2): Update.
16427 * solib-dsbt.c (enable_break): Update.
16428 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16429 gdb_bfd_ref_ptr.
16430 (darwin_solib_get_all_image_info_addr_at_init): Update.
16431 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16432 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16433 * record-full.c (record_full_save): Update.
16434 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16435 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16436 * minidebug.c (find_separate_debug_file_in_section): Return
16437 gdb_bfd_ref_ptr.
16438 * machoread.c (macho_add_oso_symfile): Change abfd to
16439 gdb_bfd_ref_ptr.
16440 (macho_symfile_read_all_oso): Update.
16441 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16442 (macho_symfile_read): Update.
16443 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16444 (jit_bfd_try_read_symtab): Update.
16445 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16446 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16447 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16448 gdb_bfd_ref_ptr.
16449 (gdb_bfd_ref_policy): New struct.
16450 (gdb_bfd_ref_ptr): New typedef.
16451 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16452 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16453 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16454 gdb_bfd_ref_ptr.
16455 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16456 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16457 (gcore_command): Update.
16458 * exec.c (exec_file_attach): Update.
16459 * elfread.c (elf_symfile_read): Update.
16460 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16461 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16462 (open_and_init_dwo_file): Update.
16463 (open_dwp_file): Return gdb_bfd_ref_ptr.
16464 (open_and_init_dwp_file): Update.
16465 * corelow.c (core_open): Update.
16466 * compile/compile-object-load.c (compile_object_load): Update.
16467 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16468 * coffread.c (coff_symfile_read): Update.
16469 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16470 gdb_bfd_ref_ptr. Rename.
16471 (dump_bfd_file, restore_command): Update.
16472 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16473 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16474 (find_separate_debug_file_by_buildid): Update.
16475
16476 2017-01-10 Tom Tromey <tom@tromey.com>
16477
16478 * common/gdb_ref_ptr.h: New file.
16479 * python/py-ref.h (struct gdbpy_ref_policy): New.
16480 (gdbpy_ref): Now a typedef.
16481
16482 2017-01-10 Tom Tromey <tom@tromey.com>
16483
16484 * utils.h (make_cleanup_htab_delete): Don't declare.
16485 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16486 Remove.
16487 * linespec.c (decode_compound_collector): Add constructor,
16488 destructor.
16489 (lookup_prefix_sym): Remove cleanup.
16490 (symtab_collector): Add constructor, destructor.
16491 (collect_symtabs_from_filename): Remove cleanup.
16492 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16493 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16494 Use htab_up.
16495 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16496 * dwarf2read.c (dw2_expand_symtabs_matching)
16497 (dw2_map_symbol_filenames, dwarf_decode_macros)
16498 (write_psymtabs_to_index): Use htab_up.
16499 * dwarf2loc.c (func_verify_no_selftailcall)
16500 (call_site_find_chain_1, func_verify_no_selftailcall)
16501 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16502 std::vector, gdb::unique_xmalloc_ptr.
16503 (call_sitep): Remove typedef.
16504 (dwarf2_locexpr_baton_eval): Remove unused variable.
16505
16506 2017-01-10 Tom Tromey <tom@tromey.com>
16507
16508 * python/python-internal.h (make_cleanup_py_decref)
16509 (make_cleanup_py_xdecref): Don't declare.
16510 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16511 (py_xdecref, make_cleanup_py_xdecref): Remove.
16512
16513 2017-01-10 Tom Tromey <tom@tromey.com>
16514
16515 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16516 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16517
16518 2017-01-10 Tom Tromey <tom@tromey.com>
16519
16520 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16521
16522 2017-01-10 Tom Tromey <tom@tromey.com>
16523
16524 * python/py-utils.c (unicode_to_encoded_string)
16525 (python_string_to_target_string)
16526 (python_string_to_target_python_string)
16527 (python_string_to_host_string, gdbpy_obj_to_string)
16528 (get_addr_from_python): Use gdbpy_ref.
16529
16530 2017-01-10 Tom Tromey <tom@tromey.com>
16531
16532 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16533 gdbpy_ref.
16534
16535 2017-01-10 Tom Tromey <tom@tromey.com>
16536
16537 * python/python.c (eval_python_command, gdbpy_decode_line)
16538 (gdbpy_run_events, gdbpy_start_type_printers)
16539 (gdbpy_apply_type_printers): Use gdbpy_ref.
16540
16541 2017-01-10 Tom Tromey <tom@tromey.com>
16542
16543 * python/py-param.c (get_doc_string, compute_enum_values): Use
16544 gdbpy_ref.
16545
16546 2017-01-10 Tom Tromey <tom@tromey.com>
16547
16548 * python/py-inferior.c (find_thread_object, build_inferior_list):
16549 Use gdbpy_ref.
16550
16551 2017-01-10 Tom Tromey <tom@tromey.com>
16552
16553 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16554
16555 2017-01-10 Tom Tromey <tom@tromey.com>
16556
16557 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16558 gdbpy_ref.
16559
16560 2017-01-10 Tom Tromey <tom@tromey.com>
16561
16562 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16563 extra incref.
16564 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16565 Use gdbpy_ref.
16566
16567 2017-01-10 Tom Tromey <tom@tromey.com>
16568
16569 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16570 gdbpy_ref.
16571
16572 2017-01-10 Tom Tromey <tom@tromey.com>
16573
16574 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16575 decref results of PyArg_ParseTupleAndKeywords.
16576
16577 2017-01-10 Tom Tromey <tom@tromey.com>
16578
16579 * python/python.c (python_run_simple_file): Use
16580 unique_xmalloc_ptr, gdbpy_ref.
16581
16582 2017-01-10 Tom Tromey <tom@tromey.com>
16583
16584 * python/py-prettyprint.c (print_stack_unless_memory_error)
16585 (print_string_repr, print_children): Use gdbpy_ref.
16586 (dummy_python_frame): New class.
16587 (dummy_python_frame::dummy_python_frame): Rename from
16588 push_dummy_python_frame.
16589 (py_restore_tstate): Remove.
16590
16591 2017-01-10 Tom Tromey <tom@tromey.com>
16592
16593 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16594
16595 2017-01-10 Tom Tromey <tom@tromey.com>
16596
16597 * python/python.c (ensure_python_env, restore_python_env):
16598 Remove.
16599 * python/python-internal.h (ensure_python_env): Don't declare.
16600 * varobj.h (varobj_ensure_python_env): Don't declare.
16601 * varobj.c (varobj_ensure_python_env): Remove.
16602
16603 2017-01-10 Tom Tromey <tom@tromey.com>
16604
16605 * varobj.c (varobj_value_get_print_value): Use
16606 gdbpy_enter_varobj.
16607
16608 2017-01-10 Tom Tromey <tom@tromey.com>
16609
16610 * python/py-prettyprint.c (print_string_repr, print_children):
16611 Update.
16612 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16613 of "encoding".
16614 * varobj.c (varobj_value_get_print_value): Update.
16615 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16616
16617 2017-01-10 Tom Tromey <tom@tromey.com>
16618
16619 * varobj.c (varobj_get_display_hint)
16620 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16621 (varobj_set_visualizer, free_variable): Use
16622 gdbpy_enter_varobj.
16623
16624 2017-01-10 Tom Tromey <tom@tromey.com>
16625
16626 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16627 (do_finish_initialization): New function. Use gdbpy_ref.
16628 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16629 do_finish_initialization.
16630
16631 2017-01-10 Tom Tromey <tom@tromey.com>
16632
16633 * python/py-param.c (get_set_value, get_show_value): Use
16634 gdbpy_enter, gdbpy_ref.
16635
16636 2017-01-10 Tom Tromey <tom@tromey.com>
16637
16638 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16639
16640 2017-01-10 Tom Tromey <tom@tromey.com>
16641
16642 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16643
16644 2017-01-10 Tom Tromey <tom@tromey.com>
16645
16646 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16647 Use gdbpy_enter_varobj.
16648
16649 2017-01-10 Tom Tromey <tom@tromey.com>
16650
16651 * varobj.c (gdbpy_enter_varobj): New constructor.
16652 * python/python-internal.h (gdbpy_enter_varobj): New class.
16653 * python/py-varobj.c (py_varobj_get_iterator): Use
16654 gdbpy_enter_varobj.
16655
16656 2017-01-10 Tom Tromey <tom@tromey.com>
16657
16658 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16659 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16660 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16661 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16662 unique_xmalloc_ptr.
16663 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16664
16665 2017-01-10 Tom Tromey <tom@tromey.com>
16666
16667 * python/py-xmethods.c (invoke_match_method): Use
16668 gdbpy_ref.
16669
16670 2017-01-10 Tom Tromey <tom@tromey.com>
16671
16672 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16673 gdbpy_enter, gdbpy_ref.
16674
16675 2017-01-10 Tom Tromey <tom@tromey.com>
16676
16677 * python/python.c (python_interactive_command): Use gdbpy_enter.
16678
16679 2017-01-10 Tom Tromey <tom@tromey.com>
16680
16681 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16682 gdbpy_ref.
16683
16684 2017-01-10 Tom Tromey <tom@tromey.com>
16685
16686 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16687 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16688
16689 2017-01-10 Tom Tromey <tom@tromey.com>
16690
16691 * utils.h (htab_deleter): New struct.
16692 (htab_up): New typedef.
16693 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16694 gdbpy_enter, gdbpy_ref, htab_up.
16695
16696 2017-01-10 Tom Tromey <tom@tromey.com>
16697
16698 * python/py-unwind.c (pending_frame_invalidate): Remove.
16699 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16700
16701 2017-01-10 Tom Tromey <tom@tromey.com>
16702
16703 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16704 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16705
16706 2017-01-10 Tom Tromey <tom@tromey.com>
16707
16708 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16709
16710 2017-01-10 Tom Tromey <tom@tromey.com>
16711
16712 * python/python.c (gdbpy_eval_from_control_command)
16713 (gdbpy_source_script, gdbpy_run_events)
16714 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16715 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16716 gdbpy_enter.
16717
16718 2017-01-10 Tom Tromey <tom@tromey.com>
16719
16720 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16721
16722 2017-01-10 Tom Tromey <tom@tromey.com>
16723
16724 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16725
16726 2017-01-10 Tom Tromey <tom@tromey.com>
16727
16728 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16729 (python_on_inferior_call_pre, python_on_inferior_call_post)
16730 (python_on_memory_change, python_on_register_change)
16731 (python_inferior_exit, python_new_objfile, add_thread_object)
16732 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16733
16734 2017-01-10 Tom Tromey <tom@tromey.com>
16735
16736 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16737 (bpfinishpy_handle_exit): Use gdbpy_enter.
16738
16739 2017-01-10 Tom Tromey <tom@tromey.com>
16740
16741 * python/py-cmd.c (cmdpy_destroyer)
16742 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16743 gdbpy_enter.
16744
16745 2017-01-10 Tom Tromey <tom@tromey.com>
16746
16747 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16748 gdbpy_enter.
16749 (gdbpy_breakpoint_has_cond): Likewise.
16750
16751 2017-01-10 Tom Tromey <tom@tromey.com>
16752
16753 * python/python.c (gdbpy_enter): New constructor.
16754 (~gdbpy_enter): New destructor.
16755 (restore_python_env, ensure_python_env): Rewrite.
16756 * python/python-internal.h (gdbpy_enter): New class.
16757
16758 2017-01-10 Tom Tromey <tom@tromey.com>
16759
16760 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16761
16762 2017-01-10 Tom Tromey <tom@tromey.com>
16763
16764 * python/py-value.c (value_has_field, get_field_flag)
16765 (get_field_type, valpy_getitem, convert_value_from_python): Use
16766 gdbpy_ref.
16767
16768 2017-01-10 Tom Tromey <tom@tromey.com>
16769
16770 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16771 gdbpy_ref.
16772
16773 2017-01-10 Tom Tromey <tom@tromey.com>
16774
16775 * python/py-prettyprint.c (search_pp_list)
16776 (find_pretty_printer_from_objfiles)
16777 (find_pretty_printer_from_progspace)
16778 (find_pretty_printer_from_gdb, find_pretty_printer)
16779 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16780 gdbpy_ref.
16781
16782 2017-01-10 Tom Tromey <tom@tromey.com>
16783
16784 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16785
16786 2017-01-10 Tom Tromey <tom@tromey.com>
16787
16788 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16789 (ltpy_get_all_source_lines): Use gdbpy_ref.
16790
16791 2017-01-10 Tom Tromey <tom@tromey.com>
16792
16793 * python/py-framefilter.c (extract_sym, extract_value)
16794 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16795 gdbpy_ref.
16796
16797 2017-01-10 Tom Tromey <tom@tromey.com>
16798
16799 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16800
16801 2017-01-10 Tom Tromey <tom@tromey.com>
16802
16803 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16804
16805 2017-01-10 Tom Tromey <tom@tromey.com>
16806
16807 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16808 gdbpy_ref.
16809
16810 2017-01-10 Tom Tromey <tom@tromey.com>
16811
16812 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16813
16814 2017-01-10 Tom Tromey <tom@tromey.com>
16815
16816 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16817 (typy_range): Use gdbpy_ref.
16818
16819 2017-01-10 Tom Tromey <tom@tromey.com>
16820
16821 * python/py-threadevent.c (create_thread_event_object): Use
16822 gdbpy_ref.
16823 * python/py-stopevent.c (create_stop_event_object): Simplify.
16824 (emit_stop_event): Use gdbpy_ref.
16825 * python/py-signalevent.c (create_signal_event_object): Use
16826 gdbpy_ref.
16827 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16828 (emit_new_objfile_event, create_clear_objfiles_event_object)
16829 (emit_clear_objfiles_event): Use gdbpy_ref.
16830 * python/py-infevents.c (create_inferior_call_event_object)
16831 (create_register_changed_event_object)
16832 (create_memory_changed_event_object, emit_inferior_call_event)
16833 (emit_memory_changed_event, emit_register_changed_event): Use
16834 gdbpy_ref.
16835 * python/py-exitedevent.c (create_exited_event_object)
16836 (emit_exited_event): Use gdbpy_ref.
16837 * python/py-event.h (evpy_emit_event): Remove
16838 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16839 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16840 * python/py-continueevent.c (emit_continue_event): Use
16841 gdbpy_ref.
16842 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16843 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16844 gdbpy_ref.
16845 * python/py-bpevent.c (create_breakpoint_event_object): Use
16846 gdbpy_ref.
16847
16848 2017-01-10 Tom Tromey <tom@tromey.com>
16849
16850 * python/py-ref.h: New file.
16851
16852 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16853
16854 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16855 void.
16856 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16857 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16858 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16859 * ui-out.c (ui_out::redirect): Likewise.
16860 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16861 * cli/cli-logging.c (set_logging_redirect): Update call site of
16862 ui_out::redirect.
16863 (handle_redirections): Likewise.
16864 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16865 * top.c (execute_command_to_string): Likewise.
16866 * utils.c (do_ui_out_redirect_pop): Likewise.
16867
16868 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16869
16870 * stack.c (_initialize_stack): Update "frame" command help message.
16871
16872 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16873
16874 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16875
16876 2017-01-06 Yao Qi <yao.qi@linaro.org>
16877
16878 * x86-linux-nat.h: Include gdb_proc_service.h.
16879
16880 2017-01-06 Yao Qi <yao.qi@linaro.org>
16881
16882 * ser-base.h: Include serial.h.
16883
16884 2017-01-06 Yao Qi <yao.qi@linaro.org>
16885
16886 * ppc-linux-tdep.h: Include ppc-tdep.h.
16887
16888 2017-01-06 Yao Qi <yao.qi@linaro.org>
16889
16890 * nat/amd64-linux-siginfo.h: Include signal.h.
16891
16892 2017-01-06 Yao Qi <yao.qi@linaro.org>
16893
16894 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16895
16896 2017-01-06 Yao Qi <yao.qi@linaro.org>
16897
16898 * mi/mi-parse.h: Include mi-cmds.h.
16899
16900 2017-01-06 Yao Qi <yao.qi@linaro.org>
16901
16902 * inf-loop.c: Don't include "target.h".
16903 * inf-loop.h: Include it here.
16904
16905 2017-01-06 Yao Qi <yao.qi@linaro.org>
16906
16907 * dfp.h: Include "dboulest.h" and "expression.h".
16908
16909 2017-01-06 Yao Qi <yao.qi@linaro.org>
16910
16911 * ax-gdb.h: Include "ax.h".
16912
16913 2017-01-06 Yao Qi <yao.qi@linaro.org>
16914
16915 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16916 with nat/gdb_ptrace.h.
16917
16918 2017-01-05 Yao Qi <yao.qi@linaro.org>
16919
16920 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16921 new line.
16922 (mips64_fbsd_sigframe_init): Likewise.
16923
16924 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16925
16926 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16927 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16928
16929 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16930
16931 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16932 * NEWS: Mention new FreeBSD/mips native configuration.
16933 * config/mips/fbsd.mh: New file.
16934 * configure.host: Add mips*-*-freebsd*.
16935 * mips-fbsd-nat.c: New file.
16936
16937 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16938
16939 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16940 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16941 * NEWS: Mention new FreeBSD/mips target.
16942 * configure.tgt: Add mips*-*-freebsd*.
16943 * mips-fbsd-tdep.c: New file.
16944 * mips-fbsd-tdep.h: New file.
16945
16946 2017-01-04 Yao Qi <yao.qi@linaro.org>
16947
16948 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16949 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16950
16951 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16952
16953 Update copyright year range in all GDB files.
16954
16955 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16956
16957 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16958
16959 For older changes see ChangeLog-2016.
16960 \f
16961 Local Variables:
16962 mode: change-log
16963 left-margin: 8
16964 fill-column: 74
16965 version-control: never
16966 coding: utf-8
16967 End: