]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Define YYOBJ in terms of YYFILES
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
afa0a411
TT
12017-11-27 Tom Tromey <tom@tromey.com>
2
3 * Makefile.in (YYFILES): Update comment.
4 (YYOBJ): Redefine.
5
8fd8d003
TT
62017-11-27 Tom Tromey <tom@tromey.com>
7
8 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
9 (CONFIG_SRC_SUBDIR): Add python.
10 (%.o): Remove python rule.
11 (python/%.o): New rule.
12 * configure: Rebuild.
13 * configure.ac (CONFIG_OBS): Refer to python/python.o
14
bd810fff
TT
152017-11-27 Tom Tromey <tom@tromey.com>
16
17 * configure: Rebuild.
18 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
19 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
20 (CONFIG_SRC_SUBDIR): Add guile.
21 (%.o): Remove guile rule.
22
75787ac1
TT
232017-11-27 Tom Tromey <tom@tromey.com>
24
25 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
26 (%.o): Remove unittests rule.
27 (CONFIG_SRC_SUBDIR): Add unittests.
28
5c8a9431
TT
292017-11-27 Tom Tromey <tom@tromey.com>
30
31 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
32 (CONFIG_SRC_SUBDIR): Add tui.
33 (%.o): Remove tui rule.
34
a26aa30c
TT
352017-11-27 Tom Tromey <tom@tromey.com>
36
37 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
38 (%.o): Remove compile rule.
39 (CONFIG_SRC_SUBDIR): Add compile.
40
6f3cdf9a
TT
412017-11-27 Tom Tromey <tom@tromey.com>
42
43 * Makefile.in (SUBDIR_MI_OBS): Redefine.
44 (%.o): Remove mi rule.
45 (CONFIG_SRC_SUBDIR): Add mi.
46 (COMMON_OBS): Use mi/mi-common.o
47
f06afa53
TT
482017-11-27 Tom Tromey <tom@tromey.com>
49
50 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
51 (%.o): Remove cli rule.
52 (CONFIG_SRC_SUBDIR): Add cli.
53
b22c88c2
TT
542017-11-27 Tom Tromey <tom@tromey.com>
55
56 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
57 * configure: Rebuild.
58 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
59 (CONFIG_DEP_SUBDIR): New variable.
60 (%.o): Add order-only dependency.
61 ($(CONFIG_DEP_SUBDIR)): New target.
62
ee9a09e9
DC
632017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
64
65 PR gdb/21945
66 * findcmd.c (_initialize_mem_search): Update find command help
67 text.
68
e8e7d10c
SM
692017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
70
71 * python/python.c (do_start_initialization): Change progname
72 type to gdb::unique_xmalloc_ptr. Release the pointer when using
73 Python 2.
74
6a997029
TT
752017-11-26 Tom Tromey <tom@tromey.com>
76
77 * common/format.h: Add include guards.
78
41272101
TT
792017-11-26 Tom Tromey <tom@tromey.com>
80
81 * nat/linux-personality.h (class
82 maybe_disable_address_space_randomization): New class.
83 (maybe_disable_address_space_randomization): Don't declare
84 function.
85 * nat/linux-personality.c (restore_personality)
86 (make_disable_asr_cleanup): Remove.
87 (maybe_disable_address_space_randomization): Now a constructor.
88 (~maybe_disable_address_space_randomization): New destructor.
89 * linux-nat.c (linux_nat_create_inferior): Update.
90
44287fd8
TT
912017-11-26 Tom Tromey <tom@tromey.com>
92
93 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
94
5ffd2cb7
UW
952017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
96
97 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
98 "cooked" register. Access only first four bytes of branch target
99 registers.
100
0e5457dc
SDJ
1012017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
102
103 PR gdb/22491
104 * stap-probe.c (relocate_address): New function.
105 (stap_probe::get_relocated_address): Use 'relocate_address'.
106 (stap_probe::set_semaphore): Use 'relocate_address' and pass
107 'm_sem_addr'.
108 (stap_probe::clear_semaphore): Likewise.
109
deeeba55
PA
1102017-11-25 Pedro Alves <palves@redhat.com>
111
112 * dictionary.c: Include "safe-ctype.h".
113 * minsyms.c: Include "safe-ctype.h".
114 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
115
a81aaca0
PA
1162017-11-25 Pedro Alves <palves@redhat.com>
117
118 * completer.c (complete_line_internal_1): Skip spaces until the
119 start of the command.
120
0662b6a7
PA
1212017-11-24 Pedro Alves <palves@redhat.com>
122
123 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
124 cp_fq_symbol_name_matches. Pass language_cplus to
125 strncmp_with_mode.
126 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
127 (selftests::test_cp_symbol_name_cmp): New.
128 (_initialize_cp_support): Register "cp_symbol_name_matches"
129 selftests.
130 * language.c (default_symbol_name_matcher): Pass language_minimal
131 to strncmp_iw_with_mode.
132 * utils.c: Include "cp-support.h" and <algorithm>.
133 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
134 (cp_is_operator): New functions.
135 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
136 skip whitespace in the symbol name when the lookup name doesn't
137 have spaces, and vice versa.
138 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
139 * utils.h (strncmp_iw_with_mode): Add language parameter.
140
e547c119
JB
1412017-11-24 Joel Brobecker <brobecker@adacore.com>
142
143 * ada-lang.c (ada_exception_message_1, ada_exception_message):
144 New functions.
145 (print_it_exception): If available, display the exception
146 message as well.
147 * NEWS: Document new feature.
148
d7fcdff9
UW
1492017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
150
151 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
152
30649c14
PR
1532017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
154
155 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
156 (dtrace_probe::is_enabled, dtrace_probe::enable)
157 (dtrace_probe::disable): Remove keyword 'struct' at for-range
158 variable
159 * probe.c (gen_ui_out_table_header_info)
160 (print_ui_out_not_applicables): Remove keyword 'struct' at
161 for-range variable
162
7696f5c9
AH
1632017-11-24 Alan Hayward <alan.hayward@arm.com>
164
165 * configure.tgt: Add arch/aarch64.o
166
8172f16b
SM
1672017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
168
169 * common/common-utils.h: Include poison.h.
170 (xfree): Remove declaration, add definition with static_assert.
171 * common/common-utils.c (xfree): Remove.
172 * common/poison.h (IsMallocatable): Define.
173 (IsFreeable): Define.
174 (free): Delete for non-freeable types.
175 (xnew): New.
176 (XNEW): Undef and redefine.
177 (xcnew): New.
178 (XCNEW): Undef and redefine.
179 (xdelete): New.
180 (XDELETE): Undef and redefine.
181 (xnewvec): New.
182 (XNEWVEC): Undef and redefine.
183 (xcnewvec): New.
184 (XCNEWVEC): Undef and redefine.
185 (xresizevec): New.
186 (XRESIZEVEC): Undef and redefine.
187 (xdeletevec): New.
188 (XDELETEVEC): Undef and redefine.
189 (xnewvar): New.
190 (XNEWVAR): Undef and redefine.
191 (xcnewvar): New.
192 (XCNEWVAR): Undef and redefine.
193 (xresizevar): New.
194 (XRESIZEVAR): Undef and redefine.
195
7aabaf9d
SM
1962017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
197
198 * gdbthread.h (private_thread_info): Define structure type, add
199 virtual pure destructor.
200 (thread_info) <priv>: Change type to unique_ptr.
201 <private_dtor>: Remove.
202 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
203 (private_thread_info::~private_thread_info): Provide default
204 implementation.
205 (thread_info::~thread_info): Don't call private_dtor nor
206 manually free priv.
207 * aix-thread.c (private_thread_info): Rename to ...
208 (aix_thread_info): ... this.
209 (get_aix_thread_info): New.
210 (sync_threadlists): Adjust.
211 (iter_tid): Adjust.
212 (aix_thread_resume): Adjust.
213 (aix_thread_fetch_registers): Adjust.
214 (aix_thread_store_registers): Adjust.
215 (aix_thread_extra_thread_info): Adjust.
216 * darwin-nat.h (private_thread_info): Rename to ...
217 (darwin_thread_info): ... this.
218 (get_darwin_thread_info): New.
219 * darwin-nat.c (darwin_init_thread_list): Adjust.
220 (darwin_check_new_threads): Adjust.
221 (thread_info_from_private_thread_info): Adjust.
222 * linux-thread-db.c (private_thread_info): Rename to ...
223 (thread_db_thread_info): ... this, initialize fields.
224 (get_thread_db_thread_info): New.
225 <dying>: Change type to bool.
226 (update_thread_state): Adjust to type rename.
227 (record_thread): Adjust to type rename an use of unique_ptr.
228 (thread_db_pid_to_str): Likewise.
229 (thread_db_extra_thread_info): Likewise.
230 (thread_db_thread_handle_to_thread_info): Likewise.
231 (thread_db_get_thread_local_address): Likewise.
232 * nto-tdep.h (private_thread_info): Rename to ...
233 (nto_thread_info): ... this, initialize fields.
234 (get_nto_thread_info): New.
235 <name>: Change type to std::string.
236 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
237 use of unique_ptr.
238 * nto-procfs.c (update_thread_private_data_name): Adjust to
239 std::string change, allocate nto_private_thread_info with new.
240 (update_thread_private_data): Adjust to unique_ptr.
241 * remote.c (private_thread_info): Rename to ...
242 (remote_thread_info): ... this, initialize data members with
243 default values.
244 <extra, name>: Change type to std::string.
245 <thread_handle>: Change type to non-pointer.
246 (free_private_thread_info): Remove.
247 (get_private_info_thread): Rename to...
248 (get_remote_thread_info): ... this, change return type, adjust to
249 use of unique_ptr, use remote_thread_info constructor.
250 (remote_add_thread): Adjust.
251 (get_private_info_ptid): Rename to...
252 (get_remote_thread_info): ...this, change return type.
253 (remote_thread_name): Use get_remote_thread_info, adjust to
254 change to std::string.
255 (struct thread_item) <~thread_item>: Remove.
256 <thread_handle>: Make non pointer.
257 (start_thread): Adjust to thread_item::thread_handle type
258 change.
259 (remote_update_thread_list): Adjust to type name change, move
260 strings from temporary to long-lived object instead of
261 duplicating.
262 (remote_threads_extra_info): Use get_remote_thread_info.
263 (process_initial_stop_replies): Likewise.
264 (resume_clear_thread_private_info): Likewise.
265 (remote_resume): Adjust to type name change.
266 (remote_commit_resume): Use get_remote_thread_info.
267 (process_stop_reply): Adjust to type name change.
268 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
269 (remote_stopped_by_hw_breakpoint): Likewise.
270 (remote_stopped_by_watchpoint): Likewise.
271 (remote_stopped_data_address): Likewise.
272 (remote_core_of_thread): Likewise.
273 (remote_thread_handle_to_thread_info): Use
274 get_private_info_thread, adjust to thread_handle field type
275 change.
276
21fe1c75
SM
2772017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
278
279 * remote.c (struct thread_item): Add constructor, disable copy
280 construction and copy assignment, define default move
281 construction and move assignment.
282 <extra, name>: Change type to std::string.
283 <core>: Initialize.
284 <thread_handle>: Make non-pointer.
285 (thread_item_t): Remove typedef.
286 (DEF_VEC_O(thread_item_t)): Remove.
287 (threads_listing_context) <contains_thread>: New method.
288 <remove_thread>: New method.
289 <items>: Change type to std::vector.
290 (clear_threads_listing_context): Remove.
291 (threads_listing_context_remove): Remove.
292 (remote_newthread_step): Use thread_item constructor, adjust to
293 change to std::vector.
294 (start_thread): Use thread_item constructor, adjust to change to
295 std::vector.
296 (end_thread): Adjust to change to std::vector and std::string.
297 (remote_get_threads_with_qthreadinfo): Use thread_item
298 constructor, adjust to std::vector.
299 (remote_update_thread_list): Adjust to change to std::vector and
300 std::string, use threads_listing_context methods.
301 (remove_child_of_pending_fork): Adjust.
302 (remove_new_fork_children): Adjust.
303 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
304 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
305 * unittests/rsp-low-selftests.c: New file.
306 * common/rsp-low.h: Include common/byte-vector.h.
307 (hex2bin): New overload.
308 * common/rsp-low.c (hex2bin): New overload.
309
089354bb
SM
3102017-11-24 Simon Marchi <simon.marchi@ericsson.com>
311
312 * inferior.h (private_inferior): Define structure type, add
313 virtual pure destructor.
314 (inferior) <priv>: Change type to unique_ptr.
315 * inferior.c (private_inferior::~private_inferior): Provide
316 default implementation.
317 (inferior::~inferior): Don't free priv field.
318 (exit_inferior_1): Likewise.
319 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
320 (darwin_exception_info): Remove typedef.
321 (DEF_VEC_O (darwin_thread_t)); Remove.
322 (private_inferior): Rename to ...
323 (darwin_private_inferior): ... this, extend private_inferior.
324 (get_darwin_inferior): New.
325 <threads>: Change type to std::vector of darwin_thread_t pointers.
326 * darwin-nat.c (darwin_check_new_threads): Adjust.
327 (find_inferior_task_it): Adjust.
328 (darwin_find_thread); Adjust.
329 (darwin_suspend_inferior): Adjust.
330 (darwin_resume_inferior): Adjust.
331 (darwin_find_new_inferior): Adjust.
332 (darwin_decode_notify_message): Adjust.
333 (darwin_send_reply): Adjust.
334 (darwin_resume_inferior_threads): Adjust.
335 (darwin_suspend_inferior_threads): Adjust.
336 (darwin_decode_message): Adjust.
337 (darwin_wait): Adjust.
338 (darwin_interrupt): Adjust.
339 (darwin_deallocate_threads): Adjust.
340 (darwin_mourn_inferior): Adjust, don't free private data.
341 (darwin_reply_to_all_pending_messages): Adjust.
342 (darwin_stop_inferior): Adjust.
343 (darwin_setup_exceptions): Adjust.
344 (darwin_kill_inferior): Adjust.
345 (darwin_setup_request_notification): Adjust.
346 (darwin_attach_pid): Adjust.
347 (darwin_init_thread_list): Adjust.
348 (darwin_setup_fake_stop_event): Adjust.
349 (darwin_attach): Adjust.
350 (darwin_detach): Adjust.
351 (darwin_xfer_partial): Adjust.
352 (set_enable_mach_exceptions): Adjust.
353 (darwin_pid_to_exec_file): Adjust.
354 (darwin_get_ada_task_ptid): Adjust.
355 * darwin-nat-info.c (get_task_from_args): Adjust.
356 (info_mach_ports_command): Adjust.
357 (info_mach_region_command): Adjust.
358 (info_mach_exceptions_command): Adjust.
359 * remote.c (private_inferior): Rename to ...
360 (remote_private_inferior): ... this, initialize fields.
361 (get_remote_inferior); New.
362 (remote_commit_resume): Use get_remote_inferior.
363 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
364
d044bac8
PA
3652017-11-24 Pedro Alves <palves@redhat.com>
366
367 * NEWS: Mention linespecs and explicit locations, and completion
368 improvements.
369
e8d58cba
YQ
3702017-11-24 Yao Qi <yao.qi@linaro.org>
371
372 * regcache.c (regcache::dump): Remove footnote_register_size.
373
a63f2d2f
YQ
3742017-11-24 Yao Qi <yao.qi@linaro.org>
375
376 * regcache.c (cooked_read_test): Add more test for readonly
377 regcache.
378
1b30aaa5
YQ
3792017-11-24 Yao Qi <yao.qi@linaro.org>
380
381 * gdbarch-selftests.c (test_target_has_registers): Move it to
382 target.c.
383 (test_target_has_stack): Likewise.
384 (test_target_has_memory): Likewise.
385 (test_target_prepare_to_store): Likewise.
386 (test_target_store_registers): Likewise.
387 (test_target_ops): Likewise.
388 * regcache.c: Include selftest-arch.h and gdbthread.h.
389 (target_ops_no_register): New class.
390 (test_target_fetch_registers): New.
391 (test_target_store_registers): New.
392 (test_target_xfer_partial): New.
393 (readwrite_regcache): New.
394 (cooked_read_test): New.
395 (_initialize_regcache): Register the test.
396 * target.c: (test_target_has_registers): Moved from
397 gdbarch-selftests.c.
398 (test_target_has_stack): Likewise.
399 (test_target_has_memory): Likewise.
400 (test_target_prepare_to_store): Likewise.
401 (test_target_store_registers): Likewise.
402 * target.h (test_target_ops): New class.
403
6654d750
AH
4042017-11-24 Alan Hayward <alan.hayward@arm.com>
405
406 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
407 selftest.
408
49bdb7ee
AH
4092017-11-24 Alan Hayward <alan.hayward@arm.com>
410
411 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
412 * arch/aarch64.c (aarch64_create_target_description): Create
413 new target description.
414 * features/Makefile: Add new files.
415 * features/aarch64.c: Remove file.
416 * features/aarch64-core.c: New autogenerated file.
417 * features/aarch64-fpu.c: New autogenerated file.
418 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
419
4202017-11-24 Alan Hayward <alan.hayward@arm.com>
421
422 * Makefile.in: Add new files.
423 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
424 aarch64_read_description.
425 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
426 Call aarch64_read_description.
427 * aarch64-tdep.c (aarch64_read_description): New function.
428 (aarch64_gdbarch_init): Call aarch64_read_description.
429 * aarch64-tdep.h (aarch64_read_description): New function.
430 * arch/aarch64.c: New file.
431 * configure.tgt: Add new files.
432
98ead37e
YQ
4332017-11-24 Yao Qi <yao.qi@linaro.org>
434
435 * mi/mi-main.c (register_changed_p): Update.
436 * value.c (value_contents_bits_eq): Change return type.
437 (value_contents_eq): Likewise.
438 * value.h: Update comments.
439
62ad7ce7
YQ
4402017-11-24 Yao Qi <yao.qi@linaro.org>
441
442 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
443 local 'changed'. Remove error.
444 (register_changed_p): Change return type to bool.
445
506fe5f4
YQ
4462017-11-24 Yao Qi <yao.qi@linaro.org>
447
448 * arch/tic6x.c: New file.
449 * arch/tic6x.h: New file.
450 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
451 tic6x-core.xml and tic6x-gp.xml.
452 * features/tic6x-c6xp.c: Generated.
453 * features/tic6x-core.c: Generated.
454 * features/tic6x-gp.c: Generated.
455 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
456 "tic6x-".
457
00ea2e2a
SM
4582017-11-23 Simon Marchi <simon.marchi@ericsson.com>
459
460 * mi/mi-main.c (list_available_thread_groups): Change map value
461 type to std::vector.
462
f45e2a77
SM
4632017-11-23 Simon Marchi <simon.marchi@ericsson.com>
464
465 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
466
bd046f64
SM
4672017-11-23 Simon Marchi <simon.marchi@ericsson.com>
468
469 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
470 back to...
471 <children_requested>: ... this.
472 (varobj_get_num_children, varobj_update): Adjust.
473
4c37490d
SM
4742017-11-23 Simon Marchi <simon.marchi@ericsson.com>
475
476 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
477 (ada_value_has_mutated): Likewise.
478 * c-varobj.c (varobj_is_anonymous_child): Likewise.
479 (c_is_path_expr_parent): Likewise.
480 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
481 (mi_cmd_var_set_frozen): Likewise.
482 (mi_cmd_var_update_iter): Likewise.
483 (mi_cmd_var_update): Likewise.
484 * varobj.c (pretty_printing): Likewise.
485 (varobj_enable_pretty_printing): Likewise.
486 (struct varobj_root) <floating, is_valid>: Likewise.
487 (struct varobj_dynamic) <children_requested>: Likewise.
488 (delete_variable): Likewise.
489 (delete_variable_1): Likewise.
490 (install_variable): Likewise.
491 (update_type_if_necessary): Likewise.
492 (install_new_value): Likewise.
493 (value_of_root): Likewise.
494 (is_root_p): Likewise.
495 (varobj_create): Likewise.
496 (varobj_delete): Likewise.
497 (varobj_has_more): Likewise.
498 (varobj_set_frozen): Likewise.
499 (varobj_get_frozen): Likewise.
500 (install_dynamic_child): Likewise.
501 (dynamic_varobj_has_child_method): Likewise.
502 (update_dynamic_varobj_children): Likewise.
503 (varobj_get_num_children): Likewise.
504 (varobj_list_children): Likewise.
505 (is_path_expr_parent): Likewise.
506 (varobj_default_is_path_expr_parent): Likewise.
507 (varobj_is_dynamic_p): Likewise.
508 (varobj_set_value): Likewise.
509 (varobj_value_has_mutated): Likewise.
510 (varobj_update): Likewise.
511 (check_scope): Likewise.
512 (value_of_root_1): Likewise.
513 (varobj_value_get_print_value): Likewise.
514 (varobj_editable_p): Likewise.
515 (varobj_value_is_changeable_p): Likewise.
516 (varobj_floating_p): Likewise.
517 (varobj_default_value_is_changeable_p): Likewise.
518 (varobj_invalidate_iter): Likewise.
519 * varobj.h (struct varobj_update_result) <type_changed,
520 children_changed, changed, value_installed>: Likewise.
521 (struct varobj) <updated, frozen, not_fetched>: Likewise.
522 (struct lang_varobj_ops) <value_is_changeable_p,
523 value_has_mutated, is_path_expr_parent>: Likewise.
524 (varobj_delete): Likewise.
525 (varobj_set_frozen): Likewise.
526 (varobj_get_frozen): Likewise.
527 (varobj_set_value): Likewise.
528 (varobj_update): Likewise.
529 (varobj_editable_p): Likewise.
530 (varobj_floating_p): Likewise.
531 (varobj_has_more): Likewise.
532 (varobj_is_dynamic_p): Likewise.
533 (varobj_default_value_is_changeable_p): Likewise.
534 (varobj_value_is_changeable_p): Likewise.
535 (varobj_is_anonymous_child): Likewise.
536 (varobj_default_is_path_expr_parent): Likewise.
537
9c23b42f
SDJ
5382017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
539
540 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
541 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
542 <type_str>: Convert to 'std::string'.
543 <expr>: Convert to 'expression_up'.
544 (dtrace_probe_arg_s): Delete type and VEC.
545 (dtrace_probe_enabler_s): Likewise.
546 (struct dtrace_probe): Replace by...
547 (class dtrace_static_probe_ops): ...this and...
548 (class dtrace_probe): ...this.
549 (dtrace_probe_is_linespec): Rename to...
550 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
551 to reflect change.
552 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
553 Adjust code. Create new instance of 'dtrace_probe'.
554 (dtrace_build_arg_exprs): Rename to...
555 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
556 reflect change.
557 (dtrace_get_probes): Rename to...
558 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
559 to reflect change.
560 (dtrace_get_arg): Rename to...
561 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
562 reflect change.
563 (dtrace_probe_is_enabled): Rename to...
564 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
565 change.
566 (dtrace_get_probe_address): Rename to...
567 (dtrace_probe::get_relocated_address): ...this. Adjust code
568 to reflect change.
569 (dtrace_get_probe_argument_count): Rename to...
570 (dtrace_probe::get_argument_count): ...this. Adjust code to
571 reflect change.
572 (dtrace_can_evaluate_probe_arguments): Rename to...
573 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
574 to reflect change.
575 (dtrace_evaluate_probe_argument): Rename to...
576 (dtrace_probe::evaluate_argument): ...this. Adjust code to
577 reflect change.
578 (dtrace_compile_to_ax): Rename to...
579 (dtrace_probe::compile_to_ax): ...this. Adjust code to
580 reflect change.
581 (dtrace_probe_destroy): Delete.
582 (dtrace_type_name): Rename to...
583 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
584 reflect change.
585 (dtrace_probe::get_static_ops): New method.
586 (dtrace_gen_info_probes_table_header): Rename to...
587 (dtrace_static_probe_ops::gen_info_probes_table_header):
588 ...this. Adjust code to reflect change.
589 (dtrace_gen_info_probes_table_values): Rename to...
590 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
591 code to reflect change.
592 (dtrace_enable_probe): Rename to...
593 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
594 change.
595 (dtrace_disable_probe): Rename to...
596 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
597 change.
598 (struct probe_ops dtrace_probe_ops): Delete.
599 (info_probes_dtrace_command): Call 'info_probes_for_spops'
600 instead of 'info_probes_for_ops'.
601 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
602 of 'all_probe_ops'.
603
0e9ae10f
SDJ
6042017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
605 Simon Marchi <simark@simark.ca>
606
607 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
608 variable.
609 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
610 <aexpr>: Change type to 'expression_up'.
611 (stap_probe_arg_s): Delete type and VEC.
612 (struct stap_probe): Delete. Replace by...
613 (class stap_static_probe_ops): ...this and...
614 (class stap_probe): ...this. Rename variables to add 'm_'
615 prefix. Do not use 'union' for arguments anymore.
616 (stap_get_expected_argument_type): Receive probe name instead
617 of 'struct stap_probe'. Adjust code.
618 (stap_parse_probe_arguments): Rename to...
619 (stap_probe::parse_arguments): ...this. Adjust code to
620 reflect change.
621 (stap_get_probe_address): Rename to...
622 (stap_probe::get_relocated_address): ...this. Adjust code
623 to reflect change.
624 (stap_get_probe_argument_count): Rename to...
625 (stap_probe::get_argument_count): ...this. Adjust code
626 to reflect change.
627 (stap_get_arg): Rename to...
628 (stap_probe::get_arg_by_number'): ...this. Adjust code to
629 reflect change.
630 (can_evaluate_probe_arguments): Rename to...
631 (stap_probe::can_evaluate_arguments): ...this. Adjust code
632 to reflect change.
633 (stap_evaluate_probe_argument): Rename to...
634 (stap_probe::evaluate_argument): ...this. Adjust code
635 to reflect change.
636 (stap_compile_to_ax): Rename to...
637 (stap_probe::compile_to_ax): ...this. Adjust code to
638 reflect change.
639 (stap_probe_destroy): Delete.
640 (stap_modify_semaphore): Adjust comment.
641 (stap_set_semaphore): Rename to...
642 (stap_probe::set_semaphore): ...this. Adjust code to reflect
643 change.
644 (stap_clear_semaphore): Rename to...
645 (stap_probe::clear_semaphore): ...this. Adjust code to
646 reflect change.
647 (stap_probe::get_static_ops): New method.
648 (handle_stap_probe): Adjust code to create instance of
649 'stap_probe'.
650 (stap_get_probes): Rename to...
651 (stap_static_probe_ops::get_probes): ...this. Adjust code to
652 reflect change.
653 (stap_probe_is_linespec): Rename to...
654 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
655 reflect change.
656 (stap_type_name): Rename to...
657 (stap_static_probe_ops::type_name): ...this. Adjust code to
658 reflect change.
659 (stap_gen_info_probes_table_header): Rename to...
660 (stap_static_probe_ops::gen_info_probes_table_header):
661 ...this. Adjust code to reflect change.
662 (stap_gen_info_probes_table_values): Rename to...
663 (stap_probe::gen_info_probes_table_values): ...this. Adjust
664 code to reflect change.
665 (struct probe_ops stap_probe_ops): Delete.
666 (info_probes_stap_command): Use 'info_probes_for_spops'
667 instead of 'info_probes_for_ops'.
668 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
669 of 'all_probe_ops'.
670
935676c9
SDJ
6712017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
672
673 * break-catch-throw.c (fetch_probe_arguments): Use
674 'probe.prob' instead of 'probe.probe'.
675 * breakpoint.c (create_longjmp_master_breakpoint): Call
676 'can_evaluate_arguments' and 'get_relocated_address' methods
677 from probe.
678 (create_exception_master_breakpoint): Likewise.
679 (add_location_to_breakpoint): Use 'sal->prob' instead of
680 'sal->probe'.
681 (bkpt_probe_insert_location): Call 'set_semaphore' method from
682 probe.
683 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
684 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
685 of 'probe_ops'.
686 (probe_key_free): Call 'delete' on probe.
687 (check_exception_resume): Use 'probe.prob' instead of
688 'probe.probe'.
689 * location.c (string_to_event_location_basic): Call
690 'probe_linespec_to_static_ops'.
691 * probe.c (class any_static_probe_ops): New class.
692 (any_static_probe_ops any_static_probe_ops): New variable.
693 (parse_probes_in_pspace): Receive 'static_probe_ops' as
694 argument. Adjust code to reflect change.
695 (parse_probes): Use 'static_probe_ops' instead of
696 'probe_ops'. Adjust code to reflect change.
697 (find_probes_in_objfile): Call methods to get name and
698 provider from probe.
699 (find_probe_by_pc): Use 'result.prob' instead of
700 'result.probe'. Call 'get_relocated_address' method from
701 probe.
702 (collect_probes): Adjust comment and argument list to receive
703 'static_probe_ops' instead of 'probe_ops'. Adjust code to
704 reflect change. Call necessary methods from probe.
705 (compare_probes): Call methods to get name and provider from
706 probes.
707 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
708 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
709 adjust code accordingly.
710 (print_ui_out_not_applicables): Likewise.
711 (info_probes_for_ops): Rename to...
712 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
713 as argument instead of 'probe_ops'. Adjust code. Call
714 necessary methods from probe.
715 (info_probes_command): Use 'info_probes_for_spops'.
716 (enable_probes_command): Pass correct argument to
717 'collect_probes'. Call methods from probe.
718 (disable_probes_command): Likewise.
719 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
720 (get_probe_argument_count): Move to
721 'any_static_probe_ops::get_argument_count'.
722 (can_evaluate_probe_arguments): Move to
723 'any_static_probe_ops::can_evaluate_arguments'.
724 (evaluate_probe_argument): Move to
725 'any_static_probe_ops::evaluate_argument'.
726 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
727 'probe.probe'.
728 (probe_linespec_to_ops): Rename to...
729 (probe_linespec_to_static_ops): ...this. Adjust code.
730 (probe_any_is_linespec): Rename to...
731 (any_static_probe_ops::is_linespec): ...this.
732 (probe_any_get_probes): Rename to...
733 (any_static_probe_ops::get_probes): ...this.
734 (any_static_probe_ops::type_name): New method.
735 (any_static_probe_ops::gen_info_probes_table_header): New
736 method.
737 (compute_probe_arg): Use 'pc_probe.prob' instead of
738 'pc_probe.probe'. Call methods from probe.
739 (compile_probe_arg): Likewise.
740 (std::vector<const probe_ops *> all_probe_ops): Delete.
741 (std::vector<const static_probe_ops *> all_static_probe_ops):
742 New variable.
743 (_initialize_probe): Use 'all_static_probe_ops' instead of
744 'all_probe_ops'.
745 * probe.h (struct info_probe_column) <field_name>: Delete
746 extraneous newline
747 (info_probe_column_s): Delete type and VEC.
748 (struct probe_ops): Delete. Replace with...
749 (class static_probe_ops): ...this and...
750 (clas probe): ...this.
751 (struct bound_probe) <bound_probe>: Delete extraneous
752 newline. Adjust constructor to receive 'probe' instead of
753 'struct probe'.
754 <probe>: Rename to...
755 <prob>: ...this. Delete extraneous newline.
756 <objfile>: Delete extraneous newline.
757 (register_probe_ops): Delete unused prototype.
758 (info_probes_for_ops): Rename to...
759 (info_probes_for_spops): ...this. Adjust comment.
760 (get_probe_address): Move to 'probe::get_address'.
761 (get_probe_argument_count): Move to
762 'probe::get_argument_count'.
763 (can_evaluate_probe_arguments): Move to
764 'probe::can_evaluate_arguments'.
765 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
766 * solib-svr4.c (struct svr4_info): Adjust comment.
767 (struct probe_and_action) <probe>: Rename to...
768 <prob>: ...this.
769 (register_solib_event_probe): Receive 'probe' instead of
770 'struct probe' as argument. Use 'prob' instead of 'probe'
771 when applicable.
772 (solib_event_probe_action): Call 'get_argument_count' method
773 from probe. Adjust comment.
774 (svr4_handle_solib_event): Adjust comment. Call
775 'evaluate_argument' method from probe.
776 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
777 from probe.
778 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
779 'struct probe'. Call 'can_evaluate_arguments' from probe.
780 * symfile.h: Forward declare 'class probe' instead of 'struct
781 probe'.
782 * symtab.h: Likewise.
783 (struct symtab_and_line) <probe>: Rename to...
784 <prob>: ...this.
785 * tracepoint.c (start_tracing): Use 'prob' when applicable.
786 Call probe methods.
787 (stop_tracing): Likewise.
788
8f6cb6c3
JB
7892017-11-22 Joel Brobecker <brobecker@adacore.com>
790
791 * ravenscar-thread.c (ravenscar_inferior_created): Remove
792 trailing newline at end of string in call to warning.
793
479f8de1
SM
7942017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * osdata.h: Include vector isntead of vec.h.
797 (osdata_column_s): Remove typedef.
798 (struct osdata_column): Add constructor.
799 <name, value>: Change type to std::string.
800 (DEF_VEC_O (osdata_column_s)): Remove.
801 (osdata_item_s): Remove typedef.
802 (struct osdata_item) <columns>: Change type to std::vector.
803 (DEF_VEC_O (osdata_item_s)): Remove.
804 (struct osdata): Add constructor.
805 <type>: Change type to std::string.
806 <items>: Change type to std::vector.
807 (osdata_p): Remove typedef.
808 (DEF_VEC_P (osdata_p)): Remove.
809 (osdata_parse): Return a unique_ptr.
810 (osdata_free): Remove.
811 (make_cleanup_osdata_free): Remove.
812 (get_osdata): Return a unique_ptr.
813 (get_osdata_column): Return pointer to std::string, take a
814 reference to osdata_item as parameter.
815 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
816 unique_ptr.
817 <property_name>: Change type to std::string.
818 (osdata_start_osdata): Allocate osdata with new and adjust.
819 (osdata_start_item): Adjust.
820 (osdata_start_column): Adjust.
821 (osdata_end_column): Adjust.
822 (clear_parsing_data): Remove.
823 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
824 (osdata_item_clear): Remove.
825 (get_osdata): return a unique_ptr and adjust.
826 (get_osdata_column): Return a pointer to std::string and adjust.
827 (info_osdata): Adjust.
828 * mi/mi-main.c: Include <map>.
829 (free_vector_of_osdata_items): Remove.
830 (list_available_thread_groups): Adjust, use std::map instead of
831 splay tree.
832
41bd68f5
SM
8332017-11-22 Simon Marchi <simon.marchi@ericsson.com>
834
835 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
836 case in switch.
837
7e2fd2f4
SM
8382017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
839
840 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
841
0604393c
SM
8422017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * varobj.h (struct varobj_update_result): Add constructor, add
845 move constructor, disable copy and assign, initialize fields.
846 <newobj>: Change type to std::vector.
847 (varobj_update): Return std::vector.
848 * varobj.c (install_dynamic_child): Change VEC parameters to
849 std::vector and adjust.
850 (update_dynamic_varobj_children): Likewise.
851 (varobj_update): Return std::vector and adjust.
852 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
853
ddf0ea08
SM
8542017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
855
856 * varobj.h (struct varobj) <parent>: Remove const.
857 <children>: Change type to std::vector.
858 (varobj_list_children): Return std::vector const reference.
859 (varobj_restrict_range): Change parameter type to std::vector
860 const reference.
861 * varobj.c (varobj_has_more): Adjust.
862 (varobj_restrict_range): Change parameter type to std::vector
863 const reference and adjust.
864 (install_dynamic_child): Adjust.
865 (update_dynamic_varobj_children): Adjust.
866 (varobj_list_children): Return std::vector const reference and
867 adjust.
868 (varobj_add_child): Adjust.
869 (update_type_if_necessary): Adjust.
870 (varobj_update): Adjust.
871 (delete_variable_1): Adjust.
872 * ada-varobj.c (ada_value_has_mutated): Adjust.
873 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
874
9e5b9d2b
SM
8752017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
876
877 * varobj.h (struct varobj): Add constructor and destructor,
878 initialize fields.
879 * varobj.c (struct varobj_root): Initialize fields.
880 (struct varobj_dynamic): Initialize fields.
881 (varobj_create): Use unique_ptr instead of cleanup. Create
882 varobj with new instead of new_root_variable.
883 (delete_variable_1): Free variable with delete instead of
884 free_variable.
885 (create_child_with_value): Create variable with new instead of
886 new_variable.
887 (varobj::varobj): New.
888 (varobj::~varobj): New (body mostly coming from free_variable).
889 (new_variable): Remove.
890 (free_variable): Remove.
891 (do_free_variable_cleanup): Remove.
892 (make_cleanup_free_variable): Remove.
893
fc35dab1
UW
8942017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
895
896 * core-regset.c: Remove file.
897 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
898
2400729e
UW
8992017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
900
901 * NEWS: Document use of GNU MPFR.
902 * README: Likewise.
903
904 * Makefile.in (LIBMPFR): Add define.
905 (CLIBS): Add $(LIBMPFR).
906 * configure.ac: Add --with-mpfr configure option.
907 * configure: Regenerate.
908 * config.in: Regenerate.
909
910 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
911 (class mpfr_float_ops): New type.
912 (mpfr_float_ops::from_target): Two new overloaded functions.
913 (mpfr_float_ops::to_target): Likewise.
914 (mpfr_float_ops::to_string): New function.
915 (mpfr_float_ops::from_string): Likewise.
916 (mpfr_float_ops::to_longest): Likewise.
917 (mpfr_float_ops::from_longest): Likewise.
918 (mpfr_float_ops::from_ulongest): Likewise.
919 (mpfr_float_ops::to_host_double): Likewise.
920 (mpfr_float_ops::from_host_double): Likewise.
921 (mpfr_float_ops::convert): Likewise.
922 (mpfr_float_ops::binop): Likewise.
923 (mpfr_float_ops::compare): Likewise.
924 (get_target_float_ops): Use mpfr_float_ops if available.
925
7a26362d
UW
9262017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
927
928 * target-float.c: Do not include <math.h>.
929 Include <cmath> and <limits>.
930 (DOUBLEST): Do not define.
931 (class target_float_ops): New type.
932 (class host_float_ops): New templated type.
933 (class decimal_float_ops): New type.
934
935 (floatformat_to_doublest): Rename to ...
936 (host_float_ops<T>::from_target): ... this. Use template type T
937 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
938 (host_float_ops<T>::from_target): New overload using a type argument.
939 (floatformat_from_doublest): Rename to ...
940 (host_float_ops<T>::to_target): ... this. Use template type T
941 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
942 (host_float_ops<T>::to_target): New overload using a type argument.
943 (floatformat_printf_format): New function.
944 (struct printf_length_modifier): New templated type.
945 (floatformat_to_string): Rename to ...
946 (host_float_ops<T>::to_string): ... this. Use type instead of
947 floatformat argument. Use floatformat_printf_format and
948 printf_length_modifier. Remove special handling of invalid numbers,
949 infinities and NaN (moved to target_float_to_string).
950 (struct scanf_length_modifier): New templated type.
951 (floatformat_from_string): Rename to ...
952 (host_float_ops<T>::from_string): ... this. Use type instead of
953 floatformat argument. Use scanf_length_modifier.
954 (floatformat_to_longest): Rename to ...
955 (host_float_ops<T>::to_longest): ... this. Use type instead of
956 floatformat argument. Handle out-of-range values deterministically.
957 (floatformat_from_longest): Rename to ...
958 (host_float_ops<T>::from_longest): ... this. Use type instead of
959 floatformat argument.
960 (floatformat_from_ulongest): Rename to ...
961 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
962 floatformat argument.
963 (floatformat_to_host_double): Rename to ...
964 (host_float_ops<T>::to_host_double): ... this. Use type instead of
965 floatformat argument.
966 (floatformat_from_host_double): Rename to ...
967 (host_float_ops<T>::from_host_double): ... this. Use type instead of
968 floatformat argument.
969 (floatformat_convert): Rename to ...
970 (host_float_ops<T>::convert): ... this. Use type instead of
971 floatformat arguments. Remove handling of no-op conversions.
972 (floatformat_binop): Rename to ...
973 (host_float_ops<T>::binop): ... this. Use type instead of
974 floatformat arguments.
975 (floatformat_compare): Rename to ...
976 (host_float_ops<T>::compare): ... this. Use type instead of
977 floatformat arguments.
978
979 (match_endianness): Use type instead of length/byte_order arguments.
980 (set_decnumber_context): Likewise.
981 (decimal_from_number): Likewise. Update calls.
982 (decimal_to_number): Likewise.
983 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
984 (decimal_float_ops::to_host_double): New dummy function.
985 (decimal_float_ops::from_host_double): Likewise.
986 (decimal_to_string): Rename to ...
987 (decimal_float_ops::to_string): ... this. Use type instead of
988 length/byte_order arguments. Update calls.
989 (decimal_from_string): Rename to ...
990 (decimal_float_ops::from_string): ... this. Use type instead of
991 length/byte_order arguments. Update calls.
992 (decimal_from_longest): Rename to ...
993 (decimal_float_ops::from_longest): ... this. Use type instead of
994 length/byte_order arguments. Update calls.
995 (decimal_from_ulongest): Rename to ...
996 (decimal_float_ops::from_ulongest): ... this. Use type instead of
997 length/byte_order arguments. Update calls.
998 (decimal_to_longest): Rename to ...
999 (decimal_float_ops::to_longest): ... this. Use type instead of
1000 length/byte_order arguments. Update calls.
1001 (decimal_binop): Rename to ...
1002 (decimal_float_ops::binop): ... this. Use type instead of
1003 length/byte_order arguments. Update calls.
1004 (decimal_compare): Rename to ...
1005 (decimal_float_ops::compare): ... this. Use type instead of
1006 length/byte_order arguments. Update calls.
1007 (decimal_convert): Rename to ...
1008 (decimal_float_ops::convert): ... this. Use type instead of
1009 length/byte_order arguments. Update calls.
1010
1011 (target_float_same_category_p): New function.
1012 (target_float_same_format_p): Likewise.
1013 (target_float_format_length): Likewise.
1014 (enum target_float_ops_kind): New type.
1015 (get_target_float_ops_kind): New function.
1016 (get_target_float_ops): Three new overloaded functions.
1017
1018 (target_float_is_zero): Update call.
1019 (target_float_to_string): Add special handling of invalid numbers,
1020 infinities and NaN (moved from floatformat_to_string). Use
1021 target_float_ops callback.
1022 (target_float_from_string): Use target_float_ops callback.
1023 (target_float_to_longest): Likewise.
1024 (target_float_from_longest): Likewise.
1025 (target_float_from_ulongest): Likewise.
1026 (target_float_to_host_double): Likewise.
1027 (target_float_from_host_double): Likewise.
1028 (target_float_convert): Add special case for no-op conversions.
1029 Use target_float_ops callback.
1030 (target_float_binop): Use target_float_ops callback.
1031 (target_float_compare): Likewise.
1032
a9f26f60
YQ
10332017-11-22 Yao Qi <yao.qi@linaro.org>
1034
1035 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1036
29f9a567
YQ
10372017-11-22 Yao Qi <yao.qi@linaro.org>
1038
1039 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1040 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1041
3b1b69bf
JG
10422017-11-21 Jerome Guitton <guitton@adacore.com>
1043
1044 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1045 with event ptid from the lower layer before doing the
1046 ravenscar-specific update.
1047
54aa6c67
JB
10482017-11-21 Joel Brobecker <brobecker@adacore.com>
1049
1050 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1051 the ptid's TID is nonzero.
1052
cf3fbed4
JB
10532017-11-21 Joel Brobecker <brobecker@adacore.com>
1054
1055 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1056 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1057 Make non-static. Change return type to char *. Adjust code
1058 accordingly. Rewrite the function's documentation.
1059 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1060 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1061 we have enough debugging information in the runtime to support
1062 Ada task debugging before we enable the ravenscar-thread layer.
1063
9edcc12f
JB
10642017-11-21 Joel Brobecker <brobecker@adacore.com>
1065
1066 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1067 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1068 * ravenscar-thread.c: Add into comment.
1069 (base_magic_null_ptid): Delete.
1070 (base_ptid): Change documentation.
1071 (ravenscar_active_task): Renames ravenscar_running_thread.
1072 All callers updated throughout.
1073 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1074 (ravenscar_task_is_currently_active): Likewise.
1075 (get_base_thread_from_ravenscar_task): Ditto.
1076 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1077 (ravenscar_runtime_initialized): Likewise.
1078 (get_running_thread_id): Add new parameter "cpu". Adjust
1079 implementation to handle this new parameter.
1080 (ravenscar_fetch_registers): Small adjustment to use
1081 is_ravenscar_task and ravenscar_task_is_currently_active in
1082 order to decide whether to use the target beneath or this
1083 module's arch_ops.
1084 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1085 (ravenscar_stopped_by_sw_breakpoint): Use
1086 get_base_thread_from_ravenscar_task to get the underlying
1087 thread, rather than using base_ptid.
1088 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1089 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1090 Likewise.
1091 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1092
65d40437
JB
10932017-11-21 Joel Brobecker <brobecker@adacore.com>
1094
1095 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1096 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1097 (get_tcb_types_info): Set fieldnos.base_cpu.
1098 (read_atcb): Set task_info->base_cpu.
1099 (info_task): Print "Base CPU" info if set by runtime.
1100
e02544b2
JB
11012017-11-21 Joel Brobecker <brobecker@adacore.com>
1102
1103 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1104 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1105 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1106 New functions.
1107 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1108 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1109 to_stopped_data_address and to_core_of_thread fields of
1110 ravenscar_ops.
1111
ed0f4273
UW
11122017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1113
1114 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1115 (struct gdbarch_tdep): New member long_double_abi.
1116 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1117 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1118 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1119 format depending on long_double_abi tdep member.
1120 (ppc_floatformat_for_type): Handle __ibm128 type.
1121
0fc76421
SM
11222017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1123
1124 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1125
e6b2f5ef
PA
11262017-11-21 Pedro Alves <palves@redhat.com>
1127
1128 * dwarf2read.c (mapped_index::find_name_components_bounds)
1129 <completion mode, upper bound>: Use std::lower_bound instead of
1130 std::upper_bound.
1131 (test_mapped_index_find_name_component_bounds): Remove incorrect
1132 "t1_fund" from expected symbols.
1133
5c58de74
PA
11342017-11-21 Pedro Alves <palves@redhat.com>
1135
1136 * dwarf2read.c (mapped_index::name_components_casing): New field.
1137 (mapped_index) <build_name_components,
1138 find_name_components_bounds): Declare new methods.
1139 (mapped_index::find_name_components_bounds)
1140 (mapped_index::build_name_components): New methods, factored out
1141 from dw2_expand_symtabs_matching_symbol.
1142 (check_find_bounds_finds)
1143 (test_mapped_index_find_name_component_bounds): New.
1144 (run_test): Rename to ...
1145 (test_dw2_expand_symtabs_matching_symbol): ... this.
1146 (run_test): Reimplement.
1147
e1ef7d7a
PA
11482017-11-21 Pedro Alves <palves@redhat.com>
1149
1150 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1151 (symbol_end): Use cp_ident_is_alnum.
1152 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1153 * dwarf2read.c (make_sort_after_prefix_name): New function.
1154 (dw2_expand_symtabs_matching_symbol): Use it.
1155 (test_symbols): Add more symbols.
1156 (run_test): Add tests.
1157
cf724bc9
TT
11582017-11-17 Tom Tromey <tom@tromey.com>
1159
1160 * symtab.h (enum symbol_subclass_kind): New.
1161 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1162 Remove.
1163 <subclass>: New member.
1164 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1165 * rust-lang.c (rust_get_trait_object_pointer): Update.
1166 * dwarf2read.c (read_func_scope): Update.
1167 (read_variable): Update.
1168
68e745e3
TT
11692017-11-17 Tom Tromey <tom@tromey.com>
1170
1171 * dwarf2read.c (read_func_scope): Update.
1172 * symtab.h (struct template_symbol): Derive from symbol.
1173 <base>: Remove.
1174
71a3c369
TT
11752017-11-17 Tom Tromey <tom@tromey.com>
1176
1177 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1178 (struct rust_vtable_symbol): New.
1179 (find_symbol_at_address): Declare.
1180 * symtab.c (find_symbol_at_address): New function.
1181 * symfile.h (struct quick_symbol_functions)
1182 <find_compunit_symtab_by_address>: New member.
1183 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1184 function.
1185 (debug_sym_quick_functions): Link to
1186 debug_qf_find_compunit_symtab_by_address.
1187 * rust-lang.c (rust_get_trait_object_pointer): New function.
1188 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1189 rust_get_trait_object_pointer.
1190 * psymtab.c (psym_relocate): Clear psymbol_map.
1191 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1192 functions.
1193 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1194 * objfiles.h (struct objfile) <psymbol_map>: New member.
1195 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1196 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1197 (rust_containing_type, read_variable): New functions.
1198
7468702d
SM
11992017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1200
1201 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1202
37269bc9
SM
12032017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1204
1205 * common/filestuff.c: Include <algorithm>.
1206 (open_fds): Change type to std::vector<int>.
1207 (do_mark_open_fd): Adjust.
1208 (unmark_fd_no_cloexec): Adjust.
1209 (do_close): Adjust.
1210
5c632425
SM
12112017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1212
1213 * breakpoint.c (output_thread_groups): Take an std::vector.
1214 (print_one_breakpoint_location): Adjust.
1215
ced9779b
JB
12162017-11-17 Joel Brobecker <brobecker@adacore.com>
1217
1218 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1219 (ada_evaluate_subexp_for_cast): New function.
1220 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1221 ada_evaluate_subexp_for_cast.
1222 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1223 eval_skip_value.
1224 * eval.c (evaluate_var_value): Make non-static.
1225 (evaluate_var_msym_value, eval_skip_value): Likewise.
1226 * value.h (evaluate_var_value, evaluate_var_msym_value)
1227 (eval_skip_value): Declare.
1228
b7e22850
JB
12292017-11-16 Joel Brobecker <brobecker@adacore.com>
1230
1231 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1232 Update all callers.
1233
9ccabccd
PA
12342017-11-16 Pedro Alves <palves@redhat.com>
1235
1236 * python/py-unwind.c (pyuw_sniffer): Translate
1237 PyExc_KeyboardInterrupt to a GDB Quit exception.
1238
d930703d
PA
12392017-11-16 Pedro Alves <palves@redhat.com>
1240
1241 * infrun.c (resume_cleanups): Delete.
1242 (resume): No longer install a resume_cleanups cleanup nor call
1243 QUIT.
1244 (proceed): Pass the terminal to the inferior.
1245 (keep_going_pass_signal): No longer install a resume_cleanups
1246 cleanup.
1247
38dc2859
PA
12482017-11-16 Pedro Alves <palves@redhat.com>
1249
1250 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1251 if the prompt is blocked.
1252
688fca4f
PA
12532017-11-16 Pedro Alves <palves@redhat.com>
1254
1255 * breakpoint.c (insert_bp_location): Replace bp_err and
1256 bp_err_message locals by a gdb_exception local.
1257
e2c33ac7
PA
12582017-11-16 Pedro Alves <palves@redhat.com>
1259
1260 * inflow.c (scoped_ignore_sigttou): New class.
1261 (child_terminal_ours_1, new_tty): Use it.
1262
d7236961
UW
12632017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1264
1265 * target-float.c (decimal_from_number): Add byte_order argument and
1266 call match_endianness. Error if unknown floating-point type.
1267 (decimal_to_number): Add byte_order argument and call match_endianness.
1268 (decimal_from_longest): Update call. Do not call match_endianness.
1269 (decimal_from_ulongest): Likewise.
1270 (decimal_binop): Likewise.
1271 (decimal_is_zero): Likewise.
1272 (decimal_compare): Likewise.
1273 (decimal_convert): Likewise.
1274
d8ae99a7
PM
12752017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1276
1277 * python/python.c (gdbpy_rbreak): New function.
1278 * NEWS: Document Python rbreak feature.
1279
c632b645
YQ
12802017-11-16 Yao Qi <yao.qi@linaro.org>
1281
1282 * features/tic6x-c62x.xml: Remove.
1283 * features/tic6x-c64x.xml: Remove.
1284 * features/tic6x-c64xp.xml: Remove.
1285
a014b87a
JB
12862017-11-15 John Baldwin <jhb@FreeBSD.org>
1287
1288 * symtab.h: Include <array>.
1289
94765011
JB
12902017-11-15 John Baldwin <jhb@FreeBSD.org>
1291
1292 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1293 (bsd_kvm_proc_cmd): Likewise.
1294
625ad440
SM
12952017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * tui/tui-win.c (window_name_completer): Replace VEC with
1298 std::vector.
1299
c0c11fa9
AC
13002017-11-15 Andrew Cagney <cagney@gnu.org>
1301
1302 * MAINTAINERS: Remove no-longer applicable entries.
1303
34a7ebaf
AC
13042017-11-15 Andrew Cagney <cagney@gnu.org>
1305
1306 * MAINTAINERS: Move self to Past Maintainers.
1307
5334ef39
YQ
13082017-11-15 Yao Qi <yao.qi@linaro.org>
1309
1310 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1311 * features/nios2-linux.c: Remove.
1312 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1313 initialize_tdesc_nios2_linux.
1314
a714b0d6
YQ
13152017-11-15 Yao Qi <yao.qi@linaro.org>
1316
1317 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1318 M68HC11_LAST_HARD_REG + 1.
1319
92ffd475
PC
13202017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1321
1322 PR gdb/22388
1323 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1324 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1325 Return TARGET_XFER_EOF if size of returned data is 0.
1326
07431908
SM
13272017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1328
1329 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1330 memory-map-selftests.c.
1331 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1332 * memory-map.c (memory_map_start_memory): Fix computation of hi
1333 address.
1334 * unittests/memory-map-selftests.c: New file.
1335
31432a67
JB
13362017-11-09 Joel Brobecker <brobecker@adacore.com>
1337
1338 * ada-lang.c: Fix some typos in the general command documenting
1339 how Ada expressions are being evaluated and how their result
1340 is printed.
1341
e793c052
TT
13422017-11-09 Tom Tromey <tom@tromey.com>
1343
1344 * psymtab.c (psymbol_hash): Do not hash string contents.
1345 (psymbol_compare): Add comment.
1346
7e8835c5
TT
13472017-11-09 Tom Tromey <tom@tromey.com>
1348
1349 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1350
286acbb5
JB
13512017-11-08 Joel Brobecker <brobecker@adacore.com>
1352
1353 * ada-exp.y (write_var_from_sym): Remove parameter
1354 "orig_left_context". Update all callers.
1355
b44ec619
SM
13562017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * tracepoint.h (class collection_list) <stringify>: Return
1359 std::vector<std::string>.
1360 (encode_actions_rsp): Change parameters to
1361 std::vector<std::string> *.
1362 * tracepoint.c (collection_list::stringify): Return
1363 std::vector<std::string> and adjust accordingly.
1364 (encode_actions_rsp): Changee parameters to
1365 std::vector<std::string> and adjust accordingly.
1366 * remote.c (free_actions_list),
1367 free_actions_list_cleanup_wrapper): Remove.
1368 (remote_download_tracepoint): Adjust to std::vector.
1369
2f4732b0
TT
13702017-11-08 Tom Tromey <tom@tromey.com>
1371
1372 * dwarf2read.c (symbolp): Remove typedef.
1373 (read_func_scope): Use std::vector.
1374 (process_structure_scope): Use std::vector.
1375
f9d67a22
PA
13762017-11-08 Pedro Alves <palves@redhat.com>
1377
1378 * ada-lang.c (ada_make_symbol_completion_list): Use
1379 completion_skip_symbol.
1380 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1381 (symbol_is_function_or_method(symbol*)): New.
1382 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1383 completion_skip_symbol.
1384 (default_collect_symbol_completion_matches_break_on): Use
1385 completion_skip_symbol. Pass down mode.
1386 (collect_file_symbol_completion_matches): Pass down mode.
1387 * symtab.h (symbol_is_function_or_method): New declarations.
1388 (completion_skip_symbol): New template function.
1389
56d87ef7
PA
13902017-11-08 Pedro Alves <palves@redhat.com>
1391
1392 * linespec.c (iterate_over_all_matching_symtabs): Add
1393 search_domain parameter. Pass it down to expand_symtabs_matching.
1394 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1395 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1396 search_domain.
1397 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1398 Pass it down.
1399 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1400 symbols.
1401 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1402 it down.
1403
1b026119
PA
14042017-11-08 Pedro Alves <palves@redhat.com>
1405
1406 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1407 text_len locals and don't pass them down.
1408 * symtab.c (completion_list_add_name): Remove
1409 sym_text/sym_text_len parameters and adjust.
1410 (completion_list_add_symbol, completion_list_add_msymbol)
1411 (completion_list_objc_symbol, completion_list_add_fields)
1412 (add_symtab_completions): Likewise.
1413 (default_collect_symbol_completion_matches_break_on)
1414 (collect_file_symbol_completion_matches): Remove sym_text_len
1415 local and don't pass it down.
1416 * symtab.h (completion_list_add_name): Remove
1417 sym_text/sym_text_len parameters.
1418
c62446b1
PA
14192017-11-08 Pedro Alves <palves@redhat.com>
1420
1421 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1422 unittests/lookup_name_info-selftests.c.
1423 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1424 * cp-support.c: Include "selftest.h".
1425 (cp_remove_params_1): Rename from cp_remove_params. Add
1426 'require_param' parameter, and handle it.
1427 (cp_remove_params): Reimplement.
1428 (cp_remove_params_if_any): New.
1429 (selftests::quote): New.
1430 (selftests::check_remove_params): New.
1431 (selftests::test_cp_remove_params): New.
1432 (_initialize_cp_support): Install
1433 selftests::test_cp_remove_params.
1434 * cp-support.h (cp_remove_params_if_any): Declare.
1435 * dwarf2read.c :Include "selftest.h".
1436 (dw2_expand_symtabs_matching_symbol): Use
1437 lookup_name_info::make_ignore_params.
1438 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1439 (selftests::dw2_expand_symtabs_matching::string_or_null)
1440 (selftests::dw2_expand_symtabs_matching::check_match)
1441 (selftests::dw2_expand_symtabs_matching::test_symbols)
1442 (selftests::dw2_expand_symtabs_matching::run_test): New.
1443 (_initialize_dwarf2_read): Register
1444 selftests::dw2_expand_symtabs_matching::run_test.
1445 * psymtab.c (psym_expand_symtabs_matching): Use
1446 lookup_name_info::make_ignore_params.
1447 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1448 If the lookup name wants to ignore parameters, strip them.
1449 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1450 code handling '('.
1451 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1452 (default_collect_symbol_completion_matches_break_on): Don't try to
1453 strip parameters.
1454 * symtab.h (lookup_name_info::lookup_name_info): Add
1455 'ignore_parameters' parameter.
1456 (lookup_name_info::ignore_parameters)
1457 (lookup_name_info::make_ignore_params): New methods.
1458 (lookup_name_info::m_ignore_parameters): New field.
1459 * unittests/lookup_name_info-selftests.c: New file.
1460
61920122
PA
14612017-11-08 Pedro Alves <palves@redhat.com>
1462
1463 * dwarf2read.c (dw2_expand_marked_cus)
1464 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1465 (dw2_expand_symtabs_matching): Move further below.
1466 (dw2_expand_marked_cus): Reindent.
1467
3f563c84
PA
14682017-11-08 Pedro Alves <palves@redhat.com>
1469
1470 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1471 (struct name_component): New.
1472 (mapped_index::name_components): New field.
1473 (mapped_index::symbol_name_at): New method.
1474 (dwarf2_read_index): Call mapped_index ctor.
1475 (dw2_map_matching_symbols): Add comment about name_components
1476 table.
1477 (dw2_expand_symtabs_matching): Factor part to...
1478 (dw2_expand_symtabs_matching_symbol): ... this new function.
1479 Build name components table, and lookup symbols in it before
1480 calling the name matcher.
1481 (dw2_expand_marked_cus): New, factored out from
1482 dw2_expand_symtabs_matching.
1483 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1484
b5ec771e
PA
14852017-11-08 Pedro Alves <palves@redhat.com>
1486
1487 * ada-lang.c (ada_encode): Rename to ..
1488 (ada_encode_1): ... this. Add throw_errors parameter and handle
1489 it.
1490 (ada_encode): Reimplement.
1491 (match_name): Delete, folded into full_name.
1492 (resolve_subexp): No longer pass the encoded name to
1493 ada_lookup_symbol_list.
1494 (should_use_wild_match): Delete.
1495 (name_match_type_from_name): New.
1496 (ada_lookup_simple_minsym): Use lookup_name_info and the
1497 language's symbol_name_matcher_ftype.
1498 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1499 (ada_add_block_renamings): Adjust to use lookup_name_info.
1500 (ada_lookup_name): New.
1501 (add_nonlocal_symbols, ada_add_all_symbols)
1502 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1503 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1504 (ada_name_for_lookup): Delete.
1505 (ada_lookup_encoded_symbol): Construct a verbatim name.
1506 (wild_match): Reverse sense of return type. Use bool.
1507 (full_match): Reverse sense of return type. Inline bits of old
1508 match_name here.
1509 (ada_add_block_symbols): Adjust to use lookup_name_info.
1510 (symbol_completion_match): Delete, folded into...
1511 (ada_lookup_name_info::matches): ... .this new method.
1512 (symbol_completion_add): Delete.
1513 (ada_collect_symbol_completion_matches): Add name_match_type
1514 parameter. Adjust to use lookup_name_info and
1515 completion_list_add_name.
1516 (get_var_value, ada_add_global_exceptions): Adjust to use
1517 lookup_name_info.
1518 (ada_get_symbol_name_cmp): Delete.
1519 (do_wild_match, do_full_match): New functions.
1520 (ada_lookup_name_info::ada_lookup_name_info): New method.
1521 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1522 functions.
1523 (ada_language_defn): Install ada_get_symbol_name_matcher.
1524 * ada-lex.l (processId): If name starts with '<', copy it
1525 verbatim.
1526 * block.c (block_iter_match_step, block_iter_match_first)
1527 (block_iter_match_next, block_lookup_symbol)
1528 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1529 lookup_name_info.
1530 * block.h (block_iter_match_first, block_iter_match_next)
1531 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1532 * c-lang.c (c_language_defn, cplus_language_defn)
1533 (asm_language_defn, minimal_language_defn): Adjust comments to
1534 refer to la_get_symbol_name_matcher.
1535 * completer.c (complete_files_symbols)
1536 (collect_explicit_location_matches, symbol_completer): Pass a
1537 symbol_name_match_type down.
1538 * completer.h (class completion_match, completion_match_result):
1539 New classes.
1540 (completion_tracker::reset_completion_match_result): New method.
1541 (completion_tracker::m_completion_match_result): New field.
1542 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1543 lookup_name_info.
1544 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1545 functions.
1546 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1547 * d-lang.c: Adjust comments to refer to
1548 la_get_symbol_name_matcher.
1549 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1550 Adjust to use lookup_name_info.
1551 (dict_iter_match_first, dict_iter_match_next)
1552 (iter_match_first_hashed, iter_match_next_hashed)
1553 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1554 with a lookup_name_info.
1555 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1556 Likewise.
1557 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1558 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1559 (gdb_index_symbol_name_matcher): New class.
1560 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1561 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1562 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1563 with a symbol_name_match_type.
1564 (f_language_defn): Adjust comments to refer to
1565 la_get_symbol_name_matcher.
1566 * go-lang.c (go_language_defn): Adjust comments to refer to
1567 la_get_symbol_name_matcher.
1568 * language.c (default_symbol_name_matcher)
1569 (language_get_symbol_name_matcher): New functions.
1570 (unknown_language_defn, auto_language_defn): Adjust comments to
1571 refer to la_get_symbol_name_matcher.
1572 * language.h (symbol_name_cmp_ftype): Delete.
1573 (language_defn) <la_collect_symbol_completion_matches>: Add match
1574 type parameter.
1575 <la_get_symbol_name_cmp>: Delete field.
1576 <la_get_symbol_name_matcher>: New field.
1577 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1578 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1579 Declare.
1580 * linespec.c (iterate_over_all_matching_symtabs)
1581 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1582 (find_methods): Add language parameter, and use lookup_name_info
1583 and the language's symbol_name_matcher_ftype.
1584 (linespec_complete_function): Adjust.
1585 (lookup_prefix_sym): Use lookup_name_info.
1586 (add_all_symbol_names_from_pspace): Adjust.
1587 (find_superclass_methods): Add language parameter and pass it
1588 down.
1589 (find_method): Pass symbol language down.
1590 (find_linespec_symbols): Don't demangle or Ada encode here.
1591 (search_minsyms_for_name): Add lookup_name_info parameter.
1592 (add_matching_symbols_to_info): Add name_match_type parameter.
1593 Use lookup_name_info.
1594 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1595 la_get_symbol_name_matcher.
1596 * minsyms.c: Include <algorithm>.
1597 (add_minsym_to_demangled_hash_table): Remove table parameter and
1598 add objfile parameter. Use search_name_hash, and add language to
1599 demangled languages vector.
1600 (struct found_minimal_symbols): New struct.
1601 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1602 New functions.
1603 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1604 input names here. Use lookup_name_info instead. Lookup up
1605 demangled names once for each language in the demangled names
1606 vector.
1607 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1608 demangled names once for each language in the demangled names
1609 vector.
1610 (build_minimal_symbol_hash_tables): Adjust.
1611 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1612 lookup_name_info.
1613 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1614 la_get_symbol_name_matcher.
1615 * objfiles.h: Include <vector>.
1616 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1617 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1618 la_get_symbol_name_matcher.
1619 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1620 la_get_symbol_name_matcher.
1621 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1622 (match_partial_symbol): Use symbol_name_match_type,
1623 lookup_name_info and psymbol_name_matches.
1624 (lookup_partial_symbol): Use lookup_name_info.
1625 (map_block): Use symbol_name_match_type and lookup_name_info.
1626 (psym_map_matching_symbols): Use symbol_name_match_type.
1627 (psymbol_name_matches): New.
1628 (recursively_search_psymtabs): Use lookup_name_info and
1629 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1630 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1631 'kind' parameter to 'domain'.
1632 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1633 la_get_symbol_name_matcher.
1634 * symfile-debug.c (debug_qf_map_matching_symbols)
1635 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1636 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1637 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1638 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1639 Adjust to use symbol_name_match_type.
1640 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1641 (expand_symtabs_matching): Adjust to use lookup_name_info.
1642 * symmisc.c (maintenance_expand_symtabs): Use
1643 lookup_name_info::match_any ().
1644 * symtab.c (symbol_matches_search_name): New.
1645 (eq_symbol_entry): Adjust to use lookup_name_info and the
1646 language's matcher.
1647 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1648 (lookup_name_info::match_any): New.
1649 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1650 (compare_symbol_name): Add language, lookup_name_info and
1651 completion_match_result parameters, and use them.
1652 (completion_list_add_name): Make extern. Add language and
1653 lookup_name_info parameters. Use them.
1654 (completion_list_add_symbol, completion_list_add_msymbol)
1655 (completion_list_objc_symbol): Add lookup_name_info parameters and
1656 adjust. Pass down language.
1657 (completion_list_add_fields): Add lookup_name_info parameters and
1658 adjust. Pass down language.
1659 (add_symtab_completions): Add lookup_name_info parameters and
1660 adjust.
1661 (default_collect_symbol_completion_matches_break_on): Add
1662 name_match_type parameter, and use it. Use lookup_name_info.
1663 (default_collect_symbol_completion_matches)
1664 (collect_symbol_completion_matches): Add name_match_type
1665 parameter, and pass it down.
1666 (collect_symbol_completion_matches_type): Adjust.
1667 (collect_file_symbol_completion_matches): Add name_match_type
1668 parameter, and use lookup_name_info.
1669 * symtab.h: Include <string> and "common/gdb_optional.h".
1670 (enum class symbol_name_match_type): New.
1671 (class ada_lookup_name_info): New.
1672 (struct demangle_for_lookup_info): New.
1673 (class lookup_name_info): New.
1674 (symbol_name_matcher_ftype): New.
1675 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1676 (symbol_matches_search_name): Declare.
1677 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1678 (default_collect_symbol_completion_matches)
1679 (collect_symbol_completion_matches)
1680 (collect_file_symbol_completion_matches): Add name_match_type
1681 parameter.
1682 (iterate_over_symbols): Use lookup_name_info.
1683 (completion_list_add_name): Declare.
1684 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1685 (strncmp_iw_with_mode): Now extern.
1686 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1687 (strncmp_iw_with_mode): Declare.
1688
5ffa0793
PA
16892017-11-08 Keith Seitz <keiths@redhat.com>
1690 Pedro Alves <palves@redhat.com>
1691
1692 * ada-lang.c (ada_language_defn): Install
1693 default_search_name_hash.
1694 * buildsym.c (struct buildsym_compunit): <language>: New field.
1695 (finish_block_internal): Pass language when creating dictionaries.
1696 (start_buildsym_compunit, start_symtab): New language parameters.
1697 Use them.
1698 (restart_symtab): Pass down compilation unit's language.
1699 * buildsym.h (enum language): Forward declare.
1700 (start_symtab): New 'language' parameter.
1701 * c-lang.c (c_language_defn, cplus_language_defn)
1702 (asm_language_defn, minimal_language_defn): Install
1703 default_search_name_hash.
1704 * coffread.c (coff_start_symtab): Adjust.
1705 * d-lang.c (d_language_defn): Install default_search_name_hash.
1706 * dbxread.c (struct symloc): Add 'pst_language' field.
1707 (PST_LANGUAGE): Define.
1708 (start_psymtab, read_ofile_symtab): Use it.
1709 (process_one_symbol): New 'language' parameter. Pass it down.
1710 * dictionary.c (struct dictionary) <language>: New field.
1711 (DICT_LANGUAGE): Define.
1712 (dict_create_hashed, dict_create_hashed_expandable)
1713 (dict_create_linear, dict_create_linear_expandable): New parameter
1714 'language'. Set the dictionary's language.
1715 (iter_match_first_hashed): Adjust to rename.
1716 (insert_symbol_hashed): Assert we don't see mismatching
1717 languages. Adjust to rename.
1718 (dict_hash): Rename to ...
1719 (default_search_name_hash): ... this and make extern.
1720 * dictionary.h (struct language_defn): Forward declare.
1721 (dict_create_hashed): New parameter 'language'.
1722 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1723 * f-lang.c (f_language_defn): Install default_search_name_hash.
1724 * go-lang.c (go_language_defn): Install default_search_name_hash.
1725 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1726 creation.
1727 * language.c (unknown_language_defn, auto_language_defn):
1728 * language.h (language_defn::la_search_name_hash): New field.
1729 (default_search_name_hash): Declare.
1730 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1731 * mdebugread.c (new_block): New parameter 'language'.
1732 * mdebugread.c (parse_symbol): Pass symbol language to block
1733 allocation.
1734 (psymtab_to_symtab_1): Pass down language.
1735 (new_symtab): Pass compunit's language to block allocation.
1736 * objc-lang.c (objc_language_defn): Install
1737 default_search_name_hash.
1738 * opencl-lang.c (opencl_language_defn):
1739 * p-lang.c (pascal_language_defn): Install
1740 default_search_name_hash.
1741 * rust-lang.c (rust_language_defn): Install
1742 default_search_name_hash.
1743 * stabsread.h (enum language): Forward declare.
1744 (process_one_symbol): Add 'language' parameter.
1745 * symtab.c (search_name_hash): New function.
1746 * symtab.h (search_name_hash): Declare.
1747 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1748
2a1dde5d
PA
17492017-11-08 Pedro Alves <palves@redhat.com>
1750
1751 * cp-name-parser.y (main): Don't initialize extra_chars.
1752
95a6b0a1
TT
17532017-11-07 Tom Tromey <tom@tromey.com>
1754
1755 * event-top.h (command_handler): Constify.
1756 * record-full.c (cmd_record_full_start): Update.
1757 * thread.c (thread_apply_all_command): Update.
1758 * printcmd.c (eval_command): Update.
1759 * mi/mi-main.c (mi_execute_cli_command): Update.
1760 (mi_execute_async_cli_command): Update.
1761 * tui/tui-stack.c (tui_update_command): Update.
1762 * cli/cli-interp.c (safe_execute_command): Constify.
1763 * record.c (record_start): Update.
1764 (record_start, record_stop, cmd_record_start): Update.
1765 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1766 (cmd_record_btrace_pt_start): Update.
1767 (cmd_record_btrace_start): Update.
1768 (cmd_record_btrace_start): Update.
1769 * reverse.c (exec_reverse_once): Update.
1770 * python/python.c (execute_gdb_command): Don't copy the command.
1771 * event-top.c (command_line_handler): Update.
1772 (command_handler): Constify.
1773 * defs.h (deprecated_call_command_hook): Constify.
1774 * cli/cli-script.h (execute_user_command): Constify.
1775 * cli/cli-script.c (execute_user_command): Constify.
1776 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1777 (enum command_control_type): Update.
1778 * main.c (catch_command_errors): Remove non-const overload.
1779 (catch_command_errors_ftype): Remove.
1780 * python/py-cmd.c (cmdpy_function): Constify.
1781 * guile/scm-cmd.c (cmdscm_function): Constify.
1782 * cli/cli-dump.c (call_dump_func): Constify.
1783 * cli/cli-decode.c (do_const_cfunc): Constify.
1784 (do_sfunc): Constify.
1785 (cmd_func): Constify.
1786 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1787 * top.h (execute_command): Constify.
1788 * top.c (execute_command): Constify.
1789 (execute_command_to_string): Constify.
1790 (deprecated_call_command_hook): Constify.
1791 * command.h (cmd_func): Constify.
1792 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1793
eb4c3f4a
TT
17942017-11-07 Tom Tromey <tom@tromey.com>
1795
1796 * ada-lang.c (catch_ada_exception_command): Constify.
1797 (catch_assert_command): Constify.
1798 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1799 (catch_rethrow_command): Constify.
1800 (catch_exception_command_1): Constify.
1801 * breakpoint.h (add_catch_command): Constify.
1802 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1803 (catch_syscall_split_args): Constify.
1804 * break-catch-sig.c (catch_signal_command): Constify.
1805 (catch_signal_split_args): Constify.
1806 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1807 cmd_const_sfunc_ftype.
1808 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1809 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1810 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1811 (add_setshow_string_cmd, struct cmd_list_element)
1812 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1813 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1814 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1815 Constify.
1816 (set_cmd_sfunc): Constify.
1817 (empty_sfunc): Constify.
1818 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1819 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1820 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1821 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1822 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1823 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1824 Constify.
1825 (set_cmd_sfunc): Constify.
1826 (cmd_sfunc_ftype): Remove.
1827 * compile/compile.c (set_compile_args): Constify.
1828 * infrun.c (set_disable_randomization): Constify.
1829 * infcmd.c (set_args_command, set_cwd_command): Constify.
1830 * breakpoint.c (set_condition_evaluation_mode): Constify.
1831 (add_catch_command): Constify.
1832 (catch_fork_command_1, catch_exec_command_1)
1833 (catch_load_command_1, catch_unload_command_1): Constify.
1834 (catch_load_or_unload): Constify.
1835 * guile/scm-param.c (pascm_set_func): Constify.
1836 (add_setshow_generic): Constify.
1837 * python/py-param.c (get_set_value): Constify.
1838 * top.h (set_verbose): Constify.
1839 * tui/tui-win.c (tui_set_var_cmd): Constify.
1840 * mi/mi-main.c (set_mi_async_command): Constify.
1841 * cli/cli-logging.c (set_logging_overwrite)
1842 (set_logging_redirect): Constify.
1843 * value.c (set_max_value_size): Constify.
1844 * valprint.c (set_input_radix, set_output_radix): Constify.
1845 * utils.c (set_width_command, set_height_command): Constify.
1846 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1847 * tracepoint.c (set_disconnected_tracing)
1848 (set_circular_trace_buffer, set_trace_buffer_size)
1849 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1850 * top.c (set_history_size_command, set_verbose, set_editing)
1851 (set_gdb_datadir, set_history_filename): Constify.
1852 * target.c (set_targetdebug, maint_set_target_async_command)
1853 (maint_set_target_non_stop_command, set_target_permissions)
1854 (set_write_memory_permission): Constify.
1855 (open_target): Constify.
1856 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1857 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1858 * symtab.c (set_symbol_cache_size_handler): Constify.
1859 * symfile.c (set_ext_lang_command): Constify.
1860 * symfile-debug.c (set_debug_symfile): Constify.
1861 * source.c (set_directories_command): Constify.
1862 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1863 * serial.c (set_parity): Constify.
1864 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1865 * remote.c (set_remote_exec_file, set_remotebreak)
1866 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1867 * record.c (set_record_insn_history_size)
1868 (set_record_call_history_size): Constify.
1869 * record-full.c (set_record_full_insn_max_num): Constify.
1870 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1871 * osabi.c (set_osabi): Constify.
1872 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1873 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1874 * maint.c (maintenance_set_profile_cmd): Constify.
1875 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1876 * language.c (set_language_command, set_range_command)
1877 (set_case_command): Constify.
1878 * infrun.c (set_non_stop, set_observer_mode)
1879 (set_stop_on_solib_events, set_schedlock_func)
1880 (set_exec_direction_func): Constify.
1881 * infcmd.c (set_inferior_tty_command): Constify.
1882 * disasm.c (set_disassembler_options_sfunc): Constify.
1883 * demangle.c (set_demangling_command): Constify.
1884 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1885 * cris-tdep.c (set_cris_version, set_cris_mode)
1886 (set_cris_dwarf2_cfi): Constify.
1887 * corefile.c (set_gnutarget_command): Constify.
1888 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1889 (set_target_wide_charset_sfunc): Constify.
1890 * breakpoint.c (update_dprintf_commands): Constify.
1891 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1892 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1893 (set_disassembly_style_sfunc): Constify.
1894 * arch-utils.c (set_endian, set_architecture): Constify.
1895 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1896 * agent.c (set_can_use_agent): Constify.
1897
5fed81ff
TT
18982017-11-07 Tom Tromey <tom@tromey.com>
1899
1900 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1901 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1902 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1903 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1904 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1905 (parse_int_arg, show_thread_default_detach_sc_cmd)
1906 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1907 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1908 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1909 (show_task_pause_cmd, set_task_detach_sc_cmd)
1910 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1911 (set_noninvasive_cmd, set_thread_pause_cmd)
1912 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1913 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1914 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1915 * windows-nat.c (display_selectors): Constify.
1916 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1917 non-const "cfunc".
1918 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1919 (cmd_cfunc_eq): Likewise.
1920 (struct cmd_list_element): Likewise.
1921 (do_cfunc): Remove.
1922 (cli_user_command_p): Update.
1923 * command.h (add_cmd): Remove non-const overload.
1924 (cmd_cfunc_ftype): Remove typedef.
1925 (cmd_cfunc_eq): Remove non-const overload.
1926 * value.c (show_values): Constify.
1927 * thread.c (thread_apply_all_command): Constify.
1928 * symfile.c (load_command): Constify.
1929 * source.c (directory_command): Constify.
1930 * maint.c (maintenance_internal_error)
1931 (maintenance_demangler_warning, maintenance_space_display)
1932 (maintenance_print_architecture, maintenance_translate_address)
1933 (maintenance_info_selftests, maintenance_internal_warning):
1934 Constify.
1935 * breakpoint.c (disable_trace_command, enable_trace_command):
1936 Constify.
1937 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1938 Constify.
1939 (add_auto_load_safe_path): Constify.
1940 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1941 * top.h (show_commands): Constify.
1942 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1943 * sparc64-tdep.c (adi_examine_command): Constify.
1944 (adi_assign_command): Constify.
1945
1d12d88f
TT
19462017-11-07 Tom Tromey <tom@tromey.com>
1947
1948 * frame.h (info_locals_command, info_args_command): Constify.
1949 * auto-load.h (auto_load_info_scripts): Constify.
1950 * inferior.h (registers_info): Constify.
1951 * copying.c: Rebuild.
1952 * copying.awk: Constify generated commands.
1953 * auto-load.c (auto_load_info_scripts)
1954 (info_auto_load_gdb_scripts): Constify.
1955 * cli/cli-decode.c (struct cmd_list_element): Take a
1956 cmd_const_cfunc_ftype.
1957 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1958 * tui/tui-win.c (tui_all_windows_info): Constify.
1959 * python/py-auto-load.c (info_auto_load_python_scripts):
1960 Constify.
1961 * cli/cli-cmds.c (show_command): Remove non-const overload.
1962 * tracepoint.c (info_tvariables_command, info_scope_command):
1963 Constify.
1964 (info_static_tracepoint_markers_command): Constify.
1965 * thread.c (info_threads_command): Constify.
1966 (print_thread_info_1): Constify.
1967 * target.c (info_target_command): Constify.
1968 * symtab.c (info_sources_command, info_functions_command)
1969 (info_types_command): Constify.
1970 (info_variables_command): Remove non-const overload.
1971 * symfile.c (info_ext_lang_command): Constify.
1972 * stack.c (info_frame_command, info_locals_command)
1973 (info_args_command): Constify.
1974 (backtrace_command): Remove non-const overload.
1975 * source.c (info_source_command, info_line_command): Constify.
1976 * solib.c (info_sharedlibrary_command): Constify.
1977 * skip.c (info_skip_command): Constify.
1978 * ser-go32.c (info_serial_command): Constify.
1979 * reverse.c (info_bookmarks_command): Constify.
1980 * printcmd.c (info_symbol_command, info_address_command)
1981 (info_display_command): Constify.
1982 * osdata.c (info_osdata_command): Constify.
1983 * objc-lang.c (info_selectors_command, info_classes_command):
1984 Constify.
1985 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1986 * memattr.c (info_mem_command): Constify.
1987 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1988 * linux-fork.c (info_checkpoints_command): Constify.
1989 * infrun.c (info_signals_command): Constify.
1990 * inflow.c (info_terminal_command): Constify.
1991 * inferior.c (info_inferiors_command): Constify.
1992 (print_inferior): Constify.
1993 * infcmd.c (info_program_command, info_all_registers_command)
1994 (info_registers_command, info_vector_command)
1995 (info_float_command): Constify.
1996 (registers_info): Constify.
1997 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1998 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1999 Constify.
2000 * f-valprint.c (info_common_command): Constify.
2001 * dcache.c (info_dcache_command): Constify.
2002 (dcache_info_1): Constify.
2003 * darwin-nat-info.c (info_mach_tasks_command)
2004 (info_mach_task_command, info_mach_ports_command)
2005 (info_mach_port_command, info_mach_threads_command)
2006 (info_mach_thread_command, info_mach_regions_command)
2007 (info_mach_regions_recurse_command, info_mach_region_command)
2008 (info_mach_exceptions_command): Constify.
2009 (get_task_from_args): Constify.
2010 * cp-support.c (info_vtbl_command): Constify.
2011 * breakpoint.c (info_watchpoints_command)
2012 (info_tracepoints_command): Constify.
2013 (info_breakpoints_command): Remove non-const overload.
2014 * avr-tdep.c (avr_io_reg_read_command): Constify.
2015 * auxv.c (info_auxv_command): Constify.
2016 * ada-tasks.c (info_tasks_command): Constify.
2017 (info_task): Constify.
2018 * ada-lang.c (info_exceptions_command): Constify.
2019
0b39b52e
TT
20202017-11-07 Tom Tromey <tom@tromey.com>
2021
2022 * solib.h (no_shared_libraries): Constify.
2023 * frame.h (return_command): Constify.
2024 * cli/cli-cmds.h (quit_command): Constify.
2025 * top.h (quit_command, execute_command): Constify.
2026 * target.h (flash_erase_command): Constify.
2027 * inferior.h (set_inferior_args, attach_command): Constify.
2028 * tracepoint.h (start_tracing, stop_tracing): Constify.
2029 * breakpoint.h (break_command, tbreak_command)
2030 (hbreak_command_wrapper, thbreak_command_wrapper)
2031 (rbreak_command_wrapper, watch_command_wrapper)
2032 (awatch_command_wrapper, rwatch_command_wrapper)
2033 (get_tracepoint_by_number): Constify.
2034 * symtab.c (info_variables_command, rbreak_command)
2035 (symtab_symbol_info): Constify.
2036 (info_variables_command): Add non-const overload.
2037 * top.c (dont_repeat_command): Constify.
2038 * breakpoint.c (ignore_command, commands_command)
2039 (condition_command, tbreak_command, hbreak_command)
2040 (thbreak_command, clear_command, break_command)
2041 (info_breakpoints_command, watch_command, rwatch_command)
2042 (awatch_command, trace_command, ftrace_command, strace_command)
2043 (trace_pass_command, break_range_command, dprintf_command)
2044 (agent_printf_command, get_tracepoint_by_number)
2045 (watch_maybe_just_location, trace_pass_command): Constify.
2046 (info_breakpoints_command): Add non-const overload.
2047 * tracefile.c (tsave_command): Constify.
2048 * infcmd.c (attach_command, disconnect_command, signal_command)
2049 (queue_signal_command, stepi_command, nexti_command)
2050 (finish_command, next_command, step_command, until_command)
2051 (advance_command, jump_command, continue_command, run_command)
2052 (start_command, starti_command, interrupt_command)
2053 (run_command_1, set_inferior_args, step_1): Constify.
2054 * inferior.c (add_inferior_command, remove_inferior_command)
2055 (clone_inferior_command): Constify.
2056 * linux-fork.c (checkpoint_command, restart_command): Constify.
2057 * windows-nat.c (signal_event_command): Constify.
2058 * guile/guile.c (guile_repl_command, guile_command): Constify.
2059 * printcmd.c (x_command, display_command, printf_command)
2060 (output_command, set_command, call_command, print_command)
2061 (eval_command): Constify.
2062 (non_const_set_command): Remove.
2063 (_initialize_printcmd): Update.
2064 * source.c (forward_search_command, reverse_search_command):
2065 Constify.
2066 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2067 Constify.
2068 * infrun.c (handle_command): Constify.
2069 * memattr.c (mem_command): Constify.
2070 * stack.c (return_command, up_command, up_silently_command)
2071 (down_command, down_silently_command, frame_command)
2072 (backtrace_command, func_command, backtrace_command_1): Constify.
2073 (backtrace_command): Add non-const overload.
2074 * remote-sim.c (simulator_command): Constify.
2075 * exec.c (set_section_command): Constify.
2076 * tracepoint.c (tdump_command, trace_variable_command)
2077 (tstatus_command, tstop_command, tstart_command)
2078 (end_actions_pseudocommand, while_stepping_pseudocommand)
2079 (collect_pseudocommand, teval_pseudocommand, actions_command)
2080 (start_tracing, stop_tracing): Constify.
2081 * value.c (init_if_undefined_command): Constify.
2082 * tui/tui-stack.c (tui_update_command): Constify.
2083 * tui/tui-win.c (tui_refresh_all_command)
2084 (tui_set_tab_width_command, tui_set_win_height_command)
2085 (tui_set_focus_command, tui_scroll_forward_command)
2086 (tui_scroll_backward_command, tui_scroll_left_command)
2087 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2088 (tui_set_win_height): Constify.
2089 * tui/tui-layout.c (tui_layout_command): Constify.
2090 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2091 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2092 (proc_untrace_sysexit_cmd): Constify.
2093 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2094 (threadset_test_cmd, threadlist_update_test_cmd)
2095 (threadalive_test): Constify.
2096 * objc-lang.c (print_object_command): Constify.
2097 * command.h (add_com): Constify.
2098 * cli/cli-dump.c (restore_command): Constify.
2099 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2100 (help_command, complete_command, shell_command, edit_command)
2101 (list_command, disassemble_command, make_command)
2102 (apropos_command, alias_command): Constify.
2103 * cli/cli-script.c (document_command, define_command)
2104 (while_command, if_command, validate_comname): Constify.
2105 * cli/cli-decode.c (struct cmd_list_element): Change type of
2106 "fun".
2107 * target.c (do_monitor_command, flash_erase_command): Constify.
2108 * regcache.c (reg_flush_command): Constify.
2109 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2110 (reverse_nexti, reverse_continue, reverse_finish)
2111 (save_bookmark_command, goto_bookmark_command)
2112 (exec_reverse_once): Constify.
2113 * python/python.c (python_interactive_command, python_command):
2114 Constify.
2115 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2116 Constify.
2117 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2118 * gcore.c (gcore_command): Constify.
2119
85c4be7c
TT
21202017-11-07 Tom Tromey <tom@tromey.com>
2121
2122 * printcmd.c (x_command): Call set_repeat_arguments.
2123 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2124 * top.c (repeat_arguments): New global.
2125 (set_repeat_arguments): New function.
2126 (execute_command): Handle repeat_arguments.
2127 (show_commands): Calls set_repeat_arguments.
2128 * command.h (set_repeat_arguments): Declare.
2129
022643b4
TT
21302017-11-07 Tom Tromey <tom@tromey.com>
2131
2132 * stack.c (backtrace_command): Use std::string.
2133 (backtrace_command_1): Make "count_exp" const.
2134
5614fb77
TT
21352017-11-07 Tom Tromey <tom@tromey.com>
2136
2137 * source.c (directory_switch, mod_path, add_path): Constify.
2138 * defs.h (add_path, mod_path, directory_switch): Constify.
2139 * mi/mi-cmd-env.c (env_mod_path): Constify.
2140
6be9a197
TT
21412017-11-07 Tom Tromey <tom@tromey.com>
2142
2143 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2144 (run_command_1, continue_command, step_1, jump_command)
2145 (signal_command, until_command, advance_command, finish_command)
2146 (attach_command): Update.
2147
c2252c0d
TT
21482017-11-07 Tom Tromey <tom@tromey.com>
2149
2150 * command.h (set_cmd_cfunc): Don't declare.
2151 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2152
1ee870c5
TT
21532017-11-07 Tom Tromey <tom@tromey.com>
2154
2155 * stack.c (select_frame_command): Constify.
2156 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2157 * command.h (add_com_suppress_notification): Constify.
2158
ee7ddd71
TT
21592017-11-07 Tom Tromey <tom@tromey.com>
2160
2161 * breakpoint.c (stop_command): Constify.
2162 * cli/cli-decode.c (struct cmd_list_element): Constify.
2163 * command.h (add_abbrev_prefix_cmd): Constify.
2164
95e95a6d
PA
21652017-11-07 Pedro Alves <palves@redhat.com>
2166
2167 * breakpoint.c (extract_bp_kind): New enum.
2168 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2169 factored out from ...
2170 (extract_bp_number_and_location): ... here.
2171 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2172
cc638e86
PA
21732017-11-07 Pedro Alves <palves@redhat.com>
2174
2175 * breakpoint.c (extract_bp_number_and_location): Change return
2176 type to void. Throw error instead of warning.
2177 (enable_disable_command): Adjust.
2178
d0fe4701
XR
21792017-11-07 Xavier Roirand <roirand@adacore.com>
2180 Pedro Alves <palves@redhat.com>
2181
2182 * breakpoint.c (map_breakpoint_number_range): New, factored out
2183 from ...
2184 (map_breakpoint_numbers): ... here.
2185 (find_location_by_number): Change parameters from string to
2186 breakpoint number and location.
2187 (extract_bp_number_and_location): New function.
2188 (enable_disable_bp_num_loc)
2189 (enable_disable_breakpoint_location_range)
2190 (enable_disable_command): New functions, factored out ...
2191 (enable_command, disable_command): ... these functions, and
2192 adjusted to support ranges.
2193 * NEWS: Document enable/disable breakpoint location range feature.
2194
635dc5b2
LM
21952017-11-06 Luis Machado <luis.machado@linaro.org>
2196
2197 * MAINTAINERS (Write After Approval): Update my e-mail address.
2198
556e5da5
PA
21992017-11-06 Pedro Alves <palves@redhat.com>
2200
2201 * gnu-nat.c (gnu_terminal_init): Delete.
2202 (gnu_target): Don't install gnu_terminal_init.
2203 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2204 (child_terminal_init): ... this function.
2205
d1928160
PA
22062017-11-06 Pedro Alves <palves@redhat.com>
2207
2208 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2209 sgtty.h.
2210 * config.in, configure: Regenerate.
2211
6aa899ce
PA
22122017-11-06 Pedro Alves <palves@redhat.com>
2213
2214 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2215 (async_init_signals): Adjust.
2216 (handle_stop_sig): Rename to ...
2217 (handle_sigtstp): ... this.
2218 (async_stop_sig): Rename to ...
2219 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2220 SIGTSTP path.
2221 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2222 instead of STOP_SIGNAL thoughout.
2223 (handle_stop_sig): Rename to ...
2224 (handle_sigtstp): ... this.
2225 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2226
a94799ac
PA
22272017-11-06 Pedro Alves <palves@redhat.com>
2228
2229 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2230 longer set flags twice in row.
2231
726e1356
PA
22322017-11-06 Pedro Alves <palves@redhat.com>
2233
2234 * Makefile.in (SER_HARDWIRE): Update comment.
2235 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2236 * common/gdb_termios.h: Delete file.
2237 * common/job-control.c: Include termios.h and unistd.h instead of
2238 gdb_termios.h.
2239 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2240 check.
2241 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2242 Remove sgtty code.
2243 * configure.ac: No longer check for termio.h and sgtty.h.
2244 * configure: Regenerate.
2245 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2246 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2247 Replace PROCESS_GROUP_TYPE references with pid_t references
2248 throughout.
2249 (gdb_getpgrp): Delete.
2250 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2251 (child_terminal_inferior): Remove comment. Remove sgtty code.
2252 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2253 gdb_getpgrp. Use serial_set_tty_state instead aof
2254 serial_noflush_set_tty_state. Remove sgtty code.
2255 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2256 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2257 (inferior_process_group): Now returns pid_t.
2258 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2259 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2260 * ser-event.c (serial_event_ops): Update.
2261 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2262 (dos_ops): Update.
2263 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2264 * ser-pipe.c (pipe_ops): Update.
2265 * ser-tcp.c (tcp_ops): Update.
2266 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2267 HAVE_TERMIOS checks.
2268 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2269 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2270 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2271 assume termios.
2272 (hardwire_noflush_set_tty_state): Delete.
2273 (hardwire_print_tty_state, hardwire_drain_output)
2274 (hardwire_flush_output, hardwire_flush_input)
2275 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2276 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2277 code, and assume termios.
2278 (hardwire_ops): Update.
2279 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2280 * serial.c (serial_noflush_set_tty_state): Delete.
2281 * serial.h (serial_noflush_set_tty_state): Delete.
2282 (serial_ops::noflush_set_tty_state): Delete.
2283
1cfb73db
UW
22842017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2285
2286 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2287 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2288 (COMMON_OBS): Remove doublest.o and dfp.o.
2289 Do not build target-float.c (instead of doublest.c)
2290 with -Wformat-nonliteral.
2291
2292 * doublest.c: Remove file.
2293 * doublest.h: Remove file.
2294 * dfp.c: Remove file.
2295 * dfp.h: Remove file.
2296
2297 * target-float.c: Do not include "doublest.h" and "dfp.h".
2298 (DOUBLEST): Move here from doublest.h.
2299 (enum float_kind): Likewise.
2300 (FLOATFORMAT_CHAR_BIT): Likewise.
2301 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2302 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2303 (floatformat_precision): Likewise.
2304 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2305 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2306 Likewise.
2307 (host_float_format, host_double_format, host_long_double_format):
2308 Likewise.
2309 (floatformat_to_string, floatformat_from_string): Likewise.
2310 (floatformat_to_doublest): Likewise. Also, inline the original
2311 convert_floatformat_to_doublest.
2312 (floatformat_from_doublest): Likewise. Also, inline the original
2313 convert_floatformat_from_doublest.
2314
2315 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2316 (MAX_DECIMAL_STRING): Move here from dfp.c.
2317 (match_endianness): Likewise.
2318 (set_decnumber_context, decimal_check_errors): Likewise.
2319 (decimal_from_number, decimal_to_number): Likewise.
2320 (decimal_to_string, decimal_from_string): Likewise. Make static.
2321 (decimal_from_longest, decimal_from_ulongest): Likewise.
2322 (decimal_to_longest): Likewise.
2323 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2324 (decimal_convert): Likewise.
2325
b07e9c46
UW
23262017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2327
2328 * doublest.c: Do not include "gdbtypes.h".
2329 (extract_typed_floating): Remove.
2330 (store_typed_floating): Remove.
2331 (convert_typed_floating): Remove.
2332 * doublest.h (struct type): Remove.
2333 (DOUBLEST_PRINT_FORMAT): Remove.
2334 (DOUBLEST_SCAN_FORMAT): Remove.
2335 (extract_typed_floating): Remove.
2336 (store_typed_floating): Remove.
2337 (convert_typed_floating): Remove.
2338
2339 * dfp.c (decimal_from_doublest): Remove.
2340 (decimal_to_doublest): Remove.
2341 * dfp.h: Do not include "doublest.h".
2342 (decimal_from_doublest): Remove.
2343 (decimal_to_doublest): Remove.
2344
2345 * value.c: Do not include "doublest.h" and "dfp.h".
2346 (value_as_double): Remove.
2347 (unpack_double): Remove.
2348 (value_from_double): Remove.
2349 (value_from_decfloat): Remove.
2350 * value.h: Do not include "doublest.h".
2351 (value_as_double): Remove.
2352 (unpack_double): Remove.
2353 (value_from_double): Remove.
2354 (value_from_decfloat): Remove.
2355
3b2ca824
UW
23562017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2357
2358 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2359 (i386_extract_return_value): Use target_float_convert.
2360 (i386_store_return_value): Likewise.
2361 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2362 (i387_value_to_register): Likewise.
2363 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2364 (ia64_register_to_value): Use target_float_convert.
2365 (ia64_value_to_register): Likewise.
2366 (ia64_extract_return_value): Likewise.
2367 (ia64_store_return_value): Likewise.
2368 (ia64_push_dummy_call): Likewise.
2369 * m68k-tdep.c: Include "target-float.h".
2370 (m68k_register_to_value): Use target_float_convert.
2371 (m68k_value_to_register): Likewise.
2372 (m68k_svr4_extract_return_value): Likewise.
2373 (m68k_svr4_store_return_value): Likewise.
2374 * ppc-sysv-tdep.c: Include "target-float.h".
2375 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2376 (do_ppc_sysv_return_value): Likewise.
2377 (ppc64_sysv_abi_push_freg): Likewise.
2378 (ppc64_sysv_abi_return_value_base): Likewise.
2379 * rs6000-aix-tdep.c: Include "target-float.h".
2380 (rs6000_push_dummy_call): Use target_float_convert.
2381 (rs6000_return_value): Likewise.
2382 * rs6000-lynx178-tdep.c: Include "target-float.h".
2383 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2384 (rs6000_lynx178_return_value): Likewise.
2385 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2386 (rs6000_register_to_value): Use target_float_convert.
2387 (rs6000_value_to_register): Likewise.
2388 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2389 (arm_extract_return_value): Use target_float_convert.
2390 (arm_store_return_value): Likewise.
2391 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2392 (sh_register_convert_to_virtual): Use target_float_convert.
2393 (sh_register_convert_to_raw): Likewise.
2394 * sh64-tdep.c: Include "target-float.h".
2395 (sh64_extract_return_value): Use target_float_convert.
2396 (sh64_register_convert_to_virtual): Likewise.
2397 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2398
14ad9311
UW
23992017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2400
2401 * target-float.c (floatformat_to_host_double): New function.
2402 (floatformat_from_host_double): Likewise.
2403 (target_float_to_host_double): Likewise.
2404 (target_float_from_host_double): Likewise.
2405 * target-float.h (target_float_to_host_double): Add prototype.
2406 (target_float_from_host_double): Likewise.
2407
2408 * guile/scm-value.c: Include "target-float.h".
2409 (gdbscm_value_to_real): Use target_float_to_host_double.
2410 Handle integer source values via value_as_long.
2411 * guile/scm-math.c: Include "target-float.h". Do not include
2412 "doublest.h", "dfp.h", and "expression.h".
2413 (vlscm_convert_typed_number): Use target_float_from_host_double.
2414 (vlscm_convert_number): Likewise.
2415
2416 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2417 (convert_value_from_python): Use target_float_from_host_double.
2418
50eff16b
UW
24192017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2420
2421 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2422 (cast_from_fixed): Likewise.
2423 (ada_scaling_type): New function.
2424 (ada_delta): Return value instead of DOUBLEST. Perform target
2425 arithmetic instead of host arithmetic.
2426 (scaling_factor): Rename to ...
2427 (ada_scaling_factor) ... this. Make non-static. Return value instead
2428 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2429 (ada_fixed_to_float): Remove.
2430 (ada_float_to_fixed): Remove.
2431 * ada-lang.h (ada_fixed_to_float): Remove.
2432 (ada_float_to_fixed): Remove.
2433 (ada_delta): Return value instead of DOUBLEST.
2434 (ada_scaling_factor): Add prototype.
2435
2436 * ada-typeprint.c: Include "target-float.h".
2437 (print_fixed_point_type): Perform target arithmetic instead of
2438 host arithmetic.
2439 * ada-valprint.c: Include "target-float.h".
2440 (ada_val_print_num): Perform target arithmetic instead of
2441 host arithmetic for fixed-point types.
2442
66c02b9e
UW
24432017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2444
2445 * target-float.c: Include <math.h>.
2446 (floatformat_binop): New function.
2447 (floatformat_compare): Likewise.
2448 (target_float_binop): Likewise.
2449 (target_float_compare): Likewise.
2450 * target-float.h: Include "expression.h".
2451 (target_float_binop): Add prototype.
2452 (target_float_compare): Likewise.
2453
2454 * valarith.c: Do not include "doublest.h" and "dfp.h".
2455 Include "common/byte-vector.h".
2456 (value_args_as_decimal): Remove, replace by ...
2457 (value_args_as_target_float): ... this function. Handle both
2458 binary and decimal target floating-point formats.
2459 (scalar_binop): Handle both binary and decimal FP using
2460 value_args_as_target_float and target_float_binop.
2461 (value_equal): Handle both binary and decimal FP using
2462 value_args_as_target_float and target_float_compare.
2463 (value_less): Likewise.
2464 (value_pos): Handle all scalar types as simple copy.
2465 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2466 * dfp.c (decimal_binop): Throw error instead of internal_error
2467 when called with an unsupported operation code.
2468
f69fdf9b
UW
24692017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2470
2471 * target-float.c (target_float_to_string): New function.
2472 (target_float_from_string): New function.
2473 * target-float.h (target_float_to_string): Add prototype.
2474 (target_float_from_string): Add prototype.
2475
2476 * valprint.c: Include "target-float.h". Do not include
2477 "doublest.h" and "dfp.h".
2478 (print_floating): Use target_float_to_string.
2479 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2480 (printf_floating): Use target_float_to_string.
2481 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2482 (print_i387_value): Use target_float_to_string.
2483 * mips-tdep.c: Include "target-float.h".
2484 (mips_print_fp_register): Use target_float_to_string.
2485 * sh64-tdep.c: Include "target-float.h".
2486 (sh64_do_fp_register): Use target_float_to_string.
2487
2488 * parse.c: Include "target-float.h". Do not include
2489 "doublest.h" and "dfp.h".
2490 (parse_float): Use target_float_from_string.
2491 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2492 (define_symbol): Use target_float_from_string.
2493 * gdbarch-selftests.c: Include "target-float.h".
2494 (register_to_value_test): Use target_float_from_string.
2495
70100014
UW
24962017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2497
2498 * Makefile.c (SFILES): Add target-float.c.
2499 (HFILES_NO_SRCDIR): Add target-float.h.
2500 (COMMON_OBS): Add target-float.o.
2501 * target-float.h: New file.
2502 * target-float.c: New file.
2503
2504 * doublest.c (floatformat_classify): Fix detection of float_zero.
2505
2506 * gdbtypes.c (is_floating_type): New function.
2507 * gdbtypes.h (is_floating_type): Add prototype.
2508
2509 * value.c: Do not include "floatformat.h".
2510 (unpack_double): Use target_float_is_valid.
2511 (is_floating_value): New function.
2512 * value.h (is_floating_value): Add prototype-
2513
2514 * valarith.c: Include "target-float.h".
2515 (value_logical_not): Use target_float_is_zero.
2516
2517 * python/py-value.c: Include "target-float.h".
2518 (valpy_nonzero): Use target_float_is_zero.
2519
ab4b1c46
TT
25202017-11-04 Tom Tromey <tom@tromey.com>
2521
2522 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2523
454dafbd
TT
25242017-11-04 Tom Tromey <tom@tromey.com>
2525
2526 * breakpoint.c (set_momentary_breakpoint): Return
2527 breakpoint_up.
2528 (until_break_command): Update.
2529 (new_until_break_fsm): Change argument types to
2530 breakpoint_up.
2531 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2532 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2533 Remove.
2534 * infcmd.c (finish_forward): Update.
2535 * breakpoint.h (set_momentary_breakpoint)
2536 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2537 (make_cleanup_delete_breakpoint): Remove.
2538 (struct breakpoint_deleter): New.
2539 (breakpoint_up): New typedef.
2540 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2541 (insert_exception_resume_breakpoint): Update.
2542 (insert_exception_resume_from_probe): Update.
2543 (insert_longjmp_resume_breakpoint): Update.
2544 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2545 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2546 * infcall.c (call_function_by_hand_dummy): Update
2547
331b71e5
TT
25482017-11-04 Tom Tromey <tom@tromey.com>
2549
2550 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2551
9f584b37
TT
25522017-11-04 Tom Tromey <tom@tromey.com>
2553
2554 * linux-tdep.c (linux_core_info_proc_mappings): Use
2555 gdb::def_vector.
2556 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2557 "size" argument.
2558 (linux_corefile_thread): Update.
2559 (linux_make_corefile_notes): Remove unused variable.
2560
779bc38e
TT
25612017-11-04 Tom Tromey <tom@tromey.com>
2562
2563 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2564 gdb::byte_vector.
2565
ed2b3126
TT
25662017-11-04 Tom Tromey <tom@tromey.com>
2567
2568 * objfiles.c (do_free_objfile_cleanup): Remove.
2569 * compile/compile-object-load.c (compile_object_load): Update.
2570 * objfiles.h (make_cleanup_free_objfile): Remove.
2571
7f6743fd
TT
25722017-11-04 Tom Tromey <tom@tromey.com>
2573
2574 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2575 (adi_read_versions): Change "tags" to "gdb_byte *".
2576 (adi_print_versions): Likewise.
2577
c80049d3
TT
25782017-11-04 Tom Tromey <tom@tromey.com>
2579
2580 * breakpoint.c
2581 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2582 from start_rbreak_breakpoints.
2583 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2584 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2585 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2586 * symtab.c (do_end_rbreak_breakpoints): Remove.
2587 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2588
167b0be1
TT
25892017-11-04 Tom Tromey <tom@tromey.com>
2590
2591 * cp-namespace.c (reset_directive_searched): Remove.
2592 (cp_lookup_symbol_via_imports): Use scoped_restore.
2593 * cp-support.c (reset_directive_searched): Remove.
2594 (make_symbol_overload_list_using): Use scoped_restore.
2595 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2596 (reset_directive_searched): Remove.
2597
5eae7aea
TT
25982017-11-04 Tom Tromey <tom@tromey.com>
2599
2600 * symfile.c (find_separate_debug_file_by_debuglink): Use
2601 unique_xmalloc_ptr.
2602
c6bcad5f
TT
26032017-11-04 Tom Tromey <tom@tromey.com>
2604
2605 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2606 type of "info".
2607 (compute_stack_depth): Likewise.
2608 (do_compile_dwarf_expr_to_c): Use std::vector.
2609
20dcd8ca
TT
26102017-11-04 Tom Tromey <tom@tromey.com>
2611
2612 * compile/compile-object-load.c (link_callbacks_einfo): Use
2613 std::string.
2614
33c7c59d
TT
26152017-11-04 Tom Tromey <tom@tromey.com>
2616
2617 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2618 Use scoped_free_pendings.
2619 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2620 scoped_free_pendings.
2621 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2622 (xcoff_initial_scan): Likewise.
2623 * buildsym.c (reset_symtab_globals): Update comment.
2624 (scoped_free_pendings): Rename from really_free_pendings.
2625 (prepare_for_building): Update comment.
2626 (buildsym_init): Likewise.
2627 * buildsym.h (class scoped_free_pendings): New class.
2628 (really_free_pendings): Don't declare.
2629
67fa57cf
UW
26302017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2631
2632 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2633 output when converting a zero value to a special byteorder format.
2634
f26ae15b
YQ
26352017-11-02 Yao Qi <yao.qi@linaro.org>
2636
2637 * frame.c (do_frame_register_read): Remove aspace.
2638 * jit.c (jit_frame_sniffer): Likwise.
2639 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2640 * regcache.c (regcache::regcache): Pass nullptr.
2641 (regcache_print): Caller updated.
2642 * regcache.h (regcache::regcache): Remove one constructor
2643 parameter aspace.
2644
6c6e9412
YQ
26452017-11-02 Yao Qi <yao.qi@linaro.org>
2646
2647 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2648
8b86c959
YQ
26492017-11-02 Yao Qi <yao.qi@linaro.org>
2650
2651 * breakpoint.c (insert_single_step_breakpoints): Update.
2652 * frame.c (struct frame_info) <aspace>: Add const.
2653 (frame_save_as_regcache): Add const.
2654 (get_frame_address_space): Return const address_space *.
2655 * frame.h (get_frame_address_space): Update declaration.
2656 * infrun.c (struct step_over_info) <aspace>: Add const.
2657 (set_step_over_info): Make aspace const.
2658 (displaced_step_prepare_throw): Change variable const.
2659 (resume): Likewise.
2660 (proceed): Likewise.
2661 (adjust_pc_after_break): Likewise.
2662 (save_waitstatus): Likewise.
2663 (handle_signal_stop): Likewise.
2664 (keep_going_pass_signal): Likewise.
2665 * jit.c (jit_frame_sniffer): Add const.
2666 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2667 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2668 * record-full.c (record_full_wait_1): Likewise.
2669 * regcache.c (regcache::regcache): Change parameter to const.
2670 * regcache.h (regcache::regcache): Likewise.
2671 (regcache::aspace): Return const address_space *.
2672 (regcache) <m_aspace>: Add const.
2673
a01bda52
YQ
26742017-11-02 Yao Qi <yao.qi@linaro.org>
2675
2676 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2677 * frame.c (create_sentinel_frame): Likewise.
2678 * infrun.c (displaced_step_prepare_throw): Likewise.
2679 (resume): Likewise.
2680 (thread_still_needs_step_over_bp): Likewise.
2681 (proceed): Likewise.
2682 (do_target_wait): Likewise.
2683 (adjust_pc_after_break): Likewise.
2684 (handle_syscall_event): Likewise.
2685 (save_waitstatus): Likewise.
2686 (handle_inferior_event_1): Likewise.
2687 (handle_signal_stop): Likewise.
2688 (keep_going_pass_signal): Likewise.
2689 * linux-nat.c (status_callback): Likewise.
2690 (save_stop_reason): Likewise.
2691 (resume_stopped_resumed_lwps): Likewise.
2692 * record-full.c (record_full_exec_insn): Likewise.
2693 (record_full_wait_1): Likewise.
2694 * regcache.c (get_regcache_aspace): Remove.
2695 * regcache.h (get_regcache_aspace): Remove.
2696
d999647b
YQ
26972017-11-02 Yao Qi <yao.qi@linaro.org>
2698
2699 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2700 (init_regcache_descr): Use gdbarch_num_regs.
2701 (regcache::regcache): Likewise.
2702 (regcache::get_register_status): Likewise.
2703 (regcache::assert_raw_regnum): Likewise.
2704 (regcache::cooked_read): Likewise.
2705 (regcache::cooked_read_value): Likewise.
2706 (regcache::cooked_write): Likewise.
2707 (regcache::dump): Likewise.
2708 (regcache::num_raw_registers): New method.
2709 * regcache.h (class regcache) <num_raw_registers>: New.
2710
4e888c28
YQ
27112017-11-02 Yao Qi <yao.qi@linaro.org>
2712
2713 * regcache.c (regcache::assert_regnum): New method.
2714 (regcache::invalidate): Call assert_regnum.
2715 (regcache::raw_update): Likewise.
2716 (regcache::raw_write): Likewise.
2717 (regcache::raw_read_part): Likewise.
2718 (regcache::raw_write_part): Likewise.
2719 (regcache::raw_supply): Likewise.
2720 (regcache::raw_supply_integer): Likewise.
2721 (regcache::raw_supply_zeroed): Likewise.
2722 (regcache::raw_collect): Likewise.
2723 (regcache::raw_collect_integer): Likewise.
2724 * regcache.h (regcache::assert_regnum): Declare.
2725
2e1b49b3
YQ
27262017-11-02 Yao Qi <yao.qi@linaro.org>
2727
2728 * regcache.c (regcache::dump): Remove code.
2729
6c5218df
YQ
27302017-11-02 Yao Qi <yao.qi@linaro.org>
2731
2732 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2733 Remove.
2734 <sizeof_cooked_register_status>: Remove.
2735 (init_regcache_descr): Update.
2736 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2737 (regcache::save): Likewise.
2738 (regcache::dump): Likewise.
2739
dcc31d28
JB
27402017-11-01 James Bowman <james.bowman@ftdichip.com>
2741
2742 * ft32-tdep.c (ft32_fetch_instruction): New function.
2743 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2744
3a87ae65
SM
27452017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2746
2747 * cli/cli-script.c (execute_control_command): Rename to ...
2748 (execute_control_command_1): ... this.
2749 (execute_control_command): New function.
2750
09b847f3
SM
27512017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2752
2753 * tracepoint.c (tfind_command): Remove const_cast.
2754
f871c485
MG
27552017-10-30 Mike Gulick <mgulick@mathworks.com>
2756
2757 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2758
b020ff80
SM
27592017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2760
2761 * common/common-utils.h (in_inclusive_range): New function.
2762 * arm-tdep.c (arm_record_extension_space): Use
2763 in_inclusive_range.
2764 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2765 * cris-tdep.c (cris_spec_reg_applicable): Use
2766 in_inclusive_range.
2767
1b81856f
PA
27682017-10-30 Pedro Alves <palves@redhat.com>
2769 Simon Marchi <simon.marchi@ericsson.com>
2770
2771 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2772 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2773
31b833b3
PA
27742017-10-30 Pedro Alves <palves@redhat.com>
2775
2776 * common/common-utils.c (string_appendf, string_vappendf): New
2777 functions.
2778 * common/common-utils.h (string_appendf, string_vappendf): New
2779 declarations.
2780 * unittests/common-utils-selftests.c (string_appendf_func)
2781 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2782 (string_vappendf_tests): New functions.
2783 (_initialize_common_utils_selftests): Register "string_appendf" and
2784 "string_vappendf tests".
2785
4a250334
PA
27862017-10-30 Pedro Alves <palves@redhat.com>
2787
2788 * unittests/common-utils-selftests.c (format_func): New typedef.
2789 (string_printf_tests, string_vprintf_tests): Tests factored out
2790 and merged to ...
2791 (test_format_func): ... this new function.
2792 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2793 test_format_func.
2794
16c5c17e
SM
27952017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * darwin-nat.c: Remove include of gdb.h.
2798
7ca51576
SM
27992017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2800
2801 * xtensa-xtregs.c: Fix formatting issues.
2802
c1342859
SM
28032017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2804
2805 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2806
484d8d36
MD
28072017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2808
2809 PR python/21213
2810 * python/py-infthread.c (thpy_get_inferior): Increment reference
2811 of inferior before returning it.
2812
b5540b5f
SM
28132017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2814
2815 * unittests/common-utils-selftests.c (format): Add
2816 ATTRIBUTE_PRINTF.
2817
5a9dcda1
SM
28182017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2819
2820 * xml-syscall.c (struct syscall_desc): Add constructor.
2821 <name>: Change type to std::string.
2822 (syscall_desc_up): New typedef.
2823 (syscall_desc_p): Remove typeder.
2824 (DEF_VEC_P(syscall_desc_p)): Remove.
2825 (struct syscall_group_desc): Add constructor.
2826 <name>: Change type to std::string.
2827 <syscalls>: Change type to std::vector.
2828 (syscall_group_desc_up): New typedef.
2829 (syscall_group_desc_p): Remove typedef.
2830 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2831 (struct syscalls_info) <syscalls>: Change type to std::vector of
2832 unique_ptr.
2833 <groups>: Likewise.
2834 <my_gdb_datadir>: Change type to std::string.
2835 (syscalls_info_up): New typedef.
2836 (allocate_syscalls_info): Remove.
2837 (syscalls_info_free_syscalls_desc): Remove.
2838 (syscalls_info_free_syscall_group_desc): Remove.
2839 (free_syscalls_info): Remove.
2840 (make_cleanup_free_syscalls_info): Remove.
2841 (syscall_group_create_syscall_group_desc): Adjust.
2842 (syscall_group_add_syscall): Adjust.
2843 (syscall_create_syscall_desc): Adjust.
2844 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2845 (init_syscalls_info): Adjust.
2846 (syscall_group_get_group_by_name): Adjust.
2847 (xml_get_syscall_number): Adjust.
2848 (xml_get_syscall_name): Adjust.
2849 (xml_list_of_syscalls): Adjust.
2850 (xml_list_syscalls_by_group): Adjust.
2851 (xml_list_of_groups): Adjust.
2852
45461e0d
SM
28532017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2854
2855 * probe.h: Don't include gdb_vecs.h.
2856 (DEF_VEC_P (probe_p)): Remove.
2857 (find_probes_in_objfile): Return an std::vector.
2858 * probe.c (find_probes_in_objfile): Likewise.
2859 * breakpoint.c (breakpoint_objfile_data)
2860 <longjmp_probes>: Change type to std::vector.
2861 <exception_probes>: Likewise.
2862 (free_breakpoint_probes): Don't manually free vectors.
2863 (create_longjmp_master_breakpoint): Adjust.
2864 (create_exception_master_breakpoint): Adjust.
2865 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2866 parameter type, adjust.
2867 (svr4_create_solib_event_breakpoints): Adjust.
2868
43dce439
SM
28692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2870
2871 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2872 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2873 with new.
2874 (free_breakpoint_probes): Rename to ...
2875 (free_breakpoint_objfile_data): ... this, and call delete on
2876 bp_objfile_data..
2877
6a1b9516
SM
28782017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2879
2880 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2881 (loaded_script_ptr): Remove typedef.
2882 (DEF_VEC_P (loaded_script_ptr)): Remove.
2883 (struct collect_matching_scripts_data): Add constructor.
2884 <scripts_p>: Change type to (pointer to) std::vector.
2885 (collect_matching_scripts_data): Adjust.
2886 (sort_scripts_by_name): Make suitable for std::sort.
2887 (print_scripts): Don't sort vector, adjust to std::vector.
2888 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2889
593e3209
SM
28902017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2891
2892 * symfile.c (filename_language): Make struct, not typedef. Add
2893 constructor.
2894 <ext>: Change type to std::string.
2895 (DEF_VEC_O (filename_language)): Remove.
2896 (filename_language_table): Change type to std::vector.
2897 (add_filename_language): Adjust.
2898 (set_ext_lang_command): Adjust.
2899 (info_ext_lang_command): Adjust.
2900 (deduce_language_from_filename): Adjust.
2901 (class scoped_restore_filename_language_table): Remove.
2902 (test_filename_language): Use scoped_restore.
2903 (test_set_ext_lang_command): Use scoped_restore, adjust to
2904 std::vector change.
2905
32fa66eb
SM
29062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2907
2908 * symfile.c: Include selftest.h.
2909 (class scoped_restore_filename_language_table): New.
2910 (test_filename_language): New test.
2911 (test_set_ext_lang_command): New test.
2912 (_initialize_symfile): Register tests.
2913
4a27f119
KS
29142017-10-27 Keith Seitz <keiths@redhat.com>
2915
2916 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2917 in the bp_location, falling back to find_pc_sect_function when
2918 needed.
2919 (add_location_to_breakpoint): Save sal->symbol.
2920 * breakpoint.h (struct bp_location) <symbol>: New field.
2921 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2922 * symtab.h (struct symtab_and_line) <symbol>: New field.
2923
a43f3893
PF
29242017-10-26 Patrick Frants <osscontribute@gmail.com>
2925
7453e6b2 2926 PR gdb/13669
a43f3893
PF
2927 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2928 to rewind obstack.
2929
23cc4e1b
PA
29302017-10-26 Pedro Alves <palves@redhat.com>
2931
2932 * remote.c (remote_async_terminal_ours_p): Delete.
2933 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2934 Remove references to 'remote_async_terminal_ours_p'.
2935
6abc18bb
YQ
29362017-10-26 Yao Qi <yao.qi@linaro.org>
2937
2938 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2939
bd522513
YQ
29402017-10-26 Yao Qi <yao.qi@linaro.org>
2941
2942 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2943 aspace const.
2944 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2945 Likewise.
2946 * breakpoint.c (bpstat_check_location): Remove cast.
2947 (breakpoint_hit_catch_fork): Make aspce const.
2948 (breakpoint_hit_catch_solib): Likewise.
2949 (breakpoint_hit_catch_exec): Likewise.
2950 (breakpoint_hit_ranged_breakpoint): Likewise.
2951 (breakpoint_hit_watchpoint): Likewise.
2952 (base_breakpoint_breakpoint_hit): Likewise.
2953 (bkpt_breakpoint_hit): Likewise.
2954 (dprintf_breakpoint_hit): Likewise.
2955 (tracepoint_breakpoint_hit): Likewise.
2956 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2957
accd0bcd
YQ
29582017-10-26 Yao Qi <yao.qi@linaro.org>
2959
2960 * breakpoint.c (breakpoint_location_address_match): Change
2961 "struct address_space *" to "const address_space".
2962 (breakpoint_location_address_range_overlap): Likewise.
2963 (breakpoint_here_p): Likewise.
2964 (breakpoint_in_range_p): Likewise.
2965 (moribund_breakpoint_here_p): Likewise.
2966 (bp_location_inserted_here_p): Likewise.
2967 (software_breakpoint_inserted_here_p): Likewise.
2968 (hardware_breakpoint_inserted_here_p): Likewise.
2969 (hardware_watchpoint_inserted_in_range): Likewise.
2970 (bpstat_check_location): Likewise.
2971 (bpstat_stop_status): Likewise.
2972 (breakpoint_address_match): Likewise.
2973 (breakpoint_address_match_range): Likewise.
2974 (breakpoint_location_address_match): Likewise.
2975 (breakpoint_location_address_range_overlap): Likewise.
2976 (insert_single_step_breakpoint): Likewise.
2977 (breakpoint_has_location_inserted_here): Likewise.
2978 (single_step_breakpoint_inserted_here_p): Likewise.
2979 (pc_at_non_inline_function): Likewise.
2980 * breakpoint.h (bpstat_stop_status): Update declaration.
2981 (breakpoint_here_p): Likewise.
2982 (breakpoint_in_range_p): Likewise.
2983 (moribund_breakpoint_here_p): Likewise.
2984 (breakpoint_inserted_here_p): Likewise.
2985 (software_breakpoint_inserted_here_p): Likewise.
2986 (hardware_breakpoint_inserted_here_p): Likewise.
2987 (breakpoint_has_location_inserted_here): Likewise.
2988 (single_step_breakpoint_inserted_here_p): Likewise.
2989 (hardware_watchpoint_inserted_in_range): Likewise.
2990 (breakpoint_address_match): Likewise.
2991 (insert_single_step_breakpoint): Likewise.
2992 (pc_at_non_inline_function): Likewise.
2993 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2994 * record.c (record_check_stopped_by_breakpoint): Likewise.
2995 * record.h (record_check_stopped_by_breakpoint): Likewise.
2996 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2997
ac7936df
YQ
29982017-10-25 Yao Qi <yao.qi@linaro.org>
2999
3000 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3001 regcache->arch () instead get_regcache_arch.
3002 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3003 Likewise.
3004 (aarch64_fbsd_store_inferior_registers): Likewise.
3005 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3006 (store_gregs_to_thread): Likewise.
3007 (fetch_fpregs_from_thread): Likewise.
3008 (store_fpregs_to_thread): Likewise.
3009 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3010 (aarch64_store_return_value): Likewise.
3011 (aarch64_software_single_step): Likewise.
3012 * aix-thread.c (aix_thread_wait): Likewise.
3013 (supply_reg32): Likewise.
3014 (supply_sprs64): Likewise.
3015 (supply_sprs32): Likewise.
3016 (fill_gprs64): Likewise.
3017 (fill_gprs32): Likewise.
3018 (fill_sprs64): Likewise.
3019 (fill_sprs32): Likewise.
3020 (store_regs_user_thread): Likewise.
3021 (store_regs_kernel_thread): Likewise.
3022 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3023 (alphabsd_store_inferior_registers): Likewise.
3024 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3025 (alpha_store_return_value): Likewise.
3026 (alpha_deal_with_atomic_sequence): Likewise.
3027 (alpha_next_pc): Likewise.
3028 (alpha_software_single_step): Likewise.
3029 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3030 (amd64bsd_store_inferior_registers): Likewise.
3031 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3032 Likewise.
3033 (amd64_linux_store_inferior_registers): Likewise.
3034 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3035 (amd64_collect_native_gregset): Likewise.
3036 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3037 (amd64obsd_collect_uthread): Likewise.
3038 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3039 (amd64_collect_fpregset): Likewise.
3040 (amd64_supply_fxsave): Likewise.
3041 (amd64_supply_xsave): Likewise.
3042 (amd64_collect_fxsave): Likewise.
3043 (amd64_collect_xsave): Likewise.
3044 * arc-tdep.c (arc_write_pc): Likewise.
3045 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3046 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3047 (arm_fbsd_store_inferior_registers): Likewise.
3048 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3049 (store_vfp_regs): Likewise.
3050 (arm_linux_fetch_inferior_registers): Likewise.
3051 (arm_linux_store_inferior_registers): Likewise.
3052 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3053 (arm_linux_sigreturn_next_pc): Likewise.
3054 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3055 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3056 (fetch_register): Likewise.
3057 (store_register): Likewise.
3058 * arm-tdep.c (arm_is_thumb): Likewise.
3059 (displaced_in_arm_mode): Likewise.
3060 (bx_write_pc): Likewise.
3061 (arm_get_next_pcs_addr_bits_remove): Likewise.
3062 (arm_software_single_step): Likewise.
3063 (arm_extract_return_value): Likewise.
3064 (arm_store_return_value): Likewise.
3065 (arm_write_pc): Likewise.
3066 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3067 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3068 (bsd_uthread_store_registers): Likewise.
3069 * core-regset.c (fetch_core_registers): Likewise.
3070 * corelow.c (get_core_registers): Likewise.
3071 * cris-tdep.c (cris_store_return_value): Likewise.
3072 (cris_extract_return_value): Likewise.
3073 (find_step_target): Likewise.
3074 (find_step_target): Likewise.
3075 (cris_software_single_step): Likewise.
3076 * ctf.c (ctf_fetch_registers): Likewise.
3077 * darwin-nat.c (cancel_breakpoint): Likewise.
3078 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3079 * frv-tdep.c (frv_extract_return_value): Likewise.
3080 * ft32-tdep.c (ft32_store_return_value): Likewise.
3081 (ft32_extract_return_value): Likewise.
3082 * go32-nat.c (fetch_register): Likewise.
3083 (go32_fetch_registers): Likewise.
3084 (go32_store_registers): Likewise.
3085 (store_register): Likewise.
3086 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3087 (h8300_store_return_value): Likewise.
3088 * hppa-linux-nat.c (fetch_register): Likewise.
3089 (store_register): Likewise.
3090 (hppa_linux_fetch_inferior_registers): Likewise.
3091 (hppa_linux_store_inferior_registers): Likewise.
3092 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3093 (i386_darwin_store_inferior_registers): Likewise.
3094 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3095 (gnu_store_registers): Likewise.
3096 * i386-linux-nat.c (fetch_register): Likewise.
3097 (store_register): Likewise.
3098 (supply_gregset): Likewise.
3099 (fill_gregset): Likewise.
3100 (i386_linux_fetch_inferior_registers): Likewise.
3101 (i386_linux_store_inferior_registers): Likewise.
3102 (i386_linux_resume): Likewise.
3103 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3104 Likewise.
3105 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3106 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3107 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3108 (i386obsd_collect_uthread): Likewise.
3109 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3110 (i386_supply_gregset): Likewise.
3111 (i386_collect_gregset): Likewise.
3112 (i386_supply_fpregset): Likewise.
3113 (i386_collect_fpregset): Likewise.
3114 (i386_mpx_bd_base): Likewise.
3115 * i386-v4-nat.c (supply_fpregset): Likewise.
3116 (fill_fpregset): Likewise.
3117 * i387-tdep.c (i387_supply_fsave): Likewise.
3118 (i387_collect_fsave): Likewise.
3119 (i387_supply_fxsave): Likewise.
3120 (i387_collect_fxsave): Likewise.
3121 (i387_supply_xsave): Likewise.
3122 (i387_collect_xsave): Likewise.
3123 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3124 (ia64_linux_store_registers): Likewise.
3125 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3126 (ia64_extract_return_value): Likewise.
3127 (ia64_store_return_value): Likewise.
3128 (find_func_descr): Likewise.
3129 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3130 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3131 (inf_ptrace_store_registers): Likewise.
3132 * infrun.c (use_displaced_stepping): Likewise.
3133 (displaced_step_prepare_throw): Likewise.
3134 (resume): Likewise.
3135 (proceed): Likewise.
3136 (do_target_wait): Likewise.
3137 (adjust_pc_after_break): Likewise.
3138 (handle_inferior_event_1): Likewise.
3139 (handle_signal_stop): Likewise.
3140 (save_infcall_suspend_state): Likewise.
3141 (restore_infcall_suspend_state): Likewise.
3142 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3143 * jit.c (jit_frame_prev_register): Likewise.
3144 * linux-nat.c (save_stop_reason): Likewise.
3145 (linux_nat_wait_1): Likewise.
3146 (resume_stopped_resumed_lwps): Likewise.
3147 * linux-record.c (record_linux_sockaddr): Likewise.
3148 (record_linux_msghdr): Likewise.
3149 (record_linux_system_call): Likewise.
3150 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3151 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3152 (lm32_store_return_value): Likewise.
3153 * m32c-tdep.c (m32c_read_flg): Likewise.
3154 (m32c_pseudo_register_read): Likewise.
3155 (m32c_pseudo_register_write): Likewise.
3156 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3157 (m32r_linux_collect_gregset): Likewise.
3158 * m32r-tdep.c (m32r_store_return_value): Likewise.
3159 (m32r_extract_return_value): Likewise.
3160 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3161 (m68kbsd_collect_fpregset): Likewise.
3162 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3163 * m68k-linux-nat.c (fetch_register): Likewise.
3164 (old_fetch_inferior_registers): Likewise.
3165 (old_store_inferior_registers): Likewise.
3166 (store_regs): Likewise.
3167 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3168 (m68k_svr4_store_return_value): Likewise.
3169 * m88k-tdep.c (m88k_store_arguments): Likewise.
3170 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3171 (mi_cmd_data_write_register_values): Likewise.
3172 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3173 (mips_fbsd_store_inferior_registers): Likewise.
3174 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3175 (mips_fbsd_supply_gregs): Likewise.
3176 (mips_fbsd_collect_fpregs): Likewise.
3177 (mips_fbsd_collect_gregs): Likewise.
3178 (mips_fbsd_supply_fpregset): Likewise.
3179 (mips_fbsd_collect_fpregset): Likewise.
3180 (mips_fbsd_supply_gregset): Likewise.
3181 (mips_fbsd_collect_gregset): Likewise.
3182 * mips-linux-nat.c (supply_gregset): Likewise.
3183 (fill_gregset): Likewise.
3184 (supply_fpregset): Likewise.
3185 (fill_fpregset): Likewise.
3186 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3187 (mips_fill_gregset): Likewise.
3188 (mips_supply_fpregset): Likewise.
3189 (mips_fill_fpregset): Likewise.
3190 (mips64_supply_gregset): Likewise.
3191 (micromips_linux_sigframe_validate): Likewise.
3192 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3193 (mipsnbsd_fetch_inferior_registers): Likewise.
3194 (mipsnbsd_store_inferior_registers): Likewise.
3195 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3196 (mipsnbsd_supply_gregset): Likewise.
3197 (mipsnbsd_iterate_over_regset_sections): Likewise.
3198 (mipsnbsd_supply_reg): Likewise.
3199 (mipsnbsd_supply_fpreg): Likewise.
3200 * mips-tdep.c (mips_in_frame_stub): Likewise.
3201 (mips_dummy_id): Likewise.
3202 (is_octeon_bbit_op): Likewise.
3203 (micromips_bc1_pc): Likewise.
3204 (extended_mips16_next_pc): Likewise.
3205 (mips16_next_pc): Likewise.
3206 (deal_with_atomic_sequence): Likewise.
3207 * moxie-tdep.c (moxie_process_readu): Likewise.
3208 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3209 * nto-procfs.c (procfs_store_registers): Likewise.
3210 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3211 (ppcfbsd_store_inferior_registers): Likewise.
3212 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3213 (fetch_altivec_register): Likewise.
3214 (get_spe_registers): Likewise.
3215 (fetch_spe_register): Likewise.
3216 (fetch_altivec_registers): Likewise.
3217 (fetch_all_gp_regs): Likewise.
3218 (fetch_all_fp_regs): Likewise.
3219 (store_vsx_register): Likewise.
3220 (store_altivec_register): Likewise.
3221 (set_spe_registers): Likewise.
3222 (store_spe_register): Likewise.
3223 (store_altivec_registers): Likewise.
3224 (store_all_gp_regs): Likewise.
3225 (store_all_fp_regs): Likewise.
3226 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3227 (ppc_linux_collect_gregset): Likewise.
3228 (ppc_canonicalize_syscall): Likewise.
3229 (ppc_linux_record_signal): Likewise.
3230 (ppu2spu_prev_register): Likewise.
3231 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3232 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3233 (ppcobsd_store_registers): Likewise.
3234 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3235 Likewise.
3236 (ppc_ravenscar_generic_store_registers): Likewise.
3237 * procfs.c (procfs_fetch_registers): Likewise.
3238 (procfs_store_registers): Likewise.
3239 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3240 (ravenscar_store_registers): Likewise.
3241 (ravenscar_prepare_to_store): Likewise.
3242 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3243 * record-full.c (record_full_wait_1): Likewise.
3244 (record_full_registers_change): Likewise.
3245 (record_full_store_registers): Likewise.
3246 (record_full_core_fetch_registers): Likewise.
3247 (record_full_save): Likewise.
3248 (record_full_goto_insn): Likewise.
3249 * regcache.c (regcache_register_size): Likewise.
3250 (get_regcache_arch): Remove.
3251 (regcache_read_pc): Likewise.
3252 * regcache.h (get_regcache_arch): Remove.
3253 * remote-sim.c (gdbsim_fetch_register): Likewise.
3254 (gdbsim_store_register): Likewise.
3255 * remote.c (fetch_register_using_p): Likewise.
3256 (send_g_packet): Likewise.
3257 (remote_prepare_to_store): Likewise.
3258 (store_registers_using_G): Likewise.
3259 * reverse.c (save_bookmark_command): Likewise.
3260 (goto_bookmark_command): Likewise.
3261 * rs6000-aix-tdep.c (branch_dest): Likewise.
3262 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3263 (fetch_register): Likewise.
3264 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3265 (ppc_collect_reg): Likewise.
3266 (ppc_collect_gregset): Likewise.
3267 (ppc_collect_fpregset): Likewise.
3268 (ppc_collect_vsxregset): Likewise.
3269 (ppc_collect_vrregset): Likewise.
3270 (ppc_displaced_step_hw_singlestep): Likewise.
3271 (rs6000_pseudo_register_read): Likewise.
3272 (rs6000_pseudo_register_write): Likewise.
3273 * s390-linux-nat.c (supply_gregset): Likewise.
3274 (fill_gregset): Likewise.
3275 (s390_linux_fetch_inferior_registers): Likewise.
3276 * s390-linux-tdep.c (s390_write_pc): Likewise.
3277 (s390_software_single_step): Likewise.
3278 (s390_all_but_pc_registers_record): Likewise.
3279 (s390_linux_syscall_record): Likewise.
3280 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3281 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3282 (shnbsd_store_inferior_registers): Likewise.
3283 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3284 (sh_extract_return_value_fpu): Likewise.
3285 (sh_store_return_value_nofpu): Likewise.
3286 (sh_corefile_supply_regset): Likewise.
3287 (sh_corefile_collect_regset): Likewise.
3288 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3289 (sh64_store_return_value): Likewise.
3290 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3291 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3292 (sparc_store_inferior_registers): Likewise.
3293 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3294 (sparc_ravenscar_prepare_to_store): Likewise.
3295 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3296 (sparc_analyze_control_transfer): Likewise.
3297 (sparc_step_trap): Likewise.
3298 (sparc_software_single_step): Likewise.
3299 (sparc32_gdbarch_init): Likewise.
3300 (sparc_supply_rwindow): Likewise.
3301 (sparc_collect_rwindow): Likewise.
3302 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3303 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3304 (sparc64nbsd_collect_gregset): Likewise.
3305 (sparc64nbsd_supply_fpregset): Likewise.
3306 (sparc64nbsd_collect_fpregset): Likewise.
3307 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3308 (sparc64_supply_gregset): Likewise.
3309 (sparc64_collect_gregset): Likewise.
3310 (sparc64_supply_fpregset): Likewise.
3311 (sparc64_collect_fpregset): Likewise.
3312 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3313 * spu-tdep.c (spu_unwind_sp): Likewise.
3314 (spu2ppu_prev_register): Likewise.
3315 (spu_memory_remove_breakpoint): Likewise.
3316 * stack.c (return_command): Likewise.
3317 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3318 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3319 * tracefile.c (trace_save_ctf): Likewise.
3320 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3321 (do_windows_store_inferior_registers): Likewise.
3322 (windows_resume): Likewise.
3323 * xtensa-linux-nat.c (fill_gregset): Likewise.
3324 (supply_gregset_reg): Likewise.
3325 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3326 (xtensa_register_read_masked): Likewise.
3327 (xtensa_supply_gregset): Likewise.
3328 (xtensa_extract_return_value): Likewise.
3329 (xtensa_store_return_value): Likewise.
3330
edd079d9
UW
33312017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3332
3333 * doublest.c (floatformat_from_string): New function.
3334 * doublest.h (floatformat_from_string): Add prototype.
3335
3336 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3337 (OP_FLOAT): ... this.
3338 * expression.h: Do not include "doublest.h".
3339 (union exp_element): Replace doubleconst and decfloatconst by
3340 new element floatconst.
3341 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3342 (ada_evaluate_subexp): Likewise.
3343 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3344 OP_DOUBLE and OP_DECFLOAT.
3345 * expprint.c (print_subexp_standard): Likewise.
3346 (dump_subexp_body_standard): Likewise.
3347 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3348
3349 * parse.c: Include "dfp.h".
3350 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3351 (write_exp_elt_floatcst): New function.
3352 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3353 and OP_DECFLOAT.
3354 (operator_check_standard): Likewise.
3355 (parse_float): Do not accept suffix. Take type as input. Return bool.
3356 Return target format buffer instead of host DOUBLEST.
3357 Use floatformat_from_string and decimal_from_string to parse
3358 either binary or decimal floating-point types.
3359 (parse_c_float): Remove.
3360 * parser-defs.h: Do not include "doublest.h".
3361 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3362 (write_exp_elt_floatcst): Add prototype.
3363 (parse_float): Update prototype.
3364 (parse_c_float): Remove.
3365
3366 * c-exp.y: Do not include "dfp.h".
3367 (typed_val_float): Use byte buffer instead of DOUBLEST.
3368 (typed_val_decfloat): Remove.
3369 (DECFLOAT): Remove.
3370 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3371 (parse_number): Update to new parse_float interface.
3372 Parse suffixes and determine type before calling parse_float.
3373 Handle decimal and binary FP types the same way.
3374
3375 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3376 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3377 (parse_number): Update to new parse_float interface.
3378 Parse suffixes and determine type before calling parse_float.
3379
3380 * f-exp.y: Replace dval by typed_val_float.
3381 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3382 (parse_number): Use parse_float instead of atof.
3383
3384 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3385 (parse_go_float): Remove.
3386 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3387 (parse_number): Call parse_float instead of parse_go_float.
3388 Parse suffixes and determine type before calling parse_float.
3389
3390 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3391 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3392 (parse_number): Update to new parse_float interface.
3393 Parse suffixes and determine type before calling parse_float.
3394
3395 * m2-exp.y: Replace dval by byte buffer val.
3396 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3397 (parse_number): Call parse_float instead of atof.
3398
3399 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3400 (lex_number): Call parse_float instead of strtod.
3401 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3402 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3403 Use write_exp_elt_floatcst.
3404 (unit_testing): Remove static variable.
3405 (rust_type): Do not check unit_testing.
3406 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3407
3408 * ada-exp.y (type_float, type_double): Remove.
3409 (typed_val_float): Use byte buffer instead of DOUBLEST.
3410 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3411 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3412
cc628f3d
AH
34132017-10-25 Alan Hayward <alan.hayward@arm.com>
3414
3415 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3416 * arch/aarch64.h: New file.
3417
09a7c6aa
UW
34182017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3419
3420 * dfp.h (decimal_from_string): Use const reference for argument.
3421 * dfp.c (decimal_from_string): Likewise.
3422
8ba0dd51
UW
34232017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3424
3425 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3426 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3427 * mips-tdep.c (mips_print_fp_register): Likewise.
3428
16e812b2
UW
34292017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3430
3431 * common/format.h (enum argclass): Replace decfloat_arg by
3432 dec32float_arg, dec64float_arg, and dec128float_arg.
3433 * common/format.c (parse_format_string): Update to return
3434 new decimal float argument classes.
3435
3436 * printcmd.c (printf_decfloat): Rename to ...
3437 (printf_floating): ... this. Add argclass argument, and use it
3438 instead of parsing the format string again. Add support for
3439 binary floating-point values, using floatformat_to_string.
3440 Convert value to the target format if it doesn't already match.
3441 (ui_printf): Call printf_floating instead of printf_decfloat,
3442 also for double_arg / long_double_arg. Pass argclass.
3443
3444 * dfp.c (decimal_to_string): Add format string argument.
3445 * dfp.h (decimal_to_string): Likewise.
3446
3447 * doublest.c (floatformat_to_string): Add format string argument.
3448 * doublest.h (floatformat_to_string): Likewise.
3449
fdf0cbc2
UW
34502017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3451
3452 * doublest.c (floatformat_precision): New routine.
3453 (floatformat_to_string): Likewise.
3454 * doublest.c (floatformat_to_string): Add prototype.
3455
3456 * printcmd.c (print_scalar_formatted): Only call print_floating
3457 on floating-point types.
3458 * valprint.c: Do not include "floatformat.h".
3459 (generic_val_print_decfloat): Remove.
3460 (generic_val_print): Call generic_val_print_float for both
3461 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3462 (print_floating): Use floatformat_to_string. Handle decimal float.
3463 (print_decimal_floating): Remove, merge into floatformat_to_string.
3464 * value.h (print_decimal_floating): Remove.
3465
3466 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3467
5033013f
UW
34682017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3469
3470 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3471
a664f67e
SM
34722017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3473
3474 * memattr.h: Don't include vec.h.
3475 (struct mem_attrib): Initialize fields.
3476 <unknown>: New static method.
3477 (struct mem_region): Add constructors, operator<, initialize
3478 fields.
3479 * memattr.c: Include algorithm.
3480 (default_mem_attrib, unknown_mem_attrib): Remove.
3481 (user_mem_region_list): New global.
3482 (target_mem_region_list, mem_region_list): Change type to
3483 std::vector<mem_region>.
3484 (mem_use_target): Now a function.
3485 (target_mem_regions_valid): Change type to bool.
3486 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3487 (require_user_regions): Adjust.
3488 (require_target_regions): Adjust.
3489 (create_mem_region): Adjust.
3490 (lookup_mem_region): Adjust.
3491 (invalidate_target_mem_regions): Adjust.
3492 (mem_clear): Rename to...
3493 (user_mem_clear): ... this, and adjust.
3494 (mem_command): Adjust.
3495 (info_mem_command): Adjust.
3496 (mem_enable, enable_mem_command, mem_disable,
3497 disable_mem_command): Adjust.
3498 (mem_delete): Adjust.
3499 (delete_mem_command): Adjust.
3500 * memory-map.h (parse_memory_map): Return an std::vector.
3501 * memory-map.c (parse_memory_map): Likewise.
3502 (struct memory_map_parsing_data): Add constructor.
3503 <memory_map>: Point to std::vector.
3504 (memory_map_start_memory): Adjust.
3505 (memory_map_end_memory): Adjust.
3506 (memory_map_end_property): Adjust.
3507 (clear_result): Remove.
3508 * remote.c (remote_memory_map): Return an std::vector.
3509 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3510 Remove.
3511 (target_debug_print_mem_region_vector): New.
3512 * target-delegates.c: Regenerate.
3513 * target.h (mem_region_vector): New typedef.
3514 (to_memory_map): Return mem_region_vector.
3515 (target_memory_map): Return an std::vector.
3516 * target.c (target_memory_map): Return an std::vector.
3517 (flash_erase_command): Adjust.
3518
6e17c565
SM
35192017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3520
3521 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3522 Change type to std::string.
3523 (memory_map_start_property): Adjust.
3524 (memory_map_end_property): Adjust.
3525
cfba9872
SM
35262017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3527
3528 * infrun.h: Include common/byte-vector.h.
3529 (struct displaced_step_closure): New struct.
3530 (struct buf_displaced_step_closure): New struct.
3531 * infrun.c (displaced_step_closure::~displaced_step_closure):
3532 Provide default implementation.
3533 (displaced_step_clear): Deallocate step closure with delete.
3534 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3535 (aarch64_displaced_step_closure): ... this, extend
3536 displaced_step_closure.
3537 (aarch64_displaced_step_data) <dsc>: Change type to
3538 aarch64_displaced_step_closure.
3539 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3540 unique_ptr.
3541 (aarch64_displaced_step_fixup): Add cast for displaced step
3542 closure.
3543 * amd64-tdep.c (displaced_step_closure): Rename to ...
3544 (amd64_displaced_step_closure): ... this, extend
3545 displaced_step_closure.
3546 <insn_buf>: Change type to std::vector<gdb_byte>.
3547 <max_len>: Remove.
3548 (fixup_riprel): Change type of DSC parameter, adjust to type
3549 change of insn_buf.
3550 (fixup_displaced_copy): Change type of DSC parameter.
3551 (amd64_displaced_step_copy_insn): Instantiate
3552 amd64_displaced_step_closure.
3553 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3554 to type change of insn_buf.
3555 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3556 parameter DSC.
3557 (arm_linux_copy_svc): Likewise.
3558 (cleanup_kernel_helper_return): Likewise.
3559 (arm_catch_kernel_helper_return): Likewise.
3560 (arm_linux_displaced_step_copy_insn): Instantiate
3561 arm_displaced_step_closure.
3562 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3563 (displaced_read_reg): Change type of parameter DSC.
3564 (branch_write_pc): Likewise.
3565 (load_write_pc): Likewise.
3566 (alu_write_pc): Likewise.
3567 (displaced_write_reg): Likewise.
3568 (arm_copy_unmodified): Likewise.
3569 (thumb_copy_unmodified_32bit): Likewise.
3570 (thumb_copy_unmodified_16bit): Likewise.
3571 (cleanup_preload): Likewise.
3572 (install_preload): Likewise.
3573 (arm_copy_preload): Likewise.
3574 (thumb2_copy_preload): Likewise.
3575 (install_preload_reg): Likewise.
3576 (arm_copy_preload_reg): Likewise.
3577 (cleanup_copro_load_store): Likewise.
3578 (install_copro_load_store): Likewise.
3579 (arm_copy_copro_load_store) Likewise.
3580 (thumb2_copy_copro_load_store): Likewise.
3581 (cleanup_branch): Likewise.
3582 (install_b_bl_blx): Likewise.
3583 (arm_copy_b_bl_blx): Likewise.
3584 (thumb2_copy_b_bl_blx): Likewise.
3585 (thumb_copy_b): Likewise.
3586 (install_bx_blx_reg): Likewise.
3587 (arm_copy_bx_blx_reg): Likewise.
3588 (thumb_copy_bx_blx_reg): Likewise.
3589 (cleanup_alu_imm): Likewise.
3590 (arm_copy_alu_imm): Likewise.
3591 (thumb2_copy_alu_imm): Likewise.
3592 (cleanup_alu_reg): Likewise.
3593 (install_alu_reg): Likewise.
3594 (arm_copy_alu_reg): Likewise.
3595 (thumb_copy_alu_reg): Likewise.
3596 (cleanup_alu_shifted_reg): Likewise.
3597 (install_alu_shifted_reg): Likewise.
3598 (arm_copy_alu_shifted_reg): Likewise.
3599 (cleanup_load): Likewise.
3600 (cleanup_store): Likewise.
3601 (arm_copy_extra_ld_st): Likewise.
3602 (install_load_store): Likewise.
3603 (thumb2_copy_load_literal): Likewise.
3604 (thumb2_copy_load_reg_imm): Likewise.
3605 (arm_copy_ldr_str_ldrb_strb): Likewise.
3606 (cleanup_block_load_all): Likewise.
3607 (cleanup_block_store_pc): Likewise.
3608 (cleanup_block_load_pc): Likewise.
3609 (arm_copy_block_xfer): Likewise.
3610 (thumb2_copy_block_xfer): Likewise.
3611 (cleanup_svc): Likewise.
3612 (install_svc): Likewise.
3613 (arm_copy_svc): Likewise.
3614 (thumb_copy_svc): Likewise.
3615 (arm_copy_undef): Likewise.
3616 (thumb_32bit_copy_undef): Likewise.
3617 (arm_copy_unpred): Likewise.
3618 (arm_decode_misc_memhint_neon): Likewise.
3619 (arm_decode_unconditional): Likewise.
3620 (arm_decode_miscellaneous): Likewise.
3621 (arm_decode_dp_misc): Likewise.
3622 (arm_decode_ld_st_word_ubyte): Likewise.
3623 (arm_decode_media): Likewise.
3624 (arm_decode_b_bl_ldmstm): Likewise.
3625 (arm_decode_ext_reg_ld_st): Likewise.
3626 (thumb2_decode_dp_shift_reg): Likewise.
3627 (thumb2_decode_ext_reg_ld_st): Likewise.
3628 (arm_decode_svc_copro): Likewise.
3629 (thumb2_decode_svc_copro): Likewise.
3630 (install_pc_relative): Likewise.
3631 (thumb_copy_pc_relative_16bit): Likewise.
3632 (thumb_decode_pc_relative_16bit): Likewise.
3633 (thumb_copy_pc_relative_32bit): Likewise.
3634 (thumb_copy_16bit_ldr_literal): Likewise.
3635 (thumb_copy_cbnz_cbz): Likewise.
3636 (thumb2_copy_table_branch): Likewise.
3637 (cleanup_pop_pc_16bit_all): Likewise.
3638 (thumb_copy_pop_pc_16bit): Likewise.
3639 (thumb_process_displaced_16bit_insn): Likewise.
3640 (decode_thumb_32bit_ld_mem_hints): Likewise.
3641 (thumb_process_displaced_32bit_insn): Likewise.
3642 (thumb_process_displaced_insn): Likewise.
3643 (arm_process_displaced_insn): Likewise.
3644 (arm_displaced_init_closure): Likewise.
3645 (arm_displaced_step_fixup): Add cast for closure.
3646 * arm-tdep.h: Include infrun.h.
3647 (displaced_step_closure): Rename to ...
3648 (arm_displaced_step_closure): ... this, extend
3649 displaced_step_closure.
3650 <u::svc::copy_svc_os>: Change type of parameter DSC.
3651 <cleanup>: Likewise.
3652 (arm_process_displaced_insn): Likewise.
3653 (arm_displaced_init_closure): Likewise.
3654 (displaced_read_reg): Likewise.
3655 (displaced_write_reg): Likewise.
3656 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3657 Adjust.
3658 * i386-tdep.h: Include infrun.h.
3659 (i386_displaced_step_closure): New typedef.
3660 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3661 i386_displaced_step_closure.
3662 (i386_displaced_step_fixup): Adjust.
3663 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3664 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3665 and unique_ptr.
3666 (ppc_displaced_step_fixup): Adjust.
3667 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3668 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3669 and unique_ptr.
3670 (s390_displaced_step_fixup): Adjust.
3671
b392b304
SM
36722017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3673
3674 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3675 Remove declarations.
3676
d5833c62
TT
36772017-10-20 Tom Tromey <tom@tromey.com>
3678
3679 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3680 std::vector.
3681 (gdb_bfd_record_inclusion): Update.
3682 (bfdp): Remove typedef.
3683
06d5bbc8
TT
36842017-10-20 Tom Tromey <tom@tromey.com>
3685
3686 * gdb_bfd.c (gdb_bfd_ref): Use new.
3687 (struct gdb_bfd_data): Add constructor, destructor, and member
3688 initializers.
3689 (gdb_bfd_unref): Use delete.
3690
2712ce2e
TT
36912017-10-20 Tom Tromey <tom@tromey.com>
3692
3693 * exec.c (exec_file_attach): Use new_bfd_ref.
3694 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3695 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3696 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3697 new_bfd_ref.
3698 * gdb_bfd.h (new_bfd_ref): New function.
3699
fcc8fb2f
PA
37002017-10-20 Pedro Alves <palves@redhat.com>
3701
3702 * main.c (captured_command_loop): Add attribute noinline.
3703
4c2287b0
SM
37042017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3705
3706 * interps.c (struct interp_factory): Add constructor.
3707 (interp_factory_p): Remove typedef.
3708 (DEF_VEC_P(interp_factory_p)): Remove.
3709 (interpreter_factories): Change type to std::vector.
3710 (interp_factory_register): Adjust.
3711 (interp_lookup): Adjust.
3712 (interpreter_completer): Adjust.
3713
3d415c26
TT
37142017-10-19 Tom Tromey <tom@tromey.com>
3715
3716 * break-catch-syscall.c (catch_syscall_completer): Use
3717 std::string, gdb::unique_xmalloc_ptr.
3718
395423c4
TT
37192017-10-19 Tom Tromey <tom@tromey.com>
3720
3721 * infcall.c (call_function_by_hand_dummy): Use std::string.
3722
54f70bc1
TT
37232017-10-19 Tom Tromey <tom@tromey.com>
3724
3725 * mi/mi-main.c (mi_cmd_execute): Update.
3726 * top.h (prepare_execute_command): Return scoped_value_mark.
3727 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3728 Add move constructor.
3729 * top.c (prepare_execute_command): Return scoped_value_mark.
3730 (execute_command): Update.
3731
63929e84
PA
37322017-10-19 Pedro Alves <palves@redhat.com>
3733
3734 * xml-support.c (xml_fetch_content_from_file): Check fread's
3735 return.
3736
a75868f5
PA
37372017-10-19 Pedro Alves <palves@redhat.com>
3738
3739 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3740 async.
3741 (handle_error_fd): New function.
3742 (ser_base_async): Add/delete an event loop file handler for
3743 error_fd.
3744
2edf834e
PA
37452017-10-19 Pedro Alves <palves@redhat.com>
3746
3747 * xml-support.c (xml_fetch_content_from_file): Don't read in
3748 chunks. Instead use fseek to determine the file's size, and read
3749 it in one go.
3750
c8ba13ad
KS
37512017-11-18 Keith Seitz <keiths@redhat.com>
3752
3753 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3754 types.
3755 Add whitespace to front of type name.
3756
37534686
KS
37572017-10-18 Keith Seitz <keiths@redhat.com>
3758
3759 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3760 DW_AT_accessibility.
3761
28c7c158
YQ
37622017-10-18 Yao Qi <yao.qi@linaro.org>
3763
3764 * features/tic6x-c62x-linux.c: Remove.
3765
30f0b101
TT
37662017-10-17 Tom Tromey <tom@tromey.com>
3767
3768 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3769 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3770 (do_mixed_source_and_assembly): Likewise.
3771
57e12da9
TT
37722017-10-17 Tom Tromey <tom@tromey.com>
3773
3774 * regcache.c (regcache::xfer_part): Remove assertion.
3775
7b700999
PA
37762017-10-17 Pedro Alves <palves@redhat.com>
3777
3778 * xml-support.c (xml_fetch_content_from_file): Call
3779 unique_ptr::release() instead unique_ptr::get() when passing
3780 through xrealloc.
3781
d3037ba6
YQ
37822017-10-17 Yao Qi <yao.qi@linaro.org>
3783
3784 * regcache.c (regcache::xfer_part): Remove parameters read and
3785 write, add parameter is_raw. All callers are updated.
3786
83d5a34d
KS
37872017-10-16 Keith Seitz <keiths@redhat.com>
3788
3789 * c-typeprint.c (enum access_specifier): Moved here from
3790 c_type_print_base.
3791 (output_access_specifier): New function.
3792 (c_type_print_base): Consider typedefs when assessing
3793 whether access labels are needed.
3794 Use output_access_specifier as needed.
3795 Output access specifier for typedefs, if needed.
3796 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3797 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3798 fields.
3799 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3800 accessor macros.
3801
87028b87
TT
38022017-10-16 Tom Tromey <tom@tromey.com>
3803
3804 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3805 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3806 * target.c (target_fileio_read_stralloc): Update.
3807 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3808 * target.h (target_fileio_read_stralloc): Return
3809 unique_xmalloc_ptr.
3810
b7b030ad
TT
38112017-10-16 Tom Tromey <tom@tromey.com>
3812
3813 * xml-syscall.c (xml_init_syscalls_info): Update.
3814 * xml-support.c (xinclude_start_include): Update.
3815 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3816 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3817 (xml_fetch_content_from_file): Likewise.
3818 * osdata.c (get_osdata): Update.
3819 * target.h (target_read_stralloc, target_get_osdata): Return
3820 unique_xmalloc_ptr.
3821 * solib-aix.c (solib_aix_get_library_list): Update.
3822 * solib-target.c (solib_target_current_sos): Update.
3823 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3824 * xml-tdesc.c (fetch_available_features_from_target): Update.
3825 (target_fetch_description_xml): Update.
3826 (file_read_description_xml): Update.
3827 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3828 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3829 (remote_pid_to_exec_file): Update.
3830 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3831 (target_get_osdata): Likewise.
3832
b80406ac
TT
38332017-10-16 Tom Tromey <tom@tromey.com>
3834
3835 * remote.c (remote_register_number_and_offset): Use std::vector.
3836 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3837 (putpkt_binary): Use gdb::def_vector.
3838 (compare_sections_command): Use gdb::byte_vector.
3839
a90ecff8
TT
38402017-10-16 Tom Tromey <tom@tromey.com>
3841
3842 * ppc-linux-nat.c (hwdebug_insert_point): Use
3843 gdb::unique_xmalloc_ptr, XDUP.
3844
2dc0e219
TT
38452017-10-16 Tom Tromey <tom@tromey.com>
3846
3847 * probe.c (parse_probes): Use std::string.
3848 (info_probes_for_ops, enable_probes_command)
3849 (disable_probes_command): Remove cleanups.
3850
b05628f0
TT
38512017-10-16 Tom Tromey <tom@tromey.com>
3852
3853 * buildsym.c (block_compar): Remove.
3854 (end_symtab_get_static_block): Use std::vector.
3855
a79b1bc6
SM
38562017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3857
3858 * memrange.h (struct mem_range): Define operator< and operator==.
3859 (mem_range_s): Remove.
3860 (DEF_VEC_O (mem_range_s)): Remove.
3861 (normalize_mem_ranges): Change parameter type to std::vector.
3862 * memrange.c (compare_mem_ranges): Remove.
3863 (normalize_mem_ranges): Change parameter type to std::vector,
3864 adjust to vector change.
3865 * exec.c (section_table_available_memory): Return vector, remove
3866 parameter.
3867 (section_table_read_available_memory): Adjust to std::vector
3868 change.
3869 * remote.c (remote_read_bytes): Adjust to std::vector
3870 change.
3871 * tracepoint.h (traceframe_available_memory): Change parameter
3872 type to std::vector.
3873 * tracepoint.c (traceframe_available_memory): Change parameter
3874 type to std::vector, adjust.
3875 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3876 std::vector change.
3877 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3878 unittests/memrange-selftests.c.
3879 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3880 * gdb/unittests/memrange-selftests.c: New file.
3881
63f0e930
PA
38822017-10-16 Pedro Alves <palves@redhat.com>
3883
3884 * elfread.c (probe_key_free): Rename range-for variable.
3885 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3886 (find_probe_by_pc, collect_probes): Rename range-for variable.
3887
c40c7bfc
YQ
38882017-10-16 Yao Qi <yao.qi@linaro.org>
3889
3890 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3891 * features/tic6x-c62x.c: Remove.
3892 * features/tic6x-c64x-linux.c: Remove.
3893 * features/tic6x-c64x.c: Remove.
3894 * features/tic6x-c64xp-linux.c: Remove.
3895 * features/tic6x-c64xp.c: Remove.
3896 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3897 initialize_tdesc_tic6x_*_linux functions.
3898 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3899 initialize_tdesc_tic6x_* functions.
3900
df27ae6a
YQ
39012017-10-16 Yao Qi <yao.qi@linaro.org>
3902
3903 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3904 tic6x-c62x.
3905 * regformats/tic6x-c62x.dat: Remove.
3906 * regformats/tic6x-c64x.dat: Remove.
3907 * regformats/tic6x-c64xp.dat: Remove.
3908
86766165
SM
39092017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3910
3911 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3912 (the !HAVE_LIBEXPAT version).
3913
824dfcc3
SM
39142017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3915
3916 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3917 const.
3918
2098b393
SM
39192017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3920
3921 * target.h: Include tracepoint.h.
3922 (enum trace_find_type): Move to tracepoint.h.
3923 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3924 * tracepoint.h: Don't include target.h
3925 (enum trace_find_type): Move from target.h.
3926 (parse_traceframe_info): Return a unique ptr.
3927 * tracepoint.c (current_traceframe_info): Change type to unique
3928 ptr.
3929 (free_traceframe_info): Remove.
3930 (clear_traceframe_info): Don't manually free
3931 current_traceframe_info.
3932 (free_result): Remove.
3933 (parse_traceframe_info): Return a unique ptr.
3934 (get_traceframe_info): Adjust to unique ptr.
3935 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3936 * remote.c (remote_traceframe_info): Return a unique ptr.
3937 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3938 ptr.
3939 * target-debug.h (target_debug_print_traceframe_info_up): New
3940 macro.
3941 * target-delegates.c: Regenerate.
3942
4cdd21a8
SM
39432017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3944
3945 * memrange.h (struct mem_range): Add constructors.
3946 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3947 std::vector<mem_range>.
3948 * tracepoint.c (free_traceframe_info): Don't manually free
3949 vector.
3950 (traceframe_info_start_memory): Adjust to vector change.
3951 (traceframe_available_memory): Likewise.
3952 * tracefile-tfile.c (build_traceframe_info): Likewise.
3953 * ctf.c (ctf_traceframe_info): Likewise.
3954
d0d292a2
SM
39552017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3956
3957 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3958 std::vector<int>.
3959 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3960 (traceframe_info_start_tvar): Adjust to vector change.
3961 (parse_traceframe_info): Allocate with new.
3962 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3963 vector change.
3964 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3965 change.
3966 tfile_traceframe_info): Allocate with new.
3967 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3968 change.
3969
8d3c73ef
SM
39702017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3971
3972 * tracepoint.c (traceframe_info): Rename to...
3973 (current_traceframe_info): ...this.
3974 (clear_traceframe_info): Adjust.
3975 (get_traceframe_info): Adjust.
3976
b129dcac
SM
39772017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3978
3979 * nat/linux-osdata.c: Include algorithm.
3980 (compare_processes): Remove.
3981 (struct pid_pgid_entry): New struct.
3982 (linux_xfer_osdata_processgroups): Use std::vector instead of
3983 XNEWVEC.
3984
af5bf4ad
SM
39852017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3986
3987 * objfiles.h: Don't include symfile.h.
3988 (struct partial_symbol): Remove forward-declaration.
3989 (struct objfile) <global_psymbols, static_psymbols>: Change type
3990 to std::vector<partial_symbol *>.
3991 * objfiles.c (objfile::objfile): Don't memset those fields.
3992 (objfile::~objfile): Don't free those fields.
3993 * psympriv.h (struct psymbol_allocation_list): Remove
3994 forward-declaration.
3995 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3996 to std::vector.
3997 (start_psymtab_common): Change parameters to std::vector.
3998 * psymtab.c: Include algorithm.
3999 (require_partial_symbols): Call shrink_to_fit.
4000 (find_pc_sect_psymbol): Adjust to vector change.
4001 (match_partial_symbol): Likewise.
4002 (lookup_partial_symbol): Likewise.
4003 (psym_relocate): Likewise.
4004 (dump_psymtab): Likewise.
4005 (recursively_search_psymtabs): Likewise.
4006 (compare_psymbols): Remove.
4007 (sort_pst_symbols): Adjust to vector change.
4008 (start_psymtab_common): Likewise.
4009 (end_psymtab_common): Likewise.
4010 (psymbol_bcache_full): De-constify return value.
4011 (add_psymbol_to_bcache): Likewise.
4012 (extend_psymbol_list): Remove.
4013 (append_psymbol_to_list): Adjust to vector change.
4014 (add_psymbol_to_list): Likewise.
4015 (init_psymbol_list): Likewise.
4016 (maintenance_info_psymtabs): Likewise.
4017 (maintenance_check_psymtabs): Likewise.
4018 * symfile.h (struct psymbol_allocation_list): Remove.
4019 * symfile.c (reread_symbols): Adjust to vector change.
4020 * dbxread.c (start_psymtab): Change type of parameters.
4021 (dbx_symfile_read): Adjust to vector change.
4022 (read_dbx_symtab): Likewise.
4023 (start_psymtab): Change type of parameters.
4024 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4025 (create_partial_symtab): Likewise.
4026 (add_partial_symbol): Likewise.
4027 (write_one_signatured_type): Likewise.
4028 (recursively_write_psymbols): Likewise.
4029 * mdebugread.c (parse_partial_symbols): Likewise.
4030 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4031 (scan_xcoff_symtab): Adjust to vector change.
4032 (xcoff_initial_scan): Likewise.
4033
3ec5942f
SM
40342017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4035
4036 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4037
2399fe6a
YQ
40382017-10-13 Yao Qi <yao.qi@linaro.org>
4039
4040 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4041 Remove s390x-*-expedite, add s390x-expedite.
4042
4bf3f4a8
YQ
40432017-10-13 Yao Qi <yao.qi@linaro.org>
4044
4045 * features/s390-gs-linux64.c: Regenerated.
4046 * features/s390x-gs-linux64.c: Regenerated.
4047
9e86da07
TT
40482017-10-13 Tom Tromey <tom@tromey.com>
4049
4050 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4051 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4052 delete.
4053 * symfile.c (symbol_file_add_with_addrs): Use new.
4054 (symbol_file_add_separate): Update comment.
4055 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4056 * jit.c (jit_object_close_impl): Use new.
4057 (jit_unregister_code): Use delete.
4058 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4059 (~objfile): Rename from free_objfile.
4060 (free_objfile_separate_debug, do_free_objfile_cleanup)
4061 (free_all_objfiles, objfile_purge_solibs): Use delete.
4062 * objfiles.h (struct objfile): Add constructor and destructor.
4063 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4064 (allocate_objfile, free_objfile): Don't declare.
4065 (struct objstats): Add initializers.
4066
c2508e90
SM
40672017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4068
4069 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4070 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4071 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4072 * gdbarch.h: Regenerate.
4073 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4074 Adjust comment.
4075 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4076 (i386_displaced_step_fixup): Adjust comment.
4077 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4078
a900ff72
TT
40792017-10-12 Tom Tromey <tom@tromey.com>
4080
4081 * prologue-value.h (pv_area::store_would_trash): Return bool.
4082 (pv_area::find_reg): Likewise.
4083 * prologue-value.c (pv_area::store_would_trash): Return bool.
4084 (pv_area::find_reg): Likewise.
4085
f7b7ed97
TT
40862017-10-12 Tom Tromey <tom@tromey.com>
4087
4088 * s390-linux-tdep.c (s390_store, s390_load)
4089 (s390_check_for_saved, s390_analyze_prologue): Update.
4090 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4091 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4092 * prologue-value.h (class pv_area): Move from prologue-value.c.
4093 Change names of members. Add constructor, destructor, member
4094 functions.
4095 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4096 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4097 (pv_area_fetch, pv_area_scan): Don't declare.
4098 * prologue-value.c (struct pv_area::area_entry): Now member of
4099 pv_area.
4100 (struct pv_area): Move to prologue-value.h.
4101 (pv_area::pv_area): Rename from make_pv_area.
4102 (pv_area::~pv_area): Rename from free_pv_area.
4103 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4104 (clear_entries, find_entry, overlaps, store_would_trash, store)
4105 (fetch, find_reg, scan): Now member of pv_area.
4106 Remove "area" argument. Update.
4107 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4108 Update.
4109 * mn10300-tdep.c (push_reg, check_for_saved)
4110 (mn10300_analyze_prologue): Update.
4111 * mep-tdep.c (is_arg_spill, check_for_saved)
4112 (mep_analyze_prologue): Update.
4113 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4114 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4115 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4116 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4117 Update.
4118 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4119 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4120
466eecee
SM
41212017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4122
4123 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4124 * linux-nat.c (linux_nat_delete_thread): New variable.
4125 (lwp_free): Invoke linux_nat_delete_thread if set.
4126 (linux_nat_set_delete_thread): New function.
4127 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4128 thread delete callback.
4129 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4130 (_initialize_arm_linux_nat): Assign thread delete callback.
4131 * s390-linux-nat.c (s390_delete_thread): New function.
4132 (_initialize_s390_nat): Assign thread delete callback.
4133 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4134 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4135 function.
4136 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4137 declaration.
4138 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4139 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4140
f71c8822
TT
41412017-10-09 Tom Tromey <tom@tromey.com>
4142
4143 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4144 std::string.
4145 * tui/tui-layout.c (enum tui_status): Use std::string.
4146
981a3fb3
TT
41472017-10-11 Tom Tromey <tom@tromey.com>
4148
4149 * gdbthread.h (thread_command): Constify.
4150 * inferior.h (detach_command): Constify.
4151 * top.h (set_history, show_history): Constify.
4152 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4153 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4154 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4155 * printcmd.c (set_command): Constify.
4156 (non_const_set_command): New function.
4157 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4158 * breakpoint.c (enable_command, disable_command, delete_command)
4159 (catch_command, tcatch_command, set_breakpoint_cmd)
4160 (show_breakpoint_cmd): Constify.
4161 * macrocmd.c (macro_command): Constify.
4162 * infcmd.c (unset_command, kill_command, detach_command)
4163 (info_proc_cmd): Constify.
4164 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4165 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4166 (info_auto_load_cmd): Constify.
4167 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4168 (unset_tdesc_cmd): Constify.
4169 * ada-lang.c (set_ada_command, show_ada_command)
4170 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4171 * guile/guile.c (set_guile_command, show_guile_command)
4172 (info_guile_command): Constify.
4173 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4174 Constify.
4175 * skip.c (skip_command): Constify.
4176 * compile/compile.c (_initialize_compile): Constify.
4177 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4178 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4179 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4180 (maint_btrace_pt_show_cmd): Constify.
4181 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4182 Constify.
4183 * python/python.c (user_show_python, user_set_python): Constify.
4184 * mips-tdep.c (set_mips_command, show_mips_command)
4185 (set_mipsfpu_command): Constify.
4186 * record-btrace.c (cmd_record_btrace_start)
4187 (cmd_set_record_btrace, cmd_show_record_btrace)
4188 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4189 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4190 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4191 Constify.
4192 * symfile.c (overlay_command): Constify.
4193 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4194 * cli/cli-logging.c (set_logging_command, show_logging_command):
4195 Constify.
4196 * cli/cli-dump.c (dump_command, append_command)
4197 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4198 (tekhex_dump_command, binary_dump_command)
4199 (binary_append_command): Constify.
4200 * cli/cli-decode.c (struct cmd_list_element): Change type of
4201 "fun".
4202 * cli/cli-cmds.c (info_command, show_command, set_debug)
4203 (show_debug): Constify.
4204 (show_command): Add non-const overload.
4205 * top.c (set_history, show_history): Constify.
4206 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4207 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4208 * target.c (target_command): Constify.
4209 * sparc64-tdep.c (info_adi_command): Constify.
4210 * record-full.c (cmd_record_full_start): Constify.
4211 (set_record_full_command): Constify. Fix typo.
4212 (show_record_full_command): Constify.
4213 * thread.c (thread_command, thread_apply_command): Constify.
4214 * memattr.c (dummy_cmd): Constify.
4215 * value.c (function_command): Constify.
4216 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4217 * probe.c (info_probes_command): Constify.
4218 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4219 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4220 (show_thread_cmd, set_thread_default_cmd)
4221 (show_thread_default_cmd): Constify.
4222 (check_empty): Constify.
4223 * tracepoint.c (tfind_command): Constify.
4224 * cp-support.c (maint_cplus_command): Constify.
4225 * windows-tdep.c (info_w32_command): Constify.
4226 * record.c (cmd_record_start, set_record_command)
4227 (show_record_command, info_record_command, cmd_record_goto):
4228 Constify.
4229 * ravenscar-thread.c (set_ravenscar_command)
4230 (show_ravenscar_command): Constify.
4231 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4232 Constify.
4233 (add_internal_problem_command): Remove casts.
4234 * arc-tdep.c (maintenance_print_arc_command): Constify.
4235 * valprint.c (set_print, show_print, set_print_raw)
4236 (show_print_raw): Constify.
4237 * maint.c (maintenance_command, maintenance_info_command)
4238 (maintenance_print_command, maintenance_set_cmd)
4239 (maintenance_show_cmd, set_per_command_cmd)
4240 (show_per_command_cmd, maintenance_check_command): Constify.
4241 * language.c (set_check, show_check): Constify.
4242 * typeprint.c (show_print_type, set_print_type): Constify.
4243 * go32-nat.c (go32_info_dos_command): Constify.
4244
fdf44873
TT
42452017-10-11 Tom Tromey <tom@tromey.com>
4246
4247 * breakpoint.c (prepare_re_set_context): Remove.
4248 (breakpoint_re_set_one): Update. Don't use cleanups.
4249 (breakpoint_re_set): Use scoped_restore, std::string, and
4250 scoped_restore_current_language.
4251
81b1e71c
TT
42522017-10-11 Tom Tromey <tom@tromey.com>
4253
4254 * breakpoint.c (commands_command_1): Use std::string.
4255 (cleanup_executing_breakpoints): Remove.
4256 (bpstat_do_actions_1): Use scoped_restore.
4257 (bpstat_check_watchpoint): Use std::string.
4258 (decode_static_tracepoint_spec): Likewise.
4259 (break_range_command): Likewise.
4260 (watch_command_1): Likewise.
4261 (compare_breakpoints): Change argument types.
4262 (clear_command): Use std::vector.
4263 (cleanup_executing_breakpoints): Remove.
4264 (update_global_location_list): Use unique_xmalloc_ptr.
4265 (strace_command): Remove unused declaration.
4266
4f9d9906
JB
42672017-10-11 John Baldwin <jhb@FreeBSD.org>
4268
4269 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4270 * NEWS: Mention new FreeBSD/arm native configuration.
4271 * configure.host: Add arm*-*-freebsd*.
4272 * configure.nat: Likewise.
4273 * arm-fbsd-nat.c: New file.
4274
7176dfd2
JB
42752017-10-11 John Baldwin <jhb@FreeBSD.org>
4276
4277 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4278 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4279 * NEWS: Mention new FreeBSD/arm target.
4280 * configure.tgt: Add arm*-*-freebsd*.
4281 * arm-fbsd-tdep.c: New file.
4282 * arm-fbsd-tdep.h: New file.
4283
fe220226
MR
42842017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4285
4286 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4287 `gdbarch_elfcore_write_linux_prpsinfo'.
4288 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4289 method.
4290 (elf_internal_linux_prpsinfo): Remove declaration.
4291 * gdbarch.h: Regenerate.
4292 * gdbarch.c: Regenerate.
4293
a2f63b2e
MR
42942017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4295
4296 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4297 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4298
458ca1d0
PA
42992017-10-11 Pedro Alves <palves@redhat.com>
4300
4301 * breakpoint.c (reattach_breakpoints): Delete.
4302 * breakpoint.h (reattach_breakpoints): Delete.
4303
905014d7
SM
43042017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4305
4306 * symfile.c (registered_sym_fns): Make struct, not typedef.
4307 (DEF_VEC_O (registered_sym_fns)): Remove.
4308 (symtab_fns): Change type to std::vector.
4309 (add_symtab_fns): Adjust.
4310 (find_sym_fns): Adjust.
4311
56d704da
AK
43122017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4313
4314 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4315 * arc-tdep.h (arc_arch_is_em): New function.
4316 (arc_arch_is_hs): Likewise.
4317
7fa29be9
EB
43182017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4319
4320 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4321 parentheses in the declaration.
4322 (macro_lookup_inclusion): Likewise.
4323 (macro_lookup_definition): Likewise.
4324 * p-lang.h (pascal_builtin_types): Likewise.
4325 * tui/tui-data.c (tui_win_list): Likewise.
4326 * tui/tui-data.h (tui_win_list): Likewise.
4327 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4328
d9b477e3
KB
43292017-10-11 Mark Rages <markrages@gmail.com>
4330
4331 * target-memory.c (block_boundaries): Fix for block address not
4332 aligned on block size.
4333
65630365
PA
43342017-10-10 Pedro Alves <palves@redhat.com>
4335 Tom Tromey <tom@tromey.com>
4336
4337 * breakpoint.c (struct captured_breakpoint_query_args)
4338 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4339 (print_breakpoint): New.
4340 * breakpoint.h (print_breakpoint): Declare.
4341 * common/common-exceptions.h (enum return_reason): Remove
4342 references to catch_exceptions.
4343 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4344 Delete.
4345 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4346 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4347 * gdb.h: Delete.
4348 * gdbthread.h (thread_select): Declare.
4349 * mi/mi-cmd-break.c: Don't include gdb.h.
4350 (breakpoint_notify): Use print_breakpoint.
4351 * mi/mi-cmd-catch.c: Don't include gdb.h.
4352 * mi/mi-interp.c: Don't include gdb.h.
4353 (mi_print_breakpoint_for_event): New.
4354 (mi_breakpoint_created, mi_breakpoint_modified): Use
4355 mi_print_breakpoint_for_event.
4356 * mi/mi-main.c: Don't include gdb.h.
4357 (mi_cmd_thread_select): Parse the global thread ID here. Use
4358 thread_select instead of gdb_thread_select.
4359 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4360 of using gdb_list_thread_ids.
4361 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4362 FILEIO_ENOSYS here.
4363 (remote_fileio_request): Use TRY/CATCH instead of
4364 catch_exceptions.
4365 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4366 (symbol_file_add_from_memory_wrapper): Delete.
4367 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4368 * thread.c: Don't include gdb.h.
4369 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4370 (thread_alive): Use thread_select.
4371 (do_captured_thread_select): Delete, parts salvaged as ...
4372 (thread_select): ... this new function.
4373 (gdb_thread_select): Delete.
4374
bf469271
PA
43752017-10-10 Pedro Alves <palves@redhat.com>
4376 Tom Tromey <tom@tromey.com>
4377
4378 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4379 and reverse logic.
4380 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4381 No longer macros. Instead ...
4382 (enum wp_check_result): They're now values of this new
4383 enumeration.
4384 (watchpoint_check): Change return type to wp_check_result and
4385 parameter type to bpstat.
4386 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4387 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4388 catch_errors. Reverse logic of watchpoint_check call.
4389 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4390 pointer as parameter.
4391 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4392 * common/common-exceptions.c (throw_exception_sjlj): Update
4393 comments to avoid mentioning catch_errors.
4394 * exceptions.c (catch_errors): Delete.
4395 * exceptions.h: Update comments to avoid mentioning catch_errors.
4396 (catch_errors_ftype, catch_errors): Delete.
4397 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4398 (hook_stop_stub): Delete.
4399 (restore_selected_frame): Change return type to void, and
4400 parameter type to const frame_id &.
4401 (restore_infcall_control_state): Use TRY/CATCH instead of
4402 catch_errors.
4403 * main.c (captured_command_loop): Return void and remove
4404 parameter. Remove references to catch_errors.
4405 (captured_main): Use TRY/CATCH instead of catch_errors.
4406 * objc-lang.c (objc_submethod_helper_data)
4407 (find_objc_msgcall_submethod_helper): Delete.
4408 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4409 catch_errors.
4410 * record-full.c (record_full_message): Return void.
4411 (record_full_message_args, record_full_message_wrapper): Delete.
4412 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4413 instead of catch_errors.
4414 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4415 parameter type to int.
4416 * solib-darwin.c (open_symbol_file_object): Ditto.
4417 * solib-dsbt.c (open_symbol_file_object): Ditto.
4418 * solib-frv.c (open_symbol_file_object): Ditto.
4419 * solib-svr4.c (open_symbol_file_object): Ditto.
4420 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4421 * solib.c (update_solib_list): Use TRY/CATCH instead of
4422 catch_errors.
4423 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4424 Change type.
4425 * symmisc.c (struct print_symbol_args): Remove.
4426 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4427 (print_symbol): Change type.
4428 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4429 and remove parameters.
4430 (catch_errors): New.
4431 (get_windows_debug_event): Adjust.
4432
1a56bfa5
TT
44332017-10-09 Tom Tromey <tom@tromey.com>
4434
4435 * mi/mi-main.c (free_splay_tree): Remove.
4436 (list_available_thread_groups): Use splay_tree_up.
4437 * common/gdb_splay_tree.h: New file.
4438
0c478e2d
TT
44392017-10-09 Tom Tromey <tom@tromey.com>
4440
4441 * mi/mi-main.c (do_nothing): Remove.
4442 (list_available_thread_groups): Update.
4443
cbd2b4e3
PA
44442017-10-09 Pedro Alves <palves@redhat.com>
4445
4446 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4447 reading registers when switching context.
4448
a181c0bf
JB
44492017-10-09 John Baldwin <jhb@FreeBSD.org>
4450
4451 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4452 (fbsd_convert_siginfo): Likewise.
4453 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4454
6e66f753
SM
44552017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4456
4457 * configure.ac (try_guile_versions): Remove guile-2.2.
4458 * configure: Regenerate.
4459
890e9790
TT
44602017-10-09 Tom Tromey <tom@tromey.com>
4461
4462 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4463 (COMPILE.pre): Use $(CXX).
4464
109483d9
PA
44652017-10-09 Pedro Alves <palves@redhat.com>
4466
4467 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4468 Use bool.
4469 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4470 * cp-support.h (cp_remove_params): Now returns a
4471 gdb::unique_xmalloc_ptr.
4472 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4473 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4474 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4475 returning a gdb::unique_xmalloc_ptr.
4476 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4477 * stack.c (find_frame_funname): Adjust to cp_remove_params
4478 returning a gdb::unique_xmalloc_ptr.
4479
791afaa2
TT
44802017-10-08 Tom Tromey <tom@tromey.com>
4481
4482 * dwarf2read.c (dwarf2_get_dwz_file): Use
4483 gdb::unique_xmalloc_ptr.
4484 (find_slot_in_mapped_hash): Likewise.
4485 (dwarf2_physname): Likewise.
4486 (create_dwo_unit_in_dwp_v1): Use std::string.
4487 (create_dwo_unit_in_dwp_v2): Likewise.
4488 (lookup_dwo_cutu): Likewise.
4489 (inherit_abstract_dies): Use std::vector.
4490 (read_array_type): Likewise.
4491 (dwarf_decode_macros): Remove unused declaration.
4492 (unsigned_int_compar): Remove.
4493 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4494 (psymtabs_addrmap_cleanup): Remove.
4495
30a9c02f
TT
44962017-10-08 Tom Tromey <tom@tromey.com>
4497
4498 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4499 * frame.h (frame_cleanup_after_sniffer): Declare.
4500 (frame_prepare_for_sniffer): Return void.
4501 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4502 type of argument.
4503 (frame_prepare_for_sniffer): Return void.
4504
757325a3
TT
45052017-10-08 Tom Tromey <tom@tromey.com>
4506
4507 * utils.h (make_cleanup_value_free): Remove.
4508 * utils.c (do_value_free, struct cleanup): Remove.
4509 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4510 Use gdb_value_up.
4511 * value.h (struct value_deleter): New.
4512 (gdb_value_up): New typedef.
4513
b9c04fb2
TT
45142017-10-08 Tom Tromey <tom@tromey.com>
4515
4516 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4517 (make_cleanup_free_search_symbols): Remove.
4518 (search_symbols): Return std::vector.
4519 (symbol_search::compare_search_syms): Now member of
4520 symbol_search. Change arguments.
4521 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4522 (symtab_symbol_info, rbreak_command): Update.
4523 * symtab.h (struct symbol_search) <next>: Remove.
4524 Add constructors.
4525 (symbol_search::operator<): New function.
4526 (symbol_search::operator==): New function.
4527 (search_symbols): Remove std::vector.
4528 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4529 (symbol_search::compare_search_syms): Declare.
4530
0d28b0a5
YQ
45312017-10-06 Yao Qi <yao.qi@linaro.org>
4532
4533 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4534 arch/aarch64-insn.o.
4535 Remove one rule.
4536 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4537
71917808
YQ
45382017-10-06 Yao Qi <yao.qi@linaro.org>
4539
4540 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4541 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4542 arch/arm-linux.o respectively.
4543 * configure.tgt: Likewise.
4544
2081b2b2
YQ
45452017-10-06 Yao Qi <yao.qi@linaro.org>
4546
4547 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4548 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4549
a1b85d28
PA
45502017-10-06 Pedro Alves <palves@redhat.com>
4551
4552 * windows-nat.c: Include <algorithm>.
4553
d97987e2
YQ
45542017-10-06 Yao Qi <yao.qi@linaro.org>
4555
4556 * configure.tgt (i386_tobjs): New variable.
4557 (amd64_tobjs): New variable.
4558 Set $cpu_obs and $os_obs.
4559
f38307f5
YQ
45602017-10-06 Yao Qi <yao.qi@linaro.org>
4561
4562 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4563 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4564 (clean): Remove object files and dependency files.
4565 (distclean): Remove the directory.
4566 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4567 * configure: Re-generated.
4568 * configure.tgt: Replace amd64.o with arch/amd64.o.
4569
2f924de6
JM
45702017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4571
4572 PR build/22188
4573 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4574 and SETEND.
4575
2fd9d7ca
PA
45762017-10-05 Pedro Alves <palves@redhat.com>
4577
4578 * linux-nat.c (linux_child_follow_fork): When following the parent
4579 and detaching the child, consult the parent thread's architecture
4580 instead of the child's.
4581
d13b8493
UW
45822017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4583
4584 * ax.h: Do not include "doublest.h".
4585 (union agent_val): Remove.
4586
3b4b2f16
UW
45872017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4588
4589 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4590 (decimal_to_string): Return std::string object.
4591 (decimal_from_string): Accept std::string object. Return bool.
4592 (decimal_from_integral, decimal_from_doublest): Remove.
4593 (decimal_from_longest): Add prototype.
4594 (decimal_from_ulongest): Likewise.
4595 (decimal_to_longest): Likewise.
4596 (decimal_from_doublest): Likewise.
4597 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4598 (MAX_DECIMAL_STRING): Move here.
4599 (decimal_to_string): Return std::string object.
4600 (decimal_from_string): Accept std::string object. Return bool.
4601 (decimal_from_integral): Remove, replace by ...
4602 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4603 (decimal_to_longest): New function.
4604 (decimal_from_floating): Remove, replace by ...
4605 (decimal_from_doublest): ... this new function.
4606 (decimal_to_doublest): Update to new decimal_to_string interface.
4607
4608 * value.c (unpack_long): Use decimal_to_longest.
4609 * valops.c (value_cast): Use decimal_from_doublest instead of
4610 decimal_from_floating. Use decimal_from_[u]longest isntead of
4611 decimal_from_integral.
4612 * valarith.c (value_args_as_decimal): Likewise.
4613 * valprint.c (print_decimal_floating): Update to new
4614 decimal_to_string interface.
4615 * printcmd.c (printf_decfloat): Likewise.
4616 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4617
1841ee5d
UW
46182017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4619
4620 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4621 * gdbtypes.c: Include "floatformat.h".
4622 * value.c: Likewise.
4623 * m68k-tdep.c: Likewise.
4624
4625 * findvar.c: Do not include "floatformat.h".
4626 * amd64-darwin-tdep.c: Likewise.
4627 * arm-linux-tdep.c: Likewise.
4628 * i386-darwin-tdep.c: Likewise.
4629 * i387-tdep.c: Likewise.
4630 * m68k-linux-tdep.c: Likewise.
4631 * mep-tdep.c: Likewise.
4632 * mips-tdep.c: Likewise.
4633 * nios2-tdep.c: Likewise.
4634 * s390-linux-tdep.c: Likewise.
4635 * sparc-obsd-tdep.c: Likewise.
4636 * sparc-tdep.c: Likewise.
4637 * sparc64-tdep.c: Likewise.
4638 * spu-tdep.c: Likewise.
4639 * tic6x-tdep.c: Likewise.
4640 * tilegx-tdep.c: Likewise.
4641 * vax-tdep.c: Likewise.
4642 * xstormy16-tdep.c: Likewise.
4643 * xtensa-tdep.c: Likewise.
4644
4645 * top.c: Do not include "doublest.h".
4646 * aarch64-tdep.c: Likewise.
4647 * alpha-tdep.c: Likewise.
4648 * arm-linux-tdep.c: Likewise.
4649 * m68k-linux-tdep.c: Likewise.
4650 * tilegx-tdep.c: Likewise.
4651 * xstormy16-tdep.c: Likewise.
4652
a80a6471
JB
46532017-10-05 John Baldwin <jhb@FreeBSD.org>
4654
4655 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4656 (mipsn32_fbsd_sigframe): Define.
4657 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4658 for FreeBSD/mipsn32.
4659
12c4bd7f
JB
46602017-10-05 John Baldwin <jhb@FreeBSD.org>
4661
4662 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4663 AT_HWCAP.
4664
c91933e9
TG
46652017-10-05 Tristan Gingold <tgingold@free.fr>
4666
4667 * MAINTAINERS (Misc): Update my email address.
4668
5cd63fda
PA
46692017-10-04 Pedro Alves <palves@redhat.com>
4670
4671 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4672 it instead of target_gdbarch.
4673 (get_remote_state, get_remote_packet_size): Adjust
4674 get_remote_arch_state calls, passing down target_gdbarch
4675 explicitly.
4676 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4677 'gdbarch' and use it instead of target_gdbarch.
4678 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4679 passing down target_gdbarch explicitly.
4680 (struct stop_reply) <arch>: New field.
4681 (remote_parse_stop_reply): Use the stopped thread's architecture,
4682 not the current inferior's. Save the architecture in the
4683 stop_reply.
4684 (process_stop_reply): Use the stop reply's architecture.
4685 (process_g_packet, remote_fetch_registers)
4686 (remote_prepare_to_store, store_registers_using_G)
4687 (remote_store_registers): Adjust get_remote_arch_state calls,
4688 using the regcache's architecture.
4689 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4690 passing down target_gdbarch explicitly.
4691 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4692 beneath instead of calling target_gdbarch.
4693 * target.c (default_thread_architecture): Use the specified
4694 inferior's architecture, instead of the current inferior's
4695 architecture (via target_gdbarch).
4696
ed4227b7
PA
46972017-10-04 Pedro Alves <palves@redhat.com>
4698
4699 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4700 case.
4701 (regcache_print): Handle !target_has_registers here instead.
4702
55b11ddf
PA
47032017-10-04 Pedro Alves <palves@redhat.com>
4704
4705 * frame.c (create_test_frame): Delete.
4706 * frame.h (create_test_frame): Delete.
4707 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4708 (class regcache_test): Delete.
4709 (test_target_has_registers, test_target_has_stack)
4710 (test_target_has_memory, test_target_prepare_to_store)
4711 (test_target_store_registers): New functions.
4712 (test_target_ops): New class.
4713 (register_to_value_test): Error out if there's already a
4714 process_stratum (or higher) target pushed. Create a fuller mock
4715 environment, with mock target_ops, inferior, address space, thread
4716 and inferior_ptid.
4717 * progspace.c (struct address_space): Move to ...
4718 * progspace.h (struct address_space): ... here.
4719 * regcache.h (regcache::~regcache, regcache::raw_write)
4720 [GDB_SELF_TEST]: No longer virtual.
4721
4c71c105
SM
47222017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4723
4724 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4725
73dcd72d
PA
47262017-10-04 Pedro Alves <palves@redhat.com>
4727
4728 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4729 out of 'between TRY and CATCH'.
4730
44704526
PA
47312017-10-04 Pedro Alves <palves@redhat.com>
4732
4733 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4734 * common/common-exceptions.h (TRY): Open an outermost scope.
4735 Expand intro comment.
4736 (CATCH): Reindent.
4737 (END_CATCH): Close the outermost scope.
4738 * completer.c (complete_line_internal): Add missing END_CATCH.
4739
bc3b087d
SDJ
47402017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4741
4742 * NEWS (Changes since GDB 8.0): Add entry about new
4743 'set-cwd-on-gdbserver' feature.
4744 (New remote packets): Add entry for QSetWorkingDir.
4745 * common/common-inferior.h (set_inferior_cwd): New prototype.
4746 * infcmd.c (set_inferior_cwd): Remove "static".
4747 (show_cwd_command): Expand text to include remote debugging.
4748 * remote.c: Add PACKET_QSetWorkingDir.
4749 (remote_protocol_features) <QSetWorkingDir>: New entry for
4750 PACKET_QSetWorkingDir.
4751 (extended_remote_set_inferior_cwd): New function.
4752 (extended_remote_create_inferior): Call
4753 "extended_remote_set_inferior_cwd".
4754 (_initialize_remote): Call "add_packet_config_cmd" for
4755 QSetWorkingDir.
4756
d092c5a2
SDJ
47572017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4758
4759 * NEWS (New commands): Mention "set/show cwd".
4760 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4761 "cd" command's help text.
4762 * common/common-inferior.h (get_inferior_cwd): New prototype.
4763 * infcmd.c (inferior_cwd_scratch): New global variable.
4764 (set_inferior_cwd): New function.
4765 (get_inferior_cwd): Likewise.
4766 (set_cwd_command): Likewise.
4767 (show_cwd_command): Likewise.
4768 (_initialize_infcmd): Add "set/show cwd" commands.
4769 * inferior.h (class inferior) <cwd>: New field.
4770 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4771 (fork_inferior): Change inferior's cwd before its execution.
4772 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4773 to CreateProcess.
4774
7da0a886
SDJ
47752017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4776
4777 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4778 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4779 (COMMON_OBS): Add gdb_tilde_expand.o.
4780 * common/gdb_tilde_expand.c: New file.
4781 * common/gdb_tilde_expand.h: Likewise.
4782
db8dd160
MR
47832017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4784
4785 * gdbarch.sh (objfile): Remove duplicate declaration.
4786 * gdbarch.h: Regenerate.
4787
f8bfbf22
TT
47882017-10-03 Tom Tromey <tom@tromey.com>
4789
4790 * utils.c (internal_vproblem): Use string_vprintf.
4791
5178ed48
TT
47922017-10-03 Tom Tromey <tom@tromey.com>
4793
4794 * printcmd.c (info_symbol_command): Use std::string.
4795
8cff8730
TT
47962017-10-03 Tom Tromey <tom@tromey.com>
4797
4798 * top.c (gdb_safe_append_history): Use std::string.
4799
895b8f30
TT
48002017-10-03 Tom Tromey <tom@tromey.com>
4801
4802 * event-top.c (stdin_event_handler): Update.
4803 * main.c (captured_main_1): Update.
4804 * top.h (make_delete_ui_cleanup): Remove.
4805 (struct ui): Add constructor and destructor.
4806 (new_ui, delete_ui): Remove.
4807 * top.c (make_delete_ui_cleanup): Remove.
4808 (new_ui_command): Use std::unique_ptr.
4809 (delete_ui_cleanup): Remove.
4810 (ui::ui): Rename from new_ui. Update.
4811 (free_ui): Remove.
4812 (ui::~ui): Rename from delete_ui. Update.
4813
0efef640
TT
48142017-10-03 Tom Tromey <tom@tromey.com>
4815
4816 * symfile.c (load_progress): Use gdb::byte_vector.
4817
245ad7d3
TT
48182017-10-03 Tom Tromey <tom@tromey.com>
4819
4820 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4821 declaration.
4822 * printcmd.c (x_command): Remove unused declaration.
4823 * symfile.c (symbol_file_command): Remove unused declaration.
4824
e05550d7
TT
48252017-10-03 Tom Tromey <tom@tromey.com>
4826
4827 * utils.c (internal_vproblem): Use std::string.
4828 (defaulted_query): Likewise.
4829
b95de2b7
TT
48302017-10-03 Tom Tromey <tom@tromey.com>
4831
4832 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4833 * top.c (execute_command_to_string): Update.
4834 * utils.c (make_cleanup_restore_page_info): Remove.
4835 (do_restore_page_info_cleanup): Remove.
4836 (set_batch_flag_and_restore_page_info):
4837 New.
4838 (make_cleanup_restore_page_info): Remove.
4839 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4840 (~set_batch_flag_and_restore_page_info): New
4841 (make_cleanup_restore_uinteger): Remove.
4842 (make_cleanup_restore_integer): Remove.
4843 (struct restore_integer_closure): Remove.
4844 (restore_integer): Remove.
4845 * utils.h (struct set_batch_flag_and_restore_page_info): New
4846 class.
4847 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4848 (make_cleanup_restore_page_info): Remove.
4849 (make_cleanup_restore_uinteger) Remove.
4850 (make_cleanup_restore_integer) Remove.
4851
07036511
TT
48522017-10-03 Tom Tromey <tom@tromey.com>
4853
4854 * record-full.h (record_full_gdb_operation_disable_set): Return
4855 scoped_restore_tmpl<int>.
4856 * infrun.c (adjust_pc_after_break): Update.
4857 (handle_signal_stop): Update.
4858 * record-full.c (record_full_gdb_operation_disable_set): Return
4859 scoped_restore_tmpl<int>.
4860 (record_full_wait_1, record_full_insert_breakpoint)
4861 (record_full_remove_breakpoint, record_full_save)
4862 (record_full_goto_insn): Update.
4863
45320ffa
TT
48642017-10-02 Tom Tromey <tom@tromey.com>
4865
4866 PR rust/22236:
4867 * rust-lang.c (rust_val_print_str): New function.
4868 (val_print_struct): Call it.
4869 (rust_subscript): Preserve name of slice type.
4870
b3e3859b
TT
48712017-10-02 Tom Tromey <tom@tromey.com>
4872
4873 * rust-lang.c (rust_subscript): Handle slices in
4874 EVAL_AVOID_SIDE_EFFECTS case.
4875
01af5e0d
TT
48762017-10-02 Tom Tromey <tom@tromey.com>
4877
4878 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4879
888e3ddb
TT
48802017-10-02 Tom Tromey <tom@tromey.com>
4881
4882 * rust-lang.h (rust_slice_type): Add "extern".
4883
cc536b21
PA
48842017-10-02 Tom Tromey <tom@tromey.com>
4885 Pedro Alves <palves@redhat.com>
4886
4887 * ada-lang.h (ada_exc_info::operator<): Make const.
4888 (ada_exc_info::operator==): Make const.
4889 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4890 Make const.
4891
386c8614
TT
48922017-09-29 Tom Tromey <tom@tromey.com>
4893
4894 * target.c (read_whatever_is_readable): Change type of "result".
4895 Update.
4896 (free_memory_read_result_vector): Remove.
4897 (read_memory_robust): Change return type. Update.
4898 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4899 bin2hex, std::string.
4900 * target.h (memory_read_result_s): Remove typedef.
4901 (free_memory_read_result_vector): Remove.
4902 (read_memory_robust): Return std::vector.
4903
789c4b5e
TT
49042017-09-29 Tom Tromey <tom@tromey.com>
4905
4906 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4907
ab816a27
TT
49082017-09-29 Tom Tromey <tom@tromey.com>
4909
4910 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4911 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4912 operator< and operator==.
4913 (ada_exceptions_list): Return a std::vector.
4914 * ada-lang.c (ada_exc_info::operator<): Rename from
4915 compare_ada_exception_info.
4916 (ada_exc_info::operator==): New.
4917 (sort_remove_dups_ada_exceptions_list): Change type of
4918 "exceptions".
4919 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4920 (ada_add_global_exceptions): Likewise.
4921 (ada_exceptions_list_1): Return a std::vector.
4922 (ada_exceptions_list): Likewise.
4923
52f9abe4
TT
49242017-09-29 Tom Tromey <tom@tromey.com>
4925
4926 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4927 'std::set *'.
4928 (print_one_inferior): Update.
4929 (free_vector_of_ints): Remove.
4930 (list_available_thread_groups): Change "ids" to std::set.
4931 (mi_cmd_list_thread_groups): Update.
4932 (struct collect_cores_data) <core>: Now a std::set.
4933 (collect_cores): Update.
4934 (unique): Remove.
4935 (print_one_inferior): Update.
4936
dcd5ddcc
TT
49372017-09-29 Tom Tromey <tom@tromey.com>
4938
4939 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4940 (mi_execute_async_cli_command): Likewise.
4941 (mi_cmd_trace_frame_collected): Use field_fmt.
4942
45d288cc
TT
49432017-09-29 Tom Tromey <tom@tromey.com>
4944
4945 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4946 gdb::byte_vector.
4947
6afe2f4a
TT
49482017-09-29 Tom Tromey <tom@tromey.com>
4949
4950 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4951
9813429a
TT
49522017-09-29 Tom Tromey <tom@tromey.com>
4953
4954 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4955
2d6960b4
TT
49562017-09-29 Tom Tromey <tom@tromey.com>
4957
4958 * varobj.h (varobj_gen_name): Return std::string.
4959 * varobj.c (varobj_gen_name): Return std::string.
4960 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4961 (mi_cmd_var_delete): Don't copy "name".
4962
784c453a
TT
49632017-09-29 Tom Tromey <tom@tromey.com>
4964
4965 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4966 (mi_cmd_break_insert_1): Update.
4967
a9bc57b9
TT
49682017-09-29 Tom Tromey <tom@tromey.com>
4969
4970 * target.h (make_scoped_defer_target_commit_resume): Update.
4971 * target.c (make_scoped_defer_target_commit_resume): Rename from
4972 make_cleanup_defer_target_commit_resume. Return a
4973 scoped_restore.
4974 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4975
9754d8c4
TT
49762017-09-29 Tom Tromey <tom@tromey.com>
4977
4978 * main.c (captured_main_1): Remove unused declaration.
4979 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4980
99ef965c
TT
49812017-09-29 Tom Tromey <tom@tromey.com>
4982
4983 * symtab.c (search_symbols): Remove unused outer cleanup.
4984 (make_source_files_completion_list): Remove unused declaration.
4985
42518ba7
TT
49862017-09-29 Tom Tromey <tom@tromey.com>
4987
4988 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4989
726b2169
TT
49902017-09-29 Tom Tromey <tom@tromey.com>
4991
4992 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4993 gdb::byte_vector.
4994
55b06432
TT
49952017-09-29 Tom Tromey <tom@tromey.com>
4996
4997 * complaints.c (vcomplaint): Use std::string.
4998
8abcee91
TT
49992017-09-29 Tom Tromey <tom@tromey.com>
5000
5001 * tracepoint.c (trace_variable_command): Use std::string.
5002 (encode_actions_1): Remove unused declarations.
5003 (create_tsv_from_upload): Use std::string.
5004
6ad94bc7
TT
50052017-09-29 Tom Tromey <tom@tromey.com>
5006
5007 * cp-support.c (gdb_demangle): Use std::string.
5008
2003f3d8
TT
50092017-09-29 Tom Tromey <tom@tromey.com>
5010
5011 * stack.c (parse_frame_specification): Use std::string
5012 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5013
8f8accb5
TT
50142017-09-29 Tom Tromey <tom@tromey.com>
5015
5016 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5017
200aa7b1
TT
50182017-09-29 Tom Tromey <tom@tromey.com>
5019
5020 * utils.c (vfprintf_maybe_filtered): Use std::string.
5021 (vfprintf_unfiltered): Likewise.
5022
606aae8a
TT
50232017-09-29 Tom Tromey <tom@tromey.com>
5024
5025 * event-top.c (top_level_prompt): Return std::string.
5026 (display_gdb_prompt): Update.
5027
bd413795
TT
50282017-09-29 Tom Tromey <tom@tromey.com>
5029
5030 * unittests/common-utils-selftests.c (format): New function.
5031 (string_vprintf_tests): New function.
5032 (_initialize_common_utils_selftests): Register new tests.
5033 * common/common-utils.c (string_vprintf): New function.
5034 * common/common-utils.h (string_vprintf): Declare.
5035
256642e8
PA
50362017-09-29 Pedro Alves <palves@redhat.com>
5037
5038 * common/rsp-low.c (unpack_varlen_hex): Constify.
5039 * common/rsp-low.h (unpack_varlen_hex): Constify.
5040 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5041 Constify.
5042 * remote.c (remote_set_permissions, read_ptid)
5043 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5044 (remote_static_tracepoint_marker_at)
5045 (remote_static_tracepoint_markers_by_strid)
5046 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5047 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5048 (parse_tracepoint_definition, parse_tsv_definition)
5049 (parse_static_tracepoint_marker_definition): Constify.
5050 * tracepoint.h (parse_static_tracepoint_marker_definition)
5051 (parse_trace_status, parse_tracepoint_status)
5052 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5053
b6bb3468
PA
50542017-09-29 Pedro Alves <palves@redhat.com>
5055
5056 * remote.c (target_buf, target_buf_size): Delete.
5057 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5058 Use the connection's packet buffer instead.
5059 All callers adjusted.
5060 (_initialize_remote): Remove references to target_buf and
5061 target_buf_size.
5062
b2f8eb7a
PA
50632017-09-28 Pedro Alves <palves@redhat.com>
5064
5065 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5066 unittests/common-utils-selftests.c.
5067 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5068 (COMMON_OBS): Remove utils-selftests.o.
5069 * utils-selftests.c: Move to ...
5070 * unittests/common-utils-selftests.c: ... here and rename self
5071 test to "string_printf".
5072
08302ed2
DE
50732017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5074
5075 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5076 having NULL cus or tus.
5077
96a5a1d3
UW
50782017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5079
5080 * arm-tdep.c: (convert_from_extended): Remove.
5081 (convert_to_extended): Likewise.
5082 (arm_extract_return_value): Use convert_typed_floating.
5083 (arm_store_return_value): Likewise.
5084
5085 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5086 * sh-tdep.c: Do not include "floatformat.h".
5087 (sh_littlebyte_bigword_type): New function.
5088 (sh_register_convert_to_virtual): Use convert_typed_floating.
5089 (sh_register_convert_to_raw): Likewise.
5090 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5091 (sh64_littlebyte_bigword_type): New function.
5092 (sh64_extract_return_value): Use convert_typed_floating.
5093 (sh64_register_convert_to_virtual): Likewise.
5094 (sh64_register_convert_to_raw): Likewise.
5095
0db7851f
UW
50962017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5097
5098 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5099 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5100
5101 * gdbtypes.h (union type_specific): Make field floatformat hold
5102 just a single struct floatformat, not an array.
5103 (floatformat_from_type): Move here.
5104 * gdbtypes.c (floatformat_from_type): Move here. Update to
5105 changed TYPE_FLOATFORMAT definition.
5106 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5107 (recursive_dump_type): Likewise.
5108 (init_float_type): Install correct floatformat for byte order.
5109 (arch_float_type): Likewise.
5110
77b7c781
UW
51112017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5112
5113 * gdbtypes.c (init_type): Change incoming argument from
5114 length-in-bytes to length-in-bits. Assert length is a
5115 multiple of TARGET_CHAR_BITS.
5116 (arch_type, arch_flags_type): Likewise.
5117 (init_integer_type): Update call to init_type.
5118 (init_character_type): Likewise.
5119 (init_boolean_type): Likewise.
5120 (init_float_type): Likewise.
5121 (init_decfloat_type): Likewise.
5122 (init_complex_type): Likewise.
5123 (init_pointer_type): Likewise.
5124 (objfile_type): Likewise.
5125 (arch_integer_type): Update call to arch_type.
5126 (arch_character_type): Likewise.
5127 (arch_boolean_type): Likewise.
5128 (arch_float_type): Likewise.
5129 (arch_decfloat_type): Likewise.
5130 (arch_complex_type): Likewise.
5131 (arch_pointer_type): Likewise.
5132 (gdbtypes_post_init): Likewise.
5133
5134 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5135 (read_base_type): Likewise.
5136 * mdebugread.c (basic_type): Likewise.
5137 * stabsread.c (dbx_init_float_type): Likewise.
5138 (rs6000_builtin_type): Likewise.
5139 (read_range_type): Likewise. Also, fix call to init_integer_type
5140 with erroneous length argument.
5141
5142 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5143 * d-lang.c (build_d_types): Likewise.
5144 * f-lang.c (build_fortran_types): Likewise.
5145 * go-lang.c (build_go_types): Likewise.
5146 * opencl-lang.c (build_opencl_types): Likewise.
5147 * jit.c (finalize_symtab): Likewise.
5148 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5149 (build_std_type_info_type): Likewise.
5150 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5151 update call to arch_flags_type.
5152
5153 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5154 arch_type.
5155 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5156 * windows-tdep.c (windows_get_tlb_type): Likewise.
5157
5158 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5159 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5160 * m32c-tdep.c (make_types): Likewise.
5161 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5162 (rl78_psw_type): Update call to arch_flags_type.
5163 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5164 * rx-tdep.c (rx_psw_type): Likewise.
5165 (rx_fpsw_type): Likewise.
5166 * sparc-tdep.c (sparc_psr_type): Likewise.
5167 (sparc_fsr_type): Likewise.
5168 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5169 (sparc64_ccr_type): Likewise.
5170 (sparc64_fsr_type): Likewise.
5171 (sparc64_fprs_type): Likewise.
5172
f21b4d5c
TT
51732017-09-27 Tom Tromey <tom@tromey.com>
5174
5175 * findcmd.c (find_command): Constify.
5176
643c2ffa
TT
51772017-09-27 Tom Tromey <tom@tromey.com>
5178
5179 * ada-tasks.c (task_command_1, task_command): Constify.
5180
510e5e56
TT
51812017-09-27 Tom Tromey <tom@tromey.com>
5182
5183 * symtab.c (maintenance_print_symbol_cache)
5184 (maintenance_flush_symbol_cache)
5185 (maintenance_print_symbol_cache_statistics): Constify.
5186
e503b191
TT
51872017-09-27 Tom Tromey <tom@tromey.com>
5188
5189 * inferior.c (detach_inferior_command, kill_inferior_command)
5190 (inferior_command): Constify.
5191
4e001312
TT
51922017-09-27 Tom Tromey <tom@tromey.com>
5193
5194 * regcache.c (regcache_print, maintenance_print_registers)
5195 (maintenance_print_raw_registers)
5196 (maintenance_print_cooked_registers)
5197 (maintenance_print_register_groups)
5198 (maintenance_print_remote_registers): Constify.
5199
77763700
TT
52002017-09-27 Tom Tromey <tom@tromey.com>
5201
5202 * printcmd.c (map_display_numbers, undisplay_command)
5203 (enable_disable_display_command, enable_display_command)
5204 (disable_display_command): Constify.
5205
4495129a
TT
52062017-09-27 Tom Tromey <tom@tromey.com>
5207
5208 * breakpoint.h (delete_command): Don't declare.
5209 * breakpoint.c (delete_command, enable_once_command)
5210 (enable_count_command, enable_delete_command, breakpoint_1)
5211 (maintenance_info_breakpoints, stopin_command, stopat_command)
5212 (delete_command, delete_trace_command, save_breakpoints)
5213 (save_breakpoints_command, save_tracepoints_command): Constify.
5214
3088cf40
TT
52152017-09-27 Tom Tromey <tom@tromey.com>
5216
5217 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5218 (skip_ws, extract_identifier, macro_define_command)
5219 (macro_undef_command, macro_list_command): Constify.
5220
69f476a3
TT
52212017-09-27 Tom Tromey <tom@tromey.com>
5222
5223 * infcmd.c (environment_info, set_environment_command)
5224 (unset_environment_command, path_info, info_proc_cmd_1)
5225 (info_proc_cmd_mappings, info_proc_cmd_stat)
5226 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5227 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5228
c4a3e68e
TT
52292017-09-27 Tom Tromey <tom@tromey.com>
5230
5231 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5232 Constify.
5233
c9d31bd6
TT
52342017-09-27 Tom Tromey <tom@tromey.com>
5235
5236 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5237
1f3f85eb
TT
52382017-09-27 Tom Tromey <tom@tromey.com>
5239
5240 * demangle.c (demangle_command): Constify.
5241
9c504b5d
TT
52422017-09-27 Tom Tromey <tom@tromey.com>
5243
5244 * progspace.c (maintenance_info_program_spaces_command):
5245 Constify.
5246
6663cf91
TT
52472017-09-27 Tom Tromey <tom@tromey.com>
5248
5249 * compile/compile.c (check_raw_argument, compile_file_command)
5250 (compile_code_command, compile_print_command): Constify.
5251
34e5fa26
TT
52522017-09-27 Tom Tromey <tom@tromey.com>
5253
5254 * reggroups.c (maintenance_print_reggroups): Constify.
5255
8384c356
TT
52562017-09-27 Tom Tromey <tom@tromey.com>
5257
5258 * dwarf2read.c (save_gdb_index_command): Constify.
5259
884beb0c
TT
52602017-09-27 Tom Tromey <tom@tromey.com>
5261
5262 * stap-probe.c (info_probes_stap_command): Constify.
5263
e0b2930c
TT
52642017-09-27 Tom Tromey <tom@tromey.com>
5265
5266 * fork-child.c (unset_exec_wrapper_command): Constify.
5267
f938677d
TT
52682017-09-27 Tom Tromey <tom@tromey.com>
5269
5270 * btrace.c (get_uint, get_context_size, no_chunk)
5271 (maint_btrace_packet_history_cmd)
5272 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5273 (maint_info_btrace_cmd): Constify.
5274
8949cb87
TT
52752017-09-27 Tom Tromey <tom@tromey.com>
5276
5277 * reverse.c (delete_bookmark_command): Constify.
5278
ac88e2de
TT
52792017-09-27 Tom Tromey <tom@tromey.com>
5280
5281 * remote.c (set_memory_packet_size)
5282 (set_memory_write_packet_size, show_memory_write_packet_size)
5283 (set_memory_read_packet_size, show_memory_read_packet_size)
5284 (compare_sections_command, packet_command, remote_put_command)
5285 (remote_get_command, remote_delete_command): Constify.
5286
bd4c9dfe
TT
52872017-09-27 Tom Tromey <tom@tromey.com>
5288
5289 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5290 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5291 (set_mipsfpu_auto_command): Constify.
5292
5e93d4c6
TT
52932017-09-27 Tom Tromey <tom@tromey.com>
5294
5295 * cli/cli-cmds.h (cd_command): Constify.
5296 * cli/cli-cmds.c (cd_command): Constify.
5297
fc41a75b
TT
52982017-09-27 Tom Tromey <tom@tromey.com>
5299
5300 * thread.c (thread_name_command, thread_find_command): Constify.
5301
67810076
TT
53022017-09-27 Tom Tromey <tom@tromey.com>
5303
5304 * probe.c (enable_probes_command, disable_probes_command):
5305 Constify.
5306
1d8b34a7
TT
53072017-09-27 Tom Tromey <tom@tromey.com>
5308
5309 * symfile.c (symbol_file_command): Constify.
5310 * gdbcore.h (deprecated_file_changed_hook): Constify.
5311 * exec.c (deprecated_file_changed_hook, exec_file_command)
5312 (file_command): Constify.
5313 * defs.h (symbol_file_command): Constify.
5314
442019e1
TT
53152017-09-27 Tom Tromey <tom@tromey.com>
5316
5317 * remote-fileio.c (set_system_call_allowed)
5318 (show_system_call_allowed): Constify.
5319
2983f7cb
TT
53202017-09-27 Tom Tromey <tom@tromey.com>
5321
5322 * tracepoint.c (delete_trace_variable_command)
5323 (tfind_end_command, tfind_start_command, tfind_pc_command)
5324 (tfind_tracepoint_command, tfind_line_command)
5325 (tfind_range_command, tfind_outside_command): Constify.
5326
4fd41b24
TT
53272017-09-27 Tom Tromey <tom@tromey.com>
5328
5329 * ax-gdb.c (maint_agent_printf_command, agent_command)
5330 (agent_eval_command): Constify.
5331
f2fc3015
TT
53322017-09-27 Tom Tromey <tom@tromey.com>
5333
5334 * tracepoint.c (info_scope_command): Constify.
5335 * python/python.c (gdbpy_decode_line): Constify.
5336 * python/py-breakpoint.c (bppy_init): Constify.
5337 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5338 * location.h: (new_linespec_location)
5339 (string_to_event_location_basic, string_to_event_location):
5340 Constify.
5341 * location.c (new_linespec_location)
5342 (string_to_event_location_basic, string_to_event_location):
5343 Constify.
5344 * linespec.h (decode_line_with_current_source)
5345 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5346 * linespec.c (linespec_lex_to_end)
5347 (decode_line_with_current_source)
5348 (decode_line_with_last_displayed): Constify.
5349 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5350 Constify.
5351 * cli/cli-cmds.c (edit_command, list_command): Constify.
5352 * breakpoint.h (until_break_command, watch_command_wrapper)
5353 (awatch_command_wrapper, rwatch_command_wrapper)
5354 (init_ada_exception_breakpoint): Constify.
5355 * breakpoint.c (break_command_1, dprintf_command)
5356 (break_range_command, watch_command_wrapper)
5357 (rwatch_command_wrapper, awatch_command_wrapper)
5358 (until_break_command, init_ada_exception_breakpoint)
5359 (strace_marker_create_sals_from_location, trace_command)
5360 (ftrace_command, strace_command, struct tracepoint): Constify.
5361 * ax-gdb.c (agent_command_1): Constify.
5362 * ada-lang.c (ada_exception_sal): Constify.
5363
8c2f95f4
TT
53642017-09-27 Tom Tromey <tom@tromey.com>
5365
5366 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5367 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5368 (get_context_size, no_chunk, get_insn_history_modifiers)
5369 (cmd_record_insn_history, get_call_history_modifiers)
5370 (cmd_record_call_history): Constify.
5371
a0d65762
TT
53722017-09-27 Tom Tromey <tom@tromey.com>
5373
5374 * source.c (show_substitute_path_command)
5375 (unset_substitute_path_command, set_substitute_path_command):
5376 Constify.
5377
58971144
TT
53782017-09-27 Tom Tromey <tom@tromey.com>
5379
5380 * typeprint.c (maintenance_print_type): Constify.
5381 * maint.c (maintenance_dump_me, maintenance_demangle)
5382 (maintenance_time_display, maintenance_info_sections)
5383 (maintenance_print_statistics, maintenance_deprecate)
5384 (maintenance_undeprecate): Constify.
5385 (maintenance_do_deprecate): Constify. Use std::string.
5386 (maintenance_selftest): Constify.
5387 * gdbtypes.h (maintenance_print_type): Constify.
5388
c482f52c
TT
53892017-09-27 Tom Tromey <tom@tromey.com>
5390
5391 * hppa-tdep.c (unwind_command): Constify.
5392
e100df1a
TT
53932017-09-27 Tom Tromey <tom@tromey.com>
5394
5395 * target-descriptions.c (unset_tdesc_filename_cmd)
5396 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5397 Constify.
5398
31d56ade
TT
53992017-09-27 Tom Tromey <tom@tromey.com>
5400
5401 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5402
b961da0b
TT
54032017-09-27 Tom Tromey <tom@tromey.com>
5404
5405 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5406
e2d8ae16
TT
54072017-09-27 Tom Tromey <tom@tromey.com>
5408
5409 * tui/tui-regs.c (tui_reg_command): Constify.
5410
863779b0
TT
54112017-09-27 Tom Tromey <tom@tromey.com>
5412
5413 * skip.c (skip_file_command, skip_function_command)
5414 (skip_enable_command, skip_disable_command, skip_delete_command):
5415 Constify.
5416
cdb34d4a
TT
54172017-09-27 Tom Tromey <tom@tromey.com>
5418
5419 * record-btrace.c (cmd_record_btrace_bts_start)
5420 (cmd_record_btrace_pt_start): Constify.
5421
e99c83e7
TT
54222017-09-27 Tom Tromey <tom@tromey.com>
5423
5424 * symmisc.c (maintenance_print_symbols)
5425 (maintenance_print_msymbols, maintenance_print_objfiles)
5426 (maintenance_info_symtabs, maintenance_check_symtabs)
5427 (maintenance_expand_symtabs, maintenance_info_line_tables):
5428 Constify.
5429
32faf971
TT
54302017-09-27 Tom Tromey <tom@tromey.com>
5431
5432 * top.c (new_ui_command): Constify.
5433
2cf311eb
TT
54342017-09-27 Tom Tromey <tom@tromey.com>
5435
5436 * symfile.c (add_symbol_file_command)
5437 (remove_symbol_file_command, list_overlays_command)
5438 (map_overlay_command, unmap_overlay_command)
5439 (overlay_auto_command, overlay_manual_command)
5440 (overlay_off_command, overlay_load_command): Constify.
5441
e6738699
TT
54422017-09-27 Tom Tromey <tom@tromey.com>
5443
5444 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5445 (info_spu_mailbox_command, info_spu_dma_command)
5446 (info_spu_proxydma_command): Constify.
5447
aa360cd5
TT
54482017-09-27 Tom Tromey <tom@tromey.com>
5449
5450 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5451
898241a5
TT
54522017-09-27 Tom Tromey <tom@tromey.com>
5453
5454 * cli/cli-script.c (user_defined_command): Constify.
5455
2d0ac106
TT
54562017-09-27 Tom Tromey <tom@tromey.com>
5457
5458 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5459 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5460 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5461 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5462 (dump_binary_value, append_binary_memory, append_binary_value):
5463 Constify.
5464 (struct dump_context) <func>: Constify.
5465 (add_dump_command): Update.
5466
dede02ce
TT
54672017-09-27 Tom Tromey <tom@tromey.com>
5468
5469 * cli/cli-cmds.c (show_version, show_configuration)
5470 (source_command, show_user): Constify.
5471
d3cb6b99
TT
54722017-09-27 Tom Tromey <tom@tromey.com>
5473
5474 * target.c (maintenance_print_target_stack): Constify.
5475
1970a12f
TT
54762017-09-27 Tom Tromey <tom@tromey.com>
5477
5478 * interps.c (interpreter_exec_cmd): Constify.
5479
41243651
TT
54802017-09-27 Tom Tromey <tom@tromey.com>
5481
5482 * record-full.c (cmd_record_full_restore): Constify.
5483
4465d9db
TT
54842017-09-27 Tom Tromey <tom@tromey.com>
5485
5486 * memattr.c (enable_mem_command, disable_mem_command)
5487 (delete_mem_command): Constify.
5488
ad25e423
TT
54892017-09-27 Tom Tromey <tom@tromey.com>
5490
5491 * value.c (show_convenience): Constify.
5492
d64097b1
TT
54932017-09-27 Tom Tromey <tom@tromey.com>
5494
5495 * gdbcore.h (core_file_command): Update.
5496 * corefile.c (core_file_command): Constify.
5497
4d4589ef
TT
54982017-09-27 Tom Tromey <tom@tromey.com>
5499
5500 * user-regs.c (maintenance_print_user_registers): Constify.
5501
32a7bf17
TT
55022017-09-27 Tom Tromey <tom@tromey.com>
5503
5504 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5505
4a475551
TT
55062017-09-27 Tom Tromey <tom@tromey.com>
5507
5508 * cp-support.c (first_component_command): Constify.
5509
990b9f9f
TT
55102017-09-27 Tom Tromey <tom@tromey.com>
5511
5512 * psymtab.c (maintenance_print_psymbols)
5513 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5514 Constify.
5515
c281872e
TT
55162017-09-27 Tom Tromey <tom@tromey.com>
5517
5518 * windows-tdep.c (display_tib): Constify.
5519
5b64bf74
TT
55202017-09-27 Tom Tromey <tom@tromey.com>
5521
5522 * linux-fork.c (delete_checkpoint_command)
5523 (detach_checkpoint_command): Constify.
5524
4ada038f
TT
55252017-09-27 Tom Tromey <tom@tromey.com>
5526
5527 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5528
57f5a81b
TT
55292017-09-27 Tom Tromey <tom@tromey.com>
5530
5531 * arc-tdep.c (dump_arc_instruction_command): Constify.
5532
b0a8e6c4
TT
55332017-09-27 Tom Tromey <tom@tromey.com>
5534
5535 * valprint.c (set_radix, show_radix): Constify.
5536
8d97dc1c
TT
55372017-09-27 Tom Tromey <tom@tromey.com>
5538
5539 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5540
eb7c454d
TT
55412017-09-27 Tom Tromey <tom@tromey.com>
5542
5543 * command.h (not_just_help_class_command): Update.
5544 * cli/cli-decode.h (not_just_help_class_command): Update.
5545 * cli/cli-decode.c (not_just_help_class_command): Constify.
5546
e4e33335
TT
55472017-09-27 Tom Tromey <tom@tromey.com>
5548
5549 * gdb_bfd.c (maintenance_info_bfds): Constify.
5550
0450cc4c
TT
55512017-09-27 Tom Tromey <tom@tromey.com>
5552
5553 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5554 overloads.
5555 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5556 (do_const_cfunc): New function.
5557 (cmd_cfunc_eq): New overload.
5558 (cli_user_command_p): Check do_const_cfunc.
5559 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5560 const_cfunc.
5561 * command.h (add_cmd): Add const overload and no-function
5562 overload.
5563 (set_cmd_cfunc): Add const overload.
5564 (cmd_const_cfunc_ftype): Declare.
5565 (cmd_cfunc_eq): Add const overload.
5566 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5567 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5568 overload.
5569
a9bbfbd8
TT
55702017-09-27 Tom Tromey <tom@tromey.com>
5571
5572 * macroexp.c (get_next_token_for_substitution): New function.
5573 (substitute_args): Call it. Check for __VA_OPT__.
5574
5230b05a
WT
55752017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5576 Pedro Alves <palves@redhat.com>
5577
5578 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5579 producer_is_icc_lt_14.
5580 (producer_is_icc_lt_14): New function.
5581 (check_producer): Add code for checking version of ICC.
5582 (producer_is_icc): Move to producer.c.
5583 (read_structure_type): Restrict ICC workaround to ICC<14.
5584 * producer.c: Include selftest.h.
5585 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5586 New functions.
5587 * producer.h (producer_is_icc): New declaration.
5588
b32b108a
WT
55892017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5590
5591 * Makefile.in (SFILES): Add producer.c.
5592 (COMMON_OBS): Add producer.o
5593 * amd64-tdep.c (producer.h): Add new include.
5594 * dwarf2read.c (producer.h): Add new include.
5595 * producer.c: New file.
5596 * producer.h: New file.
5597 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5598 producer.c.
5599 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5600 producer.h.
5601
5007d765
MK
56022017-09-26 Matthias Klose <doko@ubuntu.com>
5603
5604 * configure.ac: Search ncursesw before ncurses.
5605 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5606 * gdb_curses.h: Include <ncursesw/ncurses.h>
5607 * config.in, configure: Regenerate.
5608
281c4447
RO
56092017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5610
5611 PR gdb/22185
5612 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5613 obsolete.
5614 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5615 Remove i386sol2 support.
5616 * configure.nat <i386sol2>: Remove.
5617 <sol2-64>: Fold into ...
5618 <sol2>: ... this.
5619 Move common settings to default section.
5620 Add sol-thread.o.
5621 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5622 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5623 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5624 <i[34567]86-*-solaris*>: Remove.
5625 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5626
5627 * configure.ac: Remove wctype in libw check.
5628 (_MSE_INT_H): Don't define on Solaris 7-9.
5629 <solaris*>: Remove libthread_db.so.1 check.
5630 * configure: Regenerate.
5631 * config.in: Regenerate.
5632
5633 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5634 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5635 (gdb_ps_size_t): Remove.
5636 Use base types in users.
5637 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5638
5639 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5640
39b06c20
RO
56412017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5642
5643 PR build/22206
5644 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5645 (adi_is_addr_mapped): Likewise.
5646 (PSR_ICC): Don't redefine.
5647 (PSR_IMPL): Likewise.
5648
6c3e20f1
TT
56492017-09-25 Tom Tromey <tom@tromey.com>
5650
5651 * regcache.c (regcache::dump): Use string_printf.
5652
b292235f
TT
56532017-09-25 Tom Tromey <tom@tromey.com>
5654
5655 * regcache.c (class regcache_invalidator): New.
5656 (struct register_to_invalidate): Remove.
5657 (make_cleanup_regcache_invalidate): Remove.
5658 (regcache::raw_write): Use regcache_invalidator.
5659
9ac86b52
TT
56602017-09-25 Tom Tromey <tom@tromey.com>
5661
5662 * spu-tdep.c (spu2ppu_sniffer): Update.
5663 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5664 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5665 Remove.
5666 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5667 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5668 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5669 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5670 (frame_pop): Update.
5671
c0e383c6
TT
56722017-09-25 Tom Tromey <tom@tromey.com>
5673
5674 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5675 * regcache.h (regcache_xfree): Don't declare.
5676 * regcache.c (regcache_xfree): Remove.
5677 (do_regcache_xfree): Use delete.
5678 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5679 * linux-fork.c (free_fork): Use delete.
5680 (fork_save_infrun_state): Likewise.
5681 * jit.c (jit_dealloc_cache): Use delete.
5682 * infrun.c (discard_infcall_suspend_state): Use delete.
5683
791199cc
TT
56842017-09-25 Tom Tromey <tom@tromey.com>
5685
5686 * regcache.h (regcache_xmalloc): Don't declare.
5687 (regcache_raw_set_cached_value): Update comment.
5688 * regcache.c (regcache_xmalloc): Remove.
5689 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5690 * jit.c (jit_frame_sniffer): Use new.
5691 * frame.c (frame_save_as_regcache): Use new.
5692
289e23aa
AA
56932017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5694
5695 * NEWS: Advertise support for guarded-storage registers on IBM z.
5696
1b63490c
AA
56972017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5698
5699 * s390-linux-nat.c (have_regset_gs): New static variable.
5700 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5701 control block and guarded-storage broadcast control regsets.
5702 (s390_read_description): Detect whether the target has
5703 guarded-storage support, return appropriate tdesc.
5704 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5705 (features/s390x-gs-linux64.c): Likewise.
5706 (struct gdbarch_tdep) <have_gs>: New field.
5707 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5708 (s390_gsbc_regset): New variables.
5709 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5710 and s390_gsbc_regset, if applicable.
5711 (s390_core_read_description): Check whether core file was from a
5712 target with guarded-storage support; include appropriate regsets.
5713 (s390_gdbarch_init): Add registers for guarded-storage support.
5714 (_initialize_s390_tdep): Initialize new target descriptions that
5715 include registers for guarded-storage support.
5716 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5717 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5718 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5719 (S390_NUM_REGS): Adjust macro definition.
5720 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5721 (tdesc_s390x_gs_linux64): New declarations.
5722
96235dc1
AA
57232017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5724
5725 * features/s390-gs-linux64.xml: New file.
5726 * features/s390-gs.xml: New file.
5727 * features/s390-gsbc.xml: New file.
5728 * features/s390x-gs-linux64.xml: New file.
5729 * features/Makefile (WHICH): Add s390-gs-linux64 and
5730 s390x-gs-linux64.
5731 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5732 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5733 * features/s390-gs-linux64.c: New generated file.
5734 * features/s390x-gs-linux64.c: New file.
5735 * regformats/s390-gs-linux64.dat: New file.
5736 * regformats/s390x-gs-linux64.dat: New file.
5737
b4a7c699
TT
57382017-09-23 Tom Tromey <tom@tromey.com>
5739
5740 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5741
c2f97536
TT
57422017-09-22 Tom Tromey <tom@tromey.com>
5743
5744 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5745 type to scoped_restore_tmpl.
5746 <scoped_input_handler>: Initialize m_quit_handler directly.
5747
43573013
SDJ
57482017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5749
5750 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5751 (cd_command): Likewise. Free "current_directory" before
5752 assigning to it.
5753 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5754 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5755 * top.c (gdb_dirbuf): Remove global declaration.
5756 * top.h (gdb_dirbuf): Likewise.
5757
6ec2e0f5
SDJ
57582017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5759
5760 * gnulib/aclocal.m4: Regenerate.
5761 * gnulib/config.in: Regenerate.
5762 * gnulib/configure: Regenerate.
5763 * gnulib/import/Makefile.am: Regenerate.
5764 * gnulib/import/Makefile.in: Regenerate.
5765 * gnulib/import/assure.h: New file.
5766 * gnulib/import/at-func.c: Likewise
5767 * gnulib/import/chdir-long.c: New file.
5768 * gnulib/import/chdir-long.h: New file.
5769 * gnulib/import/cloexec.c: New file.
5770 * gnulib/import/cloexec.h: New file.
5771 * gnulib/import/close.c: New file.
5772 * gnulib/import/closedir.c: New file.
5773 * gnulib/import/dirent-private.h: New file.
5774 * gnulib/import/dup-safer.c: New file.
5775 * gnulib/import/dup.c: New file.
5776 * gnulib/import/dup2.c: New file.
5777 * gnulib/import/error.c: New file.
5778 * gnulib/import/error.h: New file.
5779 * gnulib/import/exitfail.c: New file.
5780 * gnulib/import/exitfail.h: New file.
5781 * gnulib/import/fchdir.c: New file.
5782 * gnulib/import/fcntl.c: New file.
5783 * gnulib/import/fcntl.in.h: New file.
5784 * gnulib/import/fd-hook.c: New file.
5785 * gnulib/import/fd-hook.h: New file.
5786 * gnulib/import/fd-safer.c: New file.
5787 * gnulib/import/fdopendir.c: New file.
5788 * gnulib/import/filename.h: New file.
5789 * gnulib/import/filenamecat-lgpl.c: New file.
5790 * gnulib/import/filenamecat.h: New file.
5791 * gnulib/import/fstat.c: New file.
5792 * gnulib/import/fstatat.c: New file.
5793 * gnulib/import/getcwd-lgpl.c: New file.
5794 * gnulib/import/getcwd.c: New file.
5795 * gnulib/import/getdtablesize.c: New file.
5796 * gnulib/import/getlogin_r.c: New file.
5797 * gnulib/import/getprogname.c: New file.
5798 * gnulib/import/getprogname.h: New file.
5799 * gnulib/import/gettext.h: New file.
5800 * gnulib/import/glob-libc.h: New file.
5801 * gnulib/import/glob.c: New file.
5802 * gnulib/import/glob.in.h: New file.
5803 * gnulib/import/intprops.h: New file.
5804 * gnulib/import/m4/chdir-long.m4: New file.
5805 * gnulib/import/m4/close.m4: New file.
5806 * gnulib/import/m4/closedir.m4: New file.
5807 * gnulib/import/m4/d-ino.m4: New file.
5808 * gnulib/import/m4/d-type.m4: New file.
5809 * gnulib/import/m4/dup.m4: New file.
5810 * gnulib/import/m4/dup2.m4: New file.
5811 * gnulib/import/m4/error.m4: New file.
5812 * gnulib/import/m4/fchdir.m4: New file.
5813 * gnulib/import/m4/fcntl.m4: New file.
5814 * gnulib/import/m4/fcntl_h.m4: New file.
5815 * gnulib/import/m4/fdopendir.m4: New file.
5816 * gnulib/import/m4/filenamecat.m4: New file.
5817 * gnulib/import/m4/fstat.m4: New file.
5818 * gnulib/import/m4/fstatat.m4: New file.
5819 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5820 * gnulib/import/m4/getcwd-path-max.m4: New file.
5821 * gnulib/import/m4/getcwd.m4: New file.
5822 * gnulib/import/m4/getdtablesize.m4: New file.
5823 * gnulib/import/m4/getlogin_r.m4: New file.
5824 * gnulib/import/m4/getprogname.m4: New file.
5825 * gnulib/import/m4/glob.m4: New file.
5826 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5827 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5828 * gnulib/import/m4/mempcpy.m4: New file.
5829 * gnulib/import/m4/memrchr.m4: New file.
5830 * gnulib/import/m4/mode_t.m4: New file.
5831 * gnulib/import/m4/msvc-inval.m4: New file.
5832 * gnulib/import/m4/msvc-nothrow.m4: New file.
5833 * gnulib/import/m4/open.m4: New file.
5834 * gnulib/import/m4/openat.m4: New file.
5835 * gnulib/import/m4/opendir.m4: New file.
5836 * gnulib/import/m4/readdir.m4: New file.
5837 * gnulib/import/m4/realloc.m4: New file.
5838 * gnulib/import/m4/rewinddir.m4: New file.
5839 * gnulib/import/m4/save-cwd.m4: New file.
5840 * gnulib/import/m4/strdup.m4: New file.
5841 * gnulib/import/m4/strerror.m4: New file.
5842 * gnulib/import/m4/unistd-safer.m4: New file.
5843 * gnulib/import/mempcpy.c: New file.
5844 * gnulib/import/memrchr.c: New file.
5845 * gnulib/import/msvc-inval.c: New file.
5846 * gnulib/import/msvc-inval.h: New file.
5847 * gnulib/import/msvc-nothrow.c: New file.
5848 * gnulib/import/msvc-nothrow.h: New file.
5849 * gnulib/import/open.c: New file.
5850 * gnulib/import/openat-die.c: New file.
5851 * gnulib/import/openat-priv.h: New file.
5852 * gnulib/import/openat-proc.c: New file.
5853 * gnulib/import/openat.c: New file.
5854 * gnulib/import/openat.h: New file.
5855 * gnulib/import/opendir.c: New file.
5856 * gnulib/import/pipe-safer.c: New file.
5857 * gnulib/import/readdir.c: New file.
5858 * gnulib/import/realloc.c: New file.
5859 * gnulib/import/rewinddir.c: New file.
5860 * gnulib/import/save-cwd.c: New file.
5861 * gnulib/import/save-cwd.h: New file.
5862 * gnulib/import/strdup.c: New file.
5863 * gnulib/import/strerror-override.c: New file.
5864 * gnulib/import/strerror-override.h: New file.
5865 * gnulib/import/strerror.c: New file.
5866 * gnulib/import/unistd--.h: New file.
5867 * gnulib/import/unistd-safer.h: New file.
5868 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5869 "getcwd" and "glob".
5870 * ser-tcp.c: Undefine "close" before redefining it.
5871
432ae719
SM
58722017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5873
5874 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5875 get rid of res_val.
5876
4fa7574e
RO
58772017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5878
5879 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5880 <sol2,sparc>: Likewise.
5881 <sol2-64,i386>: Likewise.
5882
5883 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5884 -Wdeprecated-declarations on *-*-solaris*.
5885 * configure: Regenerate.
5886
5887 * procfs.c: Include "nat/inferior.h".
5888 (procfs_info_proc): Fix typo.
5889
f6327dcb
KB
58902017-09-21 Kevin Buettner <kevinb@redhat.com>
5891
5892 * remote.c (vector): Include.
5893 (struct private_thread_info): Add field, thread_handle.
5894 (free_private_thread_info): Deallocate storage associated with
5895 thread handle.
5896 (get_private_info_thread): Initialize `thread_handle' field.
5897 (struct thread_item): Add field, thread_handle.
5898 (clear_threads_listing_context): Deallocate storage associated
5899 with thread handle.
5900 (start_thread): Add support for "handle" attribute.
5901 (thread_attributes): Add "handle".
5902 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5903 field.
5904 (remote_update_thread_list): Update thread_handle.
5905 (remote_thread_handle_to_thread_info): New function.
5906 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5907
fbbe5337
KB
59082017-09-21 Kevin Buettner <kevinb@redhat.com>
5909
5910 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5911 function.
5912 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5913 * python/python-internal.h (thread_object_type): Declare.
5914
e04ee09e
KB
59152017-09-21 Kevin Buettner <kevinb@redhat.com>
5916
5917 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5918 (target_thread_handle_to_thread_info): Declare.
5919 * target.c (target_thread_handle_to_thread_info): New function.
5920 * target-delegates.c: Regenerate.
5921 * gdbthread.h (find_thread_by_handle): Declare.
5922 * thread.c (find_thread_by_handle): New function.
5923 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5924 function.
5925 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5926
1e5b66ed
SM
59272017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5928
5929 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5930
ebe48ba0
SM
59312017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5932
5933 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5934
0a0bf5dc
YQ
59352017-09-21 Yao Qi <yao.qi@linaro.org>
5936
5937 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5938 to gdb_target_obs.
5939
d1b0a7bf
TT
59402017-09-20 Tom Tromey <tom@tromey.com>
5941
5942 * breakpoint.c (struct counted_command_line): Remove.
5943 (breakpoint_commands): Update.
5944 (alloc_counted_command_line, incref_counted_command_line)
5945 (decref_counted_command_line, do_cleanup_counted_command_line)
5946 (make_cleanup_decref_counted_command_line): Remove.
5947 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5948 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5949 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5950 (save_breakpoints): Update.
5951 * breakpoint.h (counted_command_line): Now a typedef to
5952 shared_ptr.
5953 (struct breakpoint) <commands>: Now a counted_command_line.
5954 (struct bpstats) <command>: Likewise.
5955
48649e1b
TT
59562017-09-20 Tom Tromey <tom@tromey.com>
5957
5958 * breakpoint.c (struct commands_info, do_map_commands_command):
5959 Remove.
5960 (commands_command_1): Update.
5961 (iterate_over_related_breakpoints): Take a function_view.
5962 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5963 (delete_command): Update.
5964 (map_breakpoint_numbers): Take a function_view.
5965 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5966 (disable_command): Update.
5967 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5968 (enable_command): Update.
5969 (struct disp_data, do_enable_breakpoint_disp)
5970 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5971 (do_map_enable_delete_breakpoint): Remove.
5972 (enable_once_command, enable_count_command, enable_delete_command)
5973 (delete_trace_variable_command): Update.
5974
04afa70c
TT
59752017-09-20 Tom Tromey <tom@tromey.com>
5976
5977 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5978 (bpstat_clear): Use delete.
5979 (bpstats): New constructors.
5980 (bpstat_copy, bpstat_stop_status): Use new.
5981 (dprintf_after_condition_true): Update.
5982 * breakpoint.h (bpstats::bpstats): Add constructors.
5983 (bpstats::~bpstats): Add destructor.
5984
c83833f4
PA
59852017-09-20 Pedro Alves <palves@redhat.com>
5986
5987 * eval.c (make_params): Delete, refactored as ...
5988 (class fake_method): ... this new type's ctor.
5989 (fake_method::~fake_method): New.
5990 (evaluate_subexp_standard): Use 'fake_method'.
5991
223ffa71
TT
59922017-09-20 Tom Tromey <tom@tromey.com>
5993
5994 * windows-nat.c (get_windows_debug_event, windows_wait)
5995 (do_initial_windows_stuff, windows_attach): Update.
5996 * utils.c (vwarning, internal_vproblem): Update.
5997 (ui_unregister_input_event_handler_cleanup)
5998 (prepare_to_handle_input): Remove.
5999 (class scoped_input_handler): New.
6000 (defaulted_query, prompt_for_continue): Update.
6001 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6002 Update.
6003 * top.c (undo_terminal_modifications_before_exit): Update.
6004 * target/target.h (target_terminal_init, target_terminal_inferior)
6005 (target_terminal_ours): Don't declare.
6006 (class target_terminal): New.
6007 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6008 (target_terminal_ours_for_output)
6009 (make_cleanup_restore_target_terminal): Don't declare.
6010 (target_terminal_info): Remove.
6011 * target.c (enum terminal_state, terminal_state): Remove.
6012 (target_terminal::terminal_state): Define.
6013 (target_terminal::init): Rename from target_terminal_init.
6014 (target_terminal::inferior): Rename from
6015 target_terminal_inferior.
6016 (target_terminal::ours): Rename from target_terminal_ours.
6017 (target_terminal::ours_for_output): Rename from
6018 target_terminal_ours_for_output.
6019 (target_terminal::info): New method.
6020 (cleanup_restore_target_terminal)
6021 (make_cleanup_restore_target_terminal): Remove.
6022 * solib.c (handle_solib_event): Update.
6023 * remote.c (remote_serial_quit_handler): Update.
6024 (remote_terminal_inferior, remote_wait_as): Update.
6025 * record-full.c (record_full_wait_1): Update.
6026 * nto-procfs.c (procfs_create_inferior): Update.
6027 * nat/fork-inferior.c (startup_inferior): Update.
6028 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6029 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6030 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6031 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6032 (mi_breakpoint_created, mi_breakpoint_deleted)
6033 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6034 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6035 (mi_user_selected_context_changed, report_initial_inferior):
6036 Update.
6037 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6038 (linux_nat_terminal_inferior): Update.
6039 * infrun.c (follow_fork_inferior)
6040 (handle_vfork_child_exec_or_exit, do_target_resume)
6041 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6042 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6043 Update.
6044 * inflow.c (child_terminal_init, info_terminal_command): Update.
6045 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6046 (attach_command): Update.
6047 * infcall.c (call_thread_fsm_should_stop): Update.
6048 * gnu-nat.c (gnu_attach): Update.
6049 * extension.c (struct active_ext_lang_state)
6050 (restore_active_ext_lang): Update.
6051 * exceptions.c (print_flush): Update.
6052 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6053 (struct quit_handler_cleanup_data, restore_quit_handler)
6054 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6055 Remove.
6056 * cp-support.c (gdb_demangle): Update.
6057 * breakpoint.c (update_inserted_breakpoint_locations)
6058 (insert_breakpoint_locations, handle_jit_event)
6059 (disable_breakpoints_in_unloaded_shlib): Update.
6060 * annotate.c (annotate_breakpoints_invalid)
6061 (annotate_frames_invalid): Update.
6062
013af3fc
TT
60632017-09-20 Tom Tromey <tom@tromey.com>
6064
6065 * main.c (catch_command_errors): Rename from
6066 catch_command_errors_const.
6067 (captured_main_1): Update.
6068
06871ae8
PA
60692017-09-20 Pedro Alves <palves@redhat.com>
6070
6071 * cli/cli-cmds.c (list_command): Use print_sal_location.
6072 (print_sal_location): New function.
6073 (ambiguous_line_spec): Use print_sal_location.
6074 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6075 * symtab.c (find_function_start_sal): Likewise.
6076 * symtab.h (symtab_and_line::symbol): New field.
6077
e5f25bc5
PA
60782017-09-20 Pedro Alves <palves@redhat.com>
6079
6080 * linespec.c (minsym_found): Handle non-text minsyms.
6081 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6082
1b7fa39e
WT
60832017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6084
6085 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6086 backslash.
6087
37dd0825
WT
60882017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6089
6090 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6091 vmovups instead vmovaps.
6092 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6093
4e5a4f58
JB
60942017-09-19 John Baldwin <jhb@FreeBSD.org>
6095
6096 * NEWS (Changes since GDB 8.0): Add starti.
6097 * infcmd.c (enum run_break): New.
6098 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6099 case.
6100 (run_command): Use enum run_how.
6101 (start_command): Likewise.
6102 (starti_command): New function.
6103 (RUN_ARGS_HELP): New macro.
6104 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6105 commands. Add starti command.
6106
aa70c9f1
YQ
61072017-09-19 Yao Qi <yao.qi@linaro.org>
6108
6109 * Makefile.in (monitor.o): Remove the rule.
6110
d6541620
YQ
61112017-09-19 Yao Qi <yao.qi@linaro.org>
6112
6113 * annotate.h (struct annotate_arg_emitter): Use
6114 DISABLE_COPY_AND_ASSIGN.
6115 * common/refcounted-object.h (refcounted_object): Likewise.
6116 * completer.h (struct completion_result): Likewise.
6117 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6118 * filename-seen-cache.h (filename_seen_cache): Likewise.
6119 * gdbcore.h (thread_section_name): Likewise.
6120 * gdb_regex.h (compiled_regex): Likewise.
6121 * gdbthread.h (scoped_restore_current_thread): Likewise.
6122 * inferior.h (scoped_restore_current_inferior): Likewise.
6123 * jit.c (jit_reader): Likewise.
6124 * linespec.h (struct linespec_result): Likewise.
6125 * mi/mi-parse.h (struct mi_parse): Likewise.
6126 * nat/fork-inferior.c (execv_argv): Likewise.
6127 * progspace.h (scoped_restore_current_program_space): Likewise.
6128 * python/python-internal.h (class gdbpy_enter): Likewise.
6129 * regcache.h (regcache): Likewise.
6130 * target-descriptions.c (struct tdesc_reg): Likewise.
6131 (struct tdesc_type): Likewise.
6132 (struct tdesc_feature): Likewise.
6133 * ui-out.h (ui_out_emit_type): Likewise.
6134
0615127c
SM
61352017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6136
6137 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6138 label abort_expression.
6139
5e187554
SM
61402017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6141
6142 * common/buffer.c (buffer_xml_printf): Adjust.
6143 * common/xml-utils.c (xml_escape_text): Change return type to
6144 std::string, update code accordingly.
6145 * common/xml-utils.h (xml_escape_text): Change return type to
6146 std::string.
6147 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6148 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6149 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6150 Adjust.
6151
c3d7b541
SM
61522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6153
6154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6155 (SUBDIR_UNITTESTS_OBS): Add new object file.
6156 * unittests/xml-utils-selftests.c: New file.
6157
1526853e
SM
61582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6159
6160 * common/selftest.h (selftest): New struct/interface.
6161 (register_test): Add name parameter, add new overload.
6162 (run_tests): Add filter parameter.
6163 (for_each_selftest_ftype): New typedef.
6164 (for_each_selftest): New declaration.
6165 * common/selftest.c (tests): Change type to
6166 map<string, unique_ptr<selftest>>.
6167 (simple_selftest): New struct.
6168 (register_test): New function.
6169 (register_test): Add name parameter and use it.
6170 (run_tests): Add filter parameter and use it. Add prints.
6171 Adjust to vector -> map change.
6172 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6173 registering selftests.
6174 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6175 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6176 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6177 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6178 * findvar.c (_initialize_findvar): Likewise.
6179 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6180 * maint.c (maintenance_selftest): Update call to run_tests.
6181 (maintenance_info_selftests): New function.
6182 (_initialize_maint_cmds): Register "maintenance info selftests"
6183 command. Update "maintenance selftest" doc.
6184 * regcache.c (_initialize_regcache): Add names when registering
6185 selftests.
6186 * rust-exp.y (_initialize_rust_exp): Likewise.
6187 * selftest-arch.c (gdbarch_selftest): New struct.
6188 (gdbarch_tests): Remove.
6189 (register_test_foreach_arch): Add name parameter. Call
6190 register_test.
6191 (tests_with_arch): Remove, move most content to
6192 gdbarch_selftest::operator().
6193 (_initialize_selftests_foreach_arch): Remove.
6194 * selftest-arch.h (register_test_foreach_arch): Add name
6195 parameter.
6196 (run_tests_with_arch): New declaration.
6197 * utils-selftests.c (_initialize_utils_selftests): Add names
6198 when registering selftests.
6199 * utils.c (_initialize_utils): Likewise.
6200 * unittests/array-view-selftests.c
6201 (_initialize_array_view_selftests): Likewise.
6202 * unittests/environ-selftests.c (_initialize_environ_selftests):
6203 Likewise.
6204 * unittests/function-view-selftests.c
6205 (_initialize_function_view_selftests): Likewise.
6206 * unittests/offset-type-selftests.c
6207 (_initialize_offset_type_selftests): Likewise.
6208 * unittests/optional-selftests.c
6209 (_initialize_optional_selftests): Likewise.
6210 * unittests/scoped_restore-selftests.c
6211 (_initialize_scoped_restore_selftests): Likewise.
6212 * NEWS: Document "maintenance selftest" and "maint info
6213 selftests".
6214
5846367a
SM
62152017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6216
6217 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6218 scoped_restore.
6219
bd77e8ff
SM
62202017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6221
6222 * mi/mi-main.c (mi_load_progress): Make uiout variable
6223 a unique_ptr.
6224
26a67918
PA
62252017-09-15 Pedro Alves <palves@redhat.com>
6226
6227 * compile/compile-c-types.c (convert_enum, convert_int)
6228 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6229
3f8a7804
SM
62302017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6231
6232 * dwarf2read.c (copy_string): Remove.
6233 (parse_macro_definition): Replace copy_string with savestring.
6234
8d200706
YQ
62352017-09-15 Yao Qi <yao.qi@linaro.org>
6236
6237 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6238 gdb_target_obs.
6239 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6240 Likewise.
6241 (i[34567]86-*-linux*): Likewise.
6242
d185219d
SM
62432017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6244
6245 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6246 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6247 <stack>: Change type to std::vector.
6248 <stack_len, stack_allocated>: Remove.
6249 <grow_stack>: Remove.
6250 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6251 (dwarf_expr_context::~dwarf_expr_context): Remove.
6252 (dwarf_expr_context::grow_stack): Remove.
6253 (dwarf_expr_context::push): Adjust.
6254 (dwarf_expr_context::pop): Adjust.
6255 (dwarf_expr_context::fetch): Adjust.
6256 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6257 (dwarf_expr_context::stack_empty_p): Adjust.
6258 (dwarf_expr_context::execute_stack_op): Adjust.
6259
eccd80d6
SM
62602017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6261
6262 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6263 return type to bool.
6264 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6265
69009882
SM
62662017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6267
6268 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6269 Change type to bool.
6270 (dwarf_stack_value) <in_stack_memory>: Likewise.
6271 (dwarf_expr_context) <push_address>: Change parameter type to
6272 bool.
6273 <fetch_in_stack_memory>: Change return type to bool.
6274 <push>: Change parameter type to bool.
6275 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6276 to bool.
6277 (dwarf_expr_context::push_address): Likewise.
6278 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6279 to bool.
6280 (dwarf_expr_context::execute_stack_op): Adjust.
6281 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6282
1e467161
SM
62832017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6284
6285 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6286 (struct dwarf_expr_context) <n_pieces>: Remove.
6287 <pieces>: Change type to std::vector.
6288 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6289 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6290 pieces.
6291 (dwarf_expr_context::add_piece): Adjust.
6292 * dwarf2loc.c (struct piece_closure): Initialize fields.
6293 <n_pieces>: Remove.
6294 <pieces>: Change type to std::vector.
6295 (allocate_piece_closure): Adjust, change parameter to
6296 std::vector rvalue and std::move it to piece_closure.
6297 (rw_pieced_value): Adjust.
6298 (check_pieced_synthetic_pointer): Adjust.
6299 (indirect_synthetic_pointer): Adjust.
6300 (coerce_pieced_ref): Adjust.
6301 (free_pieced_value_closure): Adjust. Use delete to free
6302 piece_closure.
6303 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6304 to allocate_piece_closure.
6305 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6306
0782db84
SM
63072017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6308
6309 * probe.h (probe_ops_cp): Remove typedef.
6310 (DEF_VEC_P (probe_ops_cp)): Remove.
6311 (all_probe_ops): Change type to std::vector.
6312 * probe.c (info_probes_for_ops): Adjust to vector change.
6313 (probe_linespec_to_ops): Likewise.
6314 (all_probe_ops): Change type to std::vector.
6315 (_initialize_probe): Adjust to vector change.
6316 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6317 * elfread.c (elf_get_probes): Likewise.
6318 * stap-probe.c (_initialize_stap_probe): Likewise.
6319
1eac6bea
SM
63202017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6321
6322 * probe.h (struct bound_probe): Define constructors.
6323 * probe.c (bound_probe_s): Remove typedef.
6324 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6325 (collect_probes): Change return type to std::vector, remove
6326 cleanup.
6327 (compare_probes): Return bool, change parameter type. Change
6328 semantic to "less than".
6329 (gen_ui_out_table_header_info): Change parameter to std::vector
6330 and update.
6331 (exists_probe_with_pops): Likewise.
6332 (info_probes_for_ops): Update to std::vector change.
6333 (enable_probes_command): Likewise.
6334 (disable_probes_command): Likewise.
6335
aaa63a31
SM
63362017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6339 vec to std::vector.
6340 * probe.c (parse_probes_in_pspace): Update.
6341 (find_probes_in_objfile): Update.
6342 (find_probe_by_pc): Update.
6343 (collect_probes): Update.
6344 (probe_any_get_probes): Update.
6345 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6346 return type to reference to std::vector.
6347 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6348 std::vector and update.
6349 (dtrace_process_dof): Likewise.
6350 (dtrace_get_probes): Likewise.
6351 * elfread.c (elf_get_probes): Change return type to std::vector,
6352 store an std::vector in bfd_data.
6353 (probe_key_free): Update to std::vector.
6354 * stap-probe.c (handle_stap_probe): Change parameter to
6355 std::vector and update.
6356 (stap_get_probes): Likewise.
6357 * symfile-debug.c (debug_sym_get_probes): Change return type to
6358 std::vector and update.
6359
cb85b21b
TT
63602017-09-11 Tom Tromey <tom@tromey.com>
6361
6362 * breakpoint.c (program_breakpoint_here_p): Update.
6363 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6364 from make_show_memory_breakpoints_cleanup. Return a
6365 scoped_restore_tmpl<int>.
6366 (restore_show_memory_breakpoints): Remove.
6367 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6368 * mem-break.c (memory_validate_breakpoint): Update.
6369 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6370 (ia64_memory_remove_breakpoint): Update.
6371 (ia64_breakpoint_from_pc): Update.
6372 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6373 from make_show_memory_breakpoints_cleanup.
6374
8fbc99ef
TT
63752017-09-11 Tom Tromey <tom@tromey.com>
6376
6377 * d-namespace.c (d_lookup_symbol): Use std::string.
6378 (find_symbol_in_baseclass): Likewise.
6379
50feb4bd
TT
63802017-09-11 Tom Tromey <tom@tromey.com>
6381
6382 * ctf.c (ctf_start): Use std::string.
6383
c6dc63a1
TT
63842017-09-11 Tom Tromey <tom@tromey.com>
6385
6386 * ada-lang.c (is_known_support_routine): Update.
6387 (ada_unhandled_exception_name_addr_from_raise): Update.
6388 * guile/scm-frame.c (gdbscm_frame_name): Update.
6389 * python/py-frame.c (frapy_name): Update.
6390 (frapy_function): Update.
6391 * stack.h (find_frame_funname): Update.
6392 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6393 (print_frame): Update.
6394
d6b9b80f
TT
63952017-09-11 Tom Tromey <tom@tromey.com>
6396
6397 * findcmd.c (put_bits): Take a gdb::byte_vector.
6398 (parse_find_args): Return gdb::byte_vector. "args" now const.
6399 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6400 cleanups.
6401 (find_command): Update.
6402
a9921622
TT
64032017-09-11 Tom Tromey <tom@tromey.com>
6404
6405 * cli/cli-script.c (class scoped_restore_hook_in): New.
6406 (clear_hook_in_cleanup): Remove.
6407 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6408 scoped_restore_hook_in.
6409
be0d7abb
TT
64102017-09-11 Tom Tromey <tom@tromey.com>
6411
6412 * cli/cli-script.c (restore_interp): Remove.
6413 (read_command_lines): Use scoped_restore_interp.
6414 * interps.c (scoped_restore_interp::set_temp): Rename from
6415 interp_set_temp.
6416 * interps.h (class scoped_restore_interp): New.
6417 (interp_set_temp): Remove.
6418
00f675ff
TT
64192017-09-11 Tom Tromey <tom@tromey.com>
6420
6421 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6422 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6423 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6424 scoped_restore.
6425 (mi_cmd_break_insert_1): Update.
6426 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6427 scoped_restore.
6428
cb791d59
TT
64292017-09-11 Tom Tromey <tom@tromey.com>
6430
6431 * demangle.c (demangle_command): Update.
6432 * breakpoint.c (disable_command): Update.
6433 (enable_command): Update.
6434 (find_location_by_number): Make "number" const. Use
6435 get_number_trailer.
6436 * cli/cli-utils.c (extract_arg): Return std::string.
6437 * probe.c (parse_probe_linespec): Update. Change types.
6438 (collect_probes): Take string arguments.
6439 (parse_probe_linespec): Likewise.
6440 (info_probes_for_ops): Update.
6441 (enable_probes_command): Update.
6442 (disable_probes_command): Update.
6443 * break-catch-sig.c (catch_signal_split_args): Update.
6444 * mi/mi-parse.c (mi_parse): Update.
6445
2039bd9f
TT
64462017-09-11 Tom Tromey <tom@tromey.com>
6447
6448 * language.h (language_enum): Make argument const.
6449 * language.c (language_enum): Make argument const.
6450
f1735a53
TT
64512017-09-11 Tom Tromey <tom@tromey.com>
6452
6453 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6454 as function.
6455 (skip_to_space): Rename from skip_to_space_const.
6456 * common/common-utils.c (skip_to_space): New function.
6457 (skip_to_space): Rename from skip_to_space_const.
6458 * cli/cli-utils.h (get_number): Rename from get_number_const.
6459 (extract_arg): Rename from extract_arg_const.
6460 * cli/cli-utils.c (get_number): Rename from get_number_const.
6461 (extract_arg): Rename from extract_arg_const.
6462 (number_or_range_parser::get_number): Use ::get_number.
6463 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6464 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6465 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6466 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6467 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6468 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6469 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6470 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6471
7d221d74
TT
64722017-09-11 Tom Tromey <tom@tromey.com>
6473
6474 * python/python.c (do_start_initialization): Use
6475 py-event-types.def to initialize types.
6476 Define all object type structures.
6477 * python/python-internal.h: Don't declare event initialization
6478 functions.
6479 * python/py-threadevent.c (thread_event_object_type): Don't
6480 define.
6481 * python/py-stopevent.c (stop_event_object_type): Don't define.
6482 * python/py-signalevent.c (signal_event_object_type): Don't
6483 declare or define.
6484 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6485 (clear_objfiles_event_object_type): Don't declare or define.
6486 * python/py-infevents.c (inferior_call_pre_event_object_type)
6487 (inferior_call_post_event_object_type)
6488 (register_changed_event_object_type)
6489 (memory_changed_event_object_type): Don't declare or define.
6490 * python/py-inferior.c (new_thread_event_object_type)
6491 (new_inferior_event_object_type)
6492 (inferior_deleted_event_object_type): Don't declare or define.
6493 * python/py-exitedevent.c (exited_event_object_type): Don't
6494 declare or define.
6495 * python/py-evts.c (gdbpy_initialize_py_events): Use
6496 py-all-events.def.
6497 * python/py-events.h (thread_event_object_type): Don't declare.
6498 (events_object): Use py-all-events.def.
6499 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6500 py-event-types.def.
6501 * python/py-event-types.def: New file.
6502 * python/py-continueevent.c (create_continue_event_object): Don't
6503 declare or define.
6504 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6505 declare or define.
6506 * python/py-all-events.def: New file.
6507
35c61a1d
TT
65082017-09-11 Tom Tromey <tom@tromey.com>
6509
6510 * python/py-threadevent.c (create_thread_event_object): Return
6511 gdbpy_ref.
6512 * python/py-stopevent.h (create_stop_event_object)
6513 (create_breakpoint_event_object, create_signal_event_object):
6514 Update.
6515 * python/py-stopevent.c (create_stop_event_object): Return
6516 gdbpy_ref.
6517 (emit_stop_event): Update.
6518 * python/py-signalevent.c (create_signal_event_object): Return
6519 gdbpy_ref.
6520 * python/py-infevents.c (create_inferior_call_event_object):
6521 Update.
6522 * python/py-event.h (create_event_object)
6523 (create_thread_event_object): Update.
6524 * python/py-event.c (create_event_object): Return gdbpy_ref.
6525 * python/py-continueevent.c: Return gdbpy_ref.
6526 * python/py-bpevent.c (create_breakpoint_event_object): Return
6527 gdbpy_ref.
6528
7c96f8c1
TT
65292017-09-11 Tom Tromey <tom@tromey.com>
6530
6531 PR python/15622:
6532 * NEWS: Add entry.
6533 * python/python.c (do_start_initialization): Initialize new event
6534 types.
6535 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6536 (gdbpy_initialize_inferior_deleted_event)
6537 (gdbpy_initialize_new_thread_event): Declare.
6538 * python/py-threadevent.c (create_thread_event_object): Add option
6539 "thread" parameter.
6540 * python/py-inferior.c (new_thread_event_object_type)
6541 (new_inferior_event_object_type)
6542 (inferior_deleted_event_object_type): Declare.
6543 (python_new_inferior, python_inferior_deleted): New functions.
6544 (add_thread_object): Emit new_thread event.
6545 (gdbpy_initialize_inferior): Attach new functions to corresponding
6546 observers.
6547 (new_thread, new_inferior, inferior_deleted): Define new event
6548 types.
6549 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6550 registries.
6551 * python/py-events.h (events_object) <new_inferior,
6552 inferior_deleted, new_thread>: New fields.
6553 * python/py-event.h (create_thread_event_breakpoint): Add optional
6554 "thread" parameter.
6555
72542b8e
AB
65562017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6557
6558 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6559 check current_ui instead.
6560 (internal_vproblem): Likewise.
6561
0d64823e
SM
65622017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6563
6564 * thread.c (print_thread_info_1): Remove unnecessary calls to
6565 uiout->is_mi_like_p.
6566
eb1e02fd
TT
65672017-09-09 Tom Tromey <tom@tromey.com>
6568
6569 * namespace.h (add_using_directive): Update.
6570 * namespace.c (add_using_directive): Change type of excludes to
6571 std::vector.
6572 * dwarf2read.c (read_import_statement): Use std::vector.
6573 (read_namespace): Update.
6574 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6575
0fc21fd8
TT
65762017-09-09 Tom Tromey <tom@tromey.com>
6577
6578 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6579
49663d05
TT
65802017-09-09 Tom Tromey <tom@tromey.com>
6581
6582 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6583
0b868b60
TT
65842017-09-09 Tom Tromey <tom@tromey.com>
6585
6586 * stack.c (func_command): Use gdb::def_vector.
6587
c0470d48
TT
65882017-09-09 Tom Tromey <tom@tromey.com>
6589
6590 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6591 ui_out_emit_list, ui_out_emit_tuple.
6592 (mi_cmd_var_update): Likewise.
6593
ca5909c7
TT
65942017-09-09 Tom Tromey <tom@tromey.com>
6595
6596 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6597 ui_out_redirect_pop.
6598 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6599 ui_out_redirect_pop.
6600 * utils.c (do_ui_out_redirect_pop)
6601 (make_cleanup_ui_out_redirect_pop): Remove.
6602 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6603 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6604 * ui-out.h (ui_out_redirect_pop): New class.
6605
e6a2252a
TT
66062017-09-09 Tom Tromey <tom@tromey.com>
6607
6608 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6609 (list_available_thread_groups, mi_cmd_list_thread_groups)
6610 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6611 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6612 Likewise.
6613
393702cd
TT
66142017-09-09 Tom Tromey <tom@tromey.com>
6615
6616 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6617 ui_out_emit_tuple.
6618
76f9c9cf
TT
66192017-09-09 Tom Tromey <tom@tromey.com>
6620
6621 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6622 * stack.c (print_frame): Use ui_out_emit_tuple.
6623 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6624 (info_spu_mailbox_command, info_spu_dma_command)
6625 (info_spu_proxydma_command): Likewise.
6626 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6627 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6628 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6629 ui_out_emit_tuple.
6630 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6631
dc9fe180
TT
66322017-09-09 Tom Tromey <tom@tromey.com>
6633
6634 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6635 (class ui_out_emit_table): Update comment.
6636 * ui-out.c (do_cleanup_table_end)
6637 (make_cleanup_ui_out_table_begin_end): Remove.
6638 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6639 (info_spu_dma_cmdlist): Likewise.
6640 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6641 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6642 ui_out_emit_table.
6643
f8cc3da6
TT
66442017-09-09 Tom Tromey <tom@tromey.com>
6645
6646 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6647 ui_out_emit_list, gdb::optional.
6648
481695ed
JB
66492017-09-09 John Baldwin <jhb@FreeBSD.org>
6650
6651 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6652 prototype.
6653 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6654 prototype.
6655 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6656 prototype.
6657 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6658 * ada-exp.y: Remove _initialize_ada_exp prototype.
6659 * ada-lang.c: Remove _initialize_ada_language prototype.
6660 * ada-tasks.c: Remove _initialize_tasks prototype.
6661 * addrmap.c: Remove _initialize_addrmap prototype.
6662 * agent.c: Remove _initialize_agent prototype.
6663 * aix-thread.c: Remove _initialize_aix_thread prototype.
6664 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6665 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6666 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6667 prototype.
6668 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6669 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6670 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6671 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6672 prototype.
6673 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6674 prototype.
6675 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6676 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6677 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6678 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6679 prototype.
6680 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6681 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6682 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6683 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6684 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6685 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6686 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6687 prototype.
6688 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6689 prototype.
6690 * annotate.c: Remove _initialize_annotate prototype.
6691 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6692 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6693 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6694 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6695 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6696 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6697 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6698 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6699 prototype.
6700 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6701 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6702 * auto-load.c: Remove _initialize_auto_load prototype.
6703 * auxv.c: Remove _initialize_auxv prototype.
6704 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6705 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6706 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6707 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6708 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6709 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6710 prototype.
6711 * break-catch-throw.c: Remove _initialize_break_catch_throw
6712 prototype.
6713 * breakpoint.c: Remove _initialize_breakpoint prototype.
6714 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6715 * btrace.c: Remove _initialize_btrace prototype.
6716 * charset.c: Remove _initialize_charset prototype.
6717 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6718 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6719 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6720 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6721 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6722 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6723 * coffread.c: Remove _initialize_coffread prototype.
6724 * compile/compile.c: Remove _initialize_compile prototype.
6725 * complaints.c: Remove _initialize_complaints prototype.
6726 * completer.c: Remove _initialize_completer prototype.
6727 * copying.awk: Remove _initialize_copying prototype.
6728 * copying.c: Regenerate.
6729 * core-regset.c: Remove _initialize_core_regset prototype.
6730 * corefile.c: Remove _initialize_core prototype.
6731 * corelow.c: Remove _initialize_corelow prototype.
6732 * cp-abi.c: Remove _initialize_cp_abi prototype.
6733 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6734 * cp-support.c: Remove _initialize_cp_support prototype.
6735 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6736 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6737 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6738 * ctf.c: Remove _initialize_ctf prototype.
6739 * d-lang.c: Remove _initialize_d_language prototype.
6740 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6741 prototype.
6742 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6743 * dbxread.c: Remove _initialize_dbxread prototype.
6744 * dcache.c: Remove _initialize_dcache prototype.
6745 * demangle.c: Remove _initialize_demangler prototype.
6746 * disasm-selftests.c: Remove _initialize_disasm_selftests
6747 prototype.
6748 * disasm.c: Remove _initialize_disasm prototype.
6749 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6750 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6751 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6752 prototype.
6753 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6754 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6755 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6756 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6757 * elfread.c: Remove _initialize_elfread prototype.
6758 * exec.c: Remove _initialize_exec prototype.
6759 * extension.c: Remove _initialize_extension prototype.
6760 * f-lang.c: Remove _initialize_f_language prototype.
6761 * f-valprint.c: Remove _initialize_f_valprint prototype.
6762 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6763 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6764 * filesystem.c: Remove _initialize_filesystem prototype.
6765 * findcmd.c: Remove _initialize_mem_search prototype.
6766 * fork-child.c: Remove _initialize_fork_child prototype.
6767 * frame-base.c: Remove _initialize_frame_base prototype.
6768 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6769 * frame.c: Remove _initialize_frame prototype.
6770 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6771 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6772 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6773 * gcore.c: Remove _initialize_gcore prototype.
6774 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6775 * gdbarch.c: Regenerate.
6776 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6777 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6778 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6779 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6780 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6781 * go-lang.c: Remove _initialize_go_language prototype.
6782 * go32-nat.c: Remove _initialize_go32_nat prototype.
6783 * guile/guile.c: Remove _initialize_guile prototype.
6784 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6785 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6786 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6787 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6788 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6789 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6790 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6791 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6792 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6793 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6794 prototype.
6795 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6796 prototype.
6797 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6798 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6799 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6800 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6801 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6802 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6803 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6804 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6805 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6806 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6807 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6808 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6809 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6810 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6811 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6812 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6813 prototype.
6814 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6815 prototype.
6816 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6817 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6818 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6819 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6820 * infcall.c: Remove _initialize_infcall prototype.
6821 * infcmd.c: Remove _initialize_infcmd prototype.
6822 * inferior.c: Remove _initialize_inferiors prototype.
6823 * inflow.c: Remove _initialize_inflow prototype.
6824 * infrun.c: Remove _initialize_infrun prototype.
6825 * interps.c: Remove _initialize_interpreter prototype.
6826 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6827 * jit.c: Remove _initialize_jit prototype.
6828 * language.c: Remove _initialize_language prototype.
6829 * linux-fork.c: Remove _initialize_linux_fork prototype.
6830 * linux-nat.c: Remove _initialize_linux_nat prototype.
6831 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6832 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6833 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6834 * m2-lang.c: Remove _initialize_m2_language prototype.
6835 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6836 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6837 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6838 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6839 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6840 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6841 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6842 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6843 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6844 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6845 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6846 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6847 * machoread.c: Remove _initialize_machoread prototype.
6848 * macrocmd.c: Remove _initialize_macrocmd prototype.
6849 * macroscope.c: Remove _initialize_macroscope prototype.
6850 * maint.c: Remove _initialize_maint_cmds prototype.
6851 * mdebugread.c: Remove _initialize_mdebugread prototype.
6852 * memattr.c: Remove _initialize_mem prototype.
6853 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6854 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6855 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6856 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6857 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6858 * microblaze-linux-tdep.c: Remove
6859 _initialize_microblaze_linux_tdep prototype.
6860 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6861 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6862 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6863 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6864 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6865 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6866 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6867 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6868 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6869 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6870 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6871 prototype.
6872 * mipsread.c: Remove _initialize_mipsread prototype.
6873 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6874 prototype.
6875 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6876 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6877 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6878 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6879 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6880 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6881 prototype.
6882 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6883 * nto-procfs.c: Remove _initialize_procfs prototype.
6884 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6885 * objc-lang.c: Remove _initialize_objc_language prototype.
6886 * objfiles.c: Remove _initialize_objfiles prototype.
6887 * observer.c: Remove observer_test_first_notification_function,
6888 observer_test_second_notification_function,
6889 observer_test_third_notification_function, and
6890 _initialize_observer prototypes.
6891 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6892 * osabi.c: Remove _initialize_gdb_osabi prototype.
6893 * osdata.c: Remove _initialize_osdata prototype.
6894 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6895 * parse.c: Remove _initialize_parse prototype.
6896 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6897 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6898 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6899 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6900 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6901 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6902 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6903 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6904 * printcmd.c: Remove _initialize_printcmd prototype.
6905 * probe.c: Remove _initialize_probe prototype.
6906 * proc-api.c: Remove _initialize_proc_api prototype.
6907 * proc-events.c: Remove _initialize_proc_events prototype.
6908 * proc-service.c: Remove _initialize_proc_service prototype.
6909 * procfs.c: Remove _initialize_procfs prototype.
6910 * psymtab.c: Remove _initialize_psymtab prototype.
6911 * python/python.c: Remove _initialize_python prototype.
6912 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6913 * record-btrace.c: Remove _initialize_record_btrace prototype.
6914 * record-full.c: Remove _initialize_record_full prototype.
6915 * record.c: Remove _initialize_record prototype.
6916 * regcache.c: Remove _initialize_regcache prototype.
6917 * reggroups.c: Remove _initialize_reggroup prototype.
6918 * remote-notif.c: Remove _initialize_notif prototype.
6919 * remote-sim.c: Remove _initialize_remote_sim prototype.
6920 * remote.c: Remove _initialize_remote prototype.
6921 * reverse.c: Remove _initialize_reverse prototype.
6922 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6923 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6924 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6925 prototype.
6926 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6927 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6928 * rust-exp.y: Remove _initialize_rust_exp prototype.
6929 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6930 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6931 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6932 * score-tdep.c: Remove _initialize_score_tdep prototype.
6933 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6934 prototype.
6935 * ser-go32.c: Remove _initialize_ser_dos prototype.
6936 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6937 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6938 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6939 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6940 * serial.c: Remove _initialize_serial prototype.
6941 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6942 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6943 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6944 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6945 * skip.c: Remove _initialize_step_skip prototype.
6946 * sol-thread.c: Remove _initialize_sol_thread prototype.
6947 * solib-aix.c: Remove _initialize_solib_aix prototype.
6948 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6949 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6950 * solib-frv.c: Remove _initialize_frv_solib prototype.
6951 * solib-spu.c: Remove _initialize_spu_solib prototype.
6952 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6953 * solib-target.c: Remove _initialize_solib_target prototype.
6954 * solib.c: Remove _initialize_solib prototype.
6955 * source.c: Remove _initialize_source prototype.
6956 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6957 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6958 prototype.
6959 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6960 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6961 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6962 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6963 prototype.
6964 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6965 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6966 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6967 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6968 prototype.
6969 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6970 prototype.
6971 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6972 prototype.
6973 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6974 prototype.
6975 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6976 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6977 prototype.
6978 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6979 prototype.
6980 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6981 prototype.
6982 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6983 prototype.
6984 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6985 prototype.
6986 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6987 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6988 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6989 * stabsread.c: Remove _initialize_stabsread prototype.
6990 * stack.c: Remove _initialize_stack prototype.
6991 * stap-probe.c: Remove _initialize_stap_probe prototype.
6992 * std-regs.c: Remove _initialize_frame_reg prototype.
6993 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6994 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6995 * symfile.c: Remove _initialize_symfile prototype.
6996 * symmisc.c: Remove _initialize_symmisc prototype.
6997 * symtab.c: Remove _initialize_symtab prototype.
6998 * target-dcache.c: Remove _initialize_target_dcache prototype.
6999 * target-descriptions.c: Remove _initialize_target_descriptions
7000 prototype.
7001 * thread.c: Remove _initialize_thread prototype.
7002 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7003 prototype.
7004 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7005 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7006 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7007 prototype.
7008 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7009 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7010 * tracefile.c: Remove _initialize_tracefile prototype.
7011 * tracepoint.c: Remove _initialize_tracepoint prototype.
7012 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7013 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7014 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7015 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7016 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7017 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7018 * tui/tui.c: Remove _initialize_tui prototype.
7019 * typeprint.c: Remove _initialize_typeprint prototype.
7020 * user-regs.c: Remove _initialize_user_regs prototype.
7021 * utils.c: Remove _initialize_utils prototype.
7022 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7023 * valarith.c: Remove _initialize_valarith prototype.
7024 * valops.c: Remove _initialize_valops prototype.
7025 * valprint.c: Remove _initialize_valprint prototype.
7026 * value.c: Remove _initialize_values prototype.
7027 * varobj.c: Remove _initialize_varobj prototype.
7028 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7029 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7030 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7031 * windows-nat.c: Remove _initialize_windows_nat,
7032 _initialize_check_for_gdb_ini, and _initialize_loadable
7033 prototypes.
7034 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7035 * xcoffread.c: Remove _initialize_xcoffread prototype.
7036 * xml-support.c: Remove _initialize_xml_support prototype.
7037 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7038 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7039 prototype.
7040 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7041 prototype.
7042 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7043
a611b5cb
KS
70442017-09-08 Keith Seitz <keiths@redhat.com>
7045
7046 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7047 field.
7048
469412dd
CW
70492017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7050
7051 * f-valprint.c (f_val_print): Remove check for one byte
7052 sized integers. Remove printing of character type.
7053
a5ad232b
FP
70542017-09-08 Frank Penczek <frank.penczek@intel.com>
7055 Christoph Weinmann <christoph.t.weinmann@intel.com>
7056 Bernhard Heckel <bernhard.heckel@intel.com>
7057
7058 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7059 to maintain proper indentation when printing pointers/refs.
7060
e5014227
JB
70612017-09-07 Joel Brobecker <brobecker@adacore.com>
7062
7063 GDB 8.0.1 released.
7064
63c99141
JB
70652017-09-07 Joel Brobecker <brobecker@adacore.com>
7066
7067 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7068
69c1e056
TT
70692017-09-05 Tom Tromey <tom@tromey.com>
7070
7071 * parse.c (funcall_chain): Now a std::vector.
7072 (start_arglist, end_arglist): Simplify.
7073 (free_funcalls): Remove.
7074 (parse_exp_in_context_1): Remove cleanup.
7075
fef704bf
TT
70762017-09-05 Tom Tromey <tom@tromey.com>
7077
7078 * go-exp.y (go_parse): Don't create a cleanup.
7079
5613c585
TT
70802017-09-05 Tom Tromey <tom@tromey.com>
7081
7082 * d-exp.y (PrimaryExpression): Use std::string.
7083 (d_parse): Don't create a cleanup.
7084
eae49211
TT
70852017-09-05 Tom Tromey <tom@tromey.com>
7086
7087 * utils.c (do_clear_parser_state): Remove.
7088 (make_cleanup_clear_parser_state): Remove.
7089 * p-exp.y (pascal_parse): Use scoped_restore.
7090 * m2-exp.y (m2_parse): Use scoped_restore.
7091 * f-exp.y (f_parse): Use scoped_restore.
7092 * d-exp.y (d_parse): Use scoped_restore.
7093 * c-exp.y (c_parse): Use scoped_restore.
7094 * ada-exp.y (ada_parse): Use scoped_restore.
7095 * utils.h (make_cleanup_clear_parser_state): Remove.
7096
73b9be8b
KS
70972017-09-06 Keith Seitz <keiths@redhat.com>
7098
7099 * dwarf2read.c (dw2_linkage_name_attr): New function.
7100 (dw2_linkage_name): New function.
7101 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7102 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7103 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7104
a102602b
KR
71052017-09-06 Kamil Rytarowski <n54@gmx.com>
7106
7107 * config/djgpp/djconfig.sh: Correct shell portability issue.
7108
28ad437d
KR
71092017-09-06 Kamil Rytarowski <n54@gmx.com>
7110
7111 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7112
351787dd
JB
71132017-09-06 John Baldwin <jhb@FreeBSD.org>
7114
7115 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7116 * NEWS: Mention new FreeBSD/mips native configuration.
7117 * configure.host: Add aarch64*-*-freebsd*.
7118 * configure.nat: Likewise.
7119 * aarch64-fbsd-nat.c: New file.
7120
c0f84956
JB
71212017-09-06 John Baldwin <jhb@FreeBSD.org>
7122
7123 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7124 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7125 * NEWS: Mention new FreeBSD/aarch64 target.
7126 * configure.tgt: Add aarch64*-*-freebsd*.
7127 * aarch64-fbsd-tdep.c: New file.
7128 * aarch64-fbsd-tdep.h: New file.
7129
7610297a
KR
71302017-09-06 Kamil Rytarowski <n54@gmx.com>
7131
7132 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7133
fbd1b771
JK
71342017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7135
7136 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7137 of TLS symbols.
7138
5ca79eae
PW
71392017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7140
7141 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7142 call.
7143
bf93d7ba
SM
71442017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * infrun.c (follow_exec): Call add_thread after
7147 target_find_description.
7148
1bb7c059
SM
71492017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7150
7151 * infrun.c (handle_inferior_event_1): When exec'ing, read
7152 stop_pc after follow_exec.
7153
fc809827
SM
71542017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7155
7156 * remote.c (process_g_packet): Update error message.
7157
d2fcdd85
YQ
71582017-09-05 Yao Qi <yao.qi@linaro.org>
7159
7160 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7161 targets.
7162
e69570ee
PA
71632017-09-05 Pedro Alves <palves@redhat.com>
7164
7165 * eval.c (eval_call, evaluate_funcall): New functions, factored
7166 out from ...
7167 (evaluate_subexp_standard): ... this.
7168
22916b07
YQ
71692017-09-05 Yao Qi <yao.qi@linaro.org>
7170
7171 * amd64-tdep.c (amd64_target_description): Create target
7172 descriptions.
7173 (_initialize_amd64_tdep): Don't call functions
7174 initialize_tdesc_amd64_*. Add self tests.
7175 * arch/amd64.c (amd64_create_target_description): Add parameter
7176 is_linux. Call set_tdesc_osabi if is_linux is true.
7177 * arch/amd64.h (amd64_create_target_description): Update the
7178 declaration.
7179 * arch/i386.c (i386_create_target_description): Add parameter
7180 is_linux. Call set_tdesc_osabi if is_linux is true.
7181 * arch/i386.h (i386_create_target_description): Update
7182 declaration.
7183 * configure.tgt: Add i386.o to gdb_target_obs.
7184 * features/Makefile (XMLTOC): Remove i386/*.xml.
7185 * features/i386/amd64-avx-avx512.c: Remove.
7186 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7187 * features/i386/amd64-avx-mpx.c: Remove.
7188 * features/i386/amd64-avx.c: Remove.
7189 * features/i386/amd64-mpx.c: Remove.
7190 * features/i386/amd64.c: Remove.
7191 * features/i386/i386-avx-avx512.c: Remove.
7192 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7193 * features/i386/i386-avx-mpx.c: Remove.
7194 * features/i386/i386-avx.c: Remove.
7195 * features/i386/i386-mmx.c: Remove.
7196 * features/i386/i386-mpx.c: Remove.
7197 * features/i386/i386.c: Remove.
7198 * i386-tdep.c: Don't include features/i386/i386*.c., include
7199 target-descriptions.h and arch/i386.h.
7200 (i386_target_description): Create target descriptions.
7201 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7202 functions. Do self tests.
7203
0854b7b1
YQ
72042017-09-05 Yao Qi <yao.qi@linaro.org>
7205
7206 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7207 * features/i386/amd64-avx-avx512-linux.c: Removed.
7208 * features/i386/amd64-avx-linux.c: Removed.
7209 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7210 * features/i386/amd64-avx-mpx-linux.c: Removed.
7211 * features/i386/amd64-linux.c: Removed.
7212 * features/i386/amd64-mpx-linux.c: Removed.
7213 * features/i386/x32-avx-avx512-linux.c: Removed.
7214 * features/i386/x32-avx-linux.c: Removed.
7215 * features/i386/x32-linux.c: Removed.
7216
b4570e4b
YQ
72172017-09-05 Yao Qi <yao.qi@linaro.org>
7218
7219 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7220 features/i386/*.c.
7221 (amd64_linux_read_description): Call
7222 amd64_create_target_description.
7223 * arch/amd64.c: New file.
7224 * arch/amd64.h: New file.
7225 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7226 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7227
6c73f67f
YQ
72282017-09-05 Yao Qi <yao.qi@linaro.org>
7229
7230 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7231 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7232 (amd64_linux_read_description): Create target descriptions.
7233 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7234 functions. Add unit tests.
7235 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7236 x32-core.xml.
7237 * features/i386/64bit-avx.c: Generated.
7238 * features/i386/64bit-avx512.c: Generated.
7239 * features/i386/64bit-core.c: Generated.
7240 * features/i386/64bit-linux.c: Generated.
7241 * features/i386/64bit-mpx.c: Generated.
7242 * features/i386/64bit-pkeys.c: Generated.
7243 * features/i386/64bit-segments.c: Generated.
7244 * features/i386/64bit-sse.c: Generated.
7245 * features/i386/x32-core.c: Generated.
7246 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7247 c files for amd64-linux and x32-linux.
7248
9d3d478b
YQ
72492017-09-05 Yao Qi <yao.qi@linaro.org>
7250
7251 * amd64-linux-tdep.c (amd64_linux_read_description): New
7252 function.
7253 (amd64_linux_core_read_description): Call
7254 amd64_linux_read_description.
7255 (amd64_linux_init_abi): Likewise.
7256 (amd64_x32_linux_init_abi): Likewise.
7257 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7258 * x86-linux-nat.c (x86_linux_read_description): Call
7259 amd64_linux_read_description.
7260
b9f1d50f
YQ
72612017-09-05 Yao Qi <yao.qi@linaro.org>
7262
7263 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7264 comments.
7265
188c9e6d
YQ
72662017-09-05 Yao Qi <yao.qi@linaro.org>
7267
7268 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7269 * features/i386/i386-avx-avx512-linux.c: Remove.
7270 * features/i386/i386-avx-linux.c: Remove.
7271 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7272 * features/i386/i386-avx-mpx-linux.c: Remove.
7273 * features/i386/i386-linux.c: Remove.
7274 * features/i386/i386-mmx-linux.c: Remove.
7275 * features/i386/i386-mpx-linux.c: Remove.
7276
5f035c07
YQ
72772017-09-05 Yao Qi <yao.qi@linaro.org>
7278
7279 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7280 (SFILES): Add arch/i386.c.
7281 (HFILES_NO_SRCDIR): Add arch/i386.h.
7282 * arch/i386.c: New file.
7283 * arch/i386.h: New file.
7284 * arch/tdesc.h (allocate_target_description): Declare.
7285 (set_tdesc_architecture): Declare.
7286 (set_tdesc_osabi): Declare.
7287 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7288 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7289 include arch/i386.h.
7290 (i386_linux_read_description): Remove code and call
7291 i386_create_target_description.
7292 (set_tdesc_architecture): New function.
7293 (set_tdesc_osabi): New function.
7294 * target-descriptions.h (allocate_target_description): Remove.
7295
0abe8a89
YQ
72962017-09-05 Yao Qi <yao.qi@linaro.org>
7297
7298 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7299 * target-descriptions.c (tdesc_create_feature): Likewise, and
7300 adjust code.
7301 * features/i386/32bit-avx.c: Re-generated.
7302 * features/i386/32bit-avx512.c: Re-generated.
7303 * features/i386/32bit-core.c: Re-generated.
7304 * features/i386/32bit-linux.c: Re-generated.
7305 * features/i386/32bit-mpx.c: Re-generated.
7306 * features/i386/32bit-pkeys.c: Re-generated.
7307 * features/i386/32bit-sse.c: Re-generated.
7308
0a188386
YQ
73092017-09-05 Yao Qi <yao.qi@linaro.org>
7310
7311 * regformats/regdef.h (struct reg): Override operator == and !=.
7312
f49ff000
YQ
73132017-09-05 Yao Qi <yao.qi@linaro.org>
7314
7315 * arch/tdesc.h: New file.
7316 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7317 * target-descriptions.c: Update comments.
7318 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7319 declarations.
7320 * features/i386/32bit-avx.c: Re-generated.
7321 * features/i386/32bit-avx512.c: Re-generated.
7322 * features/i386/32bit-core.c: Re-generated.
7323 * features/i386/32bit-linux.c: Re-generated.
7324 * features/i386/32bit-mpx.c: Re-generated.
7325 * features/i386/32bit-pkeys.c: Re-generated.
7326 * features/i386/32bit-sse.c: Re-generated.
7327
f7000548
YQ
73282017-09-05 Yao Qi <yao.qi@linaro.org>
7329
7330 * regformats/regdat.sh: Update generated code.
7331
c9a5e2a5
YQ
73322017-09-05 Yao Qi <yao.qi@linaro.org>
7333
7334 * regformats/regdat.sh: Adjust code order.
7335
d6b687ac
SM
73362017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7337
7338 * expprint.c (dump_subexp_body_standard): Use constant format
7339 string in fprintf_filtered call.
7340
a379bfd0
JB
73412017-09-04 John Baldwin <jhb@FreeBSD.org>
7342
7343 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7344 NetBSD/i386.
7345 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7346
f7efc967
JB
73472017-09-04 John Baldwin <jhb@FreeBSD.org>
7348
7349 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7350
c49fbc6c
JB
73512017-09-04 John Baldwin <jhb@FreeBSD.org>
7352
7353 * bsd-kvm.o: Define _KMEMUSER.
7354 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7355 * configure: Regenerate.
7356
26562e73
JB
73572017-09-04 John Baldwin <jhb@FreeBSD.org>
7358
7359 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7360 * i386-fbsd-nat.c: Likewise.
7361
31cf1487
JB
73622017-09-04 John Baldwin <jhb@FreeBSD.org>
7363
7364 * unittests/array-view-selftests.c: Add include of <array>.
7365
5b9f8a7c
JB
73662017-09-04 John Baldwin <jhb@FreeBSD.org>
7367
7368 * spu-tdep.c (flush_ea_cache): Add missing argument to
7369 call_function_by_hand.
7370
d69cf9b2
PA
73712017-09-04 Pedro Alves <palves@redhat.com>
7372
7373 * NEWS (Safer support for debugging with no debug info): New.
7374
3693fdb3
PA
73752017-09-04 Pedro Alves <palves@redhat.com>
7376
7377 * c-exp.y (function_method, function_method_void): Add current
7378 instance flags to TYPE_INSTANCE.
7379 * dwarf2read.c (check_modifier): New.
7380 (compute_delayed_physnames): Assert that only C++ adds delayed
7381 physnames. Mark fn_fields as const/volatile depending on
7382 physname.
7383 * eval.c (make_params): New type_instance_flags parameter. Use
7384 it as the new type's instance flags.
7385 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7386 flags element and pass it to make_params.
7387 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7388 instance flags element.
7389 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7390 * gdbtypes.h: Include "enum-flags.h".
7391 (type_instance_flags): New enum-flags type.
7392 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7393 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7394 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7395 (follow_type_instance_flags): New function.
7396 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7397 * parser-defs.h (follow_type_instance_flags): Declare.
7398 * valops.c (value_struct_elt_for_reference): const/volatile must
7399 match too.
7400
e68cb8e0
PA
74012017-09-04 Pedro Alves <palves@redhat.com>
7402
7403 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7404 function/method scopes; lookup the nested name as a function local
7405 static variable.
7406
858be34c
PA
74072017-09-04 Pedro Alves <palves@redhat.com>
7408
7409 (%type <voidval>): Add function_method.
7410 * c-exp.y (exp): New production for calls with no arguments.
7411 (function_method, function_method_void_or_typelist): New
7412 productions.
7413 (exp): New production for "method()::static_var".
7414 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7415 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7416 Handle OP_FUNC_STATIC_VAR.
7417 * parse.c (operator_length_standard):
7418 Handle OP_FUNC_STATIC_VAR.
7419
dd5901a6
PA
74202017-09-04 Pedro Alves <palves@redhat.com>
7421
7422 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7423 handling.
7424 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7425 Ditto.
7426 * parse.c (operator_length_standard, operator_check_standard):
7427 Ditto.
7428 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7429
46a4882b
PA
74302017-09-04 Pedro Alves <palves@redhat.com>
7431
7432 * ax-gdb.c: Include "typeprint.h".
7433 (gen_expr_for_cast): New function.
7434 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7435 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7436 type is unknown.
7437 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7438 nodebug_data_symbol.
7439 * eval.c: Include "typeprint.h".
7440 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7441 Error out if symbol has unknown type.
7442 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7443 evaluate_subexp_for_cast.
7444 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7445 OP_VAR_MSYM_VALUE.
7446 (evaluate_subexp_for_cast): New function.
7447 * gdbtypes.c (init_nodebug_var_type): New function.
7448 (objfile_type): Use it to initialize types of variables with no
7449 debug info.
7450 * typeprint.c (error_unknown_type): New.
7451 * typeprint.h (error_unknown_type): New declaration.
7452 * compile/compile-c-types.c (convert_type_basic): Handle
7453 TYPE_CODE_ERROR; warn and fallback to int for variables with
7454 unknown type.
7455
fe13dfec
PA
74562017-09-04 Pedro Alves <palves@redhat.com>
7457
7458 * eval.c (evaluate_var_value): New function, factored out from ...
7459 (evaluate_subexp_standard): ... here.
7460
d008ee21
PA
74612017-09-04 Pedro Alves <palves@redhat.com>
7462
7463 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7464 Remove useless assignments to 'op'.
7465
827d0c51
PA
74662017-09-04 Pedro Alves <palves@redhat.com>
7467
7468 * eval.c (eval_skip_value): New function.
7469 (evaluate_subexp_standard): Use it.
7470
2c5a2be1
PA
74712017-09-04 Pedro Alves <palves@redhat.com>
7472
7473 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7474 function name from symbol/minsym and pass it to
7475 error_call_unknown_return_type.
7476
74ea4be4
PA
74772017-09-04 Pedro Alves <palves@redhat.com>
7478
7479 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7480 * ax-gdb.c (gen_msym_var_ref): New function.
7481 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7482 * eval.c (evaluate_var_msym_value): New function.
7483 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7484 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7485 to call_function_by_hand.
7486 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7487 Handle OP_VAR_MSYM_VALUE.
7488 (union exp_element) <msymbol>: New field.
7489 * minsyms.h (struct type): Forward declare.
7490 (find_minsym_type_and_address): Declare.
7491 * parse.c (write_exp_elt_msym): New function.
7492 (write_exp_msymbol): Delete, refactored as ...
7493 (find_minsym_type_and_address): ... this new function.
7494 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7495 (operator_length_standard, operator_check_standard): Handle
7496 OP_VAR_MSYM_VALUE.
7497 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7498
7022349d
PA
74992017-09-04 Pedro Alves <palves@redhat.com>
7500
7501 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7502 TYPE_GNU_IFUNC specially here. Throw error if return type is
7503 unknown.
7504 * ada-typeprint.c (print_func_type): Handle functions with unknown
7505 return type.
7506 * c-typeprint.c (c_type_print_base): Handle functions and methods
7507 with unknown return type.
7508 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7509 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7510 * compile/compile-c-types.c: Include "objfiles.h".
7511 (convert_func): For functions with unknown return type, warn and
7512 default to int.
7513 * compile/compile-object-run.c (compile_object_run): Adjust call
7514 to call_function_by_hand_dummy.
7515 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7516 call_function_by_hand.
7517 * eval.c (evaluate_subexp_standard): Adjust calls to
7518 call_function_by_hand. Handle functions and methods with unknown
7519 return type. Pass expect_type to call_function_by_hand.
7520 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7521 return type.
7522 * gcore.c (call_target_sbrk): Adjust call to
7523 call_function_by_hand.
7524 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7525 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7526 an integer address type instead of nodebug.
7527 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7528 call_function_by_hand.
7529 * infcall.c (error_call_unknown_return_type): New function.
7530 (call_function_by_hand): New "default_return_type" parameter.
7531 Pass it down.
7532 (call_function_by_hand_dummy): New "default_return_type"
7533 parameter. Use it instead of defaulting to int. If there's no
7534 default and the return type is unknown, throw an error. If
7535 there's a default return type, and the called function has no
7536 debug info, then assume the function is prototyped.
7537 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7538 New "default_return_type" parameter.
7539 (error_call_unknown_return_type): New declaration.
7540 * linux-fork.c (call_lseek): Cast return type of lseek.
7541 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7542 call_function_by_hand.
7543 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7544 calls to call_function_by_hand.
7545 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7546 return type.
7547 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7548 (value_nsstring, print_object_command): Adjust calls to
7549 call_function_by_hand.
7550 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7551 functions with unknown return type.
7552 (pascal_type_print_func_varspec_suffix): New function.
7553 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7554 TYPE_CODE_METHOD>: Use it.
7555 * python/py-value.c (valpy_call): Adjust call to
7556 call_function_by_hand.
7557 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7558 call_function_by_hand.
7559 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7560 call_function_by_hand.
7561 * valops.c (value_allocate_space_in_inferior): Adjust call to
7562 call_function_by_hand.
7563 * typeprint.c (type_print_unknown_return_type): New function.
7564 * typeprint.h (type_print_unknown_return_type): New declaration.
7565
54990598
PA
75662017-09-04 Pedro Alves <palves@redhat.com>
7567
7568 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7569 types with more than one parameter as prototyped.
7570
9a24775b
PA
75712017-09-04 Pedro Alves <palves@redhat.com>
7572
7573 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7574 (disassemble_command): Use gdb_disassembly_flags instead of bare
7575 int.
7576 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7577 (dump_insns, do_mixed_source_and_assembly_deprecated)
7578 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7579 Use gdb_disassembly_flags instead of bare int.
7580 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7581 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7582 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7583 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7584 (enum gdb_disassembly_flag): ... values of this new enumeration.
7585 (gdb_disassembly_flags): Define.
7586 (gdb_disassembly)
7587 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7588 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7589 gdb_disassembly_flags instead of bare int.
7590 * record-btrace.c (btrace_insn_history)
7591 (record_btrace_insn_history, record_btrace_insn_history_range)
7592 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7593 instead of bare int.
7594 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7595 Use gdb_disassembly_flags instead of bare int.
7596 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7597 Define.
7598 * target-delegates.c: Regenerate.
7599 * target.c (target_insn_history, target_insn_history_from)
7600 (target_insn_history_range): Use gdb_disassembly_flags instead of
7601 bare int.
7602 * target.h: Include "disasm.h".
7603 (struct target_ops) <to_insn_history, to_insn_history_from,
7604 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7605 int.
7606 (target_insn_history, target_insn_history_from)
7607 (target_insn_history_range): Use gdb_disassembly_flags instead of
7608 bare int.
7609
80a65e9b
SM
76102017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7611
7612 * cli/cli-script.c (build_command_line): For if/while commands,
7613 check whether args is empty.
7614
6b66338c
SM
76152017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7616
7617 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7618 (enum command_control_type): Likewise.
7619 (struct command_line): Likewise.
7620 (free_command_lines): Likewise.
7621 (struct command_lines_deleter): Likewise.
7622 (command_line_up): Likewise.
7623 (read_command_lines): Likewise.
7624 (read_command_lines_1): Likewise.
7625 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7626 (enum command_control_type): Likewise.
7627 (struct command_line): Likewise.
7628 (free_command_lines): Likewise.
7629 (struct command_lines_deleter): Likewise.
7630 (command_line_up): Likewise.
7631 (read_command_lines): Likewise.
7632 (read_command_lines_1): Likewise.
7633 * breakpoint.h: Include cli/cli-script.h.
7634 * extension-priv.h: Likewise.
7635 * gdbcmd.h: Likewise.
7636
51abb421
PA
76372017-09-04 Pedro Alves <palves@redhat.com>
7638
7639 * ada-lang.c (is_known_support_routine): Move sal declaration to
7640 where it is initialized.
7641 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7642 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7643 (clear_command, update_static_tracepoint): Remove init_sal
7644 references. Move declarations closer to initializations.
7645 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7646 initializations.
7647 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7648 references. Move sal declarations closer to initializations.
7649 * frame.c (find_frame_sal): Return a symtab_and_line via function
7650 return instead of output parameter. Remove init_sal references.
7651 * frame.h (find_frame_sal): Return a symtab_and_line via function
7652 return instead of output parameter.
7653 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7654 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7655 instead of memset.
7656 (gdbscm_find_pc_line): Remove init_sal reference.
7657 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7658 references. Move declarations closer to initializations.
7659 * infcmd.c (set_step_frame): Update. Move declarations closer to
7660 initializations.
7661 (finish_backward): Remove init_sal references. Move declarations
7662 closer to initializations.
7663 * infrun.c (process_event_stop_test, handle_step_into_function)
7664 (insert_hp_step_resume_breakpoint_at_frame)
7665 (insert_step_resume_breakpoint_at_caller): Likewise.
7666 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7667 (symbol_to_sal): Likewise.
7668 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7669 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7670 to its initialization.
7671 * reverse.c (save_bookmark_command): Use new/delete. Remove
7672 init_sal references. Move declarations closer to initializations.
7673 * source.c (get_current_source_symtab_and_line): Remove brace
7674 initialization.
7675 (set_current_source_symtab_and_line): Now takes the sal by const
7676 reference. Remove brace initialization.
7677 (line_info): Remove init_sal reference.
7678 * source.h (set_current_source_symtab_and_line): Now takes a
7679 symtab_and_line via const reference.
7680 * stack.c (set_current_sal_from_frame): Adjust.
7681 (print_frame_info): Adjust.
7682 (get_last_displayed_sal): Return the sal via function return
7683 instead of via output parameter. Simplify.
7684 (frame_info): Adjust.
7685 * stack.h (get_last_displayed_sal): Return the sal via function
7686 return instead of via output parameter.
7687 * symtab.c (init_sal): Delete.
7688 (find_pc_sect_line): Remove init_sal references. Move
7689 declarations closer to initializations.
7690 (find_function_start_sal): Remove init_sal references. Move
7691 declarations closer to initializations.
7692 * symtab.h (struct symtab_and_line): In-class initialize all
7693 fields.
7694 * tracepoint.c (set_traceframe_context)
7695 (print_one_static_tracepoint_marker): Remove init_sal references.
7696 Move declarations closer to initializations.
7697 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7698 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7699 declarations closer to initializations.
7700 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7701 init_sal references. Adjust.
7702
6c5b2ebe
PA
77032017-09-04 Pedro Alves <palves@redhat.com>
7704
7705 * ax-gdb.c (agent_command_1): Use range-for.
7706 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7707 * breakpoint.c: Include "common/array-view.h".
7708 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7709 parameter from struct symtabs_and_lines to
7710 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7711 (breakpoint_sals_to_pc): Change sals parameter from struct
7712 symtabs_and_lines to std::vector reference.
7713 (check_fast_tracepoint_sals): Change sals parameter from struct
7714 symtabs_and_lines to std::array_view. Use range-for.
7715 (decode_static_tracepoint_spec): Return a std::vector instead of
7716 symtabs_and_lines. Update.
7717 (create_breakpoint): Update.
7718 (break_range_command, until_break_command, clear_command): Update.
7719 (base_breakpoint_decode_location, bkpt_decode_location)
7720 (bkpt_probe_create_sals_from_location)
7721 (bkpt_probe_decode_location, tracepoint_decode_location)
7722 (tracepoint_probe_decode_location)
7723 (strace_marker_create_sals_from_location): Return a std::vector
7724 instead of symtabs_and_lines.
7725 (strace_marker_create_breakpoints_sal): Update.
7726 (strace_marker_decode_location): Return a std::vector instead of
7727 symtabs_and_lines. Update.
7728 (update_breakpoint_locations): Change struct symtabs_and_lines
7729 parameters to gdb::array_view. Adjust.
7730 (location_to_sals): Return a std::vector instead of
7731 symtabs_and_lines. Update.
7732 (breakpoint_re_set_default): Use std::vector instead of struct
7733 symtabs_and_lines.
7734 (decode_location_default): Return a std::vector instead of
7735 symtabs_and_lines. Update.
7736 * breakpoint.h: Include "common/array-view.h".
7737 (struct breakpoint_ops) <decode_location>: Now returns a
7738 std::vector instead of returning a symtabs_and_lines via output
7739 parameter.
7740 (update_breakpoint_locations): Change sals parameters to use
7741 gdb::array_view.
7742 * cli/cli-cmds.c (edit_command, list_command): Update to use
7743 std::vector and gdb::array_view.
7744 (ambiguous_line_spec): Adjust to use gdb::array_view and
7745 range-for.
7746 (compare_symtabs): Rename to ...
7747 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7748 const reference and adjust.
7749 (filter_sals): Rewrite using std::vector and standard algorithms.
7750 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7751 (jump_command): Update to use std::vector.
7752 * linespec.c (struct linespec_state) <canonical_names>: Update
7753 comment.
7754 (add_sal_to_sals_basic): Delete.
7755 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7756 (decode_line_2, create_sals_line_offset)
7757 (convert_address_location_to_sals, convert_linespec_to_sals)
7758 (convert_explicit_location_to_sals, parse_linespec)
7759 (event_location_to_sals, decode_line_full, decode_line_1)
7760 (decode_line_with_current_source)
7761 (decode_line_with_last_displayed, decode_objc)
7762 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7763 (linespec_result::~linespec_result): Adjust to use std::vector
7764 instead of symtabs_and_lines.
7765 * linespec.h (linespec_sals::sals): Now a std::vector.
7766 (struct linespec_result): Use std::vector, bool, and in-class
7767 initialization.
7768 (decode_line_1, decode_line_with_current_source)
7769 (decode_line_with_last_displayed): Return std::vector.
7770 * macrocmd.c (info_macros_command): Use std::vector.
7771 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7772 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7773 std::vector.
7774 * probe.h (parse_probes): Return a std::vector.
7775 * python/python.c (gdbpy_decode_line): Use std::vector and
7776 gdb::array_view.
7777 * source.c (select_source_symtab, line_info): Use std::vector.
7778 * stack.c (func_command): Use std::vector.
7779 * symtab.h (struct symtabs_and_lines): Delete.
7780 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7781
7c44b49c
PA
77822017-09-04 Pedro Alves <palves@redhat.com>
7783
7784 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7785 unittests/array-view-selftests.c.
7786 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7787 * common/array-view.h: New file.
7788 * unittests/array-view-selftests.c: New file.
7789
e439fa14
PA
77902017-09-04 Pedro Alves <palves@redhat.com>
7791
7792 * cli/cli-cmds.c (edit_command): Pass message to
7793 ambiguous_line_spec.
7794 (list_command): Pass message to ambiguous_line_spec. Say
7795 "first"/"last" instead of "start" and "end" to be consistent with
7796 the manual.
7797 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7798 them to print formatted message.
7799
7525b645
PA
78002017-09-04 Pedro Alves <palves@redhat.com>
7801
7802 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7803 ftrace_update_insns by reference instead of pointer.
7804
badc0020
YQ
78052017-09-04 Yao Qi <yao.qi@linaro.org>
7806
7807 * i386-go32-tdep.c: Include x86-xstate.h.
7808 (i386_go32_init_abi): Call i386_target_description.
7809 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7810 if xcr0 is X86_XSTATE_X87_MASK.
7811 * i386-tdep.h (tdesc_i386): Remove the declaration.
7812 (tdesc_i386_mmx): Likewise.
7813
d78bdb54
YQ
78142017-09-04 Yao Qi <yao.qi@linaro.org>
7815
7816 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7817 X86_XSTATE_SSE_MASK instead of 0.
7818
ca1fa5ee
YQ
78192017-09-04 Yao Qi <yao.qi@linaro.org>
7820
7821 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7822 i386_target_description.
7823 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7824 i386_target_description.
7825 * i386-tdep.c (i386_gdbarch_init): Likewise.
7826
2434b019
YQ
78272017-09-04 Yao Qi <yao.qi@linaro.org>
7828
7829 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7830 (x86_darwin_init_abi_64): Call amd64_target_description.
7831 * amd64-dicos-tdep.c: Likewise.
7832 * amd64-fbsd-nat.c: Likewise.
7833 * amd64-fbsd-tdep.c: Likewise.
7834 * amd64-nbsd-tdep.c: Likewise.
7835 * amd64-obsd-tdep.c: Likewise.
7836 * amd64-sol2-tdep.c: Likewise.
7837 * amd64-windows-tdep.c: Likewise.
7838 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7839
0860c437
SM
78402017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7841
7842 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7843 (btrace_function) <insn>: Change type to use std::vector.
7844 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7845 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7846 ftrace_update_insns, ftrace_compute_global_level_offset,
7847 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7848 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7849 change to std::vector.
7850 (ftrace_update_insns): Adjust to change to std::vector, change
7851 type of INSN parameter.
7852 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7853 * record-btrace.c (btrace_call_history_insn_range,
7854 btrace_compute_src_line_range,
7855 record_btrace_frame_prev_register): Adjust to change to
7856 std::vector.
7857 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7858 to change to std::vector.
7859
0638b7f9
TT
78602017-09-03 Tom Tromey <tom@tromey.com>
7861
7862 * corefile.c (reopen_exec_file): Use std::string.
7863
8f84fb0e
TT
78642017-09-03 Tom Tromey <tom@tromey.com>
7865
7866 * compile/compile.c (compile_register_name_mangled): Return
7867 std::string.
7868 * compile/compile-loc2c.c (pushf_register_address): Update.
7869 (pushf_register): Update.
7870 * compile/compile-c-types.c (convert_array): Update.
7871 * compile/compile-c-symbols.c (generate_vla_size): Update.
7872 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7873 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7874 (convert_one_symbol): Update.
7875 (generate_c_for_for_one_variable): Update.
7876 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7877 std::string.
7878 (generate_register_struct): Update.
7879 * compile/compile-internal.h (c_get_range_decl_name): Return a
7880 std::string.
7881 (compile_register_name_mangled): Return std::string.
7882
18e9961f
TT
78832017-09-03 Tom Tromey <tom@tromey.com>
7884
7885 * utils.c (perror_string): Return a std::string.
7886 (throw_perror_with_name, perror_warning_with_name): Update.
7887
45343786
TT
78882017-09-03 Tom Tromey <tom@tromey.com>
7889
7890 * demangle.c (demangle_command): Use std::string,
7891 unique_xmalloc_ptr.
7892
b57af503
TT
78932017-09-03 Tom Tromey <tom@tromey.com>
7894
7895 * cli/cli-setshow.c (do_set_command): Use std::string.
7896
6eecf35f
TT
78972017-09-03 Tom Tromey <tom@tromey.com>
7898
7899 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7900
56496dd4
TT
79012017-09-03 Tom Tromey <tom@tromey.com>
7902
7903 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7904
e91a1fa7
TT
79052017-09-03 Tom Tromey <tom@tromey.com>
7906
7907 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7908 gdb::unique_xmalloc_ptr.
7909
7ffd83d7
TT
79102017-09-03 Tom Tromey <tom@tromey.com>
7911
7912 * thread.c (print_thread_info_1): Use string_printf.
7913 (thread_apply_command, thread_apply_all_command): Use
7914 std::string.
7915
1ccbe998
TT
79162017-09-03 Tom Tromey <tom@tromey.com>
7917
7918 * valprint.c (val_print_string): Update.
7919 * gdbcore.h (memory_error_message): Return std::string.
7920 * corefile.c (memory_error_message): Return std::string.
7921 (memory_error): Update.
7922 * breakpoint.c (insert_bp_location): Update.
7923
23fdd69e
SM
79242017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7925
7926 * target/waitstatus.h (target_waitstatus_to_string): Change
7927 return type to std::string.
7928 * target/waitstatus.c (target_waitstatus_to_string): Return
7929 std::string.
7930 * target.h (target_waitstatus_to_string): Remove declaration.
7931 * infrun.c (resume, clear_proceed_status_thread,
7932 print_target_wait_results, do_target_wait, save_waitstatus,
7933 stop_all_threads): Adjust.
7934 * record-btrace.c (record_btrace_wait): Adjust.
7935 * target-debug.h
7936 (target_debug_print_struct_target_waitstatus_p): Adjust.
7937
5c811d30
JK
79382017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7939
7940 PR gdb/22046
7941 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7942 detection.
7943
0a2dde4a
SDJ
79442017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7945
7946 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7947 for setting/unsetting environment variables on the remote target.
7948 (New remote packets): Add entries for QEnvironmentHexEncoded,
7949 QEnvironmentUnset and QEnvironmentReset.
7950 * common/environ.c (gdb_environ::operator=): Extend method to
7951 handle m_user_set_env_list and m_user_unset_env_list.
7952 (gdb_environ::clear): Likewise.
7953 (match_var_in_string): Change type of first parameter from 'char
7954 *' to 'const char *'.
7955 (gdb_environ::set): Extend method to handle
7956 m_user_set_env_list and m_user_unset_env_list.
7957 (gdb_environ::unset): Likewise.
7958 (gdb_environ::clear_user_set_env): New method.
7959 (gdb_environ::user_set_envp): Likewise.
7960 (gdb_environ::user_unset_envp): Likewise.
7961 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7962 m_user_unset_env_list on move constructor/assignment.
7963 (unset): Add new default parameter 'update_unset_list = true'.
7964 (clear_user_set_env): New method.
7965 (user_set_envp): Likewise.
7966 (user_unset_envp): Likewise.
7967 (m_user_set_env_list): New std::set.
7968 (m_user_unset_env_list): Likewise.
7969 * common/rsp-low.c (hex2str): New function.
7970 (bin2hex): New overload for bin2hex function.
7971 * common/rsp-low.c (hex2str): New prototype.
7972 (str2hex): New overload prototype.
7973 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7974 QEnvironmentUnset and QEnvironmentReset.
7975 (remote_protocol_features): Add QEnvironmentHexEncoded,
7976 QEnvironmentUnset and QEnvironmentReset packets.
7977 (send_environment_packet): New function.
7978 (extended_remote_environment_support): Likewise.
7979 (extended_remote_create_inferior): Call
7980 extended_remote_environment_support.
7981 (_initialize_remote): Add QEnvironmentHexEncoded,
7982 QEnvironmentUnset and QEnvironmentReset packet configs.
7983 * unittests/environ-selftests.c (gdb_selftest_env_var):
7984 New variable.
7985 (test_vector_initialization): New function.
7986 (test_init_from_host_environ): Likewise.
7987 (test_reinit_from_host_environ): Likewise.
7988 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7989 Likewise.
7990 (test_unset_set_empty_vector): Likewise.
7991 (test_vector_clear): Likewise.
7992 (test_std_move): Likewise.
7993 (test_move_constructor):
7994 (test_self_move): Likewise.
7995 (test_set_unset_reset): Likewise.
7996 (run_tests): Rewrite in terms of the functions above.
7997
654670a4
WP
79982017-08-31 Weimin Pan <weimin.pan@oracle.com>
7999
8000 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8001 (adi_available): Use a temp variable of type CORE_ADDR as argument
8002 3 when calling target_auxv_search.
8003 (adi_normalize_address): Use masks and xor operators to calculate
8004 normalized address.
8005 (adi_read_versions, adi_write_versions, adi_print_versions)
8006 (do_examine, do_assign): Use paddress.
8007
7755ddb7
JB
80082017-08-29 John Baldwin <jhb@FreeBSD.org>
8009
8010 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8011 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8012 out of loop and add supply of FIR.
8013 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8014 add collect of FIR.
8015
fd437cbc
SM
80162017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8017
3804a343 8018 PR gdb/21827
fd437cbc
SM
8019 * cli/cli-script.c (define_command): Don't convert command name
8020 to lower case.
8021
988f6b3d
JB
80222017-08-25 Joel Brobecker <brobecker@adacore.com>
8023
8024 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8025 Update all callers accordingly. Remove all code blocks handling
8026 the case where DISPP is not NULL.
8027
663c44ac
JK
80282017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8029
8030 PR symtab/22003
8031 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8032 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8033 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8034
f1902523
JK
80352017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8036
8037 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8038 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8039 (read_comp_units_from_section): New parameter abbrev_section, use
8040 read_and_check_comp_unit_head, allocate signatured_type if needed.
8041 (create_all_comp_units): Update read_comp_units_from_section caller.
8042
87215ad1
SDJ
80432017-08-23 Pedro Alves <palves@redhat.com>
8044
8045 PR remote/21852
8046 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8047 to null_ptid and switch to thread without reading the registers
8048 after adding the inferior.
8049
6e41ddec
JK
80502017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8051
8052 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8053 compile-gcc.
8054 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8055 (compile_to_object): Implement compile_gcc.
8056 (_initialize_compile): Install "set compile-gcc". Initialize
8057 compile_gcc.
8058
e68c32d5
JK
80592017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8060
8061 * compile/compile.c (compile_to_object): Conditionally call
8062 set_verbose. Conditionally call compile or compile_v0.
8063
58afddc6
WP
80642017-08-07 Weimin Pan <weimin.pan@oracle.com>
8065
8066 * sparc64-tdep.h: (adi_normalize_address): New export.
8067 * sparc-nat.h: (open_adi_tag_fd): New export.
8068 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8069 * sparc64-linux-tdep.c:
8070 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8071 (sparc64_linux_handle_segmentation_fault): New function.
8072 (sparc64_linux_init_abi): Register
8073 sparc64_linux_handle_segmentation_fault
8074 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8075 (sparc64_addr_bits_remove): New function.
8076 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8077 (MAX_PROC_NAME_SIZE): New macro.
8078 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8079 (sparc64adilist): New variable.
8080 (adi_proc_list): New variable.
8081 (find_adi_info): New function.
8082 (add_adi_info): New function.
8083 (get_adi_info_proc): New function.
8084 (get_adi_info): New function.
8085 (info_adi_command): New function.
8086 (read_maps_entry): New function.
8087 (adi_available): New function.
8088 (adi_normalize_address): New function.
8089 (adi_align_address): New function.
8090 (adi_convert_byte_count): New function.
8091 (adi_tag_fd): New function.
8092 (adi_is_addr_mapped): New function.
8093 (adi_read_versions): New function.
8094 (adi_write_versions): New function.
8095 (adi_print_versions): New function.
8096 (do_examine): New function.
8097 (do_assign): New function.
8098 (adi_examine_command): New function.
8099 (adi_assign_command): New function.
8100 (_initialize_sparc64_adi_tdep): New function.
8101
11db9430
SM
81022017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8103
8104 * breakpoint.c (breakpoints_info): Rename to ...
8105 (info_breakpoints_command): ... this.
8106 (watchpoints_info): Rename to ...
8107 (info_watchpoints_command): ... this.
8108 (tracepoints_info): Rename to ...
8109 (info_tracepoints_command): ... this.
8110 (_initialize_breakpoint): Adjust.
8111 * dcache.c (dcache_info): Rename to ...
8112 (info_display_command): ... this.
8113 (_initialize_dcache): Adjust.
8114 * frame.h (args_info): Rename to ...
8115 (info_args_command): ... this.
8116 (locals_info): Rename to ...
8117 (info_locals_command): ... this.
8118 * infcmd.c (nofp_registers_info): Rename to ...
8119 (info_registers_command): ... this.
8120 (float_info): Rename to ...
8121 (info_float_command): ... this.
8122 (program_info): Rename to ...
8123 (info_program_command): ... this.
8124 (all_registers_info): Rename to ...
8125 (info_all_registers_command): ... this.
8126 (vector_info): Rename to ...
8127 (info_vector_command): ... this.
8128 (float_info): Rename to ...
8129 (info_float_command): ... this.
8130 (_initialize_infcmd): Adjust.
8131 * inferior.h (term_info): Rename to ...
8132 (info_terminal_command): ... this.
8133 * inflow.c (term_info): Rename to ...
8134 (info_terminal_command): ... this.
8135 (_initialize_inflow): Adjust.
8136 * infrun.c (signals_info): Rename to ...
8137 (info_signals_command): ... this.
8138 (_initialize_infrun): Adjust.
8139 * objc-lang.c (classes_info): Rename to ...
8140 (info_classes_command): ... this.
8141 (selectors_info): Rename to ...
8142 (info_selectors_command): ... this.
8143 (_initialize_objc_language): Adjust.
8144 * printcmd.c (sym_info): Rename to ...
8145 (info_symbol_command): ... this.
8146 (address_info): Rename to ...
8147 (info_address_command): ... this.
8148 (display_info): Rename to ...
8149 (info_display_command): ... this.
8150 (_initialize_printcmd): Adjust.
8151 * reverse.c (bookmarks_info): Rename to ...
8152 (info_breakpoints_command): ... this.
8153 (_initialize_reverse): Adjust.
8154 * ser-go32.c (dos_info): Rename to ...
8155 (info_serial_command): ... this.
8156 (_initialize_ser_dos): Adjust.
8157 * skip.c (skip_info): Rename to ...
8158 (info_skip_command): ... this.
8159 (_initialize_step_skip): Adjust.
8160 * source.c (line_info): Rename to ...
8161 (info_line_command): ... this.
8162 (source_info): Rename to ...
8163 (info_source_command)
8164 * stack.c (frame_info): Rename to ...
8165 (info_frame_command): ... this.
8166 (locals_info): Rename to ...
8167 (info_locals_command): ... this.
8168 (args_info): Rename to ...
8169 (info_args_command): ... this.
8170 (_initialize_stack): Adjust.
8171 * symtab.c (sources_info): Rename to ...
8172 (info_sources_command): ... this.
8173 (variables_info): Rename to ...
8174 (info_variables_command): ... this.
8175 (functions_info): Rename to ...
8176 (info_functions_command): ... this.
8177 (types_info): Rename to ...
8178 (info_types_command): ... this.
8179 (_initialize_symtab): Adjust.
8180 * target.c (target_info): Rename to ...
8181 (info_target_command): ... this.
8182 (initialize_targets): Adjust.
8183 * tracepoint.c (tvariables_info): Rename to ...
8184 (info_tvariables_command): ... this.
8185 (scope_info): Rename to ...
8186 (info_scope_command): ... this.
8187 (trace_dump_actions): Adjust.
8188 (_initialize_tracepoint): Adjust.
8189
b270e6f9
TT
81902017-08-22 Tom Tromey <tom@tromey.com>
8191
8192 * breakpoint.h (install_breakpoint): Update.
8193 * breakpoint.c (add_solib_catchpoint): Update.
8194 (install_breakpoint): Change argument to a std::unique_ptr.
8195 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8196 (create_breakpoint_sal, create_breakpoint): Update.
8197 (watch_command_1, catch_exec_command_1)
8198 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8199 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8200 Return the breakpoint.
8201 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8202 (new_single_step_breakpoint): Update.
8203 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8204 std::unique_ptr.
8205 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8206 std::unique_ptr.
8207 * break-catch-sig.c (create_signal_catchpoint): Use
8208 std::unique_ptr.
8209 * ada-lang.c (create_ada_exception_catchpoint): Use
8210 std::unique_ptr.
8211
36bd8eaa
TT
82122017-08-22 Tom Tromey <tom@tromey.com>
8213
8214 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8215
56f37645
TT
82162017-08-22 Tom Tromey <tom@tromey.com>
8217
8218 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8219 (lookup_partial_symbol): Update.
8220
0b581c69
TT
82212017-08-22 Tom Tromey <tom@tromey.com>
8222
8223 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8224 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8225 (find_and_open_source, symtab_to_fullname): Update.
8226 * psymtab.c (psymtab_to_fullname): Update.
8227
14278e1f
TT
82282017-08-22 Tom Tromey <tom@tromey.com>
8229
8230 * exec.c (exec_file_attach): Update.
8231 * linux-thread-db.c (try_thread_db_load): Update.
8232 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8233 * utils.c (gdb_realpath): Change return type.
8234 (gdb_realpath_keepfile): Update.
8235 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8236 (_initialize_utils): Register the new self test.
8237 * source.c (openp): Update.
8238 (find_and_open_source): Update.
8239 * nto-tdep.c (nto_find_and_open_solib): Update.
8240 * main.c (set_gdb_data_directory): Update.
8241 (captured_main_1): Update.
8242 * dwarf2read.c (dwarf2_get_dwz_file): Update
8243 (dw2_map_symbol_filenames): Update.
8244 * auto-load.c (auto_load_safe_path_vec_update): Update.
8245 (filename_is_in_auto_load_safe_path_vec): Change type of
8246 "filename_realp".
8247 (auto_load_objfile_script): Update.
8248 (file_is_auto_load_safe): Update. Use std::string.
8249 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8250
4971c9a7
TT
82512017-08-22 Tom Tromey <tom@tromey.com>
8252
8253 * utils.c (gdb_realpath_keepfile): Return a
8254 gdb::unique_xmalloc_ptr.
8255 * exec.c (exec_file_attach): Update.
8256 * utils.h (gdb_realpath_keepfile): Return a
8257 gdb::unique_xmalloc_ptr.
8258
e3e41d58
TT
82592017-08-22 Tom Tromey <tom@tromey.com>
8260
8261 * compile/compile.c (compile_file_command): Use
8262 gdb::unique_xmalloc_ptr, std::string.
8263 * utils.c (gdb_abspath): Change return type.
8264 * source.c (openp): Update.
8265 * objfiles.c (allocate_objfile): Update.
8266 * main.c (set_gdb_data_directory): Update.
8267 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8268
0d999a6e
ZZ
82692017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8270
8271 * cli-cmds.c (list_commands): List actual code around more than
8272 one location.
8273
329d5e7e
JB
82742017-08-21 John Baldwin <jhb@FreeBSD.org>
8275
8276 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8277
bf223d3e
PA
82782017-08-21 Pedro Alves <palves@redhat.com>
8279
8280 PR gdb/19487
8281 * c-exp.y (variable production): Handle function aliases.
8282 * minsyms.c (msymbol_is_text): New function.
8283 * minsyms.h (msymbol_is_text): Declare.
8284 * symtab.c (find_function_alias_target): New function.
8285 * symtab.h (find_function_alias_target): Declare.
8286
c973d0aa
PA
82872017-08-21 Pedro Alves <palves@redhat.com>
8288
8289 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8290 typedefs.
8291 * typeprint.c (whatis_exp): If handling "whatis", and expression
8292 is OP_TYPE, strip one typedef level. Otherwise don't strip
8293 typedefs here.
8294 * valops.c (value_cast): Save "to" type before resolving
8295 stubs/typedefs. Use that type as resulting value's type.
8296
2989a365
TT
82972017-08-18 Tom Tromey <tom@tromey.com>
8298 Pedro Alves <palves@redhat.com>
8299
8300 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8301 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8302 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8303 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8304 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8305 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8306 (linux_get_siginfo_data): Add "thread" argument. Use
8307 scoped_restore.
8308 * linux-nat.c (linux_child_follow_fork)
8309 (check_stopped_by_watchpoint): Use scoped_restore.
8310 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8311 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8312 (restore_inferior_ptid, save_inferior_ptid): Remove.
8313 * btrace.c (btrace_fetch): Use scoped_restore.
8314 * bsd-uthread.c (bsd_uthread_fetch_registers)
8315 (bsd_uthread_store_registers): Use scoped_restore.
8316 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8317 scoped_restore.
8318 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8319 (aix_thread_xfer_partial): Use scoped_restore.
8320 * inferior.h (save_inferior_ptid): Remove.
8321
e60eb288
YQ
83222017-08-18 Yao Qi <yao.qi@linaro.org>
8323
8324 PR tdep/21818
8325 * arm-tdep.c (gdb_print_insn_arm): Mark
8326 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8327
6d580b63
YQ
83282017-08-18 Yao Qi <yao.qi@linaro.org>
8329
8330 * NEWS: Mention GDBserver's new option "--selftest".
8331 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8332 * selftest.c: Move it to common/selftest.c.
8333 * selftest.h: Move it to common/selftest.h.
8334 * selftest-arch.c (reset): New function.
8335 (tests_with_arch): Call reset.
8336
86dcbf50
YQ
83372017-08-18 Yao Qi <yao.qi@linaro.org>
8338
8339 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8340 instead of exception_fprintf and printf_filtered.
8341
7649770c
YQ
83422017-08-18 Yao Qi <yao.qi@linaro.org>
8343
8344 * selftest.c (register_self_test): Rename it to
8345 selftests::register_test.
8346 (run_self_tests): selftest::run_tests.
8347 * selftest.h: Update declarations.
8348 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8349 selftests::register_test_foreach_arch.
8350 * selftest-arch.h: Update declaration.
8351 * aarch64-tdep.c: Update.
8352 * arm-tdep.c: Likewise.
8353 * disasm-selftests.c: Likewise.
8354 * dwarf2loc.c: Likewise.
8355 * dwarf2-frame.c: Likewise.
8356 * findvar.c: Likewise.
8357 * gdbarch-selftests.c: Likewise.
8358 * maint.c (maintenance_selftest): Likewise.
8359 * regcache.c: Likewise.
8360 * rust-exp.y: Likewise.
8361 * selftest-arch.c: Likewise.
8362 * unittests/environ-selftests.c: Likewise.
8363 * unittests/function-view-selftests.c: Likewise.
8364 * unittests/offset-type-selftests.c: Likewise.
8365 * unittests/optional-selftests.c: Likewise.
8366 * unittests/scoped_restore-selftests.c: Likewise.
8367 * utils-selftests.c: Likewise.
8368
b0cba12e
PA
83692017-08-17 Pedro Alves <palves@redhat.com>
8370
8371 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8372 local.
8373
4c8aa72d
PA
83742017-08-17 Pedro Alves <palves@redhat.com>
8375
8376 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8377 field.
8378 (reset_die_in_process): Delete, replaced by ...
8379 (process_die_scope): ... this new class. Make it responsible for
8380 freeing cu->line_header too.
8381 (process_die): Use process_die_scope.
8382 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8383 cu->line_header_die_owner. Don't release the line header if it's
8384 owned by the CU.
8385 (setup_type_unit_groups): Make the CU/DIE own the line header.
8386 Don't release the line header here.
8387
ba713918
AL
83882017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8389
8390 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8391
44d0fb3a
RK
83922017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8393
8394 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8395 Single-Key mode
8396
a5afdb16
RK
83972017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8398
8399 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8400 mode command list.
8401
47613aeb
SH
84022017-08-15 Stafford Horne <shorne@gmail.com>
8403
8404 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8405
9c3cc999
SH
84062017-08-15 Stafford Horne <shorne@gmail.com>
8407
8408 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8409
206726fb
SDJ
84102017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8411
8412 PR gdb/21954
8413 * infcmd.c (unset_environment_command): Use the 'clear' method on
8414 the environment instead of resetting it.
8415
0335ac6d
JB
84162017-08-15 John Baldwin <jhb@FreeBSD.org>
8417
8418 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8419 platforms.
8420
d3abe1c8
TT
84212017-08-14 Tom Tromey <tom@tromey.com>
8422
8423 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8424 (print_binary_chars): Likewise.
8425 (BITS_IN_BYTES): Remove.
8426
d6382fff
TT
84272017-08-14 Tom Tromey <tom@tromey.com>
8428
8429 PR gdb/21675
8430 * valprint.c (LOW_ZERO): Change value to 034.
8431 (print_octal_chars): Add static_asserts for octal constants.
8432 * printcmd.c (print_scalar_formatted): Add 'd' case.
8433
f978cb06
TT
84342017-08-11 Tom Tromey <tom@tromey.com>
8435
8436 * symfile.c (add_symbol_file_command): Use std::vector.
8437
2f5404b3
TT
84382017-08-14 Tom Tromey <tom@tromey.com>
8439
8440 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8441 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8442 std::move.
8443 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8444
de7985c3
PA
84452017-08-11 Pedro Alves <palves@redhat.com>
8446
8447 * infrun.c (process_event_stop_test): Adjust
8448 function_name_is_marked_for_skip call.
8449 * skip.c: Include <list>.
8450 (skiplist_entry): Make it a class with private fields, and
8451 getters/setters.
8452 (skiplist_entry_chain): Delete.
8453 (skiplist_entries): New.
8454 (skiplist_entry_count): Delete.
8455 (highest_skiplist_entry_num): New.
8456 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8457 (add_skiplist_entry): Delete.
8458 (skiplist_entry::skiplist_entry): New.
8459 (skiplist_entry::add_entry): New.
8460 (skip_file_command, skip_function): Adjust.
8461 (compile_skip_regexp): Delete.
8462 (skip_command): Don't compile regexp here. Adjust to use
8463 skiplist_entry::add_entry.
8464 (skip_info): Adjust to use range-for and getters.
8465 (skip_enable_command, skip_disable_command): Adjust to use
8466 range-for and setters.
8467 (skip_delete_command): Adjust to use std::list.
8468 (add_skiplist_entry): Delete.
8469 (skip_file_p): Delete, refactored as ...
8470 (skiplist_entry::do_skip_file_p): ... this new method.
8471 (skip_gfile_p): Delete, refactored as ...
8472 (skiplist_entry::do_gskip_file_p): ... this new method.
8473 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8474 (skiplist_entry::skip_function_p): ... this new method.
8475 (function_name_is_marked_for_skip): Now returns bool, and takes
8476 the function sal by const reference. Adjust to use range-for and
8477 skiplist_entry methods.
8478 (_initialize_step_skip): Remove references to
8479 skiplist_entry_chain, skiplist_entry_count.
8480 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8481 takes the function sal by const reference.
8482
be7d3cd5
YQ
84832017-08-11 Yao Qi <yao.qi@linaro.org>
8484
8485 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8486 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8487 (dwarf2_frame_cache):
8488 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8489 RETURN_MASK_ALL and set *this_case to NULL.
8490 * frame-unwind.h: Update comments.
8491
1c90d9f0
YQ
84922017-08-11 Yao Qi <yao.qi@linaro.org>
8493
8494 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8495 (dwarf2_frame_state_copy_regs): Remove.
8496 (dwarf2_frame_state_free_regs): Remove.
8497 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8498 (dwarf2_restore_rule): Call method .alloc_regs instead of
8499 dwarf2_frame_state_alloc_regs.
8500 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8501 constructor. Call std::move.
8502 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8503 (dwarf2_frame_cache): Likewise.
8504
8505 [GDB_SELF_TEST]: Include selftest.h and
8506 selftest-arch.h.
8507 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8508 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8509 execute_cfa_program_test.
8510
8511 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8512 copy ctor, assignment operator, move assignment.
8513 <alloc_regs>: New method.
8514 <swap>: New method.
8515 (struct dwarf2_frame_state): Delete dtor.
8516 (dwarf2_frame_state_alloc_regs): Remove declaration.
8517 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8518 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8519
afe37d6b
YQ
85202017-08-11 Yao Qi <yao.qi@linaro.org>
8521
8522 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8523 (dwarf2_frame_state::dwarf2_frame_state): New.
8524 (dwarf2_frame_state::~dwarf2_frame_state): New.
8525 (dwarf2_fetch_cfa_info): Update.
8526 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8527 rather than a pointer. Update code.
8528 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8529 dtor.
8530 <data_align, code_align, retaddr_column>: Change them to const.
8531 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8532 to bool.
8533
b348037f
YQ
85342017-08-11 Yao Qi <yao.qi@linaro.org>
8535
8536 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8537 <loc.exp>: New field.
8538 * dwarf2-frame.c (execute_cfa_program): Update.
8539 (dwarf2_frame_prev_register): Update.
8540
e7c9de26
PA
85412017-08-10 Pedro Alves <palves@redhat.com>
8542
8543 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8544
e8c6b620
JB
85452017-08-09 John Baldwin <jhb@FreeBSD.org>
8546
8547 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8548 (fbsd_pending_children): Use std::list.
8549 (fbsd_remember_child): Likewise.
8550 (fbsd_is_child_pending): Likewise.
8551 (fbsd_pending_vfork_done): Use std::forward_list.
8552 (fbsd_add_vfork_done): Likewise.
8553 (fbsd_is_vfork_done_pending): Likewise.
8554 (fbsd_next_vfork_done): Likewise.
8555
e4a26669
JB
85562017-08-09 John Baldwin <jhb@FreeBSD.org>
8557
8558 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8559 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8560 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8561 for `mapfilename'.
8562 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8563 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8564
142311d3
JB
85652017-08-09 John Baldwin <jhb@FreeBSD.org>
8566
8567 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8568 "filestuff.h".
8569 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8570
42fa2e0e
TT
85712017-08-09 Tom Tromey <tom@tromey.com>
8572
8573 * skip.c (skiplist_entry): New constructor.
8574 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8575 (skiplist_entry::file_is_glob): Now bool.
8576 (skiplist_entry::file, skiplist_entry::function): Now
8577 std::string.
8578 (make_skip_entry): Return a unique_ptr. Use new.
8579 (free_skiplist_entry, free_skiplist_entry_cleanup)
8580 (make_free_skiplist_entry_cleanup): Remove.
8581 (skip_command, skip_disable_command, add_skiplist_entry)
8582 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8583 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8584 (function_name_is_marked_for_skip): Update.
8585 (skip_delete_command): Update. Use delete.
8586
cd3af38d
JW
85872017-08-09 Jiong Wang <jiong.wang@arm.com>
8588
8589 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8590 (aarch64_linux_core_read_description): New function.
8591 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8592
29592bde
PA
85932017-08-09 Pedro Alves <palves@redhat.com>
8594
8595 * cp-name-parser.y (cp_comp_to_string): Return a
8596 gdb::unique_xmalloc_ptr<char>.
8597 * cp-support.c (replace_typedefs_qualified_name)
8598 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8599 (cp_canonicalize_string_full): Use op= instead of explicit
8600 convertion.
8601 (cp_class_name_from_physname, method_name_from_physname)
8602 (cp_func_name, cp_remove_params): Adjust to use
8603 gdb::unique_xmalloc_ptr<char>.
8604 * cp-support.h (cp_comp_to_string): Return a
8605 gdb::unique_xmalloc_ptr<char>.
8606 * python/py-type.c (typy_lookup_type): Adjust to use
8607 gdb::unique_xmalloc_ptr<char>.
8608
b3340438
L
86092017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8610
8611 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8612
e88e8651
YQ
86132017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8614 Yao Qi <yao.qi@linaro.org>
8615
8616 * cp-support.c (cp_canonicalize_string_full): Use
8617 gdb::unique_xmalloc_ptr<char>.
8618 (cp_canonicalize_string): Likewise.
8619
f5a29eb0
YQ
86202017-08-09 Yao Qi <yao.qi@linaro.org>
8621
8622 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8623 * regformats/i386/amd64-avx-avx512.dat: Remove.
8624 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8625 * regformats/i386/amd64-avx-mpx.dat:Remove.
8626 * regformats/i386/amd64-avx.dat: Remove.
8627 * regformats/i386/amd64-mpx.dat: Remove.
8628 * regformats/i386/i386-avx-avx512.dat: Remove.
8629 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8630 * regformats/i386/i386-avx-mpx.dat: Remove.
8631 * regformats/i386/i386-mmx.dat: Remove.
8632 * regformats/i386/i386-mpx.dat: Remove.
8633
57757c2f
YQ
86342017-08-09 Yao Qi <yao.qi@linaro.org>
8635
8636 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8637 * amd64-tdep.c: Don't include features/i386/x32*.c.
8638 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8639 functions.
8640 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8641 and i386/x32-avx-avx512.
8642 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8643 and i386/x32.xml.
8644 * features/i386/x32-avx-avx512.c: Removed.
8645 * features/i386/x32-avx-avx512.xml: Removed.
8646 * features/i386/x32-avx.c: Removed.
8647 * features/i386/x32-avx.xml: Removed.
8648 * features/i386/x32.c: Removed.
8649 * features/i386/x32.xml: Removed.
8650 * regformats/i386/x32-avx-avx512.dat: Removed.
8651 * regformats/i386/x32-avx.dat: Removed.
8652 * regformats/i386/x32.dat: Removed.
8653
ba7b109b
MR
86542017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8655
8656 PR breakpoints/21886
8657 * mem-break.c (default_memory_insert_breakpoint): Use
8658 `->placed_address' rather than `->reqstd_address' for the
8659 breakpoint location.
8660
e347efc3
MR
86612017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8662
8663 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8664 assertions.
8665
0dba2a6c
MR
86662017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8667
8668 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8669 a union of `tdep_info', `tdesc_data' and `id'.
8670 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8671 rather than `info.tdep_info'.
8672 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8673 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8674 * i386-tdep.c (i386_gdbarch_init): Likewise.
8675 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8676 * mips-tdep.c (mips_gdbarch_init): Likewise.
8677 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8678 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8679 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8680 `info.tdep_info'.
8681 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8682 `info.tdep_info'.
8683 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8684 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8685 `info.tdep_info'.
8686 * spu-tdep.c (spu_gdbarch_init): Likewise.
8687 * gdbarch.h: Regenerate.
8688
16eb6b2d
LS
86892017-08-07 Leszek Swirski <leszeks@google.com>
8690
7b005726 8691 PR symtab/20899
16eb6b2d
LS
8692 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8693
74cbb09e
SM
86942017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8695
8696 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8697 (gdbsim_open): Rename gdb_argv args object to argv.
8698
ee0c3293
TT
86992017-08-05 Tom Tromey <tom@tromey.com>
8700
8701 * compile/compile-object-load.c (compile_object_load): Use
8702 gdb::unique_xmalloc_ptr.
8703 * cli/cli-dump.c (scan_filename): Rename from
8704 scan_filename_with_cleanup. Change return type.
8705 (scan_expression): Rename from scan_expression_with_cleanup.
8706 Change return type.
8707 (dump_memory_to_file, dump_value_to_file, restore_command):
8708 Use gdb::unique_xmalloc_ptr. Update.
8709 * cli/cli-cmds.c (find_and_open_script): Use
8710 gdb::unique_xmalloc_ptr.
8711 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8712 * symmisc.c (maintenance_print_symbols)
8713 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8714 * symfile.c (symfile_bfd_open, generic_load)
8715 (add_symbol_file_command, remove_symbol_file_command): Use
8716 gdb::unique_xmalloc_ptr.
8717 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8718 * psymtab.c (maintenance_print_psymbols): Use
8719 gdb::unique_xmalloc_ptr.
8720 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8721 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8722 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8723 (reload_shared_libraries_1): Likewise.
8724
3232fabd
TT
87252017-08-05 Tom Tromey <tom@tromey.com>
8726
8727 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8728 (rust_op_vector, rust_set_vector): New typedefs.
8729 (current_parser): New global.
8730 (work_obstack): Change to pointer type. Update all users.
8731 (rust_ast, pstate): Remove globals.
8732 (struct rust_parser): New.
8733 (%union) <params, field_inits>: Change type.
8734 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8735 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8736 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8737 (convert_params_to_types, convert_params_to_expression): Change
8738 type of "params".
8739 (ast_string): Change type of "fields".
8740 (rust_parse): Make a rust_parser. Remove cleanups.
8741 (rust_lex_tests): Make and install an auto_obstack.
8742
f02fd774
YQ
87432017-08-04 Yao Qi <yao.qi@linaro.org>
8744
8745 * configure.srv (ipa_x32_linux_regobj): New.
8746 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8747 instead of X86_TDESC_AVX512.
8748 (initialize_low_tracepoint): Call
8749 init_registers_x32_avx_avx512_linux.
8750
91975afd
YQ
87512017-08-04 Yao Qi <yao.qi@linaro.org>
8752
8753 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8754
2331fa3a
RK
87552017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8756
8757 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8758
744e4fe1
TT
87592017-08-03 Tom Tromey <tom@tromey.com>
8760
8761 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8762 Remove.
8763 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8764
1c034b67
TT
87652017-08-03 Tom Tromey <tom@tromey.com>
8766
8767 * python/py-param.c (compute_enum_values): Use gdb_argv.
8768
773a1edc
TT
87692017-08-03 Tom Tromey <tom@tromey.com>
8770
8771 * utils.h (struct gdb_argv_deleter): New.
8772 (gdb_argv): New class.
8773 * utils.c (gdb_argv::reset): New method.
8774 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8775 * tracefile.c (tsave_command): Use gdb_argv.
8776 * top.c (new_ui_command): Use gdb_argv.
8777 * symmisc.c (maintenance_print_symbols)
8778 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8779 * symfile.c (symbol_file_command, generic_load)
8780 (remove_symbol_file_command): Use gdb_argv.
8781 * stack.c (backtrace_command): Use gdb_argv.
8782 * source.c (add_path, show_substitute_path_command)
8783 (unset_substitute_path_command, set_substitute_path_command):
8784 Use gdb_argv.
8785 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8786 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8787 * remote.c (extended_remote_run, remote_put_command)
8788 (remote_get_command, remote_delete_command): Use gdb_argv.
8789 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8790 (gdbsim_open): Use gdb_argv.
8791 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8792 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8793 * procfs.c (procfs_info_proc): Use gdb_argv.
8794 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8795 * infrun.c (handle_command): Use gdb_argv.
8796 * inferior.c (add_inferior_command, clone_inferior_command):
8797 Use gdb_argv.
8798 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8799 * exec.c (exec_file_command): Use gdb_argv.
8800 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8801 * compile/compile.c (build_argc_argv): Use gdb_argv.
8802
0d50bde3
TT
88032017-08-03 Tom Tromey <tom@tromey.com>
8804
8805 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8806
7f968c89
TT
88072017-08-03 Tom Tromey <tom@tromey.com>
8808
8809 * python/python.c (compute_python_string): Return std::string.
8810 (gdbpy_eval_from_control_command): Update.
8811 (do_start_initialization): Use std::string.
8812 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8813 xstrprintf.
8814 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8815 xstrprintf.
8816
3c9ebddd
TT
88172017-08-03 Tom Tromey <tom@tromey.com>
8818
8819 * top.h (do_restore_instream_cleanup): Remove.
8820 * top.c (do_restore_instream_cleanup): Remove.
8821 (read_command_file): Use scoped_restore.
8822 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8823
b51b225e
TT
88242017-08-03 Tom Tromey <tom@tromey.com>
8825
8826 * cli/cli-script.c (execute_user_command)
8827 (execute_control_command): Use scoped_restore.
8828
ac991630
TT
88292017-08-03 Tom Tromey <tom@tromey.com>
8830
8831 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8832 (execute_user_command): Remove user_call_depth; use
8833 user_args_stack's size instead.
8834
898e0c8e
TT
88352017-08-03 Tom Tromey <tom@tromey.com>
8836
8837 * top.h (in_user_command): Remove.
8838 * top.c (in_user_command): Remove.
8839 * cli/cli-script.c (do_restore_user_call_depth)
8840 (execute_user_command): Update.
8841
26fcd5d7
TT
88422017-08-03 Tom Tromey <tom@tromey.com>
8843
8844 * valops.c (search_struct_method): Use gdb::byte_vector.
8845 * valarith.c (value_concat): Use std::vector.
8846 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8847 (simple_search_memory): Likewise.
8848 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8849 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8850 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8851 * elfread.c (elf_rel_plt_read): Use std::string.
8852 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8853 * cli/cli-dump.c (restore_section_callback): Use
8854 gdb::byte_vector.
8855
7c218e6c
TT
88562017-08-03 Tom Tromey <tom@tromey.com>
8857
8858 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8859
31b68d4a
TT
88602017-08-03 Tom Tromey <tom@tromey.com>
8861
8862 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8863 (tui_register_format): Use scoped_restore.
8864
2ec845e7
TT
88652017-08-03 Tom Tromey <tom@tromey.com>
8866
8867 * reverse.c (exec_direction_default): Remove.
8868 (exec_reverse_once): Use scoped_restore.
8869 * remote.c (restore_remote_timeout): Remove.
8870 (remote_flash_erase, remote_flash_write, remote_flash_done)
8871 (readchar, remote_serial_write): Use scoped_restore.
8872 * cli/cli-script.c (struct source_cleanup_lines_args)
8873 (source_cleanup_lines): Remove.
8874 (script_from_file): Use scoped_restore.
8875 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8876 (source_command): Use scoped_restore.
8877
b3bc8453
TT
88782017-08-03 Tom Tromey <tom@tromey.com>
8879
8880 * utils.h (make_cleanup_free_so): Remove.
8881 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8882 * solist.h (struct so_deleter): New.
8883 (so_list_up): New typedef.
8884 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8885
e3ad2841
TT
88862017-08-03 Tom Tromey <tom@tromey.com>
8887
8888 * utils.h (make_cleanup_restore_current_language): Remove.
8889 * utils.c (do_restore_current_language)
8890 (make_cleanup_restore_current_language): Remove.
8891 * parse.c (parse_exp_in_context_1)
8892 (parse_expression_with_language): Use
8893 scoped_restore_current_language.
8894 * mi/mi-main.c (mi_cmd_execute): Use
8895 scoped_restore_current_language.
8896 * language.h (scoped_restore_current_language): New class.
8897
b80cf838
TT
88982017-08-03 Tom Tromey <tom@tromey.com>
8899
8900 * compile/compile.c (cleanup_unlink_file): Remove.
8901 (compile_to_object): Use gdb::unlinker.
8902 (eval_compile_command): Likewise.
8903
fad0444a
TT
89042017-08-03 Tom Tromey <tom@tromey.com>
8905
8906 * utils.h (make_cleanup_fclose): Remove.
8907 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8908
6e7bc05c
TT
89092017-08-03 Tom Tromey <tom@tromey.com>
8910
8911 * top.c (open_terminal_stream): Return gdb_file_up.
8912 (new_ui_command): Update.
8913
4a45905b
TT
89142017-08-03 Tom Tromey <tom@tromey.com>
8915
8916 * source.c (print_source_lines_base, forward_search_command)
8917 (reverse_search_command): Use gdb_file_up.
8918
7cd06d6e
TT
89192017-08-03 Tom Tromey <tom@tromey.com>
8920
8921 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8922
ed166945
TT
89232017-08-03 Tom Tromey <tom@tromey.com>
8924
8925 * cli/cli-cmds.c (find_and_open_script): Change return type.
8926 Remove "streamp" and "full_path" parameters.
8927 (source_script_with_search): Update.
8928 * auto-load.c (source_script_file): Update.
8929 * cli/cli-cmds.h (find_and_open_script): Change type.
8930 (open_script): New struct.
8931
d419f42d
TT
89322017-08-03 Tom Tromey <tom@tromey.com>
8933
8934 * xml-support.c (xml_fetch_content_from_file): Update.
8935 * ui-file.c (stdio_file::open): Update.
8936 * tracefile-tfile.c (tfile_start): Update.
8937 * remote.c (remote_file_put, remote_file_get): Update.
8938 * nat/linux-procfs.c (linux_proc_get_int)
8939 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8940 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8941 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8942 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8943 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8944 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8945 * linux-nat.c (linux_proc_pending_signals): Update.
8946 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8947 (file_closer): Remove.
8948 * compile/compile.c (compile_to_object): Update.
8949 * common/filestuff.h (struct gdb_file_deleter): New.
8950 (gdb_file_up): New typedef.
8951 (gdb_fopen_cloexec): Change return type.
8952 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8953 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8954 (dump_binary_file, restore_binary_file): Update.
8955 * auto-load.c (auto_load_objfile_script_1): Update.
8956
4a2b031d
TT
89572017-08-03 Tom Tromey <tom@tromey.com>
8958
8959 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8960 (info_static_tracepoint_markers_command): Likewise.
8961 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8962 * skip.c (skip_info): Use ui_out_emit_table.
8963 * progspace.c (print_program_space): Use ui_out_emit_table.
8964 * osdata.c (info_osdata): Use ui_out_emit_table.
8965 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8966 ui_out_emit_table.
8967 * linux-thread-db.c (info_auto_load_libthread_db): Use
8968 ui_out_emit_table.
8969 * inferior.c (print_inferior): Use ui_out_emit_table.
8970 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8971 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8972 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8973 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8974 * ui-out.h (class ui_out_emit_table): New.
8975
a4f320fd
MR
89762017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8977
8978 * mips-tdep.c (mips_fpu_type_str): New function.
8979 (mips_dump_tdep): Call it.
8980
a2f1f308
MR
89812017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8982
8983 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8984 `->mips_fpu_type'.
8985
7e5ed83b
XR
89862017-07-31 Xavier Roirand <roirand@adacore.com>
8987
8988 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8989
4c9dc811
XR
89902017-07-27 Xavier Roirand <roirand@adacore.com>
8991
8992 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8993
27d41eac
YQ
89942017-07-26 Yao Qi <yao.qi@linaro.org>
8995
8996 * cli/cli-cmds.c (maintenancechecklist): New variable.
8997 * gdbcmd.h (maintenancechecklist): Declare it.
8998 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8999 Call i386_linux_read_description with different masks.
9000 * maint.c (maintenance_check_command): New function.
9001 (_initialize_maint_cmds): Call add_prefix_cmd.
9002 * target-descriptions.c (tdesc_reg): override operator != and ==.
9003 (tdesc_type): Likewise.
9004 (tdesc_feature): Likewise.
9005 (target_desc): Likewise.
9006 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9007 (maintenance_check_xml_descriptions): New function.
9008 (_initialize_target_descriptions) Add command "xml-descriptions".
9009 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9010
ea03d0d3
YQ
90112017-07-26 Yao Qi <yao.qi@linaro.org>
9012
9013 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9014 Include features/i386/32bit-*.c.
9015 (i386_linux_read_description): Generate target description if it
9016 doesn't exist.
9017 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9018 functions.
9019 * features/i386/32bit-linux.c: Re-generated.
9020 * features/i386/32bit-sse.c: Likewise.
9021 * target-descriptions.c (print_c_feature::visit): Print code to
9022 set register number if needed.
9023 (print_c_feature) <m_next_regnum>: New field.
9024
25aa13e5
YQ
90252017-07-26 Yao Qi <yao.qi@linaro.org>
9026
9027 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9028 (FEATURE_XMLFILES): New.
9029 (FEATURE_CFILES): New.
9030 New rules.
9031 (clean-cfiles): Remove generated c files.
9032 * features/i386/32bit-avx.c: Generated.
9033 * features/i386/32bit-avx512.c: Generated.
9034 * features/i386/32bit-core.c: Generated.
9035 * features/i386/32bit-linux.c: Generated.
9036 * features/i386/32bit-mpx.c: Generated.
9037 * features/i386/32bit-pkeys.c: Generated.
9038 * features/i386/32bit-sse.c: Generated.
9039 * target-descriptions.c: Include algorithm.
9040 (tdesc_element_visitor): Add method visit_end.
9041 (print_c_tdesc): Implement visit_end.
9042 (print_c_tdesc:: m_filename_after_features): Move it to
9043 protected.
9044 (print_c_feature): New class.
9045 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9046 name starts with "i386/32bit-".
9047
6eb1e6a8
YQ
90482017-07-26 Yao Qi <yao.qi@linaro.org>
9049
9050 * target-descriptions.c (tdesc_element_visitor): New class.
9051 (tdesc_element): New class.
9052 (tdesc_reg): Inherit from tdesc_element.
9053 (tdesc_reg::accept): New function.
9054 (tdesc_type): Inherit from tdesc_element.
9055 (tdesc_type::accept): New function.
9056 (tdesc_feature): Inherit from tdesc_element.
9057 (tdesc_feature::accept): New function.
9058 (target_desc): Inherit from tdesc_element.
9059 (target_desc::target_desc): New.
9060 (target_desc::~target_desc): New.
9061 (target_desc::accept): New.
9062 (allocate_target_description): Use new.
9063 (free_target_description): Use delete.
9064 (print_c_tdesc): New class.
9065 (maint_print_c_tdesc_cmd): Adjust.
9066
9067 * features/aarch64.c: Re-generated.
9068 * features/arc-arcompact.c: Re-generated.
9069 * features/arc-v2.c: Re-generated.
9070 * features/arm/arm-with-iwmmxt.c: Re-generated.
9071 * features/arm/arm-with-m.c: Re-generated.
9072 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9073 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9074 * features/arm/arm-with-neon.c: Re-generated.
9075 * features/arm/arm-with-vfpv2.c: Re-generated.
9076 * features/arm/arm-with-vfpv3.c: Re-generated.
9077 * features/i386/amd64-avx-avx512.c: Re-generated.
9078 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9079 * features/i386/amd64-avx.c: Re-generated.
9080 * features/i386/amd64-avx-linux.c: Re-generated.
9081 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9082 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9083 * features/i386/amd64-avx-mpx.c: Re-generated.
9084 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9085 * features/i386/amd64.c: Re-generated.
9086 * features/i386/amd64-linux.c: Re-generated.
9087 * features/i386/amd64-mpx.c: Re-generated.
9088 * features/i386/amd64-mpx-linux.c: Re-generated.
9089 * features/i386/i386-avx-avx512.c: Re-generated.
9090 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9091 * features/i386/i386-avx.c: Re-generated.
9092 * features/i386/i386-avx-linux.c: Re-generated.
9093 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9094 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9095 * features/i386/i386-avx-mpx.c: Re-generated.
9096 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9097 * features/i386/i386.c: Re-generated.
9098 * features/i386/i386-linux.c: Re-generated.
9099 * features/i386/i386-mmx.c: Re-generated.
9100 * features/i386/i386-mmx-linux.c: Re-generated.
9101 * features/i386/i386-mpx.c: Re-generated.
9102 * features/i386/i386-mpx-linux.c: Re-generated.
9103 * features/i386/x32-avx-avx512.c: Re-generated.
9104 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9105 * features/i386/x32-avx.c: Re-generated.
9106 * features/i386/x32-avx-linux.c: Re-generated.
9107 * features/i386/x32.c: Re-generated.
9108 * features/i386/x32-linux.c: Re-generated.
9109 * features/microblaze.c: Re-generated.
9110 * features/microblaze-with-stack-protect.c: Re-generated.
9111 * features/mips64-dsp-linux.c: Re-generated.
9112 * features/mips64-linux.c: Re-generated.
9113 * features/mips-dsp-linux.c: Re-generated.
9114 * features/mips-linux.c: Re-generated.
9115 * features/nds32.c: Re-generated.
9116 * features/nios2.c: Re-generated.
9117 * features/nios2-linux.c: Re-generated.
9118 * features/rs6000/powerpc-32.c: Re-generated.
9119 * features/rs6000/powerpc-32l.c: Re-generated.
9120 * features/rs6000/powerpc-403.c: Re-generated.
9121 * features/rs6000/powerpc-403gc.c : Re-generated.
9122 * features/rs6000/powerpc-405.c: Re-generated.
9123 * features/rs6000/powerpc-505.c: Re-generated.
9124 * features/rs6000/powerpc-601.c: Re-generated.
9125 * features/rs6000/powerpc-602.c: Re-generated.
9126 * features/rs6000/powerpc-603.c: Re-generated.
9127 * features/rs6000/powerpc-604.c: Re-generated.
9128 * features/rs6000/powerpc-64.c: Re-generated.
9129 * features/rs6000/powerpc-64l.c: Re-generated.
9130 * features/rs6000/powerpc-7400.c: Re-generated.
9131 * features/rs6000/powerpc-750.c: Re-generated.
9132 * features/rs6000/powerpc-860.c: Re-generated.
9133 * features/rs6000/powerpc-altivec32.c: Re-generated.
9134 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9135 * features/rs6000/powerpc-altivec64.c: Re-generated.
9136 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9137 * features/rs6000/powerpc-cell32l.c: Re-generated.
9138 * features/rs6000/powerpc-cell64l.c: Re-generated.
9139 * features/rs6000/powerpc-e500.c: Re-generated.
9140 * features/rs6000/powerpc-e500l.c: Re-generated.
9141 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9142 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9143 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9144 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9145 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9146 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9147 * features/rs6000/powerpc-vsx32.c: Re-generated.
9148 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9149 * features/rs6000/powerpc-vsx64.c: Re-generated.
9150 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9151 * features/rs6000/rs6000.c: Re-generated.
9152 * features/s390-linux32.c: Re-generated.
9153 * features/s390-linux32v1.c: Re-generated.
9154 * features/s390-linux32v2.c: Re-generated.
9155 * features/s390-linux64.c: Re-generated.
9156 * features/s390-linux64v1.c: Re-generated.
9157 * features/s390-linux64v2.c: Re-generated.
9158 * features/s390-te-linux64.c: Re-generated.
9159 * features/s390-tevx-linux64.c: Re-generated.
9160 * features/s390-vx-linux64.c: Re-generated.
9161 * features/s390x-linux64.c: Re-generated.
9162 * features/s390x-linux64v1.c: Re-generated.
9163 * features/s390x-linux64v2.c: Re-generated.
9164 * features/s390x-te-linux64.c: Re-generated.
9165 * features/s390x-tevx-linux64.c: Re-generated.
9166 * features/s390x-vx-linux64.c: Re-generated.
9167 * features/sparc/sparc32-solaris.c: Re-generated.
9168 * features/sparc/sparc64-solaris.c: Re-generated.
9169 * features/tic6x-c62x.c: Re-generated.
9170 * features/tic6x-c62x-linux.c: Re-generated.
9171 * features/tic6x-c64x.c: Re-generated.
9172 * features/tic6x-c64x-linux.c: Re-generated.
9173 * features/tic6x-c64xp.c: Re-generated.
9174 * features/tic6x-c64xp-linux.c: Re-generated.
9175
35b4818d
YQ
91762017-07-26 Yao Qi <yao.qi@linaro.org>
9177
9178 * i386-linux-tdep.c (i386_linux_read_description): New function.
9179 (i386_linux_core_read_description): Call
9180 i386_linux_read_description.
9181 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9182 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9183 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9184 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9185 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9186 * x86-linux-nat.c (x86_linux_read_description): Call
9187 i386_linux_read_description.
9188
8e2141c6
YQ
91892017-07-26 Yao Qi <yao.qi@linaro.org>
9190
9191 * NEWS: Mention it.
9192 * features/Makefile (%.c: %.xml): Pass the xml file name to
9193 command "maint print c-tdesc".
9194 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9195 name from 'arg'.
9196
b468ff4c
YQ
91972017-07-26 Yao Qi <yao.qi@linaro.org>
9198
9199 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9200 in-class initialization.
9201 (tdesc_create_feature): Call new instead of XCNEW.
9202 (free_target_description): Ue delete.
9203
b9c0e1b4
JB
92042017-07-25 John Baldwin <jhb@FreeBSD.org>
9205
9206 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9207
a04b5337
YQ
92082017-07-25 Yao Qi <yao.qi@linaro.org>
9209
9210 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9211 constant.
9212 (amd64_x32_init_abi): Likewise.
9213 * amd64-tdep.h (amd64_init_abi): Update declaration.
9214 (amd64_x32_init_abi): Likewise.
9215
02ad7fc2
YQ
92162017-07-25 Yao Qi <yao.qi@linaro.org>
9217
9218 PR tdep/21717
9219 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9220 condition for FPSCR.
9221 (arm_linux_store_inferior_registers): Likewise.
9222
b6f48cb0
TT
92232017-07-22 Tom Tromey <tom@tromey.com>
9224
9225 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9226 <syscalls_counts>: Now a std::vector.
9227 (get_catch_syscall_inferior_data): Use "new".
9228 (catch_syscall_inferior_data_cleanup): Use "delete".
9229 (insert_catch_syscall, remove_catch_syscall)
9230 (clear_syscall_counts): Update.
9231
e12c9b7a
TT
92322017-07-22 Tom Tromey <tom@tromey.com>
9233
9234 * break-catch-syscall.c (syscall_catchpoint)
9235 <syscalls_to_be_caught>: Now a std::vector<int>
9236 (~syscall_catchpoint): Remove.
9237 (insert_catch_syscall, remove_catch_syscall)
9238 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9239 (print_mention_catch_syscall, print_recreate_catch_syscall):
9240 Update.
9241 (create_syscall_event_catchpoint): Change type of "filter"
9242 parameter.
9243 (catch_syscall_split_args): Return a std::vector.
9244 (catch_syscall_command_1, catching_syscall_number_1): Update.
9245
4fa8aeac
TT
92462017-07-22 Tom Tromey <tom@tromey.com>
9247
9248 * break-catch-throw.c (struct exception_catchpoint)
9249 <exception_rx>: Now a std::string.
9250 (~exception_catchpoint): Remove.
9251 (print_one_detail_exception_catchpoint): Update.
9252 (handle_gnu_v3_exceptions): Change type of except_rx.
9253 (extract_exception_regexp): Return a std::string.
9254 (catch_exception_command_1): Update.
9255
f746a154
TT
92562017-07-22 Tom Tromey <tom@tromey.com>
9257
9258 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9259 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9260 std::vector.
9261 <catch_all>: Now a bool.
9262 (~signal_catchpoint): Remove.
9263 (signal_catchpoint_insert_location)
9264 (signal_catchpoint_remove_location)
9265 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9266 (signal_catchpoint_print_mention)
9267 (signal_catchpoint_print_recreate)
9268 (signal_catchpoint_explains_signal): Update.
9269 (create_signal_catchpoint): Change type of "filter" and
9270 "catch_all".
9271 (catch_signal_split_args): Return a std::vector. Change type of
9272 "catch_all".
9273 (catch_signal_command): Update.
9274
47e77640
PA
92752017-07-20 Pedro Alves <palves@redhat.com>
9276
9277 * ada-lang.c (ada_language_defn): Make extern.
9278 (_initialize_ada_language): Remove add_language call.
9279 * c-lang.c (c_language_defn, cplus_language_defn)
9280 (asm_language_defn, minimal_language_defn): Make extern.
9281 (_initialize_c_language): Delete.
9282 * completer.c (compare_cstrings): Delete, moved to utils.h.
9283 * d-lang.c (d_language_defn): Make extern.
9284 (_initialize_d_language): Remove add_language calls.
9285 * defs.h (enum language): Add comment.
9286 * f-lang.c (f_language_defn): Make extern.
9287 (_initialize_f_language): Remove add_language call.
9288 * go-lang.c (go_language_defn): Make extern.
9289 (_initialize_go_language): Remove add_language call.
9290 * language.c: Include <algorithm>.
9291 (languages): Redefine as const array.
9292 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9293 (set_language_command): Handle "local". Use for-range loop.
9294 (set_language): Remove loop.
9295 (language_enum): Rewrite.
9296 (language_def, language_str): Remove loops.
9297 (add_language): Delete.
9298 (add_set_language_command): New, based on add_languages.
9299 (skip_language_trampoline): Adjust.
9300 (local_language_defn): Delete.
9301 (language_gdbarch_post_init): Adjust.
9302 (_initialize_language): Remove add_language calls. Call
9303 add_set_language_command.
9304 * language.h (add_language): Delete.
9305 (auto_language_defn)
9306 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9307 (asm_language_defn, c_language_defn, cplus_language_defn)
9308 (d_language_defn, f_language_defn, go_language_defn)
9309 (m2_language_defn, objc_language_defn, opencl_language_defn)
9310 (pascal_language_defn, rust_language_defn): Declare.
9311 * m2-lang.c (m2_language_defn): Make extern.
9312 (_initialize_m2_language): Remove add_language call.
9313 * objc-lang.c (objc_language_defn): Make extern.
9314 (_initialize_objc_language): Remove add_language call.
9315 * opencl-lang.c (opencl_language_defn): Make extern.
9316 (_initialize_opencl_language): Remove add_language call.
9317 * p-lang.c (pascal_language_defn): Make extern.
9318 (_initialize_pascal_language): Delete.
9319 * rust-lang.c (rust_language_defn): Make extern.
9320 (_initialize_rust_language): Delete.
9321 * utils.h (compare_cstrings): New static inline function.
9322
edb0c9cb
PA
93232017-07-20 Pedro Alves <palves@redhat.com>
9324
9325 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9326 (get_var_value): Constify parameters.
9327 (get_int_var_value): Change prototype.
9328 (to_fixed_range_type): Adjust.
9329 * ada-lang.h (get_int_var_value): Change prototype.
9330
a778f165
PA
93312017-07-20 Pedro Alves <palves@redhat.com>
9332
9333 * dwarf2read.c (dw2_lookup_symbol): Use
9334 SYMBOL_MATCHES_SEARCH_NAME.
9335 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9336
42edd901
PA
93372017-07-20 Pedro Alves <palves@redhat.com>
9338
9339 * block.c (block_iter_name_step, block_iter_name_first)
9340 (block_iter_name_next): Delete.
9341 (block_lookup_symbol_primary): Adjust to use
9342 dict_iter_match_first/dict_iter_match_next.
9343 * block.h (block_iter_name_first, block_iter_name_next): Delete
9344 declarations.
9345 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9346 dict_iter_match_first/dict_iter_match_next.
9347
cf325299
PA
93482017-07-20 Pedro Alves <palves@redhat.com>
9349
9350 * cp-support.c (cp_find_first_component_aux): Add missing case for
9351 end of string.
9352
c5ed0576
DB
93532017-07-18 David Blaikie <dblaikie@gmail.com>
9354
9355 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9356 of dwo_cu's dwo_file.
9357
27841e76
YQ
93582017-07-18 Yao Qi <yao.qi@linaro.org>
9359
9360 * remote.c (store_registers_using_G): Remove one line comment.
9361
cfb7e58b
YQ
93622017-07-18 Yao Qi <yao.qi@linaro.org>
9363
9364 * regcache.c (regcache_cpy): Simplify it.
9365 (regcache::cpy_no_passthrough): Remove it.
9366 * regcache.h (cpy_no_passthrough): Remove it.
9367 (regcache_dup, regcache_cpy): Update comments.
9368
386535dd
PA
93692017-07-18 Pedro Alves <palves@redhat.com>
9370
9371 * remote-sim.c (sim_command_completer): Adjust to work with a
9372 completion_tracker instead of a VEC.
9373
c45ec17c
PA
93742017-07-17 Pedro Alves <palves@redhat.com>
9375
9376 * completer.c (complete_source_filenames): New function.
9377 (complete_address_and_linespec_locations): New function.
9378 (location_completer): Use complete_address_and_linespec_locations.
9379 (completion_tracker::build_completion_result): Honor the tracker's
9380 request to suppress append.
9381 * completer.h (completion_tracker::suppress_append_ws)
9382 (completion_tracker::set_suppress_append_ws): New methods.
9383 (completion_tracker::m_suppress_append_ws): New field.
9384 (complete_source_filenames): New declaration.
9385 * linespec.c (linespec_complete_what): New.
9386 (struct ls_parser) <complete_what, completion_word,
9387 completion_quote_char, completion_quote_end, completion_tracker>:
9388 New fields.
9389 (string_find_incomplete_keyword_at_end): New.
9390 (linespec_lexer_lex_string): Record quote char. If in completion
9391 mode, don't throw.
9392 (linespec_lexer_consume_token): Advance the completion word point.
9393 (linespec_lexer_peek_token): Save/restore completion info.
9394 (save_stream_and_consume_token): New.
9395 (set_completion_after_number): New.
9396 (linespec_parse_basic): Set what to complete next depending on
9397 token. Handle function and label completions specially.
9398 (parse_linespec): Disable objc shortcut in completion mode. Set
9399 what to complete next depending on token type. Skip keyword if in
9400 completion mode.
9401 (complete_linespec_component, linespec_complete): New.
9402 * linespec.h (linespec_complete): Declare.
9403
be966d42
PA
94042017-07-17 Pedro Alves <palves@redhat.com>
9405
9406 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9407 Handle 'operator<' / 'operator<<'.
9408
a2459270
PA
94092017-07-17 Pedro Alves <palves@redhat.com>
9410
9411 * completer.c (collect_explicit_location_matches): Handle
9412 MATCH_LABEL.
9413 (convert_explicit_location_to_linespec): New, factored out from
9414 ...
9415 (convert_explicit_location_to_sals): ... this.
9416 (complete_label): New.
9417 (linespec_complete_label, find_label_symbols_in_block): New.
9418 (find_label_symbols): Add completion_mode parameter and adjust to
9419 call find_label_symbols_in_block.
9420 * linespec.h (linespec_complete_label): Declare.
9421
c6756f62
PA
94222017-07-17 Pedro Alves <palves@redhat.com>
9423
9424 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9425 complete_symbol_mode parameter.
9426 * cli/cli-cmds.c (complete_command): Get the completion result out
9427 of the handle_brkchars tracker if used a custom word point.
9428 * completer.c: Include "linespec.h".
9429 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9430 (advance_to_expression_complete_word_point): New.
9431 (completion_tracker::completes_to_completion_word): New.
9432 (complete_files_symbols): Pass down
9433 complete_symbol_mode::EXPRESSION.
9434 (explicit_options, probe_options): New.
9435 (collect_explicit_location_matches): Complete on the
9436 explictit_loc->foo instead of word. Use
9437 linespec_complete_function. Handle MATCH_LINE. Handle offering
9438 keyword and options completions.
9439 (backup_text_ptr): Delete.
9440 (skip_keyword): New.
9441 (complete_explicit_location): Remove 'word' parameter. Add
9442 language, quoted_arg_start and quoted_arg_end parameters.
9443 Rewrite, parsing left to right.
9444 (location_completer): Rewrite.
9445 (location_completer_handle_brkchars): New function.
9446 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9447 (enum complete_line_internal_reason): Adjust comments.
9448 (completion_tracker::discard_completions): New.
9449 (completer_handle_brkchars_func_for_completer): Handle
9450 location_completer.
9451 (gdb_custom_word_point_brkchars)
9452 (gdb_org_rl_basic_quote_characters): New.
9453 (gdb_completion_word_break_characters_throw)
9454 (completion_find_completion_word): Handle trackers that use a
9455 custom word point.
9456 (completion_tracker::advance_custom_word_point_by): New.
9457 (completion_tracker::build_completion_result): Don't rely on
9458 readline appending the quote char.
9459 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9460 use a custom word point.
9461 (gdb_rl_attempted_completion_function): Restore
9462 rl_basic_quote_characters.
9463 * completer.h (class completion_tracker): Extend intro comment.
9464 (completion_tracker::set_quote_char)
9465 (completion_tracker::quote_char)
9466 (completion_tracker::set_use_custom_word_point)
9467 (completion_tracker::use_custom_word_point)
9468 (completion_tracker::custom_word_point)
9469 (completion_tracker::set_custom_word_point)
9470 (completion_tracker::advance_custom_word_point_by)
9471 (completion_tracker::completes_to_completion_word)
9472 (completion_tracker::discard_completions): New methods.
9473 (completion_tracker::m_quote_char)
9474 (completion_tracker::m_use_custom_word_point)
9475 (completion_tracker::m_custom_word_point): New fields.
9476 (advance_to_expression_complete_word_point): Declare.
9477 * f-lang.c (f_collect_symbol_completion_matches): Add
9478 complete_symbol_mode parameter.
9479 * language.h (struct language_defn)
9480 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9481 parameter.
9482 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9483 (linespec_complete_function): New function.
9484 (linespec_lexer_lex_keyword): Adjust.
9485 * linespec.h (linespec_keywords, linespec_complete_function): New
9486 declarations.
9487 * location.c (find_end_quote): New function.
9488 (explicit_location_lex_one): Add explicit_completion_info
9489 parameter. Save quoting info. Don't throw if being called for
9490 completion. Don't handle Ada operators here.
9491 (is_cp_operator, skip_op_false_positives, first_of)
9492 (explicit_location_lex_one_function): New function.
9493 (string_to_explicit_location): Replace 'dont_throw' parameter with
9494 an explicit_completion_info pointer parameter. Handle it. Don't
9495 use explicit_location_lex_one to lex function names. Use
9496 explicit_location_lex_one_function instead.
9497 * location.h (struct explicit_completion_info): New.
9498 (string_to_explicit_location): Replace 'dont_throw' parameter with
9499 an explicit_completion_info pointer parameter.
9500 * symtab.c (default_collect_symbol_completion_matches_break_on):
9501 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9502 (default_collect_symbol_completion_matches)
9503 (collect_symbol_completion_matches): Add complete_symbol_mode
9504 parameter.
9505 (collect_symbol_completion_matches_type): Pass down
9506 complete_symbol_mode::EXPRESSION.
9507 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9508 parameter. Handle LINESPEC mode.
9509 * symtab.h (complete_symbol_mode): New.
9510 (default_collect_symbol_completion_matches_break_on)
9511 (default_collect_symbol_completion_matches)
9512 (collect_symbol_completion_matches)
9513 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9514 parameter.
9515
1d550c82
PA
95162017-07-17 Pedro Alves <palves@redhat.com>
9517
9518 * utils.c (enum class strncmp_iw_mode): New.
9519 (strcmp_iw): Rename to ...
9520 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9521 parameters. Handle them.
9522 (strncmp_iw): New.
9523 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9524 * utils.h (strncmp_iw): Declare.
9525 (strcmp_iw): Move describing comments here.
9526
8090b426
PA
95272017-07-17 Pedro Alves <palves@redhat.com>
9528
9529 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9530 CP_OPERATOR_STR.
9531 * c-typeprint.c (is_type_conversion_operator): Use
9532 CP_OPERATOR_STR.
9533 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9534 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9535 CP_OPERATOR_LEN.
9536 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9537 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9538 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9539 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9540 CP_OPERATOR_STR.
9541 * location.c: Include "cp-support.h".
9542 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9543 CP_OPERATOR_STR.
9544 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9545 CP_OPERATOR_LEN.
9546
6a2c1b87
PA
95472017-07-17 Pedro Alves <palves@redhat.com>
9548
9549 * cli/cli-cmds.c (complete_command): Use a completion tracker
9550 along with completion_find_completion_word for handle_brkchars
9551 phase.
9552 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9553 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9554 (struct gdb_rl_completion_word_info): New.
9555 (gdb_rl_find_completion_word): New.
9556 (completion_find_completion_word): New.
9557 * completer.h (completion_find_completion_word): Declare.
9558
eb3ff9a5
PA
95592017-07-17 Pedro Alves <palves@redhat.com>
9560
9561 * ada-lang.c (symbol_completion_match): Adjust comments.
9562 (symbol_completion_add): Replace vector parameter with
9563 completion_tracker parameter. Use it.
9564 (ada_make_symbol_completion_list): Rename to...
9565 (ada_collect_symbol_completion_matches): ... this. Add
9566 completion_tracker parameter and use it.
9567 (ada_language_defn): Adjust.
9568 * break-catch-syscall.c (catch_syscall_completer): Adjust
9569 prototype and work with completion_tracker instead of VEC.
9570 * breakpoint.c (condition_completer): Adjust prototype and work
9571 with completion_tracker instead of VEC.
9572 * c-lang.c (c_language_defn, cplus_language_defn)
9573 (asm_language_defn, minimal_language_defn): Adjust to renames.
9574 * cli/cli-cmds.c (complete_command): Rework using
9575 completion_tracker. Catch exceptions when completing.
9576 * cli/cli-decode.c (integer_unlimited_completer)
9577 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9578 with completion_tracker instead of VEC.
9579 * command.h (struct completion_tracker): Forward declare.
9580 (completer_ftype, completer_handle_brkchars_ftype): Change
9581 types.
9582 (complete_on_cmdlist, complete_on_enum): Adjust.
9583 * completer.c: Include <algorithm>.
9584 (struct gdb_completer_state): New.
9585 (current_completion): New global.
9586 (readline_line_completion_function): Delete.
9587 (noop_completer, filename_completer)
9588 (filename_completer_handle_brkchars, complete_files_symbols)
9589 (linespec_location_completer): Adjust to work with a
9590 completion_tracker instead of a VEC.
9591 (string_or_empty): New.
9592 (collect_explicit_location_matches): Adjust to work with a
9593 completion_tracker instead of a VEC.
9594 (explicit_location_completer): Rename to ...
9595 (complete_explicit_location): ... this and adjust to work with a
9596 completion_tracker instead of a VEC.
9597 (location_completer): Adjust to work with a completion_tracker
9598 instead of a VEC.
9599 (add_struct_fields): Adjust to work with a completion_list instead
9600 of VEC.
9601 (expression_completer): Rename to ...
9602 (complete_expression): ... this and adjust to work with a
9603 completion_tracker instead of a VEC. Use complete_files_symbols.
9604 (expression_completer): Reimplement on top of complete_expression.
9605 (symbol_completer): Adjust to work with a completion_tracker
9606 instead of a VEC.
9607 (enum complete_line_internal_reason): Add describing comments.
9608 (complete_line_internal_normal_command): Adjust to work with a
9609 completion_tracker instead of a VEC.
9610 (complete_line_internal): Rename to ...
9611 (complete_line_internal_1): ... this and adjust to work with a
9612 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9613 handle_brkchars phase.
9614 (new_completion_tracker): Delete.
9615 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9616 complete_line_internal_1.
9617 (free_completion_tracker): Delete.
9618 (INITIAL_COMPLETION_HTAB_SIZE): New.
9619 (completion_tracker::completion_tracker)
9620 (completion_tracker::~completion_tracker): New.
9621 (maybe_add_completion): Delete.
9622 (completion_tracker::maybe_add_completion)
9623 (completion_tracker::add_completion)
9624 (completion_tracker::add_completions): New.
9625 (throw_max_completions_reached_error): Delete.
9626 (complete_line): Adjust to work with a completion_tracker instead
9627 of a VEC. Don't create a completion_tracker_t or check for max
9628 completions here.
9629 (command_completer, command_completer_handle_brkchars)
9630 (signal_completer, reg_or_group_completer_1)
9631 (reg_or_group_completer, default_completer_handle_brkchars):
9632 Adjust to work with a completion_tracker.
9633 (gdb_completion_word_break_characters_throw): New.
9634 (gdb_completion_word_break_characters): Reimplement.
9635 (line_completion_function): Delete.
9636 (completion_tracker::recompute_lowest_common_denominator)
9637 (expand_preserving_ws)
9638 (completion_tracker::build_completion_result)
9639 (completion_result::completion_result)
9640 (completion_result::completion_result)
9641 (completion_result::~completion_result)
9642 (completion_result::completion_result)
9643 (completion_result::release_match_list, compare_cstrings)
9644 (completion_result::sort_match_list)
9645 (completion_result::reset_match_list)
9646 (gdb_rl_attempted_completion_function_throw)
9647 (gdb_rl_attempted_completion_function): New.
9648 * completer.h (completion_list, struct completion_result)
9649 (class completion_tracker): New.
9650 (complete_line): Add completion_tracker parameter.
9651 (readline_line_completion_function): Delete.
9652 (gdb_rl_attempted_completion_function): New.
9653 (noop_completer, filename_completer, expression_completer)
9654 (location_completer, symbol_completer, command_completer)
9655 (signal_completer, reg_or_group_completer): Update prototypes.
9656 (completion_tracker_t, new_completion_tracker)
9657 (make_cleanup_free_completion_tracker): Delete.
9658 (enum maybe_add_completion_enum): Delete.
9659 (maybe_add_completion): Delete.
9660 (throw_max_completions_reached_error): Delete.
9661 * corefile.c (complete_set_gnutarget): Adjust to work with a
9662 completion_tracker instead of a VEC.
9663 * cp-abi.c (cp_abi_completer): Adjust to work with a
9664 completion_tracker instead of a VEC.
9665 * d-lang.c (d_language_defn): Adjust.
9666 * disasm.c (disassembler_options_completer): Adjust to work with a
9667 completion_tracker instead of a VEC.
9668 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9669 (f_collect_symbol_completion_matches): ... this. Adjust to work
9670 with a completion_tracker instead of a VEC.
9671 (f_language_defn): Adjust.
9672 * go-lang.c (go_language_defn): Adjust.
9673 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9674 Adjust to work with a completion_tracker instead of a VEC.
9675 * infrun.c (handle_completer): Likewise.
9676 * interps.c (interpreter_completer): Likewise.
9677 * interps.h (interpreter_completer): Likewise.
9678 * language.c (unknown_language_defn, auto_language_defn)
9679 (local_language_defn): Adjust.
9680 * language.h (language_defn::la_make_symbol_completion_list):
9681 Rename to ...
9682 (language_defn::la_collect_symbol_completion_matches): ... this
9683 and adjust to work with a completion_tracker instead of a VEC.
9684 * m2-lang.c (m2_language_defn): Adjust.
9685 * objc-lang.c (objc_language_defn): Adjust.
9686 * opencl-lang.c (opencl_language_defn): Adjust.
9687 * p-lang.c (pascal_language_defn): Adjust.
9688 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9689 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9690 with a completion_tracker.
9691 * rust-lang.c (rust_language_defn): Adjust.
9692 * symtab.c (free_completion_list, do_free_completion_list)
9693 (return_val, completion_tracker): Delete.
9694 (completion_list_add_name, completion_list_add_symbol)
9695 (completion_list_add_msymbol, completion_list_objc_symbol)
9696 (completion_list_add_fields, add_symtab_completions): Add
9697 completion_tracker parameter and use it.
9698 (default_make_symbol_completion_list_break_on_1): Rename to...
9699 (default_collect_symbol_completion_matches_break_on): ... this.
9700 Add completion_tracker parameter and use it instead of allocating
9701 a completion tracker here.
9702 (default_make_symbol_completion_list_break_on): Delete old
9703 implementation.
9704 (default_make_symbol_completion_list): Delete.
9705 (default_collect_symbol_completion_matches): New.
9706 (make_symbol_completion_list): Delete.
9707 (collect_symbol_completion_matches): New.
9708 (make_symbol_completion_type): Rename to ...
9709 (collect_symbol_completion_matches_type): ... this. Add
9710 completion_tracker parameter and use it instead of VEC.
9711 (make_file_symbol_completion_list_1): Rename to...
9712 (collect_file_symbol_completion_matches): ... this. Add
9713 completion_tracker parameter and use it instead of VEC.
9714 (make_file_symbol_completion_list): Delete.
9715 (add_filename_to_list): Use completion_list instead of a VEC.
9716 (add_partial_filename_data::list): Now a completion_list.
9717 (make_source_files_completion_list): Work with a completion_list
9718 instead of a VEC.
9719 * symtab.h: Include "completer.h".
9720 (default_make_symbol_completion_list_break_on)
9721 (default_make_symbol_completion_list, make_symbol_completion_list)
9722 (make_symbol_completion_type, make_file_symbol_completion_list)
9723 (make_source_files_completion_list): Delete.
9724 (default_collect_symbol_completion_matches_break_on)
9725 (default_collect_symbol_completion_matches)
9726 (collect_symbol_completion_matches)
9727 (collect_symbol_completion_matches_type)
9728 (collect_file_symbol_completion_matches)
9729 (make_source_files_completion_list): New.
9730 * top.c (init_main): Don't install a rl_completion_entry_function
9731 hook. Install a rl_attempted_completion_function hook instead.
9732 * tui/tui-layout.c (layout_completer): Adjust to work with a
9733 completion_tracker.
9734 * tui/tui-regs.c (tui_reggroup_completer):
9735 * tui/tui-win.c (window_name_completer, focus_completer)
9736 (winheight_completer): Adjust to work with a completion_tracker.
9737 * value.c: Include "completer.h".
9738 (complete_internalvar): Adjust to work with a completion_tracker.
9739 * value.h (complete_internalvar): Likewise.
9740
6e1dbf8c
PA
97412017-07-17 Pedro Alves <palves@redhat.com>
9742
9743 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9744 renames.
9745 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9746 comments to completer_ftype's declaration.
9747 <completer_handle_brkchars>: Change type to
9748 completer_handle_brkchars_ftype.
9749 * command.h (completer_ftype): Add describing comment and give
9750 names to parameters.
9751 (completer_ftype_void): Rename to ...
9752 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9753 (set_cmd_completer_handle_brkchars): Adjust.
9754 * completer.c (filename_completer_handle_brkchars): New function.
9755 (complete_line_internal_normal_command): New function, factored
9756 out from ...
9757 (complete_line_internal): ... here.
9758 (command_completer_handle_brkchars)
9759 (default_completer_handle_brkchars)
9760 (completer_handle_brkchars_func_for_completer): New functions.
9761 * completer.h (set_gdb_completion_word_break_characters): Delete
9762 declaration.
9763 (completer_handle_brkchars_func_for_completer): New declaration.
9764 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9765 completer_handle_brkchars_func_for_completer.
9766
78b13106
PA
97672017-07-17 Pedro Alves <palves@redhat.com>
9768
9769 * completer.c (symbol_completer): New function, based on
9770 make_symbol_completion_list_fn.
9771 * completer.h (symbol_completer): New declaration.
9772 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9773 * python/py-cmd.c (completers): Adjust.
9774 * symtab.c (make_symbol_completion_list_fn): Delete.
9775 * symtab.h (make_symbol_completion_list_fn): Delete.
9776 * cli/cli-decode.c (add_cmd): Adjust.
9777
bbf2f4df
PA
97782017-07-17 Pedro Alves <palves@redhat.com>
9779
9780 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9781 * dwarf2read.c: Include "filename-seen-cache.h".
9782 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9783 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9784 * filename-seen-cache.c: New file.
9785 * filename-seen-cache.h: New file.
9786 * symtab.c: Include "filename-seen-cache.h".
9787 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9788 (create_filename_seen_cache, clear_filename_seen_cache)
9789 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9790 to filename-seen-cache.h/filename-seen-cache.c.
9791 (output_source_filename, sources_info)
9792 (maybe_add_partial_symtab_filename)
9793 (make_source_files_completion_list): Adjust to use
9794 filename_seen_cache.
9795
330cdd98
PA
97962017-07-17 Pedro Alves <palves@redhat.com>
9797
9798 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9799 fields.
9800 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9801 dwarf2_debug_sections*)): New.
9802 (dwarf2_per_objfile::dwarf2_per_objfile(const
9803 dwarf2_per_objfile&)): Declare as deleted.
9804 (dwarf2_per_objfile::operator=): Declare as deleted.
9805 (dwarf2_per_objfile::dwarf2_per_objfile)
9806 (dwarf2_per_objfile::~dwarf2_per_objfile)
9807 (dwarf2_per_objfile::free_cached_comp_units): New.
9808 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9809 ctor. Call dwarf2_per_objfile's ctor manually.
9810 (dwarf2_locate_sections): Deleted/refactored as ...
9811 (dwarf2_per_objfile::locate_sections): ... this new method.
9812 (free_cached_comp_units): Defer to
9813 dwarf2_per_objfile::free_cached_comp_units.
9814 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9815
8880f2a9
TT
98162017-07-14 Tom Tromey <tom@tromey.com>
9817
9818 PR rust/21764:
9819 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9820 parameter.
9821 <UNOP_SIZEOF>: Split into separate case.
9822 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9823
65547233
TT
98242017-07-14 Tom Tromey <tom@tromey.com>
9825
9826 PR rust/21763:
9827 * symtab.c (symbol_matches_domain): Add language_rust to special
9828 case.
9829 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9830 treat LOC_TYPEDEF symbols as variables.
9831
8f14146e
PA
98322017-07-14 Pedro Alves <palves@redhat.com>
9833
9834 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9835 symtabs matching all symtabs with SRCFILE as file name instead of
9836 only considering the first hit, with lookup_symtab.
9837
2347965c
SM
98382017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9839
9840 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9841 operator_name parameters.
9842 (gen_expr): Update function call.
9843
40f4af28
SM
98442017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9845
9846 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9847 parameter.
9848 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9849 Likewise.
9850 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9851 parameter, use agent_expr::gdbarch instead, update function
9852 calls.
9853 (locexpr_tracepoint_var_ref): Likewise.
9854 (loclist_tracepoint_var_ref): Likewise.
9855 * ax-gdb.c (gen_trace_static_fields): Likewise.
9856 (gen_traced_pop): Likewise.
9857 (gen_frame_args_address): Likewise.
9858 (gen_frame_locals_address): Likewise.
9859 (gen_var_ref): Likewise.
9860 (gen_struct_ref_recursive): Likewise.
9861 (gen_static_field): Likewise.
9862 (gen_maybe_namespace_elt): Likewise.
9863 (gen_expr): Likewise.
9864 (gen_trace_for_var): Likewise.
9865 (gen_trace_for_expr): Likewise.
9866 (gen_trace_for_return_address): Likewise.
9867
053f8057
SM
98682017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9869
9870 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9871 parameter.
9872 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9873
6661ad48
SM
98742017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9875
9876 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9877 from ax, update calls.
9878 (gen_usual_arithmetic): Likewise.
9879 (gen_integral_promotions): Likewise.
9880 (gen_bitfield_ref): Likewise.
9881 (gen_primitive_field): Likewise.
9882 (gen_struct_ref_recursive): Likewise.
9883 (gen_struct_ref): Likewise.
9884 (gen_maybe_namespace_elt): Likewise.
9885 (gen_struct_elt_for_reference): Likewise.
9886 (gen_namespace_elt): Likewise.
9887 (gen_aggregate_elt_ref): Likewise.
9888 (gen_expr): Get gdbarch from ax, update calls.
9889 (gen_expr_binop_rest): Likewise.
9890
c55a47e7
PA
98912017-07-13 Pedro Alves <palves@redhat.com>
9892
9893 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9894 as default tdesc.
9895 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9896 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9897 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9898 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9899 tdep.
9900 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9901 Get final tdesc from the tdep.
9902 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9903 default tdesc.
9904 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9905 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9906 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9907 Use it as default tdesc.
9908 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9909 down to amd_init_abi. No longer handle fallback tdesc here.
9910 * amd64-tdep.h (tdesc_x32): Declare.
9911 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9912 parameter.
9913 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9914 as default tdesc.
9915
55efceab
AA
99162017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9917
9918 * s390-linux-tdep.c (s390_process_record): Add support for
9919 instructions new in arch12.
9920
0aa37b65
JB
99212017-07-11 John Baldwin <jhb@FreeBSD.org>
9922
9923 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9924 PT_GETFSBASE and PT_GETGSBASE.
9925 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9926 PT_SETGSBASE.
9927
48aeef91
JB
99282017-07-11 John Baldwin <jhb@FreeBSD.org>
9929
9930 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9931 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9932 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9933 those rules.
9934 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9935 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9936 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9937 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9938 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9939 * features/i386/amd64.xml: Add 64bit-segments.xml.
9940 * features/i386/amd64-avx-avx512.c: Regenerated.
9941 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9942 * features/i386/amd64-avx-mpx.c: Regenerated.
9943 * features/i386/amd64-avx.c: Regenerated.
9944 * features/i386/amd64-mpx.c: Regenerated.
9945 * features/i386/amd64.c: Regenerated.
9946 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9947 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9948 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9949 * regformats/i386/amd64-avx.dat: Regenerated.
9950 * regformats/i386/amd64-mpx.dat: Regenerated.
9951 * regformats/i386/amd64.dat: Regenerated.
9952
77c501bc
YQ
99532017-07-10 Yao Qi <yao.qi@linaro.org>
9954
9955 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9956 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9957
6dc8d757
AK
99582017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9959
9960 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9961 unsetenv.
9962 * gnulib/aclocal.m4: Regenerate.
9963 * gnulib/config.in: Regenerate.
9964 * gnulib/configure: Regenerate.
9965 * gnulib/import/Makefile.am: Regenerate.
9966 * gnulib/import/Makefile.in: Regenerate.
9967 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9968 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9969 * gnulib/import/m4/environ.m4: New file.
9970 * gnulib/import/m4/setenv.m4: New file.
9971 * gnulib/import/setenv.c: New file.
9972 * gnulib/import/unsetenv.c: New file.
9973
266934d1
SM
99742017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9975
9976 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9977 address when op is DW_OP_addr.
9978
03278692
TT
99792017-07-09 Tom Tromey <tom@tromey.com>
9980
9981 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9982 check and apply to outer type.
9983
4b654465
JB
99842017-07-07 John Baldwin <jhb@FreeBSD.org>
9985
9986 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9987 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9988 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9989 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9990
2af9fc44
JB
99912017-07-07 John Baldwin <jhb@FreeBSD.org>
9992
9993 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9994
382b69bb
JB
99952017-07-07 John Baldwin <jhb@FreeBSD.org>
9996
9997 * corelow.c (get_core_siginfo): Remove.
9998 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9999 instead of get_core_siginfo.
10000 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10001 * gdbarch.h: Re-generate.
10002 * gdbarch.c: Re-generate.
10003 * linux-tdep.c (linux_core_xfer_siginfo): New.
10004 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10005
6e5eab33
JB
100062017-07-07 John Baldwin <jhb@FreeBSD.org>
10007
10008 * corelow.c (thread_section_name): Move to ...
10009 * gdbcore.h (thread_section_name): ... here.
10010
929edea9
JB
100112017-07-07 John Baldwin <jhb@FreeBSD.org>
10012
10013 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10014 (struct siginfo32): New.
10015 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10016 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10017 via ptrace(PT_LWPINFO).
10018
762c974a
JB
100192017-07-07 John Baldwin <jhb@FreeBSD.org>
10020
10021 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10022 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10023 (fbsd_get_siginfo_type): New.
10024 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10025 (_initialize_fbsd_tdep): New.
10026
33c5cd75
DB
100272017-07-06 David Blaikie <dblaikie@gmail.com>
10028
10029 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10030 a singular dwo_unit*) to support multiple CUs in the same way that
10031 multiple TUs are supported.
10032 (create_cus_hash_table): Replace create_dwo_cu with a function for
10033 parsing multiple CUs from a DWO file.
10034 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10035 create_dwo_cu.
10036 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10037 htab_find, rather than comparing the signature to a singleton CU in
10038 the dwo_file.
10039
8455d262
PA
100402017-07-06 Pedro Alves <palves@redhat.com>
10041
10042 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10043
4da3eb35
PA
100442017-07-04 Pedro Alves <palves@redhat.com>
10045
10046 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10047 * gdbtypes.h (TYPE_STATIC): Delete.
10048 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10049 is_synchronized, is_native>: Delete.
10050 <dummy>: Bump.
10051 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10052 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10053 (TYPE_FN_FIELD_ABSTRACT): Delete.
10054
5bfd255c
SM
100552017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10056
10057 * buffer.h (buffer_finish): Fix spelling mistakes.
10058
25c54127
EZ
100592017-07-01 Eli Zaretskii <eliz@gnu.org>
10060
10061 * .dir-locals.el: Automatically switch to C-style comments in
10062 versions of Emacs that support the feature.
10063
dc4bde35
SDJ
100642017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10065 Pedro Alves <palves@redhat.com>
10066
10067 PR cli/21688
10068 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10069 (process_next_line): New variable 'inline_cmd'.
10070 Adjust 'if' clauses for "python", "compile" and "guile" to use
10071 'command_name_equals' and check for '!inline_cmd'.
10072
51ed89aa
SDJ
100732017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10074
10075 PR cli/21688
10076 * cli/cli-script.c (command_name_equals_not_inline): New function.
10077 (process_next_line): Adjust 'if' clauses for "python", "compile"
10078 and "guile" to use command_name_equals_not_inline.
10079
eb17d413
PA
100802017-06-29 Pedro Alves <palves@redhat.com>
10081
10082 * completer.c (expression_completer): Call
10083 linespec_location_completer instead of location_completer.
10084
195bcdd5
PA
100852017-06-29 Pedro Alves <palves@redhat.com>
10086
10087 * completer.c (expression_completer): Remove code that recomputes
10088 'text' from 'word'.
10089
adc764e7
YQ
100902017-06-29 Yao Qi <yao.qi@linaro.org>
10091
10092 * regformats/regdat.sh: Generate code with
10093 "ifndef IN_PROCESS_AGENT".
10094
6e75794e
PA
100952017-06-28 Pedro Alves <palves@redhat.com>
10096
10097 * command.h: Include "common/scoped_restore.h".
10098
bc491f2e
YQ
100992017-06-28 Yao Qi <yao.qi@linaro.org>
10100
10101 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10102 instead of obstack_grow.
10103
41664b45
DG
101042017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10105
10106 PR gdb/21337
10107 * symfile.c (reread_symbols): Call objfiles_changed just before
10108 read_symbols.
10109
6da67eb1
PA
101102017-06-27 Pedro Alves <palves@redhat.com>
10111
10112 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10113 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10114 (completion_list_add_symbol, completion_list_add_msymbol):
10115 ... these new functions.
10116 (add_symtab_completions)
10117 (default_make_symbol_completion_list_break_on_1): Adjust.
10118
23732b1e
PA
101192017-06-27 Pedro Alves <palves@redhat.com>
10120
10121 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10122 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10123 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10124 dtor.
10125 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10126 'storage_obstack' field an auto_obstack. In-class initialize all
10127 non-bitfield fields. Make minsyms_read bool.
10128 * symfile.c (read_symbols): Adjust.
10129
a4d1e79a
AH
101302017-06-27 Alan Hayward <alan.hayward@arm.com>
10131
10132 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10133 (gdbsim_store_register): Likewise.
10134
8268c778
PA
101352017-06-27 Pedro Alves <palves@redhat.com>
10136
10137 * c-exp.y (name_obstack): Now an auto_obstack.
10138 (yylex): Use auto_obstack::clear.
10139 (c_parse): Use auto_obstack::clear instead of reinitializing and
10140 freeing the obstack.
10141 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10142 * d-exp.y (name_obstack): Now an auto_obstack.
10143 (yylex): Use auto_obstack::clear.
10144 (d_parse): Use auto_obstack::clear instead of reinitializing and
10145 freeing the obstack.
10146 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10147 auto_obstack.
10148 * dwarf2read.c (create_addrmap_from_index)
10149 (dwarf2_build_psymtabs_hard)
10150 (update_enumeration_type_from_children): Likewise.
10151 * gdb_obstack.h (auto_obstack): New type.
10152 * go-exp.y (name_obstack): Now an auto_obstack.
10153 (build_packaged_name): Use auto_obstack::clear.
10154 (go_parse): Use auto_obstack::clear instead of reinitializing and
10155 freeing the obstack.
10156 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10157 auto_obstack.
10158 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10159 * rust-exp.y (work_obstack): Now an auto_obstack.
10160 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10161 reinitializing and freeing the obstack.
10162 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10163 (host_char_to_target): Use auto_obstack.
10164 * utils.h (make_cleanup_obstack_free): Delete declaration.
10165 * valprint.c (generic_emit_char, generic_printstr): Use
10166 auto_obstack.
10167
db665f42
SM
101682017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10169
10170 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10171 thread.
10172 (darwin_init_thread_list): Don't update dummy thread.
10173 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10174
873c0814
SM
101752017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10176
10177 * record-full.c (netorder16): Remove.
10178
8b5a7a6e
SM
101792017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10180
10181 * common/diagnostics.h: Define macros for GCC.
10182 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10183 * common/vec.h: Include diagnostics.h.
10184 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10185 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10186 warning.
10187
d1435379
SM
101882017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10189
10190 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10191 New macro.
10192 * ada-lex.l: Ignore deprecated register warnings.
10193
cc75e0fd
SM
101942017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10195
10196 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10197 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10198
07809eaf
SM
101992017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10200
10201 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10202 its own line.
10203
f076f034
SM
102042017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10205
10206 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10207
0dd5cbc5
AH
102082017-06-23 Alan Hayward <alan.hayward@arm.com>
10209
10210 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10211 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10212 (xtensa_register_read_masked): Likewise.
10213
d4c6ce5b
SDJ
102142017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10215
10216 * common/environ.c (gdb_environ::unset): Update comment.
10217
16892a03
AH
102182017-06-22 Alan Hayward <alan.hayward@arm.com>
10219
10220 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10221 registers.
10222
d7dcbefc
AH
102232017-06-22 Alan Hayward <alan.hayward@arm.com>
10224
10225 * record-full.c (record_full_exec_insn): Use byte_vector.
10226
b30ff123
YQ
102272017-06-22 Yao Qi <yao.qi@linaro.org>
10228
10229 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10230 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10231
4fa847d7
AH
102322017-06-22 Alan Hayward <alan.hayward@arm.com>
10233
10234 * remote.c (cached_reg): Move from here...
10235 * regcache.h (cached_reg): ...to here.
10236 * python/py-unwind.c (struct reg_info): Remove.
10237 (cached_frame_info): Use cached_reg_t.
10238 (pyuw_prev_register): Likewise.
10239 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10240 (pyuw_dealloc_cache): Free all registers.
10241
f4906a9a
PA
102422017-06-22 Pedro Alves <palves@redhat.com>
10243 Simon Marchi <simon.marchi@ericsson.com>
10244
10245 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10246 warning.
10247 * common/diagnostics.h: New file.
10248
b45a1208
PA
102492017-06-22 Pedro Alves <palves@redhat.com>
10250
10251 * common/agent.h: Add include guards.
10252
e4da2c61
SM
102532017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10254
10255 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10256 talk about addressable units instead of bytes.
10257
96160d60
SDJ
102582017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10259
10260 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10261 of '::const_iterator'.
10262
9a6c7d9c
SDJ
102632017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10264
10265 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10266 'unittests/environ-selftests.c'.
10267 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10268 * charset.c (find_charset_names): Declare object 'iconv_env'.
10269 Update code to use 'iconv_env' object. Remove call to
10270 'free_environ'.
10271 * common/environ.c: Include <utility>.
10272 (make_environ): Delete function.
10273 (free_environ): Delete function.
10274 (gdb_environ::clear): New function.
10275 (gdb_environ::operator=): New function.
10276 (gdb_environ::get): Likewise.
10277 (environ_vector): Delete function.
10278 (set_in_environ): Delete function.
10279 (gdb_environ::set): New function.
10280 (unset_in_environ): Delete function.
10281 (gdb_environ::unset): New function.
10282 (gdb_environ::envp): Likewise.
10283 * common/environ.h: Include <vector>.
10284 (struct gdb_environ): Delete; transform into...
10285 (class gdb_environ): ... this class.
10286 (free_environ): Delete prototype.
10287 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10288 environ_vector): Likewise.
10289 * infcmd.c (run_command_1): Update code to call
10290 'envp' from 'gdb_environ' class.
10291 (environment_info): Update code to call methods from 'gdb_environ'
10292 class.
10293 (unset_environment_command): Likewise.
10294 (path_info): Likewise.
10295 (path_command): Likewise.
10296 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10297 (inferior::inferior): Initialize 'environment' using the host's
10298 information.
10299 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10300 Include "environ.h".
10301 (class inferior) <environment>: Change type from 'struct
10302 gdb_environ' to 'gdb_environ'.
10303 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10304 methods from 'gdb_environ' class.
10305 * solib.c (solib_find_1): Likewise
10306 * unittests/environ-selftests.c: New file.
10307
75c554cf
YQ
103082017-06-20 Yao Qi <yao.qi@linaro.org>
10309
10310 * features/i386/i386-linux.xml: Exchange the order of including
10311 32bit-linux.xml and 32bit-sse.xml.
10312 * features/i386/i386-linux.c: Regenerated.
10313
72ddacb7
YQ
103142017-06-20 Yao Qi <yao.qi@linaro.org>
10315
10316 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10317 Delete copy ctor and assignment operator.
10318 (tdesc_type): Likewise.
10319 (tdesc_feature): Likewise.
10320 (tdesc_free_reg): Remove.
10321 (tdesc_create_reg): Use new.
10322 (tdesc_free_type): Remove.
10323 (tdesc_create_vector): Use new.
10324 (tdesc_create_union): Likewise.
10325 (tdesc_create_flags): Likewise.
10326 (tdesc_create_enum): Likewise.
10327 (tdesc_free_feature): Delete.
10328 (free_target_description): Use delete.
10329
325c9fd4
JB
103302017-06-19 John Baldwin <jhb@FreeBSD.org>
10331
10332 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10333 registers.
10334
16b7a719
PA
103352017-06-19 Pedro Alves <palves@redhat.com>
10336
10337 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10338 after gdb::unlinker.
10339
1c8e01c9
SDJ
103402017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10341
10342 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10343 gdb_environ to access an environment variable.
10344
ffce45d2
TP
103452017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10346
10347 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10348 gdb_byte*.
10349
1d4fbac9
SM
103502017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10351
10352 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10353
8465943a
SM
103542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10355
10356 * configure: Re-generate.
10357 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10358
3e019bdc
SM
103592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10360
10361 * configure: Re-generate.
10362 * warning.m4: Pass -Werror to compiler when checking for
10363 supported warning flags.
10364
cf0dd6f0
SM
103652017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10366
10367 * Makefile.in (COMPILE.pre): Add "-x c++".
10368
6f98355c
YQ
103692017-06-16 Alan Hayward <alan.hayward@arm.com>
10370 Pedro Alves <palves@redhat.com>
10371 Yao Qi <yao.qi@linaro.org>
10372
10373 * defs.h (RequireLongest): New.
10374 (extract_integer): Declare function template.
10375 (extract_signed_integer): Remove the declaration, but define it
10376 static inline.
10377 (extract_unsigned_integer): Likewise.
10378 (store_integer): Declare function template.
10379 (store_signed_integer): Remove the declaration, but define it
10380 static inline.
10381 (store_unsigned_integer): Likewise.
10382 * findvar.c (extract_integer): New function template.
10383 (extract_signed_integer): Remove.
10384 (extract_unsigned_integer): Remove.
10385 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10386 instantiations.
10387 (store_integer): New function template.
10388 (store_signed_integer): Remove.
10389 (store_unsigned_integer): Remove.
10390 (store_integer): Explicit instantiations.
10391 * regcache.c (regcache_raw_read_signed): Update.
10392 (regcache::raw_read): New function.
10393 (regcache::raw_read_signed): Remove.
10394 (regcache::raw_read_unsigned): Remove.
10395 (regcache_raw_read_unsigned): Update.
10396 (regcache_raw_write_unsigned): Update.
10397 (regcache::raw_write_signed): Remove.
10398 (regcache::raw_write): New function.
10399 (regcache_cooked_read_signed): Update.
10400 (regcache::raw_write_unsigned): Remove.
10401 (regcache::cooked_read_signed): Remove.
10402 (regcache_cooked_read_unsigned): Update.
10403 (regcache::cooked_read_unsigned): Remove.
10404 (regcache_cooked_write_signed): Update.
10405 (regcache_cooked_write_unsigned): Update.
10406 * regcache.h (regcache) <raw_read_signed>: Remove.
10407 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10408 <raw_read, raw_write>: New.
10409 <cooked_read_signed, cooked_write_signed>: Remove.
10410 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10411 <cooked_read, cooked_write>: New.
10412 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10413 (sh64_pseudo_register_write): Update.
10414
a87dc45a
AK
104152017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10416
10417 * arc-tdep.c (arc_disassembler_options): New variable.
10418 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10419 of default_print_insn.
10420 (arc_delayed_print_insn): Set info->section when needed,
10421 use default_print_insn to retrieve a disassembler.
10422
45159d6a
SDJ
104232017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10424
10425 PR gdb/21574
10426 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10427 to mention $SHELL and startup-with-shell.
10428
b46c4cf0
MF
104292017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10430
10431 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10432
6394c606
YQ
104332017-06-14 Yao Qi <yao.qi@linaro.org>
10434
10435 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10436 default_print_insn instead of print_insn_aarch64.
10437 * arm-tdep.c (gdb_print_insn_arm): Call
10438 default_print_insn instead of print_insn_big_arm
10439 and print_insn_little_arm.
10440 * i386-tdep.c (i386_print_insn): Call default_print_insn
10441 instead of print_insn_i386.
10442 * ia64-tdep.c (ia64_print_insn): Call
10443 default_print_insn instead of print_insn_ia64.
10444 * mips-tdep.c (gdb_print_insn_mips): Call
10445 default_print_insn instead of print_insn_big_mips
10446 and print_insn_little_mips.
10447 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10448 instead of print_insn_spu.
10449
d5722aa2
PA
104502017-06-14 Pedro Alves <palves@redhat.com>
10451
10452 * ada-lang.c: Include "common/byte-vector.h".
10453 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10454 * charset.c (wchar_iterator::iterate): Resize the vector instead
10455 of reserving it.
10456 * common/byte-vector.h: Include "common/def-vector.h".
10457 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10458 * cli/cli-dump.c: Include "common/byte-vector.h".
10459 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10460 * common/byte-vector.h: New file.
10461 * common/def-vector.h: New file.
10462 * common/default-init-alloc.h: New file.
10463 * dwarf2loc.c: Include "common/byte-vector.h".
10464 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10465 instead of reserving it.
10466 * dwarf2read.c: Include "common/byte-vector.h".
10467 (data_buf::m_vec): Now a gdb::byte_vector.
10468 * gdb_regex.c: Include "common/def-vector.h".
10469 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10470 * mi/mi-main.c: Include "common/byte-vector.h".
10471 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10472 * printcmd.c: Include "common/byte-vector.h".
10473 (print_scalar_formatted): Use gdb::byte_vector.
10474 * valprint.c: Include "common/byte-vector.h".
10475 (maybe_negate_by_bytes, print_decimal_chars): Use
10476 gdb::byte_vector.
10477
01ec7a27
SM
104782017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10479
10480 * darwin-nat.c: Include "nat/fork-inferior.h".
10481
848d9074
SM
104822017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10483
10484 * configure.nat: Factor out Darwin bits that are not
10485 architecture-specific. Add fork-inferior.o.
10486
3b912944
SM
104872017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10488
10489 * configure.nat: Factor out AIX bits that are not
10490 architecture-specific. Add fork-inferior.o.
10491
55acdf22
AA
104922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10493
10494 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10495 (read_pieced_value, write_pieced_value): ...here. Reduce to
10496 wrappers that just call rw_pieced_value.
10497
f65e2044
AA
104982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10499
10500 * dwarf2loc.c (write_pieced_value): When writing the data for a
10501 memory piece, use write_memory_with_notification instead of
10502 write_memory.
10503
23f945bf
AA
105042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10505
10506 * valops.c (read_value_memory): Change embedded_offset to
10507 represent a bit offset instead of a byte offset.
10508 * value.h (read_value_memory): Adjust comment.
10509
f236533e
AA
105102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10511
10512 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10513 dest_offset_bits and source_offset_bits.
10514 (write_pieced_value): Likewise.
10515
65d84b76
AA
105162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10517
10518 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10519 given by DW_OP_bit_piece.
10520 (write_pieced_value): Likewise.
10521
242d31ab
AA
105222017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10523
10524 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10525 some other preparations to the places where sufficient information
10526 is available.
10527 (write_pieced_value): Likewise.
10528
03c8af18
AA
105292017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10530
10531 * dwarf2loc.c (bits_to_bytes): New function.
10532 (read_pieced_value): Fix offset calculations for register pieces
10533 on big-endian targets.
10534 (write_pieced_value): Likewise.
10535
840989c1
AA
105362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10537
10538 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10539 (write_pieced_value): Likewise.
10540
359b19bb
AA
105412017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10542
10543 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10544 transfer the source value's least significant bits, instead of its
10545 lowest-addressed ones. Rename type_len to max_offset.
10546 (read_pieced_value): Mirror above changes to write_pieced_value as
10547 applicable.
10548
07c9ca3b
AA
105492017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10550
10551 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10552 truncate full bytes from dest_offset_bits before using it as an
10553 offset into the buffer.
10554
f1cc9874
AA
105552017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10556
10557 * dwarf2loc.c (write_pieced_value): Include transfer size in
10558 byte-wise check.
10559
cdaac320
AA
105602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10561
10562 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10563 calculation of this_size.
10564
af547a96
AA
105652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10566
10567 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10568 when targeting a bit-field.
10569 (write_pieced_value): Likewise.
10570
ddd7882a
AA
105712017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10572
10573 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10574 (allocate_piece_closure): Drop addr_size parameter.
10575 (dwarf2_evaluate_loc_desc_full): Adjust call to
10576 allocate_piece_closure.
10577
e9352324
AA
105782017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10579
10580 PR gdb/21226
10581 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10582 the LSB end, independent of endianness.
10583
d5d1163e
AA
105842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10585
10586 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10587 size capping.
10588
032bb6ea
YQ
105892017-06-13 Yao Qi <yao.qi@linaro.org>
10590
10591 * mips-linux-nat.c: Move include features/mips*-linux.c to
10592 mips-linux-tdep.c.
10593 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10594 to mips-linux-tdep.c.
10595 * mips-linux-tdep.c: Include features/mips*-linux.c
10596 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10597 functions.
10598 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10599 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10600 (tdesc_mips64_dsp_linux): Declare.
10601
f12f6bad
TT
106022017-06-12 Tom Tromey <tom@tromey.com>
10603
10604 * valprint.h (val_print_type_code_int): Remove.
10605 * valprint.c (generic_val_print_int): Always call
10606 val_print_scalar_formatted.
10607 (val_print_type_code_int): Remove.
10608 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10609 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10610 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10611 * ada-valprint.c (ada_val_print_num): Use
10612 val_print_scalar_formatted.
10613
d9109c80
TT
106142017-06-12 Tom Tromey <tom@tromey.com>
10615
10616 * printcmd.c (print_scalar_formatted): Unify the two switches.
10617 Don't convert scalars to LONGEST.
10618
4ac0cb1c
TT
106192017-06-12 Tom Tromey <tom@tromey.com>
10620
10621 PR exp/16225:
10622 * valprint.h (print_decimal_chars): Update.
10623 * valprint.c (maybe_negate_by_bytes): New function.
10624 (print_decimal_chars): Add "is_signed" argument.
10625 * printcmd.c (print_scalar_formatted): Update.
10626
30a25466
TT
106272017-06-12 Tom Tromey <tom@tromey.com>
10628
10629 PR exp/16225:
10630 * valprint.h (print_binary_chars, print_hex_chars): Update.
10631 * valprint.c (val_print_type_code_int): Update.
10632 (print_binary_chars): Add "zero_pad" argument.
10633 (emit_octal_digit): New function.
10634 (print_octal_chars): Don't zero-pad.
10635 (print_decimal_chars): Likewise.
10636 (print_hex_chars): Add "zero_pad" argument.
10637 * sh64-tdep.c (sh64_do_fp_register): Update.
10638 * regcache.c (regcache::dump): Update.
10639 * printcmd.c (print_scalar_formatted): Update.
10640 * infcmd.c (default_print_one_register_info): Update.
10641
b3464d03
PA
106422017-06-12 Pedro Alves <palves@redhat.com>
10643 Alan Hayward <alan.hayward@arm.com>
10644
10645 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10646 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10647 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10648 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10649 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10650
4b76cda9
PA
106512017-06-12 Pedro Alves <palves@redhat.com>
10652
10653 * dwarf2read.c (mapped_symtab::data): Now a vector of
10654 symtab_index_entry instead of vector of
10655 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10656 whether an element's name is NULL instead of checking whether the
10657 element itself is NULL.
10658 (find_slot): Change return type. Adjust.
10659 (hash_expand, , add_index_entry, uniquify_cu_indices)
10660 (write_hash_table): Adjust.
10661
e8f8bcb3
PA
106622017-06-12 Pedro Alves <palves@redhat.com>
10663
10664 * dwarf2read.c (recursively_count_psymbols): New function.
10665 (write_psymtabs_to_index): Call it to compute number of psyms and
10666 pass estimate size of psyms_seen to unordered_set's ctor.
10667
70a1152b
PA
106682017-06-12 Pedro Alves <palves@redhat.com>
10669
10670 * dwarf2read.c (write_hash_table): Check if key already exists
10671 before emplacing.
10672
c2f134ac
PA
106732017-06-12 Pedro Alves <palves@redhat.com>
10674
10675 * dwarf2read.c (data_buf::append_space): Rename to...
10676 (data_buf::grow): ... this, and make private. Adjust all callers.
10677 (data_buf::append_uint): New method.
10678 (add_address_entry, write_one_signatured_type)
10679 (write_psymtabs_to_index): Use it.
10680
a81e6d4d
PA
106812017-06-12 Pedro Alves <palves@redhat.com>
10682
10683 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10684 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10685 (data_buf::file_write): Call ::fwrite directly.
10686
6fd931f2
PA
106872017-06-12 Pedro Alves <palves@redhat.com>
10688
10689 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10690 std::vector::erase.
10691
bc8f2430
JK
106922017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10693
10694 Code cleanup: C++ify .gdb_index producer.
10695 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10696 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10697 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10698 (create_strtab, add_string): Remove.
10699 (file_write, data_buf): New.
10700 (struct symtab_index_entry): Use std::vector for cu_indices.
10701 (struct mapped_symtab): Use std::vector for data.
10702 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10703 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10704 Remove.
10705 (find_slot): Change return type. Update it to the new data structures.
10706 (hash_expand, add_index_entry): Update it to the new data structures.
10707 (offset_type_compare): Remove.
10708 (uniquify_cu_indices): Update it to the new data structures.
10709 (c_str_view, c_str_view_hasher, vector_hasher): New.
10710 (add_indices_to_cpool): Remove.
10711 (write_hash_table): Update it to the new data structures.
10712 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10713 (eq_psymtab_cu_index): Remove.
10714 (psym_index_map): New typedef.
10715 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10716 reference and std::unordered_map for cu_index_htab.
10717 (add_address_entry, add_address_entry_worker, write_address_map)
10718 (write_psymbols): Update it to the new data structures.
10719 (write_obstack): Remove.
10720 (struct signatured_type_index_data): Change types_list to a data_buf
10721 reference and psyms_seen to a std::unordered_set reference.
10722 (write_one_signatured_type, recursively_write_psymbols)
10723 (write_psymtabs_to_index): Update it to the new data structures.
10724
c4dcb155
SM
107252017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10726
10727 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10728 separate-debug-file commands.
10729 * symfile.h (separate_debug_file_debug): New global.
10730 * symfile.c (separate_debug_file_debug): New global.
10731 (separate_debug_file_exists, find_separate_debug_file): Add
10732 debug output.
10733 (_initialize_symfile): Add "set debug separate-debug-file"
10734 command.
10735 * build-id.c (build_id_to_debug_bfd,
10736 find_separate_debug_file_by_buildid): Add debug output.
10737
6d45d4b4
SM
107382017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10739
10740 * gdbarch.sh (displaced_step_free_closure): Remove.
10741 * gdbarch.h, gdbarch.c: Re-generate.
10742 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10743 displaced_step_free_closure.
10744 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10745 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10746 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10747 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10748 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10749 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10750 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10751 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10752 * infrun.c (displaced_step_clear): Call xfree instead of
10753 gdbarch_displaced_step_free_closure.
10754
2f91880f
SDJ
107552017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10756
10757 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10758 NULL".
10759
b8b6e72f
AH
107602017-06-08 Alan Hayward <alan.hayward@arm.com>
10761
10762 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10763 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10764 (mn10300_push_dummy_call): Likewise.
10765
5369082e
AH
107662017-06-08 Alan Hayward <alan.hayward@arm.com>
10767
10768 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10769
ff4ca5ac
AH
107702017-06-08 Alan Hayward <alan.hayward@arm.com>
10771
10772 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10773
aefd8b33
SDJ
107742017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10775
10776 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10777 able to start inferiors using a shell.
10778 (New remote packets): Announce new packet "QStartupWithShell".
10779 * remote.c: Add PACKET_QStartupWithShell.
10780 (extended_remote_create_inferior): Handle new
10781 PACKET_QStartupWithShell.
10782 (remote_protocol_features) <QStartupWithShell>: New entry for
10783 PACKET_QStartupWithShell.
10784 (_initialize_remote): Call "add_packet_config_cmd" for
10785 QStartupShell.
10786
2090129c
SDJ
107872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10788 Pedro Alves <palves@redhat.com>
10789
10790 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10791 and "nat/fork-inferior.h".
10792 * common/common-inferior.h: New file, with contents from
10793 "gdb/inferior.h".
10794 * commom/common-utils.c: Include "common-utils.h".
10795 (stringify_argv): New function.
10796 * common/common-utils.h (stringify_argv): New prototype.
10797 * configure.nat: Add "fork-inferior.o" as a dependency for
10798 "*linux*", "fbsd*" and "nbsd*" hosts.
10799 * corefile.c (get_exec_file): Update comment.
10800 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10801 instead of "startup_inferior".
10802 (darwin_create_inferior): Call "add_thread_silent" after
10803 "fork_inferior".
10804 * fork-child.c: Cleanup unnecessary includes.
10805 (SHELL_FILE): Move to "common/common-fork-child.c".
10806 (environ): Likewise.
10807 (exec_wrapper): Initialize.
10808 (get_exec_wrapper): New function.
10809 (breakup_args): Move to "common/common-fork-child.c"; rename to
10810 "breakup_args_for_exec".
10811 (escape_bang_in_quoted_argument): Move to
10812 "common/common-fork-child.c".
10813 (saved_ui): New variable.
10814 (prefork_hook): New function.
10815 (postfork_hook): Likewise.
10816 (postfork_child_hook): Likewise.
10817 (gdb_startup_inferior): Likewise.
10818 (fork_inferior): Move to "common/common-fork-child.c". Update
10819 function to support gdbserver.
10820 (startup_inferior): Likewise.
10821 * gdbcore.h (get_exec_file): Remove declaration.
10822 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10823 instead of "startup_inferior". Call "add_thread_silent" after
10824 "fork_inferior".
10825 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10826 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10827 instead of "startup_inferior". Call "add_thread_silent" after
10828 "fork_inferior".
10829 * inferior.h: Include "common-inferior.h".
10830 (trace_start_error): Move to "common/common-utils.h".
10831 (trace_start_error_with_name): Likewise.
10832 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10833 (startup_inferior): Likewise.
10834 (gdb_startup_inferior): New prototype.
10835 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10836 * nat/fork-inferior.h: New file.
10837 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10838 instead of "startup_inferior". Call "add_thread_silent" after
10839 "fork_inferior".
10840 * target.h (target_terminal_init): Move prototype to
10841 "target/target.h".
10842 (target_terminal_inferior): Likewise.
10843 (target_terminal_ours): Likewise.
10844 * target/target.h (target_terminal_init): New prototype, moved
10845 from "target.h".
10846 (target_terminal_inferior): Likewise.
10847 (target_terminal_ours): Likewise.
10848 * utils.c (gdb_flush_out_err): New function.
10849
043a4934
SDJ
108502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10851
10852 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10853 * common/common-gdbthread.h: New file, with parts from
10854 "gdb/gdbthread.h".
10855 * gdbthread.h: Include "common-gdbthread.h".
10856 (switch_to_thread): Moved to "common/common-gdbthread.h".
10857
15652511
SDJ
108582017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10859
10860 * Makefile.in (SFILES): Add "common/job-control.c".
10861 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10862 (COMMON_OBS): Add "job-control.o".
10863 * common/job-control.c: New file, with contents from
10864 "gdb/inflow.c".
10865 * common/job-control.h: New file, with contents from "terminal.h".
10866 * fork-child.c: Include "job-control.h".
10867 * inflow.c: Include "job-control.h".
10868 (gdb_setpgid): Move to "common/common-inflow.c".
10869 (_initialize_inflow): Move setting of "job_control" to
10870 "handle_job_control".
10871 * terminal.h (job_control): Moved to "common/common-terminal.h".
10872 (gdb_setpgid): Likewise.
10873 * top.c: Include "job_control.h".
10874 * utils.c: Likewise.
10875 (job_control): Moved to "job-control.c".
10876
2d7cc5c7
PA
108772017-06-07 Pedro Alves <palves@redhat.com>
10878
10879 * Makefile.in (SFILES): Add gdb_regex.c.
10880 (COMMON_OBS): Add gdb_regex.o.
10881 * ada-lang.c (ada_add_standard_exceptions)
10882 (ada_add_exceptions_from_frame, name_matches_regex)
10883 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10884 parameter type to compiled_regex. Adjust.
10885 (ada_exceptions_list): Use compiled_regex.
10886 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10887 std::unique_ptr<compiled_regex>.
10888 (exception_catchpoint::~exception_catchpoint): Remove regfree
10889 call.
10890 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10891 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10892 * breakpoint.c (solib_catchpoint::compiled): Now a
10893 std::unique_ptr<compiled_regex>.
10894 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10895 (check_status_catch_solib): Adjust to use compiled_regex.
10896 (add_solib_catchpoint): Adjust to use compiled_regex.
10897 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10898 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10899 compiled_regex reference. Adjust to use it.
10900 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10901 declaration. Include "gdb_regex.h".
10902 (apropos_cmd): Change regex parameter to compiled_regex reference.
10903 * gdb_regex.c: New file.
10904 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10905 declarations.
10906 (class compiled_regex): New.
10907 * linux-tdep.c: Include "common/gdb_optional.h".
10908 (struct mapping_regexes): New, factored out from
10909 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10910 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10911 gdb::optional and remove cleanups. Adjust to compiled_regex.
10912 * probe.c: Include "common/gdb_optional.h".
10913 (collect_probes): Use compiled_regex and gdb::optional and remove
10914 cleanups.
10915 * skip.c: Include "common/gdb_optional.h".
10916 (skiplist_entry::compiled_function_regexp): Now a
10917 gdb::optional<compiled_regex>.
10918 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10919 (free_skiplist_entry): Remove regfree call.
10920 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10921 compiled_regex and gdb::optional.
10922 * symtab.c: Include "common/gdb_optional.h".
10923 (search_symbols): Use compiled_regex and gdb::optional.
10924 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10925 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10926 to gdb_regex.c.
10927
50d6adef
AH
109282017-06-07 Alan Hayward <alan.hayward@arm.com>
10929
10930 * regcache.c (regcache::save): Avoid buffer use.
10931 (regcache::dump): Likewise.
10932
4a8a33c8
AH
109332017-06-07 Alan Hayward <alan.hayward@arm.com>
10934
10935 * sh-tdep.c (sh_pseudo_register_read): Remove
10936 MAX_REGISTER_SIZE.
10937 (sh_pseudo_register_write): Likewise.
10938 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10939 (sh64_pseudo_register_write): Likewise
10940
d1be909e
AH
109412017-06-07 Alan Hayward <alan.hayward@arm.com>
10942
10943 * aarch64-tdep.c (aarch64_store_return_value): Use
10944 V_REGISTER_SIZE.
10945 (aarch64_pseudo_read_value): Likewise.
10946 (aarch64_pseudo_write): Likewise.
10947
f4a65042
YQ
109482017-06-06 Yao Qi <yao.qi@linaro.org>
10949
10950 * regformats/regdef.h (set_register_cache): Remove the
10951 declaration.
10952
9f7fb0aa
AH
109532017-06-06 Alan Hayward <alan.hayward@arm.com>
10954
10955 * frame.c (frame_unwind_register_signed): Use
10956 frame_unwind_register_value.
10957
e1e01040
PA
109582017-06-06 Pedro Alves <palves@redhat.com>
10959
10960 PR breakpoints/21553
10961 * breakpoint.c (create_breakpoints_sal_default)
10962 (init_breakpoint_sal, create_breakpoint_sal): Use
10963 gdb::unique_xmalloc_ptr for string parameters.
10964 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10965 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10966 (base_breakpoint_create_breakpoints_sal)
10967 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10968 (strace_marker_create_breakpoints_sal)
10969 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10970 string parameters.
10971 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10972 gdb::unique_xmalloc_ptr for string parameters.
10973 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10974 parameters.
10975
fbe654c8
AH
109762017-06-06 Alan Hayward <alan.hayward@arm.com>
10977
10978 * alpha-tdep.c (alpha_register_to_value): Use
10979 get_frame_register_value.
10980 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10981
ae0d01d6
AH
109822017-06-06 Alan Hayward <alan.hayward@arm.com>
10983
10984 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10985 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10986 (ia64_value_to_register): Likewise.
10987 (ia64_extract_return_value): Likewise.
10988 (ia64_store_return_value): Likewise.
10989 (ia64_push_dummy_call): Likewise.
10990
49cf576c
JB
109912017-06-04 Joel Brobecker <brobecker@adacore.com>
10992
10993 GDB 8.0 released.
10994
26b6a6ab
SM
109952017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10996
10997 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10998
22827c51
SM
109992017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11000
11001 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11002 parameter.
11003 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11004
0e05cf3a
SM
110052017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11006
11007 * event-loop.c (poll_timers): Unallocate timer using delete
11008 instead of xfree.
11009
c1fc2657
SM
110102017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11011
11012 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11013 (struct breakpoint) <~breakpoint>: New.
11014 (struct watchpoint): Inherit from breakpoint.
11015 <~watchpoint>: New.
11016 <base>: Remove.
11017 (struct tracepoint): Inherit from breakpoint.
11018 <base>: Remove.
11019 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11020 (struct longjmp_breakpoint): Inherit from breakpoint.
11021 <~longjmp_breakpoint>: New.
11022 <base>: Remove.
11023 (new_breakpoint_from_type): Remove casts.
11024 (watchpoint_in_thread_scope): Remove reference to base field.
11025 (watchpoint_del_at_next_stop): Likewise.
11026 (update_watchpoint): Likewise.
11027 (watchpoint_check): Likewise.
11028 (bpstat_check_watchpoint): Likewise.
11029 (set_longjmp_breakpoint): Likewise.
11030 (struct fork_catchpoint): Inherit from breakpoint.
11031 <base>: Remove.
11032 (struct solib_catchpoint): Inherit from breakpoint.
11033 <~solib_catchpoint>: New.
11034 <base>: Remove.
11035 (dtor_catch_solib): Change to ...
11036 (solib_catchpoint::~solib_catchpoint): ... this.
11037 (breakpoint_hit_catch_solib): Remove reference to base field.
11038 (add_solib_catchpoint): Likewise.
11039 (create_fork_vfork_event_catchpoint): Likewise.
11040 (struct exec_catchpoint): Inherit from breakpoint.
11041 <~exec_catchpoint>: New.
11042 <base>: Remove.
11043 (dtor_catch_exec): Change to ...
11044 (exec_catchpoint::~exec_catchpoint): ... this.
11045 (dtor_watchpoint): Change to ...
11046 (watchpoint::~watchpoint): ... this.
11047 (watch_command_1): Remove reference to base field.
11048 (catch_exec_command_1): Likewise.
11049 (base_breakpoint_dtor): Change to ...
11050 (breakpoint::~breakpoint): ... this.
11051 (base_breakpoint_ops): Remove dtor field value.
11052 (longjmp_bkpt_dtor): Change to ...
11053 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11054 (strace_marker_create_breakpoints_sal): Remove reference to base
11055 field.
11056 (delete_breakpoint): Don't manually call breakpoint destructor.
11057 (create_tracepoint_from_upload): Remove reference to base field.
11058 (trace_pass_set_count): Likewise.
11059 (initialize_breakpoint_ops): Don't initialize
11060 momentary_breakpoint_ops, don't set dtors.
11061 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11062 <~ada_catchpoint>: New.
11063 <base>: Remove.
11064 (create_excep_cond_exprs): Remove reference to base field.
11065 (dtor_exception): Change to ...
11066 (ada_catchpoint::~ada_catchpoint): ... this.
11067 (dtor_catch_exception): Remove.
11068 (dtor_catch_exception_unhandled): Remove.
11069 (dtor_catch_assert): Remove.
11070 (create_ada_exception_catchpoint): Remove reference to base
11071 field.
11072 (initialize_ada_catchpoint_ops): Don't set dtors.
11073 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11074 breakpoint.
11075 <~signal_catchpoint>: New.
11076 <base>: Remove.
11077 (signal_catchpoint_dtor): Change to ...
11078 (signal_catchpoint::~signal_catchpoint): ... this.
11079 (create_signal_catchpoint): Remove reference to base field.
11080 (initialize_signal_catchpoint_ops): Don't set dtor.
11081 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11082 from breakpoint.
11083 <~syscall_catchpoint>: New.
11084 <base>: Remove.
11085 (dtor_catch_syscall): Change to ...
11086 (syscall_catchpoint::~syscall_catchpoint): ... this.
11087 (create_syscall_event_catchpoint): Remove reference to base
11088 field.
11089 (initialize_syscall_catchpoint_ops): Don't set dtor.
11090 * break-catch-throw.c (struct exception_catchpoint): Inherit
11091 from breakpoint.
11092 <~exception_catchpoint>: New.
11093 <base>: Remove.
11094 (dtor_exception_catchpoint): Change to ...
11095 (exception_catchpoint::~exception_catchpoint): ... this.
11096 (handle_gnu_v3_exceptions): Remove reference to base field.
11097 (initialize_throw_catchpoint_ops): Don't set dtor.
11098 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11099 field.
11100 * remote.c (remote_get_tracepoint_status): Likewise.
11101 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11102 * tracefile.c (tracefile_fetch_registers): Likewise.
11103 * tracepoint.c (actions_command): Likewise.
11104 (validate_actionline): Likewise.
11105 (tfind_1): Likewise.
11106 (get_traceframe_location): Likewise.
11107 (find_matching_tracepoint_location): Likewise.
11108 (parse_tracepoint_status): Likewise.
11109 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11110
3b0871f4
SM
111112017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11112
11113 * breakpoint.c (struct longjmp_breakpoint): New struct.
11114 (is_tracepoint_type): Change return type to bool.
11115 (is_longjmp_type): New function.
11116 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11117 (set_raw_breakpoint_without_location): Use
11118 new_breakpoint_from_type.
11119 (set_raw_breakpoint): Likewise.
11120
a5e364af
SM
111212017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11122
11123 * breakpoint.c (new_breakpoint_from_type): New function.
11124 (create_breakpoint_sal): Use new_breakpoint_from_type and
11125 unique_ptr.
11126 (create_breakpoint): Likewise.
11127
ae3b3f34
SM
111282017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11129
11130 * memattr.c (mem_info_command): Rename to ...
11131 (info_mem_command): ... this.
11132 (mem_enable_command): Rename to ...
11133 (enable_mem_command): ... this.
11134 (mem_disable_command): Rename to ...
11135 (disable_mem_command): ... this.
11136 (mem_delete_command): Rename to ...
11137 (delete_mem_command): ... this.
11138 (_initialize_mem): Adjust function names.
11139
13ace077
MM
111402017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11141
11142 * btrace.c (handle_pt_insn_events): New.
11143 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11144 STATUS. Split into this and ...
11145 (handle_pt_insn_event_flags): ... this.
11146
c56ccc05
MM
111472017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11148
11149 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11150 and struct pt_insn.resynced.
11151 * configure: Regenerated.
11152 * config.in: Regenerated.
11153
08c3f6d2
TW
111542017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11155
11156 * btrace.c (ftrace_find_call_by_number): New function.
11157 (ftrace_new_function): Store objects, not pointers.
11158 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11159 ftrace_new_gap, ftrace_update_function,
11160 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11161 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11162 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11163 btrace_ends_with_single_insn, btrace_call_get): Account for
11164 btrace_thread_info::functions now storing objects.
11165 * btrace.h (struct btrace_thread_info): Add constructor.
11166 (struct btrace_thread_info) <functions>: Make std::vector.
11167 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11168 Initialize with default values.
11169 * record-btrace.c (record_btrace_frame_sniffer): Account for
11170 btrace_thread_info::functions now storing objects.
11171
8ffd39f2
TW
111722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11173
11174 * btrace.c: Remove typedef bfun_s.
11175 (ftrace_new_gap): Directly add gaps to the list of gaps.
11176 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11177 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11178 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11179 instead of gdb VEC.
11180
4aeb0dfc
TW
111812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11182
11183 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11184 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11185 with btrace_thread_info::next_segment and
11186 btrace_thread_info::prev_segment.
11187 * btrace.h: Remove struct btrace_func_link.
11188 (struct btrace_function): Replace pair of function segment pointers
11189 with pair of indices.
11190 * python/py-record-btrace.c (btpy_call_prev_sibling,
11191 btpy_call_next_sibling): Replace references to
11192 btrace_thread_info::segment with btrace_thread_info::next_segment and
11193 btrace_thread_info::prev_segment.
11194 * record-btrace.c (record_btrace_frame_this_id): Use
11195 btrace_find_call_by_number.
11196
eb8f2b9c
TW
111972017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11198
11199 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11200 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11201 btrace_insn_next, btrace_insn_prev): Remove references to
11202 btrace_thread_info::flow.
11203 * btrace.h (struct btrace_function): Remove FLOW.
11204
42bfe59e
TW
112052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11206
11207 * btrace.c (ftrace_find_call_by_number): New function.
11208 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11209 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11210 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11211 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11212 index.
11213 * btrace.h (struct btrace_function): Turn UP into an index.
11214 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11215 as an index.
11216 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11217 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11218 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11219
b54b03bd
TW
112202017-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, ftrace_compute_global_level_offset,
11225 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11226 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11227 btrace_insn_end, btrace_is_empty): Remove references to
11228 btrace_thread_info::begin and btrace_thread_info::end.
11229 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11230 (struct btrace_thread_info) <functions>: Adjust comment.
11231 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11232 btrace_thread_info::begin.
11233
8286623c
TW
112342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11235
11236 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11237 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11238 ftrace_update_function): Remove arguments that implicitly were always
11239 BTINFO->END.
11240 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11241 Don't pass BTINFO->END.
11242
a0f1b963
TW
112432017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11244
11245 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11246 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11247 btrace_find_insn_by_number): Replace function segment pointer with
11248 index.
11249 (btrace_insn_cmp): Simplify.
11250 * btrace.h: (struct btrace_insn_iterator) Rename index to
11251 insn_index. Replace function segment pointer with index into function
11252 segment vector.
11253 * record-btrace.c (record_btrace_call_history): Replace function
11254 segment pointer use with index.
11255 (record_btrace_frame_sniffer): Retrieve function call segment through
11256 vector.
11257 (record_btrace_set_replay): Remove defunc't safety check.
11258
f158f208
TW
112592017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11260
11261 * btrace.c (btrace_ends_with_single_insn): New function.
11262 (btrace_call_get, btrace_call_number, btrace_call_begin,
11263 btrace_call_end, btrace_call_next, btrace_call_prev,
11264 btrace_find_call_by_number): Use index into call segment vector
11265 instead of pointer.
11266 (btrace_call_cmp): Simplify.
11267 * btrace.h (struct btrace_call_iterator): Replace function call segment
11268 pointer with index into vector.
11269 * record-btrace.c (record_btrace_call_history): Use index instead of
11270 pointer.
11271
521103fd
TW
112722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11273
11274 * btrace.c (btrace_insn_begin, btrace_insn_end,
11275 btrace_find_insn_by_number): Add btinfo to iterator.
11276 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11277
17b89b34
TW
112782017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11279
11280 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11281 and save pointers directly.
11282 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11283 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11284 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11285 changed signature of functions.
11286 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11287 (btrace_fetch): Remove code that adds btrace_function pointers to
11288 vector of btrace_functions.
11289 (btrace_clear): Simplify freeing vector of btrace_functions.
11290
2b51eddc
TW
112912017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11292
11293 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11294 Replace VEC_* with std::vector functions.
11295 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11296 (struct btrace_thread_info)<functions>: Change type to std::vector.
11297
db6be0d5
SM
112982017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11299
11300 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11301 "Removed targets and native configurations" up. Merge duplicate
11302 "New commands" sub-sections. Add "New options" sub-sections.
11303
b057297a
AH
113042017-05-26 Alan Hayward <alan.hayward@arm.com>
11305
11306 * defs.h (copy_integer_to_size): New declaration.
11307 * findvar.c (copy_integer_to_size): New function.
11308 (do_cint_test): New selftest function.
11309 (copy_integer_to_size_test): Likewise.
11310 (_initialize_findvar): Likewise.
11311 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11312 (mips_fbsd_collect_reg): Use raw_collect_integer.
11313 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11314 (mips64_fill_gregset): Use raw_collect_integer
11315 (mips64_fill_fpregset): Use raw_supply_integer.
11316 * regcache.c (regcache::raw_supply_integer): New function.
11317 (regcache::raw_collect_integer): Likewise.
11318 * regcache.h: (regcache::raw_supply_integer): New declaration.
11319 (regcache::raw_collect_integer): Likewise.
11320
b77b02a5
YQ
113212017-05-24 Yao Qi <yao.qi@linaro.org>
11322
11323 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11324 (COMMON_OBS): Add gdbarch-selftests.o.
11325 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11326 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11327 * gdbarch-selftests.c: New file.
11328 * regcache.h (regcache) <~regcache>: Mark it virtual if
11329 GDB_SELF_TEST.
11330 <raw_write>: Likewise.
11331
e521e87e
YQ
113322017-05-24 Yao Qi <yao.qi@linaro.org>
11333
11334 * regcache.c (current_regcache): Change it to
11335 regcache::current_regcache.
11336 (regcache_observer_target_changed): Update.
11337 (regcache_thread_ptid_changed): Make it a regcache static
11338 method.
11339 (regcache_thread_ptid_changed): Update.
11340 (class regcache_access): New.
11341 (current_regcache_test): Update.
11342 (_initialize_regcache): Update.
11343 * regcache.h: Include forward_list.
11344 (regcache): Declare regcache_thread_ptid_changed and declare
11345 registers_changed_ptid as friend.
11346
d8e07dda
YQ
113472017-05-24 Yao Qi <yao.qi@linaro.org>
11348
11349 * i387-tdep.c (i387_register_to_value): Use register_size
11350 instead of TYPE_LENGTH.
11351 * m68k-tdep.c (m68k_register_to_value): Likewise.
11352
8c8f9122
YQ
113532017-05-24 Yao Qi <yao.qi@linaro.org>
11354
11355 * i387-tdep.c (i387_convert_register_p): Return false if type
11356 code isn't TYPE_CODE_FLT.
11357
68fce50f
YQ
113582017-05-24 Yao Qi <yao.qi@linaro.org>
11359
11360 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11361 length is 4.
11362 (alpha_register_to_value): Remove type length check.
11363 (alpha_value_to_register): Likewise.
11364
88954b49
YQ
113652017-05-24 Yao Qi <yao.qi@linaro.org>
11366
11367 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11368 TYPE_CODE_FLT.
11369
e3ec9b69
YQ
113702017-05-24 Yao Qi <yao.qi@linaro.org>
11371
11372 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11373 TYPE_CODE_FLT or not.
11374
cdd238da
YQ
113752017-05-24 Yao Qi <yao.qi@linaro.org>
11376
11377 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11378 * avr-tdep.c (avr_gdbarch_init): Likewise.
11379 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11380 * cris-tdep.c (cris_gdbarch_init): Likewise.
11381 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11382 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11383 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11384 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11385 * mep-tdep.c (mep_gdbarch_init): Likewise.
11386 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11387 * mips-tdep.c (mips_gdbarch_init): Likewise.
11388 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11389 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11390 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11391 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11392 * v850-tdep.c (v850_gdbarch_init): Likewise.
11393
7a3929c4
YQ
113942017-05-24 Yao Qi <yao.qi@linaro.org>
11395
11396 * selftest-arch.c (tests_with_arch): Call registers_changed
11397 and reinit_frame_cache.
11398 * selftest.c (run_self_tests): Likewise.
11399
f4985dba
YQ
114002017-05-24 Yao Qi <yao.qi@linaro.org>
11401
11402 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11403 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11404
ab20fa4a
YQ
114052017-05-24 Yao Qi <yao.qi@linaro.org>
11406
11407 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11408 set_gdbarch_print_insn.
11409
f532ab94
YQ
114102017-05-24 Yao Qi <yao.qi@linaro.org>
11411
11412 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11413 set_gdbarch_print_insn.
11414
39503f82
YQ
114152017-05-24 Yao Qi <yao.qi@linaro.org>
11416
11417 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11418 set_gdbarch_print_insn.
11419 * arc-tdep.c (arc_gdbarch_init): Likewise.
11420 * arch-utils.c: include dis-asm.h.
11421 (default_print_insn): New function.
11422 * arch-utils.h (default_print_insn): Declare.
11423 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11424 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11425 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11426 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11427 * frv-tdep.c (frv_gdbarch_init): Likewise.
11428 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11429 * gdbarch.sh (print_insn): Use default_print_insn.
11430 * gdbarch.c: Regenerated.
11431 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11432 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11433 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11434 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11435 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11436 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11437 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11438 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11439 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11440 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11441 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11442 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11443 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11444 * mt-tdep.c (mt_gdbarch_init): Likewise.
11445 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11446 * nios2-tdep.c (nios2_print_insn): Remove.
11447 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11448 * rx-tdep.c (rx_gdbarch_init): Likewise.
11449 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11450 * score-tdep.c (score_print_insn): Remove.
11451 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11452 * sh-tdep.c (sh_gdbarch_init): Likewise.
11453 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11454 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11455 * tic6x-tdep.c (tic6x_print_insn): Remove.
11456 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11457 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11458 * v850-tdep.c (v850_gdbarch_init): Likewise.
11459 * vax-tdep.c (vax_gdbarch_init): Likewise.
11460 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11461 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11462
f7241d4f
JB
114632017-05-23 John Baldwin <jhb@FreeBSD.org>
11464
11465 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11466 (MIPS_FP0_REGNUM): Remove.
11467 (MIPS_FSR_REGNUM): Remove.
11468 (mips_fbsd_supply_fpregs): Use mips_regnum.
11469 (mips_fbsd_supply_gregs): Likewise.
11470 (mips_fbsd_collect_fpregs): Likewise.
11471 (mips_fbsd_collect_gregs): Likewise.
11472
d489d81d
JB
114732017-05-23 John Baldwin <jhb@FreeBSD.org>
11474
11475 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11476 (getpfpregs_supplies): New function.
11477 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11478 getfpregs_supplies.
11479 (mips_fbsd_store_inferior_registers): Likewise.
11480
e11b3cdc
PA
114812017-05-22 Pedro Alves <palves@redhat.com>
11482
11483 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11484 maintainer.
11485
0f068fb5
AH
114862017-05-22 Alan Hayward <alan.hayward@arm.com>
11487
11488 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11489 (store_register): Likewise.
11490 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11491 (get_decimal_float_return_value): Likewise.
11492 (do_ppc_sysv_return_value): Likewise.
11493 (ppc64_sysv_abi_push_integer): Likewise.
11494 (ppc64_sysv_abi_push_freg): Likewise.
11495 (ppc64_sysv_abi_return_value_base): Likewise.
11496 (ppc64_sysv_abi_return_value): Likewise.
11497 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11498 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11499 * rs6000-nat.c: Likewise.
11500 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11501 (rs6000_value_to_register): Likewise.
11502 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11503
e6cf65f2
TT
115042017-05-21 Tom Tromey <tom@tromey.com>
11505
11506 PR rust/21466:
11507 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11508 arrays as "[T]", not "[T; ]".
11509
43cc5389
TT
115102017-05-19 Tom Tromey <tom@tromey.com>
11511
11512 PR rust/21484:
11513 * rust-lang.c (exp_descriptor_rust): New function.
11514 (rust_language_defn): Use it.
11515 * p-lang.c (pascal_language_defn): Update.
11516 * opencl-lang.c (opencl_language_defn): Update.
11517 * objc-lang.c (objc_language_defn): Update.
11518 * m2-lang.c (m2_language_defn): Update.
11519 * language.h (struct language_defn)
11520 <la_watch_location_expression>: New member.
11521 * language.c (unknown_language_defn, auto_language_defn)
11522 (local_language_defn): Update.
11523 * go-lang.c (go_language_defn): Update.
11524 * f-lang.c (f_language_defn): Update.
11525 * d-lang.c (d_language_defn): Update.
11526 * c-lang.h (c_watch_location_expression): Declare.
11527 * c-lang.c (c_watch_location_expression): New function.
11528 (c_language_defn, cplus_language_defn, asm_language_defn)
11529 (minimal_language_defn): Use it.
11530 * breakpoint.c (watch_command_1): Call
11531 la_watch_location_expression.
11532 * ada-lang.c (ada_language_defn): Update.
11533
7a6e7fcc
RO
115342017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11535
6e7e1744
RO
11536 PR tui/21482
11537 * gdb_curses.h (NOMACROS): Define.
11538 (NCURSES_NOMACROS): Define.
11539
115402017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11541
11542 PR tui/21482
7a6e7fcc
RO
11543 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11544 arg to char *.
11545 * tui/tui-wingeneral.c (box_win): Likewise.
11546 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11547 (tui_show_source_line): Likewise.
11548 (tui_show_exec_info_content): Likewise.
11549
1933fd8e
VM
115502017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11551
11552 * sparc-tdep.c (sparc_structure_return_p)
11553 (sparc_arg_on_registers_p): New functions.
11554 (sparc32_store_arguments): Use them.
11555 * sparc64-tdep.c (sparc64_16_byte_align_p)
11556 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11557 Handle TYPE_CODE_ARRAY.
11558
21873064
YQ
115592017-05-17 Yao Qi <yao.qi@linaro.org>
11560
11561 * cli/cli-decode.c (add_alias_cmd): New function.
11562 * command.h (add_alias_cmd): Declare.
11563 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11564 instead call add_alias_cmd.
11565
2b351b19
PA
115662017-05-17 Pedro Alves <palves@redhat.com>
11567
11568 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11569 (nat_makefile_frag): ... this. All references updated.
11570 * configure.ac: Likewise.
11571 * configure.nat: Likewise. Enhance comments.
11572 * configure: Regenerate.
11573
5f2ad7a3
RO
115742017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11575
11576 * procfs.c (procfs_create_inferior): Change prototype to match
11577 definition.
11578
adf3dde5
EZ
115792017-05-13 Eli Zaretskii <eliz@gnu.org>
11580
11581 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11582 C++ compiler warning.
11583
6830f270
TT
115842017-05-12 Tom Tromey <tom@tromey.com>
11585
11586 PR rust/21483:
11587 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11588 recurse, just call value_struct_elt directly.
11589
68f2f2e3
TT
115902017-05-12 Tom Tromey <tom@tromey.com>
11591
11592 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11593 OP_RUST_ARRAY>: Fix.
11594
256afbc2
TT
115952017-05-12 Tom Tromey <tom@tromey.com>
11596
11597 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11598
94bb8dfe
YQ
115992017-05-09 Yao Qi <yao.qi@linaro.org>
11600
11601 * regcache.c: Include <forward_list>.
11602 (struct regcache_list): Remove.
11603 (current_regcache): Update.
11604 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11605 (regcache_thread_ptid_changed): Likewise.
11606 (registers_changed_ptid): Likewise.
11607 (current_regcache_size): Likewise.
11608
8248946c
YQ
116092017-05-09 Yao Qi <yao.qi@linaro.org>
11610
11611 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11612 (current_regcache_size): New function.
11613 (current_regcache_test): New function.
11614 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11615
313c5961
AH
116162017-05-08 Alan Hayward <alan.hayward@arm.com>
11617
11618 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11619 (print_gp_register_row): Use get_frame_register_value.
11620
27bfc1d1
AH
116212017-05-08 Alan Hayward <alan.hayward@arm.com>
11622
11623 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11624 (mips_supply_fpregset): Likewise.
11625 (mips64_supply_gregset): Likewise.
11626
146e6c5c
AH
116272017-05-08 Alan Hayward <alan.hayward@arm.com>
11628
11629 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11630 regcache->raw_supply_zeroed.
11631
e50f25ec
SDJ
116322017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11633
11634 * configure.nat: Rearrange 'case' statements to match
11635 host before cpu.
11636
21ea5acd
SDJ
116372017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11638
11639 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11640 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11641 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11642 "@nat_extra_makefile_frag@".
11643 (Makefile): Remove dependency on "@frags@".
11644 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11645 (data-directory/Makefile): Likewise.
11646 * config/aarch64/linux.mh: Deleted; moved contents to
11647 "gdb/configure.nat".
11648 * config/alpha/alpha-linux.mh: Likewise.
11649 * config/alpha/nbsd.mh: Likewise.
11650 * config/arm/linux.mh: Likewise.
11651 * config/arm/nbsdelf.mh: Likewise.
11652 * config/i386/cygwin.mh: Likewise.
11653 * config/i386/cygwin64.mh: Likewise.
11654 * config/i386/darwin.mh: Likewise.
11655 * config/i386/fbsd.mh: Likewise.
11656 * config/i386/fbsd64.mh: Likewise.
11657 * config/i386/go32.mh: Likewise.
11658 * config/i386/i386gnu.mh: Likewise.
11659 * config/i386/i386sol2.mh: Likewise.
11660 * config/i386/linux.mh: Likewise.
11661 * config/i386/linux64.mh: Likewise.
11662 * config/i386/mingw.mh: Likewise.
11663 * config/i386/mingw64.mh: Likewise.
11664 * config/i386/nbsd64.mh: Likewise.
11665 * config/i386/nbsdelf.mh: Likewise.
11666 * config/i386/nto.mh: Likewise.
11667 * config/i386/obsd.mh: Likewise.
11668 * config/i386/obsd64.mh: Likewise.
11669 * config/i386/sol2-64.mh: Likewise.
11670 * config/ia64/linux.mh: Likewise.
11671 * config/m32r/linux.mh: Likewise.
11672 * config/m68k/linux.mh: Likewise.
11673 * config/m68k/nbsdelf.mh: Likewise.
11674 * config/m68k/obsd.mh: Likewise.
11675 * config/m88k/obsd.mh: Likewise.
11676 * config/mips/fbsd.mh: Likewise.
11677 * config/mips/linux.mh: Likewise.
11678 * config/mips/nbsd.mh: Likewise.
11679 * config/mips/obsd64.mh: Likewise.
11680 * config/pa/linux.mh: Likewise.
11681 * config/pa/nbsd.mh: Likewise.
11682 * config/pa/obsd.mh: Likewise.
11683 * config/powerpc/aix.mh: Likewise.
11684 * config/powerpc/fbsd.mh: Likewise.
11685 * config/powerpc/linux.mh: Likewise.
11686 * config/powerpc/nbsd.mh: Likewise.
11687 * config/powerpc/obsd.mh: Likewise.
11688 * config/powerpc/ppc64-linux.mh: Likewise.
11689 * config/powerpc/spu-linux.mh: Likewise.
11690 * config/s390/linux.mh: Likewise.
11691 * config/sh/nbsd.mh: Likewise.
11692 * config/sparc/fbsd.mh: Likewise.
11693 * config/sparc/linux.mh: Likewise.
11694 * config/sparc/linux64.mh: Likewise.
11695 * config/sparc/nbsd64.mh: Likewise.
11696 * config/sparc/nbsdelf.mh: Likewise.
11697 * config/sparc/obsd64.mh: Likewise.
11698 * config/sparc/sol2.mh: Likewise.
11699 * config/tilegx/linux.mh: Likewise.
11700 * config/vax/nbsdelf.mh: Likewise.
11701 * config/vax/obsd.mh: Likewise.
11702 * config/xtensa/linux.mh: Likewise.
11703 * config/i386/i386gnu.mn: New file, with excerpts from
11704 "config/i386/i386gnu.mh".
11705 * configure: Regenerate.
11706 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11707 *.mh files under "gdb/config".
11708 * configure.nat: New file, with contents from the
11709 "gdb/config/*/*.mh" files.
11710
7ed1acaf
TW
117112017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11712
11713 * btrace.c (btrace_clear): Free insn vector.
11714
e13cb306
PA
117152017-05-05 Pedro Alves <palves@redhat.com>
11716
11717 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11718 * configure: Regenerate.
11719
5ed8105e
PA
117202017-05-04 Pedro Alves <palves@redhat.com>
11721
11722 * Makefile.in (SFILES): Add progspace-and-thread.c.
11723 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11724 (COMMON_OBS): Add progspace-and-thread.o.
11725 * breakpoint.c: Include "progspace-and-thread.h".
11726 (update_inserted_breakpoint_locations)
11727 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11728 Use scoped_restore_current_pspace_and_thread.
11729 (create_std_terminate_master_breakpoint): Use
11730 scoped_restore_current_program_space.
11731 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11732 (print_breakpoint_location): Use
11733 scoped_restore_current_program_space.
11734 (bp_loc_is_permanent): Use
11735 scoped_restore_current_pspace_and_thread.
11736 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11737 (download_tracepoint_locations): Use
11738 scoped_restore_current_pspace_and_thread.
11739 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11740 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11741 (enum step_over_calls_kind): Moved from inferior.h.
11742 (class scoped_restore_current_thread): New class.
11743 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11744 declaration.
11745 (scoped_restore_current_thread): New class.
11746 * infcmd.c: Include "common/gdb_optional.h".
11747 (continue_1, proceed_after_attach): Use
11748 scoped_restore_current_thread.
11749 (notice_new_inferior): Use scoped_restore_current_thread.
11750 * inferior.c: Include "progspace-and-thread.h".
11751 (restore_inferior, save_current_inferior): Delete.
11752 (add_inferior_command, clone_inferior_command): Use
11753 scoped_restore_current_pspace_and_thread.
11754 * inferior.h (scoped_restore_current_inferior): New class.
11755 * infrun.c: Include "progspace-and-thread.h" and
11756 "common/gdb_optional.h".
11757 (follow_fork_inferior): Use
11758 scoped_restore_current_pspace_and_thread.
11759 (scoped_restore_exited_inferior): New class.
11760 (handle_vfork_child_exec_or_exit): Use
11761 scoped_restore_exited_inferior,
11762 scoped_restore_current_pspace_and_thread,
11763 scoped_restore_current_thread and scoped_restore.
11764 (fetch_inferior_event): Use scoped_restore_current_thread.
11765 * linespec.c (decode_line_full, decode_line_1): Use
11766 scoped_restore_current_program_space.
11767 * mi/mi-main.c: Include "progspace-and-thread.h".
11768 (exec_continue): Use scoped_restore_current_thread.
11769 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11770 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11771 * proc-service.c (ps_pglobal_lookup): Use
11772 scoped_restore_current_program_space.
11773 * progspace-and-thread.c: New file.
11774 * progspace-and-thread.h: New file.
11775 * progspace.c (release_program_space, clone_program_space): Use
11776 scoped_restore_current_program_space.
11777 (restore_program_space, save_current_program_space)
11778 (save_current_space_and_thread): Delete.
11779 (switch_to_program_space_and_thread): Moved to
11780 progspace-and-thread.c.
11781 * progspace.h (save_current_program_space)
11782 (save_current_space_and_thread): Delete declarations.
11783 (scoped_restore_current_program_space): New class.
11784 * remote.c (remote_btrace_maybe_reopen): Use
11785 scoped_restore_current_thread.
11786 * symtab.c: Include "progspace-and-thread.h".
11787 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11788 * thread.c (print_thread_info_1): Use
11789 scoped_restore_current_thread.
11790 (struct current_thread_cleanup): Delete.
11791 (do_restore_current_thread_cleanup)
11792 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11793 (scoped_restore_current_thread::~scoped_restore_current_thread):
11794 ... this new dtor.
11795 (make_cleanup_restore_current_thread): Rename/convert to ...
11796 (scoped_restore_current_thread::scoped_restore_current_thread):
11797 ... this new ctor.
11798 (thread_apply_all_command): Use scoped_restore_current_thread.
11799 (thread_apply_command): Use scoped_restore_current_thread.
11800 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11801 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11802
f6223dbb
PA
118032017-05-04 Pedro Alves <palves@redhat.com>
11804
11805 * thread.c (make_cleanup_restore_current_thread): Move
11806 find_thread_ptid call before the is_stopped call. Assert that the
11807 thread is found. Replace is_stopped call by checking the thread's
11808 state directly. Remove unnecessary NULL-thread check.
11809
3c3ae77e
PA
118102017-05-04 Pedro Alves <palves@redhat.com>
11811
11812 * corelow.c (thread_section_name): New class.
11813 (get_core_register_section, get_core_siginfo): Use it.
11814
45eba0ab
AA
118152017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11816
11817 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11818 (get_core_register_section): Remove xfree of NULL pointer.
11819
f81fdd35
AH
118202017-05-03 Alan Hayward <alan.hayward@arm.com>
11821
11822 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11823 * regcache.c (regcache::raw_supply_zeroed): New function.
11824 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11825
35837774
SM
118262017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11827
11828 * gdbarch.sh: Remove commented out definition of
11829 TARGET_CHAR_BIT.
11830 * gdbarch.h: Re-generate.
11831
c94fee56
SDJ
118322017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11833
11834 * configure: Regenerate.
11835
d17f7b36
SM
118362017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11837
11838 * solib-target.c (solib_target_relocate_section_addresses):
11839 Remove num_section_bases, num_bases, segment_bases variables.
11840
b560ebd6
SM
118412017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11842
11843 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11844
f2f46dfc
SM
118452017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11846
11847 * solib-target.c: Include <vector>
11848 (struct lm_info_target) <~lm_info_target>: Remove.
11849 <segment_bases, section_bases>: Change type to
11850 std::vector<CORE_ADDR>.
11851 (library_list_start_segment, library_list_start_section,
11852 library_list_end_library,
11853 solib_target_relocate_section_addresses): Adjust.
11854
a0ff9e1a
SM
118552017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11856
11857 * gdbarch.sh (software_single_step): Change return type to
11858 std::vector<CORE_ADDR>.
11859 * gdbarch.c, gdbarch.h: Re-generate.
11860 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11861 Adjust.
11862 (arm_deal_with_atomic_sequence_raw): Adjust.
11863 (thumb_get_next_pcs_raw): Adjust.
11864 (arm_get_next_pcs_raw): Adjust.
11865 (arm_get_next_pcs): Adjust.
11866 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11867 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11868 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11869 (alpha_software_single_step): Adjust.
11870 * alpha-tdep.h (alpha_software_single_step): Adjust.
11871 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11872 * arm-tdep.c (arm_software_single_step): Adjust.
11873 (arm_breakpoint_kind_from_current_state): Adjust.
11874 * arm-tdep.h (arm_software_single_step): Adjust.
11875 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11876 * cris-tdep.c (cris_software_single_step): Adjust.
11877 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11878 (micromips_deal_with_atomic_sequence): Adjust.
11879 (deal_with_atomic_sequence): Adjust.
11880 (mips_software_single_step): Adjust.
11881 * mips-tdep.h (mips_software_single_step): Adjust.
11882 * moxie-tdep.c (moxie_software_single_step): Adjust.
11883 * nios2-tdep.c (nios2_software_single_step): Adjust.
11884 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11885 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11886 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11887 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11888 * sparc-tdep.c (sparc_software_single_step): Adjust.
11889 * spu-tdep.c (spu_software_single_step): Adjust.
11890 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11891
ea480a30
SM
118922017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11893
11894 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11895 * gdbarch.h: Re-generate.
11896
d050f7d7
TW
118972017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11898
11899 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11900 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11901 * python/py-instruction.c, python/py-instruction.h: New file.
11902 * python/py-record.c: Add py-instruction.h include.
11903 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11904 gdb.RecordInstruction.
11905 * python/python-internal.h: Add gdbpy_initialize_instruction
11906 declaration.
11907 * python/python.c (do_start_initialization): Add
11908 gdbpy_initialize_instruction.
11909
14f819c8
TW
119102017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11911
11912 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11913 Remove.
11914 (btrace_func_from_recpy_func): New function.
11915 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11916 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11917 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11918 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11919 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11920 Also, use new helper functions.
11921 (btpy_list_item): Use new helper functions.
11922 (recpy_bt_function_call_history): Use new type name.
11923 (btpy_call_getset): Remove.
11924 (gdbpy_initialize_btrace): Remove code to initialize
11925 gdb.BtraceFunctionCall.
11926 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11927 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11928 recpy_bt_func_prev, recpy_bt_func_next): New export.
11929 * python/py-record.c (recpy_func_type): New static object.
11930 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11931 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11932 recpy_func_next): New function.
11933 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11934 (recpy_func_getset): New static object.
11935 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11936 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11937
0ed5da75
TW
119382017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11939
11940 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11941 (btpy_object, btpy_insn_type, btpy_new): Remove.
11942 (btpy_list_object): Use gdb.RecordInstruction type instead of
11943 gdb.BtraceInstruction type.
11944 (btrace_insn_from_recpy_insn): New function.
11945 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11946 btpy_new.
11947 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11948 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11949 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11950 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11951 instead of btpy_object.
11952 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11953 btpy_insn_data, btpy_insn_decode): Rename to ...
11954 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11955 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11956 recpy_bt_insn_decode): This. Also, use new helper functions.
11957 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11958 recpy_insn_type.
11959 (btpy_insn_getset): Remove.
11960 (gdbpy_initialize_btrace): Remove code to initialize
11961 gdb.BtraceInstruction. Use recpy_element_object.
11962 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11963 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11964 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11965 * python/py-record.c (recpy_insn_type): New static object.
11966 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11967 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11968 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11969 New function.
11970 (recpy_insn_getset): New static object.
11971 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11972 * python/py-record.h (recpy_element_object): New typedef.
11973 (recpy_insn_type, recpy_insn_new): New export.
11974
913aeadd
TW
119752017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11976
11977 * py-record-btrace.c (btpy_insn_new): Removed.
11978 (btpy_insn_or_gap_new): New function.
11979 (btpy_insn_error): Removed.
11980 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11981 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11982 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11983 btpy_insn_or_gap_new instead of btpy_insn_new.
11984 (btpy_insn_getset): Remove btpy_insn_error.
11985 * py-record.c (recpy_gap_type): New static object.
11986 (recpy_gap_object): New typedef.
11987 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11988 recpy_gap_reason_string): New function.
11989 (recpy_gap_getset): New static object.
11990 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11991 * py-record.h (recpy_gap_new): New export.
11992
a3be24ad
TW
119932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11994
11995 * python/py-record.c (recpy_ptid): Remove.
11996 (recpy_record_getset): Remove recpy_ptid.
11997
ae20e79a
TW
119982017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11999
12000 * btrace.c (btrace_fetch): Set inferior_ptid.
12001 * python/py-record-btrace.c: Add "py-record.h" include.
12002 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12003 recpy_bt_end, recpy_bt_instruction_history,
12004 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12005 in gdb.Record object instead of current ptid.
12006 * python/py-record.c: Include new "py-record.h" file.
12007 (recpy_record_object): Moved to py-record.h.
12008 * python/py-record.h: New file.
12009
8d0050ea
TW
120102017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12011
12012 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12013 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12014 indentation.
12015
3f380b50
JB
120162017-05-01 Joel Brobecker <brobecker@adacore.com>
12017
12018 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12019 the past maintainers section.
12020
07495424
YQ
120212017-04-28 Yao Qi <yao.qi@linaro.org>
12022
12023 * infcmd.c (get_return_value): Use regcache ctor, and remove
12024 cleanup.
12025
deb1fa3e
YQ
120262017-04-28 Yao Qi <yao.qi@linaro.org>
12027 Pedro Alves <palves@redhat.com>
12028
12029 * regcache.c (regcache::regcache): New tag dispatch ctor.
12030 (do_cooked_read): Moved above.
12031 (regcache_dup): Use the tag dispatch ctor..
12032 * regcache.h (regcache): Declare ctor, delete copy ctor and
12033 assignment operator, remove friend regcache_dup.
12034
b421c83c
YQ
120352017-04-28 Yao Qi <yao.qi@linaro.org>
12036
12037 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12038 call method save instead of regcache_cpy.
12039 * regcache.h (struct regcache): Make regcache_dup a friend.
12040
ef79d9a3
YQ
120412017-04-28 Yao Qi <yao.qi@linaro.org>
12042
12043 * regcache.c (struct regcache): Move to regcache.h
12044 (regcache::arch): New method.
12045 (regcache_get_ptid): Update.
12046 (get_regcache_arch): Call arch method.
12047 (get_regcache_aspace): Call method aspace.
12048 (register_buffer): Change it to method.
12049 (regcache_save): Change it to regcache::save.
12050 (regcache_restore): Likewise.
12051 (regcache_cpy_no_passthrough): Remove the declaration.
12052 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12053 (regcache_cpy_no_passthrough): Change it to method
12054 cpy_no_passthrough.
12055 (regcache_register_status): Change it to method
12056 get_register_status.
12057 (regcache_invalidate): Change it to method invalidate.
12058 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12059 (regcache_raw_update): Change it to method raw_update.
12060 (regcache_raw_read): Likewise.
12061 (regcache_raw_read_signed): Likewise.
12062 (regcache_raw_read_unsigned): Likewise.
12063 (regcache_raw_write_signed): Likewise.
12064 (regcache_raw_write_unsigned): Likewise.
12065 (regcache_cooked_read): Likewise.
12066 (regcache_cooked_read_value): Likewise.
12067 (regcache_cooked_read_signed): Likewise.
12068 (regcache_cooked_read_unsigned): Likewise.
12069 (regcache_cooked_write_signed): Likewise.
12070 (regcache_cooked_write_unsigned): Likewise.
12071 (regcache_raw_set_cached_value): Likewise.
12072 (regcache_raw_write): Likewise.
12073 (regcache_cooked_write): Likewise.
12074 (regcache_xfer_part): Likewise.
12075 (regcache_raw_read_part): Likewise.
12076 (regcache_raw_write_part): Likewise.
12077 (regcache_cooked_read_part): Likewise.
12078 (regcache_cooked_write_part): Likewise.
12079 (regcache_raw_supply): Likewise.
12080 (regcache_raw_collect): Likewise.
12081 (regcache_transfer_regset): Likewise.
12082 (regcache_supply_regset): Likewise.
12083 (regcache_collect_regset): Likewise.
12084 (regcache_debug_print_register): Likewise.
12085 (enum regcache_dump_what): Move it to regcache.h.
12086 (regcache_dump): Change it to method dump.
12087 * regcache.h (enum regcache_dump_what): New.
12088 (class regcache): New.
12089 * target.c (target_fetch_registers): Call method
12090 debug_print_register.
12091 (target_store_registers): Likewise.
12092
f8fdb78e
SM
120932017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12094
12095 * windows-nat.c (struct lm_info_windows): Initialize field.
12096 (windows_make_so): Allocate lm_info_windows with new.
12097 (windows_free_so): Free lm_info_windows with delete.
12098
9ccbfd7b
SM
120992017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12100
12101 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12102 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12103 cleanup.
12104 (darwin_free_so): Free lm_info_darwin with delete.
12105
76e75227
SM
121062017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12107
12108 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12109 <l_addr_p>: Change type to bool.
12110 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12111 (svr4_free_so): Free lm_info_svr4 with delete.
12112 (svr4_copy_library_list): Replace memcpy with call to copy
12113 constructor.
12114 (library_list_start_library, svr4_default_sos): Allocate
12115 lm_info_svr4 with new.
12116
51046d9e
SM
121172017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12118
12119 * solib-target.c (struct lm_info_target): Add destructor,
12120 initialize fields.
12121 <name>: Change type to std::string.
12122 (library_list_start_library): Allocate lm_info_target with new.
12123 (solib_target_free_library_list): Free lm_info_target with
12124 delete.
12125 (solib_target_current_sos): Adapt to std::string.
12126 (solib_target_free_so): Free lm_info_target with delete.
12127
4023ae76
SM
121282017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12129
12130 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12131 fields.
12132 (frv_current_sos): Allocate lm_info_frv with new.
12133 (frv_relocate_main_executable): Free lm_info_frv with delete,
12134 allocate with new.
12135 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12136
af43057b
SM
121372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12138
12139 * solib-frv.c (struct lm_info_frv): Fix indentation.
12140
b0911207
SM
121412017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12142
12143 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12144 map field.
12145 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12146 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12147 and allocate with new.
12148 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12149
6c401f72
SM
121502017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12151
12152 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12153 <filename, member_name>: Change type to std::string.
12154 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12155 (library_list_start_library): Allocate lm_info_aix with new.
12156 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12157 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12158 with copy constructor.
12159
d0e449a1
SM
121602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12161
12162 * solist.h (struct lm_info): Remove.
12163 (struct lm_info_base): New class.
12164 (struct so_list) <lm_info>: Change type to lm_info_base *.
12165 * nto-tdep.c (struct lm_info): Remove.
12166 (lm_addr): Adjust.
12167 * solib-aix.c (struct lm_info): Rename to ...
12168 (struct lm_info_aix): ... this. Extend lm_info_base.
12169 (lm_info_p): Rename to ...
12170 (lm_info_aix_p): ... this, and adjust.
12171 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12172 solib_aix_parse_libraries, library_list_start_library,
12173 solib_aix_free_library_list, solib_aix_parse_libraries,
12174 solib_aix_get_library_list,
12175 solib_aix_relocate_section_addresses, solib_aix_free_so,
12176 solib_aix_get_section_offsets,
12177 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12178 Adjust.
12179 (struct solib_aix_inferior_data) <library_list>: Adjust.
12180 * solib-darwin.c (struct lm_info): Rename to ...
12181 (struct lm_info_darwin): ... this. Extend lm_info_base.
12182 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12183 * solib-dsbt.c (struct lm_info): Rename to ...
12184 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12185 (struct dsbt_info) <main_executable_lm_info): Adjust.
12186 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12187 dsbt_relocate_section_addresses): Adjust.
12188 * solib-frv.c (struct lm_info): Rename to ...
12189 (struct lm_info_frv): ... this. Extend lm_info_base.
12190 (main_executable_lm_info): Adjust.
12191 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12192 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12193 find_canonical_descriptor_in_load_object,
12194 frv_fdpic_find_canonical_descriptor): Adjust.
12195 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12196 to lm_info_svr4.
12197 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12198 svr4_clear_so, svr4_copy_library_list,
12199 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12200 svr4_current_sos, svr4_fetch_objfile_link_map,
12201 solist_update_incremental): Adjust.
12202 * solib-svr4.h (struct lm_info_svr4): Move here from
12203 solib-svr4.c.
12204 * solib-target.c (struct lm_info): Rename to ...
12205 (struct lm_info_target): ... this. Extend lm_info_base.
12206 (lm_info_p): Rename to ...
12207 (lm_info_target_p): ... this.
12208 (solib_target_parse_libraries, library_list_start_segment,
12209 library_list_start_section, library_list_start_library,
12210 library_list_end_library, solib_target_free_library_list,
12211 solib_target_current_sos, solib_target_free_so,
12212 solib_target_relocate_section_addresses): Adjust.
12213 * windows-nat.c (struct lm_info): Rename to ...
12214 (struct lm_info_windows): ... this. Extend lm_info_base.
12215 (windows_make_so, handle_load_dll, handle_unload_dll,
12216 windows_xfer_shared_libraries): Adjust.
12217
434a4023
SM
122182017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12219
12220 * solib-darwin.c (struct darwin_so_list): Remove.
12221 (darwin_current_sos): Allocate an so_list object instead of a
12222 darwin_so_list, separately allocate an lm_info object.
12223 (darwin_free_so): Free lm_info.
12224
428544e8
JB
122252017-04-28 John Baldwin <jhb@FreeBSD.org>
12226
12227 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12228 with fprintf_filtered.
12229
4621115f
YQ
122302017-04-28 Yao Qi <yao.qi@linaro.org>
12231
12232 * regcache.c (regcache::regcache): New function.
12233 (regcache::~regcache): New function.
12234 (regcache_xmalloc_1): Remove.
12235 (regcache_xmalloc): Call new regcache.
12236 (regcache_xfree): Call delete regcache.
12237 (get_thread_arch_aspace_regcache): Call new regcache.
12238
339053c2
YQ
122392017-04-28 Yao Qi <yao.qi@linaro.org>
12240
12241 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12242 lwp instead of ptid_get_lwp.
12243
7974a605
YQ
122442017-04-28 Yao Qi <yao.qi@linaro.org>
12245
12246 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12247 lwp_info instead of getting from inferior_ptid.
12248
e15c3eb4
KS
122492017-04-27 Keith Seitz <keiths@redhat.com>
12250
12251 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12252 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12253 (CV_CONVERSION_BADNESS): Define.
12254 (rank_one_type): Remove overly restrictive rvalue reference
12255 rank checks.
12256 Add cv-qualifier checks and subranks for type equality.
12257 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12258 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12259 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12260
72bc1d24
SM
122612017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12262
12263 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12264 count when creating the object.
12265
55bcecda
UW
122662017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12267 Ulrich Weigand <uweigand@de.ibm.com>
12268
12269 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12270 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12271 is used in AIX.
12272 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12273 (process_xcoff_symbol): Likewise.
12274 (scan_xcoff_symtab): Likewise.
12275
5c99fcf8
AH
122762017-04-26 Alan Hayward <alan.hayward@arm.com>
12277
12278 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12279 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12280 (ia64_access_reg): Use get_frame_register_unsigned.
12281 (ia64_access_rse_reg): Likewise.
12282 (ia64_libunwind_frame_prev_register): Likewise.
12283
b41c5a85
JW
122842017-04-26 Jiong Wang <jiong.wang@arm.com>
12285
12286 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12287 * gdbarch.c: Regenerated.
12288 * gdbarch.h: Regenerated.
12289 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12290 visibility external.
12291 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12292 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12293 (enum cfa_how_kind): Move to ...
12294 (struct dwarf2_frame_state_reg_info): Likewise.
12295 (struct dwarf2_frame_state): Likewise.
12296 * dwarf2-frame.h: ... here.
12297 (dwarf2_frame_state_alloc_regs): New declaration.
12298 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12299 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12300
c185f580
AH
123012017-04-26 Alan Hayward <alan.hayward@arm.com>
12302
12303 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12304 regcache_raw_read_unsigned.
12305 (xtensa_pseudo_register_write): Likewise.
12306
19c45594
AH
123072017-04-26 Alan Hayward <alan.hayward@arm.com>
12308
12309 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12310 (nds32_pseudo_register_write): Likewise.
12311
4658f12e
YQ
123122017-04-25 Yao Qi <yao.qi@linaro.org>
12313
12314 * regcache.c (struct regcache) <readonly_p>: Change its type
12315 to bool.
12316 (regcache_xmalloc_1): Update parameter type and callers update.
12317
d581dda8
YQ
123182017-04-25 Yao Qi <yao.qi@linaro.org>
12319
12320 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12321 set_gdbarch_wchar_bit.
12322 * arm-tdep.c (arm_gdbarch_init): Likewise.
12323
debed3db
PA
123242017-04-25 Pedro Alves <palves@redhat.com>
12325
12326 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12327 (BothAreRelocatable, memcopy, memmove): Don't define.
12328 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12329 macros.
12330
b0b92aeb
PA
123312017-04-25 Pedro Alves <palves@redhat.com>
12332
12333 * common/common-defs.h: Include "common/poison.h".
12334 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12335 and adjust.
12336 * common/poison.h: New file.
12337 * common/traits.h: Include <type_traits>.
12338 (Not, Or, Requires): New, moved from common/function-view.h.
12339
16c4d54a
PA
123402017-04-25 Pedro Alves <palves@redhat.com>
12341
12342 * breakpoint.h (struct breakpoint): In-class initialize all
12343 fields. Make boolean fields "bool".
12344 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12345 memset call and initializations no longer necessary.
12346
b5c36682
PA
123472017-04-25 Pedro Alves <palves@redhat.com>
12348
12349 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12350 reference.
12351 (pt_btrace_insn): New function.
12352 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12353
5625a286
PA
123542017-04-25 Pedro Alves <palves@redhat.com>
12355
12356 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12357 "base" field and inherit from "bp_location" instead. Add
12358 non-default ctor.
12359 (allocate_location_exception): Use new non-default ctor.
12360 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12361 (init_bp_location): Convert to ...
12362 (bp_location::bp_location): ... this new ctor, and remove memset
12363 call.
12364 (base_breakpoint_allocate_location): Use the new non-default ctor.
12365 * breakpoint.h (bp_location): Now a class. Declare default and
12366 non-default ctors. In-class initialize all members.
12367 (init_bp_location): Remove declaration.
12368
23bcc18f
PA
123692017-04-25 Pedro Alves <palves@redhat.com>
12370
12371 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12372 assignment operator.
12373
e1ba3053
YQ
123742017-04-24 Yao Qi <yao.qi@linaro.org>
12375
12376 * doublest.c (convert_doublest_to_floatformat): Call
12377 floatformat_totalsize_bytes.
12378
10f489e5
TT
123792017-04-22 Tom Tromey <tom@tromey.com>
12380
12381 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12382 ui_out_emit_list.
12383 * stack.c (print_frame): Use ui_out_emit_list.
12384 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12385 ui_out_emit_list.
12386 * mi/mi-main.c (print_one_inferior)
12387 (mi_cmd_data_list_register_names)
12388 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12389 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12390 ui_out_emit_list.
12391 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12392 (mi_output_solib_attribs): Use ui_out_emit_list,
12393 ui_out_emit_tuple.
12394 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12395 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12396 (mi_cmd_stack_list_args, list_args_or_locals): Use
12397 ui_out_emit_list.
12398 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12399 * breakpoint.c (print_solib_event, output_thread_groups): Use
12400 ui_out_emit_list.
12401
0092b74d
TT
124022017-04-22 Tom Tromey <tom@tromey.com>
12403
12404 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12405 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12406 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12407
a14a62dd
TT
124082017-04-22 Tom Tromey <tom@tromey.com>
12409
12410 * tracepoint.c (tvariables_info_1)
12411 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12412
46b9c129
TT
124132017-04-22 Tom Tromey <tom@tromey.com>
12414
12415 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12416 annotate_arg_emitter.
12417 * breakpoint.c (print_mention_watchpoint)
12418 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12419 * annotate.h (struct annotate_arg_emitter): New.
12420
2e783024
TT
124212017-04-22 Tom Tromey <tom@tromey.com>
12422
12423 * record-btrace.c (record_btrace_insn_history)
12424 (record_btrace_insn_history_range, record_btrace_call_history)
12425 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12426 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12427 ui_out_emit_tuple.
12428 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12429 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12430 * skip.c (skip_info): Use ui_out_emit_tuple.
12431 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12432 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12433 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12434 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12435 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12436 ui_out_emit_tuple.
12437 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12438 (output_register, mi_cmd_data_read_memory)
12439 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12440 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12441 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12442 Use ui_out_emit_tuple.
12443 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12444 ui_out_emit_tuple.
12445 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12446 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12447 * linux-thread-db.c (info_auto_load_libthread_db): Use
12448 ui_out_emit_tuple.
12449 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12450 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12451 * disasm.c (do_mixed_source_and_assembly_deprecated)
12452 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12453 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12454 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12455 * breakpoint.c (print_one_breakpoint_location)
12456 (print_one_breakpoint): Use ui_out_emit_tuple.
12457 * auto-load.c (print_script, info_auto_load_cmd): Use
12458 ui_out_emit_tuple.
12459 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12460
9be21bb4
SM
124612017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12462
12463 * thread.c (print_thread_info_1): Remove dead code.
12464
0d4c07af
JK
124652017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12466
12467 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12468 GDB_SELF_TEST.
12469 * arm-tdep.c (selftests::arm_record_test): Likewise.
12470
4daf993d
YQ
124712017-04-21 Yao Qi <yao.qi@linaro.org>
12472
12473 * regcache.c (regcache_restore): Remove argument 2. Replace
12474 argument 3 with regcache. Get register status from
12475 src->register_status and get register contents from
12476 register_buffer (src, regnum).
12477 (regcache_cpy): Update.
12478
a6c21d4a
PA
124792017-04-19 Pedro Alves <palves@redhat.com>
12480
12481 * gdbthread.h (thread): Add missing closing parenthesis in
12482 comment.
12483
3a3fd0fd
PA
124842017-04-19 Pedro Alves <palves@redhat.com>
12485
12486 * common/refcounted-object.h: New file.
12487 * gdbthread.h: Include "common/refcounted-object.h".
12488 (thread_info): Inherit from refcounted_object and add comments.
12489 (thread_info::incref, thread_info::decref)
12490 (thread_info::m_refcount): Delete.
12491 (thread_info::deletable): Use the refcounted_object::refcount()
12492 method.
12493 * inferior.c (current_inferior_): Add comment.
12494 (set_current_inferior): Increment/decrement refcounts.
12495 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12496 not-deletable instead of comparing with the current inferior.
12497 (initialize_inferiors): Increment the initial inferior's refcount.
12498 * inferior.h (struct inferior): Forward declare.
12499 Include "common/refcounted-object.h".
12500 (current_inferior, set_current_inferior): Move declaration to
12501 before struct inferior's definition, and fix comment.
12502 (inferior): Inherit from refcounted_object. Add comments.
12503 * thread.c (switch_to_thread_no_regs): Reference the thread's
12504 inferior pointer directly instead of doing a ptid lookup.
12505 (switch_to_no_thread): New function.
12506 (switch_to_thread(thread_info *)): New function, factored out
12507 from ...
12508 (switch_to_thread(ptid_t)): ... this.
12509 (restore_current_thread): Delete.
12510 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12511 fields, and add 'inf' field.
12512 (do_restore_current_thread_cleanup): Check whether old->inf is
12513 alive instead of looking up an inferior by ptid. Use
12514 switch_to_thread and switch_to_no_thread.
12515 (restore_current_thread_cleanup_dtor): Use old->inf directly
12516 instead of lookup up an inferior by id. Decref the inferior.
12517 Don't restore 'removable'.
12518 (make_cleanup_restore_current_thread): Same the inferior pointer
12519 in old, instead of the inferior number. Incref the inferior.
12520 Don't save/clear 'removable'.
12521
9bcb1f16
PA
125222017-04-19 Pedro Alves <palves@redhat.com>
12523
12524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12525 unittests/scoped_restore-selftests.c.
12526 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12527 * common/scoped_restore.h (scoped_restore_base): Make "class".
12528 (scoped_restore_base::release): New public method.
12529 (scoped_restore_base::scoped_restore_base): New protected ctor.
12530 (scoped_restore_base::m_saved_var): New protected field.
12531 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12532 scoped_restore_base base class instead of m_saved_var directly.
12533 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12534 (scoped_restore_tmpl::scoped_restore_tmpl(const
12535 scoped_restore_tmpl<T>&)): Likewise.
12536 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12537 method.
12538 (scoped_restore_tmpl::saved_var): New method.
12539 (scoped_restore_tmpl::m_saved_var): Delete.
12540 * inferior.h (inferior::detaching): Now a bool.
12541 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12542 cleanup.
12543 * unittests/scoped_restore-selftests.c: New file.
12544
26fcd539
PA
125452017-04-19 Pedro Alves <palves@redhat.com>
12546
12547 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12548 Re-sort in alphabetic order.
12549
fdd243b0
PA
125502017-04-18 Pedro Alves <palves@redhat.com>
12551
12552 * xml-support.c (obstack_xml_printf): Delete.
12553 * xml-support.h (obstack_xml_printf): Delete.
12554
4895cde2
PA
125552017-04-18 Pedro Alves <palves@redhat.com>
12556
12557 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12558 vdebug, verror, body_text, start_element, end_element, name,
12559 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12560 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12561 is_xinclude>: Make private and add m_ prefix.
12562 (gdb_xml_parser::body_text): New method, based on ...
12563 (gdb_xml_body_text): ... this. Adjust.
12564 (gdb_xml_parser::vdebug): New method, based on ...
12565 (gdb_xml_debug): ... this. Adjust.
12566 (gdb_xml_parser::verror): New method, based on ...
12567 (gdb_xml_error): ... this. Adjust.
12568 (gdb_xml_parser::start_element): New method, based on ...
12569 (gdb_xml_start_element): ... this. Adjust.
12570 (gdb_xml_start_element_wrapper): Defer to
12571 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12572 (gdb_xml_parser::end_element): New method, based on ...
12573 (gdb_xml_end_element_wrapper): ... this. Adjust.
12574 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12575 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12576 (gdb_xml_parser::use_dtd): New method, based on ...
12577 (gdb_xml_use_dtd): ... this. Adjust.
12578 (gdb_xml_parser::parse): New method, based on ...
12579 (gdb_xml_parse): ... this. Adjust.
12580 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12581 (xinclude_start_include): Adjust to call the parser's name method.
12582 (xml_xinclude_default, xml_xinclude_start_doctype)
12583 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12584 method.
12585 (xml_process_xincludes): Adjust to call parser methods.
12586 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12587 declarations.
12588
bd8a901f
PA
125892017-04-18 Pedro Alves <palves@redhat.com>
12590
12591 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12592 gdb::optional<std::string>.
12593 * xml-support.c: Include <string>.
12594 (scope_level::scope_level(scope_level &&))
12595 (scope_level::~scope_level): Delete.
12596 (scope_level::body): Now a std::string.
12597 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12598 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12599 parameter.
12600 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12601 (xinclude_parsing_data::output): Now a std::string reference.
12602 (xinclude_start_include): Adjust.
12603 (xml_xinclude_default): Adjust.
12604 (xml_process_xincludes): Add 'output' parameter, and return bool.
12605 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12606 and return bool.
12607 * xml-tdesc.c: Include <unordered_map> and <string>.
12608 (tdesc_xml_cache): Delete.
12609 (tdesc_xml_cache_s): Delete.
12610 (xml_cache): Now an std::unordered_map.
12611 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12612 (target_fetch_description_xml): Change return type to
12613 gdb::optional<std::string>, and adjust.
12614 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12615 (target_fetch_description_xml): Change return type to
12616 gdb::optional<std::string>.
12617
d35d1958
PA
126182017-04-18 Pedro Alves <palves@redhat.com>
12619
12620 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12621 unittests/optional-selftests.c.
12622 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12623 * unittests/optional-selftests.c: New file.
12624 * unittests/optional/assignment/1.cc: New file.
12625 * unittests/optional/assignment/2.cc: New file.
12626 * unittests/optional/assignment/3.cc: New file.
12627 * unittests/optional/assignment/4.cc: New file.
12628 * unittests/optional/assignment/5.cc: New file.
12629 * unittests/optional/assignment/6.cc: New file.
12630 * unittests/optional/assignment/7.cc: New file.
12631 * unittests/optional/cons/copy.cc: New file.
12632 * unittests/optional/cons/default.cc: New file.
12633 * unittests/optional/cons/move.cc: New file.
12634 * unittests/optional/cons/value.cc: New file.
12635 * unittests/optional/in_place.cc: New file.
12636 * unittests/optional/observers/1.cc: New file.
12637 * unittests/optional/observers/2.cc: New file.
12638
22796e97
PA
126392017-04-18 Pedro Alves <palves@redhat.com>
12640
12641 * common/gdb_optional.h: Include common/traits.h.
12642 (in_place_t): New type.
12643 (in_place): New constexpr variable.
12644 (optional::optional): Remove member initialization of
12645 m_instantiated.
12646 (optional::optional(in_place_t...)): New constructor.
12647 (optional::~optional): Use reset.
12648 (optional::optional(const optional&)): New.
12649 (optional::optional(const optional&&)): New.
12650 (optional::optional(T &)): New.
12651 (optional::optional(T &&)): New.
12652 (operator::operator=(const optional &)): New.
12653 (operator::operator=(optional &&)): New.
12654 (operator::operator= (const T &))
12655 (operator::operator= (T &&))
12656 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12657 (operator::reset): New.
12658 (operator::m_instantiated):: Add in-class initializer.
12659 * common/traits.h: Include <type_traits>.
12660 (struct And): New types.
12661
a7fc9b61
PA
126622017-04-18 Pedro Alves <palves@redhat.com>
12663
12664 * xml-support.c: Include <vector>.
12665 (scope_level::scope_level(const gdb_xml_element *))
12666 (scope_level::scope_level(scope_level&&)): New.
12667 (scope_level::~scope_level): New.
12668 (scope_level_s): Delete.
12669 (gdb_xml_parser::scopes): Now a std::vector.
12670 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12671 Use std::vector.
12672 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12673 scope cleanup code.
12674 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12675 of the scopes member. Use std::vector::emplace_back.
12676
010151c9
PA
126772017-04-18 Pedro Alves <palves@redhat.com>
12678
12679 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12680 a bool.
12681 (gdb_xml_end_element): Change type of first parameter.
12682 (gdb_xml_cleanup): Rename to ...
12683 (gdb_xml_parser::~gdb_xml_parser): ... this.
12684 (gdb_xml_create_parser_and_cleanup): Delete with ...
12685 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12686 to this new ctor.
12687 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12688 using gdb_xml_create_parser_and_cleanup.
12689 (xinclude_parsing_data): Add ctor/dtor.
12690 (xml_xinclude_cleanup): Delete.
12691 (xml_process_xincludes): Create a local xinclude_parsing_data
12692 instead of heap-allocating one. Create a local gdb_xml_parser
12693 instead of heap-allocating one with
12694 gdb_xml_create_parser_and_cleanup.
12695
d56060f0
JB
126962017-04-18 John Baldwin <jhb@FreeBSD.org>
12697
12698 PR threads/20743
12699 * fbsd-nat.c (resume_one_thread_cb): Remove.
12700 (resume_all_threads_cb): Remove.
12701 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12702 iterate_over_threads.
12703
305d16a9
JB
127042017-04-17 Joel Brobecker <brobecker@adacore.com>
12705
12706 * NEWS: Create a new section for the next release branch.
12707 Rename the section of the current branch, now that it has
12708 been cut.
12709
8bb57231
JB
127102017-04-17 Joel Brobecker <brobecker@adacore.com>
12711
12712 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12713 * version.in: Bump version to 8.0.50.DATE-git.
12714
096c92dd
SDJ
127152017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12716
12717 PR gdb/21385
12718 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12719 independently of the host, and fix build breakage on Cygwin.
12720
0550c955
PA
127212017-04-13 Pedro Alves <palves@redhat.com>
12722
12723 * inferior.c (free_inferior): Convert to ...
12724 (inferior::~inferior): ... this dtor.
12725 (inferior::inferior): New ctor, factored out from ...
12726 (add_inferior_silent): ... here. Allocate the inferior with a new
12727 expression.
12728 (delete_inferior): Call delete instead of free_inferior.
12729 * inferior.h (gdb_environ, continuation): Forward declare.
12730 (inferior): Now a class. Add in-class initialization to all
12731 members. Make boolean fields bool, except 'detaching'.
12732 (inferior::inferior): New explicit ctor.
12733 (inferior::~inferior): New.
12734
e3d60dfc
PA
127352017-04-13 Pedro Alves <palves@redhat.com>
12736
12737 * inferior.c (init_inferior_list): Delete.
12738 * inferior.h (init_inferior_list): Delete.
12739
5fd69d0a
PA
127402017-04-13 Pedro Alves <palves@redhat.com>
12741
12742 PR threads/13217
12743 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12744 (top level): Call it twice, with different thread sets.
12745
c6609450
PA
127462017-04-13 Pedro Alves <palves@redhat.com>
12747
12748 * thread.c: Include <algorithm>.
12749 (thread_array_cleanup): Delete.
12750 (scoped_inc_dec_ref): New class.
12751 (live_threads_count): New function.
12752 (set_thread_refcount): Delete.
12753 (tp_array_compar_ascending): Now a bool.
12754 (tp_array_compar): Convert to a std::sort comparison function.
12755 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12756 and live_threads_count.
12757
2a00d7ce
PA
127582017-04-13 Pedro Alves <palves@redhat.com>
12759
12760 * infrun.c (follow_fork_inferior): Also switch the current
12761 inferior.
12762
441d7c93
PA
127632017-04-13 Pedro Alves <palves@redhat.com>
12764
12765 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12766 before calling create_internal_breakpoint.
12767
808480f6
PA
127682017-04-13 Pedro Alves <palves@redhat.com>
12769
12770 * fork-child.c (execv_argv): New class.
12771 (breakup_args): Refactored as ...
12772 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12773 Copy arguments to storage and replace separators with NULL
12774 terminators in place.
12775 (escape_bang_in_quoted_argument): Adjust to return bool.
12776 (execv_argv::execv_argv): New ctor.
12777 (execv_argv::init_for_shell): New method, factored out from
12778 fork_inferior. Don't strdup strings into the vector.
12779 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12780 Remove free_vector_argv call.
12781
ad3d022a
YQ
127822017-04-13 Yao Qi <yao.qi@linaro.org>
12783
12784 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12785 tdep->rx_psw_type.
12786
e6ddc3bf
YQ
127872017-04-13 Yao Qi <yao.qi@linaro.org>
12788
12789 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12790 * rx-tdep.c (rx_gdbarch_init): Likewise.
12791
bfb8cf90
PA
127922017-04-13 Pedro Alves <palves@redhat.com>
12793
12794 * breakpoint.h (struct breakpoint): Reindent.
12795
f5336ca5
PA
127962017-04-13 Pedro Alves <palves@redhat.com>
12797
12798 * breakpoint.c (bp_location): Rename to ...
12799 (bp_locations): ... this. All references updated.
12800 (bp_location_count): Rename to ...
12801 (bp_locations_count): ... this. All references updated.
12802 (bp_location_placed_address_before_address_max): Rename to ...
12803 (bp_locations_placed_address_before_address_max): ... this. All
12804 references updated.
12805 (bp_location_shadow_len_after_address_max): Rename to ...
12806 (bp_locations_shadow_len_after_address_max): ... this. All
12807 references updated.
12808 (bp_location_compare_addrs): Rename to ...
12809 (bp_locations_compare_addrs): ... this. All references updated.
12810 (bp_location_compare):Rename to ...
12811 (bp_locations_compare): ... this. All references updated.
12812 (bp_location_target_extensions_update): Rename to ...
12813 (bp_locations_target_extensions_update): ... this. All references
12814 updated.
12815
be628ab8
SDJ
128162017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12817
12818 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12819 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12820 'sgtty.h'.
12821 * common/gdb_termios.h: New file, with parts of "terminal.h".
12822 * inflow.c: Include "gdb_termios.h".
12823 * ser-unix.c: Include "gdb_termios.h".
12824 * terminal.h: Move terminal-related defines to
12825 "common/gdb_termios.h".
12826
8e9e35b1
TT
128272017-04-12 Tom Tromey <tom@tromey.com>
12828
12829 * probe.c (parse_probes): Update.
12830 * location.h (delete_event_location): Don't declare.
12831 (event_location_deleter::operator()): Update.
12832 * location.c (event_location_deleter::operator()): Rename from
12833 delete_event_location.
12834 * linespec.h (linespec_result) <location>: Change type to
12835 event_location_up.
12836 * linespec.c (canonicalize_linespec, event_location_to_sals)
12837 (decode_objc): Update.
12838 (linespec_result): Don't call delete_event_location.
12839 * breakpoint.c (create_breakpoints_sal)
12840 (bkpt_probe_create_sals_from_location)
12841 (strace_marker_create_sals_from_location): Update.
12842
16e802b9
TT
128432017-04-12 Tom Tromey <tom@tromey.com>
12844
12845 * linespec.h (struct linespec_result): Add constructor and
12846 destructor.
12847 (init_linespec_result, destroy_linespec_result)
12848 (make_cleanup_destroy_linespec_result): Don't declare.
12849 * linespec.c (init_linespec_result): Remove.
12850 (linespec_result::~linespec_result): Rename from
12851 destroy_linespec_result. Update.
12852 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12853 Remove.
12854 * breakpoint.c (create_breakpoint, break_range_command)
12855 (decode_location_default): Update.
12856 * ax-gdb.c (agent_command_1): Update.
12857
d28cd78a
TT
128582017-04-12 Tom Tromey <tom@tromey.com>
12859
12860 * remote.c (remote_download_tracepoint): Update.
12861 * python/py-breakpoint.c (bppy_get_location): Update.
12862 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12863 (gdbscm_breakpoint_location): Update.
12864 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12865 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12866 Change type to event_location_up.
12867 * breakpoint.c (create_overlay_event_breakpoint)
12868 (create_longjmp_master_breakpoint)
12869 (create_std_terminate_master_breakpoint)
12870 (create_exception_master_breakpoint)
12871 (breakpoint_event_location_empty_p, print_breakpoint_location)
12872 (print_one_breakpoint_location, create_thread_event_breakpoint)
12873 (init_breakpoint_sal, create_breakpoint)
12874 (print_recreate_ranged_breakpoint, break_range_command)
12875 (init_ada_exception_breakpoint, say_where): Update.
12876 (base_breakpoint_dtor): Don't call delete_event_location.
12877 (bkpt_print_recreate, tracepoint_print_recreate)
12878 (dprintf_print_recreate, update_static_tracepoint)
12879 (breakpoint_re_set_default): Update.
12880
711799d5
TT
128812017-04-12 Tom Tromey <tom@tromey.com>
12882
12883 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12884 type of "to_do". Update.
12885 (compute_stack_depth): Use std::vector.
12886
52d214d3
TT
128872017-04-12 Tom Tromey <tom@tromey.com>
12888
12889 * printcmd.c (find_instruction_backward): Use std::vector.
12890
4c404b8b
TT
128912017-04-12 Tom Tromey <tom@tromey.com>
12892
12893 * symfile.c (objfilep): Remove typedef.
12894 (reread_symbols): Use a std::vector.
12895
156d9eab
TT
128962017-04-12 Tom Tromey <tom@tromey.com>
12897
12898 * mi/mi-main.c (exec_direction_forward): Remove.
12899 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12900 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12901 scoped_restore.
12902 * guile/guile.c (guile_repl_command, guile_command)
12903 (gdbscm_execute_gdb_command): Use scoped_restore.
12904 * go-exp.y (go_parse): Use scoped_restore.
12905 * d-exp.y (d_parse): Use scoped_restore.
12906 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12907 * c-exp.y (c_parse): Use scoped_restore.
12908
4d89769a
TT
129092017-04-12 Tom Tromey <tom@tromey.com>
12910
12911 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12912 (mi_parse): Update return type.
12913 (mi_parse_free): Remove.
12914 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12915 (mi_parse::~mi_parse): Rename from mi_parse_free.
12916 (mi_parse_cleanup): Remove.
12917 (mi_parse): Return a unique_ptr. Use new.
12918 * mi/mi-main.c (mi_execute_command): Update.
12919
4b217cc7
TT
129202017-04-12 Tom Tromey <tom@tromey.com>
12921
12922 * location.c (explicit_location_lex_one): Return a
12923 unique_xmalloc_ptr.
12924 (string_to_explicit_location): Update. Remove cleanups.
12925
59d3651b
TT
129262017-04-12 Tom Tromey <tom@tromey.com>
12927
12928 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12929 (compare_value_and_voffset): Change type. Update.
12930 (compute_vtable_size): Change type of "offset_vec".
12931 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12932 (gnuv3_get_typeid): Remove extraneous declaration.
12933
b24b0d6c
TT
129342017-04-12 Tom Tromey <tom@tromey.com>
12935
12936 * charset.h (wchar_iterator): Fix comment.
12937
80a3b8c5
TT
129382017-04-12 Tom Tromey <tom@tromey.com>
12939
12940 * charset.c (iconv_wrapper): New class.
12941 (cleanup_iconv): Remove.
12942 (convert_between_encodings): Use it.
12943
c83dd867
TT
129442017-04-12 Tom Tromey <tom@tromey.com>
12945
12946 * symfile.h (increment_reading_symtab): Update type.
12947 * symfile.c (decrement_reading_symtab): Remove.
12948 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12949 * psymtab.c (psymtab_to_symtab): Update.
12950 * dwarf2read.c (dw2_instantiate_symtab): Update.
12951
0e8621a0
TT
129522017-04-12 Tom Tromey <tom@tromey.com>
12953
12954 * jit.c (struct jit_reader): Declare separately. Add constructor
12955 and destructor. Change type of "handle".
12956 (loaded_jit_reader): Define separately.
12957 (jit_reader_load): Update. New "new".
12958 (jit_reader_unload_command): Use "delete".
12959 * gdb-dlfcn.h (struct dlclose_deleter): New.
12960 (gdb_dlhandle_up): New typedef.
12961 (gdb_dlopen, gdb_dlsym): Update types.
12962 (gdb_dlclose): Remove.
12963 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12964 (gdb_dlsym): Change type of "handle".
12965 (make_cleanup_dlclose): Remove.
12966 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12967 * compile/compile-c-support.c (load_libcc): Update.
12968
67d89901
TT
129692017-04-12 Tom Tromey <tom@tromey.com>
12970
12971 * symtab.h (find_pcs_for_symtab_line): Change return type.
12972 * symtab.c (find_pcs_for_symtab_line): Change return type.
12973 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12974 type of "vec". Update.
12975 (ltpy_get_pcs_for_line): Update.
12976 * linespec.c (decode_digits_ordinary): Update.
12977
93921405
TT
129782017-04-12 Tom Tromey <tom@tromey.com>
12979
12980 * tracepoint.c (actions_command): Update.
12981 * python/python.c (python_command, python_interactive_command):
12982 Update.
12983 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12984 * guile/guile.c (guile_command): Update.
12985 * defs.h (read_command_lines, read_command_lines_1): Return
12986 command_line_up.
12987 (command_lines_deleter): New struct.
12988 (command_line_up): New typedef.
12989 * compile/compile.c (compile_code_command)
12990 (compile_print_command): Update.
12991 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12992 command_line_up.
12993 (make_cleanup_free_command_lines): Remove.
12994 * cli/cli-script.c (get_command_line, read_command_lines_1)
12995 (copy_command_lines): Return command_line_up.
12996 (while_command, if_command, read_command_lines, define_command)
12997 (document_command): Update.
12998 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12999 Remove.
13000 * breakpoint.h (breakpoint_set_commands): Change type of
13001 "commands".
13002 * breakpoint.c (breakpoint_set_commands): Change type of
13003 "commands". Update.
13004 (do_map_commands_command, update_dprintf_command_list)
13005 (create_tracepoint_from_upload): Update.
13006
ffc2605c
TT
130072017-04-12 Tom Tromey <tom@tromey.com>
13008
13009 * tracepoint.c (scope_info): Update.
13010 * spu-tdep.c (spu_catch_start): Update.
13011 * python/python.c (gdbpy_decode_line): Update.
13012 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13013 * python/py-breakpoint.c (bppy_init): Update.
13014 * probe.c (parse_probes): Update.
13015 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13016 * location.h (event_location_deleter): New struct.
13017 (event_location_up): New typedef.
13018 (new_linespec_location, new_address_location, new_probe_location)
13019 (new_explicit_location, copy_event_location)
13020 (string_to_event_location, string_to_event_location_basic)
13021 (string_to_explicit_location): Update return type.
13022 (make_cleanup_delete_event_location): Remove.
13023 * location.c (new_linespec_location, new_address_location)
13024 (new_probe_location, new_explicit_location, copy_event_location):
13025 Return event_location_up.
13026 (delete_event_location_cleanup)
13027 (make_cleanup_delete_event_location): Remove.
13028 (string_to_explicit_location, string_to_event_location_basic)
13029 (string_to_event_location): Return event_location_up.
13030 * linespec.c (canonicalize_linespec, event_location_to_sals)
13031 (decode_line_with_current_source)
13032 (decode_line_with_last_displayed, decode_objc): Update.
13033 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13034 * completer.c (location_completer): Update.
13035 * cli/cli-cmds.c (edit_command, list_command): Update.
13036 * breakpoint.c (create_overlay_event_breakpoint)
13037 (create_longjmp_master_breakpoint)
13038 (create_std_terminate_master_breakpoint)
13039 (create_exception_master_breakpoint)
13040 (create_thread_event_breakpoint): Update.
13041 (init_breakpoint_sal): Update. Remove some dead code.
13042 (create_breakpoint_sal): Change type of "location". Update.
13043 (create_breakpoints_sal, create_breakpoint, break_command_1)
13044 (dprintf_command, break_range_command, until_break_command)
13045 (init_ada_exception_breakpoint)
13046 (strace_marker_create_sals_from_location)
13047 (update_static_tracepoint, trace_command, ftrace_command)
13048 (strace_command, create_tracepoint_from_upload): Update.
13049 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13050 * ax-gdb.c (agent_command_1): Update.
13051
8f10c932
PA
130522017-04-12 Pedro Alves <palves@redhat.com>
13053
13054 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13055 * configure.tgt: Handle i[34567]86-*-go32* and
13056 i[34567]86-*-msdosdjgpp*.
13057 * i386-tdep.c (i386_svr4_reg_to_regnum):
13058 Make extern.
13059 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13060 i386-go32-tdep.c.
13061 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13062 * i386-go32-tdep.c: New file.
13063 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13064 declarations.
13065
0a31ccfb
SM
130662017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13067
13068 * aix-thread.c (pd_status2str): Change return type to const char *.
13069
e9bb3fbb
PA
130702017-04-12 Pedro Alves <palves@redhat.com>
13071
13072 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13073 calls to set_gdbarch_gnu_triplet_regexp.
13074
53375380
PA
130752017-04-12 Pedro Alves <palves@redhat.com>
13076
13077 PR gdb/21323
13078 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13079 New enum value.
13080 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13081 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13082 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13083 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13084 * gdbarch.h, gdbarch.c: Regenerate.
13085 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13086 gdbarch_wchar_bit and gdbarch_wchar_signed.
13087 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13088 * arm-tdep.c (arm_gdbarch_init): Likewise.
13089 * avr-tdep.c (avr_gdbarch_init): Likewise.
13090 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13091 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13092 * i386-tdep.c (i386_go32_init_abi): Likewise.
13093 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13094 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13095 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13096 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13097 * sh-tdep.c (sh_gdbarch_init): Likewise.
13098 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13099 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13100 * windows-tdep.c (windows_init_abi): Likewise.
13101 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13102
53e710ac
PA
131032017-04-12 Pedro Alves <palves@redhat.com>
13104
13105 PR c++/21323
13106 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13107 cplus_primitive_type_char32_t>: New enum values.
13108 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13109 and cplus_primitive_type_char32_t.
13110 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13111 32, use the archtecture's built-in type for char16_t and char32_t,
13112 respectively. Otherwise, fallback to init_integer_type as before,
13113 but make the type unsigned, and issue a complaint.
13114 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13115
ab0538b8
AH
131162017-04-12 Alan Hayward <alan.hayward@arm.com>
13117
5e0e0422 13118 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13119 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13120
5430098f
SDJ
131212017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13122
13123 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13124 'const char *'.
13125
7c5ded6a
SDJ
131262017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13127
13128 * common/common-utils.c (free_vector_argv): New function.
13129 * common/common-utils.h: Include <vector>.
13130 (free_vector_argv): New prototype.
13131 * darwin-nat.c (darwin_create_inferior): Rewrite function
13132 prototype in order to constify "exec_file" and accept a
13133 "std::string" for "allargs".
13134 * fork-child.c: Include <vector>.
13135 (breakup_args): Rewrite function, using C++.
13136 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13137 and accept "std::string" for "allargs". Update the code to
13138 calculate "argv" based on "allargs". Update calls to "exec_fun"
13139 and "execvp".
13140 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13141 order to constify "exec_file" and accept a "std::string" for
13142 "allargs".
13143 * go32-nat.c (go32_create_inferior): Likewise.
13144 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13145 * infcmd.c (run_command_1): Constify "exec_file". Use
13146 "std::string" for inferior arguments.
13147 * inferior.h (fork_inferior): Update prototype.
13148 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13149 prototype in order to constify "exec_file" and accept a
13150 "std::string" for "allargs".
13151 * nto-procfs.c (procfs_create_inferior): Likewise.
13152 * procfs.c (procfs_create_inferior): Likewise.
13153 * remote-sim.c (gdbsim_create_inferior): Likewise.
13154 * remote.c (extended_remote_run): Update code to accept
13155 "std::string" as argument.
13156 (extended_remote_create_inferior): Rewrite function prototype in
13157 order to constify "exec_file" and accept a "std::string" for
13158 "allargs".
13159 * rs6000-nat.c (super_create_inferior): Likewise.
13160 (rs6000_create_inferior): Likewise.
13161 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13162 * windows-nat.c (windows_create_inferior): Likewise.
13163
ae0eee42
PA
131642017-04-11 Pedro Alves <palves@redhat.com>
13165
13166 * thread.c: Fix whitespace throughout.
13167
a6acac06
PR
131682017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13169
13170 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13171
64403bd1
AH
131722017-04-11 Alan Hayward <alan.hayward@arm.com>
13173
13174 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13175
a5bef50f
SDJ
131762017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13177
13178 PR gdb/21364
13179 * osdata.c (info_osdata): Check if 'type' is an empty string
13180 instead of NULL.
13181
9295a5a9
PA
131822017-04-10 Pedro Alves <palves@redhat.com>
13183
13184 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13185 (ptid_to_global_thread_id, in_thread_list)
13186 (do_captured_list_thread_ids, set_resumed, set_running)
13187 (set_executing, set_stop_requested, finish_thread_state)
13188 (validate_registers_access, can_access_registers_ptid)
13189 (print_thread_info_1, switch_to_thread)
13190 (do_restore_current_thread_cleanup)
13191 (make_cleanup_restore_current_thread, thread_command)
13192 (thread_name_command): Use operator== instead of ptid_equal.
13193
996812e3
PA
131942017-04-10 Pedro Alves <palves@redhat.com>
13195
13196 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13197 (current_thread_cleanup_chain): Delete.
13198 (restore_current_thread_cleanup_dtor)
13199 (make_cleanup_restore_current_thread): Remove references to
13200 current_thread_cleanup_chain.
13201
845b344f
AH
132022017-04-10 Alan Hayward <alan.hayward@arm.com>
13203
13204 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13205 REG_UNKNOWN.
13206
803bdfe4
YQ
132072017-04-10 Yao Qi <yao.qi@linaro.org>
13208
13209 PR gdb/19942
13210 * gdbthread.h (thread_info::deletable): New method.
13211 (thread_info::incref): New method.
13212 (thread_info::decref): New method.
13213 (thread_info::refcount): Move it to private.
13214 * infrun.c (save_stop_context): Call inc_refcount.
13215 (release_stop_context_cleanup): Likewise.
13216 * thread.c (set_thread_exited): New function.
13217 (init_thread_list): Delete "tp" only it is deletable, otherwise
13218 call set_thread_exited.
13219 (delete_thread_1): Call set_thread_exited.
13220 (current_thread_cleanup) <inferior_pid>: Remove.
13221 <thread>: New field.
13222 (restore_current_thread_ptid_changed): Removed.
13223 (do_restore_current_thread_cleanup): Adjust.
13224 (restore_current_thread_cleanup_dtor): Don't call
13225 find_thread_ptid.
13226 (set_thread_refcount): Use dec_refcount.
13227 (make_cleanup_restore_current_thread): Adjust.
13228 (thread_apply_all_command): Call inc_refcount.
13229 (_initialize_thread): Don't call
13230 observer_attach_thread_ptid_changed.
13231
8c25b497
YQ
132322017-04-10 Yao Qi <yao.qi@linaro.org>
13233
13234 * thread.c (delete_thread_1): Hoist code on marking thread as
13235 exited.
13236
8473b447
SM
132372017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13238
13239 * windows-nat.c (windows_detach): Initialize ptid with
13240 minus_one_ptid.
13241
6670ec13
SM
132422017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13243
13244 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13245
ba2f91bb
AH
132462017-04-07 Alan Hayward <alan.hayward@arm.com>
13247
13248 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13249 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13250 (bfin_pseudo_register_write): Likewise
13251
436252de
SM
132522017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13253
13254 * common/ptid.h (struct ptid): Change to...
13255 (class ptid_t): ... this.
13256 <ptid_t>: New constructors.
13257 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13258 matches>: New methods.
13259 <make_null, make_minus_one>: New static methods.
13260 <pid>: Rename to...
13261 <m_pid>: ...this.
13262 <lwp>: Rename to...
13263 <m_lwp>: ...this.
13264 <tid>: Rename to...
13265 <m_tid>: ...this.
13266 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13267 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13268 as references, move comment to class ptid_t.
13269 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13270 ptid_t static methods.
13271 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13272 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13273 Take ptid arguments as references, implement using ptid_t methods.
13274 * unittests/ptid-selftests.c: New file.
13275 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13276 unittests/ptid-selftests.c.
13277 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13278
0dedf377
TP
132792017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13280
13281 * python/python.c (python_run_simple_file): Cast mode literal to
13282 non-const char pointer as expected by PyFile_FromString.
13283
4e9868d4
SM
132842017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13285
13286 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13287 minus_one_ptid and null_ptid.
13288
9bf2a700
PA
132892017-04-05 Pedro Alves <palves@redhat.com>
13290
13291 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13292 * configure: Regenerate.
13293
a121b7c1
PA
132942017-04-05 Pedro Alves <palves@redhat.com>
13295
13296 * ada-exp.y (yyerror): Constify.
13297 * ada-lang.c (bound_name, get_selections)
13298 (ada_variant_discrim_type)
13299 (ada_variant_discrim_name, ada_value_struct_elt)
13300 (ada_lookup_struct_elt_type, is_unchecked_variant)
13301 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13302 (catch_ada_exception_command_split)
13303 (catch_ada_assert_command_split, catch_assert_command)
13304 (ada_op_name): Constify.
13305 * ada-lang.h (ada_yyerror, get_selections)
13306 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13307 * arc-tdep.c (arc_print_frame_cache): Constify.
13308 * arm-tdep.c (arm_skip_stub): Constify.
13309 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13310 (gen_aggregate_elt_ref): Constify.
13311 * bcache.c (print_bcache_statistics): Constify.
13312 * bcache.h (print_bcache_statistics): Constify.
13313 * break-catch-throw.c (catch_exception_command_1):
13314 * breakpoint.c (struct ep_type_description::description):
13315 Constify.
13316 (add_solib_catchpoint): Constify.
13317 (catch_fork_command_1): Add cast.
13318 (add_catch_command): Constify.
13319 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13320 Constify.
13321 * bsd-uthread.c (bsd_uthread_state): Constify.
13322 * buildsym.c (patch_subfile_names): Constify.
13323 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13324 Constify.
13325 * c-exp.y (yyerror): Constify.
13326 (token::oper): Constify.
13327 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13328 * c-varobj.c (cplus_describe_child): Constify.
13329 * charset.c (find_charset_names): Add cast.
13330 (find_charset_names): Constify array and add const_cast.
13331 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13332 (edit_command): Constify.
13333 * cli/cli-decode.c (lookup_cmd): Constify.
13334 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13335 Constify.
13336 (struct dump_context): Constify.
13337 (add_dump_command, restore_command): Constify.
13338 * cli/cli-script.c (get_command_line): Constify.
13339 * cli/cli-script.h (get_command_line): Constify.
13340 * cli/cli-utils.c (check_for_argument): Constify.
13341 * cli/cli-utils.h (check_for_argument): Constify.
13342 * coff-pe-read.c (struct read_pe_section_data): Constify.
13343 * command.h (lookup_cmd): Constify.
13344 * common/print-utils.c (decimal2str): Constify.
13345 * completer.c (gdb_print_filename): Constify.
13346 * corefile.c (set_gnutarget): Constify.
13347 * cp-name-parser.y (yyerror): Constify.
13348 * cp-valprint.c (cp_print_class_member): Constify.
13349 * cris-tdep.c (cris_register_name, crisv32_register_name):
13350 Constify.
13351 * d-exp.y (yyerror): Constify.
13352 (struct token::oper): Constify.
13353 * d-lang.h (d_yyerror): Constify.
13354 * dbxread.c (struct header_file_location::name): Constify.
13355 (add_old_header_file, add_new_header_file, last_function_name)
13356 (dbx_next_symbol_text, add_bincl_to_list)
13357 (find_corresponding_bincl_psymtab, set_namestring)
13358 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13359 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13360 * defs.h (command_line_input, print_address_symbolic)
13361 (deprecated_readline_begin_hook): Constify.
13362 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13363 Constify.
13364 * event-top.c (handle_line_of_input): Constify and add cast.
13365 * exceptions.c (catch_errors): Constify.
13366 * exceptions.h (catch_errors): Constify.
13367 * expprint.c (print_subexp_standard, op_string, op_name)
13368 (op_name_standard, dump_raw_expression, dump_raw_expression):
13369 * expression.h (op_name, op_string, dump_raw_expression):
13370 Constify.
13371 * f-exp.y (yyerror): Constify.
13372 (struct token::oper): Constify.
13373 (struct f77_boolean_val::name): Constify.
13374 * f-lang.c (f_word_break_characters): Constify.
13375 * f-lang.h (f_yyerror): Constify.
13376 * fork-child.c (fork_inferior): Add cast.
13377 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13378 (new_variant): Constify.
13379 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13380 * gdbarch.c: Regenerate.
13381 * gdbcore.h (set_gnutarget): Constify.
13382 * go-exp.y (yyerror): Constify.
13383 (token::oper): Constify.
13384 * go-lang.h (go_yyerror): Constify.
13385 * go32-nat.c (go32_sysinfo): Constify.
13386 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13387 * guile/scm-cmd.c (cmdscm_function): Constify.
13388 * guile/scm-param.c (pascm_param_value): Constify.
13389 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13390 (h8300sx_register_name): Constify.
13391 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13392 Constify.
13393 * ia64-tdep.c (ia64_register_names): Constify.
13394 * infcmd.c (construct_inferior_arguments): Constify.
13395 (path_command, attach_post_wait): Constify.
13396 * language.c (show_range_command, show_case_command)
13397 (unk_lang_error): Constify.
13398 * language.h (language_defn::la_error)
13399 (language_defn::la_name_of_this): Constify.
13400 * linespec.c (decode_line_2): Constify.
13401 * linux-thread-db.c (thread_db_err_str): Constify.
13402 * lm32-tdep.c (lm32_register_name): Constify.
13403 * m2-exp.y (yyerror): Constify.
13404 * m2-lang.h (m2_yyerror): Constify.
13405 * m32r-tdep.c (m32r_register_names): Constify and make static.
13406 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13407 * m88k-tdep.c (m88k_register_name): Constify.
13408 * macroexp.c (appendmem): Constify.
13409 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13410 (upgrade_type, parse_external, parse_partial_symbols)
13411 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13412 (new_symbol): Constify.
13413 * memattr.c (mem_info_command): Constify.
13414 * mep-tdep.c (register_name_from_keyword): Constify.
13415 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13416 Constify.
13417 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13418 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13419 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13420 cast.
13421 (mi_execute_async_cli_command): Constify.
13422 * mips-tdep.c (mips_register_name): Constify.
13423 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13424 (am33_register_name, am33_2_register_name)
13425 * moxie-tdep.c (moxie_register_names): Constify.
13426 * nat/linux-osdata.c (osdata_type): Constify fields.
13427 * nto-tdep.c (nto_parse_redirection): Constify.
13428 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13429 (lookup_child_selector): Constify.
13430 (objc_methcall::name): Constify.
13431 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13432 (lookup_struct_typedef): Constify.
13433 * objfiles.c (pc_in_section): Constify.
13434 * objfiles.h (pc_in_section): Constify.
13435 * p-exp.y (struct token::oper): Constify.
13436 (yyerror): Constify.
13437 * p-lang.h (pascal_yyerror): Constify.
13438 * parser-defs.h (op_name_standard): Constify.
13439 (op_print::string): Constify.
13440 (exp_descriptor::op_name): Constify.
13441 * printcmd.c (print_address_symbolic): Constify.
13442 * psymtab.c (print_partial_symbols): Constify.
13443 * python/py-breakpoint.c (stop_func): Constify.
13444 (bppy_get_expression): Constify.
13445 * python/py-cmd.c (cmdpy_completer::name): Constify.
13446 (cmdpy_function): Constify.
13447 * python/py-event.c (evpy_add_attribute)
13448 (gdbpy_initialize_event_generic): Constify.
13449 * python/py-event.h (evpy_add_attribute)
13450 (gdbpy_initialize_event_generic): Constify.
13451 * python/py-evts.c (add_new_registry): Constify.
13452 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13453 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13454 * python/py-inferior.c (get_buffer): Add cast.
13455 * python/py-param.c (parm_constant::name): Constify.
13456 * python/py-unwind.c (fprint_frame_id): Constify.
13457 * python/python.c (gdbpy_parameter_value): Constify.
13458 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13459 * remote.c (memory_packet_config::name): Constify.
13460 (show_packet_config_cmd, remote_write_bytes)
13461 (remote_buffer_add_string):
13462 * reverse.c (exec_reverse_once): Constify.
13463 * rs6000-tdep.c (variant::name, variant::description): Constify.
13464 * rust-exp.y (rustyyerror): Constify.
13465 * rust-lang.c (rust_op_name): Constify.
13466 * rust-lang.h (rustyyerror): Constify.
13467 * serial.h (serial_ops::name): Constify.
13468 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13469 (sh_sh3e_register_name, sh_sh2e_register_name)
13470 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13471 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13472 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13473 (sh_sh4al_dsp_register_name): Constify.
13474 * sh64-tdep.c (sh64_register_name): Constify.
13475 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13476 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13477 * stabsread.c (patch_block_stabs, read_type_number)
13478 (ref_map::stabs, ref_add, process_reference)
13479 (symbol_reference_defined, define_symbol, define_symbol)
13480 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13481 (read_one_struct_field, read_struct_fields, read_baseclasses)
13482 (read_tilde_fields, read_struct_type, read_array_type)
13483 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13484 (read_huge_number, read_range_type, read_args, common_block_start)
13485 (find_name_end): Constify.
13486 * stabsread.h (common_block_start, define_symbol)
13487 (process_one_symbol, symbol_reference_defined, ref_add):
13488 * symfile.c (get_section_index, add_symbol_file_command):
13489 * symfile.h (get_section_index): Constify.
13490 * target-descriptions.c (tdesc_type::name): Constify.
13491 (tdesc_free_type): Add cast.
13492 * target.c (find_default_run_target):
13493 (add_deprecated_target_alias, find_default_run_target)
13494 (target_announce_detach): Constify.
13495 (do_option): Constify.
13496 * target.h (add_deprecated_target_alias): Constify.
13497 * thread.c (print_thread_info_1): Constify.
13498 * top.c (deprecated_readline_begin_hook, command_line_input):
13499 Constify.
13500 (init_main): Add casts.
13501 * top.h (handle_line_of_input): Constify.
13502 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13503 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13504 (tfind_command): Rename to ...
13505 (tfind_command_1): ... this and constify.
13506 (tfind_command): New function.
13507 (tfind_end_command, tfind_start_command): Adjust.
13508 (encode_source_string): Constify.
13509 * tracepoint.h (encode_source_string): Constify.
13510 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13511 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13512 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13513 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13514 * tui/tui-win.c (parse_scrolling_args): Constify.
13515 * tui/tui-windata.c (tui_erase_data_content): Constify.
13516 * tui/tui-windata.h (tui_erase_data_content): Constify.
13517 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13518 * tui/tui.c (tui_enable): Add cast.
13519 * utils.c (defaulted_query): Constify.
13520 (init_page_info): Add cast.
13521 (puts_debug, subset_compare): Constify.
13522 * utils.h (subset_compare): Constify.
13523 * varobj.c (varobj_format_string): Constify.
13524 * varobj.h (varobj_format_string): Constify.
13525 * vax-tdep.c (vax_register_name): Constify.
13526 * windows-nat.c (windows_detach): Constify.
13527 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13528 * xml-support.c (gdb_xml_end_element): Constify.
13529 * xml-tdesc.c (tdesc_start_reg): Constify.
13530 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13531 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13532 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13533
995816ba
PA
135342017-04-05 Pedro Alves <palves@redhat.com>
13535
13536 * proc-api.c (struct trans): Constify.
13537 (procfs_note): Constify.
13538 * proc-events.c (struct trans, syscall_table):
13539 * proc-flags.c (struct trans): Constify.
13540 * proc-utils.h (procfs_note): Constify.
13541 * proc-why.c (struct trans): Constify.
13542 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13543 (procfs_detach): Constify.
13544 * sol-thread.c (struct string_map): Constify.
13545 (td_err_string, td_state_string): Constify.
13546
3e83a920
PA
135472017-04-05 Pedro Alves <palves@redhat.com>
13548
13549 * proc-api.c (procfs_filename): Don't initialize
13550 procfs_filename.
13551 (prepare_to_trace): Assume procfs_filename is non-NULL.
13552 (_initialize_proc_api): Give procfs_filename a default value here.
13553
63160a43
PA
135542017-04-05 Pedro Alves <palves@redhat.com>
13555
13556 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13557 'cond_string' parameter.
13558 (extract_exception_regexp): Constify 'string' parameter.
13559 (catch_exception_command_1): Constify.
13560 * breakpoint.c (init_catchpoint)
13561 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13562 parameter.
13563 (ep_parse_optional_if_clause, catch_fork_command_1)
13564 (catch_exec_command_1): Constify.
13565 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13566 parameter.
13567 (ep_parse_optional_if_clause): Constify.
13568 * cli/cli-utils.c (remove_trailing_whitespace)
13569 (check_for_argument): Constify.
13570 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13571 non-const overload.
13572 (check_for_argument): Likewise.
13573
9b2eba3d
PA
135742017-04-05 Pedro Alves <palves@redhat.com>
13575
13576 * event-top.c (command_line_handler): Add cast to execute_command
13577 call.
13578 * record-btrace.c (cmd_record_btrace_bts_start)
13579 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13580 (cmd_record_btrace_start): Add cast to execute_command call.
13581 * record-full.c (record_full_goto_insn):
13582 * record.c (record_start, record_stop): Add cast to
13583 execute_command_to_string calls.
13584 (cmd_record_start): Add cast to execute_command calls.
13585
2adadf51
PA
135862017-04-05 Pedro Alves <palves@redhat.com>
13587
13588 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13589 static inline function.
13590 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13591 array and use gdb_PyArg_ParseTupleAndKeywords.
13592 * python/py-cmd.c (cmdpy_init): Likewise.
13593 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13594 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13595 (infpy_search_memory): Likewise.
13596 * python/py-objfile.c (objfpy_add_separate_debug_file)
13597 (gdbpy_lookup_objfile): Likewise.
13598 * python/py-symbol.c (gdbpy_lookup_symbol)
13599 (gdbpy_lookup_global_symbol): Likewise.
13600 * python/py-type.c (gdbpy_lookup_type): Likewise.
13601 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13602 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13603 Likewise.
13604
0d1f4ceb
PA
136052017-04-05 Pedro Alves <palves@redhat.com>
13606
13607 * python/python-internal.h (gdb_PyGetSetDef): New type.
13608 * python/py-block.c (block_object_getset)
13609 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13610 * python/py-event.c (event_object_getset)
13611 (finish_breakpoint_object_getset): Likewise.
13612 * python/py-inferior.c (inferior_object_getset): Likewise.
13613 * python/py-infthread.c (thread_object_getset): Likewise.
13614 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13615 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13616 * python/py-objfile.c (objfile_getset): Likewise.
13617 * python/py-progspace.c (pspace_getset): Likewise.
13618 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13619 Likewise.
13620 * python/py-record.c (recpy_record_getset): Likewise.
13621 * python/py-symbol.c (symbol_object_getset): Likewise.
13622 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13623 Likewise.
13624 * python/py-type.c (type_object_getset, field_object_getset):
13625 Likewise.
13626 * python/py-value.c (value_object_getset): Likewise.
13627
4d759979
PA
136282017-04-05 Pedro Alves <palves@redhat.com>
13629
13630 * python/python-internal.h (gdb_PyObject_CallMethod)
13631 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13632 New functions.
13633 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13634 (PySys_GetObject, PySys_SetPath): New macros.
13635
fdf9e36f
PA
136362017-04-05 Pedro Alves <palves@redhat.com>
13637
13638 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13639 info_osdata_command.
13640 * osdata.c (info_osdata_command): Rename to ...
13641 (info_osdata): ... this. Constify 'type' parameter, and remove
13642 the 'from_tty' parameter. Accept NULL TYPE.
13643 (info_osdata_command): New function.
13644 * osdata.h (info_osdata_command): Remove declaration.
13645 (info_osdata): New declaration.
13646
9f33b8b7
PA
136472017-04-05 Pedro Alves <palves@redhat.com>
13648
13649 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13650 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13651 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13652 parameter.
13653 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13654 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13655 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13656 parameter.
13657 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13658 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13659 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13660 (mi_cmd_file_list_exec_source_files)
13661 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13662 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13663 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13664 parameter.
13665 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13666 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13667 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13668 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13669 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13670 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13671 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13672 'command' parameter.
13673 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13674 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13675 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13676 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13677 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13678 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13679 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13680 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13681 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13682 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13683 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13684 parameter.
13685 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13686 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13687 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13688 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13689 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13690 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13691 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13692 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13693 (mi_cmd_data_list_changed_registers)
13694 (mi_cmd_data_write_register_values)
13695 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13696 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13697 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13698 (mi_cmd_list_features, mi_cmd_list_target_features)
13699 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13700 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13701 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13702 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13703 (mi_cmd_trace_frame_collected): Constify 'command'
13704 parameter.
13705 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13706 'command' parameter.
13707
67cb5b2d
PA
137082017-04-05 Pedro Alves <palves@redhat.com>
13709
13710 * ada-lang.c (ada_completer_word_break_characters): Now a const
13711 array.
13712 (ada_get_gdb_completer_word_break_characters): Constify.
13713 * completer.c (gdb_completer_command_word_break_characters)
13714 (gdb_completer_file_name_break_characters)
13715 (gdb_completer_quote_characters): Now const arrays.
13716 (get_gdb_completer_quote_characters): Constify.
13717 (set_rl_completer_word_break_characters): New function.
13718 (set_gdb_completion_word_break_characters)
13719 (complete_line_internal): Use it.
13720 * completer.h (get_gdb_completer_quote_characters): Constify.
13721 (set_rl_completer_word_break_characters): Declare.
13722 * f-lang.c (f_word_break_characters): Constify.
13723 * language.c (default_word_break_characters): Constify.
13724 * language.h (language_defn::la_word_break_characters): Constify.
13725 (default_word_break_characters): Constify.
13726 * top.c (init_main): Use set_rl_completer_word_break_characters.
13727
7a114964
PA
137282017-04-05 Pedro Alves <palves@redhat.com>
13729
13730 * aix-thread.c (aix_thread_pid_to_str)
13731 (aix_thread_extra_thread_info): Constify.
13732 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13733 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13734 (bsd_uthread_pid_to_str): Constify.
13735 * corelow.c (core_pid_to_str): Constify.
13736 * darwin-nat.c (darwin_pid_to_str): Constify.
13737 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13738 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13739 Constify.
13740 * gnu-nat.c (gnu_pid_to_str): Constify.
13741 * go32-nat.c (go32_pid_to_str): Constify.
13742 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13743 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13744 * inferior.c (inferior_pid_to_str): Constify.
13745 * linux-nat.c (linux_nat_pid_to_str): Constify.
13746 * linux-tdep.c (linux_core_pid_to_str): Constify.
13747 * linux-thread-db.c (thread_db_pid_to_str)
13748 (thread_db_extra_thread_info): Constify.
13749 * nto-tdep.c (nto_extra_thread_info): Constify.
13750 * nto-tdep.h (nto_extra_thread_info): Constify.
13751 * obsd-nat.c (obsd_pid_to_str): Constify.
13752 * procfs.c (procfs_pid_to_str): Constify.
13753 * ravenscar-thread.c (ravenscar_extra_thread_info)
13754 (ravenscar_pid_to_str): Constify.
13755 * remote-sim.c (gdbsim_pid_to_str): Constify.
13756 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13757 Constify.
13758 * sol-thread.c (solaris_pid_to_str): Constify.
13759 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13760 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13761 * target.c (default_pid_to_str, target_pid_to_str)
13762 (normal_pid_to_str, default_pid_to_str): Constify.
13763 * target.h (target_ops::to_pid_to_str)
13764 (target_ops::to_extra_thread_info): Constify.
13765 (target_pid_to_str, normal_pid_to_str): Constify.
13766 * windows-nat.c (windows_pid_to_str): Constify.
13767 * gdbarch.sh (core_pid_to_str): Constify.
13768 * target-delegates.c: Regenerate.
13769 * gdbarch.h, gdbarch.c: Regenerate.
13770
69bbf465
PA
137712017-04-05 Pedro Alves <palves@redhat.com>
13772
13773 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13774 the memory of the temporary warning_pre_print override.
13775 * utils.c (warning_pre_print): Constify.
13776 * utils.h (warning_pre_print): Constify.
13777
be47f9e8
PA
137782017-04-05 Pedro Alves <palves@redhat.com>
13779
13780 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13781 (shell_command): New function.
13782 (make_command): Use std::string.
13783 (init_cli_cmds): Register shell_command instead of shell_escape.
13784
bde6261a
PA
137852017-04-05 Pedro Alves <palves@redhat.com>
13786
13787 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13788 * tracepoint.c (default_collect): Don't initialize.
13789
b38ef47f
PA
137902017-04-05 Pedro Alves <palves@redhat.com>
13791
13792 * macroexp.c (macro_buffer::shared): Now a bool.
13793 (init_buffer): Update.
13794 (init_shared_buffer): Constify 'addr' parameter.
13795 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13796 casts.
13797
f995bbe8
PA
137982017-04-05 Pedro Alves <palves@redhat.com>
13799
13800 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13801 * disasm.c (set_disassembler_options): Constify local.
13802 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13803
4a596fe2
SDJ
138042017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13805
13806 PR gdb/21352
13807 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13808 option.
13809
2cad08ea
YQ
138102017-04-05 Yao Qi <yao.qi@linaro.org>
13811
13812 * frame.c (frame_unwind_register_unsigned): Call
13813 frame_unwind_register_value.
13814
55a98976
YQ
138152017-04-05 Yao Qi <yao.qi@linaro.org>
13816
13817 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13818 Use gdb_test_multiple, and don't match anchor.
13819
4ac40124
PA
138202017-04-05 Pedro Alves <palves@redhat.com>
13821
13822 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13823 (Write After Approval): Remove Simon Marchi.
13824
c053b654
PA
138252017-04-05 Pedro Alves <palves@redhat.com>
13826
13827 * common/gdb_optional.h (optional::optional): Make constexpr and
13828 initialize m_dummy.
13829
4c7bf4f9
JB
138302017-04-04 John Baldwin <jhb@FreeBSD.org>
13831
13832 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13833 (amd64fbsd_jmp_buf_reg_offset): Remove.
13834 (amd64fbsd_supply_uthread): Remove function.
13835 (amd64fbsd_collect_uthread): Remove function.
13836 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13837 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13838 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13839 (fbsd-nat.c): Update comment.
13840 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13841 (i386fbsd_jmp_buf_reg_offset): Remove.
13842 (i386fbsd_supply_uthread): Remove function.
13843 (i386fbsd_collect_uthread): Remove function.
13844 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13845
1e1a8bef
JB
138462017-04-04 John Baldwin <jhb@FreeBSD.org>
13847
13848 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13849 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13850 * NEWS: Mention that support for FreeBSD/alpha was removed.
13851 * alpha-fbsd-tdep.c: Delete file.
13852 * config/alpha/fbsd.mh: Delete file.
13853 * configure.host: Delete alpha*-*-freebsd* and
13854 alpha*-*-kfreebsd*-gnu.
13855 * configure.tgt: Delete alpha*-*-freebsd* and
13856 alpha*-*-kfreebsd*-gnu.
13857
49907934
JB
138582017-04-04 John Baldwin <jhb@FreeBSD.org>
13859
13860 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13861 amd64bsd_store_inferior_registers): Use ptid from regcache.
13862
6f77053d
PA
138632017-04-04 Pedro Alves <palves@redhat.com>
13864
13865 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13866 data fields, make them private and add "m_" prefixes.
13867 (lnp_state_machine::lnp_state_machine): New ctor.
13868 (record_line, check_line_address, handle_set_discriminator)
13869 (handle_set_address, handle_advance_pc, handle_special_opcode)
13870 (handle_advance_line, handle_set_file, handle_negate_stmt)
13871 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13872 (end_sequence, advance_line): New methods.
13873 (m_gdbarch, m_record_lines_p): New fields.
13874 (lnp_reader_state): Delete.
13875 (dwarf_record_line): Rename to ...
13876 (lnp_state_machine::record_line): ... adjust.
13877 (init_lnp_state_machine): Delete.
13878 (lnp_state_machine::lnp_state_machine): New.
13879 (check_line_address): Rename to ...
13880 (lnp_state_machine::check_line_address): This.
13881 (dwarf_decode_lines_1): Remove reference to "reader_state".
13882 Adjust lnp_state_machine having a non-default ctor. Use bool.
13883 State machine internal state manipulation moved to
13884 lnp_state_machine methods.
13885
9c541725
PA
138862017-04-04 Pedro Alves <palves@redhat.com>
13887
13888 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13889 unittests/offset-type-selftests.c.
13890 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13891 * common/offset-type.h: New file.
13892 * common/preprocessor.h: New file.
13893 * common/traits.h: New file.
13894 * common/valid-expr.h: New file.
13895 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13896 sect_offset and cu_offset strong typedefs throughout.
13897 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13898 typedefs throughout.
13899 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13900 sect_offset and cu_offset strong typedefs throughout.
13901 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13902 typedefs throughout.
13903 * gdbtypes.h: Include "common/offset-type.h".
13904 (cu_offset): Now an offset type (strong typedef) instead of a
13905 struct.
13906 (sect_offset): Likewise.
13907 (union call_site_parameter_u): Rename "param_offset" field to
13908 "param_cu_off".
13909 * unittests/offset-type-selftests.c: New file.
13910
ecfb656c
PA
139112017-04-04 Pedro Alves <palves@redhat.com>
13912
13913 * common/underlying.h: New file.
13914 * dwarf2read.c: Include "common/gdb_optional.h" and
13915 "common/underlying.h".
13916 (dir_index, file_name_index): New types.
13917 (file_entry): Use them.
13918 (file_entry::include): Use to_underlying.
13919 (line_header::add_file_name): Use dir_index.
13920 (read_formatted_entries): Use gdb::optional. Read form before
13921 writting to file_entry.
13922 (dwarf_decode_line_header): Use dir_index.
13923 (lnp_state_machine::current_file): Use to_underlying.
13924 (lnp_state_machine::file): Change type to file_name_index.
13925 (dwarf_record_line): Use to_underlying.
13926 (init_lnp_state_machine): Use file_name_index.
13927 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13928
d194f1fe
PA
139292017-04-04 Pedro Alves <palves@redhat.com>
13930
13931 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13932 operator bool, has_value and get methods.
13933
fff8551c
PA
139342017-04-04 Pedro Alves <palves@redhat.com>
13935
13936 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13937 fields.
13938 (line_header): Initialize all data fields. Change type of
13939 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13940 Change type of include_dirs to std::vector<const char *>. Remove
13941 num_include_dirs, include_dirs_size. Change type of file_names to
13942 std::vector<file_entry>. Remove num_file_names, file_names_size.
13943 (line_header::line_header): New.
13944 (line_header::add_include_dir, line_header::add_file_name): New
13945 methods.
13946 (line_header::include_dir_at): Remove NULL check.
13947 (line_header::file_name_at): Add const overload.
13948 (line_header_up): New unique_ptr typedef.
13949 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13950 std::vector. Remove free_line_header call.
13951 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13952 free_line_header call.
13953 (free_cu_line_header): Delete.
13954 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13955 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13956 Adjust to use std::vector.
13957 (free_line_header): Delete.
13958 (free_line_header_voidp): Use delete.
13959 (add_include_dir): Replace with ...
13960 (line_header::add_include_dir): ... this method. Use std::vector.
13961 (add_file_name): Replace with ...
13962 (line_header::add_file_name): ... this method. Use std::vector.
13963 (add_include_dir_stub): Delete.
13964 (read_formatted_entries): Remove memset.
13965 (dwarf_decode_line_header): Return a line_header_up instead of a
13966 raw pointer. Remove cleanup handling. Pass lambdas to
13967 read_formatted_entries. Adjust to use line_header methods.
13968 (dwarf_decode_lines_1): Adjust to use line_header methods.
13969 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13970 use std::vector.
13971
d62a8ae2
SM
139722017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13973
13974 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13975 instead of struct ptid.
13976
db3a1dc7
AH
139772017-05-04 Alan Hayward <alan.hayward@arm.com>
13978
13979 * frame.c (get_frame_register_bytes): Unwind using value.
13980 (put_frame_register_bytes): Likewise.
13981
b1b45502
IB
139822017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13983
13984 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13985 aggregate-like.
13986
ec13808e
JK
139872017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13988
13989 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13990
12316564
YQ
139912017-03-29 Yao Qi <yao.qi@linaro.org>
13992
13993 * gdbthread.h (struct thread_info): Declare constructor and
13994 destructor. Add some in-class member initializers.
13995 * thread.c (free_thread): Remove.
13996 (init_thread_list): Call delete instead of free_thread.
13997 (new_thread): Call thread_info constructor.
13998 (thread_info::thread_info): New function.
13999 (thread_info::~thread_info): New function.
14000 (delete_thread_1): Call delete instead of free_thread.
14001 (make_cleanup_restore_current_thread): Move tp and frame to
14002 inner block.
14003
fe5f7374
AK
140042017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14005
14006 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14007 (arc_skip_prologue): Likewise.
14008 (arc_make_frame_cache): Likewise.
14009 (arc_pv_get_operand): New function.
14010 (arc_is_in_prologue): Likewise.
14011 (arc_analyze_prologue): Likewise.
14012 (arc_print_frame_cache): Likewise.
14013 (MAX_PROLOGUE_LENGTH): New constant.
14014
eea78757
AK
140152017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14016
14017 * configure.tgt: Add arc-insn.o.
14018 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14019 (dump_arc_instruction_command): New function.
14020 (arc_fprintf_disasm): Likewise.
14021 (arc_disassemble_info): Likewise.
14022 (arc_insn_get_operand_value): Likewise.
14023 (arc_insn_get_operand_value_signed): Likewise.
14024 (arc_insn_get_memory_base_reg): Likewise.
14025 (arc_insn_get_memory_offset): Likewise.
14026 (arc_insn_get_branch_target): Likewise.
14027 (arc_insn_dump): Likewise.
14028 (arc_insn_get_linear_next_pc): Likewise.
14029 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14030 (arc_disassemble_info): Likewise.
14031 (arc_insn_get_branch_target): Likewise.
14032 (arc_insn_get_linear_next_pc): Likewise.
14033 * NEWS: Mention new "maint print arc arc-instruction".
14034
3be78afd
AK
140352017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14036
14037 * arc-tdep (maintenance_print_arc_list): New variable.
14038 (maintenance_print_arc_command): New function.
14039
296ec4fa
AK
140402017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14041
14042 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14043 Add "limm" and "reserved".
14044 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14045 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14046 * arc-tdep.h (arc_regnum): Likewise.
14047
f74f865e
MF
140482017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14049
14050 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14051 for THREADPTR register.
14052 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14053 register.
14054 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14055 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14056 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14057
0d0bf81a
MF
140582017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14059
14060 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14061 registers above gdbarch_num_regs (gdbarch) as privileged in
14062 call0 ABI.
14063
0ce4291e
MF
140642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14065
14066 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14067 for a single specified register or for all registers in
14068 a0_base..a0_base + C0_NREGS range.
14069 (supply_gregset_reg): Call regcache_raw_supply for a single
14070 specified register or for all registers in a0_base..a0_base +
14071 C0_NREGS range.
14072
c56054f9
MF
140732017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14074
14075 * arch/xtensa.h (C0_NREGS): Add definition.
14076 * xtensa-tdep.c (C0_NREGS): Remove definition.
14077
a4398628
MF
140782017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14079
14080 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14081 Drop xtensa_default_isa initialization.
14082 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14083
8c43009f
PA
140842017-03-27 Pedro Alves <palves@redhat.com>
14085
14086 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14087 (file_entry::include_dir): New method.
14088 (line_header::include_dir_at, line_header::file_name_at): New
14089 methods.
14090 (setup_type_unit_groups, setup_type_unit_groups)
14091 (psymtab_include_file_name): Simplify using the new methods.
14092 (lnp_state_machine) <the_line_header>: New field.
14093 <file>: Add comment.
14094 (lnp_state_machine::current_file): New method.
14095 (dwarf_record_line): Simplify using the new methods.
14096 (init_lnp_state_machine): Initialize the "the_line_header" field.
14097 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14098 Simplify using the new methods.
14099
a7e80b9e
PA
141002017-03-27 Pedro Alves <palves@redhat.com>
14101
14102 * cp-name-parser.y (make_empty): Delete.
14103 (demangler_special, nested_name, ptr_operator, array_indicator)
14104 (direct_declarator, declarator_1): Use fill_comp instead of
14105 make_empty.
14106
21047726
PA
141072017-03-27 Pedro Alves <palves@redhat.com>
14108
14109 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14110 to ATTRIBUTE_PRINTF.
14111 * solib-target.c (library_list_start_list): Print "string" not
14112 "version".
14113 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14114 gdb_xml_error call.
14115
d721ba37
PA
141162017-03-27 Pedro Alves <palves@redhat.com>
14117
14118 * dwarf2read.c (struct file_and_directory): New.
14119 (dwarf2_get_dwz_file): Adjust to use std::string.
14120 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14121 (find_file_and_directory): Adjust to return a file_and_directory
14122 object.
14123 (read_file_scope): Adjust to use file_and_directory. Remove
14124 make_cleanup/do_cleanups calls.
14125 (open_and_init_dwp_file): Adjust to use std::string. Remove
14126 make_cleanup/do_cleanups calls.
14127 * python/python.c (do_start_initialization): Adjust to ldirname
14128 returning a std::string.
14129 * utils.c (ldirname): Now returns a std::string.
14130 * utils.h (ldirname): Change return type to std::string.
14131 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14132 returning a std::string.
14133 * xml-tdesc.c (file_read_description_xml): Likewise.
14134
ed771251
AH
141352017-03-24 Alan Hayward <alan.hayward@arm.com>
14136
14137 * regcache.c (regcache_debug_print_register): New function.
14138 * regcache.h (regcache_debug_print_register): New declaration.
14139 * target.c (debug_print_register): Remove.
14140 (target_fetch_registers): Call regcache_debug_print_register.
14141 (target_store_registers): Likewise.
14142
568c1b9f
PB
141432017-03-24 Pádraig Brady <pbrady@fb.com>
14144
14145 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14146 reference beyond the 'lh->include_dirs' array before accessing to
14147 it.
14148 (psymtab_include_file_name): Likewise.
14149 (dwarf_decode_lines_1): Likewise.
14150 (dwarf_decode_lines): Likewise.
14151 (file_file_name): Likewise.
14152
3e00d44f
SM
141532017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14154
14155 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14156 inferior_ptid.
14157 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14158 ps_lsetfpregs): Likewise.
14159 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14160 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14161 ps_lsetfpregs): Likewise.
14162 * target.c (target_fetch_registers, target_store_registers):
14163 Remove asserts.
14164
077ae656
AH
141652017-03-23 Alan Hayward <alan.hayward@arm.com>
14166
14167 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14168
1e2b521d
YQ
141692017-03-23 Yao Qi <yao.qi@linaro.org>
14170
14171 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14172 (_initialize_aarch64_tdep): Register it.
14173 (aarch64_record_load_store): Handle PRFM instruction.
14174 (aarch64_process_record_test): New function.
14175
33877125
YQ
141762017-03-23 Yao Qi <yao.qi@linaro.org>
14177
14178 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14179 indentation.
14180
a0eef940
YQ
141812017-03-23 Yao Qi <yao.qi@linaro.org>
14182
14183 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14184
3f2a3564
PR
141852017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14186
14187 python/python.c (do_start_initialization): Fix memory leak.
14188
b67aeab0
SM
141892017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14190
14191 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14192 using get_ptrace_pid.
14193 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14194 inferior_ptid.
14195 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14196 inferior_ptid instead of pid.
14197
ffdbe864
YQ
141982017-03-22 Yao Qi <yao.qi@linaro.org>
14199
14200 * aarch64-tdep.c: Wrap locally used classes in anonymous
14201 namespace.
14202 * arm-tdep.c: Likewise.
14203 * linespec.c: Likewise.
14204 * ui-out.c: Likewise.
14205
9d736fbf
JG
142062017-03-22 Jonah Graham <jonah@kichwacoders.com>
14207
14208 PR gdb/19637
14209 * python/lib/gdb/printer/bound_registers.py: Import sys.
14210
3de88e9a
SM
142112017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14212
14213 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14214 windows_thread_info parameter and use it instead of
14215 current_thread.
14216 (windows_fetch_inferior_registers): Don't set current_thread,
14217 pass the thread to do_windows_fetch_inferior_registers. Use
14218 ptid from regcache instead of inferior_ptid.
14219 (do_windows_store_inferior_registers): Add windows_thread_info
14220 parameter and use it instead of current_thread.
14221 (windows_store_inferior_registers): Don't set current_thread,
14222 pass the thread to do_windows_store_inferior_registers. Use
14223 ptid from regcache instead of inferior_ptid.
14224
0e7b8f61
SM
142252017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14226
14227 * ser-mingw.c (ser_windows_raw): Remove reference to
14228 struct serial::current_timeout.
14229
5badf10a
IR
142302017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14231
14232 PR tdep/20928
14233 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14234 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14235 (sparc64_fsr_type): Fix %fsr decoding.
14236
cee59b3f
TW
142372017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14238
14239 * python/py-record-btrace.c (btpy_insn_data): Change return type
14240 for Python 2.
14241
639a9038
SM
142422017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14243
14244 * spu-linux-nat.c (spu_fetch_inferior_registers,
14245 spu_store_inferior_registers): Use ptid from regcache, set and
14246 restore inferior_ptid.
14247 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14248 Likewise.
14249
bcc0c096
SM
142502017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14251
14252 * i386-linux-nat.c (fetch_register, store_register,
14253 i386_linux_fetch_inferior_registers,
14254 i386_linux_store_inferior_registers): Use ptid from regcache.
14255 * ia64-linux-nat.c (ia64_linux_fetch_register,
14256 ia64_linux_store_register): Likewise.
14257 * inf-ptrace.c (inf_ptrace_fetch_register,
14258 inf_ptrace_store_register): Likewise.
14259 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14260 m32r_linux_store_inferior_registers): Likewise.
14261 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14262 m68kbsd_store_inferior_registers): Likewise.
14263 * m68k-linux-nat.c (fetch_register, store_register,
14264 m68k_linux_fetch_inferior_registers,
14265 m68k_linux_store_inferior_registers): Likewise.
14266 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14267 m88kbsd_store_inferior_registers): Likewise.
14268 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14269 mips_fbsd_store_inferior_registers): Likewise.
14270 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14271 mips64_linux_regsets_store_registers): Likewise.
14272 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14273 mipsnbsd_store_inferior_registers): Likewise.
14274 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14275 mips64obsd_store_inferior_registers): Likewise.
14276 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14277 Likewise.
14278 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14279 ppcfbsd_store_inferior_registers): Likewise.
14280 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14281 ppc_linux_store_inferior_registers): Likewise.
14282 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14283 ppcnbsd_store_inferior_registers): Likewise.
14284 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14285 ppcobsd_store_registers): Likewise.
14286 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14287 Likewise.
14288 * ravenscar-thread.c (ravenscar_fetch_registers,
14289 ravenscar_store_registers, ravenscar_prepare_to_store):
14290 Likewise.
14291 * record-btrace.c (record_btrace_fetch_registers,
14292 record_btrace_store_registers, record_btrace_prepare_to_store):
14293 Likewise.
14294 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14295 Lookup inferior using ptid from regcache, instead of
14296 current_inferior.
14297 * remote.c (remote_fetch_registers, remote_store_registers): Use
14298 ptid from regcache.
14299 * rs6000-nat.c (fetch_register, store_register): Likewise.
14300 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14301 s390_linux_store_inferior_registers): Likewise.
14302 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14303 shnbsd_store_inferior_registers): Likewise.
14304 * sol-thread.c (sol_thread_fetch_registers,
14305 sol_thread_store_registers): Likewise.
14306 * sparc-nat.c (sparc_fetch_inferior_registers,
14307 sparc_store_inferior_registers): Likewise.
14308 * tilegx-linux-nat.c (fetch_inferior_registers,
14309 store_inferior_registers): Likewise.
14310 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14311 vaxbsd_store_inferior_registers): Likewise.
14312 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14313 store_xtregs): Likewise.
14314
c0f55cc6
AV
143152017-03-20 Artemiy Volkov <artemiyv@acm.org>
14316
14317 PR gdb/14441
14318 * NEWS: Mention support for rvalue references in GDB and python.
14319 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14320 supports both lvalue and rvalue references.
14321
15c0a2a9
AV
143222017-03-20 Artemiy Volkov <artemiyv@acm.org>
14323
14324 PR gdb/14441
14325 * gdbtypes.c (rank_one_type): Implement overloading
14326 resolution rules regarding rvalue references.
14327
aa006118
AV
143282017-03-20 Artemiy Volkov <artemiyv@acm.org>
14329
14330 PR gdb/14441
14331 * aarch64-tdep.c (aarch64_type_align)
14332 (aarch64_extract_return_value, aarch64_store_return_value): Change
14333 lvalue reference type checks to general reference type checks.
14334 * amd64-tdep.c (amd64_classify): Likewise.
14335 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14336 Likewise.
14337 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14338 (arm_store_return_value): Likewise.
14339 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14340 * c-typeprint.c (c_print_type): Likewise.
14341 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14342 (cplus_number_of_children, cplus_describe_child): Likewise.
14343 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14344 * completer.c (expression_completer): Likewise.
14345 * cp-support.c (make_symbol_overload_list_adl_namespace):
14346 Likewise.
14347 * darwin-nat-info.c (info_mach_region_command): Likewise.
14348 * dwarf2loc.c (entry_data_value_coerce_ref)
14349 (value_of_dwarf_reg_entry): Likewise.
14350 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14351 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14352 Likewise.
14353 * findvar.c (extract_typed_address, store_typed_address):
14354 Likewise.
14355 * gdbtypes.c (rank_one_type): Likewise.
14356 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14357 * infcall.c (value_arg_coerce): Likewise.
14358 * language.c (pointer_type): Likewise.
14359 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14360 Likewise.
14361 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14362 * mn10300-tdep.c (mn10300_type_align): Likewise.
14363 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14364 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14365 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14366 Likewise.
14367 * printcmd.c (print_formatted, x_command): Likewise.
14368 * python/py-type.c (typy_get_composite, typy_template_argument):
14369 Likewise.
14370 * python/py-value.c (valpy_referenced_value)
14371 (valpy_get_dynamic_type, value_has_field): Likewise.
14372 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14373 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14374 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14375 * spu-tdep.c (spu_scalar_value_p): Likewise.
14376 * symtab.c (lookup_symbol_aux): Likewise.
14377 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14378 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14379 Likewise.
14380 * valops.c (value_cast_pointers, value_cast)
14381 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14382 (value_struct_elt, value_struct_elt_bitpos)
14383 (value_find_oload_method_list, find_overload_match)
14384 (value_rtti_indirect_type): Likewise.
14385 * valprint.c (val_print_scalar_type_p, generic_val_print):
14386 Likewise.
14387 * value.c (value_actual_type, value_as_address, unpack_long)
14388 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14389 (coerce_ref): Likewise.
14390 * varobj.c (varobj_get_value_type): Likewise.
14391
3fcf899d
AV
143922017-03-20 Artemiy Volkov <artemiyv@acm.org>
14393
14394 PR gdb/14441
14395 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14396 table of constants.
14397 * python/lib/gdb/command/explore.py: Support exploring values
14398 of rvalue reference types.
14399 * python/lib/gdb/types.py: Implement get_basic_type() for
14400 rvalue reference types.
14401 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14402 constant.
14403 * python/py-value.c (valpy_getitem): Add an rvalue reference
14404 check.
14405 (valpy_reference_value): Add new parameter "refcode".
14406 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14407 New wrappers for valpy_reference_value().
14408 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14409 (gdbpy_invoke_xmethod): Likewise.
14410
4297a3f0
AV
144112017-03-20 Artemiy Volkov <artemiyv@acm.org>
14412
14413 PR gdb/14441
14414 * dwarf2read.c (process_die, read_type_die_1): Handle the
14415 DW_TAG_rvalue_reference_type DIE.
14416 (read_tag_reference_type): Add new parameter "refcode".
14417
e1cb3213
AV
144182017-03-20 Artemiy Volkov <artemiyv@acm.org>
14419
14420 PR gdb/14441
14421 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14422 (c_type_print_modifier, c_type_print_varspec_suffix)
14423 (c_type_print_base): Support printing rvalue reference types.
14424 * c-valprint.c (c_val_print, c_value_print): Support printing
14425 rvalue reference values.
14426
e4347c89
AV
144272017-03-20 Artemiy Volkov <artemiyv@acm.org>
14428
14429 PR gdb/14441
14430 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14431 typename.
14432 * cp-support.c (replace_typedefs): Handle
14433 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14434 * python/py-type.c (typy_lookup_type): Likewise.
14435
53cc15f5
AV
144362017-03-20 Artemiy Volkov <artemiyv@acm.org>
14437
14438 PR gdb/14441
14439 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14440 * parse.c (insert_type): Change assert statement.
14441 (follow_types): Handle rvalue reference types.
14442 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14443 constant.
14444
a65cfae5
AV
144452017-03-20 Artemiy Volkov <artemiyv@acm.org>
14446
14447 PR gdb/14441
14448 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14449 value_ref() interface.
14450 * c-valprint.c (c_value_print): Likewise.
14451 * infcall.c (value_arg_coerce): Likewise.
14452 * python/py-value.c (valpy_reference_value): Likewise.
14453 * valops.c (value_cast, value_reinterpret_cast)
14454 (value_dynamic_cast, typecmp): Likewise.
14455 (value_ref): Parameterize by kind of return value reference type.
14456 * value.h (value_ref): Add new parameter "refcode".
14457
3b224330
AV
144582017-03-20 Artemiy Volkov <artemiyv@acm.org>
14459
14460 PR gdb/14441
14461 * dwarf2read.c (read_tag_reference_type): Use
14462 lookup_lvalue_reference_type() instead of lookup_reference_type().
14463 * eval.c (evaluate_subexp_standard): Likewise.
14464 * f-exp.y: Likewise.
14465 * gdbtypes.c (make_reference_type, lookup_reference_type):
14466 Generalize with rvalue reference types.
14467 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14468 convenience wrappers for lookup_reference_type().
14469 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14470 reference kind parameter.
14471 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14472 wrappers for lookup_reference_type().
14473 * guile/scm-type.c (gdbscm_type_reference): Use
14474 lookup_lvalue_reference_type() instead of lookup_reference_type().
14475 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14476 * parse.c (follow_types): Likewise.
14477 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14478 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14479 Likewise.
14480 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14481 (gdbpy_invoke_xmethod): Likewise.
14482 * stabsread.c: Provide extra argument to make_reference_type()
14483 call.
14484 * valops.c (value_ref, value_rtti_indirect_type): Use
14485 lookup_lvalue_reference_type() instead of lookup_reference_type().
14486
f9aeb8d4
AV
144872017-03-20 Artemiy Volkov <artemiyv@acm.org>
14488
14489 PR gdb/14441
14490 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14491 (TYPE_IS_REFERENCE): New macro.
14492 (struct type): Add rvalue_reference_type field.
14493 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14494
51457a05
MAL
144952017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14496
14497 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14498 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14499 New function definition.
14500 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14501 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14502 New function declaration.
14503 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14504 * mi/mi-interp.h: New file.
14505 * solib.c (info_sharedlibrary_command): Replace for loop with
14506 ALL_SO_LIBS macro
14507 * solib.h (update_solib_list): New function declaration.
14508 (so_list_head): Move macro.
14509 * solist.h (ALL_SO_LIBS): New macro.
14510
e696b3ad
MAL
145112017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14512
14513 * infcmd.c (post_create_inferior): Remove unused argument in
14514 call to solib_add.
14515 * remote.c (remote_start_remote): Likewise.
14516 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14517 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14518 (enable_break): Likewise.
14519 * solib.c (update_solib_list): Remove unused target argument
14520 and its documentation.
14521 (solib_add): Remove unused target argument. Remove unused
14522 argument in call to update_solib_list.
14523 (info_sharedlibrary_command): Remove unused argument in call
14524 to update_solib_list.
14525 (sharedlibrary_command): Remove unused argument in call to
14526 solib_add.
14527 (handle_solib_event): Likewise.
14528 (reload_shared_libraries): Likewise.
14529 * solib.h (solib_add): Remove unused target argument.
14530
dcb84eda
AA
145312017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14532
14533 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14534 (s390_displaced_step_fixup): Cover relative branches with the
14535 default fixup handling. This fixes lack of support for some
14536 relative branch instructions.
14537
d9cb6cdc
SM
145382017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14539
14540 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14541 ptid from regcache.
14542
1afaf9f4
SM
145432017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14544
14545 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14546 i386_darwin_store_inferior_registers): Use ptid from regcache.
14547
aac12e24
SM
145482017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14549
14550 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14551 i386bsd_store_inferior_registers): Use ptid from regcache.
14552
bbe1eef1
SM
145532017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14554
14555 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14556 hppaobsd_store_registers): Use ptid from regcache.
14557
10799020
SM
145582017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14559
14560 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14561 hppanbsd_store_registers): Use ptid from regcache.
14562
00204cf7
SM
145632017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14564
14565 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14566 from regcache. Use get_ptrace_pid.
14567
11a33714
SM
145682017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14569
14570 * corelow.c (get_core_register_section): Use ptid from regcache,
14571 update doc.
14572
317cd492
SM
145732017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14574
14575 * bsd-uthread.c (bsd_uthread_fetch_registers,
14576 bsd_uthread_store_registers): Use ptid from regcache, set and
14577 restore inferior_ptid.
14578
9ac8a7c2
SM
145792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14580
14581 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14582 fetch_fp_regs, store_register, store_regs, store_fp_register,
14583 store_fp_regs): Use ptid from regcache.
14584
4ac4bb6a
SM
145852017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14586
14587 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14588 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14589 store_vfp_regs): Use ptid from regcache.
14590
9bcbdca8
PA
145912017-03-17 Pedro Alves <palves@redhat.com>
14592
14593 PR remote/21188
14594 * ser-base.c (ser_base_wait_for): Add comment.
14595 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14596 version.
14597 * ser-unix.c (hardwire_raw): Remove reference to
14598 scb->current_timeout.
14599 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14600 (hardwire_ops): Install ser_base_readchar instead of
14601 hardwire_readchar.
14602 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14603 Remove fields.
14604
7503099f
JG
146052017-03-17 Jonah Graham <jonah@kichwacoders.com>
14606
14607 PR gdb/19637
14608 * python/lib/gdb/printer/bound_registers.py: Add support for
14609 Python 3.
14610
7942e96e
AA
146112017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14612
14613 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14614 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14615 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14616 byte_offset to subobj_byte_offset. Fix the handling of
14617 DWARF_VALUE_STACK on big-endian targets when coming via an
14618 implicit pointer.
14619 (dwarf2_evaluate_loc_desc): Adjust call to
14620 dwarf2_evaluate_loc_desc_full.
14621 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14622 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14623
ba14f379
YQ
146242017-03-16 Yao Qi <yao.qi@linaro.org>
14625
14626 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14627 and REVSH instructions.
14628
b121eeb9
YQ
146292017-03-16 Yao Qi <yao.qi@linaro.org>
14630
14631 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14632 (arm_record_test): Declare.
14633 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14634 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14635 align with the manual.
14636 (thumb_record_misc): Adjust the code order to align with the
14637 manual.
14638 (thumb2_record_decode_insn_handler): Fix instruction matching.
14639 (instruction_reader_thumb): New class.
14640 (arm_record_test): New function.
14641
728a7913
YQ
146422017-03-16 Yao Qi <yao.qi@linaro.org>
14643
14644 * arm-tdep.c (abstract_memory_reader): New class.
14645 (instruction_reader): New class.
14646 (extract_arm_insn): Add argument 'reader'. Callers updated.
14647 (decode_insn): Likewise.
14648
34b43320
DE
146492017-03-16 Doug Evans <dje@google.com>
14650
a7c0469f
DE
14651 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14652 member. Change type of TYPE member to SCM. All uses updated.
14653 (lsscm_make_lazy_string_smob): Add assert.
14654 (lsscm_make_lazy_string): Flag bad length values.
14655 (lsscm_elt_type): New function.
14656 (gdbscm_lazy_string_to_value): Rewrite to use
14657 lsscm_safe_lazy_string_to_value.
14658 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14659 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14660 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14661 in incoming type.
14662 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14663 * guile/scm-type.c (tyscm_scm_to_type): New function.
14664
146652017-03-15 Doug Evans <dje@google.com>
14666
34b43320
DE
14667 PR python/17728, python/18439, python/18779
14668 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14669 member. Change type of TYPE member to PyObject *. All uses updated.
14670 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14671 (gdbpy_create_lazy_string_object): Flag bad length values.
14672 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14673 Handle typedefs in incoming type.
14674 (stpy_lazy_string_elt_type): New function.
14675 (gdbpy_extract_lazy_string): Call it.
14676 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14677 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14678 typedefs in incoming type.
14679
a3a5fecc
DE
146802017-03-16 Doug Evans <dje@google.com>
14681
14682 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14683 * guile/scm-type.c (tyscm_scm_to_type): New function.
14684
28f1c605
JW
146852017-03-16 Jiong Wang <jiong.wang@arm.com>
14686
14687 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14688 "ULONGEST" for "skip".
14689
87c336f6
AA
146902017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14691
14692 PR gdb/21220
14693 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14694 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14695 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14696 over ptrace peek/poke until end of buffer or error.
14697
cf81cf60
SM
146982017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14699
14700 * parse.c (length_of_subexp): Make static.
14701 * parser-defs.h (length_of_subexp): Remove.
14702
a379284a
AA
147032017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14704
14705 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14706 as well.
14707
8a6200ba
PA
147082017-03-14 Pedro Alves <palves@redhat.com>
14709
14710 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14711 (main): Use std::unique_ptr. Remove calls to
14712 cp_demangled_name_parse_free.
14713
f79ec206
SM
147142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14715
14716 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14717 alphabsd_store_inferior_registers): Use regcache->ptid instead
14718 of inferior_ptid.
14719
edb5fb00
SM
147202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14721
14722 * aix-thread.c (aix_thread_fetch_registers,
14723 aix_thread_store_registers): Use regcache->ptid instead of
14724 inferior_ptid.
14725
55119686
SM
147262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14727
14728 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14729 store_gregs_to_thread, fetch_fpregs_from_thread,
14730 store_fpregs_to_thread): Use regcache->ptid instead of
14731 inferior_ptid.
14732
6a06fbb7
SM
147332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14734
14735 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14736 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14737 instead of inferior_ptid.
14738
c6386875
SM
147392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14740
14741 * target.c (target_fetch_registers, target_store_registers): Add
14742 assert.
14743
ddaaf0fb
SM
147442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14745
14746 * regcache.h (regcache_get_ptid): New function.
14747 * regcache.c (regcache_get_ptid): New function.
14748
b9da89d1 147492017-03-13 Mark Wielaard <mark@klomp.org>
14750
14751 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14752
5f4d1085
KS
147532017-03-10 Keith Seitz <keiths@redhat.com>
14754
14755 PR c++/8218
14756 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14757
c65d6b55
PA
147582017-03-08 Pedro Alves <palves@redhat.com>
14759
14760 PR gdb/18360
14761 * infrun.c (start_step_over, do_target_resume, resume)
14762 (restart_threads): Assert we're not resuming a thread that is
14763 meant to be stopped.
14764 (infrun_thread_stop_requested_callback): Delete.
14765 (infrun_thread_stop_requested): If the thread is internally
14766 stopped, queue a pending stop event and clear the thread's
14767 inline-frame state.
14768 (handle_stop_requested): New function.
14769 (handle_syscall_event, handle_inferior_event_1): Use
14770 handle_stop_requested.
14771 (handle_stop_requested): New function.
14772 (handle_signal_stop): Set the thread's stop_signal here instead of
14773 at caller.
14774 (finish_step_over): Clear step over info unconditionally.
14775 (handle_signal_stop): If the user had interrupted the event
14776 thread, consider the stop a random signal.
14777 (handle_signal_stop) <signal arrived while stepping over
14778 breakpoint>: Don't restart threads here.
14779 (stop_waiting): Don't clear step-over info here.
14780
15c22686
PA
147812017-03-08 Pedro Alves <palves@redhat.com>
14782
14783 PR 21206
14784 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14785 goes to argument 2, not 1.
14786
6e5d74e7
PA
147872017-03-08 Pedro Alves <palves@redhat.com>
14788
14789 PR cli/21218
14790 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14791 display_gdb_prompt.
14792 (command_line_input): Add comment.
14793
9753a2f6
PA
147942017-03-08 Pedro Alves <palves@redhat.com>
14795
14796 PR tui/21216
14797 * tui/tui-file.c (tui_file::write): New.
14798 * tui/tui-file.h (tui_file): Override "write".
14799 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14800 factored out from ...
14801 (tui_puts): ... here.
14802 (tui_putc): Use them.
14803 (tui_write): New function.
14804 * tui/tui-io.h (tui_write): Declare.
14805
1672e0d9
SDJ
148062017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14807
14808 * Makefile.in (SFILES): Replace "environ.c" with
14809 "common/environ.c".
14810 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14811 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14812 to...
14813 * common/environ.c: ... here.
14814 * environ.h: Moved to...
14815 * common/environ.h: ... here.
14816
f7bb4e3a
PB
148172017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14818
14819 * gdbarch.sh (pstring_ptr): New static function.
14820 (gdbarch_disassembler_options): Use it.
14821 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14822 not valid_disassembler_option->name.
14823 * gdbarch.c: Regenerate.
14824
e45ced6c
PB
148252017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14826
14827 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14828
5f6fd321
PA
148292017-03-07 Pedro Alves <palves@redhat.com>
14830
14831 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14832
6dbb839a 148332017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14834
14835 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14836 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14837 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14838 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14839
d274ecf4
SM
148402017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14841
14842 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14843
df97be55
SM
148442017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14845
14846 * remote.c (remote_add_target_side_commands): Use range-based
14847 for loop.
14848
7d45f3df
YQ
148492017-03-03 Yao Qi <yao.qi@linaro.org>
14850
14851 PR gdb/21165
14852 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14853 value is lazy.
14854 * valprint.c (common_val_print): Likewise.
14855
65b48a81
PB
148562017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14857
14858 * NEWS: Mention new set/show disassembler-options commands.
14859 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14860 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14861 (prospective_options): New static variable.
14862 (gdb_disassembler::gdb_disassembler): Initialize
14863 m_di.disassembler_options.
14864 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14865 (get_disassembler_options): New function.
14866 (set_disassembler_options): Likewise.
14867 (set_disassembler_options_sfunc): Likewise.
14868 (show_disassembler_options_sfunc): Likewise.
14869 (disassembler_options_completer): Likewise.
14870 (_initialize_disasm): Likewise.
14871 * disasm.h (get_disassembler_options): New prototype.
14872 (set_disassembler_options): Likewise.
14873 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14874 (gdbarch_verify_disassembler_options): Likewise.
14875 * gdbarch.c: Regenerate.
14876 * gdbarch.h: Likewise.
14877 * arm-tdep.c (num_disassembly_options): Delete.
14878 (set_disassembly_style): Likewise.
14879 (arm_disassembler_options): New static variable.
14880 (set_disassembly_style_sfunc): Convert short style name into long
14881 option name. Call set_disassembler_options.
14882 (show_disassembly_style_sfunc): New function.
14883 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14884 set_gdbarch_verify_disassembler_options.
14885 (_initialize_arm_tdep): Delete regnames variable and update callers.
14886 (arm_disassembler_options): Initialize.
14887 (disasm_options): New variable.
14888 (num_disassembly_options): Rename from this...
14889 (num_disassembly_styles): ...to this. Compute by scanning through
14890 disasm_options.
14891 (valid_disassembly_styles): Initialize using disasm_options.
14892 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14893 set_arm_regname_option.
14894 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14895 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14896 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14897 set_gdbarch_verify_disassembler_options.
14898 * s390-tdep.c (s390_disassembler_options): New static variable.
14899 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14900 set_gdbarch_verify_disassembler_options.
14901
d538e36d
SM
149022017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14903
14904 * remote.c (remote_add_target_side_condition): Remove "struct"
14905 keyword from range-based for loop.
14906
83621223
SM
149072017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14908
14909 * remote.c (remote_add_target_side_condition): Use range-based
14910 for loop. Update comment.
14911
2123df0e
YQ
149122017-02-27 Yao Qi <yao.qi@linaro.org>
14913
14914 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14915
8e368124
AH
149162017-02-26 Alan Hayward <alan.hayward@arm.com>
14917
14918 * regcache.c (regcache_raw_update): New function.
14919 (regcache_raw_read): Move code to regcache_raw_update.
14920 * regcache.h (regcache_raw_update): New declaration.
14921 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14922
a49dd8dd
JK
149232017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14924
14925 * dwarf2read.c (create_debug_type_hash_table): Initialize
14926 header.signature and header.type_offset_in_tu.
14927
34e4bae9
PA
149282017-02-24 Pedro Alves <palves@redhat.com>
14929
14930 * symtab.c (make_file_symbol_completion_list_1): Use
14931 add_symtab_completions.
14932
b0e4b369
AH
149332017-02-24 Alan Hayward <alan.hayward@arm.com>
14934
14935 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14936
975c21ab
AH
149372017-02-24 Alan Hayward <alan.hayward@arm.com>
14938
14939 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14940 I386_MAX_REGISTER_SIZE.
14941 (i386_pseudo_register_write): Likewise.
14942 (i386_process_record): Likewise.
14943 * i387-tdep.c (i387_supply_xsave): Likewise.
14944 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14945 (store_register): Likewise.
14946
14bc53a8
PA
149472017-02-23 Pedro Alves <palves@redhat.com>
14948
14949 * ada-lang.c: Include "common/function-view.h".
14950 (ada_iterate_over_symbols): Adjust to use function_view as
14951 callback type.
14952 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14953 (ada_make_symbol_completion_list): Use a lambda.
14954 (ada_exc_search_name_matches): Delete.
14955 (name_matches_regex): New.
14956 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14957 * compile/compile-c-support.c: Include "common/function-view.h".
14958 (print_one_macro): Change prototype to accept a ui_file pointer.
14959 (write_macro_definitions): Use a lambda.
14960 * dwarf2read.c: Include "common/function-view.h".
14961 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14962 (dw2_expand_symtabs_matching): Adjust to use function_view as
14963 callback type.
14964 * language.h: Include "common/function-view.h".
14965 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14966 function_view as callback type.
14967 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14968 * linespec.c: Include "common/function-view.h".
14969 (collect_info::add_symbol): New method.
14970 (struct symbol_and_data_callback, iterate_inline_only, struct
14971 symbol_matcher_data, iterate_name_matcher): Delete.
14972 (iterate_over_all_matching_symtabs): Adjust to use function_view
14973 as callback type and lambdas.
14974 (iterate_over_file_blocks): Adjust to use function_view as
14975 callback type.
14976 (decode_compound_collector): Now a class with private fields.
14977 (decode_compound_collector::release_symbols): New method.
14978 (collect_one_symbol): Rename to...
14979 (decode_compound_collector::operator()): ... this and adjust.
14980 (lookup_prefix_sym): decode_compound_collector construction bits
14981 move to decode_compound_collector ctor. Pass the
14982 decode_compound_collector object directly as callback. Remove
14983 cleanups and use decode_compound_collector::release_symbols
14984 instead.
14985 (symtab_collector): Now a class with private fields.
14986 (symtab_collector::release_symtabs): New method.
14987 (add_symtabs_to_list): Rename to...
14988 (symtab_collector::operator()): ... this and adjust.
14989 (collect_symtabs_from_filename): symtab_collector construction
14990 bits move to symtab_collector ctor. Pass the symtab_collector
14991 object directly as callback. Remove cleanups and use
14992 symtab_collector::release_symtabs instead.
14993 (collect_symbols): Delete.
14994 (add_matching_symbols_to_info): Use lambdas.
14995 * macrocmd.c (print_macro_callback): Delete.
14996 (info_macro_command): Use a lambda.
14997 (info_macros_command): Pass print_macro_definition as callable
14998 directly.
14999 (print_one_macro): Remove 'ignore' parameter.
15000 (macro_list_command): Adjust.
15001 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15002 (macro_for_each_data::user_data): Delete field.
15003 (foreach_macro): Adjust to call the function_view.
15004 (macro_for_each): Adjust to use function_view as callback type.
15005 (foreach_macro_in_scope): Adjust to call the function_view.
15006 (macro_for_each_in_scope): Adjust to use function_view as callback
15007 type.
15008 * macrotab.h: Include "common/function-view.h".
15009 (macro_callback_fn): Declare a prototype instead of a pointer.
15010 Remove "user_data" parameter.
15011 (macro_for_each, macro_for_each_in_scope): Adjust to use
15012 function_view as callback type.
15013 * psymtab.c (partial_map_expand_apply)
15014 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15015 Adjust to use function_view as callback type and to return bool.
15016 (psym_expand_symtabs_matching): Adjust to use function_view as
15017 callback types.
15018 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15019 to use function_view as callback type and to return bool.
15020 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15021 callback types.
15022 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15023 as callback types.
15024 * symfile.h: Include "common/function-view.h".
15025 (expand_symtabs_file_matcher_ftype)
15026 (expand_symtabs_symbol_matcher_ftype)
15027 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15028 return bool.
15029 (quick_symbol_functions::map_symtabs_matching_filename)
15030 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15031 function_view as callback type and return bool.
15032 (expand_symtabs_matching): Adjust to use function_view as callback
15033 type.
15034 (maintenance_expand_name_matcher)
15035 (maintenance_expand_file_matcher): Delete.
15036 (maintenance_expand_symtabs): Use lambdas.
15037 * symtab.c (iterate_over_some_symtabs): Adjust to use
15038 function_view as callback types and return bool.
15039 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15040 of a cleanup.
15041 (lookup_symtab_callback): Delete.
15042 (lookup_symtab): Use a lambda.
15043 (iterate_over_symbols): Adjust to use function_view as callback
15044 type.
15045 (struct search_symbols_data, search_symbols_file_matches)
15046 (search_symbols_name_matches): Delete.
15047 (search_symbols): Use a pair of lambdas.
15048 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15049 (symtab_expansion_callback): Delete.
15050 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15051 * symtab.h: Include "common/function-view.h".
15052 (iterate_over_some_symtabs): Adjust to use function_view as
15053 callback type and return bool.
15054 (iterate_over_symtabs): Adjust to use function_view as callback
15055 type.
15056 (symbol_found_callback_ftype): Remove 'data' parameter and return
15057 bool.
15058 (iterate_over_symbols): Adjust to use function_view as callback
15059 type.
15060
07e253aa
PA
150612017-02-23 Pedro Alves <palves@redhat.com>
15062
15063 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15064 (%.o) <unittests/%.c>: New pattern.
15065 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15066 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15067 * common/function-view.h: New file.
15068 * unittests/function-view-selftests.c: New file.
15069 * configure: Regenerate.
15070
8eaf5320
SM
150712017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15072
15073 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15074 inferior_ptid.
15075 * go32-nat.c (go32_thread_alive): Likewise.
15076
38768751
YQ
150772017-02-23 Yao Qi <yao.qi@linaro.org>
15078
15079 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15080 delete.
15081
0a8beaba
YQ
150822017-02-23 Yao Qi <yao.qi@linaro.org>
15083
15084 * varobj.c (varobj_clear_saved_item): Use delete instead of
15085 xfree.
15086 (update_dynamic_varobj_children): Likewise.
15087
58fdfd2c
JK
150882017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15089
15090 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15091
1b90b139
SM
150922017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15093
15094 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15095 m_enum_value to 0 in default constructor.
15096
2039d74e
EBM
150972017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15098
15099 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15100 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15101 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15102 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15103 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15104 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15105 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15106 IS_STORE_CONDITIONAL_INSN.
15107
7814882a
JK
151082017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15109
15110 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15111
0ae60b63
JK
151122017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15113
15114 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15115
0224619f
JK
151162017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15117
15118 * dwarf2read.c (skip_one_die, read_attribute_value)
15119 (dwarf2_const_value_attr, dump_die_shallow)
15120 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15121 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15122
0af92d60
JK
151232017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15124
15125 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15126 (dwarf_parse_macro_header): Accept DWARF version 5.
15127 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15128
216f72a1
JK
151292017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15130
15131 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15132 DW_AT_GNU_*.
15133 * common/common-exceptions.h (enum errors): Likewise.
15134 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15135 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15136 (dwarf_expr_context::execute_stack_op): Likewise.
15137 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15138 Likewise.
15139 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15140 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15141 (show_entry_values_debug, call_site_to_target_addr)
15142 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15143 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15144 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15145 (value_of_dwarf_block_entry, indirect_pieced_value)
15146 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15147 (disassemble_dwarf_expression): Likewise.
15148 * dwarf2read.c (process_die, inherit_abstract_dies)
15149 (read_call_site_scope): Likewise.
15150 * gdbtypes.h (struct func_type, struct call_site_parameter)
15151 (struct call_site): Likewise.
15152 * stack.c (read_frame_arg): Likewise.
15153 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15154
43988095
JK
151552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15156
15157 * defs.h (read_unsigned_leb128): New declaration.
15158 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15159 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15160 (dwarf2_find_location_expression): Call also
15161 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15162 * dwarf2loc.h (dwarf2_version): New declaration.
15163 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15164 rnglists.
15165 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15166 .debug_rnglists.
15167 (struct dwop_section_names): Add loclists_dwo.
15168 (dwop_section_names): Add .debug_loclists.dwo.
15169 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15170 (struct dwarf2_per_cu_data): Add dwarf_version.
15171 (struct dwo_sections): Add loclists.
15172 (struct attr_abbrev): Add implicit_const.
15173 (read_indirect_line_string): New declaration.
15174 (read_unsigned_leb128): Delete declaration.
15175 (rcuh_kind): New definition.
15176 (read_and_check_comp_unit_head): Change parameter
15177 is_debug_types_section to section_kind.
15178 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15179 (read_comp_unit_head): Change parameter abfd to section, add parameter
15180 section_kind. Handle DWARF-5.
15181 (error_check_comp_unit_head): Accept also DWARF version 5.
15182 (read_and_check_comp_unit_head): Change parameter
15183 is_debug_types_section to section_kind.
15184 (read_and_check_type_unit_head): Delete function.
15185 (read_abbrev_offset): Handle DWARF-5.
15186 (create_debug_type_hash_table): Add parameter section_kind. Process
15187 only DW_UT_type. Use signature and type_offset_in_tu from struct
15188 comp_unit_head.
15189 (create_debug_types_hash_table): Update create_debug_type_hash_table
15190 caller.
15191 (create_all_type_units): Call create_debug_type_hash_table.
15192 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15193 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15194 caller.
15195 (skip_one_die): Handle DW_FORM_implicit_const.
15196 (dwarf2_rnglists_process): New function.
15197 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15198 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15199 (read_attribute_value): Handle DW_FORM_implicit_const,
15200 DW_FORM_line_strp.
15201 (read_attribute): Handle DW_FORM_implicit_const.
15202 (read_indirect_string_at_offset_from): New function from
15203 read_indirect_string_at_offset.
15204 (read_indirect_string_at_offset): Call
15205 read_indirect_string_at_offset_from.
15206 (read_indirect_line_string_at_offset): New function.
15207 (read_indirect_string): New function comment.
15208 (read_indirect_line_string): New function.
15209 (read_unsigned_leb128): Make it global.
15210 (dwarf2_string_attr): Handle DWARF-5.
15211 (add_include_dir_stub, read_formatted_entries): New functions.
15212 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15213 Handle DWARF-5.
15214 (per_cu_header_read_in): Update read_comp_unit_head caller.
15215 (dwarf2_version): New function.
15216 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15217 rnglists.
15218 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15219 fields.
15220
22d2f3ab
JK
152212017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15222
15223 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15224
5f46c5a5
JK
152252017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15226
15227 * dwarf2read.c (dwarf2_ranges_process): New function from
15228 dwarf2_ranges_read.
15229 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15230 dwarf2_ranges_process.
15231
78d4d2c5
JK
152322017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15233
15234 * dwarf2read.c (create_debug_type_hash_table): New function from
15235 create_debug_types_hash_table.
15236 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15237 (create_all_type_units, open_and_init_dwo_file): Update
15238 create_debug_types_hash_table callers.
15239
1b076f25
SDJ
152402017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15241
15242 PR gdb/16188
15243 * fork-child.c (trace_start_error): Fix thinko. va_end should
15244 refer to 'ap', not 'args'.
15245
0db8980c
SDJ
152462017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15247 Pedro Alves <palves@redhat.com>
15248
15249 PR gdb/16188
15250 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15251 calls succeeded.
15252 * fork-child.c (trace_start_error): New function.
15253 (trace_start_error_with_name): Likewise.
15254 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15255 * inf-ptrace.c (inf_ptrace_me): Likewise.
15256 * inferior.h (trace_start_error): New prototype.
15257 (trace_start_error_with_name): Likewise.
15258
99e8a4f9
SDJ
152592017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15260
15261 PR gdb/21164
15262 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15263 NULL before using it.
15264 * symmisc.c (maintenance_print_symbols): Likewise.
15265 (maintenance_print_msymbols): Likewise.
15266
4e746bb6
TW
152672017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15268
15269 * NEWS: Add record Python bindings entry.
15270
152712017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15272
15273 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15274 py-record-full.o.
15275 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15276 * python/py-record-btrace.c, python/py-record-btrace.h,
15277 python/py-record-full.c, python/py-record-full.h: New file.
15278 * python/py-record.c: Add include for py-record-btrace.h and
15279 py-record-full.h.
15280 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15281 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15282 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15283 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15284 New definition.
15285 (gdbpy_initialize_btrace): New export.
15286 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15287
152882017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15289
15290 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15291 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15292 * python/py-record.c: New file.
15293 * python/python-internal.h (gdbpy_start_recording,
15294 gdbpy_current_recording, gdpy_stop_recording,
15295 gdbpy_initialize_record): New export.
15296 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15297 (python_GdbMethods): Add gdbpy_start_recording,
15298 gdbpy_current_recording and gdbpy_stop_recording.
15299
153002017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15301
15302 * record-btrace.c (record_btrace_record_method): New function.
15303 (init_record_btrace_ops): Initialize to_record_method.
15304 * record-full.c (record_full_record_method): New function.
15305 (init_record_full_ops, init_record_full_core_ops): Add
15306 record_full_record_method.
15307 * record.h (enum record_method): New enum.
15308 * target-debug.h (target_debug_print_enum_record_method: New define.
15309 * target-delegates.c: Regenerate.
15310 * target.c (target_record_method): New function.
15311 * target.h: Include record.h.
15312 (struct target_ops) <to_record_method>: New field.
15313 (target_record_method): New export.
15314
153152017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15316
15317 * record.h (record_start, record_stop): New export.
15318 * record.c (record_start, record_stop): New function.
15319
153202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15321
15322 * btrace.c (btrace_fetch): Copy function call segments pointer
15323 into a vector.
15324 (btrace_clear): Clear the vector.
15325 (btrace_find_insn_by_number): Use binary search to find the correct
15326 function call segment.
15327 * btrace.h (brace_fun_p): New typedef.
15328 (struct btrace_thread_info) <functions>: New field.
15329
153302017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15331
15332 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15333 * btrace.c (btrace_decode_error): ... here. New function.
15334 * btrace.h (btrace_decode_error): New export.
15335
153362017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15337
15338 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15339 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15340 btrace_find_insn_by_number): Remove special case for gaps.
15341 * btrace.h (btrace_insn_get_error): New export.
15342 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15343 * record-btrace.c (btrace_insn_history): Print number for gaps.
15344 (record_btrace_info, record_btrace_goto): Handle gaps.
15345
3f77c769
TT
153462017-02-14 Tom Tromey <tom@tromey.com>
15347
15348 PR python/13598:
15349 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15350 event.
15351 * python/py-evts.c (gdbpy_initialize_py_events): Add
15352 before_prompt registry.
15353 * python/py-events.h (events_object) <before_prompt>: New field.
15354
4c2c7ac6
MM
153552017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15356
15357 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15358
5cf30ebf
LM
153592017-02-13 Luis Machado <lgustavo@codesourcery.com>
15360
15361 * symfile (_initialize_symfile): Add usage text to the load command's
15362 help text.
15363
26a06916
SM
153642017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15365
15366 * utils.c (defaulted_query): Don't query on secondary UIs.
15367
0b145e37
TT
153682017-02-10 Tom Tromey <tom@tromey.com>
15369
15370 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15371
2d8365c4
TT
153722017-02-10 Tom Tromey <tom@tromey.com>
15373
15374 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15375 "cleanup" local.
15376 * python/py-type.c (typy_legacy_template_argument): Remove
15377 unnecessary "cleanup" local.
15378
2bb8f231
TT
153792017-02-10 Tom Tromey <tom@tromey.com>
15380
15381 * python/python.c (do_start_initialization): New function, from
15382 _initialize_python.
15383 (_initialize_python): Call do_start_initialization.
15384 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15385 goto.
15386
1bdfaf42
TT
153872017-02-10 Tom Tromey <tom@tromey.com>
15388
15389 * python/py-prettyprint.c (pretty_print_one_value): Use
15390 gdbpy_ref.
15391
88b6faea
TT
153922017-02-10 Tom Tromey <tom@tromey.com>
15393
15394 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15395 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15396 gdbpy_ref.
15397 * python/py-type.c (field_new): Use gdbpy_ref.
15398 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15399 gdbpy_ref.
15400 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15401 (py_free_pspace): Likewise.
15402 (pspace_to_pspace_object): Likewise.
15403 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15404 (py_free_objfile): Likewise.
15405 (objfile_to_objfile_object): Likewise.
15406 * python/py-inferior.c (delete_thread_object): Use
15407 gdbpy_ref.
15408 (infpy_read_memory): Likewise.
15409 (py_free_inferior): Likewise.
15410 * python/py-evtregistry.c (create_eventregistry_object): Use
15411 gdbpy_ref.
15412 * python/py-event.c (create_event_object): Use gdbpy_ref.
15413
7780f186
TT
154142017-02-10 Tom Tromey <tom@tromey.com>
15415
15416 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15417 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15418 used.
15419 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15420 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15421 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15422 python/py-framefilter.c, python/py-function.c,
15423 python/py-inferior.c, python/py-infevents.c,
15424 python/py-linetable.c, python/py-newobjfileevent.c,
15425 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15426 python/py-signalevent.c, python/py-stopevent.c,
15427 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15428 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15429 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15430 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15431
d4b0bb18
TT
154322017-02-10 Tom Tromey <tom@tromey.com>
15433
15434 * ui-out.h (ui_out_emit_type): New class.
15435 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15436 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15437 and ui_out_emit_tuple.
15438 (enumerate_locals): Likewise.
15439 (py_mi_print_variables, py_print_locals, py_print_args): Use
15440 ui_out_emit_list.
15441 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15442 ui_out_emit_list.
15443 * common/gdb_optional.h: New file.
15444
f67f945c
MG
154452017-02-10 Martin Galvan <martingalvan@sourceware.org>
15446
15447 * MAINTAINERS (Write After Approval): Update my e-mail address.
15448
18da0c51
MG
154492017-02-10 Martin Galvan <martingalvan@sourceware.org>
15450
15451 PR gdb/21122
15452 * breakpoint.c (_initialize_breakpoint): Update the help description
15453 of the 'commands' command to indicate that it takes a list argument.
15454
62c14536
SM
154552017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15456
15457 * interps.c (current_interp_set_logging): Remove "return".
15458
ff6fa247
GB
154592017-02-09 Gary Benson <gbenson@redhat.com>
15460
15461 * symtab.c (add_symtab_completions): Prevent NULL pointer
15462 dereference.
15463
a474bd8e
PA
154642017-02-08 Pedro Alves <palves@redhat.com>
15465
15466 * interps.c (interp::interp): Remove reference to quiet_p.
15467 (interp_set): Make static. Remove dead "Switching to" output
15468 code.
15469 (interp_quiet_p, interp_set_quiet): Delete.
15470 (interpreter_exec_cmd): Don't set the interpreter quiet.
15471 * interps.h (interp_quiet_p): Make static.
15472 (class interp) <quiet_p>: Remove field
15473
3d7b173c
JG
154742017-02-08 Jerome Guitton <guitton@adacore.com>
15475
604c4576
JG
15476 * cli/cli-decode.c (find_command_name_length): Make it extern.
15477 * cli/cli-decode.h (find_command_name_length): Declare.
15478 * cli/cli-script.c (command_name_equals, line_first_arg):
15479 New functions.
15480 (process_next_line): Use cli-decode to parse command names.
15481 (build_command_line): Make args a constant pointer.
15482
154832017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15484
3d7b173c
JG
15485 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15486 Remove case-insensitive search.
15487
1291063d
JM
154882017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15489
15490 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15491 at the end of the line. Avoids an ARI warning.
15492
20b477a7
LM
154932017-02-06 Luis Machado <lgustavo@codesourcery.com>
15494
15495 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15496 rdseed instructions.
15497 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15498
3f7b46f2
IR
154992017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15500
15501 PR tdep/20936
15502 Provide and use sparc32 and sparc64 target description XML files.
15503 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15504 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15505 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15506 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15507 * features/sparc/sparc32-solaris.xml: New file.
15508 * features/sparc/sparc64-solaris.xml: New file.
15509 * features/sparc/sparc32-solaris.c: Generated.
15510 * features/sparc/sparc64-solaris.c: Generated.
15511 * sparc-tdep.h: Account for differences in target descriptions.
15512 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15513 (sparc32_register_type): Use target provided registers.
15514 (validate_tdesc_registers): New function.
15515 (sparc32_gdbarch_init): Use tdesc_has_registers.
15516 Set pseudoregister functions.
15517 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15518 (sparc64_register_type): Use target provided registers.
15519 (sparc64_init_abi): Set pseudoregister functions.
15520
f0fd41c1
TT
155212017-02-03 Tom Tromey <tom@tromey.com>
15522
15523 PR rust/21097:
15524 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15525 with a single member.
15526
d6f9b0fb
PA
155272017-02-03 Pedro Alves <palves@redhat.com>
15528
15529 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15530 (cli_interp_base::~cli_interp_base): New.
15531 (cli_interp): New struct.
15532 (as_cli_interp): Cast the interp itself to cli_interp.
15533 (cli_interpreter_pre_command_loop): Rename to ...
15534 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15535 parameter.
15536 (cli_interpreter_init): Rename to ...
15537 (cli_interp::init): ... this. Remove 'self' parameter. Use
15538 boolean. Make extern.
15539 (cli_interpreter_resume): Rename to ...
15540 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15541 extern.
15542 (cli_interpreter_suspend): Rename to ...
15543 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15544 extern.
15545 (cli_interpreter_exec): Rename to ...
15546 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15547 extern.
15548 (cli_interpreter_supports_command_editing): Rename to ...
15549 (cli_interp_base::supports_command_editing): ... this. Remove
15550 'interp' parameter. Make extern.
15551 (cli_ui_out): Rename to ...
15552 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15553 Make extern.
15554 (cli_set_logging): Rename to ...
15555 (cli_interp_base::set_logging): ... this. Remove 'interp'
15556 parameter. Make extern.
15557 (cli_interp_procs): Delete.
15558 (cli_interp_factory): Adjust to use "new".
15559 * cli/cli-interp.h: Include "interps.h".
15560 (struct cli_interp_base): New struct.
15561 * interps.c (struct interp): Delete. Fields moved to interps.h.
15562 (interp_new): Delete.
15563 (interp::interp, interp::~interp): New.
15564 (interp_set): Use bool, and return void. Assume the interpreter
15565 has suspend, init and resume methods, and that the all return
15566 void.
15567 (set_top_level_interpreter): interp_set returns void.
15568 (interp_ui_out): Adapt.
15569 (current_interp_set_logging): Adapt.
15570 (interp_data): Delete.
15571 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15572 (interp_exec): Adapt.
15573 (top_level_interpreter_data): Delete.
15574 * interps.h (interp_init_ftype, interp_resume_ftype)
15575 (interp_suspend_ftype, interp_exec_ftype)
15576 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15577 (class interp): New.
15578 (interp_new): Delete.
15579 (interp_set): Now returns void. Use bool.
15580 (interp_data, top_level_interpreter_data): Delete.
15581 * mi/mi-common.h: Include interps.h.
15582 (class mi_interp): Inherit from interp. Define a ctor. Declare
15583 init, resume, suspect, exec, interp_ui_out, set_logging and
15584 pre_command_loop methods.
15585 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15586 (mi_interpreter_init): Rename to ...
15587 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15588 bool, return void and make extern. Adjust.
15589 (mi_interpreter_resume): ... Rename to ...
15590 (mi_interp::resume): ... this. Remove the 'data' parameter,
15591 return void and make extern. Adjust.
15592 (mi_interpreter_suspend): ... Rename to ...
15593 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15594 return void and make extern. Adjust.
15595 (mi_interpreter_exec): ... Rename to ...
15596 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15597 extern. Adjust.
15598 (mi_interpreter_pre_command_loop): ... Rename to ...
15599 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15600 parameter and make extern.
15601 (mi_on_normal_stop_1): Adjust.
15602 (mi_ui_out): Rename to ...
15603 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15604 parameter and make extern. Adjust.
15605 (mi_set_logging): Rename to ...
15606 (mi_interp::set_logging): ... this. Remove the 'interp'
15607 parameter and make extern. Adjust.
15608 (mi_interp_procs): Delete.
15609 (mi_interp_factory): Adjust to use 'new'.
15610 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15611 (mi_print_exception, mi_execute_command, mi_load_progress):
15612 Adjust.
15613 * tui/tui-interp.c (tui_interp): New class.
15614 (as_tui_interp): Return a tui_interp pointer.
15615 (tui_on_normal_stop, tui_on_signal_received)
15616 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15617 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15618 to use interp::interp_ui_out.
15619 (tui_init): Rename to ...
15620 (tui_interp::init): ... this. Remove the 'self' parameter, use
15621 bool, return void and make extern. Adjust.
15622 (tui_resume): Rename to ...
15623 (tui_interp::resume): ... this. Remove the 'data' parameter,
15624 return void and make extern. Adjust.
15625 (tui_suspend): Rename to ...
15626 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15627 return void and make extern. Adjust.
15628 (tui_ui_out): Rename to ...
15629 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15630 parameter, and make extern. Adjust.
15631 (tui_exec): Rename to ...
15632 (tui_interp::exec): ... this. Remove the 'data' parameter and
15633 make extern.
15634 (tui_interp_procs): Delete.
15635 (tui_interp_factory): Use "new".
15636
65c40c95
TT
156372017-02-02 Tom Tromey <tom@tromey.com>
15638
15639 * rust-exp.y (ends_raw_string, space_then_number)
15640 (rust_identifier_start_p): Return bool.
15641 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15642 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15643 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15644 (rust_chartype_p): Return bool.
15645 (val_print_struct, rust_print_struct_def, rust_print_type):
15646 Update.
15647 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15648 Return bool.
15649
b50f188d
TT
156502017-02-02 Tom Tromey <tom@tromey.com>
15651
15652 * rust-lang.c: Reindent.
15653
03c85b11
TT
156542017-02-02 Tom Tromey <tom@tromey.com>
15655
15656 * rust-lang.h (rust_crate_for_block): Update.
15657 * rust-lang.c (rust_crate_for_block): Return std::string.
15658 (rust_get_disr_info): Use std:;string, not
15659 gdb::unique_xmalloc_ptr.
15660 * rust-exp.y (crate_name): Update.
15661
9b6da501
PA
156622017-02-02 Pedro Alves <palves@redhat.com>
15663
15664 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15665 field out of gdb_disassembler_test and make it static.
15666
ec4cb20b
PA
156672017-02-02 Pedro Alves <palves@redhat.com>
15668
15669 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15670 mi1_interp and mi_interp fields.
15671
5be5dbf0
PA
156722017-02-02 Pedro Alves <palves@redhat.com>
15673
616268b6
PA
15674 * cli/cli-interp.c (struct saved_output_files, saved_output):
15675 Moved from cli/cli-logging.c.
15676 (cli_set_logging): New function.
15677 (cli_interp_procs): Install cli_set_logging.
15678 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15679 Declare.
15680 * cli/cli-logging.c (struct saved_output_files, saved_output):
15681 Moved to cli/cli-interp.c.
15682 (pop_output_files): Don't save outputs here.
15683 (make_logging_output): New function.
15684 (handle_redirections): Don't build tee nor save previous outputs
15685 here.
15686 * interps.c (current_interp_set_logging): Change prototype.
15687 Assume there's always a set_logging_proc method installed.
15688 * interps.h (interp_set_logging_ftype): Change prototype.
15689 (current_interp_set_logging): Change prototype and adjust comment.
15690 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15691 use make_logging_output.
15692 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
156932017-02-02 Pedro Alves <palves@redhat.com>
15694
5be5dbf0
PA
15695 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15696 from ...
15697 (set_logging_overwrite): ... here.
15698 (logging_no_redirect_file): Delete.
15699 (set_logging_redirect): Don't handle redirection on the fly.
15700 Instead warn that "logging off" / "logging on" is necessary.
15701 (pop_output_files): Delete references to logging_no_redirect_file.
15702 (show_logging_command): Always speak in terms of what will happen
15703 once logging is reenabled.
15704
c99cc448
PA
157052017-02-02 Pedro Alves <palves@redhat.com>
15706
15707 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15708
8b172ce7
PA
157092017-02-02 Pedro Alves <palves@redhat.com>
15710
15711 * disasm.c (gdb_pretty_print_insn): Rename to ...
15712 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15713 Remove gdbarch parameter. Adapt to clear the object's buffers
15714 instead of allocating new buffers, and to print using the object's
15715 gdb_disassembler instead of calling gdb_print_insn.
15716 (dump_insns): Use gdb_pretty_print_disassembler.
15717 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15718 (gdb_pretty_print_disassembler): New class.
15719 * record-btrace.c (btrace_insn_history): Use
15720 gdb_pretty_print_disassembler.
15721
d7e74731
PA
157222017-02-02 Pedro Alves <palves@redhat.com>
15723
15724 * ada-lang.c (type_as_string): Use string_file.
15725 * ada-valprint.c (ada_print_floating): Use string_file.
15726 * ada-varobj.c (ada_varobj_scalar_image)
15727 (ada_varobj_get_value_image): Use string_file.
15728 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15729 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15730 * breakpoint.c (update_inserted_breakpoint_locations)
15731 (insert_breakpoint_locations, reattach_breakpoints)
15732 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15733 (print_it_watchpoint): Use string_file.
15734 (save_breakpoints): Use stdio_file.
15735 * c-exp.y (oper): Use string_file.
15736 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15737 tee_file.
15738 (pop_output_files): Use delete.
15739 (handle_redirections): Use stdio_file and tee_file.
15740 * cli/cli-setshow.c (do_show_command): Use string_file.
15741 * compile/compile-c-support.c (c_compute_program): Use
15742 string_file.
15743 * compile/compile-c-symbols.c (generate_vla_size): Take a
15744 'string_file &' instead of a 'ui_file *'.
15745 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15746 of a 'ui_file *'. Use string_file.
15747 (generate_c_for_variable_locations): Take a 'string_file &'
15748 instead of a 'ui_file *'.
15749 * compile/compile-internal.h (generate_c_for_for_one_variable):
15750 Take a 'string_file &' instead of a 'ui_file *'.
15751 * compile/compile-loc2c.c (push, pushf, unary, binary)
15752 (print_label, pushf_register_address, pushf_register)
15753 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15754 'ui_file *'. Adjust.
15755 * compile/compile.c (compile_to_object): Use string_file.
15756 * compile/compile.h (compile_dwarf_expr_to_c)
15757 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15758 'ui_file *'.
15759 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15760 (replace_typedefs_qualified_name): Use string_file and
15761 obstack_copy0.
15762 * disasm.c (gdb_pretty_print_insn): Use string_file.
15763 (gdb_disassembly): Adjust reference the null_stream global.
15764 (do_ui_file_delete): Delete.
15765 (gdb_insn_length): Use null_stream.
15766 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15767 * dwarf2loc.c (dwarf2_compile_property_to_c)
15768 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15769 'string_file &' instead of a 'ui_file *'.
15770 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15771 * dwarf2read.c (do_ui_file_peek_last): Delete.
15772 (dwarf2_compute_name): Use string_file.
15773 * event-top.c (gdb_setup_readline): Use stdio_file.
15774 * gdbarch.sh (verify_gdbarch): Use string_file.
15775 * gdbtypes.c (safe_parse_type): Use null_stream.
15776 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15777 string_file.
15778 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15779 'string_file *' instead of a 'ui_file *'.
15780 (gdbscm_arch_disassemble): Use string_file.
15781 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15782 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15783 inherits from ui_file.
15784 (ioscm_file_port_delete, ioscm_file_port_rewind)
15785 (ioscm_file_port_put): Delete.
15786 (ioscm_file_port_write): Rename to ...
15787 (ioscm_file_port::write): ... this. Remove file_port_magic
15788 checks.
15789 (ioscm_file_port_new): Delete.
15790 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15791 ui_file_up.
15792 * guile/scm-type.c (tyscm_type_name): Use string_file.
15793 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15794 Use string_file.
15795 * infcmd.c (print_return_value_1): Use string_file.
15796 * infrun.c (print_target_wait_results): Use string_file.
15797 * language.c (add_language): Use string_file.
15798 * location.c (explicit_to_string_internal): Use string_file.
15799 * main.c (captured_main_1): Use null_file.
15800 * maint.c (maintenance_print_architecture): Use stdio_file.
15801 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15802 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15803 event_channel>: Change type to mi_console_file pointer.
15804 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15805 (mi_console_file_delete): Delete.
15806 (struct mi_console_file): Delete.
15807 (mi_console_file_magic): Delete.
15808 (mi_console_file_new): Delete.
15809 (mi_console_file::mi_console_file): New.
15810 (mi_console_file_delete): Delete.
15811 (mi_console_file_fputs): Delete.
15812 (mi_console_file::write): New.
15813 (mi_console_raw_packet): Delete.
15814 (mi_console_file::flush): New.
15815 (mi_console_file_flush): Delete.
15816 (mi_console_set_raw): Rename to ...
15817 (mi_console_file::set_raw): ... this.
15818 * mi/mi-console.h (class mi_console_file): New class.
15819 (mi_console_file_new, mi_console_set_raw): Delete.
15820 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15821 (mi_set_logging): Use delete and tee_file. Adjust.
15822 * mi/mi-main.c (output_register): Use string_file.
15823 (mi_cmd_data_evaluate_expression): Use string_file.
15824 (mi_cmd_data_read_memory): Use string_file.
15825 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15826 * mi/mi-out.c (mi_ui_out::main_stream): New.
15827 (mi_ui_out::rewind): Use main_stream and
15828 string_file.
15829 (mi_ui_out::put): Use main_stream and string_file.
15830 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15831 Allocate a 'string_file' instead.
15832 (mi_out_new): Don't allocate a mem_fileopen stream here.
15833 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15834 (mi_ui_out::main_stream): Declare method.
15835 * printcmd.c (eval_command): Use string_file.
15836 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15837 * python/py-arch.c (archpy_disassemble): Use string_file.
15838 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15839 * python/py-frame.c (frapy_str): Use string_file.
15840 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15841 Use string_file.
15842 * python/py-type.c (typy_str): Use string_file.
15843 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15844 * python/py-value.c (valpy_str): Use string_file.
15845 * record-btrace.c (btrace_insn_history): Use string_file.
15846 * regcache.c (regcache_print): Use stdio_file.
15847 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15848 * remote.c (escape_buffer): Use string_file.
15849 * rust-lang.c (rust_get_disr_info): Use string_file.
15850 * serial.c (serial_open_ops_1): Use stdio_file.
15851 (do_serial_close): Use delete.
15852 * stack.c (print_frame_arg): Use string_file.
15853 (print_frame_args): Remove local mem_fileopen stream, not used.
15854 (print_frame): Use string_file.
15855 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15856 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15857 Take a 'string_file *' instead of a 'ui_file *'.
15858 * top.c (new_ui): Use stdio_file and stderr_file.
15859 (free_ui): Use delete.
15860 (execute_command_to_string): Use string_file.
15861 (quit_confirm): Use string_file.
15862 * tracepoint.c (collection_list::append_exp): Use string_file.
15863 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15864 * tui/tui-file.c: Don't include "ui-file.h".
15865 (enum streamtype, struct tui_stream): Delete.
15866 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15867 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15868 (tui_file::tui_file): New method.
15869 (tui_file_fputs): Delete.
15870 (tui_file_get_strbuf): Delete.
15871 (tui_file::puts): New method.
15872 (tui_file_adjust_strbuf): Delete.
15873 (tui_file_flush): Delete.
15874 (tui_file::flush): New method.
15875 * tui/tui-file.h: Tweak intro comment.
15876 Include ui-file.h.
15877 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15878 (tui_file_adjust_strbuf): Delete declarations.
15879 (class tui_file): New class.
15880 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15881 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15882 (tui_register_format): Use string_stream.
15883 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15884 (tui_get_function_from_frame): Use string_file.
15885 * typeprint.c (type_to_string): Use string_file.
15886 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15887 (null_stream): New global.
15888 (ui_file_delete): Delete.
15889 (ui_file::ui_file): New.
15890 (null_file_isatty): Delete.
15891 (ui_file::~ui_file): New.
15892 (null_file_rewind): Delete.
15893 (ui_file::printf): New.
15894 (null_file_put): Delete.
15895 (null_file_flush): Delete.
15896 (ui_file::putstr): New.
15897 (null_file_write): Delete.
15898 (ui_file::putstrn): New.
15899 (null_file_read): Delete.
15900 (ui_file::putc): New.
15901 (null_file_fputs): Delete.
15902 (null_file_write_async_safe): Delete.
15903 (ui_file::vprintf): New.
15904 (null_file_delete): Delete.
15905 (null_file::write): New.
15906 (null_file_fseek): Delete.
15907 (null_file::puts): New.
15908 (ui_file_data): Delete.
15909 (null_file::write_async_safe): New.
15910 (gdb_flush, ui_file_isatty): Adjust.
15911 (ui_file_put, ui_file_rewind): Delete.
15912 (ui_file_write): Adjust.
15913 (ui_file_write_for_put): Delete.
15914 (ui_file_write_async_safe, ui_file_read): Adjust.
15915 (ui_file_fseek): Delete.
15916 (fputs_unfiltered): Adjust.
15917 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15918 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15919 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15920 (set_ui_file_data): Delete.
15921 (string_file::~string_file, string_file::write)
15922 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15923 (do_ui_file_as_string, ui_file_as_string): Delete.
15924 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15925 (struct mem_file): Delete.
15926 (mem_file_new): Delete.
15927 (stdio_file::stdio_file): New.
15928 (mem_file_delete): Delete.
15929 (stdio_file::stdio_file): New.
15930 (mem_fileopen): Delete.
15931 (stdio_file::~stdio_file): New.
15932 (mem_file_rewind): Delete.
15933 (stdio_file::set_stream): New.
15934 (mem_file_put): Delete.
15935 (stdio_file::open): New.
15936 (mem_file_write): Delete.
15937 (stdio_file_magic, struct stdio_file): Delete.
15938 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15939 (stdio_file::flush): New.
15940 (stdio_file_read): Rename to ...
15941 (stdio_file::read): ... this. Adjust.
15942 (stdio_file_write): Rename to ...
15943 (stdio_file::write): ... this. Adjust.
15944 (stdio_file_write_async_safe): Rename to ...
15945 (stdio_file::write_async_safe) ... this. Adjust.
15946 (stdio_file_fputs): Rename to ...
15947 (stdio_file::puts) ... this. Adjust.
15948 (stdio_file_isatty): Delete.
15949 (stdio_file_fseek): Delete.
15950 (stdio_file::isatty): New.
15951 (stderr_file_write): Rename to ...
15952 (stderr_file::write) ... this. Adjust.
15953 (stderr_file_fputs): Rename to ...
15954 (stderr_file::puts) ... this. Adjust.
15955 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15956 (stderr_file::stderr_file): New.
15957 (tee_file_magic): Delete.
15958 (struct tee_file): Delete.
15959 (tee_file::tee_file): New.
15960 (tee_file_new): Delete.
15961 (tee_file::~tee_file): New.
15962 (tee_file_delete): Delete.
15963 (tee_file_flush): Rename to ...
15964 (tee_file::flush): ... this. Adjust.
15965 (tee_file_write): Rename to ...
15966 (tee_file::write): ... this. Adjust.
15967 (tee_file::write_async_safe): New.
15968 (tee_file_fputs): Rename to ...
15969 (tee_file::puts): ... this. Adjust.
15970 (tee_file_isatty): Rename to ...
15971 (tee_file::isatty): ... this. Adjust.
15972 * ui-file.h (struct obstack, struct ui_file): Don't
15973 forward-declare.
15974 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15975 (ui_file_write_ftype)
15976 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15977 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15978 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15979 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15980 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15981 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15982 (set_ui_file_fseek): Delete.
15983 (ui_file_data, ui_file_delete, ui_file_rewind)
15984 (struct ui_file): New.
15985 (ui_file_up): New.
15986 (class null_file): New.
15987 (null_stream): Declare.
15988 (ui_file_write_for_put, ui_file_put): Delete.
15989 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15990 Delete.
15991 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15992 (gdb_fopen, tee_file_new): Delete.
15993 (struct string_file): New.
15994 (struct stdio_file): New.
15995 (stdio_file_up): New.
15996 (struct stderr_file): New.
15997 (class tee_file): New.
15998 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15999 of a 'ui_file *'. Adjust.
16000 * ui-out.h (class ui_out) <field_stream>: Likewise.
16001 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16002 (null_stream): Delete.
16003 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16004 Adjust.
16005 * utils.h (struct ui_file): Delete forward declaration..
16006 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16007 (error_stream): Take a 'string_file &' instead of a
16008 'ui_file *'.
16009 * varobj.c (varobj_value_get_print_value): Use string_file.
16010 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16011 * gdbarch.c: Regenerate.
16012
187808b0
PA
160132017-02-02 Pedro Alves <palves@redhat.com>
16014
16015 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16016 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16017 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16018 Adjust to call gdb_print_insn instead of
16019 gdb_disassembler::print_insn.
16020 (dump_insns, do_mixed_source_and_assembly_deprecated)
16021 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16022 'gdbarch' parameter. Remove gdb_disassembler parameter.
16023 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16024 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16025 declaration.
16026 (gdb_pretty_print_insn): Re-add declaration.
16027 * record-btrace.c (btrace_insn_history): Don't allocate a
16028 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16029
7a8eb317
SM
160302017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16031
16032 * disasm.h (gdb_disassembly): Remove file_string parameter.
16033 * disasm.c (gdb_disassembly): Likewise.
16034 * cli/cli-cmds.c (print_disassembly): Adapt.
16035 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16036 * stack.c (do_gdb_disassembly): Likewise.
16037
7346ef59
AA
160382017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16039
16040 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16041 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16042 targets. And if the implicit value is longer than needed, extract
16043 the first bytes instead of the "least significant" ones.
16044
cd4007e4
MM
160452017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16046
16047 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16048 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16049 (btrace_fetch): Assert can_access_registers_ptid.
16050 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16051 validate_registers_access.
16052
cf77c34e
MM
160532017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16054
16055 * gdbthread.h (can_access_registers_ptid): New.
16056 * thread.c (can_access_registers_ptid): New.
16057
be85ce7d
PA
160582017-02-01 Pedro Alves <palves@redhat.com>
16059
16060 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16061
29b0b251
PA
160622017-01-31 Pedro Alves <palves@redhat.com>
16063
16064 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16065 Fix typos.
16066
289b5b24
PA
160672017-01-31 Pedro Alves <palves@redhat.com>
16068
16069 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16070 not used.
16071
b47413b4
PA
160722017-01-31 Pedro Alves <palves@redhat.com>
16073
16074 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16075
60adb36c
PA
160762017-01-31 Pedro Alves <palves@redhat.com>
16077
16078 * common/scoped_restore.h
16079 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16080 change the value's parameter type to T2.
16081 (make_scoped_restore): Likewise.
16082
2735833d
WT
160832017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16084 Richard Henderson <rth@redhat.com>
16085
16086 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16087 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16088 GS_BASE for older kernels.
16089 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16090 GS_BASE for older kernels.
16091 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16092 and GS_BASE to the offset table.
16093 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16094 system register group.
16095 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16096 for older kernels.
16097 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16098 amd64 ABI.
16099 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16100 AMD64_GSBASE_REGNUM.
16101 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16102 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16103 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16104 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16105 i386/64bit-segments.xml in those rules.
16106 * features/i386/64bit-segments.xml: New file.
16107 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16108 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16109 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16110 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16111 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16112 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16113 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16114 * features/i386/amd64-avx-linux.c: Regenerated.
16115 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16116 * features/i386/amd64-avx-mpx.c: Regenerated.
16117 * features/i386/amd64-avx512-linux.c: Regenerated.
16118 * features/i386/amd64-linux.c: Regenerated.
16119 * features/i386/amd64-mpx-linux.c: Regenerated.
16120 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16121 * features/i386/i386-avx-mpx.c: Regenerated.
16122 * features/i386/x32-avx-linux.c: Regenerated.
16123 * features/i386/x32-avx512-linux.c: Regenerated.
16124 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16125 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16126 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16127 * regformats/i386/amd64-linux.dat: Regenerated.
16128 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16129 * regformats/i386/x32-avx-linux.dat: Regenerated.
16130 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16131 * regformats/i386/x32-linux.dat: Regenerated.
16132
8884e97e
WT
161332017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16134
16135 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16136 Set to AMD64_NUM_REGS.
16137
7005d26a
WT
161382017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16139
16140 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16141 that checks validity of a register number.
16142
4bd2e1b2
KC
161432017-01-27 Kees Cook <keescook@google.com>
16144
16145 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16146 fetch_fpregs if target has fpa registers.
16147 (arm_linux_store_inferior_registers): Call store_fpregs if target
16148 has fpa registers.
16149
7cf1de6c
AA
161502017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16151
16152 * cris-tdep.c (cris_gdbarch_init): Remove check for
16153 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16154
874a1c8c
AT
161552017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16156
16157 * corelow.c (get_core_register_section): Check for regset
16158 existence before checking for REGSET_VARIABLE_SIZE.
16159
d8b49cf0
YQ
161602017-01-26 Yao Qi <yao.qi@linaro.org>
16161 Pedro Alves <palves@redhat.com>
16162
16163 PR gdb/20939
16164 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16165 call memory_error, save memaddr instead.
16166 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16167 negative, cal memory_error.
16168 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16169
658ca58c
YQ
161702017-01-26 Yao Qi <yao.qi@linaro.org>
16171
16172 * disasm-selftests.c (memory_error_test): New function.
16173 (_initialize_disasm_selftests): Register memory_error_test.
16174
79843d45
YQ
161752017-01-26 Yao Qi <yao.qi@linaro.org>
16176
16177 * Makefile.in (SFILES): Add disasm-selftests.c and
16178 selftest-arch.c.
16179 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16180 * disasm-selftests.c: New file.
16181 * selftest-arch.c: New file.
16182 * selftest-arch.h: New file.
16183
8cafda32
YQ
161842017-01-26 Yao Qi <yao.qi@linaro.org>
16185
16186 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16187 to bfd_arch_mep. Don't return 0 if section is not
16188 found. Call print_insn_mep.
16189
e47ad6c0
YQ
161902017-01-26 Pedro Alves <palves@redhat.com>
16191 Yao Qi <yao.qi@linaro.org>
16192
16193 * arm-tdep.c: Include "disasm.h".
16194 (gdb_print_insn_arm): Update code to get gdbarch.
16195 * disasm.c (dis_asm_read_memory): Change it to
16196 gdb_disassembler::dis_asm_read_memory.
16197 (dis_asm_memory_error): Likewise.
16198 (dis_asm_print_address): Likewise.
16199 (gdb_pretty_print_insn): Change it to
16200 gdb_disassembler::pretty_print_insn.
16201 (dump_insns): Add one argument gdb_disassemlber. All
16202 callers updated.
16203 (do_mixed_source_and_assembly_deprecated): Likewise.
16204 (do_mixed_source_and_assembly): Likewise.
16205 (do_assembly_only): Likewise.
16206 (gdb_disassembler::gdb_disassembler): New.
16207 (gdb_disassembler::print_insn): New.
16208 * disasm.h (class gdb_disassembler): New.
16209 (gdb_pretty_print_insn): Remove declaration.
16210 (gdb_disassemble_info): Likewise.
16211 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16212 (gdbscm_disasm_read_memory_worker): Update.
16213 (gdbscm_disasm_read_memory): Update.
16214 (gdbscm_disasm_memory_error): Remove.
16215 (gdbscm_disasm_print_address): Remove.
16216 (gdbscm_disassembler::gdbscm_disassembler): New.
16217 (gdbscm_print_insn_from_port): Update.
16218 * mips-tdep.c: Include disasm.h.
16219 (gdb_print_insn_mips): Update code to get gdbarch.
16220 * record-btrace.c (btrace_insn_history): Update.
16221 * spu-tdep.c: Include disasm.h.
16222 (struct spu_dis_asm_data): Remove.
16223 (struct spu_dis_asm_info): New.
16224 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16225 SPU id.
16226 (gdb_print_insn_spu): Cast disassemble_info to
16227 spu_dis_asm_info.
16228
80d75874
YQ
162292017-01-26 Yao Qi <yao.qi@linaro.org>
16230
16231 * disasm.c (do_ui_file_delete): Delete.
16232 (gdb_insn_length): Move code creating stream to ...
16233 * utils.c (null_stream): ... here. New function.
16234 * utils.h (null_stream): Declare.
16235
60685cd0
SM
162362017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16237
16238 * python/py-inferior.c (find_thread_object): Return directly
16239 from the loop. Remove "found" variable.
16240
eb1cdb62
JB
162412017-01-21 Joel Brobecker <brobecker@adacore.com>
16242
16243 GDB 7.12.1 released.
16244
b1ce6568
SM
162452017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16246
16247 * python/py-function.c (fnpy_call): Reorder declarations to have
16248 the gdbpy_enter object declared first.
16249 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16250
6f8b0407
SM
162512017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16252
fec93fb1 16253 PR python/21068
6f8b0407
SM
16254 * python/python-internal.h (PyMem_RawMalloc): Define for
16255 Python < 3.4.
16256 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16257 PyMem_RawMalloc instead of PyMem_Malloc.
16258
78cbbba8
LM
162592017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16260 Luis Machado <lgustavo@codesourcery.com>
16261
16262 * NEWS (New commands): Mention flash-erase.
16263 (New MI commands): Mention target-flash-erase.
16264 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16265 command.
16266 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16267 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16268 * target.c (flash_erase_command): New function.
16269 (initialize_targets): Add new flash-erase command.
16270 * target.h (flash_erase_command): New declaration.
16271
2132fe85
JB
162722017-01-20 Joel Brobecker <brobecker@adacore.com>
16273
16274 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16275 HAVE_SYS_PROCFS_H is defined.
16276
d1dff226
AH
162772017-01-18 Alan Hayward <alan.hayward@arm.com>
16278
16279 * remote.c (struct cached_reg): Change data into a pointer.
16280 * (stop_reply_dtr): Free data pointers before deleting vector.
16281 (process_stop_reply): Likewise.
16282 (remote_parse_stop_reply): Allocate space for data
16283
9890e433
AH
162842017-01-18 Alan Hayward <alan.hayward@arm.com>
16285
16286 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16287 MAX_REGISTER_SIZE.
16288 (amd64_pseudo_register_read_value): Likewise.
16289 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16290 (store_register_using_P): Likewise.
16291 * regcache.c (regcache_xfer_part): Likewise.
16292
7a36499a
IR
162932017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16294
16295 Split real and pseudo registers.
16296 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16297 (sparc32_pseudo_regnum): New enum.
16298 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16299 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16300 (SPARC32_CP0_REGISTERS): New macro.
16301 (sparc32_pseudo_register_name): New function.
16302 (sparc32_register_name): Use sparc32_pseudo_register_name.
16303 (sparc32_pseudo_register_type): New function.
16304 (sparc32_register_type): Use sparc32_pseudo_register_type.
16305 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16306 pseudo register numbers.
16307 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16308 (SPARC64_CP0_REGISTERS): New macro.
16309 (sparc64_pseudo_register_name): New function.
16310 (sparc64_register_name): Use sparc64_pseudo_register_name.
16311 (sparc64_pseudo_register_type): New function.
16312 (sparc64_register_type): Use sparc64_pseudo_register_type.
16313 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16314 pseudo register numbers.
16315 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16316 sparc64_store_arguments): Handle pseudo register numbers.
16317
6f8976bf
YQ
163182017-01-13 Yao Qi <yao.qi@linaro.org>
16319
16320 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16321 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16322 output.
16323 (getpkt_or_notif_sane_1): Likewise.
16324
e4241ace
YQ
163252017-01-13 Yao Qi <yao.qi@linaro.org>
16326
16327 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16328 of CC. Pass "-x c++-header" instead of "-x c".
16329
3015c064
SM
163302017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16331
16332 * remote.c (remote_can_async_p): Update comment.
16333
fde1b17d
SM
163342017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16335
16336 * linux-nat.c (linux_nat_can_async_p): Update comment.
16337
ca1ca08b
SM
163382017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16339
16340 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16341
4ad2da73
SM
163422017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16343
16344 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16345
c8b23b3f
TT
163462017-01-10 Tom Tromey <tom@tromey.com>
16347
16348 * python/py-type.c (typy_legacy_template_argument): Update.
16349 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16350 ~demangle_parse_info): Declare new members.
16351 (cp_demangled_name_to_comp): Return unique_ptr.
16352 (cp_demangled_name_parse_free)
16353 (make_cleanup_cp_demangled_name_parse_free)
16354 (cp_new_demangle_parse_info): Remove.
16355 * cp-support.c (do_demangled_name_parse_free_cleanup)
16356 (make_cleanup_cp_demangled_name_parse_free): Remove.
16357 (inspect_type, cp_canonicalize_string_full)
16358 (cp_canonicalize_string): Update.
16359 (mangled_name_to_comp): Change return type.
16360 (cp_class_name_from_physname, method_name_from_physname)
16361 (cp_func_name, cp_remove_params): Update.
16362 * cp-name-parser.y (demangle_parse_info): New constructor, from
16363 cp_new_demangle_parse_info.
16364 (~demangle_parse_info): New destructor, from
16365 cp_demangled_name_parse_free.
16366 (cp_merge_demangle_parse_infos): Update.
16367 (cp_demangled_name_to_comp): Change return type.
16368
1ac32117
TT
163692017-01-10 Tom Tromey <tom@tromey.com>
16370
16371 * top.c (prevent_dont_repeat): Change return type.
16372 * python/python.c (execute_gdb_command): Use std::string.
16373 Update.
16374 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16375 * command.h (prevent_dont_repeat): Change return type.
16376 * breakpoint.c (bpstat_do_actions_1): Update.
16377
0cf08227
TT
163782017-01-10 Tom Tromey <tom@tromey.com>
16379
16380 * value.h (scoped_value_mark::~scoped_value_mark): Call
16381 free_to_mark.
16382 (scoped_value_mark::free_to_mark): New method.
16383 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16384 scoped_value_mark.
16385
eb115069
TT
163862017-01-10 Tom Tromey <tom@tromey.com>
16387
16388 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16389 (valpy_reference_value, valpy_const_value, valpy_get_address)
16390 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16391 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16392 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16393 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16394 scoped_value_mark.
16395 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16396 * value.h (scoped_value_mark): New class.
16397
906768f9
TT
163982017-01-10 Tom Tromey <tom@tromey.com>
16399
16400 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16401 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16402 * psymtab.c (discard_psymtabs_upto): Remove.
16403 (make_cleanup_discard_psymtabs): Remove.
16404 (struct psymtab_state): Remove.
16405
bef155c3
TT
164062017-01-10 Tom Tromey <tom@tromey.com>
16407
16408 * record-full.c (record_full_save_cleanups): Remove.
16409 (record_full_save): Use gdb::unlinker.
16410 * gcore.c (do_bfd_delete_cleanup): Remove.
16411 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16412 cleanups.
16413 * dwarf2read.c (unlink_if_set): Remove.
16414 (write_psymtabs_to_index): Use gdb::unlinker.
16415 * common/gdb_unlinker.h: New file.
16416
192b62ce
TT
164172017-01-10 Tom Tromey <tom@tromey.com>
16418
16419 * windows-tdep.c (windows_xfer_shared_library): Update.
16420 * windows-nat.c (windows_make_so): Update.
16421 * utils.h (make_cleanup_bfd_unref): Remove.
16422 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16423 * symfile.h (symfile_bfd_open)
16424 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16425 * symfile.c (read_symbols, symbol_file_add)
16426 (separate_debug_file_exists): Update.
16427 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16428 (generic_load, reread_symbols): Update.
16429 * symfile-mem.c (symbol_file_add_from_memory): Update.
16430 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16431 (spu_symbol_file_add_from_memory): Update.
16432 * solist.h (struct target_so_ops) <bfd_open>: Return
16433 gdb_bfd_ref_ptr.
16434 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16435 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16436 gdb_bfd_ref_ptr.
16437 (solib_map_sections, reload_shared_libraries_1): Update.
16438 * solib-svr4.c (enable_break): Update.
16439 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16440 * solib-frv.c (enable_break2): Update.
16441 * solib-dsbt.c (enable_break): Update.
16442 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16443 gdb_bfd_ref_ptr.
16444 (darwin_solib_get_all_image_info_addr_at_init): Update.
16445 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16446 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16447 * record-full.c (record_full_save): Update.
16448 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16449 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16450 * minidebug.c (find_separate_debug_file_in_section): Return
16451 gdb_bfd_ref_ptr.
16452 * machoread.c (macho_add_oso_symfile): Change abfd to
16453 gdb_bfd_ref_ptr.
16454 (macho_symfile_read_all_oso): Update.
16455 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16456 (macho_symfile_read): Update.
16457 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16458 (jit_bfd_try_read_symtab): Update.
16459 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16460 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16461 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16462 gdb_bfd_ref_ptr.
16463 (gdb_bfd_ref_policy): New struct.
16464 (gdb_bfd_ref_ptr): New typedef.
16465 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16466 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16467 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16468 gdb_bfd_ref_ptr.
16469 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16470 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16471 (gcore_command): Update.
16472 * exec.c (exec_file_attach): Update.
16473 * elfread.c (elf_symfile_read): Update.
16474 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16475 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16476 (open_and_init_dwo_file): Update.
16477 (open_dwp_file): Return gdb_bfd_ref_ptr.
16478 (open_and_init_dwp_file): Update.
16479 * corelow.c (core_open): Update.
16480 * compile/compile-object-load.c (compile_object_load): Update.
16481 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16482 * coffread.c (coff_symfile_read): Update.
16483 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16484 gdb_bfd_ref_ptr. Rename.
16485 (dump_bfd_file, restore_command): Update.
16486 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16487 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16488 (find_separate_debug_file_by_buildid): Update.
16489
50315b21
TT
164902017-01-10 Tom Tromey <tom@tromey.com>
16491
16492 * common/gdb_ref_ptr.h: New file.
16493 * python/py-ref.h (struct gdbpy_ref_policy): New.
16494 (gdbpy_ref): Now a typedef.
16495
fc4007c9
TT
164962017-01-10 Tom Tromey <tom@tromey.com>
16497
16498 * utils.h (make_cleanup_htab_delete): Don't declare.
16499 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16500 Remove.
16501 * linespec.c (decode_compound_collector): Add constructor,
16502 destructor.
16503 (lookup_prefix_sym): Remove cleanup.
16504 (symtab_collector): Add constructor, destructor.
16505 (collect_symtabs_from_filename): Remove cleanup.
16506 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16507 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16508 Use htab_up.
16509 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16510 * dwarf2read.c (dw2_expand_symtabs_matching)
16511 (dw2_map_symbol_filenames, dwarf_decode_macros)
16512 (write_psymtabs_to_index): Use htab_up.
16513 * dwarf2loc.c (func_verify_no_selftailcall)
16514 (call_site_find_chain_1, func_verify_no_selftailcall)
16515 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16516 std::vector, gdb::unique_xmalloc_ptr.
16517 (call_sitep): Remove typedef.
16518 (dwarf2_locexpr_baton_eval): Remove unused variable.
16519
8dbcee67
TT
165202017-01-10 Tom Tromey <tom@tromey.com>
16521
16522 * python/python-internal.h (make_cleanup_py_decref)
16523 (make_cleanup_py_xdecref): Don't declare.
16524 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16525 (py_xdecref, make_cleanup_py_xdecref): Remove.
16526
13df46cc
TT
165272017-01-10 Tom Tromey <tom@tromey.com>
16528
16529 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16530 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16531
06fc9bf7
TT
165322017-01-10 Tom Tromey <tom@tromey.com>
16533
16534 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16535
830a4934
TT
165362017-01-10 Tom Tromey <tom@tromey.com>
16537
16538 * python/py-utils.c (unicode_to_encoded_string)
16539 (python_string_to_target_string)
16540 (python_string_to_target_python_string)
16541 (python_string_to_host_string, gdbpy_obj_to_string)
16542 (get_addr_from_python): Use gdbpy_ref.
16543
4586d543
TT
165442017-01-10 Tom Tromey <tom@tromey.com>
16545
16546 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16547 gdbpy_ref.
16548
59876f8f
TT
165492017-01-10 Tom Tromey <tom@tromey.com>
16550
16551 * python/python.c (eval_python_command, gdbpy_decode_line)
16552 (gdbpy_run_events, gdbpy_start_type_printers)
16553 (gdbpy_apply_type_printers): Use gdbpy_ref.
16554
97d83487
TT
165552017-01-10 Tom Tromey <tom@tromey.com>
16556
16557 * python/py-param.c (get_doc_string, compute_enum_values): Use
16558 gdbpy_ref.
16559
9205649a
TT
165602017-01-10 Tom Tromey <tom@tromey.com>
16561
16562 * python/py-inferior.c (find_thread_object, build_inferior_list):
16563 Use gdbpy_ref.
16564
74c49d45
TT
165652017-01-10 Tom Tromey <tom@tromey.com>
16566
16567 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16568
16361ffb
TT
165692017-01-10 Tom Tromey <tom@tromey.com>
16570
16571 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16572 gdbpy_ref.
16573
905f2cca
TT
165742017-01-10 Tom Tromey <tom@tromey.com>
16575
16576 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16577 extra incref.
16578 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16579 Use gdbpy_ref.
16580
64081434
TT
165812017-01-10 Tom Tromey <tom@tromey.com>
16582
16583 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16584 gdbpy_ref.
16585
59e9e831
TT
165862017-01-10 Tom Tromey <tom@tromey.com>
16587
16588 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16589 decref results of PyArg_ParseTupleAndKeywords.
16590
9de10f6d
TT
165912017-01-10 Tom Tromey <tom@tromey.com>
16592
16593 * python/python.c (python_run_simple_file): Use
16594 unique_xmalloc_ptr, gdbpy_ref.
16595
2bd5759d
TT
165962017-01-10 Tom Tromey <tom@tromey.com>
16597
16598 * python/py-prettyprint.c (print_stack_unless_memory_error)
16599 (print_string_repr, print_children): Use gdbpy_ref.
16600 (dummy_python_frame): New class.
16601 (dummy_python_frame::dummy_python_frame): Rename from
16602 push_dummy_python_frame.
16603 (py_restore_tstate): Remove.
16604
3b4e0e01
TT
166052017-01-10 Tom Tromey <tom@tromey.com>
16606
16607 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16608
17a22718
TT
166092017-01-10 Tom Tromey <tom@tromey.com>
16610
16611 * python/python.c (ensure_python_env, restore_python_env):
16612 Remove.
16613 * python/python-internal.h (ensure_python_env): Don't declare.
16614 * varobj.h (varobj_ensure_python_env): Don't declare.
16615 * varobj.c (varobj_ensure_python_env): Remove.
16616
68cdc557
TT
166172017-01-10 Tom Tromey <tom@tromey.com>
16618
16619 * varobj.c (varobj_value_get_print_value): Use
16620 gdbpy_enter_varobj.
16621
1eba6383
TT
166222017-01-10 Tom Tromey <tom@tromey.com>
16623
16624 * python/py-prettyprint.c (print_string_repr, print_children):
16625 Update.
16626 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16627 of "encoding".
16628 * varobj.c (varobj_value_get_print_value): Update.
16629 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16630
bde7b3e3
TT
166312017-01-10 Tom Tromey <tom@tromey.com>
16632
16633 * varobj.c (varobj_get_display_hint)
16634 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16635 (varobj_set_visualizer, free_variable): Use
16636 gdbpy_enter_varobj.
16637
a7785f8c
TT
166382017-01-10 Tom Tromey <tom@tromey.com>
16639
16640 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16641 (do_finish_initialization): New function. Use gdbpy_ref.
16642 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16643 do_finish_initialization.
16644
2865bfce
TT
166452017-01-10 Tom Tromey <tom@tromey.com>
16646
16647 * python/py-param.c (get_set_value, get_show_value): Use
16648 gdbpy_enter, gdbpy_ref.
16649
0e9dcc75
TT
166502017-01-10 Tom Tromey <tom@tromey.com>
16651
16652 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16653
12a5cedd
TT
166542017-01-10 Tom Tromey <tom@tromey.com>
16655
16656 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16657
788f2586
TT
166582017-01-10 Tom Tromey <tom@tromey.com>
16659
16660 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16661 Use gdbpy_enter_varobj.
16662
6cd67bea
TT
166632017-01-10 Tom Tromey <tom@tromey.com>
16664
16665 * varobj.c (gdbpy_enter_varobj): New constructor.
16666 * python/python-internal.h (gdbpy_enter_varobj): New class.
16667 * python/py-varobj.c (py_varobj_get_iterator): Use
16668 gdbpy_enter_varobj.
16669
14b122bf
TT
166702017-01-10 Tom Tromey <tom@tromey.com>
16671
16672 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16673 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16674 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16675 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16676 unique_xmalloc_ptr.
16677 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16678
bf1ca3b9
TT
166792017-01-10 Tom Tromey <tom@tromey.com>
16680
16681 * python/py-xmethods.c (invoke_match_method): Use
16682 gdbpy_ref.
16683
572a5524
TT
166842017-01-10 Tom Tromey <tom@tromey.com>
16685
16686 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16687 gdbpy_enter, gdbpy_ref.
16688
396a78b6
TT
166892017-01-10 Tom Tromey <tom@tromey.com>
16690
16691 * python/python.c (python_interactive_command): Use gdbpy_enter.
16692
a88b13c7
TT
166932017-01-10 Tom Tromey <tom@tromey.com>
16694
16695 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16696 gdbpy_ref.
16697
e9f0c363
TT
166982017-01-10 Tom Tromey <tom@tromey.com>
16699
16700 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16701 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16702
6349f452
TT
167032017-01-10 Tom Tromey <tom@tromey.com>
16704
16705 * utils.h (htab_deleter): New struct.
16706 (htab_up): New typedef.
16707 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16708 gdbpy_enter, gdbpy_ref, htab_up.
16709
c0171de6
TT
167102017-01-10 Tom Tromey <tom@tromey.com>
16711
16712 * python/py-unwind.c (pending_frame_invalidate): Remove.
16713 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16714
f18e226f
TT
167152017-01-10 Tom Tromey <tom@tromey.com>
16716
16717 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16718 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16719
c57af3f1
TT
167202017-01-10 Tom Tromey <tom@tromey.com>
16721
16722 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16723
60e600ec
TT
167242017-01-10 Tom Tromey <tom@tromey.com>
16725
16726 * python/python.c (gdbpy_eval_from_control_command)
16727 (gdbpy_source_script, gdbpy_run_events)
16728 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16729 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16730 gdbpy_enter.
16731
bf7da5b0
TT
167322017-01-10 Tom Tromey <tom@tromey.com>
16733
16734 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16735
2d38bced
TT
167362017-01-10 Tom Tromey <tom@tromey.com>
16737
16738 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16739
07bc7329
TT
167402017-01-10 Tom Tromey <tom@tromey.com>
16741
16742 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16743 (python_on_inferior_call_pre, python_on_inferior_call_post)
16744 (python_on_memory_change, python_on_register_change)
16745 (python_inferior_exit, python_new_objfile, add_thread_object)
16746 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16747
6e7c365e
TT
167482017-01-10 Tom Tromey <tom@tromey.com>
16749
16750 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16751 (bpfinishpy_handle_exit): Use gdbpy_enter.
16752
6ba0cd40
TT
167532017-01-10 Tom Tromey <tom@tromey.com>
16754
16755 * python/py-cmd.c (cmdpy_destroyer)
16756 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16757 gdbpy_enter.
16758
de2dc875
TT
167592017-01-10 Tom Tromey <tom@tromey.com>
16760
16761 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16762 gdbpy_enter.
16763 (gdbpy_breakpoint_has_cond): Likewise.
16764
4ecee2c4
TT
167652017-01-10 Tom Tromey <tom@tromey.com>
16766
16767 * python/python.c (gdbpy_enter): New constructor.
16768 (~gdbpy_enter): New destructor.
16769 (restore_python_env, ensure_python_env): Rewrite.
16770 * python/python-internal.h (gdbpy_enter): New class.
16771
37fce74f
TT
167722017-01-10 Tom Tromey <tom@tromey.com>
16773
16774 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16775
53a0cca3
TT
167762017-01-10 Tom Tromey <tom@tromey.com>
16777
16778 * python/py-value.c (value_has_field, get_field_flag)
16779 (get_field_type, valpy_getitem, convert_value_from_python): Use
16780 gdbpy_ref.
16781
ff3724f5
TT
167822017-01-10 Tom Tromey <tom@tromey.com>
16783
16784 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16785 gdbpy_ref.
16786
0700aea5
TT
167872017-01-10 Tom Tromey <tom@tromey.com>
16788
16789 * python/py-prettyprint.c (search_pp_list)
16790 (find_pretty_printer_from_objfiles)
16791 (find_pretty_printer_from_progspace)
16792 (find_pretty_printer_from_gdb, find_pretty_printer)
16793 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16794 gdbpy_ref.
16795
1bb44c9f
TT
167962017-01-10 Tom Tromey <tom@tromey.com>
16797
16798 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16799
87ce03fd
TT
168002017-01-10 Tom Tromey <tom@tromey.com>
16801
16802 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16803 (ltpy_get_all_source_lines): Use gdbpy_ref.
16804
ee0a3fb8
TT
168052017-01-10 Tom Tromey <tom@tromey.com>
16806
16807 * python/py-framefilter.c (extract_sym, extract_value)
16808 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16809 gdbpy_ref.
16810
bf2a52fa
TT
168112017-01-10 Tom Tromey <tom@tromey.com>
16812
16813 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16814
f59fe7f8
TT
168152017-01-10 Tom Tromey <tom@tromey.com>
16816
16817 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16818
80bd970a
TT
168192017-01-10 Tom Tromey <tom@tromey.com>
16820
16821 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16822 gdbpy_ref.
16823
d1b3de2e
TT
168242017-01-10 Tom Tromey <tom@tromey.com>
16825
16826 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16827
3bb43384
TT
168282017-01-10 Tom Tromey <tom@tromey.com>
16829
16830 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16831 (typy_range): Use gdbpy_ref.
16832
abf5651e
TT
168332017-01-10 Tom Tromey <tom@tromey.com>
16834
16835 * python/py-threadevent.c (create_thread_event_object): Use
16836 gdbpy_ref.
16837 * python/py-stopevent.c (create_stop_event_object): Simplify.
16838 (emit_stop_event): Use gdbpy_ref.
16839 * python/py-signalevent.c (create_signal_event_object): Use
16840 gdbpy_ref.
16841 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16842 (emit_new_objfile_event, create_clear_objfiles_event_object)
16843 (emit_clear_objfiles_event): Use gdbpy_ref.
16844 * python/py-infevents.c (create_inferior_call_event_object)
16845 (create_register_changed_event_object)
16846 (create_memory_changed_event_object, emit_inferior_call_event)
16847 (emit_memory_changed_event, emit_register_changed_event): Use
16848 gdbpy_ref.
16849 * python/py-exitedevent.c (create_exited_event_object)
16850 (emit_exited_event): Use gdbpy_ref.
16851 * python/py-event.h (evpy_emit_event): Remove
16852 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16853 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16854 * python/py-continueevent.c (emit_continue_event): Use
16855 gdbpy_ref.
16856 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16857 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16858 gdbpy_ref.
16859 * python/py-bpevent.c (create_breakpoint_event_object): Use
16860 gdbpy_ref.
16861
a68ff33e
TT
168622017-01-10 Tom Tromey <tom@tromey.com>
16863
16864 * python/py-ref.h: New file.
16865
7becfd03
SM
168662017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16867
16868 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16869 void.
16870 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16871 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16872 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16873 * ui-out.c (ui_out::redirect): Likewise.
16874 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16875 * cli/cli-logging.c (set_logging_redirect): Update call site of
16876 ui_out::redirect.
16877 (handle_redirections): Likewise.
16878 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16879 * top.c (execute_command_to_string): Likewise.
16880 * utils.c (do_ui_out_redirect_pop): Likewise.
16881
df294654
SM
168822017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16883
16884 * stack.c (_initialize_stack): Update "frame" command help message.
16885
f5e6296e
IB
168862017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16887
16888 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16889
0e2d6fa6
YQ
168902017-01-06 Yao Qi <yao.qi@linaro.org>
16891
16892 * x86-linux-nat.h: Include gdb_proc_service.h.
16893
44d6d3f9
YQ
168942017-01-06 Yao Qi <yao.qi@linaro.org>
16895
16896 * ser-base.h: Include serial.h.
16897
656731fe
YQ
168982017-01-06 Yao Qi <yao.qi@linaro.org>
16899
16900 * ppc-linux-tdep.h: Include ppc-tdep.h.
16901
1ca8f924
YQ
169022017-01-06 Yao Qi <yao.qi@linaro.org>
16903
16904 * nat/amd64-linux-siginfo.h: Include signal.h.
16905
bc3008c4
YQ
169062017-01-06 Yao Qi <yao.qi@linaro.org>
16907
16908 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16909
66c80d03
YQ
169102017-01-06 Yao Qi <yao.qi@linaro.org>
16911
16912 * mi/mi-parse.h: Include mi-cmds.h.
16913
051d2dda
YQ
169142017-01-06 Yao Qi <yao.qi@linaro.org>
16915
16916 * inf-loop.c: Don't include "target.h".
16917 * inf-loop.h: Include it here.
16918
8018d34f
YQ
169192017-01-06 Yao Qi <yao.qi@linaro.org>
16920
16921 * dfp.h: Include "dboulest.h" and "expression.h".
16922
c0b8369c
YQ
169232017-01-06 Yao Qi <yao.qi@linaro.org>
16924
16925 * ax-gdb.h: Include "ax.h".
16926
ad5cba2a
YQ
169272017-01-06 Yao Qi <yao.qi@linaro.org>
16928
16929 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16930 with nat/gdb_ptrace.h.
16931
1c33cd7f
YQ
169322017-01-05 Yao Qi <yao.qi@linaro.org>
16933
16934 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16935 new line.
16936 (mips64_fbsd_sigframe_init): Likewise.
16937
c988ac1d
JB
169382017-01-04 John Baldwin <jhb@FreeBSD.org>
16939
16940 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16941 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16942
b268007c
JB
169432017-01-04 John Baldwin <jhb@FreeBSD.org>
16944
16945 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16946 * NEWS: Mention new FreeBSD/mips native configuration.
16947 * config/mips/fbsd.mh: New file.
16948 * configure.host: Add mips*-*-freebsd*.
16949 * mips-fbsd-nat.c: New file.
16950
387360da
JB
169512017-01-04 John Baldwin <jhb@FreeBSD.org>
16952
16953 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16954 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16955 * NEWS: Mention new FreeBSD/mips target.
16956 * configure.tgt: Add mips*-*-freebsd*.
16957 * mips-fbsd-tdep.c: New file.
16958 * mips-fbsd-tdep.h: New file.
16959
2aaaf250
YQ
169602017-01-04 Yao Qi <yao.qi@linaro.org>
16961
16962 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16963 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16964
61baf725
JB
169652017-01-01 Joel Brobecker <brobecker@adacore.com>
16966
6dbb839a 16967 Update copyright year range in all GDB files.
61baf725 16968
c113e7ff 169692017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16970
c113e7ff 16971 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16972
c113e7ff 16973For older changes see ChangeLog-2016.
c906108c
SS
16974\f
16975Local Variables:
16976mode: change-log
16977left-margin: 8
16978fill-column: 74
16979version-control: never
57da7796 16980coding: utf-8
c906108c 16981End: