]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Fix setting-breakpoints regression on PPC64 (function descriptors)
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
4024cf2b
PA
12017-11-29 Pedro Alves <palves@redhat.com>
2
3 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
4 * minsyms.c (msymbol_is_text): Delete.
5 (msymbol_is_function): New function.
6 * minsyms.h (msymbol_is_text): Delete.
7 (msymbol_is_function): New declaration.
8 * symtab.c (find_function_alias_target): Use msymbol_is_function.
9
5dcf52c1
TT
102017-11-29 Tom Tromey <tom@tromey.com>
11
12 * Makefile.in (distclean): Handle the case where rmdir fails.
13
8ca2f0b9
TT
142017-11-29 Tom Tromey <tom@tromey.com>
15
16 * symfile.c (_initialize_symfile): Update usage text for
17 add-symbol-file, symbol-file, load.
18
02ca603a
TT
192017-11-29 Tom Tromey <tom@tromey.com>
20
21 * symfile.c (add_symbol_file_command): Error if some arguments to
22 -s are missing. Change unrecognized-argument error message.
23 (_initialize_symfile): Fix usage text for add-symbol-file.
24
18ca7347
TT
252017-11-27 Tom Tromey <tom@tromey.com>
26
27 * Makefile.in (REMOTE_OBS): Remove.
28 (SFILES): Remove remote sources.
29 (COMMON_SFILES): Add remote sources.
30 (ALLDEPFILES): Remove dcache.c.
31
66599a7d
TT
322017-11-27 Tom Tromey <tom@tromey.com>
33
34 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
35 variables.
36 (SFILES): Use SUBDIR_TARGET_SRCS.
37 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
38 (CONFIG_SRC_SUBDIR): Add target.
39 (%.o): Remove target rule.
40
4f04fba8
TT
412017-11-27 Tom Tromey <tom@tromey.com>
42
43 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
44 registry.o, thread-fsm.o, debug.o.
45 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
46 thread-fsm.c, debug.c.
47
b5adff3b
TT
482017-11-27 Tom Tromey <tom@tromey.com>
49
50 * Makefile.in (COMMON_SFILES): New.
51 (SFILES): Move some entries to COMMON_SFILES.
52 (COMMON_OBS): Use COMMON_SFILES.
53
afa0a411
TT
542017-11-27 Tom Tromey <tom@tromey.com>
55
56 * Makefile.in (YYFILES): Update comment.
57 (YYOBJ): Redefine.
58
8fd8d003
TT
592017-11-27 Tom Tromey <tom@tromey.com>
60
61 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
62 (CONFIG_SRC_SUBDIR): Add python.
63 (%.o): Remove python rule.
64 (python/%.o): New rule.
65 * configure: Rebuild.
66 * configure.ac (CONFIG_OBS): Refer to python/python.o
67
bd810fff
TT
682017-11-27 Tom Tromey <tom@tromey.com>
69
70 * configure: Rebuild.
71 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
72 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
73 (CONFIG_SRC_SUBDIR): Add guile.
74 (%.o): Remove guile rule.
75
75787ac1
TT
762017-11-27 Tom Tromey <tom@tromey.com>
77
78 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
79 (%.o): Remove unittests rule.
80 (CONFIG_SRC_SUBDIR): Add unittests.
81
5c8a9431
TT
822017-11-27 Tom Tromey <tom@tromey.com>
83
84 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
85 (CONFIG_SRC_SUBDIR): Add tui.
86 (%.o): Remove tui rule.
87
a26aa30c
TT
882017-11-27 Tom Tromey <tom@tromey.com>
89
90 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
91 (%.o): Remove compile rule.
92 (CONFIG_SRC_SUBDIR): Add compile.
93
6f3cdf9a
TT
942017-11-27 Tom Tromey <tom@tromey.com>
95
96 * Makefile.in (SUBDIR_MI_OBS): Redefine.
97 (%.o): Remove mi rule.
98 (CONFIG_SRC_SUBDIR): Add mi.
99 (COMMON_OBS): Use mi/mi-common.o
100
f06afa53
TT
1012017-11-27 Tom Tromey <tom@tromey.com>
102
103 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
104 (%.o): Remove cli rule.
105 (CONFIG_SRC_SUBDIR): Add cli.
106
b22c88c2
TT
1072017-11-27 Tom Tromey <tom@tromey.com>
108
109 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
110 * configure: Rebuild.
111 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
112 (CONFIG_DEP_SUBDIR): New variable.
113 (%.o): Add order-only dependency.
114 ($(CONFIG_DEP_SUBDIR)): New target.
115
ee9a09e9
DC
1162017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
117
118 PR gdb/21945
119 * findcmd.c (_initialize_mem_search): Update find command help
120 text.
121
e8e7d10c
SM
1222017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
123
124 * python/python.c (do_start_initialization): Change progname
125 type to gdb::unique_xmalloc_ptr. Release the pointer when using
126 Python 2.
127
6a997029
TT
1282017-11-26 Tom Tromey <tom@tromey.com>
129
130 * common/format.h: Add include guards.
131
41272101
TT
1322017-11-26 Tom Tromey <tom@tromey.com>
133
134 * nat/linux-personality.h (class
135 maybe_disable_address_space_randomization): New class.
136 (maybe_disable_address_space_randomization): Don't declare
137 function.
138 * nat/linux-personality.c (restore_personality)
139 (make_disable_asr_cleanup): Remove.
140 (maybe_disable_address_space_randomization): Now a constructor.
141 (~maybe_disable_address_space_randomization): New destructor.
142 * linux-nat.c (linux_nat_create_inferior): Update.
143
44287fd8
TT
1442017-11-26 Tom Tromey <tom@tromey.com>
145
146 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
147
5ffd2cb7
UW
1482017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
149
150 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
151 "cooked" register. Access only first four bytes of branch target
152 registers.
153
0e5457dc
SDJ
1542017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
155
156 PR gdb/22491
157 * stap-probe.c (relocate_address): New function.
158 (stap_probe::get_relocated_address): Use 'relocate_address'.
159 (stap_probe::set_semaphore): Use 'relocate_address' and pass
160 'm_sem_addr'.
161 (stap_probe::clear_semaphore): Likewise.
162
deeeba55
PA
1632017-11-25 Pedro Alves <palves@redhat.com>
164
165 * dictionary.c: Include "safe-ctype.h".
166 * minsyms.c: Include "safe-ctype.h".
167 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
168
a81aaca0
PA
1692017-11-25 Pedro Alves <palves@redhat.com>
170
171 * completer.c (complete_line_internal_1): Skip spaces until the
172 start of the command.
173
0662b6a7
PA
1742017-11-24 Pedro Alves <palves@redhat.com>
175
176 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
177 cp_fq_symbol_name_matches. Pass language_cplus to
178 strncmp_with_mode.
179 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
180 (selftests::test_cp_symbol_name_cmp): New.
181 (_initialize_cp_support): Register "cp_symbol_name_matches"
182 selftests.
183 * language.c (default_symbol_name_matcher): Pass language_minimal
184 to strncmp_iw_with_mode.
185 * utils.c: Include "cp-support.h" and <algorithm>.
186 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
187 (cp_is_operator): New functions.
188 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
189 skip whitespace in the symbol name when the lookup name doesn't
190 have spaces, and vice versa.
191 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
192 * utils.h (strncmp_iw_with_mode): Add language parameter.
193
e547c119
JB
1942017-11-24 Joel Brobecker <brobecker@adacore.com>
195
196 * ada-lang.c (ada_exception_message_1, ada_exception_message):
197 New functions.
198 (print_it_exception): If available, display the exception
199 message as well.
200 * NEWS: Document new feature.
201
d7fcdff9
UW
2022017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
203
204 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
205
30649c14
PR
2062017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
207
208 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
209 (dtrace_probe::is_enabled, dtrace_probe::enable)
210 (dtrace_probe::disable): Remove keyword 'struct' at for-range
211 variable
212 * probe.c (gen_ui_out_table_header_info)
213 (print_ui_out_not_applicables): Remove keyword 'struct' at
214 for-range variable
215
7696f5c9
AH
2162017-11-24 Alan Hayward <alan.hayward@arm.com>
217
218 * configure.tgt: Add arch/aarch64.o
219
8172f16b
SM
2202017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
221
222 * common/common-utils.h: Include poison.h.
223 (xfree): Remove declaration, add definition with static_assert.
224 * common/common-utils.c (xfree): Remove.
225 * common/poison.h (IsMallocatable): Define.
226 (IsFreeable): Define.
227 (free): Delete for non-freeable types.
228 (xnew): New.
229 (XNEW): Undef and redefine.
230 (xcnew): New.
231 (XCNEW): Undef and redefine.
232 (xdelete): New.
233 (XDELETE): Undef and redefine.
234 (xnewvec): New.
235 (XNEWVEC): Undef and redefine.
236 (xcnewvec): New.
237 (XCNEWVEC): Undef and redefine.
238 (xresizevec): New.
239 (XRESIZEVEC): Undef and redefine.
240 (xdeletevec): New.
241 (XDELETEVEC): Undef and redefine.
242 (xnewvar): New.
243 (XNEWVAR): Undef and redefine.
244 (xcnewvar): New.
245 (XCNEWVAR): Undef and redefine.
246 (xresizevar): New.
247 (XRESIZEVAR): Undef and redefine.
248
7aabaf9d
SM
2492017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
250
251 * gdbthread.h (private_thread_info): Define structure type, add
252 virtual pure destructor.
253 (thread_info) <priv>: Change type to unique_ptr.
254 <private_dtor>: Remove.
255 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
256 (private_thread_info::~private_thread_info): Provide default
257 implementation.
258 (thread_info::~thread_info): Don't call private_dtor nor
259 manually free priv.
260 * aix-thread.c (private_thread_info): Rename to ...
261 (aix_thread_info): ... this.
262 (get_aix_thread_info): New.
263 (sync_threadlists): Adjust.
264 (iter_tid): Adjust.
265 (aix_thread_resume): Adjust.
266 (aix_thread_fetch_registers): Adjust.
267 (aix_thread_store_registers): Adjust.
268 (aix_thread_extra_thread_info): Adjust.
269 * darwin-nat.h (private_thread_info): Rename to ...
270 (darwin_thread_info): ... this.
271 (get_darwin_thread_info): New.
272 * darwin-nat.c (darwin_init_thread_list): Adjust.
273 (darwin_check_new_threads): Adjust.
274 (thread_info_from_private_thread_info): Adjust.
275 * linux-thread-db.c (private_thread_info): Rename to ...
276 (thread_db_thread_info): ... this, initialize fields.
277 (get_thread_db_thread_info): New.
278 <dying>: Change type to bool.
279 (update_thread_state): Adjust to type rename.
280 (record_thread): Adjust to type rename an use of unique_ptr.
281 (thread_db_pid_to_str): Likewise.
282 (thread_db_extra_thread_info): Likewise.
283 (thread_db_thread_handle_to_thread_info): Likewise.
284 (thread_db_get_thread_local_address): Likewise.
285 * nto-tdep.h (private_thread_info): Rename to ...
286 (nto_thread_info): ... this, initialize fields.
287 (get_nto_thread_info): New.
288 <name>: Change type to std::string.
289 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
290 use of unique_ptr.
291 * nto-procfs.c (update_thread_private_data_name): Adjust to
292 std::string change, allocate nto_private_thread_info with new.
293 (update_thread_private_data): Adjust to unique_ptr.
294 * remote.c (private_thread_info): Rename to ...
295 (remote_thread_info): ... this, initialize data members with
296 default values.
297 <extra, name>: Change type to std::string.
298 <thread_handle>: Change type to non-pointer.
299 (free_private_thread_info): Remove.
300 (get_private_info_thread): Rename to...
301 (get_remote_thread_info): ... this, change return type, adjust to
302 use of unique_ptr, use remote_thread_info constructor.
303 (remote_add_thread): Adjust.
304 (get_private_info_ptid): Rename to...
305 (get_remote_thread_info): ...this, change return type.
306 (remote_thread_name): Use get_remote_thread_info, adjust to
307 change to std::string.
308 (struct thread_item) <~thread_item>: Remove.
309 <thread_handle>: Make non pointer.
310 (start_thread): Adjust to thread_item::thread_handle type
311 change.
312 (remote_update_thread_list): Adjust to type name change, move
313 strings from temporary to long-lived object instead of
314 duplicating.
315 (remote_threads_extra_info): Use get_remote_thread_info.
316 (process_initial_stop_replies): Likewise.
317 (resume_clear_thread_private_info): Likewise.
318 (remote_resume): Adjust to type name change.
319 (remote_commit_resume): Use get_remote_thread_info.
320 (process_stop_reply): Adjust to type name change.
321 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
322 (remote_stopped_by_hw_breakpoint): Likewise.
323 (remote_stopped_by_watchpoint): Likewise.
324 (remote_stopped_data_address): Likewise.
325 (remote_core_of_thread): Likewise.
326 (remote_thread_handle_to_thread_info): Use
327 get_private_info_thread, adjust to thread_handle field type
328 change.
329
21fe1c75
SM
3302017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
331
332 * remote.c (struct thread_item): Add constructor, disable copy
333 construction and copy assignment, define default move
334 construction and move assignment.
335 <extra, name>: Change type to std::string.
336 <core>: Initialize.
337 <thread_handle>: Make non-pointer.
338 (thread_item_t): Remove typedef.
339 (DEF_VEC_O(thread_item_t)): Remove.
340 (threads_listing_context) <contains_thread>: New method.
341 <remove_thread>: New method.
342 <items>: Change type to std::vector.
343 (clear_threads_listing_context): Remove.
344 (threads_listing_context_remove): Remove.
345 (remote_newthread_step): Use thread_item constructor, adjust to
346 change to std::vector.
347 (start_thread): Use thread_item constructor, adjust to change to
348 std::vector.
349 (end_thread): Adjust to change to std::vector and std::string.
350 (remote_get_threads_with_qthreadinfo): Use thread_item
351 constructor, adjust to std::vector.
352 (remote_update_thread_list): Adjust to change to std::vector and
353 std::string, use threads_listing_context methods.
354 (remove_child_of_pending_fork): Adjust.
355 (remove_new_fork_children): Adjust.
356 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
357 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
358 * unittests/rsp-low-selftests.c: New file.
359 * common/rsp-low.h: Include common/byte-vector.h.
360 (hex2bin): New overload.
361 * common/rsp-low.c (hex2bin): New overload.
362
089354bb
SM
3632017-11-24 Simon Marchi <simon.marchi@ericsson.com>
364
365 * inferior.h (private_inferior): Define structure type, add
366 virtual pure destructor.
367 (inferior) <priv>: Change type to unique_ptr.
368 * inferior.c (private_inferior::~private_inferior): Provide
369 default implementation.
370 (inferior::~inferior): Don't free priv field.
371 (exit_inferior_1): Likewise.
372 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
373 (darwin_exception_info): Remove typedef.
374 (DEF_VEC_O (darwin_thread_t)); Remove.
375 (private_inferior): Rename to ...
376 (darwin_private_inferior): ... this, extend private_inferior.
377 (get_darwin_inferior): New.
378 <threads>: Change type to std::vector of darwin_thread_t pointers.
379 * darwin-nat.c (darwin_check_new_threads): Adjust.
380 (find_inferior_task_it): Adjust.
381 (darwin_find_thread); Adjust.
382 (darwin_suspend_inferior): Adjust.
383 (darwin_resume_inferior): Adjust.
384 (darwin_find_new_inferior): Adjust.
385 (darwin_decode_notify_message): Adjust.
386 (darwin_send_reply): Adjust.
387 (darwin_resume_inferior_threads): Adjust.
388 (darwin_suspend_inferior_threads): Adjust.
389 (darwin_decode_message): Adjust.
390 (darwin_wait): Adjust.
391 (darwin_interrupt): Adjust.
392 (darwin_deallocate_threads): Adjust.
393 (darwin_mourn_inferior): Adjust, don't free private data.
394 (darwin_reply_to_all_pending_messages): Adjust.
395 (darwin_stop_inferior): Adjust.
396 (darwin_setup_exceptions): Adjust.
397 (darwin_kill_inferior): Adjust.
398 (darwin_setup_request_notification): Adjust.
399 (darwin_attach_pid): Adjust.
400 (darwin_init_thread_list): Adjust.
401 (darwin_setup_fake_stop_event): Adjust.
402 (darwin_attach): Adjust.
403 (darwin_detach): Adjust.
404 (darwin_xfer_partial): Adjust.
405 (set_enable_mach_exceptions): Adjust.
406 (darwin_pid_to_exec_file): Adjust.
407 (darwin_get_ada_task_ptid): Adjust.
408 * darwin-nat-info.c (get_task_from_args): Adjust.
409 (info_mach_ports_command): Adjust.
410 (info_mach_region_command): Adjust.
411 (info_mach_exceptions_command): Adjust.
412 * remote.c (private_inferior): Rename to ...
413 (remote_private_inferior): ... this, initialize fields.
414 (get_remote_inferior); New.
415 (remote_commit_resume): Use get_remote_inferior.
416 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
417
d044bac8
PA
4182017-11-24 Pedro Alves <palves@redhat.com>
419
420 * NEWS: Mention linespecs and explicit locations, and completion
421 improvements.
422
e8d58cba
YQ
4232017-11-24 Yao Qi <yao.qi@linaro.org>
424
425 * regcache.c (regcache::dump): Remove footnote_register_size.
426
a63f2d2f
YQ
4272017-11-24 Yao Qi <yao.qi@linaro.org>
428
429 * regcache.c (cooked_read_test): Add more test for readonly
430 regcache.
431
1b30aaa5
YQ
4322017-11-24 Yao Qi <yao.qi@linaro.org>
433
434 * gdbarch-selftests.c (test_target_has_registers): Move it to
435 target.c.
436 (test_target_has_stack): Likewise.
437 (test_target_has_memory): Likewise.
438 (test_target_prepare_to_store): Likewise.
439 (test_target_store_registers): Likewise.
440 (test_target_ops): Likewise.
441 * regcache.c: Include selftest-arch.h and gdbthread.h.
442 (target_ops_no_register): New class.
443 (test_target_fetch_registers): New.
444 (test_target_store_registers): New.
445 (test_target_xfer_partial): New.
446 (readwrite_regcache): New.
447 (cooked_read_test): New.
448 (_initialize_regcache): Register the test.
449 * target.c: (test_target_has_registers): Moved from
450 gdbarch-selftests.c.
451 (test_target_has_stack): Likewise.
452 (test_target_has_memory): Likewise.
453 (test_target_prepare_to_store): Likewise.
454 (test_target_store_registers): Likewise.
455 * target.h (test_target_ops): New class.
456
6654d750
AH
4572017-11-24 Alan Hayward <alan.hayward@arm.com>
458
459 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
460 selftest.
461
49bdb7ee
AH
4622017-11-24 Alan Hayward <alan.hayward@arm.com>
463
464 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
465 * arch/aarch64.c (aarch64_create_target_description): Create
466 new target description.
467 * features/Makefile: Add new files.
468 * features/aarch64.c: Remove file.
469 * features/aarch64-core.c: New autogenerated file.
470 * features/aarch64-fpu.c: New autogenerated file.
471 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
472
4732017-11-24 Alan Hayward <alan.hayward@arm.com>
474
475 * Makefile.in: Add new files.
476 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
477 aarch64_read_description.
478 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
479 Call aarch64_read_description.
480 * aarch64-tdep.c (aarch64_read_description): New function.
481 (aarch64_gdbarch_init): Call aarch64_read_description.
482 * aarch64-tdep.h (aarch64_read_description): New function.
483 * arch/aarch64.c: New file.
484 * configure.tgt: Add new files.
485
98ead37e
YQ
4862017-11-24 Yao Qi <yao.qi@linaro.org>
487
488 * mi/mi-main.c (register_changed_p): Update.
489 * value.c (value_contents_bits_eq): Change return type.
490 (value_contents_eq): Likewise.
491 * value.h: Update comments.
492
62ad7ce7
YQ
4932017-11-24 Yao Qi <yao.qi@linaro.org>
494
495 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
496 local 'changed'. Remove error.
497 (register_changed_p): Change return type to bool.
498
506fe5f4
YQ
4992017-11-24 Yao Qi <yao.qi@linaro.org>
500
501 * arch/tic6x.c: New file.
502 * arch/tic6x.h: New file.
503 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
504 tic6x-core.xml and tic6x-gp.xml.
505 * features/tic6x-c6xp.c: Generated.
506 * features/tic6x-core.c: Generated.
507 * features/tic6x-gp.c: Generated.
508 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
509 "tic6x-".
510
00ea2e2a
SM
5112017-11-23 Simon Marchi <simon.marchi@ericsson.com>
512
513 * mi/mi-main.c (list_available_thread_groups): Change map value
514 type to std::vector.
515
f45e2a77
SM
5162017-11-23 Simon Marchi <simon.marchi@ericsson.com>
517
518 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
519
bd046f64
SM
5202017-11-23 Simon Marchi <simon.marchi@ericsson.com>
521
522 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
523 back to...
524 <children_requested>: ... this.
525 (varobj_get_num_children, varobj_update): Adjust.
526
4c37490d
SM
5272017-11-23 Simon Marchi <simon.marchi@ericsson.com>
528
529 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
530 (ada_value_has_mutated): Likewise.
531 * c-varobj.c (varobj_is_anonymous_child): Likewise.
532 (c_is_path_expr_parent): Likewise.
533 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
534 (mi_cmd_var_set_frozen): Likewise.
535 (mi_cmd_var_update_iter): Likewise.
536 (mi_cmd_var_update): Likewise.
537 * varobj.c (pretty_printing): Likewise.
538 (varobj_enable_pretty_printing): Likewise.
539 (struct varobj_root) <floating, is_valid>: Likewise.
540 (struct varobj_dynamic) <children_requested>: Likewise.
541 (delete_variable): Likewise.
542 (delete_variable_1): Likewise.
543 (install_variable): Likewise.
544 (update_type_if_necessary): Likewise.
545 (install_new_value): Likewise.
546 (value_of_root): Likewise.
547 (is_root_p): Likewise.
548 (varobj_create): Likewise.
549 (varobj_delete): Likewise.
550 (varobj_has_more): Likewise.
551 (varobj_set_frozen): Likewise.
552 (varobj_get_frozen): Likewise.
553 (install_dynamic_child): Likewise.
554 (dynamic_varobj_has_child_method): Likewise.
555 (update_dynamic_varobj_children): Likewise.
556 (varobj_get_num_children): Likewise.
557 (varobj_list_children): Likewise.
558 (is_path_expr_parent): Likewise.
559 (varobj_default_is_path_expr_parent): Likewise.
560 (varobj_is_dynamic_p): Likewise.
561 (varobj_set_value): Likewise.
562 (varobj_value_has_mutated): Likewise.
563 (varobj_update): Likewise.
564 (check_scope): Likewise.
565 (value_of_root_1): Likewise.
566 (varobj_value_get_print_value): Likewise.
567 (varobj_editable_p): Likewise.
568 (varobj_value_is_changeable_p): Likewise.
569 (varobj_floating_p): Likewise.
570 (varobj_default_value_is_changeable_p): Likewise.
571 (varobj_invalidate_iter): Likewise.
572 * varobj.h (struct varobj_update_result) <type_changed,
573 children_changed, changed, value_installed>: Likewise.
574 (struct varobj) <updated, frozen, not_fetched>: Likewise.
575 (struct lang_varobj_ops) <value_is_changeable_p,
576 value_has_mutated, is_path_expr_parent>: Likewise.
577 (varobj_delete): Likewise.
578 (varobj_set_frozen): Likewise.
579 (varobj_get_frozen): Likewise.
580 (varobj_set_value): Likewise.
581 (varobj_update): Likewise.
582 (varobj_editable_p): Likewise.
583 (varobj_floating_p): Likewise.
584 (varobj_has_more): Likewise.
585 (varobj_is_dynamic_p): Likewise.
586 (varobj_default_value_is_changeable_p): Likewise.
587 (varobj_value_is_changeable_p): Likewise.
588 (varobj_is_anonymous_child): Likewise.
589 (varobj_default_is_path_expr_parent): Likewise.
590
9c23b42f
SDJ
5912017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
592
593 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
594 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
595 <type_str>: Convert to 'std::string'.
596 <expr>: Convert to 'expression_up'.
597 (dtrace_probe_arg_s): Delete type and VEC.
598 (dtrace_probe_enabler_s): Likewise.
599 (struct dtrace_probe): Replace by...
600 (class dtrace_static_probe_ops): ...this and...
601 (class dtrace_probe): ...this.
602 (dtrace_probe_is_linespec): Rename to...
603 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
604 to reflect change.
605 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
606 Adjust code. Create new instance of 'dtrace_probe'.
607 (dtrace_build_arg_exprs): Rename to...
608 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
609 reflect change.
610 (dtrace_get_probes): Rename to...
611 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
612 to reflect change.
613 (dtrace_get_arg): Rename to...
614 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
615 reflect change.
616 (dtrace_probe_is_enabled): Rename to...
617 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
618 change.
619 (dtrace_get_probe_address): Rename to...
620 (dtrace_probe::get_relocated_address): ...this. Adjust code
621 to reflect change.
622 (dtrace_get_probe_argument_count): Rename to...
623 (dtrace_probe::get_argument_count): ...this. Adjust code to
624 reflect change.
625 (dtrace_can_evaluate_probe_arguments): Rename to...
626 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
627 to reflect change.
628 (dtrace_evaluate_probe_argument): Rename to...
629 (dtrace_probe::evaluate_argument): ...this. Adjust code to
630 reflect change.
631 (dtrace_compile_to_ax): Rename to...
632 (dtrace_probe::compile_to_ax): ...this. Adjust code to
633 reflect change.
634 (dtrace_probe_destroy): Delete.
635 (dtrace_type_name): Rename to...
636 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
637 reflect change.
638 (dtrace_probe::get_static_ops): New method.
639 (dtrace_gen_info_probes_table_header): Rename to...
640 (dtrace_static_probe_ops::gen_info_probes_table_header):
641 ...this. Adjust code to reflect change.
642 (dtrace_gen_info_probes_table_values): Rename to...
643 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
644 code to reflect change.
645 (dtrace_enable_probe): Rename to...
646 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
647 change.
648 (dtrace_disable_probe): Rename to...
649 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
650 change.
651 (struct probe_ops dtrace_probe_ops): Delete.
652 (info_probes_dtrace_command): Call 'info_probes_for_spops'
653 instead of 'info_probes_for_ops'.
654 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
655 of 'all_probe_ops'.
656
0e9ae10f
SDJ
6572017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
658 Simon Marchi <simark@simark.ca>
659
660 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
661 variable.
662 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
663 <aexpr>: Change type to 'expression_up'.
664 (stap_probe_arg_s): Delete type and VEC.
665 (struct stap_probe): Delete. Replace by...
666 (class stap_static_probe_ops): ...this and...
667 (class stap_probe): ...this. Rename variables to add 'm_'
668 prefix. Do not use 'union' for arguments anymore.
669 (stap_get_expected_argument_type): Receive probe name instead
670 of 'struct stap_probe'. Adjust code.
671 (stap_parse_probe_arguments): Rename to...
672 (stap_probe::parse_arguments): ...this. Adjust code to
673 reflect change.
674 (stap_get_probe_address): Rename to...
675 (stap_probe::get_relocated_address): ...this. Adjust code
676 to reflect change.
677 (stap_get_probe_argument_count): Rename to...
678 (stap_probe::get_argument_count): ...this. Adjust code
679 to reflect change.
680 (stap_get_arg): Rename to...
681 (stap_probe::get_arg_by_number'): ...this. Adjust code to
682 reflect change.
683 (can_evaluate_probe_arguments): Rename to...
684 (stap_probe::can_evaluate_arguments): ...this. Adjust code
685 to reflect change.
686 (stap_evaluate_probe_argument): Rename to...
687 (stap_probe::evaluate_argument): ...this. Adjust code
688 to reflect change.
689 (stap_compile_to_ax): Rename to...
690 (stap_probe::compile_to_ax): ...this. Adjust code to
691 reflect change.
692 (stap_probe_destroy): Delete.
693 (stap_modify_semaphore): Adjust comment.
694 (stap_set_semaphore): Rename to...
695 (stap_probe::set_semaphore): ...this. Adjust code to reflect
696 change.
697 (stap_clear_semaphore): Rename to...
698 (stap_probe::clear_semaphore): ...this. Adjust code to
699 reflect change.
700 (stap_probe::get_static_ops): New method.
701 (handle_stap_probe): Adjust code to create instance of
702 'stap_probe'.
703 (stap_get_probes): Rename to...
704 (stap_static_probe_ops::get_probes): ...this. Adjust code to
705 reflect change.
706 (stap_probe_is_linespec): Rename to...
707 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
708 reflect change.
709 (stap_type_name): Rename to...
710 (stap_static_probe_ops::type_name): ...this. Adjust code to
711 reflect change.
712 (stap_gen_info_probes_table_header): Rename to...
713 (stap_static_probe_ops::gen_info_probes_table_header):
714 ...this. Adjust code to reflect change.
715 (stap_gen_info_probes_table_values): Rename to...
716 (stap_probe::gen_info_probes_table_values): ...this. Adjust
717 code to reflect change.
718 (struct probe_ops stap_probe_ops): Delete.
719 (info_probes_stap_command): Use 'info_probes_for_spops'
720 instead of 'info_probes_for_ops'.
721 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
722 of 'all_probe_ops'.
723
935676c9
SDJ
7242017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
725
726 * break-catch-throw.c (fetch_probe_arguments): Use
727 'probe.prob' instead of 'probe.probe'.
728 * breakpoint.c (create_longjmp_master_breakpoint): Call
729 'can_evaluate_arguments' and 'get_relocated_address' methods
730 from probe.
731 (create_exception_master_breakpoint): Likewise.
732 (add_location_to_breakpoint): Use 'sal->prob' instead of
733 'sal->probe'.
734 (bkpt_probe_insert_location): Call 'set_semaphore' method from
735 probe.
736 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
737 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
738 of 'probe_ops'.
739 (probe_key_free): Call 'delete' on probe.
740 (check_exception_resume): Use 'probe.prob' instead of
741 'probe.probe'.
742 * location.c (string_to_event_location_basic): Call
743 'probe_linespec_to_static_ops'.
744 * probe.c (class any_static_probe_ops): New class.
745 (any_static_probe_ops any_static_probe_ops): New variable.
746 (parse_probes_in_pspace): Receive 'static_probe_ops' as
747 argument. Adjust code to reflect change.
748 (parse_probes): Use 'static_probe_ops' instead of
749 'probe_ops'. Adjust code to reflect change.
750 (find_probes_in_objfile): Call methods to get name and
751 provider from probe.
752 (find_probe_by_pc): Use 'result.prob' instead of
753 'result.probe'. Call 'get_relocated_address' method from
754 probe.
755 (collect_probes): Adjust comment and argument list to receive
756 'static_probe_ops' instead of 'probe_ops'. Adjust code to
757 reflect change. Call necessary methods from probe.
758 (compare_probes): Call methods to get name and provider from
759 probes.
760 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
761 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
762 adjust code accordingly.
763 (print_ui_out_not_applicables): Likewise.
764 (info_probes_for_ops): Rename to...
765 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
766 as argument instead of 'probe_ops'. Adjust code. Call
767 necessary methods from probe.
768 (info_probes_command): Use 'info_probes_for_spops'.
769 (enable_probes_command): Pass correct argument to
770 'collect_probes'. Call methods from probe.
771 (disable_probes_command): Likewise.
772 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
773 (get_probe_argument_count): Move to
774 'any_static_probe_ops::get_argument_count'.
775 (can_evaluate_probe_arguments): Move to
776 'any_static_probe_ops::can_evaluate_arguments'.
777 (evaluate_probe_argument): Move to
778 'any_static_probe_ops::evaluate_argument'.
779 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
780 'probe.probe'.
781 (probe_linespec_to_ops): Rename to...
782 (probe_linespec_to_static_ops): ...this. Adjust code.
783 (probe_any_is_linespec): Rename to...
784 (any_static_probe_ops::is_linespec): ...this.
785 (probe_any_get_probes): Rename to...
786 (any_static_probe_ops::get_probes): ...this.
787 (any_static_probe_ops::type_name): New method.
788 (any_static_probe_ops::gen_info_probes_table_header): New
789 method.
790 (compute_probe_arg): Use 'pc_probe.prob' instead of
791 'pc_probe.probe'. Call methods from probe.
792 (compile_probe_arg): Likewise.
793 (std::vector<const probe_ops *> all_probe_ops): Delete.
794 (std::vector<const static_probe_ops *> all_static_probe_ops):
795 New variable.
796 (_initialize_probe): Use 'all_static_probe_ops' instead of
797 'all_probe_ops'.
798 * probe.h (struct info_probe_column) <field_name>: Delete
799 extraneous newline
800 (info_probe_column_s): Delete type and VEC.
801 (struct probe_ops): Delete. Replace with...
802 (class static_probe_ops): ...this and...
803 (clas probe): ...this.
804 (struct bound_probe) <bound_probe>: Delete extraneous
805 newline. Adjust constructor to receive 'probe' instead of
806 'struct probe'.
807 <probe>: Rename to...
808 <prob>: ...this. Delete extraneous newline.
809 <objfile>: Delete extraneous newline.
810 (register_probe_ops): Delete unused prototype.
811 (info_probes_for_ops): Rename to...
812 (info_probes_for_spops): ...this. Adjust comment.
813 (get_probe_address): Move to 'probe::get_address'.
814 (get_probe_argument_count): Move to
815 'probe::get_argument_count'.
816 (can_evaluate_probe_arguments): Move to
817 'probe::can_evaluate_arguments'.
818 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
819 * solib-svr4.c (struct svr4_info): Adjust comment.
820 (struct probe_and_action) <probe>: Rename to...
821 <prob>: ...this.
822 (register_solib_event_probe): Receive 'probe' instead of
823 'struct probe' as argument. Use 'prob' instead of 'probe'
824 when applicable.
825 (solib_event_probe_action): Call 'get_argument_count' method
826 from probe. Adjust comment.
827 (svr4_handle_solib_event): Adjust comment. Call
828 'evaluate_argument' method from probe.
829 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
830 from probe.
831 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
832 'struct probe'. Call 'can_evaluate_arguments' from probe.
833 * symfile.h: Forward declare 'class probe' instead of 'struct
834 probe'.
835 * symtab.h: Likewise.
836 (struct symtab_and_line) <probe>: Rename to...
837 <prob>: ...this.
838 * tracepoint.c (start_tracing): Use 'prob' when applicable.
839 Call probe methods.
840 (stop_tracing): Likewise.
841
8f6cb6c3
JB
8422017-11-22 Joel Brobecker <brobecker@adacore.com>
843
844 * ravenscar-thread.c (ravenscar_inferior_created): Remove
845 trailing newline at end of string in call to warning.
846
479f8de1
SM
8472017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
848
849 * osdata.h: Include vector isntead of vec.h.
850 (osdata_column_s): Remove typedef.
851 (struct osdata_column): Add constructor.
852 <name, value>: Change type to std::string.
853 (DEF_VEC_O (osdata_column_s)): Remove.
854 (osdata_item_s): Remove typedef.
855 (struct osdata_item) <columns>: Change type to std::vector.
856 (DEF_VEC_O (osdata_item_s)): Remove.
857 (struct osdata): Add constructor.
858 <type>: Change type to std::string.
859 <items>: Change type to std::vector.
860 (osdata_p): Remove typedef.
861 (DEF_VEC_P (osdata_p)): Remove.
862 (osdata_parse): Return a unique_ptr.
863 (osdata_free): Remove.
864 (make_cleanup_osdata_free): Remove.
865 (get_osdata): Return a unique_ptr.
866 (get_osdata_column): Return pointer to std::string, take a
867 reference to osdata_item as parameter.
868 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
869 unique_ptr.
870 <property_name>: Change type to std::string.
871 (osdata_start_osdata): Allocate osdata with new and adjust.
872 (osdata_start_item): Adjust.
873 (osdata_start_column): Adjust.
874 (osdata_end_column): Adjust.
875 (clear_parsing_data): Remove.
876 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
877 (osdata_item_clear): Remove.
878 (get_osdata): return a unique_ptr and adjust.
879 (get_osdata_column): Return a pointer to std::string and adjust.
880 (info_osdata): Adjust.
881 * mi/mi-main.c: Include <map>.
882 (free_vector_of_osdata_items): Remove.
883 (list_available_thread_groups): Adjust, use std::map instead of
884 splay tree.
885
41bd68f5
SM
8862017-11-22 Simon Marchi <simon.marchi@ericsson.com>
887
888 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
889 case in switch.
890
7e2fd2f4
SM
8912017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
892
893 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
894
0604393c
SM
8952017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
896
897 * varobj.h (struct varobj_update_result): Add constructor, add
898 move constructor, disable copy and assign, initialize fields.
899 <newobj>: Change type to std::vector.
900 (varobj_update): Return std::vector.
901 * varobj.c (install_dynamic_child): Change VEC parameters to
902 std::vector and adjust.
903 (update_dynamic_varobj_children): Likewise.
904 (varobj_update): Return std::vector and adjust.
905 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
906
ddf0ea08
SM
9072017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
908
909 * varobj.h (struct varobj) <parent>: Remove const.
910 <children>: Change type to std::vector.
911 (varobj_list_children): Return std::vector const reference.
912 (varobj_restrict_range): Change parameter type to std::vector
913 const reference.
914 * varobj.c (varobj_has_more): Adjust.
915 (varobj_restrict_range): Change parameter type to std::vector
916 const reference and adjust.
917 (install_dynamic_child): Adjust.
918 (update_dynamic_varobj_children): Adjust.
919 (varobj_list_children): Return std::vector const reference and
920 adjust.
921 (varobj_add_child): Adjust.
922 (update_type_if_necessary): Adjust.
923 (varobj_update): Adjust.
924 (delete_variable_1): Adjust.
925 * ada-varobj.c (ada_value_has_mutated): Adjust.
926 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
927
9e5b9d2b
SM
9282017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
929
930 * varobj.h (struct varobj): Add constructor and destructor,
931 initialize fields.
932 * varobj.c (struct varobj_root): Initialize fields.
933 (struct varobj_dynamic): Initialize fields.
934 (varobj_create): Use unique_ptr instead of cleanup. Create
935 varobj with new instead of new_root_variable.
936 (delete_variable_1): Free variable with delete instead of
937 free_variable.
938 (create_child_with_value): Create variable with new instead of
939 new_variable.
940 (varobj::varobj): New.
941 (varobj::~varobj): New (body mostly coming from free_variable).
942 (new_variable): Remove.
943 (free_variable): Remove.
944 (do_free_variable_cleanup): Remove.
945 (make_cleanup_free_variable): Remove.
946
fc35dab1
UW
9472017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
948
949 * core-regset.c: Remove file.
950 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
951
2400729e
UW
9522017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
953
954 * NEWS: Document use of GNU MPFR.
955 * README: Likewise.
956
957 * Makefile.in (LIBMPFR): Add define.
958 (CLIBS): Add $(LIBMPFR).
959 * configure.ac: Add --with-mpfr configure option.
960 * configure: Regenerate.
961 * config.in: Regenerate.
962
963 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
964 (class mpfr_float_ops): New type.
965 (mpfr_float_ops::from_target): Two new overloaded functions.
966 (mpfr_float_ops::to_target): Likewise.
967 (mpfr_float_ops::to_string): New function.
968 (mpfr_float_ops::from_string): Likewise.
969 (mpfr_float_ops::to_longest): Likewise.
970 (mpfr_float_ops::from_longest): Likewise.
971 (mpfr_float_ops::from_ulongest): Likewise.
972 (mpfr_float_ops::to_host_double): Likewise.
973 (mpfr_float_ops::from_host_double): Likewise.
974 (mpfr_float_ops::convert): Likewise.
975 (mpfr_float_ops::binop): Likewise.
976 (mpfr_float_ops::compare): Likewise.
977 (get_target_float_ops): Use mpfr_float_ops if available.
978
7a26362d
UW
9792017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
980
981 * target-float.c: Do not include <math.h>.
982 Include <cmath> and <limits>.
983 (DOUBLEST): Do not define.
984 (class target_float_ops): New type.
985 (class host_float_ops): New templated type.
986 (class decimal_float_ops): New type.
987
988 (floatformat_to_doublest): Rename to ...
989 (host_float_ops<T>::from_target): ... this. Use template type T
990 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
991 (host_float_ops<T>::from_target): New overload using a type argument.
992 (floatformat_from_doublest): Rename to ...
993 (host_float_ops<T>::to_target): ... this. Use template type T
994 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
995 (host_float_ops<T>::to_target): New overload using a type argument.
996 (floatformat_printf_format): New function.
997 (struct printf_length_modifier): New templated type.
998 (floatformat_to_string): Rename to ...
999 (host_float_ops<T>::to_string): ... this. Use type instead of
1000 floatformat argument. Use floatformat_printf_format and
1001 printf_length_modifier. Remove special handling of invalid numbers,
1002 infinities and NaN (moved to target_float_to_string).
1003 (struct scanf_length_modifier): New templated type.
1004 (floatformat_from_string): Rename to ...
1005 (host_float_ops<T>::from_string): ... this. Use type instead of
1006 floatformat argument. Use scanf_length_modifier.
1007 (floatformat_to_longest): Rename to ...
1008 (host_float_ops<T>::to_longest): ... this. Use type instead of
1009 floatformat argument. Handle out-of-range values deterministically.
1010 (floatformat_from_longest): Rename to ...
1011 (host_float_ops<T>::from_longest): ... this. Use type instead of
1012 floatformat argument.
1013 (floatformat_from_ulongest): Rename to ...
1014 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1015 floatformat argument.
1016 (floatformat_to_host_double): Rename to ...
1017 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1018 floatformat argument.
1019 (floatformat_from_host_double): Rename to ...
1020 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1021 floatformat argument.
1022 (floatformat_convert): Rename to ...
1023 (host_float_ops<T>::convert): ... this. Use type instead of
1024 floatformat arguments. Remove handling of no-op conversions.
1025 (floatformat_binop): Rename to ...
1026 (host_float_ops<T>::binop): ... this. Use type instead of
1027 floatformat arguments.
1028 (floatformat_compare): Rename to ...
1029 (host_float_ops<T>::compare): ... this. Use type instead of
1030 floatformat arguments.
1031
1032 (match_endianness): Use type instead of length/byte_order arguments.
1033 (set_decnumber_context): Likewise.
1034 (decimal_from_number): Likewise. Update calls.
1035 (decimal_to_number): Likewise.
1036 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1037 (decimal_float_ops::to_host_double): New dummy function.
1038 (decimal_float_ops::from_host_double): Likewise.
1039 (decimal_to_string): Rename to ...
1040 (decimal_float_ops::to_string): ... this. Use type instead of
1041 length/byte_order arguments. Update calls.
1042 (decimal_from_string): Rename to ...
1043 (decimal_float_ops::from_string): ... this. Use type instead of
1044 length/byte_order arguments. Update calls.
1045 (decimal_from_longest): Rename to ...
1046 (decimal_float_ops::from_longest): ... this. Use type instead of
1047 length/byte_order arguments. Update calls.
1048 (decimal_from_ulongest): Rename to ...
1049 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1050 length/byte_order arguments. Update calls.
1051 (decimal_to_longest): Rename to ...
1052 (decimal_float_ops::to_longest): ... this. Use type instead of
1053 length/byte_order arguments. Update calls.
1054 (decimal_binop): Rename to ...
1055 (decimal_float_ops::binop): ... this. Use type instead of
1056 length/byte_order arguments. Update calls.
1057 (decimal_compare): Rename to ...
1058 (decimal_float_ops::compare): ... this. Use type instead of
1059 length/byte_order arguments. Update calls.
1060 (decimal_convert): Rename to ...
1061 (decimal_float_ops::convert): ... this. Use type instead of
1062 length/byte_order arguments. Update calls.
1063
1064 (target_float_same_category_p): New function.
1065 (target_float_same_format_p): Likewise.
1066 (target_float_format_length): Likewise.
1067 (enum target_float_ops_kind): New type.
1068 (get_target_float_ops_kind): New function.
1069 (get_target_float_ops): Three new overloaded functions.
1070
1071 (target_float_is_zero): Update call.
1072 (target_float_to_string): Add special handling of invalid numbers,
1073 infinities and NaN (moved from floatformat_to_string). Use
1074 target_float_ops callback.
1075 (target_float_from_string): Use target_float_ops callback.
1076 (target_float_to_longest): Likewise.
1077 (target_float_from_longest): Likewise.
1078 (target_float_from_ulongest): Likewise.
1079 (target_float_to_host_double): Likewise.
1080 (target_float_from_host_double): Likewise.
1081 (target_float_convert): Add special case for no-op conversions.
1082 Use target_float_ops callback.
1083 (target_float_binop): Use target_float_ops callback.
1084 (target_float_compare): Likewise.
1085
a9f26f60
YQ
10862017-11-22 Yao Qi <yao.qi@linaro.org>
1087
1088 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1089
29f9a567
YQ
10902017-11-22 Yao Qi <yao.qi@linaro.org>
1091
1092 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1093 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1094
3b1b69bf
JG
10952017-11-21 Jerome Guitton <guitton@adacore.com>
1096
1097 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1098 with event ptid from the lower layer before doing the
1099 ravenscar-specific update.
1100
54aa6c67
JB
11012017-11-21 Joel Brobecker <brobecker@adacore.com>
1102
1103 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1104 the ptid's TID is nonzero.
1105
cf3fbed4
JB
11062017-11-21 Joel Brobecker <brobecker@adacore.com>
1107
1108 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1109 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1110 Make non-static. Change return type to char *. Adjust code
1111 accordingly. Rewrite the function's documentation.
1112 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1113 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1114 we have enough debugging information in the runtime to support
1115 Ada task debugging before we enable the ravenscar-thread layer.
1116
9edcc12f
JB
11172017-11-21 Joel Brobecker <brobecker@adacore.com>
1118
1119 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1120 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1121 * ravenscar-thread.c: Add into comment.
1122 (base_magic_null_ptid): Delete.
1123 (base_ptid): Change documentation.
1124 (ravenscar_active_task): Renames ravenscar_running_thread.
1125 All callers updated throughout.
1126 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1127 (ravenscar_task_is_currently_active): Likewise.
1128 (get_base_thread_from_ravenscar_task): Ditto.
1129 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1130 (ravenscar_runtime_initialized): Likewise.
1131 (get_running_thread_id): Add new parameter "cpu". Adjust
1132 implementation to handle this new parameter.
1133 (ravenscar_fetch_registers): Small adjustment to use
1134 is_ravenscar_task and ravenscar_task_is_currently_active in
1135 order to decide whether to use the target beneath or this
1136 module's arch_ops.
1137 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1138 (ravenscar_stopped_by_sw_breakpoint): Use
1139 get_base_thread_from_ravenscar_task to get the underlying
1140 thread, rather than using base_ptid.
1141 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1142 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1143 Likewise.
1144 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1145
65d40437
JB
11462017-11-21 Joel Brobecker <brobecker@adacore.com>
1147
1148 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1149 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1150 (get_tcb_types_info): Set fieldnos.base_cpu.
1151 (read_atcb): Set task_info->base_cpu.
1152 (info_task): Print "Base CPU" info if set by runtime.
1153
e02544b2
JB
11542017-11-21 Joel Brobecker <brobecker@adacore.com>
1155
1156 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1157 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1158 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1159 New functions.
1160 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1161 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1162 to_stopped_data_address and to_core_of_thread fields of
1163 ravenscar_ops.
1164
ed0f4273
UW
11652017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1166
1167 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1168 (struct gdbarch_tdep): New member long_double_abi.
1169 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1170 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1171 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1172 format depending on long_double_abi tdep member.
1173 (ppc_floatformat_for_type): Handle __ibm128 type.
1174
0fc76421
SM
11752017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1176
1177 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1178
e6b2f5ef
PA
11792017-11-21 Pedro Alves <palves@redhat.com>
1180
1181 * dwarf2read.c (mapped_index::find_name_components_bounds)
1182 <completion mode, upper bound>: Use std::lower_bound instead of
1183 std::upper_bound.
1184 (test_mapped_index_find_name_component_bounds): Remove incorrect
1185 "t1_fund" from expected symbols.
1186
5c58de74
PA
11872017-11-21 Pedro Alves <palves@redhat.com>
1188
1189 * dwarf2read.c (mapped_index::name_components_casing): New field.
1190 (mapped_index) <build_name_components,
1191 find_name_components_bounds): Declare new methods.
1192 (mapped_index::find_name_components_bounds)
1193 (mapped_index::build_name_components): New methods, factored out
1194 from dw2_expand_symtabs_matching_symbol.
1195 (check_find_bounds_finds)
1196 (test_mapped_index_find_name_component_bounds): New.
1197 (run_test): Rename to ...
1198 (test_dw2_expand_symtabs_matching_symbol): ... this.
1199 (run_test): Reimplement.
1200
e1ef7d7a
PA
12012017-11-21 Pedro Alves <palves@redhat.com>
1202
1203 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1204 (symbol_end): Use cp_ident_is_alnum.
1205 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1206 * dwarf2read.c (make_sort_after_prefix_name): New function.
1207 (dw2_expand_symtabs_matching_symbol): Use it.
1208 (test_symbols): Add more symbols.
1209 (run_test): Add tests.
1210
cf724bc9
TT
12112017-11-17 Tom Tromey <tom@tromey.com>
1212
1213 * symtab.h (enum symbol_subclass_kind): New.
1214 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1215 Remove.
1216 <subclass>: New member.
1217 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1218 * rust-lang.c (rust_get_trait_object_pointer): Update.
1219 * dwarf2read.c (read_func_scope): Update.
1220 (read_variable): Update.
1221
68e745e3
TT
12222017-11-17 Tom Tromey <tom@tromey.com>
1223
1224 * dwarf2read.c (read_func_scope): Update.
1225 * symtab.h (struct template_symbol): Derive from symbol.
1226 <base>: Remove.
1227
71a3c369
TT
12282017-11-17 Tom Tromey <tom@tromey.com>
1229
1230 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1231 (struct rust_vtable_symbol): New.
1232 (find_symbol_at_address): Declare.
1233 * symtab.c (find_symbol_at_address): New function.
1234 * symfile.h (struct quick_symbol_functions)
1235 <find_compunit_symtab_by_address>: New member.
1236 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1237 function.
1238 (debug_sym_quick_functions): Link to
1239 debug_qf_find_compunit_symtab_by_address.
1240 * rust-lang.c (rust_get_trait_object_pointer): New function.
1241 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1242 rust_get_trait_object_pointer.
1243 * psymtab.c (psym_relocate): Clear psymbol_map.
1244 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1245 functions.
1246 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1247 * objfiles.h (struct objfile) <psymbol_map>: New member.
1248 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1249 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1250 (rust_containing_type, read_variable): New functions.
1251
7468702d
SM
12522017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1253
1254 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1255
37269bc9
SM
12562017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1257
1258 * common/filestuff.c: Include <algorithm>.
1259 (open_fds): Change type to std::vector<int>.
1260 (do_mark_open_fd): Adjust.
1261 (unmark_fd_no_cloexec): Adjust.
1262 (do_close): Adjust.
1263
5c632425
SM
12642017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1265
1266 * breakpoint.c (output_thread_groups): Take an std::vector.
1267 (print_one_breakpoint_location): Adjust.
1268
ced9779b
JB
12692017-11-17 Joel Brobecker <brobecker@adacore.com>
1270
1271 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1272 (ada_evaluate_subexp_for_cast): New function.
1273 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1274 ada_evaluate_subexp_for_cast.
1275 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1276 eval_skip_value.
1277 * eval.c (evaluate_var_value): Make non-static.
1278 (evaluate_var_msym_value, eval_skip_value): Likewise.
1279 * value.h (evaluate_var_value, evaluate_var_msym_value)
1280 (eval_skip_value): Declare.
1281
b7e22850
JB
12822017-11-16 Joel Brobecker <brobecker@adacore.com>
1283
1284 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1285 Update all callers.
1286
9ccabccd
PA
12872017-11-16 Pedro Alves <palves@redhat.com>
1288
1289 * python/py-unwind.c (pyuw_sniffer): Translate
1290 PyExc_KeyboardInterrupt to a GDB Quit exception.
1291
d930703d
PA
12922017-11-16 Pedro Alves <palves@redhat.com>
1293
1294 * infrun.c (resume_cleanups): Delete.
1295 (resume): No longer install a resume_cleanups cleanup nor call
1296 QUIT.
1297 (proceed): Pass the terminal to the inferior.
1298 (keep_going_pass_signal): No longer install a resume_cleanups
1299 cleanup.
1300
38dc2859
PA
13012017-11-16 Pedro Alves <palves@redhat.com>
1302
1303 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1304 if the prompt is blocked.
1305
688fca4f
PA
13062017-11-16 Pedro Alves <palves@redhat.com>
1307
1308 * breakpoint.c (insert_bp_location): Replace bp_err and
1309 bp_err_message locals by a gdb_exception local.
1310
e2c33ac7
PA
13112017-11-16 Pedro Alves <palves@redhat.com>
1312
1313 * inflow.c (scoped_ignore_sigttou): New class.
1314 (child_terminal_ours_1, new_tty): Use it.
1315
d7236961
UW
13162017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1317
1318 * target-float.c (decimal_from_number): Add byte_order argument and
1319 call match_endianness. Error if unknown floating-point type.
1320 (decimal_to_number): Add byte_order argument and call match_endianness.
1321 (decimal_from_longest): Update call. Do not call match_endianness.
1322 (decimal_from_ulongest): Likewise.
1323 (decimal_binop): Likewise.
1324 (decimal_is_zero): Likewise.
1325 (decimal_compare): Likewise.
1326 (decimal_convert): Likewise.
1327
d8ae99a7
PM
13282017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1329
1330 * python/python.c (gdbpy_rbreak): New function.
1331 * NEWS: Document Python rbreak feature.
1332
c632b645
YQ
13332017-11-16 Yao Qi <yao.qi@linaro.org>
1334
1335 * features/tic6x-c62x.xml: Remove.
1336 * features/tic6x-c64x.xml: Remove.
1337 * features/tic6x-c64xp.xml: Remove.
1338
a014b87a
JB
13392017-11-15 John Baldwin <jhb@FreeBSD.org>
1340
1341 * symtab.h: Include <array>.
1342
94765011
JB
13432017-11-15 John Baldwin <jhb@FreeBSD.org>
1344
1345 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1346 (bsd_kvm_proc_cmd): Likewise.
1347
625ad440
SM
13482017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1349
1350 * tui/tui-win.c (window_name_completer): Replace VEC with
1351 std::vector.
1352
c0c11fa9
AC
13532017-11-15 Andrew Cagney <cagney@gnu.org>
1354
1355 * MAINTAINERS: Remove no-longer applicable entries.
1356
34a7ebaf
AC
13572017-11-15 Andrew Cagney <cagney@gnu.org>
1358
1359 * MAINTAINERS: Move self to Past Maintainers.
1360
5334ef39
YQ
13612017-11-15 Yao Qi <yao.qi@linaro.org>
1362
1363 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1364 * features/nios2-linux.c: Remove.
1365 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1366 initialize_tdesc_nios2_linux.
1367
a714b0d6
YQ
13682017-11-15 Yao Qi <yao.qi@linaro.org>
1369
1370 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1371 M68HC11_LAST_HARD_REG + 1.
1372
92ffd475
PC
13732017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1374
1375 PR gdb/22388
1376 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1377 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1378 Return TARGET_XFER_EOF if size of returned data is 0.
1379
07431908
SM
13802017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1381
1382 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1383 memory-map-selftests.c.
1384 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1385 * memory-map.c (memory_map_start_memory): Fix computation of hi
1386 address.
1387 * unittests/memory-map-selftests.c: New file.
1388
31432a67
JB
13892017-11-09 Joel Brobecker <brobecker@adacore.com>
1390
1391 * ada-lang.c: Fix some typos in the general command documenting
1392 how Ada expressions are being evaluated and how their result
1393 is printed.
1394
e793c052
TT
13952017-11-09 Tom Tromey <tom@tromey.com>
1396
1397 * psymtab.c (psymbol_hash): Do not hash string contents.
1398 (psymbol_compare): Add comment.
1399
7e8835c5
TT
14002017-11-09 Tom Tromey <tom@tromey.com>
1401
1402 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1403
286acbb5
JB
14042017-11-08 Joel Brobecker <brobecker@adacore.com>
1405
1406 * ada-exp.y (write_var_from_sym): Remove parameter
1407 "orig_left_context". Update all callers.
1408
b44ec619
SM
14092017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1410
1411 * tracepoint.h (class collection_list) <stringify>: Return
1412 std::vector<std::string>.
1413 (encode_actions_rsp): Change parameters to
1414 std::vector<std::string> *.
1415 * tracepoint.c (collection_list::stringify): Return
1416 std::vector<std::string> and adjust accordingly.
1417 (encode_actions_rsp): Changee parameters to
1418 std::vector<std::string> and adjust accordingly.
1419 * remote.c (free_actions_list),
1420 free_actions_list_cleanup_wrapper): Remove.
1421 (remote_download_tracepoint): Adjust to std::vector.
1422
2f4732b0
TT
14232017-11-08 Tom Tromey <tom@tromey.com>
1424
1425 * dwarf2read.c (symbolp): Remove typedef.
1426 (read_func_scope): Use std::vector.
1427 (process_structure_scope): Use std::vector.
1428
f9d67a22
PA
14292017-11-08 Pedro Alves <palves@redhat.com>
1430
1431 * ada-lang.c (ada_make_symbol_completion_list): Use
1432 completion_skip_symbol.
1433 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1434 (symbol_is_function_or_method(symbol*)): New.
1435 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1436 completion_skip_symbol.
1437 (default_collect_symbol_completion_matches_break_on): Use
1438 completion_skip_symbol. Pass down mode.
1439 (collect_file_symbol_completion_matches): Pass down mode.
1440 * symtab.h (symbol_is_function_or_method): New declarations.
1441 (completion_skip_symbol): New template function.
1442
56d87ef7
PA
14432017-11-08 Pedro Alves <palves@redhat.com>
1444
1445 * linespec.c (iterate_over_all_matching_symtabs): Add
1446 search_domain parameter. Pass it down to expand_symtabs_matching.
1447 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1448 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1449 search_domain.
1450 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1451 Pass it down.
1452 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1453 symbols.
1454 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1455 it down.
1456
1b026119
PA
14572017-11-08 Pedro Alves <palves@redhat.com>
1458
1459 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1460 text_len locals and don't pass them down.
1461 * symtab.c (completion_list_add_name): Remove
1462 sym_text/sym_text_len parameters and adjust.
1463 (completion_list_add_symbol, completion_list_add_msymbol)
1464 (completion_list_objc_symbol, completion_list_add_fields)
1465 (add_symtab_completions): Likewise.
1466 (default_collect_symbol_completion_matches_break_on)
1467 (collect_file_symbol_completion_matches): Remove sym_text_len
1468 local and don't pass it down.
1469 * symtab.h (completion_list_add_name): Remove
1470 sym_text/sym_text_len parameters.
1471
c62446b1
PA
14722017-11-08 Pedro Alves <palves@redhat.com>
1473
1474 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1475 unittests/lookup_name_info-selftests.c.
1476 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1477 * cp-support.c: Include "selftest.h".
1478 (cp_remove_params_1): Rename from cp_remove_params. Add
1479 'require_param' parameter, and handle it.
1480 (cp_remove_params): Reimplement.
1481 (cp_remove_params_if_any): New.
1482 (selftests::quote): New.
1483 (selftests::check_remove_params): New.
1484 (selftests::test_cp_remove_params): New.
1485 (_initialize_cp_support): Install
1486 selftests::test_cp_remove_params.
1487 * cp-support.h (cp_remove_params_if_any): Declare.
1488 * dwarf2read.c :Include "selftest.h".
1489 (dw2_expand_symtabs_matching_symbol): Use
1490 lookup_name_info::make_ignore_params.
1491 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1492 (selftests::dw2_expand_symtabs_matching::string_or_null)
1493 (selftests::dw2_expand_symtabs_matching::check_match)
1494 (selftests::dw2_expand_symtabs_matching::test_symbols)
1495 (selftests::dw2_expand_symtabs_matching::run_test): New.
1496 (_initialize_dwarf2_read): Register
1497 selftests::dw2_expand_symtabs_matching::run_test.
1498 * psymtab.c (psym_expand_symtabs_matching): Use
1499 lookup_name_info::make_ignore_params.
1500 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1501 If the lookup name wants to ignore parameters, strip them.
1502 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1503 code handling '('.
1504 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1505 (default_collect_symbol_completion_matches_break_on): Don't try to
1506 strip parameters.
1507 * symtab.h (lookup_name_info::lookup_name_info): Add
1508 'ignore_parameters' parameter.
1509 (lookup_name_info::ignore_parameters)
1510 (lookup_name_info::make_ignore_params): New methods.
1511 (lookup_name_info::m_ignore_parameters): New field.
1512 * unittests/lookup_name_info-selftests.c: New file.
1513
61920122
PA
15142017-11-08 Pedro Alves <palves@redhat.com>
1515
1516 * dwarf2read.c (dw2_expand_marked_cus)
1517 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1518 (dw2_expand_symtabs_matching): Move further below.
1519 (dw2_expand_marked_cus): Reindent.
1520
3f563c84
PA
15212017-11-08 Pedro Alves <palves@redhat.com>
1522
1523 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1524 (struct name_component): New.
1525 (mapped_index::name_components): New field.
1526 (mapped_index::symbol_name_at): New method.
1527 (dwarf2_read_index): Call mapped_index ctor.
1528 (dw2_map_matching_symbols): Add comment about name_components
1529 table.
1530 (dw2_expand_symtabs_matching): Factor part to...
1531 (dw2_expand_symtabs_matching_symbol): ... this new function.
1532 Build name components table, and lookup symbols in it before
1533 calling the name matcher.
1534 (dw2_expand_marked_cus): New, factored out from
1535 dw2_expand_symtabs_matching.
1536 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1537
b5ec771e
PA
15382017-11-08 Pedro Alves <palves@redhat.com>
1539
1540 * ada-lang.c (ada_encode): Rename to ..
1541 (ada_encode_1): ... this. Add throw_errors parameter and handle
1542 it.
1543 (ada_encode): Reimplement.
1544 (match_name): Delete, folded into full_name.
1545 (resolve_subexp): No longer pass the encoded name to
1546 ada_lookup_symbol_list.
1547 (should_use_wild_match): Delete.
1548 (name_match_type_from_name): New.
1549 (ada_lookup_simple_minsym): Use lookup_name_info and the
1550 language's symbol_name_matcher_ftype.
1551 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1552 (ada_add_block_renamings): Adjust to use lookup_name_info.
1553 (ada_lookup_name): New.
1554 (add_nonlocal_symbols, ada_add_all_symbols)
1555 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1556 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1557 (ada_name_for_lookup): Delete.
1558 (ada_lookup_encoded_symbol): Construct a verbatim name.
1559 (wild_match): Reverse sense of return type. Use bool.
1560 (full_match): Reverse sense of return type. Inline bits of old
1561 match_name here.
1562 (ada_add_block_symbols): Adjust to use lookup_name_info.
1563 (symbol_completion_match): Delete, folded into...
1564 (ada_lookup_name_info::matches): ... .this new method.
1565 (symbol_completion_add): Delete.
1566 (ada_collect_symbol_completion_matches): Add name_match_type
1567 parameter. Adjust to use lookup_name_info and
1568 completion_list_add_name.
1569 (get_var_value, ada_add_global_exceptions): Adjust to use
1570 lookup_name_info.
1571 (ada_get_symbol_name_cmp): Delete.
1572 (do_wild_match, do_full_match): New functions.
1573 (ada_lookup_name_info::ada_lookup_name_info): New method.
1574 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1575 functions.
1576 (ada_language_defn): Install ada_get_symbol_name_matcher.
1577 * ada-lex.l (processId): If name starts with '<', copy it
1578 verbatim.
1579 * block.c (block_iter_match_step, block_iter_match_first)
1580 (block_iter_match_next, block_lookup_symbol)
1581 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1582 lookup_name_info.
1583 * block.h (block_iter_match_first, block_iter_match_next)
1584 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1585 * c-lang.c (c_language_defn, cplus_language_defn)
1586 (asm_language_defn, minimal_language_defn): Adjust comments to
1587 refer to la_get_symbol_name_matcher.
1588 * completer.c (complete_files_symbols)
1589 (collect_explicit_location_matches, symbol_completer): Pass a
1590 symbol_name_match_type down.
1591 * completer.h (class completion_match, completion_match_result):
1592 New classes.
1593 (completion_tracker::reset_completion_match_result): New method.
1594 (completion_tracker::m_completion_match_result): New field.
1595 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1596 lookup_name_info.
1597 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1598 functions.
1599 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1600 * d-lang.c: Adjust comments to refer to
1601 la_get_symbol_name_matcher.
1602 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1603 Adjust to use lookup_name_info.
1604 (dict_iter_match_first, dict_iter_match_next)
1605 (iter_match_first_hashed, iter_match_next_hashed)
1606 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1607 with a lookup_name_info.
1608 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1609 Likewise.
1610 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1611 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1612 (gdb_index_symbol_name_matcher): New class.
1613 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1614 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1615 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1616 with a symbol_name_match_type.
1617 (f_language_defn): Adjust comments to refer to
1618 la_get_symbol_name_matcher.
1619 * go-lang.c (go_language_defn): Adjust comments to refer to
1620 la_get_symbol_name_matcher.
1621 * language.c (default_symbol_name_matcher)
1622 (language_get_symbol_name_matcher): New functions.
1623 (unknown_language_defn, auto_language_defn): Adjust comments to
1624 refer to la_get_symbol_name_matcher.
1625 * language.h (symbol_name_cmp_ftype): Delete.
1626 (language_defn) <la_collect_symbol_completion_matches>: Add match
1627 type parameter.
1628 <la_get_symbol_name_cmp>: Delete field.
1629 <la_get_symbol_name_matcher>: New field.
1630 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1631 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1632 Declare.
1633 * linespec.c (iterate_over_all_matching_symtabs)
1634 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1635 (find_methods): Add language parameter, and use lookup_name_info
1636 and the language's symbol_name_matcher_ftype.
1637 (linespec_complete_function): Adjust.
1638 (lookup_prefix_sym): Use lookup_name_info.
1639 (add_all_symbol_names_from_pspace): Adjust.
1640 (find_superclass_methods): Add language parameter and pass it
1641 down.
1642 (find_method): Pass symbol language down.
1643 (find_linespec_symbols): Don't demangle or Ada encode here.
1644 (search_minsyms_for_name): Add lookup_name_info parameter.
1645 (add_matching_symbols_to_info): Add name_match_type parameter.
1646 Use lookup_name_info.
1647 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1648 la_get_symbol_name_matcher.
1649 * minsyms.c: Include <algorithm>.
1650 (add_minsym_to_demangled_hash_table): Remove table parameter and
1651 add objfile parameter. Use search_name_hash, and add language to
1652 demangled languages vector.
1653 (struct found_minimal_symbols): New struct.
1654 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1655 New functions.
1656 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1657 input names here. Use lookup_name_info instead. Lookup up
1658 demangled names once for each language in the demangled names
1659 vector.
1660 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1661 demangled names once for each language in the demangled names
1662 vector.
1663 (build_minimal_symbol_hash_tables): Adjust.
1664 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1665 lookup_name_info.
1666 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1667 la_get_symbol_name_matcher.
1668 * objfiles.h: Include <vector>.
1669 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1670 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1671 la_get_symbol_name_matcher.
1672 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1673 la_get_symbol_name_matcher.
1674 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1675 (match_partial_symbol): Use symbol_name_match_type,
1676 lookup_name_info and psymbol_name_matches.
1677 (lookup_partial_symbol): Use lookup_name_info.
1678 (map_block): Use symbol_name_match_type and lookup_name_info.
1679 (psym_map_matching_symbols): Use symbol_name_match_type.
1680 (psymbol_name_matches): New.
1681 (recursively_search_psymtabs): Use lookup_name_info and
1682 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1683 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1684 'kind' parameter to 'domain'.
1685 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1686 la_get_symbol_name_matcher.
1687 * symfile-debug.c (debug_qf_map_matching_symbols)
1688 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1689 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1690 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1691 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1692 Adjust to use symbol_name_match_type.
1693 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1694 (expand_symtabs_matching): Adjust to use lookup_name_info.
1695 * symmisc.c (maintenance_expand_symtabs): Use
1696 lookup_name_info::match_any ().
1697 * symtab.c (symbol_matches_search_name): New.
1698 (eq_symbol_entry): Adjust to use lookup_name_info and the
1699 language's matcher.
1700 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1701 (lookup_name_info::match_any): New.
1702 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1703 (compare_symbol_name): Add language, lookup_name_info and
1704 completion_match_result parameters, and use them.
1705 (completion_list_add_name): Make extern. Add language and
1706 lookup_name_info parameters. Use them.
1707 (completion_list_add_symbol, completion_list_add_msymbol)
1708 (completion_list_objc_symbol): Add lookup_name_info parameters and
1709 adjust. Pass down language.
1710 (completion_list_add_fields): Add lookup_name_info parameters and
1711 adjust. Pass down language.
1712 (add_symtab_completions): Add lookup_name_info parameters and
1713 adjust.
1714 (default_collect_symbol_completion_matches_break_on): Add
1715 name_match_type parameter, and use it. Use lookup_name_info.
1716 (default_collect_symbol_completion_matches)
1717 (collect_symbol_completion_matches): Add name_match_type
1718 parameter, and pass it down.
1719 (collect_symbol_completion_matches_type): Adjust.
1720 (collect_file_symbol_completion_matches): Add name_match_type
1721 parameter, and use lookup_name_info.
1722 * symtab.h: Include <string> and "common/gdb_optional.h".
1723 (enum class symbol_name_match_type): New.
1724 (class ada_lookup_name_info): New.
1725 (struct demangle_for_lookup_info): New.
1726 (class lookup_name_info): New.
1727 (symbol_name_matcher_ftype): New.
1728 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1729 (symbol_matches_search_name): Declare.
1730 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1731 (default_collect_symbol_completion_matches)
1732 (collect_symbol_completion_matches)
1733 (collect_file_symbol_completion_matches): Add name_match_type
1734 parameter.
1735 (iterate_over_symbols): Use lookup_name_info.
1736 (completion_list_add_name): Declare.
1737 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1738 (strncmp_iw_with_mode): Now extern.
1739 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1740 (strncmp_iw_with_mode): Declare.
1741
5ffa0793
PA
17422017-11-08 Keith Seitz <keiths@redhat.com>
1743 Pedro Alves <palves@redhat.com>
1744
1745 * ada-lang.c (ada_language_defn): Install
1746 default_search_name_hash.
1747 * buildsym.c (struct buildsym_compunit): <language>: New field.
1748 (finish_block_internal): Pass language when creating dictionaries.
1749 (start_buildsym_compunit, start_symtab): New language parameters.
1750 Use them.
1751 (restart_symtab): Pass down compilation unit's language.
1752 * buildsym.h (enum language): Forward declare.
1753 (start_symtab): New 'language' parameter.
1754 * c-lang.c (c_language_defn, cplus_language_defn)
1755 (asm_language_defn, minimal_language_defn): Install
1756 default_search_name_hash.
1757 * coffread.c (coff_start_symtab): Adjust.
1758 * d-lang.c (d_language_defn): Install default_search_name_hash.
1759 * dbxread.c (struct symloc): Add 'pst_language' field.
1760 (PST_LANGUAGE): Define.
1761 (start_psymtab, read_ofile_symtab): Use it.
1762 (process_one_symbol): New 'language' parameter. Pass it down.
1763 * dictionary.c (struct dictionary) <language>: New field.
1764 (DICT_LANGUAGE): Define.
1765 (dict_create_hashed, dict_create_hashed_expandable)
1766 (dict_create_linear, dict_create_linear_expandable): New parameter
1767 'language'. Set the dictionary's language.
1768 (iter_match_first_hashed): Adjust to rename.
1769 (insert_symbol_hashed): Assert we don't see mismatching
1770 languages. Adjust to rename.
1771 (dict_hash): Rename to ...
1772 (default_search_name_hash): ... this and make extern.
1773 * dictionary.h (struct language_defn): Forward declare.
1774 (dict_create_hashed): New parameter 'language'.
1775 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1776 * f-lang.c (f_language_defn): Install default_search_name_hash.
1777 * go-lang.c (go_language_defn): Install default_search_name_hash.
1778 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1779 creation.
1780 * language.c (unknown_language_defn, auto_language_defn):
1781 * language.h (language_defn::la_search_name_hash): New field.
1782 (default_search_name_hash): Declare.
1783 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1784 * mdebugread.c (new_block): New parameter 'language'.
1785 * mdebugread.c (parse_symbol): Pass symbol language to block
1786 allocation.
1787 (psymtab_to_symtab_1): Pass down language.
1788 (new_symtab): Pass compunit's language to block allocation.
1789 * objc-lang.c (objc_language_defn): Install
1790 default_search_name_hash.
1791 * opencl-lang.c (opencl_language_defn):
1792 * p-lang.c (pascal_language_defn): Install
1793 default_search_name_hash.
1794 * rust-lang.c (rust_language_defn): Install
1795 default_search_name_hash.
1796 * stabsread.h (enum language): Forward declare.
1797 (process_one_symbol): Add 'language' parameter.
1798 * symtab.c (search_name_hash): New function.
1799 * symtab.h (search_name_hash): Declare.
1800 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1801
2a1dde5d
PA
18022017-11-08 Pedro Alves <palves@redhat.com>
1803
1804 * cp-name-parser.y (main): Don't initialize extra_chars.
1805
95a6b0a1
TT
18062017-11-07 Tom Tromey <tom@tromey.com>
1807
1808 * event-top.h (command_handler): Constify.
1809 * record-full.c (cmd_record_full_start): Update.
1810 * thread.c (thread_apply_all_command): Update.
1811 * printcmd.c (eval_command): Update.
1812 * mi/mi-main.c (mi_execute_cli_command): Update.
1813 (mi_execute_async_cli_command): Update.
1814 * tui/tui-stack.c (tui_update_command): Update.
1815 * cli/cli-interp.c (safe_execute_command): Constify.
1816 * record.c (record_start): Update.
1817 (record_start, record_stop, cmd_record_start): Update.
1818 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1819 (cmd_record_btrace_pt_start): Update.
1820 (cmd_record_btrace_start): Update.
1821 (cmd_record_btrace_start): Update.
1822 * reverse.c (exec_reverse_once): Update.
1823 * python/python.c (execute_gdb_command): Don't copy the command.
1824 * event-top.c (command_line_handler): Update.
1825 (command_handler): Constify.
1826 * defs.h (deprecated_call_command_hook): Constify.
1827 * cli/cli-script.h (execute_user_command): Constify.
1828 * cli/cli-script.c (execute_user_command): Constify.
1829 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1830 (enum command_control_type): Update.
1831 * main.c (catch_command_errors): Remove non-const overload.
1832 (catch_command_errors_ftype): Remove.
1833 * python/py-cmd.c (cmdpy_function): Constify.
1834 * guile/scm-cmd.c (cmdscm_function): Constify.
1835 * cli/cli-dump.c (call_dump_func): Constify.
1836 * cli/cli-decode.c (do_const_cfunc): Constify.
1837 (do_sfunc): Constify.
1838 (cmd_func): Constify.
1839 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1840 * top.h (execute_command): Constify.
1841 * top.c (execute_command): Constify.
1842 (execute_command_to_string): Constify.
1843 (deprecated_call_command_hook): Constify.
1844 * command.h (cmd_func): Constify.
1845 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1846
eb4c3f4a
TT
18472017-11-07 Tom Tromey <tom@tromey.com>
1848
1849 * ada-lang.c (catch_ada_exception_command): Constify.
1850 (catch_assert_command): Constify.
1851 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1852 (catch_rethrow_command): Constify.
1853 (catch_exception_command_1): Constify.
1854 * breakpoint.h (add_catch_command): Constify.
1855 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1856 (catch_syscall_split_args): Constify.
1857 * break-catch-sig.c (catch_signal_command): Constify.
1858 (catch_signal_split_args): Constify.
1859 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1860 cmd_const_sfunc_ftype.
1861 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1862 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1863 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1864 (add_setshow_string_cmd, struct cmd_list_element)
1865 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1866 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1867 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1868 Constify.
1869 (set_cmd_sfunc): Constify.
1870 (empty_sfunc): Constify.
1871 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1872 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1873 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1874 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1875 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1876 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1877 Constify.
1878 (set_cmd_sfunc): Constify.
1879 (cmd_sfunc_ftype): Remove.
1880 * compile/compile.c (set_compile_args): Constify.
1881 * infrun.c (set_disable_randomization): Constify.
1882 * infcmd.c (set_args_command, set_cwd_command): Constify.
1883 * breakpoint.c (set_condition_evaluation_mode): Constify.
1884 (add_catch_command): Constify.
1885 (catch_fork_command_1, catch_exec_command_1)
1886 (catch_load_command_1, catch_unload_command_1): Constify.
1887 (catch_load_or_unload): Constify.
1888 * guile/scm-param.c (pascm_set_func): Constify.
1889 (add_setshow_generic): Constify.
1890 * python/py-param.c (get_set_value): Constify.
1891 * top.h (set_verbose): Constify.
1892 * tui/tui-win.c (tui_set_var_cmd): Constify.
1893 * mi/mi-main.c (set_mi_async_command): Constify.
1894 * cli/cli-logging.c (set_logging_overwrite)
1895 (set_logging_redirect): Constify.
1896 * value.c (set_max_value_size): Constify.
1897 * valprint.c (set_input_radix, set_output_radix): Constify.
1898 * utils.c (set_width_command, set_height_command): Constify.
1899 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1900 * tracepoint.c (set_disconnected_tracing)
1901 (set_circular_trace_buffer, set_trace_buffer_size)
1902 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1903 * top.c (set_history_size_command, set_verbose, set_editing)
1904 (set_gdb_datadir, set_history_filename): Constify.
1905 * target.c (set_targetdebug, maint_set_target_async_command)
1906 (maint_set_target_non_stop_command, set_target_permissions)
1907 (set_write_memory_permission): Constify.
1908 (open_target): Constify.
1909 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1910 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1911 * symtab.c (set_symbol_cache_size_handler): Constify.
1912 * symfile.c (set_ext_lang_command): Constify.
1913 * symfile-debug.c (set_debug_symfile): Constify.
1914 * source.c (set_directories_command): Constify.
1915 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1916 * serial.c (set_parity): Constify.
1917 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1918 * remote.c (set_remote_exec_file, set_remotebreak)
1919 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1920 * record.c (set_record_insn_history_size)
1921 (set_record_call_history_size): Constify.
1922 * record-full.c (set_record_full_insn_max_num): Constify.
1923 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1924 * osabi.c (set_osabi): Constify.
1925 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1926 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1927 * maint.c (maintenance_set_profile_cmd): Constify.
1928 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1929 * language.c (set_language_command, set_range_command)
1930 (set_case_command): Constify.
1931 * infrun.c (set_non_stop, set_observer_mode)
1932 (set_stop_on_solib_events, set_schedlock_func)
1933 (set_exec_direction_func): Constify.
1934 * infcmd.c (set_inferior_tty_command): Constify.
1935 * disasm.c (set_disassembler_options_sfunc): Constify.
1936 * demangle.c (set_demangling_command): Constify.
1937 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1938 * cris-tdep.c (set_cris_version, set_cris_mode)
1939 (set_cris_dwarf2_cfi): Constify.
1940 * corefile.c (set_gnutarget_command): Constify.
1941 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1942 (set_target_wide_charset_sfunc): Constify.
1943 * breakpoint.c (update_dprintf_commands): Constify.
1944 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1945 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1946 (set_disassembly_style_sfunc): Constify.
1947 * arch-utils.c (set_endian, set_architecture): Constify.
1948 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1949 * agent.c (set_can_use_agent): Constify.
1950
5fed81ff
TT
19512017-11-07 Tom Tromey <tom@tromey.com>
1952
1953 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1954 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1955 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1956 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1957 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1958 (parse_int_arg, show_thread_default_detach_sc_cmd)
1959 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1960 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1961 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1962 (show_task_pause_cmd, set_task_detach_sc_cmd)
1963 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1964 (set_noninvasive_cmd, set_thread_pause_cmd)
1965 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1966 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1967 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1968 * windows-nat.c (display_selectors): Constify.
1969 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1970 non-const "cfunc".
1971 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1972 (cmd_cfunc_eq): Likewise.
1973 (struct cmd_list_element): Likewise.
1974 (do_cfunc): Remove.
1975 (cli_user_command_p): Update.
1976 * command.h (add_cmd): Remove non-const overload.
1977 (cmd_cfunc_ftype): Remove typedef.
1978 (cmd_cfunc_eq): Remove non-const overload.
1979 * value.c (show_values): Constify.
1980 * thread.c (thread_apply_all_command): Constify.
1981 * symfile.c (load_command): Constify.
1982 * source.c (directory_command): Constify.
1983 * maint.c (maintenance_internal_error)
1984 (maintenance_demangler_warning, maintenance_space_display)
1985 (maintenance_print_architecture, maintenance_translate_address)
1986 (maintenance_info_selftests, maintenance_internal_warning):
1987 Constify.
1988 * breakpoint.c (disable_trace_command, enable_trace_command):
1989 Constify.
1990 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1991 Constify.
1992 (add_auto_load_safe_path): Constify.
1993 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1994 * top.h (show_commands): Constify.
1995 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1996 * sparc64-tdep.c (adi_examine_command): Constify.
1997 (adi_assign_command): Constify.
1998
1d12d88f
TT
19992017-11-07 Tom Tromey <tom@tromey.com>
2000
2001 * frame.h (info_locals_command, info_args_command): Constify.
2002 * auto-load.h (auto_load_info_scripts): Constify.
2003 * inferior.h (registers_info): Constify.
2004 * copying.c: Rebuild.
2005 * copying.awk: Constify generated commands.
2006 * auto-load.c (auto_load_info_scripts)
2007 (info_auto_load_gdb_scripts): Constify.
2008 * cli/cli-decode.c (struct cmd_list_element): Take a
2009 cmd_const_cfunc_ftype.
2010 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2011 * tui/tui-win.c (tui_all_windows_info): Constify.
2012 * python/py-auto-load.c (info_auto_load_python_scripts):
2013 Constify.
2014 * cli/cli-cmds.c (show_command): Remove non-const overload.
2015 * tracepoint.c (info_tvariables_command, info_scope_command):
2016 Constify.
2017 (info_static_tracepoint_markers_command): Constify.
2018 * thread.c (info_threads_command): Constify.
2019 (print_thread_info_1): Constify.
2020 * target.c (info_target_command): Constify.
2021 * symtab.c (info_sources_command, info_functions_command)
2022 (info_types_command): Constify.
2023 (info_variables_command): Remove non-const overload.
2024 * symfile.c (info_ext_lang_command): Constify.
2025 * stack.c (info_frame_command, info_locals_command)
2026 (info_args_command): Constify.
2027 (backtrace_command): Remove non-const overload.
2028 * source.c (info_source_command, info_line_command): Constify.
2029 * solib.c (info_sharedlibrary_command): Constify.
2030 * skip.c (info_skip_command): Constify.
2031 * ser-go32.c (info_serial_command): Constify.
2032 * reverse.c (info_bookmarks_command): Constify.
2033 * printcmd.c (info_symbol_command, info_address_command)
2034 (info_display_command): Constify.
2035 * osdata.c (info_osdata_command): Constify.
2036 * objc-lang.c (info_selectors_command, info_classes_command):
2037 Constify.
2038 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2039 * memattr.c (info_mem_command): Constify.
2040 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2041 * linux-fork.c (info_checkpoints_command): Constify.
2042 * infrun.c (info_signals_command): Constify.
2043 * inflow.c (info_terminal_command): Constify.
2044 * inferior.c (info_inferiors_command): Constify.
2045 (print_inferior): Constify.
2046 * infcmd.c (info_program_command, info_all_registers_command)
2047 (info_registers_command, info_vector_command)
2048 (info_float_command): Constify.
2049 (registers_info): Constify.
2050 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2051 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2052 Constify.
2053 * f-valprint.c (info_common_command): Constify.
2054 * dcache.c (info_dcache_command): Constify.
2055 (dcache_info_1): Constify.
2056 * darwin-nat-info.c (info_mach_tasks_command)
2057 (info_mach_task_command, info_mach_ports_command)
2058 (info_mach_port_command, info_mach_threads_command)
2059 (info_mach_thread_command, info_mach_regions_command)
2060 (info_mach_regions_recurse_command, info_mach_region_command)
2061 (info_mach_exceptions_command): Constify.
2062 (get_task_from_args): Constify.
2063 * cp-support.c (info_vtbl_command): Constify.
2064 * breakpoint.c (info_watchpoints_command)
2065 (info_tracepoints_command): Constify.
2066 (info_breakpoints_command): Remove non-const overload.
2067 * avr-tdep.c (avr_io_reg_read_command): Constify.
2068 * auxv.c (info_auxv_command): Constify.
2069 * ada-tasks.c (info_tasks_command): Constify.
2070 (info_task): Constify.
2071 * ada-lang.c (info_exceptions_command): Constify.
2072
0b39b52e
TT
20732017-11-07 Tom Tromey <tom@tromey.com>
2074
2075 * solib.h (no_shared_libraries): Constify.
2076 * frame.h (return_command): Constify.
2077 * cli/cli-cmds.h (quit_command): Constify.
2078 * top.h (quit_command, execute_command): Constify.
2079 * target.h (flash_erase_command): Constify.
2080 * inferior.h (set_inferior_args, attach_command): Constify.
2081 * tracepoint.h (start_tracing, stop_tracing): Constify.
2082 * breakpoint.h (break_command, tbreak_command)
2083 (hbreak_command_wrapper, thbreak_command_wrapper)
2084 (rbreak_command_wrapper, watch_command_wrapper)
2085 (awatch_command_wrapper, rwatch_command_wrapper)
2086 (get_tracepoint_by_number): Constify.
2087 * symtab.c (info_variables_command, rbreak_command)
2088 (symtab_symbol_info): Constify.
2089 (info_variables_command): Add non-const overload.
2090 * top.c (dont_repeat_command): Constify.
2091 * breakpoint.c (ignore_command, commands_command)
2092 (condition_command, tbreak_command, hbreak_command)
2093 (thbreak_command, clear_command, break_command)
2094 (info_breakpoints_command, watch_command, rwatch_command)
2095 (awatch_command, trace_command, ftrace_command, strace_command)
2096 (trace_pass_command, break_range_command, dprintf_command)
2097 (agent_printf_command, get_tracepoint_by_number)
2098 (watch_maybe_just_location, trace_pass_command): Constify.
2099 (info_breakpoints_command): Add non-const overload.
2100 * tracefile.c (tsave_command): Constify.
2101 * infcmd.c (attach_command, disconnect_command, signal_command)
2102 (queue_signal_command, stepi_command, nexti_command)
2103 (finish_command, next_command, step_command, until_command)
2104 (advance_command, jump_command, continue_command, run_command)
2105 (start_command, starti_command, interrupt_command)
2106 (run_command_1, set_inferior_args, step_1): Constify.
2107 * inferior.c (add_inferior_command, remove_inferior_command)
2108 (clone_inferior_command): Constify.
2109 * linux-fork.c (checkpoint_command, restart_command): Constify.
2110 * windows-nat.c (signal_event_command): Constify.
2111 * guile/guile.c (guile_repl_command, guile_command): Constify.
2112 * printcmd.c (x_command, display_command, printf_command)
2113 (output_command, set_command, call_command, print_command)
2114 (eval_command): Constify.
2115 (non_const_set_command): Remove.
2116 (_initialize_printcmd): Update.
2117 * source.c (forward_search_command, reverse_search_command):
2118 Constify.
2119 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2120 Constify.
2121 * infrun.c (handle_command): Constify.
2122 * memattr.c (mem_command): Constify.
2123 * stack.c (return_command, up_command, up_silently_command)
2124 (down_command, down_silently_command, frame_command)
2125 (backtrace_command, func_command, backtrace_command_1): Constify.
2126 (backtrace_command): Add non-const overload.
2127 * remote-sim.c (simulator_command): Constify.
2128 * exec.c (set_section_command): Constify.
2129 * tracepoint.c (tdump_command, trace_variable_command)
2130 (tstatus_command, tstop_command, tstart_command)
2131 (end_actions_pseudocommand, while_stepping_pseudocommand)
2132 (collect_pseudocommand, teval_pseudocommand, actions_command)
2133 (start_tracing, stop_tracing): Constify.
2134 * value.c (init_if_undefined_command): Constify.
2135 * tui/tui-stack.c (tui_update_command): Constify.
2136 * tui/tui-win.c (tui_refresh_all_command)
2137 (tui_set_tab_width_command, tui_set_win_height_command)
2138 (tui_set_focus_command, tui_scroll_forward_command)
2139 (tui_scroll_backward_command, tui_scroll_left_command)
2140 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2141 (tui_set_win_height): Constify.
2142 * tui/tui-layout.c (tui_layout_command): Constify.
2143 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2144 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2145 (proc_untrace_sysexit_cmd): Constify.
2146 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2147 (threadset_test_cmd, threadlist_update_test_cmd)
2148 (threadalive_test): Constify.
2149 * objc-lang.c (print_object_command): Constify.
2150 * command.h (add_com): Constify.
2151 * cli/cli-dump.c (restore_command): Constify.
2152 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2153 (help_command, complete_command, shell_command, edit_command)
2154 (list_command, disassemble_command, make_command)
2155 (apropos_command, alias_command): Constify.
2156 * cli/cli-script.c (document_command, define_command)
2157 (while_command, if_command, validate_comname): Constify.
2158 * cli/cli-decode.c (struct cmd_list_element): Change type of
2159 "fun".
2160 * target.c (do_monitor_command, flash_erase_command): Constify.
2161 * regcache.c (reg_flush_command): Constify.
2162 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2163 (reverse_nexti, reverse_continue, reverse_finish)
2164 (save_bookmark_command, goto_bookmark_command)
2165 (exec_reverse_once): Constify.
2166 * python/python.c (python_interactive_command, python_command):
2167 Constify.
2168 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2169 Constify.
2170 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2171 * gcore.c (gcore_command): Constify.
2172
85c4be7c
TT
21732017-11-07 Tom Tromey <tom@tromey.com>
2174
2175 * printcmd.c (x_command): Call set_repeat_arguments.
2176 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2177 * top.c (repeat_arguments): New global.
2178 (set_repeat_arguments): New function.
2179 (execute_command): Handle repeat_arguments.
2180 (show_commands): Calls set_repeat_arguments.
2181 * command.h (set_repeat_arguments): Declare.
2182
022643b4
TT
21832017-11-07 Tom Tromey <tom@tromey.com>
2184
2185 * stack.c (backtrace_command): Use std::string.
2186 (backtrace_command_1): Make "count_exp" const.
2187
5614fb77
TT
21882017-11-07 Tom Tromey <tom@tromey.com>
2189
2190 * source.c (directory_switch, mod_path, add_path): Constify.
2191 * defs.h (add_path, mod_path, directory_switch): Constify.
2192 * mi/mi-cmd-env.c (env_mod_path): Constify.
2193
6be9a197
TT
21942017-11-07 Tom Tromey <tom@tromey.com>
2195
2196 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2197 (run_command_1, continue_command, step_1, jump_command)
2198 (signal_command, until_command, advance_command, finish_command)
2199 (attach_command): Update.
2200
c2252c0d
TT
22012017-11-07 Tom Tromey <tom@tromey.com>
2202
2203 * command.h (set_cmd_cfunc): Don't declare.
2204 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2205
1ee870c5
TT
22062017-11-07 Tom Tromey <tom@tromey.com>
2207
2208 * stack.c (select_frame_command): Constify.
2209 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2210 * command.h (add_com_suppress_notification): Constify.
2211
ee7ddd71
TT
22122017-11-07 Tom Tromey <tom@tromey.com>
2213
2214 * breakpoint.c (stop_command): Constify.
2215 * cli/cli-decode.c (struct cmd_list_element): Constify.
2216 * command.h (add_abbrev_prefix_cmd): Constify.
2217
95e95a6d
PA
22182017-11-07 Pedro Alves <palves@redhat.com>
2219
2220 * breakpoint.c (extract_bp_kind): New enum.
2221 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2222 factored out from ...
2223 (extract_bp_number_and_location): ... here.
2224 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2225
cc638e86
PA
22262017-11-07 Pedro Alves <palves@redhat.com>
2227
2228 * breakpoint.c (extract_bp_number_and_location): Change return
2229 type to void. Throw error instead of warning.
2230 (enable_disable_command): Adjust.
2231
d0fe4701
XR
22322017-11-07 Xavier Roirand <roirand@adacore.com>
2233 Pedro Alves <palves@redhat.com>
2234
2235 * breakpoint.c (map_breakpoint_number_range): New, factored out
2236 from ...
2237 (map_breakpoint_numbers): ... here.
2238 (find_location_by_number): Change parameters from string to
2239 breakpoint number and location.
2240 (extract_bp_number_and_location): New function.
2241 (enable_disable_bp_num_loc)
2242 (enable_disable_breakpoint_location_range)
2243 (enable_disable_command): New functions, factored out ...
2244 (enable_command, disable_command): ... these functions, and
2245 adjusted to support ranges.
2246 * NEWS: Document enable/disable breakpoint location range feature.
2247
635dc5b2
LM
22482017-11-06 Luis Machado <luis.machado@linaro.org>
2249
2250 * MAINTAINERS (Write After Approval): Update my e-mail address.
2251
556e5da5
PA
22522017-11-06 Pedro Alves <palves@redhat.com>
2253
2254 * gnu-nat.c (gnu_terminal_init): Delete.
2255 (gnu_target): Don't install gnu_terminal_init.
2256 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2257 (child_terminal_init): ... this function.
2258
d1928160
PA
22592017-11-06 Pedro Alves <palves@redhat.com>
2260
2261 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2262 sgtty.h.
2263 * config.in, configure: Regenerate.
2264
6aa899ce
PA
22652017-11-06 Pedro Alves <palves@redhat.com>
2266
2267 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2268 (async_init_signals): Adjust.
2269 (handle_stop_sig): Rename to ...
2270 (handle_sigtstp): ... this.
2271 (async_stop_sig): Rename to ...
2272 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2273 SIGTSTP path.
2274 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2275 instead of STOP_SIGNAL thoughout.
2276 (handle_stop_sig): Rename to ...
2277 (handle_sigtstp): ... this.
2278 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2279
a94799ac
PA
22802017-11-06 Pedro Alves <palves@redhat.com>
2281
2282 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2283 longer set flags twice in row.
2284
726e1356
PA
22852017-11-06 Pedro Alves <palves@redhat.com>
2286
2287 * Makefile.in (SER_HARDWIRE): Update comment.
2288 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2289 * common/gdb_termios.h: Delete file.
2290 * common/job-control.c: Include termios.h and unistd.h instead of
2291 gdb_termios.h.
2292 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2293 check.
2294 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2295 Remove sgtty code.
2296 * configure.ac: No longer check for termio.h and sgtty.h.
2297 * configure: Regenerate.
2298 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2299 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2300 Replace PROCESS_GROUP_TYPE references with pid_t references
2301 throughout.
2302 (gdb_getpgrp): Delete.
2303 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2304 (child_terminal_inferior): Remove comment. Remove sgtty code.
2305 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2306 gdb_getpgrp. Use serial_set_tty_state instead aof
2307 serial_noflush_set_tty_state. Remove sgtty code.
2308 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2309 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2310 (inferior_process_group): Now returns pid_t.
2311 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2312 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2313 * ser-event.c (serial_event_ops): Update.
2314 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2315 (dos_ops): Update.
2316 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2317 * ser-pipe.c (pipe_ops): Update.
2318 * ser-tcp.c (tcp_ops): Update.
2319 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2320 HAVE_TERMIOS checks.
2321 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2322 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2323 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2324 assume termios.
2325 (hardwire_noflush_set_tty_state): Delete.
2326 (hardwire_print_tty_state, hardwire_drain_output)
2327 (hardwire_flush_output, hardwire_flush_input)
2328 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2329 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2330 code, and assume termios.
2331 (hardwire_ops): Update.
2332 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2333 * serial.c (serial_noflush_set_tty_state): Delete.
2334 * serial.h (serial_noflush_set_tty_state): Delete.
2335 (serial_ops::noflush_set_tty_state): Delete.
2336
1cfb73db
UW
23372017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2338
2339 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2340 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2341 (COMMON_OBS): Remove doublest.o and dfp.o.
2342 Do not build target-float.c (instead of doublest.c)
2343 with -Wformat-nonliteral.
2344
2345 * doublest.c: Remove file.
2346 * doublest.h: Remove file.
2347 * dfp.c: Remove file.
2348 * dfp.h: Remove file.
2349
2350 * target-float.c: Do not include "doublest.h" and "dfp.h".
2351 (DOUBLEST): Move here from doublest.h.
2352 (enum float_kind): Likewise.
2353 (FLOATFORMAT_CHAR_BIT): Likewise.
2354 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2355 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2356 (floatformat_precision): Likewise.
2357 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2358 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2359 Likewise.
2360 (host_float_format, host_double_format, host_long_double_format):
2361 Likewise.
2362 (floatformat_to_string, floatformat_from_string): Likewise.
2363 (floatformat_to_doublest): Likewise. Also, inline the original
2364 convert_floatformat_to_doublest.
2365 (floatformat_from_doublest): Likewise. Also, inline the original
2366 convert_floatformat_from_doublest.
2367
2368 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2369 (MAX_DECIMAL_STRING): Move here from dfp.c.
2370 (match_endianness): Likewise.
2371 (set_decnumber_context, decimal_check_errors): Likewise.
2372 (decimal_from_number, decimal_to_number): Likewise.
2373 (decimal_to_string, decimal_from_string): Likewise. Make static.
2374 (decimal_from_longest, decimal_from_ulongest): Likewise.
2375 (decimal_to_longest): Likewise.
2376 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2377 (decimal_convert): Likewise.
2378
b07e9c46
UW
23792017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2380
2381 * doublest.c: Do not include "gdbtypes.h".
2382 (extract_typed_floating): Remove.
2383 (store_typed_floating): Remove.
2384 (convert_typed_floating): Remove.
2385 * doublest.h (struct type): Remove.
2386 (DOUBLEST_PRINT_FORMAT): Remove.
2387 (DOUBLEST_SCAN_FORMAT): Remove.
2388 (extract_typed_floating): Remove.
2389 (store_typed_floating): Remove.
2390 (convert_typed_floating): Remove.
2391
2392 * dfp.c (decimal_from_doublest): Remove.
2393 (decimal_to_doublest): Remove.
2394 * dfp.h: Do not include "doublest.h".
2395 (decimal_from_doublest): Remove.
2396 (decimal_to_doublest): Remove.
2397
2398 * value.c: Do not include "doublest.h" and "dfp.h".
2399 (value_as_double): Remove.
2400 (unpack_double): Remove.
2401 (value_from_double): Remove.
2402 (value_from_decfloat): Remove.
2403 * value.h: Do not include "doublest.h".
2404 (value_as_double): Remove.
2405 (unpack_double): Remove.
2406 (value_from_double): Remove.
2407 (value_from_decfloat): Remove.
2408
3b2ca824
UW
24092017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2410
2411 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2412 (i386_extract_return_value): Use target_float_convert.
2413 (i386_store_return_value): Likewise.
2414 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2415 (i387_value_to_register): Likewise.
2416 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2417 (ia64_register_to_value): Use target_float_convert.
2418 (ia64_value_to_register): Likewise.
2419 (ia64_extract_return_value): Likewise.
2420 (ia64_store_return_value): Likewise.
2421 (ia64_push_dummy_call): Likewise.
2422 * m68k-tdep.c: Include "target-float.h".
2423 (m68k_register_to_value): Use target_float_convert.
2424 (m68k_value_to_register): Likewise.
2425 (m68k_svr4_extract_return_value): Likewise.
2426 (m68k_svr4_store_return_value): Likewise.
2427 * ppc-sysv-tdep.c: Include "target-float.h".
2428 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2429 (do_ppc_sysv_return_value): Likewise.
2430 (ppc64_sysv_abi_push_freg): Likewise.
2431 (ppc64_sysv_abi_return_value_base): Likewise.
2432 * rs6000-aix-tdep.c: Include "target-float.h".
2433 (rs6000_push_dummy_call): Use target_float_convert.
2434 (rs6000_return_value): Likewise.
2435 * rs6000-lynx178-tdep.c: Include "target-float.h".
2436 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2437 (rs6000_lynx178_return_value): Likewise.
2438 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2439 (rs6000_register_to_value): Use target_float_convert.
2440 (rs6000_value_to_register): Likewise.
2441 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2442 (arm_extract_return_value): Use target_float_convert.
2443 (arm_store_return_value): Likewise.
2444 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2445 (sh_register_convert_to_virtual): Use target_float_convert.
2446 (sh_register_convert_to_raw): Likewise.
2447 * sh64-tdep.c: Include "target-float.h".
2448 (sh64_extract_return_value): Use target_float_convert.
2449 (sh64_register_convert_to_virtual): Likewise.
2450 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2451
14ad9311
UW
24522017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2453
2454 * target-float.c (floatformat_to_host_double): New function.
2455 (floatformat_from_host_double): Likewise.
2456 (target_float_to_host_double): Likewise.
2457 (target_float_from_host_double): Likewise.
2458 * target-float.h (target_float_to_host_double): Add prototype.
2459 (target_float_from_host_double): Likewise.
2460
2461 * guile/scm-value.c: Include "target-float.h".
2462 (gdbscm_value_to_real): Use target_float_to_host_double.
2463 Handle integer source values via value_as_long.
2464 * guile/scm-math.c: Include "target-float.h". Do not include
2465 "doublest.h", "dfp.h", and "expression.h".
2466 (vlscm_convert_typed_number): Use target_float_from_host_double.
2467 (vlscm_convert_number): Likewise.
2468
2469 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2470 (convert_value_from_python): Use target_float_from_host_double.
2471
50eff16b
UW
24722017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2473
2474 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2475 (cast_from_fixed): Likewise.
2476 (ada_scaling_type): New function.
2477 (ada_delta): Return value instead of DOUBLEST. Perform target
2478 arithmetic instead of host arithmetic.
2479 (scaling_factor): Rename to ...
2480 (ada_scaling_factor) ... this. Make non-static. Return value instead
2481 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2482 (ada_fixed_to_float): Remove.
2483 (ada_float_to_fixed): Remove.
2484 * ada-lang.h (ada_fixed_to_float): Remove.
2485 (ada_float_to_fixed): Remove.
2486 (ada_delta): Return value instead of DOUBLEST.
2487 (ada_scaling_factor): Add prototype.
2488
2489 * ada-typeprint.c: Include "target-float.h".
2490 (print_fixed_point_type): Perform target arithmetic instead of
2491 host arithmetic.
2492 * ada-valprint.c: Include "target-float.h".
2493 (ada_val_print_num): Perform target arithmetic instead of
2494 host arithmetic for fixed-point types.
2495
66c02b9e
UW
24962017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2497
2498 * target-float.c: Include <math.h>.
2499 (floatformat_binop): New function.
2500 (floatformat_compare): Likewise.
2501 (target_float_binop): Likewise.
2502 (target_float_compare): Likewise.
2503 * target-float.h: Include "expression.h".
2504 (target_float_binop): Add prototype.
2505 (target_float_compare): Likewise.
2506
2507 * valarith.c: Do not include "doublest.h" and "dfp.h".
2508 Include "common/byte-vector.h".
2509 (value_args_as_decimal): Remove, replace by ...
2510 (value_args_as_target_float): ... this function. Handle both
2511 binary and decimal target floating-point formats.
2512 (scalar_binop): Handle both binary and decimal FP using
2513 value_args_as_target_float and target_float_binop.
2514 (value_equal): Handle both binary and decimal FP using
2515 value_args_as_target_float and target_float_compare.
2516 (value_less): Likewise.
2517 (value_pos): Handle all scalar types as simple copy.
2518 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2519 * dfp.c (decimal_binop): Throw error instead of internal_error
2520 when called with an unsupported operation code.
2521
f69fdf9b
UW
25222017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2523
2524 * target-float.c (target_float_to_string): New function.
2525 (target_float_from_string): New function.
2526 * target-float.h (target_float_to_string): Add prototype.
2527 (target_float_from_string): Add prototype.
2528
2529 * valprint.c: Include "target-float.h". Do not include
2530 "doublest.h" and "dfp.h".
2531 (print_floating): Use target_float_to_string.
2532 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2533 (printf_floating): Use target_float_to_string.
2534 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2535 (print_i387_value): Use target_float_to_string.
2536 * mips-tdep.c: Include "target-float.h".
2537 (mips_print_fp_register): Use target_float_to_string.
2538 * sh64-tdep.c: Include "target-float.h".
2539 (sh64_do_fp_register): Use target_float_to_string.
2540
2541 * parse.c: Include "target-float.h". Do not include
2542 "doublest.h" and "dfp.h".
2543 (parse_float): Use target_float_from_string.
2544 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2545 (define_symbol): Use target_float_from_string.
2546 * gdbarch-selftests.c: Include "target-float.h".
2547 (register_to_value_test): Use target_float_from_string.
2548
70100014
UW
25492017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2550
2551 * Makefile.c (SFILES): Add target-float.c.
2552 (HFILES_NO_SRCDIR): Add target-float.h.
2553 (COMMON_OBS): Add target-float.o.
2554 * target-float.h: New file.
2555 * target-float.c: New file.
2556
2557 * doublest.c (floatformat_classify): Fix detection of float_zero.
2558
2559 * gdbtypes.c (is_floating_type): New function.
2560 * gdbtypes.h (is_floating_type): Add prototype.
2561
2562 * value.c: Do not include "floatformat.h".
2563 (unpack_double): Use target_float_is_valid.
2564 (is_floating_value): New function.
2565 * value.h (is_floating_value): Add prototype-
2566
2567 * valarith.c: Include "target-float.h".
2568 (value_logical_not): Use target_float_is_zero.
2569
2570 * python/py-value.c: Include "target-float.h".
2571 (valpy_nonzero): Use target_float_is_zero.
2572
ab4b1c46
TT
25732017-11-04 Tom Tromey <tom@tromey.com>
2574
2575 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2576
454dafbd
TT
25772017-11-04 Tom Tromey <tom@tromey.com>
2578
2579 * breakpoint.c (set_momentary_breakpoint): Return
2580 breakpoint_up.
2581 (until_break_command): Update.
2582 (new_until_break_fsm): Change argument types to
2583 breakpoint_up.
2584 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2585 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2586 Remove.
2587 * infcmd.c (finish_forward): Update.
2588 * breakpoint.h (set_momentary_breakpoint)
2589 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2590 (make_cleanup_delete_breakpoint): Remove.
2591 (struct breakpoint_deleter): New.
2592 (breakpoint_up): New typedef.
2593 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2594 (insert_exception_resume_breakpoint): Update.
2595 (insert_exception_resume_from_probe): Update.
2596 (insert_longjmp_resume_breakpoint): Update.
2597 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2598 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2599 * infcall.c (call_function_by_hand_dummy): Update
2600
331b71e5
TT
26012017-11-04 Tom Tromey <tom@tromey.com>
2602
2603 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2604
9f584b37
TT
26052017-11-04 Tom Tromey <tom@tromey.com>
2606
2607 * linux-tdep.c (linux_core_info_proc_mappings): Use
2608 gdb::def_vector.
2609 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2610 "size" argument.
2611 (linux_corefile_thread): Update.
2612 (linux_make_corefile_notes): Remove unused variable.
2613
779bc38e
TT
26142017-11-04 Tom Tromey <tom@tromey.com>
2615
2616 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2617 gdb::byte_vector.
2618
ed2b3126
TT
26192017-11-04 Tom Tromey <tom@tromey.com>
2620
2621 * objfiles.c (do_free_objfile_cleanup): Remove.
2622 * compile/compile-object-load.c (compile_object_load): Update.
2623 * objfiles.h (make_cleanup_free_objfile): Remove.
2624
7f6743fd
TT
26252017-11-04 Tom Tromey <tom@tromey.com>
2626
2627 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2628 (adi_read_versions): Change "tags" to "gdb_byte *".
2629 (adi_print_versions): Likewise.
2630
c80049d3
TT
26312017-11-04 Tom Tromey <tom@tromey.com>
2632
2633 * breakpoint.c
2634 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2635 from start_rbreak_breakpoints.
2636 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2637 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2638 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2639 * symtab.c (do_end_rbreak_breakpoints): Remove.
2640 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2641
167b0be1
TT
26422017-11-04 Tom Tromey <tom@tromey.com>
2643
2644 * cp-namespace.c (reset_directive_searched): Remove.
2645 (cp_lookup_symbol_via_imports): Use scoped_restore.
2646 * cp-support.c (reset_directive_searched): Remove.
2647 (make_symbol_overload_list_using): Use scoped_restore.
2648 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2649 (reset_directive_searched): Remove.
2650
5eae7aea
TT
26512017-11-04 Tom Tromey <tom@tromey.com>
2652
2653 * symfile.c (find_separate_debug_file_by_debuglink): Use
2654 unique_xmalloc_ptr.
2655
c6bcad5f
TT
26562017-11-04 Tom Tromey <tom@tromey.com>
2657
2658 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2659 type of "info".
2660 (compute_stack_depth): Likewise.
2661 (do_compile_dwarf_expr_to_c): Use std::vector.
2662
20dcd8ca
TT
26632017-11-04 Tom Tromey <tom@tromey.com>
2664
2665 * compile/compile-object-load.c (link_callbacks_einfo): Use
2666 std::string.
2667
33c7c59d
TT
26682017-11-04 Tom Tromey <tom@tromey.com>
2669
2670 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2671 Use scoped_free_pendings.
2672 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2673 scoped_free_pendings.
2674 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2675 (xcoff_initial_scan): Likewise.
2676 * buildsym.c (reset_symtab_globals): Update comment.
2677 (scoped_free_pendings): Rename from really_free_pendings.
2678 (prepare_for_building): Update comment.
2679 (buildsym_init): Likewise.
2680 * buildsym.h (class scoped_free_pendings): New class.
2681 (really_free_pendings): Don't declare.
2682
67fa57cf
UW
26832017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2684
2685 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2686 output when converting a zero value to a special byteorder format.
2687
f26ae15b
YQ
26882017-11-02 Yao Qi <yao.qi@linaro.org>
2689
2690 * frame.c (do_frame_register_read): Remove aspace.
2691 * jit.c (jit_frame_sniffer): Likwise.
2692 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2693 * regcache.c (regcache::regcache): Pass nullptr.
2694 (regcache_print): Caller updated.
2695 * regcache.h (regcache::regcache): Remove one constructor
2696 parameter aspace.
2697
6c6e9412
YQ
26982017-11-02 Yao Qi <yao.qi@linaro.org>
2699
2700 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2701
8b86c959
YQ
27022017-11-02 Yao Qi <yao.qi@linaro.org>
2703
2704 * breakpoint.c (insert_single_step_breakpoints): Update.
2705 * frame.c (struct frame_info) <aspace>: Add const.
2706 (frame_save_as_regcache): Add const.
2707 (get_frame_address_space): Return const address_space *.
2708 * frame.h (get_frame_address_space): Update declaration.
2709 * infrun.c (struct step_over_info) <aspace>: Add const.
2710 (set_step_over_info): Make aspace const.
2711 (displaced_step_prepare_throw): Change variable const.
2712 (resume): Likewise.
2713 (proceed): Likewise.
2714 (adjust_pc_after_break): Likewise.
2715 (save_waitstatus): Likewise.
2716 (handle_signal_stop): Likewise.
2717 (keep_going_pass_signal): Likewise.
2718 * jit.c (jit_frame_sniffer): Add const.
2719 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2720 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2721 * record-full.c (record_full_wait_1): Likewise.
2722 * regcache.c (regcache::regcache): Change parameter to const.
2723 * regcache.h (regcache::regcache): Likewise.
2724 (regcache::aspace): Return const address_space *.
2725 (regcache) <m_aspace>: Add const.
2726
a01bda52
YQ
27272017-11-02 Yao Qi <yao.qi@linaro.org>
2728
2729 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2730 * frame.c (create_sentinel_frame): Likewise.
2731 * infrun.c (displaced_step_prepare_throw): Likewise.
2732 (resume): Likewise.
2733 (thread_still_needs_step_over_bp): Likewise.
2734 (proceed): Likewise.
2735 (do_target_wait): Likewise.
2736 (adjust_pc_after_break): Likewise.
2737 (handle_syscall_event): Likewise.
2738 (save_waitstatus): Likewise.
2739 (handle_inferior_event_1): Likewise.
2740 (handle_signal_stop): Likewise.
2741 (keep_going_pass_signal): Likewise.
2742 * linux-nat.c (status_callback): Likewise.
2743 (save_stop_reason): Likewise.
2744 (resume_stopped_resumed_lwps): Likewise.
2745 * record-full.c (record_full_exec_insn): Likewise.
2746 (record_full_wait_1): Likewise.
2747 * regcache.c (get_regcache_aspace): Remove.
2748 * regcache.h (get_regcache_aspace): Remove.
2749
d999647b
YQ
27502017-11-02 Yao Qi <yao.qi@linaro.org>
2751
2752 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2753 (init_regcache_descr): Use gdbarch_num_regs.
2754 (regcache::regcache): Likewise.
2755 (regcache::get_register_status): Likewise.
2756 (regcache::assert_raw_regnum): Likewise.
2757 (regcache::cooked_read): Likewise.
2758 (regcache::cooked_read_value): Likewise.
2759 (regcache::cooked_write): Likewise.
2760 (regcache::dump): Likewise.
2761 (regcache::num_raw_registers): New method.
2762 * regcache.h (class regcache) <num_raw_registers>: New.
2763
4e888c28
YQ
27642017-11-02 Yao Qi <yao.qi@linaro.org>
2765
2766 * regcache.c (regcache::assert_regnum): New method.
2767 (regcache::invalidate): Call assert_regnum.
2768 (regcache::raw_update): Likewise.
2769 (regcache::raw_write): Likewise.
2770 (regcache::raw_read_part): Likewise.
2771 (regcache::raw_write_part): Likewise.
2772 (regcache::raw_supply): Likewise.
2773 (regcache::raw_supply_integer): Likewise.
2774 (regcache::raw_supply_zeroed): Likewise.
2775 (regcache::raw_collect): Likewise.
2776 (regcache::raw_collect_integer): Likewise.
2777 * regcache.h (regcache::assert_regnum): Declare.
2778
2e1b49b3
YQ
27792017-11-02 Yao Qi <yao.qi@linaro.org>
2780
2781 * regcache.c (regcache::dump): Remove code.
2782
6c5218df
YQ
27832017-11-02 Yao Qi <yao.qi@linaro.org>
2784
2785 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2786 Remove.
2787 <sizeof_cooked_register_status>: Remove.
2788 (init_regcache_descr): Update.
2789 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2790 (regcache::save): Likewise.
2791 (regcache::dump): Likewise.
2792
dcc31d28
JB
27932017-11-01 James Bowman <james.bowman@ftdichip.com>
2794
2795 * ft32-tdep.c (ft32_fetch_instruction): New function.
2796 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2797
3a87ae65
SM
27982017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2799
2800 * cli/cli-script.c (execute_control_command): Rename to ...
2801 (execute_control_command_1): ... this.
2802 (execute_control_command): New function.
2803
09b847f3
SM
28042017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2805
2806 * tracepoint.c (tfind_command): Remove const_cast.
2807
f871c485
MG
28082017-10-30 Mike Gulick <mgulick@mathworks.com>
2809
2810 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2811
b020ff80
SM
28122017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2813
2814 * common/common-utils.h (in_inclusive_range): New function.
2815 * arm-tdep.c (arm_record_extension_space): Use
2816 in_inclusive_range.
2817 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2818 * cris-tdep.c (cris_spec_reg_applicable): Use
2819 in_inclusive_range.
2820
1b81856f
PA
28212017-10-30 Pedro Alves <palves@redhat.com>
2822 Simon Marchi <simon.marchi@ericsson.com>
2823
2824 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2825 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2826
31b833b3
PA
28272017-10-30 Pedro Alves <palves@redhat.com>
2828
2829 * common/common-utils.c (string_appendf, string_vappendf): New
2830 functions.
2831 * common/common-utils.h (string_appendf, string_vappendf): New
2832 declarations.
2833 * unittests/common-utils-selftests.c (string_appendf_func)
2834 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2835 (string_vappendf_tests): New functions.
2836 (_initialize_common_utils_selftests): Register "string_appendf" and
2837 "string_vappendf tests".
2838
4a250334
PA
28392017-10-30 Pedro Alves <palves@redhat.com>
2840
2841 * unittests/common-utils-selftests.c (format_func): New typedef.
2842 (string_printf_tests, string_vprintf_tests): Tests factored out
2843 and merged to ...
2844 (test_format_func): ... this new function.
2845 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2846 test_format_func.
2847
16c5c17e
SM
28482017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2849
2850 * darwin-nat.c: Remove include of gdb.h.
2851
7ca51576
SM
28522017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2853
2854 * xtensa-xtregs.c: Fix formatting issues.
2855
c1342859
SM
28562017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2857
2858 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2859
484d8d36
MD
28602017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2861
2862 PR python/21213
2863 * python/py-infthread.c (thpy_get_inferior): Increment reference
2864 of inferior before returning it.
2865
b5540b5f
SM
28662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2867
2868 * unittests/common-utils-selftests.c (format): Add
2869 ATTRIBUTE_PRINTF.
2870
5a9dcda1
SM
28712017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2872
2873 * xml-syscall.c (struct syscall_desc): Add constructor.
2874 <name>: Change type to std::string.
2875 (syscall_desc_up): New typedef.
2876 (syscall_desc_p): Remove typeder.
2877 (DEF_VEC_P(syscall_desc_p)): Remove.
2878 (struct syscall_group_desc): Add constructor.
2879 <name>: Change type to std::string.
2880 <syscalls>: Change type to std::vector.
2881 (syscall_group_desc_up): New typedef.
2882 (syscall_group_desc_p): Remove typedef.
2883 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2884 (struct syscalls_info) <syscalls>: Change type to std::vector of
2885 unique_ptr.
2886 <groups>: Likewise.
2887 <my_gdb_datadir>: Change type to std::string.
2888 (syscalls_info_up): New typedef.
2889 (allocate_syscalls_info): Remove.
2890 (syscalls_info_free_syscalls_desc): Remove.
2891 (syscalls_info_free_syscall_group_desc): Remove.
2892 (free_syscalls_info): Remove.
2893 (make_cleanup_free_syscalls_info): Remove.
2894 (syscall_group_create_syscall_group_desc): Adjust.
2895 (syscall_group_add_syscall): Adjust.
2896 (syscall_create_syscall_desc): Adjust.
2897 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2898 (init_syscalls_info): Adjust.
2899 (syscall_group_get_group_by_name): Adjust.
2900 (xml_get_syscall_number): Adjust.
2901 (xml_get_syscall_name): Adjust.
2902 (xml_list_of_syscalls): Adjust.
2903 (xml_list_syscalls_by_group): Adjust.
2904 (xml_list_of_groups): Adjust.
2905
45461e0d
SM
29062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2907
2908 * probe.h: Don't include gdb_vecs.h.
2909 (DEF_VEC_P (probe_p)): Remove.
2910 (find_probes_in_objfile): Return an std::vector.
2911 * probe.c (find_probes_in_objfile): Likewise.
2912 * breakpoint.c (breakpoint_objfile_data)
2913 <longjmp_probes>: Change type to std::vector.
2914 <exception_probes>: Likewise.
2915 (free_breakpoint_probes): Don't manually free vectors.
2916 (create_longjmp_master_breakpoint): Adjust.
2917 (create_exception_master_breakpoint): Adjust.
2918 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2919 parameter type, adjust.
2920 (svr4_create_solib_event_breakpoints): Adjust.
2921
43dce439
SM
29222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2923
2924 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2925 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2926 with new.
2927 (free_breakpoint_probes): Rename to ...
2928 (free_breakpoint_objfile_data): ... this, and call delete on
2929 bp_objfile_data..
2930
6a1b9516
SM
29312017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2932
2933 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2934 (loaded_script_ptr): Remove typedef.
2935 (DEF_VEC_P (loaded_script_ptr)): Remove.
2936 (struct collect_matching_scripts_data): Add constructor.
2937 <scripts_p>: Change type to (pointer to) std::vector.
2938 (collect_matching_scripts_data): Adjust.
2939 (sort_scripts_by_name): Make suitable for std::sort.
2940 (print_scripts): Don't sort vector, adjust to std::vector.
2941 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2942
593e3209
SM
29432017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2944
2945 * symfile.c (filename_language): Make struct, not typedef. Add
2946 constructor.
2947 <ext>: Change type to std::string.
2948 (DEF_VEC_O (filename_language)): Remove.
2949 (filename_language_table): Change type to std::vector.
2950 (add_filename_language): Adjust.
2951 (set_ext_lang_command): Adjust.
2952 (info_ext_lang_command): Adjust.
2953 (deduce_language_from_filename): Adjust.
2954 (class scoped_restore_filename_language_table): Remove.
2955 (test_filename_language): Use scoped_restore.
2956 (test_set_ext_lang_command): Use scoped_restore, adjust to
2957 std::vector change.
2958
32fa66eb
SM
29592017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2960
2961 * symfile.c: Include selftest.h.
2962 (class scoped_restore_filename_language_table): New.
2963 (test_filename_language): New test.
2964 (test_set_ext_lang_command): New test.
2965 (_initialize_symfile): Register tests.
2966
4a27f119
KS
29672017-10-27 Keith Seitz <keiths@redhat.com>
2968
2969 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2970 in the bp_location, falling back to find_pc_sect_function when
2971 needed.
2972 (add_location_to_breakpoint): Save sal->symbol.
2973 * breakpoint.h (struct bp_location) <symbol>: New field.
2974 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2975 * symtab.h (struct symtab_and_line) <symbol>: New field.
2976
a43f3893
PF
29772017-10-26 Patrick Frants <osscontribute@gmail.com>
2978
7453e6b2 2979 PR gdb/13669
a43f3893
PF
2980 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2981 to rewind obstack.
2982
23cc4e1b
PA
29832017-10-26 Pedro Alves <palves@redhat.com>
2984
2985 * remote.c (remote_async_terminal_ours_p): Delete.
2986 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2987 Remove references to 'remote_async_terminal_ours_p'.
2988
6abc18bb
YQ
29892017-10-26 Yao Qi <yao.qi@linaro.org>
2990
2991 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2992
bd522513
YQ
29932017-10-26 Yao Qi <yao.qi@linaro.org>
2994
2995 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2996 aspace const.
2997 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2998 Likewise.
2999 * breakpoint.c (bpstat_check_location): Remove cast.
3000 (breakpoint_hit_catch_fork): Make aspce const.
3001 (breakpoint_hit_catch_solib): Likewise.
3002 (breakpoint_hit_catch_exec): Likewise.
3003 (breakpoint_hit_ranged_breakpoint): Likewise.
3004 (breakpoint_hit_watchpoint): Likewise.
3005 (base_breakpoint_breakpoint_hit): Likewise.
3006 (bkpt_breakpoint_hit): Likewise.
3007 (dprintf_breakpoint_hit): Likewise.
3008 (tracepoint_breakpoint_hit): Likewise.
3009 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3010
accd0bcd
YQ
30112017-10-26 Yao Qi <yao.qi@linaro.org>
3012
3013 * breakpoint.c (breakpoint_location_address_match): Change
3014 "struct address_space *" to "const address_space".
3015 (breakpoint_location_address_range_overlap): Likewise.
3016 (breakpoint_here_p): Likewise.
3017 (breakpoint_in_range_p): Likewise.
3018 (moribund_breakpoint_here_p): Likewise.
3019 (bp_location_inserted_here_p): Likewise.
3020 (software_breakpoint_inserted_here_p): Likewise.
3021 (hardware_breakpoint_inserted_here_p): Likewise.
3022 (hardware_watchpoint_inserted_in_range): Likewise.
3023 (bpstat_check_location): Likewise.
3024 (bpstat_stop_status): Likewise.
3025 (breakpoint_address_match): Likewise.
3026 (breakpoint_address_match_range): Likewise.
3027 (breakpoint_location_address_match): Likewise.
3028 (breakpoint_location_address_range_overlap): Likewise.
3029 (insert_single_step_breakpoint): Likewise.
3030 (breakpoint_has_location_inserted_here): Likewise.
3031 (single_step_breakpoint_inserted_here_p): Likewise.
3032 (pc_at_non_inline_function): Likewise.
3033 * breakpoint.h (bpstat_stop_status): Update declaration.
3034 (breakpoint_here_p): Likewise.
3035 (breakpoint_in_range_p): Likewise.
3036 (moribund_breakpoint_here_p): Likewise.
3037 (breakpoint_inserted_here_p): Likewise.
3038 (software_breakpoint_inserted_here_p): Likewise.
3039 (hardware_breakpoint_inserted_here_p): Likewise.
3040 (breakpoint_has_location_inserted_here): Likewise.
3041 (single_step_breakpoint_inserted_here_p): Likewise.
3042 (hardware_watchpoint_inserted_in_range): Likewise.
3043 (breakpoint_address_match): Likewise.
3044 (insert_single_step_breakpoint): Likewise.
3045 (pc_at_non_inline_function): Likewise.
3046 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3047 * record.c (record_check_stopped_by_breakpoint): Likewise.
3048 * record.h (record_check_stopped_by_breakpoint): Likewise.
3049 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3050
ac7936df
YQ
30512017-10-25 Yao Qi <yao.qi@linaro.org>
3052
3053 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3054 regcache->arch () instead get_regcache_arch.
3055 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3056 Likewise.
3057 (aarch64_fbsd_store_inferior_registers): Likewise.
3058 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3059 (store_gregs_to_thread): Likewise.
3060 (fetch_fpregs_from_thread): Likewise.
3061 (store_fpregs_to_thread): Likewise.
3062 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3063 (aarch64_store_return_value): Likewise.
3064 (aarch64_software_single_step): Likewise.
3065 * aix-thread.c (aix_thread_wait): Likewise.
3066 (supply_reg32): Likewise.
3067 (supply_sprs64): Likewise.
3068 (supply_sprs32): Likewise.
3069 (fill_gprs64): Likewise.
3070 (fill_gprs32): Likewise.
3071 (fill_sprs64): Likewise.
3072 (fill_sprs32): Likewise.
3073 (store_regs_user_thread): Likewise.
3074 (store_regs_kernel_thread): Likewise.
3075 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3076 (alphabsd_store_inferior_registers): Likewise.
3077 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3078 (alpha_store_return_value): Likewise.
3079 (alpha_deal_with_atomic_sequence): Likewise.
3080 (alpha_next_pc): Likewise.
3081 (alpha_software_single_step): Likewise.
3082 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3083 (amd64bsd_store_inferior_registers): Likewise.
3084 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3085 Likewise.
3086 (amd64_linux_store_inferior_registers): Likewise.
3087 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3088 (amd64_collect_native_gregset): Likewise.
3089 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3090 (amd64obsd_collect_uthread): Likewise.
3091 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3092 (amd64_collect_fpregset): Likewise.
3093 (amd64_supply_fxsave): Likewise.
3094 (amd64_supply_xsave): Likewise.
3095 (amd64_collect_fxsave): Likewise.
3096 (amd64_collect_xsave): Likewise.
3097 * arc-tdep.c (arc_write_pc): Likewise.
3098 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3099 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3100 (arm_fbsd_store_inferior_registers): Likewise.
3101 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3102 (store_vfp_regs): Likewise.
3103 (arm_linux_fetch_inferior_registers): Likewise.
3104 (arm_linux_store_inferior_registers): Likewise.
3105 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3106 (arm_linux_sigreturn_next_pc): Likewise.
3107 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3108 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3109 (fetch_register): Likewise.
3110 (store_register): Likewise.
3111 * arm-tdep.c (arm_is_thumb): Likewise.
3112 (displaced_in_arm_mode): Likewise.
3113 (bx_write_pc): Likewise.
3114 (arm_get_next_pcs_addr_bits_remove): Likewise.
3115 (arm_software_single_step): Likewise.
3116 (arm_extract_return_value): Likewise.
3117 (arm_store_return_value): Likewise.
3118 (arm_write_pc): Likewise.
3119 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3120 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3121 (bsd_uthread_store_registers): Likewise.
3122 * core-regset.c (fetch_core_registers): Likewise.
3123 * corelow.c (get_core_registers): Likewise.
3124 * cris-tdep.c (cris_store_return_value): Likewise.
3125 (cris_extract_return_value): Likewise.
3126 (find_step_target): Likewise.
3127 (find_step_target): Likewise.
3128 (cris_software_single_step): Likewise.
3129 * ctf.c (ctf_fetch_registers): Likewise.
3130 * darwin-nat.c (cancel_breakpoint): Likewise.
3131 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3132 * frv-tdep.c (frv_extract_return_value): Likewise.
3133 * ft32-tdep.c (ft32_store_return_value): Likewise.
3134 (ft32_extract_return_value): Likewise.
3135 * go32-nat.c (fetch_register): Likewise.
3136 (go32_fetch_registers): Likewise.
3137 (go32_store_registers): Likewise.
3138 (store_register): Likewise.
3139 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3140 (h8300_store_return_value): Likewise.
3141 * hppa-linux-nat.c (fetch_register): Likewise.
3142 (store_register): Likewise.
3143 (hppa_linux_fetch_inferior_registers): Likewise.
3144 (hppa_linux_store_inferior_registers): Likewise.
3145 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3146 (i386_darwin_store_inferior_registers): Likewise.
3147 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3148 (gnu_store_registers): Likewise.
3149 * i386-linux-nat.c (fetch_register): Likewise.
3150 (store_register): Likewise.
3151 (supply_gregset): Likewise.
3152 (fill_gregset): Likewise.
3153 (i386_linux_fetch_inferior_registers): Likewise.
3154 (i386_linux_store_inferior_registers): Likewise.
3155 (i386_linux_resume): Likewise.
3156 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3157 Likewise.
3158 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3159 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3160 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3161 (i386obsd_collect_uthread): Likewise.
3162 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3163 (i386_supply_gregset): Likewise.
3164 (i386_collect_gregset): Likewise.
3165 (i386_supply_fpregset): Likewise.
3166 (i386_collect_fpregset): Likewise.
3167 (i386_mpx_bd_base): Likewise.
3168 * i386-v4-nat.c (supply_fpregset): Likewise.
3169 (fill_fpregset): Likewise.
3170 * i387-tdep.c (i387_supply_fsave): Likewise.
3171 (i387_collect_fsave): Likewise.
3172 (i387_supply_fxsave): Likewise.
3173 (i387_collect_fxsave): Likewise.
3174 (i387_supply_xsave): Likewise.
3175 (i387_collect_xsave): Likewise.
3176 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3177 (ia64_linux_store_registers): Likewise.
3178 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3179 (ia64_extract_return_value): Likewise.
3180 (ia64_store_return_value): Likewise.
3181 (find_func_descr): Likewise.
3182 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3183 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3184 (inf_ptrace_store_registers): Likewise.
3185 * infrun.c (use_displaced_stepping): Likewise.
3186 (displaced_step_prepare_throw): Likewise.
3187 (resume): Likewise.
3188 (proceed): Likewise.
3189 (do_target_wait): Likewise.
3190 (adjust_pc_after_break): Likewise.
3191 (handle_inferior_event_1): Likewise.
3192 (handle_signal_stop): Likewise.
3193 (save_infcall_suspend_state): Likewise.
3194 (restore_infcall_suspend_state): Likewise.
3195 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3196 * jit.c (jit_frame_prev_register): Likewise.
3197 * linux-nat.c (save_stop_reason): Likewise.
3198 (linux_nat_wait_1): Likewise.
3199 (resume_stopped_resumed_lwps): Likewise.
3200 * linux-record.c (record_linux_sockaddr): Likewise.
3201 (record_linux_msghdr): Likewise.
3202 (record_linux_system_call): Likewise.
3203 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3204 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3205 (lm32_store_return_value): Likewise.
3206 * m32c-tdep.c (m32c_read_flg): Likewise.
3207 (m32c_pseudo_register_read): Likewise.
3208 (m32c_pseudo_register_write): Likewise.
3209 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3210 (m32r_linux_collect_gregset): Likewise.
3211 * m32r-tdep.c (m32r_store_return_value): Likewise.
3212 (m32r_extract_return_value): Likewise.
3213 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3214 (m68kbsd_collect_fpregset): Likewise.
3215 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3216 * m68k-linux-nat.c (fetch_register): Likewise.
3217 (old_fetch_inferior_registers): Likewise.
3218 (old_store_inferior_registers): Likewise.
3219 (store_regs): Likewise.
3220 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3221 (m68k_svr4_store_return_value): Likewise.
3222 * m88k-tdep.c (m88k_store_arguments): Likewise.
3223 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3224 (mi_cmd_data_write_register_values): Likewise.
3225 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3226 (mips_fbsd_store_inferior_registers): Likewise.
3227 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3228 (mips_fbsd_supply_gregs): Likewise.
3229 (mips_fbsd_collect_fpregs): Likewise.
3230 (mips_fbsd_collect_gregs): Likewise.
3231 (mips_fbsd_supply_fpregset): Likewise.
3232 (mips_fbsd_collect_fpregset): Likewise.
3233 (mips_fbsd_supply_gregset): Likewise.
3234 (mips_fbsd_collect_gregset): Likewise.
3235 * mips-linux-nat.c (supply_gregset): Likewise.
3236 (fill_gregset): Likewise.
3237 (supply_fpregset): Likewise.
3238 (fill_fpregset): Likewise.
3239 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3240 (mips_fill_gregset): Likewise.
3241 (mips_supply_fpregset): Likewise.
3242 (mips_fill_fpregset): Likewise.
3243 (mips64_supply_gregset): Likewise.
3244 (micromips_linux_sigframe_validate): Likewise.
3245 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3246 (mipsnbsd_fetch_inferior_registers): Likewise.
3247 (mipsnbsd_store_inferior_registers): Likewise.
3248 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3249 (mipsnbsd_supply_gregset): Likewise.
3250 (mipsnbsd_iterate_over_regset_sections): Likewise.
3251 (mipsnbsd_supply_reg): Likewise.
3252 (mipsnbsd_supply_fpreg): Likewise.
3253 * mips-tdep.c (mips_in_frame_stub): Likewise.
3254 (mips_dummy_id): Likewise.
3255 (is_octeon_bbit_op): Likewise.
3256 (micromips_bc1_pc): Likewise.
3257 (extended_mips16_next_pc): Likewise.
3258 (mips16_next_pc): Likewise.
3259 (deal_with_atomic_sequence): Likewise.
3260 * moxie-tdep.c (moxie_process_readu): Likewise.
3261 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3262 * nto-procfs.c (procfs_store_registers): Likewise.
3263 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3264 (ppcfbsd_store_inferior_registers): Likewise.
3265 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3266 (fetch_altivec_register): Likewise.
3267 (get_spe_registers): Likewise.
3268 (fetch_spe_register): Likewise.
3269 (fetch_altivec_registers): Likewise.
3270 (fetch_all_gp_regs): Likewise.
3271 (fetch_all_fp_regs): Likewise.
3272 (store_vsx_register): Likewise.
3273 (store_altivec_register): Likewise.
3274 (set_spe_registers): Likewise.
3275 (store_spe_register): Likewise.
3276 (store_altivec_registers): Likewise.
3277 (store_all_gp_regs): Likewise.
3278 (store_all_fp_regs): Likewise.
3279 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3280 (ppc_linux_collect_gregset): Likewise.
3281 (ppc_canonicalize_syscall): Likewise.
3282 (ppc_linux_record_signal): Likewise.
3283 (ppu2spu_prev_register): Likewise.
3284 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3285 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3286 (ppcobsd_store_registers): Likewise.
3287 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3288 Likewise.
3289 (ppc_ravenscar_generic_store_registers): Likewise.
3290 * procfs.c (procfs_fetch_registers): Likewise.
3291 (procfs_store_registers): Likewise.
3292 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3293 (ravenscar_store_registers): Likewise.
3294 (ravenscar_prepare_to_store): Likewise.
3295 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3296 * record-full.c (record_full_wait_1): Likewise.
3297 (record_full_registers_change): Likewise.
3298 (record_full_store_registers): Likewise.
3299 (record_full_core_fetch_registers): Likewise.
3300 (record_full_save): Likewise.
3301 (record_full_goto_insn): Likewise.
3302 * regcache.c (regcache_register_size): Likewise.
3303 (get_regcache_arch): Remove.
3304 (regcache_read_pc): Likewise.
3305 * regcache.h (get_regcache_arch): Remove.
3306 * remote-sim.c (gdbsim_fetch_register): Likewise.
3307 (gdbsim_store_register): Likewise.
3308 * remote.c (fetch_register_using_p): Likewise.
3309 (send_g_packet): Likewise.
3310 (remote_prepare_to_store): Likewise.
3311 (store_registers_using_G): Likewise.
3312 * reverse.c (save_bookmark_command): Likewise.
3313 (goto_bookmark_command): Likewise.
3314 * rs6000-aix-tdep.c (branch_dest): Likewise.
3315 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3316 (fetch_register): Likewise.
3317 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3318 (ppc_collect_reg): Likewise.
3319 (ppc_collect_gregset): Likewise.
3320 (ppc_collect_fpregset): Likewise.
3321 (ppc_collect_vsxregset): Likewise.
3322 (ppc_collect_vrregset): Likewise.
3323 (ppc_displaced_step_hw_singlestep): Likewise.
3324 (rs6000_pseudo_register_read): Likewise.
3325 (rs6000_pseudo_register_write): Likewise.
3326 * s390-linux-nat.c (supply_gregset): Likewise.
3327 (fill_gregset): Likewise.
3328 (s390_linux_fetch_inferior_registers): Likewise.
3329 * s390-linux-tdep.c (s390_write_pc): Likewise.
3330 (s390_software_single_step): Likewise.
3331 (s390_all_but_pc_registers_record): Likewise.
3332 (s390_linux_syscall_record): Likewise.
3333 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3334 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3335 (shnbsd_store_inferior_registers): Likewise.
3336 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3337 (sh_extract_return_value_fpu): Likewise.
3338 (sh_store_return_value_nofpu): Likewise.
3339 (sh_corefile_supply_regset): Likewise.
3340 (sh_corefile_collect_regset): Likewise.
3341 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3342 (sh64_store_return_value): Likewise.
3343 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3344 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3345 (sparc_store_inferior_registers): Likewise.
3346 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3347 (sparc_ravenscar_prepare_to_store): Likewise.
3348 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3349 (sparc_analyze_control_transfer): Likewise.
3350 (sparc_step_trap): Likewise.
3351 (sparc_software_single_step): Likewise.
3352 (sparc32_gdbarch_init): Likewise.
3353 (sparc_supply_rwindow): Likewise.
3354 (sparc_collect_rwindow): Likewise.
3355 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3356 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3357 (sparc64nbsd_collect_gregset): Likewise.
3358 (sparc64nbsd_supply_fpregset): Likewise.
3359 (sparc64nbsd_collect_fpregset): Likewise.
3360 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3361 (sparc64_supply_gregset): Likewise.
3362 (sparc64_collect_gregset): Likewise.
3363 (sparc64_supply_fpregset): Likewise.
3364 (sparc64_collect_fpregset): Likewise.
3365 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3366 * spu-tdep.c (spu_unwind_sp): Likewise.
3367 (spu2ppu_prev_register): Likewise.
3368 (spu_memory_remove_breakpoint): Likewise.
3369 * stack.c (return_command): Likewise.
3370 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3371 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3372 * tracefile.c (trace_save_ctf): Likewise.
3373 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3374 (do_windows_store_inferior_registers): Likewise.
3375 (windows_resume): Likewise.
3376 * xtensa-linux-nat.c (fill_gregset): Likewise.
3377 (supply_gregset_reg): Likewise.
3378 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3379 (xtensa_register_read_masked): Likewise.
3380 (xtensa_supply_gregset): Likewise.
3381 (xtensa_extract_return_value): Likewise.
3382 (xtensa_store_return_value): Likewise.
3383
edd079d9
UW
33842017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3385
3386 * doublest.c (floatformat_from_string): New function.
3387 * doublest.h (floatformat_from_string): Add prototype.
3388
3389 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3390 (OP_FLOAT): ... this.
3391 * expression.h: Do not include "doublest.h".
3392 (union exp_element): Replace doubleconst and decfloatconst by
3393 new element floatconst.
3394 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3395 (ada_evaluate_subexp): Likewise.
3396 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3397 OP_DOUBLE and OP_DECFLOAT.
3398 * expprint.c (print_subexp_standard): Likewise.
3399 (dump_subexp_body_standard): Likewise.
3400 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3401
3402 * parse.c: Include "dfp.h".
3403 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3404 (write_exp_elt_floatcst): New function.
3405 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3406 and OP_DECFLOAT.
3407 (operator_check_standard): Likewise.
3408 (parse_float): Do not accept suffix. Take type as input. Return bool.
3409 Return target format buffer instead of host DOUBLEST.
3410 Use floatformat_from_string and decimal_from_string to parse
3411 either binary or decimal floating-point types.
3412 (parse_c_float): Remove.
3413 * parser-defs.h: Do not include "doublest.h".
3414 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3415 (write_exp_elt_floatcst): Add prototype.
3416 (parse_float): Update prototype.
3417 (parse_c_float): Remove.
3418
3419 * c-exp.y: Do not include "dfp.h".
3420 (typed_val_float): Use byte buffer instead of DOUBLEST.
3421 (typed_val_decfloat): Remove.
3422 (DECFLOAT): Remove.
3423 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3424 (parse_number): Update to new parse_float interface.
3425 Parse suffixes and determine type before calling parse_float.
3426 Handle decimal and binary FP types the same way.
3427
3428 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3429 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3430 (parse_number): Update to new parse_float interface.
3431 Parse suffixes and determine type before calling parse_float.
3432
3433 * f-exp.y: Replace dval by typed_val_float.
3434 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3435 (parse_number): Use parse_float instead of atof.
3436
3437 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3438 (parse_go_float): Remove.
3439 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3440 (parse_number): Call parse_float instead of parse_go_float.
3441 Parse suffixes and determine type before calling parse_float.
3442
3443 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3444 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3445 (parse_number): Update to new parse_float interface.
3446 Parse suffixes and determine type before calling parse_float.
3447
3448 * m2-exp.y: Replace dval by byte buffer val.
3449 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3450 (parse_number): Call parse_float instead of atof.
3451
3452 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3453 (lex_number): Call parse_float instead of strtod.
3454 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3455 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3456 Use write_exp_elt_floatcst.
3457 (unit_testing): Remove static variable.
3458 (rust_type): Do not check unit_testing.
3459 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3460
3461 * ada-exp.y (type_float, type_double): Remove.
3462 (typed_val_float): Use byte buffer instead of DOUBLEST.
3463 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3464 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3465
cc628f3d
AH
34662017-10-25 Alan Hayward <alan.hayward@arm.com>
3467
3468 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3469 * arch/aarch64.h: New file.
3470
09a7c6aa
UW
34712017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3472
3473 * dfp.h (decimal_from_string): Use const reference for argument.
3474 * dfp.c (decimal_from_string): Likewise.
3475
8ba0dd51
UW
34762017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3477
3478 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3479 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3480 * mips-tdep.c (mips_print_fp_register): Likewise.
3481
16e812b2
UW
34822017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3483
3484 * common/format.h (enum argclass): Replace decfloat_arg by
3485 dec32float_arg, dec64float_arg, and dec128float_arg.
3486 * common/format.c (parse_format_string): Update to return
3487 new decimal float argument classes.
3488
3489 * printcmd.c (printf_decfloat): Rename to ...
3490 (printf_floating): ... this. Add argclass argument, and use it
3491 instead of parsing the format string again. Add support for
3492 binary floating-point values, using floatformat_to_string.
3493 Convert value to the target format if it doesn't already match.
3494 (ui_printf): Call printf_floating instead of printf_decfloat,
3495 also for double_arg / long_double_arg. Pass argclass.
3496
3497 * dfp.c (decimal_to_string): Add format string argument.
3498 * dfp.h (decimal_to_string): Likewise.
3499
3500 * doublest.c (floatformat_to_string): Add format string argument.
3501 * doublest.h (floatformat_to_string): Likewise.
3502
fdf0cbc2
UW
35032017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3504
3505 * doublest.c (floatformat_precision): New routine.
3506 (floatformat_to_string): Likewise.
3507 * doublest.c (floatformat_to_string): Add prototype.
3508
3509 * printcmd.c (print_scalar_formatted): Only call print_floating
3510 on floating-point types.
3511 * valprint.c: Do not include "floatformat.h".
3512 (generic_val_print_decfloat): Remove.
3513 (generic_val_print): Call generic_val_print_float for both
3514 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3515 (print_floating): Use floatformat_to_string. Handle decimal float.
3516 (print_decimal_floating): Remove, merge into floatformat_to_string.
3517 * value.h (print_decimal_floating): Remove.
3518
3519 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3520
5033013f
UW
35212017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3522
3523 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3524
a664f67e
SM
35252017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3526
3527 * memattr.h: Don't include vec.h.
3528 (struct mem_attrib): Initialize fields.
3529 <unknown>: New static method.
3530 (struct mem_region): Add constructors, operator<, initialize
3531 fields.
3532 * memattr.c: Include algorithm.
3533 (default_mem_attrib, unknown_mem_attrib): Remove.
3534 (user_mem_region_list): New global.
3535 (target_mem_region_list, mem_region_list): Change type to
3536 std::vector<mem_region>.
3537 (mem_use_target): Now a function.
3538 (target_mem_regions_valid): Change type to bool.
3539 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3540 (require_user_regions): Adjust.
3541 (require_target_regions): Adjust.
3542 (create_mem_region): Adjust.
3543 (lookup_mem_region): Adjust.
3544 (invalidate_target_mem_regions): Adjust.
3545 (mem_clear): Rename to...
3546 (user_mem_clear): ... this, and adjust.
3547 (mem_command): Adjust.
3548 (info_mem_command): Adjust.
3549 (mem_enable, enable_mem_command, mem_disable,
3550 disable_mem_command): Adjust.
3551 (mem_delete): Adjust.
3552 (delete_mem_command): Adjust.
3553 * memory-map.h (parse_memory_map): Return an std::vector.
3554 * memory-map.c (parse_memory_map): Likewise.
3555 (struct memory_map_parsing_data): Add constructor.
3556 <memory_map>: Point to std::vector.
3557 (memory_map_start_memory): Adjust.
3558 (memory_map_end_memory): Adjust.
3559 (memory_map_end_property): Adjust.
3560 (clear_result): Remove.
3561 * remote.c (remote_memory_map): Return an std::vector.
3562 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3563 Remove.
3564 (target_debug_print_mem_region_vector): New.
3565 * target-delegates.c: Regenerate.
3566 * target.h (mem_region_vector): New typedef.
3567 (to_memory_map): Return mem_region_vector.
3568 (target_memory_map): Return an std::vector.
3569 * target.c (target_memory_map): Return an std::vector.
3570 (flash_erase_command): Adjust.
3571
6e17c565
SM
35722017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3573
3574 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3575 Change type to std::string.
3576 (memory_map_start_property): Adjust.
3577 (memory_map_end_property): Adjust.
3578
cfba9872
SM
35792017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3580
3581 * infrun.h: Include common/byte-vector.h.
3582 (struct displaced_step_closure): New struct.
3583 (struct buf_displaced_step_closure): New struct.
3584 * infrun.c (displaced_step_closure::~displaced_step_closure):
3585 Provide default implementation.
3586 (displaced_step_clear): Deallocate step closure with delete.
3587 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3588 (aarch64_displaced_step_closure): ... this, extend
3589 displaced_step_closure.
3590 (aarch64_displaced_step_data) <dsc>: Change type to
3591 aarch64_displaced_step_closure.
3592 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3593 unique_ptr.
3594 (aarch64_displaced_step_fixup): Add cast for displaced step
3595 closure.
3596 * amd64-tdep.c (displaced_step_closure): Rename to ...
3597 (amd64_displaced_step_closure): ... this, extend
3598 displaced_step_closure.
3599 <insn_buf>: Change type to std::vector<gdb_byte>.
3600 <max_len>: Remove.
3601 (fixup_riprel): Change type of DSC parameter, adjust to type
3602 change of insn_buf.
3603 (fixup_displaced_copy): Change type of DSC parameter.
3604 (amd64_displaced_step_copy_insn): Instantiate
3605 amd64_displaced_step_closure.
3606 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3607 to type change of insn_buf.
3608 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3609 parameter DSC.
3610 (arm_linux_copy_svc): Likewise.
3611 (cleanup_kernel_helper_return): Likewise.
3612 (arm_catch_kernel_helper_return): Likewise.
3613 (arm_linux_displaced_step_copy_insn): Instantiate
3614 arm_displaced_step_closure.
3615 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3616 (displaced_read_reg): Change type of parameter DSC.
3617 (branch_write_pc): Likewise.
3618 (load_write_pc): Likewise.
3619 (alu_write_pc): Likewise.
3620 (displaced_write_reg): Likewise.
3621 (arm_copy_unmodified): Likewise.
3622 (thumb_copy_unmodified_32bit): Likewise.
3623 (thumb_copy_unmodified_16bit): Likewise.
3624 (cleanup_preload): Likewise.
3625 (install_preload): Likewise.
3626 (arm_copy_preload): Likewise.
3627 (thumb2_copy_preload): Likewise.
3628 (install_preload_reg): Likewise.
3629 (arm_copy_preload_reg): Likewise.
3630 (cleanup_copro_load_store): Likewise.
3631 (install_copro_load_store): Likewise.
3632 (arm_copy_copro_load_store) Likewise.
3633 (thumb2_copy_copro_load_store): Likewise.
3634 (cleanup_branch): Likewise.
3635 (install_b_bl_blx): Likewise.
3636 (arm_copy_b_bl_blx): Likewise.
3637 (thumb2_copy_b_bl_blx): Likewise.
3638 (thumb_copy_b): Likewise.
3639 (install_bx_blx_reg): Likewise.
3640 (arm_copy_bx_blx_reg): Likewise.
3641 (thumb_copy_bx_blx_reg): Likewise.
3642 (cleanup_alu_imm): Likewise.
3643 (arm_copy_alu_imm): Likewise.
3644 (thumb2_copy_alu_imm): Likewise.
3645 (cleanup_alu_reg): Likewise.
3646 (install_alu_reg): Likewise.
3647 (arm_copy_alu_reg): Likewise.
3648 (thumb_copy_alu_reg): Likewise.
3649 (cleanup_alu_shifted_reg): Likewise.
3650 (install_alu_shifted_reg): Likewise.
3651 (arm_copy_alu_shifted_reg): Likewise.
3652 (cleanup_load): Likewise.
3653 (cleanup_store): Likewise.
3654 (arm_copy_extra_ld_st): Likewise.
3655 (install_load_store): Likewise.
3656 (thumb2_copy_load_literal): Likewise.
3657 (thumb2_copy_load_reg_imm): Likewise.
3658 (arm_copy_ldr_str_ldrb_strb): Likewise.
3659 (cleanup_block_load_all): Likewise.
3660 (cleanup_block_store_pc): Likewise.
3661 (cleanup_block_load_pc): Likewise.
3662 (arm_copy_block_xfer): Likewise.
3663 (thumb2_copy_block_xfer): Likewise.
3664 (cleanup_svc): Likewise.
3665 (install_svc): Likewise.
3666 (arm_copy_svc): Likewise.
3667 (thumb_copy_svc): Likewise.
3668 (arm_copy_undef): Likewise.
3669 (thumb_32bit_copy_undef): Likewise.
3670 (arm_copy_unpred): Likewise.
3671 (arm_decode_misc_memhint_neon): Likewise.
3672 (arm_decode_unconditional): Likewise.
3673 (arm_decode_miscellaneous): Likewise.
3674 (arm_decode_dp_misc): Likewise.
3675 (arm_decode_ld_st_word_ubyte): Likewise.
3676 (arm_decode_media): Likewise.
3677 (arm_decode_b_bl_ldmstm): Likewise.
3678 (arm_decode_ext_reg_ld_st): Likewise.
3679 (thumb2_decode_dp_shift_reg): Likewise.
3680 (thumb2_decode_ext_reg_ld_st): Likewise.
3681 (arm_decode_svc_copro): Likewise.
3682 (thumb2_decode_svc_copro): Likewise.
3683 (install_pc_relative): Likewise.
3684 (thumb_copy_pc_relative_16bit): Likewise.
3685 (thumb_decode_pc_relative_16bit): Likewise.
3686 (thumb_copy_pc_relative_32bit): Likewise.
3687 (thumb_copy_16bit_ldr_literal): Likewise.
3688 (thumb_copy_cbnz_cbz): Likewise.
3689 (thumb2_copy_table_branch): Likewise.
3690 (cleanup_pop_pc_16bit_all): Likewise.
3691 (thumb_copy_pop_pc_16bit): Likewise.
3692 (thumb_process_displaced_16bit_insn): Likewise.
3693 (decode_thumb_32bit_ld_mem_hints): Likewise.
3694 (thumb_process_displaced_32bit_insn): Likewise.
3695 (thumb_process_displaced_insn): Likewise.
3696 (arm_process_displaced_insn): Likewise.
3697 (arm_displaced_init_closure): Likewise.
3698 (arm_displaced_step_fixup): Add cast for closure.
3699 * arm-tdep.h: Include infrun.h.
3700 (displaced_step_closure): Rename to ...
3701 (arm_displaced_step_closure): ... this, extend
3702 displaced_step_closure.
3703 <u::svc::copy_svc_os>: Change type of parameter DSC.
3704 <cleanup>: Likewise.
3705 (arm_process_displaced_insn): Likewise.
3706 (arm_displaced_init_closure): Likewise.
3707 (displaced_read_reg): Likewise.
3708 (displaced_write_reg): Likewise.
3709 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3710 Adjust.
3711 * i386-tdep.h: Include infrun.h.
3712 (i386_displaced_step_closure): New typedef.
3713 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3714 i386_displaced_step_closure.
3715 (i386_displaced_step_fixup): Adjust.
3716 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3717 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3718 and unique_ptr.
3719 (ppc_displaced_step_fixup): Adjust.
3720 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3721 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3722 and unique_ptr.
3723 (s390_displaced_step_fixup): Adjust.
3724
b392b304
SM
37252017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3726
3727 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3728 Remove declarations.
3729
d5833c62
TT
37302017-10-20 Tom Tromey <tom@tromey.com>
3731
3732 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3733 std::vector.
3734 (gdb_bfd_record_inclusion): Update.
3735 (bfdp): Remove typedef.
3736
06d5bbc8
TT
37372017-10-20 Tom Tromey <tom@tromey.com>
3738
3739 * gdb_bfd.c (gdb_bfd_ref): Use new.
3740 (struct gdb_bfd_data): Add constructor, destructor, and member
3741 initializers.
3742 (gdb_bfd_unref): Use delete.
3743
2712ce2e
TT
37442017-10-20 Tom Tromey <tom@tromey.com>
3745
3746 * exec.c (exec_file_attach): Use new_bfd_ref.
3747 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3748 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3749 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3750 new_bfd_ref.
3751 * gdb_bfd.h (new_bfd_ref): New function.
3752
fcc8fb2f
PA
37532017-10-20 Pedro Alves <palves@redhat.com>
3754
3755 * main.c (captured_command_loop): Add attribute noinline.
3756
4c2287b0
SM
37572017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3758
3759 * interps.c (struct interp_factory): Add constructor.
3760 (interp_factory_p): Remove typedef.
3761 (DEF_VEC_P(interp_factory_p)): Remove.
3762 (interpreter_factories): Change type to std::vector.
3763 (interp_factory_register): Adjust.
3764 (interp_lookup): Adjust.
3765 (interpreter_completer): Adjust.
3766
3d415c26
TT
37672017-10-19 Tom Tromey <tom@tromey.com>
3768
3769 * break-catch-syscall.c (catch_syscall_completer): Use
3770 std::string, gdb::unique_xmalloc_ptr.
3771
395423c4
TT
37722017-10-19 Tom Tromey <tom@tromey.com>
3773
3774 * infcall.c (call_function_by_hand_dummy): Use std::string.
3775
54f70bc1
TT
37762017-10-19 Tom Tromey <tom@tromey.com>
3777
3778 * mi/mi-main.c (mi_cmd_execute): Update.
3779 * top.h (prepare_execute_command): Return scoped_value_mark.
3780 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3781 Add move constructor.
3782 * top.c (prepare_execute_command): Return scoped_value_mark.
3783 (execute_command): Update.
3784
63929e84
PA
37852017-10-19 Pedro Alves <palves@redhat.com>
3786
3787 * xml-support.c (xml_fetch_content_from_file): Check fread's
3788 return.
3789
a75868f5
PA
37902017-10-19 Pedro Alves <palves@redhat.com>
3791
3792 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3793 async.
3794 (handle_error_fd): New function.
3795 (ser_base_async): Add/delete an event loop file handler for
3796 error_fd.
3797
2edf834e
PA
37982017-10-19 Pedro Alves <palves@redhat.com>
3799
3800 * xml-support.c (xml_fetch_content_from_file): Don't read in
3801 chunks. Instead use fseek to determine the file's size, and read
3802 it in one go.
3803
c8ba13ad
KS
38042017-11-18 Keith Seitz <keiths@redhat.com>
3805
3806 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3807 types.
3808 Add whitespace to front of type name.
3809
37534686
KS
38102017-10-18 Keith Seitz <keiths@redhat.com>
3811
3812 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3813 DW_AT_accessibility.
3814
28c7c158
YQ
38152017-10-18 Yao Qi <yao.qi@linaro.org>
3816
3817 * features/tic6x-c62x-linux.c: Remove.
3818
30f0b101
TT
38192017-10-17 Tom Tromey <tom@tromey.com>
3820
3821 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3822 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3823 (do_mixed_source_and_assembly): Likewise.
3824
57e12da9
TT
38252017-10-17 Tom Tromey <tom@tromey.com>
3826
3827 * regcache.c (regcache::xfer_part): Remove assertion.
3828
7b700999
PA
38292017-10-17 Pedro Alves <palves@redhat.com>
3830
3831 * xml-support.c (xml_fetch_content_from_file): Call
3832 unique_ptr::release() instead unique_ptr::get() when passing
3833 through xrealloc.
3834
d3037ba6
YQ
38352017-10-17 Yao Qi <yao.qi@linaro.org>
3836
3837 * regcache.c (regcache::xfer_part): Remove parameters read and
3838 write, add parameter is_raw. All callers are updated.
3839
83d5a34d
KS
38402017-10-16 Keith Seitz <keiths@redhat.com>
3841
3842 * c-typeprint.c (enum access_specifier): Moved here from
3843 c_type_print_base.
3844 (output_access_specifier): New function.
3845 (c_type_print_base): Consider typedefs when assessing
3846 whether access labels are needed.
3847 Use output_access_specifier as needed.
3848 Output access specifier for typedefs, if needed.
3849 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3850 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3851 fields.
3852 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3853 accessor macros.
3854
87028b87
TT
38552017-10-16 Tom Tromey <tom@tromey.com>
3856
3857 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3858 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3859 * target.c (target_fileio_read_stralloc): Update.
3860 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3861 * target.h (target_fileio_read_stralloc): Return
3862 unique_xmalloc_ptr.
3863
b7b030ad
TT
38642017-10-16 Tom Tromey <tom@tromey.com>
3865
3866 * xml-syscall.c (xml_init_syscalls_info): Update.
3867 * xml-support.c (xinclude_start_include): Update.
3868 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3869 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3870 (xml_fetch_content_from_file): Likewise.
3871 * osdata.c (get_osdata): Update.
3872 * target.h (target_read_stralloc, target_get_osdata): Return
3873 unique_xmalloc_ptr.
3874 * solib-aix.c (solib_aix_get_library_list): Update.
3875 * solib-target.c (solib_target_current_sos): Update.
3876 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3877 * xml-tdesc.c (fetch_available_features_from_target): Update.
3878 (target_fetch_description_xml): Update.
3879 (file_read_description_xml): Update.
3880 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3881 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3882 (remote_pid_to_exec_file): Update.
3883 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3884 (target_get_osdata): Likewise.
3885
b80406ac
TT
38862017-10-16 Tom Tromey <tom@tromey.com>
3887
3888 * remote.c (remote_register_number_and_offset): Use std::vector.
3889 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3890 (putpkt_binary): Use gdb::def_vector.
3891 (compare_sections_command): Use gdb::byte_vector.
3892
a90ecff8
TT
38932017-10-16 Tom Tromey <tom@tromey.com>
3894
3895 * ppc-linux-nat.c (hwdebug_insert_point): Use
3896 gdb::unique_xmalloc_ptr, XDUP.
3897
2dc0e219
TT
38982017-10-16 Tom Tromey <tom@tromey.com>
3899
3900 * probe.c (parse_probes): Use std::string.
3901 (info_probes_for_ops, enable_probes_command)
3902 (disable_probes_command): Remove cleanups.
3903
b05628f0
TT
39042017-10-16 Tom Tromey <tom@tromey.com>
3905
3906 * buildsym.c (block_compar): Remove.
3907 (end_symtab_get_static_block): Use std::vector.
3908
a79b1bc6
SM
39092017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3910
3911 * memrange.h (struct mem_range): Define operator< and operator==.
3912 (mem_range_s): Remove.
3913 (DEF_VEC_O (mem_range_s)): Remove.
3914 (normalize_mem_ranges): Change parameter type to std::vector.
3915 * memrange.c (compare_mem_ranges): Remove.
3916 (normalize_mem_ranges): Change parameter type to std::vector,
3917 adjust to vector change.
3918 * exec.c (section_table_available_memory): Return vector, remove
3919 parameter.
3920 (section_table_read_available_memory): Adjust to std::vector
3921 change.
3922 * remote.c (remote_read_bytes): Adjust to std::vector
3923 change.
3924 * tracepoint.h (traceframe_available_memory): Change parameter
3925 type to std::vector.
3926 * tracepoint.c (traceframe_available_memory): Change parameter
3927 type to std::vector, adjust.
3928 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3929 std::vector change.
3930 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3931 unittests/memrange-selftests.c.
3932 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3933 * gdb/unittests/memrange-selftests.c: New file.
3934
63f0e930
PA
39352017-10-16 Pedro Alves <palves@redhat.com>
3936
3937 * elfread.c (probe_key_free): Rename range-for variable.
3938 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3939 (find_probe_by_pc, collect_probes): Rename range-for variable.
3940
c40c7bfc
YQ
39412017-10-16 Yao Qi <yao.qi@linaro.org>
3942
3943 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3944 * features/tic6x-c62x.c: Remove.
3945 * features/tic6x-c64x-linux.c: Remove.
3946 * features/tic6x-c64x.c: Remove.
3947 * features/tic6x-c64xp-linux.c: Remove.
3948 * features/tic6x-c64xp.c: Remove.
3949 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3950 initialize_tdesc_tic6x_*_linux functions.
3951 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3952 initialize_tdesc_tic6x_* functions.
3953
df27ae6a
YQ
39542017-10-16 Yao Qi <yao.qi@linaro.org>
3955
3956 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3957 tic6x-c62x.
3958 * regformats/tic6x-c62x.dat: Remove.
3959 * regformats/tic6x-c64x.dat: Remove.
3960 * regformats/tic6x-c64xp.dat: Remove.
3961
86766165
SM
39622017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3965 (the !HAVE_LIBEXPAT version).
3966
824dfcc3
SM
39672017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3970 const.
3971
2098b393
SM
39722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3973
3974 * target.h: Include tracepoint.h.
3975 (enum trace_find_type): Move to tracepoint.h.
3976 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3977 * tracepoint.h: Don't include target.h
3978 (enum trace_find_type): Move from target.h.
3979 (parse_traceframe_info): Return a unique ptr.
3980 * tracepoint.c (current_traceframe_info): Change type to unique
3981 ptr.
3982 (free_traceframe_info): Remove.
3983 (clear_traceframe_info): Don't manually free
3984 current_traceframe_info.
3985 (free_result): Remove.
3986 (parse_traceframe_info): Return a unique ptr.
3987 (get_traceframe_info): Adjust to unique ptr.
3988 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3989 * remote.c (remote_traceframe_info): Return a unique ptr.
3990 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3991 ptr.
3992 * target-debug.h (target_debug_print_traceframe_info_up): New
3993 macro.
3994 * target-delegates.c: Regenerate.
3995
4cdd21a8
SM
39962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3997
3998 * memrange.h (struct mem_range): Add constructors.
3999 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4000 std::vector<mem_range>.
4001 * tracepoint.c (free_traceframe_info): Don't manually free
4002 vector.
4003 (traceframe_info_start_memory): Adjust to vector change.
4004 (traceframe_available_memory): Likewise.
4005 * tracefile-tfile.c (build_traceframe_info): Likewise.
4006 * ctf.c (ctf_traceframe_info): Likewise.
4007
d0d292a2
SM
40082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4009
4010 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4011 std::vector<int>.
4012 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4013 (traceframe_info_start_tvar): Adjust to vector change.
4014 (parse_traceframe_info): Allocate with new.
4015 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4016 vector change.
4017 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4018 change.
4019 tfile_traceframe_info): Allocate with new.
4020 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4021 change.
4022
8d3c73ef
SM
40232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4024
4025 * tracepoint.c (traceframe_info): Rename to...
4026 (current_traceframe_info): ...this.
4027 (clear_traceframe_info): Adjust.
4028 (get_traceframe_info): Adjust.
4029
b129dcac
SM
40302017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4031
4032 * nat/linux-osdata.c: Include algorithm.
4033 (compare_processes): Remove.
4034 (struct pid_pgid_entry): New struct.
4035 (linux_xfer_osdata_processgroups): Use std::vector instead of
4036 XNEWVEC.
4037
af5bf4ad
SM
40382017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4039
4040 * objfiles.h: Don't include symfile.h.
4041 (struct partial_symbol): Remove forward-declaration.
4042 (struct objfile) <global_psymbols, static_psymbols>: Change type
4043 to std::vector<partial_symbol *>.
4044 * objfiles.c (objfile::objfile): Don't memset those fields.
4045 (objfile::~objfile): Don't free those fields.
4046 * psympriv.h (struct psymbol_allocation_list): Remove
4047 forward-declaration.
4048 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4049 to std::vector.
4050 (start_psymtab_common): Change parameters to std::vector.
4051 * psymtab.c: Include algorithm.
4052 (require_partial_symbols): Call shrink_to_fit.
4053 (find_pc_sect_psymbol): Adjust to vector change.
4054 (match_partial_symbol): Likewise.
4055 (lookup_partial_symbol): Likewise.
4056 (psym_relocate): Likewise.
4057 (dump_psymtab): Likewise.
4058 (recursively_search_psymtabs): Likewise.
4059 (compare_psymbols): Remove.
4060 (sort_pst_symbols): Adjust to vector change.
4061 (start_psymtab_common): Likewise.
4062 (end_psymtab_common): Likewise.
4063 (psymbol_bcache_full): De-constify return value.
4064 (add_psymbol_to_bcache): Likewise.
4065 (extend_psymbol_list): Remove.
4066 (append_psymbol_to_list): Adjust to vector change.
4067 (add_psymbol_to_list): Likewise.
4068 (init_psymbol_list): Likewise.
4069 (maintenance_info_psymtabs): Likewise.
4070 (maintenance_check_psymtabs): Likewise.
4071 * symfile.h (struct psymbol_allocation_list): Remove.
4072 * symfile.c (reread_symbols): Adjust to vector change.
4073 * dbxread.c (start_psymtab): Change type of parameters.
4074 (dbx_symfile_read): Adjust to vector change.
4075 (read_dbx_symtab): Likewise.
4076 (start_psymtab): Change type of parameters.
4077 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4078 (create_partial_symtab): Likewise.
4079 (add_partial_symbol): Likewise.
4080 (write_one_signatured_type): Likewise.
4081 (recursively_write_psymbols): Likewise.
4082 * mdebugread.c (parse_partial_symbols): Likewise.
4083 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4084 (scan_xcoff_symtab): Adjust to vector change.
4085 (xcoff_initial_scan): Likewise.
4086
3ec5942f
SM
40872017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4088
4089 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4090
2399fe6a
YQ
40912017-10-13 Yao Qi <yao.qi@linaro.org>
4092
4093 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4094 Remove s390x-*-expedite, add s390x-expedite.
4095
4bf3f4a8
YQ
40962017-10-13 Yao Qi <yao.qi@linaro.org>
4097
4098 * features/s390-gs-linux64.c: Regenerated.
4099 * features/s390x-gs-linux64.c: Regenerated.
4100
9e86da07
TT
41012017-10-13 Tom Tromey <tom@tromey.com>
4102
4103 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4104 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4105 delete.
4106 * symfile.c (symbol_file_add_with_addrs): Use new.
4107 (symbol_file_add_separate): Update comment.
4108 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4109 * jit.c (jit_object_close_impl): Use new.
4110 (jit_unregister_code): Use delete.
4111 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4112 (~objfile): Rename from free_objfile.
4113 (free_objfile_separate_debug, do_free_objfile_cleanup)
4114 (free_all_objfiles, objfile_purge_solibs): Use delete.
4115 * objfiles.h (struct objfile): Add constructor and destructor.
4116 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4117 (allocate_objfile, free_objfile): Don't declare.
4118 (struct objstats): Add initializers.
4119
c2508e90
SM
41202017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4121
4122 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4123 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4124 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4125 * gdbarch.h: Regenerate.
4126 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4127 Adjust comment.
4128 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4129 (i386_displaced_step_fixup): Adjust comment.
4130 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4131
a900ff72
TT
41322017-10-12 Tom Tromey <tom@tromey.com>
4133
4134 * prologue-value.h (pv_area::store_would_trash): Return bool.
4135 (pv_area::find_reg): Likewise.
4136 * prologue-value.c (pv_area::store_would_trash): Return bool.
4137 (pv_area::find_reg): Likewise.
4138
f7b7ed97
TT
41392017-10-12 Tom Tromey <tom@tromey.com>
4140
4141 * s390-linux-tdep.c (s390_store, s390_load)
4142 (s390_check_for_saved, s390_analyze_prologue): Update.
4143 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4144 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4145 * prologue-value.h (class pv_area): Move from prologue-value.c.
4146 Change names of members. Add constructor, destructor, member
4147 functions.
4148 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4149 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4150 (pv_area_fetch, pv_area_scan): Don't declare.
4151 * prologue-value.c (struct pv_area::area_entry): Now member of
4152 pv_area.
4153 (struct pv_area): Move to prologue-value.h.
4154 (pv_area::pv_area): Rename from make_pv_area.
4155 (pv_area::~pv_area): Rename from free_pv_area.
4156 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4157 (clear_entries, find_entry, overlaps, store_would_trash, store)
4158 (fetch, find_reg, scan): Now member of pv_area.
4159 Remove "area" argument. Update.
4160 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4161 Update.
4162 * mn10300-tdep.c (push_reg, check_for_saved)
4163 (mn10300_analyze_prologue): Update.
4164 * mep-tdep.c (is_arg_spill, check_for_saved)
4165 (mep_analyze_prologue): Update.
4166 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4167 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4168 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4169 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4170 Update.
4171 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4172 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4173
466eecee
SM
41742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4175
4176 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4177 * linux-nat.c (linux_nat_delete_thread): New variable.
4178 (lwp_free): Invoke linux_nat_delete_thread if set.
4179 (linux_nat_set_delete_thread): New function.
4180 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4181 thread delete callback.
4182 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4183 (_initialize_arm_linux_nat): Assign thread delete callback.
4184 * s390-linux-nat.c (s390_delete_thread): New function.
4185 (_initialize_s390_nat): Assign thread delete callback.
4186 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4187 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4188 function.
4189 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4190 declaration.
4191 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4192 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4193
f71c8822
TT
41942017-10-09 Tom Tromey <tom@tromey.com>
4195
4196 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4197 std::string.
4198 * tui/tui-layout.c (enum tui_status): Use std::string.
4199
981a3fb3
TT
42002017-10-11 Tom Tromey <tom@tromey.com>
4201
4202 * gdbthread.h (thread_command): Constify.
4203 * inferior.h (detach_command): Constify.
4204 * top.h (set_history, show_history): Constify.
4205 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4206 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4207 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4208 * printcmd.c (set_command): Constify.
4209 (non_const_set_command): New function.
4210 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4211 * breakpoint.c (enable_command, disable_command, delete_command)
4212 (catch_command, tcatch_command, set_breakpoint_cmd)
4213 (show_breakpoint_cmd): Constify.
4214 * macrocmd.c (macro_command): Constify.
4215 * infcmd.c (unset_command, kill_command, detach_command)
4216 (info_proc_cmd): Constify.
4217 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4218 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4219 (info_auto_load_cmd): Constify.
4220 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4221 (unset_tdesc_cmd): Constify.
4222 * ada-lang.c (set_ada_command, show_ada_command)
4223 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4224 * guile/guile.c (set_guile_command, show_guile_command)
4225 (info_guile_command): Constify.
4226 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4227 Constify.
4228 * skip.c (skip_command): Constify.
4229 * compile/compile.c (_initialize_compile): Constify.
4230 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4231 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4232 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4233 (maint_btrace_pt_show_cmd): Constify.
4234 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4235 Constify.
4236 * python/python.c (user_show_python, user_set_python): Constify.
4237 * mips-tdep.c (set_mips_command, show_mips_command)
4238 (set_mipsfpu_command): Constify.
4239 * record-btrace.c (cmd_record_btrace_start)
4240 (cmd_set_record_btrace, cmd_show_record_btrace)
4241 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4242 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4243 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4244 Constify.
4245 * symfile.c (overlay_command): Constify.
4246 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4247 * cli/cli-logging.c (set_logging_command, show_logging_command):
4248 Constify.
4249 * cli/cli-dump.c (dump_command, append_command)
4250 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4251 (tekhex_dump_command, binary_dump_command)
4252 (binary_append_command): Constify.
4253 * cli/cli-decode.c (struct cmd_list_element): Change type of
4254 "fun".
4255 * cli/cli-cmds.c (info_command, show_command, set_debug)
4256 (show_debug): Constify.
4257 (show_command): Add non-const overload.
4258 * top.c (set_history, show_history): Constify.
4259 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4260 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4261 * target.c (target_command): Constify.
4262 * sparc64-tdep.c (info_adi_command): Constify.
4263 * record-full.c (cmd_record_full_start): Constify.
4264 (set_record_full_command): Constify. Fix typo.
4265 (show_record_full_command): Constify.
4266 * thread.c (thread_command, thread_apply_command): Constify.
4267 * memattr.c (dummy_cmd): Constify.
4268 * value.c (function_command): Constify.
4269 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4270 * probe.c (info_probes_command): Constify.
4271 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4272 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4273 (show_thread_cmd, set_thread_default_cmd)
4274 (show_thread_default_cmd): Constify.
4275 (check_empty): Constify.
4276 * tracepoint.c (tfind_command): Constify.
4277 * cp-support.c (maint_cplus_command): Constify.
4278 * windows-tdep.c (info_w32_command): Constify.
4279 * record.c (cmd_record_start, set_record_command)
4280 (show_record_command, info_record_command, cmd_record_goto):
4281 Constify.
4282 * ravenscar-thread.c (set_ravenscar_command)
4283 (show_ravenscar_command): Constify.
4284 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4285 Constify.
4286 (add_internal_problem_command): Remove casts.
4287 * arc-tdep.c (maintenance_print_arc_command): Constify.
4288 * valprint.c (set_print, show_print, set_print_raw)
4289 (show_print_raw): Constify.
4290 * maint.c (maintenance_command, maintenance_info_command)
4291 (maintenance_print_command, maintenance_set_cmd)
4292 (maintenance_show_cmd, set_per_command_cmd)
4293 (show_per_command_cmd, maintenance_check_command): Constify.
4294 * language.c (set_check, show_check): Constify.
4295 * typeprint.c (show_print_type, set_print_type): Constify.
4296 * go32-nat.c (go32_info_dos_command): Constify.
4297
fdf44873
TT
42982017-10-11 Tom Tromey <tom@tromey.com>
4299
4300 * breakpoint.c (prepare_re_set_context): Remove.
4301 (breakpoint_re_set_one): Update. Don't use cleanups.
4302 (breakpoint_re_set): Use scoped_restore, std::string, and
4303 scoped_restore_current_language.
4304
81b1e71c
TT
43052017-10-11 Tom Tromey <tom@tromey.com>
4306
4307 * breakpoint.c (commands_command_1): Use std::string.
4308 (cleanup_executing_breakpoints): Remove.
4309 (bpstat_do_actions_1): Use scoped_restore.
4310 (bpstat_check_watchpoint): Use std::string.
4311 (decode_static_tracepoint_spec): Likewise.
4312 (break_range_command): Likewise.
4313 (watch_command_1): Likewise.
4314 (compare_breakpoints): Change argument types.
4315 (clear_command): Use std::vector.
4316 (cleanup_executing_breakpoints): Remove.
4317 (update_global_location_list): Use unique_xmalloc_ptr.
4318 (strace_command): Remove unused declaration.
4319
4f9d9906
JB
43202017-10-11 John Baldwin <jhb@FreeBSD.org>
4321
4322 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4323 * NEWS: Mention new FreeBSD/arm native configuration.
4324 * configure.host: Add arm*-*-freebsd*.
4325 * configure.nat: Likewise.
4326 * arm-fbsd-nat.c: New file.
4327
7176dfd2
JB
43282017-10-11 John Baldwin <jhb@FreeBSD.org>
4329
4330 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4331 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4332 * NEWS: Mention new FreeBSD/arm target.
4333 * configure.tgt: Add arm*-*-freebsd*.
4334 * arm-fbsd-tdep.c: New file.
4335 * arm-fbsd-tdep.h: New file.
4336
fe220226
MR
43372017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4338
4339 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4340 `gdbarch_elfcore_write_linux_prpsinfo'.
4341 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4342 method.
4343 (elf_internal_linux_prpsinfo): Remove declaration.
4344 * gdbarch.h: Regenerate.
4345 * gdbarch.c: Regenerate.
4346
a2f63b2e
MR
43472017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4348
4349 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4350 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4351
458ca1d0
PA
43522017-10-11 Pedro Alves <palves@redhat.com>
4353
4354 * breakpoint.c (reattach_breakpoints): Delete.
4355 * breakpoint.h (reattach_breakpoints): Delete.
4356
905014d7
SM
43572017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4358
4359 * symfile.c (registered_sym_fns): Make struct, not typedef.
4360 (DEF_VEC_O (registered_sym_fns)): Remove.
4361 (symtab_fns): Change type to std::vector.
4362 (add_symtab_fns): Adjust.
4363 (find_sym_fns): Adjust.
4364
56d704da
AK
43652017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4366
4367 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4368 * arc-tdep.h (arc_arch_is_em): New function.
4369 (arc_arch_is_hs): Likewise.
4370
7fa29be9
EB
43712017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4372
4373 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4374 parentheses in the declaration.
4375 (macro_lookup_inclusion): Likewise.
4376 (macro_lookup_definition): Likewise.
4377 * p-lang.h (pascal_builtin_types): Likewise.
4378 * tui/tui-data.c (tui_win_list): Likewise.
4379 * tui/tui-data.h (tui_win_list): Likewise.
4380 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4381
d9b477e3
KB
43822017-10-11 Mark Rages <markrages@gmail.com>
4383
4384 * target-memory.c (block_boundaries): Fix for block address not
4385 aligned on block size.
4386
65630365
PA
43872017-10-10 Pedro Alves <palves@redhat.com>
4388 Tom Tromey <tom@tromey.com>
4389
4390 * breakpoint.c (struct captured_breakpoint_query_args)
4391 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4392 (print_breakpoint): New.
4393 * breakpoint.h (print_breakpoint): Declare.
4394 * common/common-exceptions.h (enum return_reason): Remove
4395 references to catch_exceptions.
4396 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4397 Delete.
4398 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4399 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4400 * gdb.h: Delete.
4401 * gdbthread.h (thread_select): Declare.
4402 * mi/mi-cmd-break.c: Don't include gdb.h.
4403 (breakpoint_notify): Use print_breakpoint.
4404 * mi/mi-cmd-catch.c: Don't include gdb.h.
4405 * mi/mi-interp.c: Don't include gdb.h.
4406 (mi_print_breakpoint_for_event): New.
4407 (mi_breakpoint_created, mi_breakpoint_modified): Use
4408 mi_print_breakpoint_for_event.
4409 * mi/mi-main.c: Don't include gdb.h.
4410 (mi_cmd_thread_select): Parse the global thread ID here. Use
4411 thread_select instead of gdb_thread_select.
4412 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4413 of using gdb_list_thread_ids.
4414 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4415 FILEIO_ENOSYS here.
4416 (remote_fileio_request): Use TRY/CATCH instead of
4417 catch_exceptions.
4418 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4419 (symbol_file_add_from_memory_wrapper): Delete.
4420 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4421 * thread.c: Don't include gdb.h.
4422 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4423 (thread_alive): Use thread_select.
4424 (do_captured_thread_select): Delete, parts salvaged as ...
4425 (thread_select): ... this new function.
4426 (gdb_thread_select): Delete.
4427
bf469271
PA
44282017-10-10 Pedro Alves <palves@redhat.com>
4429 Tom Tromey <tom@tromey.com>
4430
4431 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4432 and reverse logic.
4433 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4434 No longer macros. Instead ...
4435 (enum wp_check_result): They're now values of this new
4436 enumeration.
4437 (watchpoint_check): Change return type to wp_check_result and
4438 parameter type to bpstat.
4439 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4440 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4441 catch_errors. Reverse logic of watchpoint_check call.
4442 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4443 pointer as parameter.
4444 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4445 * common/common-exceptions.c (throw_exception_sjlj): Update
4446 comments to avoid mentioning catch_errors.
4447 * exceptions.c (catch_errors): Delete.
4448 * exceptions.h: Update comments to avoid mentioning catch_errors.
4449 (catch_errors_ftype, catch_errors): Delete.
4450 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4451 (hook_stop_stub): Delete.
4452 (restore_selected_frame): Change return type to void, and
4453 parameter type to const frame_id &.
4454 (restore_infcall_control_state): Use TRY/CATCH instead of
4455 catch_errors.
4456 * main.c (captured_command_loop): Return void and remove
4457 parameter. Remove references to catch_errors.
4458 (captured_main): Use TRY/CATCH instead of catch_errors.
4459 * objc-lang.c (objc_submethod_helper_data)
4460 (find_objc_msgcall_submethod_helper): Delete.
4461 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4462 catch_errors.
4463 * record-full.c (record_full_message): Return void.
4464 (record_full_message_args, record_full_message_wrapper): Delete.
4465 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4466 instead of catch_errors.
4467 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4468 parameter type to int.
4469 * solib-darwin.c (open_symbol_file_object): Ditto.
4470 * solib-dsbt.c (open_symbol_file_object): Ditto.
4471 * solib-frv.c (open_symbol_file_object): Ditto.
4472 * solib-svr4.c (open_symbol_file_object): Ditto.
4473 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4474 * solib.c (update_solib_list): Use TRY/CATCH instead of
4475 catch_errors.
4476 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4477 Change type.
4478 * symmisc.c (struct print_symbol_args): Remove.
4479 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4480 (print_symbol): Change type.
4481 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4482 and remove parameters.
4483 (catch_errors): New.
4484 (get_windows_debug_event): Adjust.
4485
1a56bfa5
TT
44862017-10-09 Tom Tromey <tom@tromey.com>
4487
4488 * mi/mi-main.c (free_splay_tree): Remove.
4489 (list_available_thread_groups): Use splay_tree_up.
4490 * common/gdb_splay_tree.h: New file.
4491
0c478e2d
TT
44922017-10-09 Tom Tromey <tom@tromey.com>
4493
4494 * mi/mi-main.c (do_nothing): Remove.
4495 (list_available_thread_groups): Update.
4496
cbd2b4e3
PA
44972017-10-09 Pedro Alves <palves@redhat.com>
4498
4499 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4500 reading registers when switching context.
4501
a181c0bf
JB
45022017-10-09 John Baldwin <jhb@FreeBSD.org>
4503
4504 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4505 (fbsd_convert_siginfo): Likewise.
4506 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4507
6e66f753
SM
45082017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4509
4510 * configure.ac (try_guile_versions): Remove guile-2.2.
4511 * configure: Regenerate.
4512
890e9790
TT
45132017-10-09 Tom Tromey <tom@tromey.com>
4514
4515 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4516 (COMPILE.pre): Use $(CXX).
4517
109483d9
PA
45182017-10-09 Pedro Alves <palves@redhat.com>
4519
4520 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4521 Use bool.
4522 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4523 * cp-support.h (cp_remove_params): Now returns a
4524 gdb::unique_xmalloc_ptr.
4525 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4526 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4527 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4528 returning a gdb::unique_xmalloc_ptr.
4529 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4530 * stack.c (find_frame_funname): Adjust to cp_remove_params
4531 returning a gdb::unique_xmalloc_ptr.
4532
791afaa2
TT
45332017-10-08 Tom Tromey <tom@tromey.com>
4534
4535 * dwarf2read.c (dwarf2_get_dwz_file): Use
4536 gdb::unique_xmalloc_ptr.
4537 (find_slot_in_mapped_hash): Likewise.
4538 (dwarf2_physname): Likewise.
4539 (create_dwo_unit_in_dwp_v1): Use std::string.
4540 (create_dwo_unit_in_dwp_v2): Likewise.
4541 (lookup_dwo_cutu): Likewise.
4542 (inherit_abstract_dies): Use std::vector.
4543 (read_array_type): Likewise.
4544 (dwarf_decode_macros): Remove unused declaration.
4545 (unsigned_int_compar): Remove.
4546 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4547 (psymtabs_addrmap_cleanup): Remove.
4548
30a9c02f
TT
45492017-10-08 Tom Tromey <tom@tromey.com>
4550
4551 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4552 * frame.h (frame_cleanup_after_sniffer): Declare.
4553 (frame_prepare_for_sniffer): Return void.
4554 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4555 type of argument.
4556 (frame_prepare_for_sniffer): Return void.
4557
757325a3
TT
45582017-10-08 Tom Tromey <tom@tromey.com>
4559
4560 * utils.h (make_cleanup_value_free): Remove.
4561 * utils.c (do_value_free, struct cleanup): Remove.
4562 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4563 Use gdb_value_up.
4564 * value.h (struct value_deleter): New.
4565 (gdb_value_up): New typedef.
4566
b9c04fb2
TT
45672017-10-08 Tom Tromey <tom@tromey.com>
4568
4569 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4570 (make_cleanup_free_search_symbols): Remove.
4571 (search_symbols): Return std::vector.
4572 (symbol_search::compare_search_syms): Now member of
4573 symbol_search. Change arguments.
4574 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4575 (symtab_symbol_info, rbreak_command): Update.
4576 * symtab.h (struct symbol_search) <next>: Remove.
4577 Add constructors.
4578 (symbol_search::operator<): New function.
4579 (symbol_search::operator==): New function.
4580 (search_symbols): Remove std::vector.
4581 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4582 (symbol_search::compare_search_syms): Declare.
4583
0d28b0a5
YQ
45842017-10-06 Yao Qi <yao.qi@linaro.org>
4585
4586 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4587 arch/aarch64-insn.o.
4588 Remove one rule.
4589 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4590
71917808
YQ
45912017-10-06 Yao Qi <yao.qi@linaro.org>
4592
4593 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4594 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4595 arch/arm-linux.o respectively.
4596 * configure.tgt: Likewise.
4597
2081b2b2
YQ
45982017-10-06 Yao Qi <yao.qi@linaro.org>
4599
4600 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4601 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4602
a1b85d28
PA
46032017-10-06 Pedro Alves <palves@redhat.com>
4604
4605 * windows-nat.c: Include <algorithm>.
4606
d97987e2
YQ
46072017-10-06 Yao Qi <yao.qi@linaro.org>
4608
4609 * configure.tgt (i386_tobjs): New variable.
4610 (amd64_tobjs): New variable.
4611 Set $cpu_obs and $os_obs.
4612
f38307f5
YQ
46132017-10-06 Yao Qi <yao.qi@linaro.org>
4614
4615 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4616 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4617 (clean): Remove object files and dependency files.
4618 (distclean): Remove the directory.
4619 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4620 * configure: Re-generated.
4621 * configure.tgt: Replace amd64.o with arch/amd64.o.
4622
2f924de6
JM
46232017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4624
4625 PR build/22188
4626 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4627 and SETEND.
4628
2fd9d7ca
PA
46292017-10-05 Pedro Alves <palves@redhat.com>
4630
4631 * linux-nat.c (linux_child_follow_fork): When following the parent
4632 and detaching the child, consult the parent thread's architecture
4633 instead of the child's.
4634
d13b8493
UW
46352017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4636
4637 * ax.h: Do not include "doublest.h".
4638 (union agent_val): Remove.
4639
3b4b2f16
UW
46402017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4641
4642 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4643 (decimal_to_string): Return std::string object.
4644 (decimal_from_string): Accept std::string object. Return bool.
4645 (decimal_from_integral, decimal_from_doublest): Remove.
4646 (decimal_from_longest): Add prototype.
4647 (decimal_from_ulongest): Likewise.
4648 (decimal_to_longest): Likewise.
4649 (decimal_from_doublest): Likewise.
4650 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4651 (MAX_DECIMAL_STRING): Move here.
4652 (decimal_to_string): Return std::string object.
4653 (decimal_from_string): Accept std::string object. Return bool.
4654 (decimal_from_integral): Remove, replace by ...
4655 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4656 (decimal_to_longest): New function.
4657 (decimal_from_floating): Remove, replace by ...
4658 (decimal_from_doublest): ... this new function.
4659 (decimal_to_doublest): Update to new decimal_to_string interface.
4660
4661 * value.c (unpack_long): Use decimal_to_longest.
4662 * valops.c (value_cast): Use decimal_from_doublest instead of
4663 decimal_from_floating. Use decimal_from_[u]longest isntead of
4664 decimal_from_integral.
4665 * valarith.c (value_args_as_decimal): Likewise.
4666 * valprint.c (print_decimal_floating): Update to new
4667 decimal_to_string interface.
4668 * printcmd.c (printf_decfloat): Likewise.
4669 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4670
1841ee5d
UW
46712017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4672
4673 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4674 * gdbtypes.c: Include "floatformat.h".
4675 * value.c: Likewise.
4676 * m68k-tdep.c: Likewise.
4677
4678 * findvar.c: Do not include "floatformat.h".
4679 * amd64-darwin-tdep.c: Likewise.
4680 * arm-linux-tdep.c: Likewise.
4681 * i386-darwin-tdep.c: Likewise.
4682 * i387-tdep.c: Likewise.
4683 * m68k-linux-tdep.c: Likewise.
4684 * mep-tdep.c: Likewise.
4685 * mips-tdep.c: Likewise.
4686 * nios2-tdep.c: Likewise.
4687 * s390-linux-tdep.c: Likewise.
4688 * sparc-obsd-tdep.c: Likewise.
4689 * sparc-tdep.c: Likewise.
4690 * sparc64-tdep.c: Likewise.
4691 * spu-tdep.c: Likewise.
4692 * tic6x-tdep.c: Likewise.
4693 * tilegx-tdep.c: Likewise.
4694 * vax-tdep.c: Likewise.
4695 * xstormy16-tdep.c: Likewise.
4696 * xtensa-tdep.c: Likewise.
4697
4698 * top.c: Do not include "doublest.h".
4699 * aarch64-tdep.c: Likewise.
4700 * alpha-tdep.c: Likewise.
4701 * arm-linux-tdep.c: Likewise.
4702 * m68k-linux-tdep.c: Likewise.
4703 * tilegx-tdep.c: Likewise.
4704 * xstormy16-tdep.c: Likewise.
4705
a80a6471
JB
47062017-10-05 John Baldwin <jhb@FreeBSD.org>
4707
4708 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4709 (mipsn32_fbsd_sigframe): Define.
4710 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4711 for FreeBSD/mipsn32.
4712
12c4bd7f
JB
47132017-10-05 John Baldwin <jhb@FreeBSD.org>
4714
4715 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4716 AT_HWCAP.
4717
c91933e9
TG
47182017-10-05 Tristan Gingold <tgingold@free.fr>
4719
4720 * MAINTAINERS (Misc): Update my email address.
4721
5cd63fda
PA
47222017-10-04 Pedro Alves <palves@redhat.com>
4723
4724 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4725 it instead of target_gdbarch.
4726 (get_remote_state, get_remote_packet_size): Adjust
4727 get_remote_arch_state calls, passing down target_gdbarch
4728 explicitly.
4729 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4730 'gdbarch' and use it instead of target_gdbarch.
4731 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4732 passing down target_gdbarch explicitly.
4733 (struct stop_reply) <arch>: New field.
4734 (remote_parse_stop_reply): Use the stopped thread's architecture,
4735 not the current inferior's. Save the architecture in the
4736 stop_reply.
4737 (process_stop_reply): Use the stop reply's architecture.
4738 (process_g_packet, remote_fetch_registers)
4739 (remote_prepare_to_store, store_registers_using_G)
4740 (remote_store_registers): Adjust get_remote_arch_state calls,
4741 using the regcache's architecture.
4742 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4743 passing down target_gdbarch explicitly.
4744 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4745 beneath instead of calling target_gdbarch.
4746 * target.c (default_thread_architecture): Use the specified
4747 inferior's architecture, instead of the current inferior's
4748 architecture (via target_gdbarch).
4749
ed4227b7
PA
47502017-10-04 Pedro Alves <palves@redhat.com>
4751
4752 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4753 case.
4754 (regcache_print): Handle !target_has_registers here instead.
4755
55b11ddf
PA
47562017-10-04 Pedro Alves <palves@redhat.com>
4757
4758 * frame.c (create_test_frame): Delete.
4759 * frame.h (create_test_frame): Delete.
4760 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4761 (class regcache_test): Delete.
4762 (test_target_has_registers, test_target_has_stack)
4763 (test_target_has_memory, test_target_prepare_to_store)
4764 (test_target_store_registers): New functions.
4765 (test_target_ops): New class.
4766 (register_to_value_test): Error out if there's already a
4767 process_stratum (or higher) target pushed. Create a fuller mock
4768 environment, with mock target_ops, inferior, address space, thread
4769 and inferior_ptid.
4770 * progspace.c (struct address_space): Move to ...
4771 * progspace.h (struct address_space): ... here.
4772 * regcache.h (regcache::~regcache, regcache::raw_write)
4773 [GDB_SELF_TEST]: No longer virtual.
4774
4c71c105
SM
47752017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4776
4777 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4778
73dcd72d
PA
47792017-10-04 Pedro Alves <palves@redhat.com>
4780
4781 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4782 out of 'between TRY and CATCH'.
4783
44704526
PA
47842017-10-04 Pedro Alves <palves@redhat.com>
4785
4786 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4787 * common/common-exceptions.h (TRY): Open an outermost scope.
4788 Expand intro comment.
4789 (CATCH): Reindent.
4790 (END_CATCH): Close the outermost scope.
4791 * completer.c (complete_line_internal): Add missing END_CATCH.
4792
bc3b087d
SDJ
47932017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4794
4795 * NEWS (Changes since GDB 8.0): Add entry about new
4796 'set-cwd-on-gdbserver' feature.
4797 (New remote packets): Add entry for QSetWorkingDir.
4798 * common/common-inferior.h (set_inferior_cwd): New prototype.
4799 * infcmd.c (set_inferior_cwd): Remove "static".
4800 (show_cwd_command): Expand text to include remote debugging.
4801 * remote.c: Add PACKET_QSetWorkingDir.
4802 (remote_protocol_features) <QSetWorkingDir>: New entry for
4803 PACKET_QSetWorkingDir.
4804 (extended_remote_set_inferior_cwd): New function.
4805 (extended_remote_create_inferior): Call
4806 "extended_remote_set_inferior_cwd".
4807 (_initialize_remote): Call "add_packet_config_cmd" for
4808 QSetWorkingDir.
4809
d092c5a2
SDJ
48102017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4811
4812 * NEWS (New commands): Mention "set/show cwd".
4813 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4814 "cd" command's help text.
4815 * common/common-inferior.h (get_inferior_cwd): New prototype.
4816 * infcmd.c (inferior_cwd_scratch): New global variable.
4817 (set_inferior_cwd): New function.
4818 (get_inferior_cwd): Likewise.
4819 (set_cwd_command): Likewise.
4820 (show_cwd_command): Likewise.
4821 (_initialize_infcmd): Add "set/show cwd" commands.
4822 * inferior.h (class inferior) <cwd>: New field.
4823 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4824 (fork_inferior): Change inferior's cwd before its execution.
4825 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4826 to CreateProcess.
4827
7da0a886
SDJ
48282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4829
4830 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4831 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4832 (COMMON_OBS): Add gdb_tilde_expand.o.
4833 * common/gdb_tilde_expand.c: New file.
4834 * common/gdb_tilde_expand.h: Likewise.
4835
db8dd160
MR
48362017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4837
4838 * gdbarch.sh (objfile): Remove duplicate declaration.
4839 * gdbarch.h: Regenerate.
4840
f8bfbf22
TT
48412017-10-03 Tom Tromey <tom@tromey.com>
4842
4843 * utils.c (internal_vproblem): Use string_vprintf.
4844
5178ed48
TT
48452017-10-03 Tom Tromey <tom@tromey.com>
4846
4847 * printcmd.c (info_symbol_command): Use std::string.
4848
8cff8730
TT
48492017-10-03 Tom Tromey <tom@tromey.com>
4850
4851 * top.c (gdb_safe_append_history): Use std::string.
4852
895b8f30
TT
48532017-10-03 Tom Tromey <tom@tromey.com>
4854
4855 * event-top.c (stdin_event_handler): Update.
4856 * main.c (captured_main_1): Update.
4857 * top.h (make_delete_ui_cleanup): Remove.
4858 (struct ui): Add constructor and destructor.
4859 (new_ui, delete_ui): Remove.
4860 * top.c (make_delete_ui_cleanup): Remove.
4861 (new_ui_command): Use std::unique_ptr.
4862 (delete_ui_cleanup): Remove.
4863 (ui::ui): Rename from new_ui. Update.
4864 (free_ui): Remove.
4865 (ui::~ui): Rename from delete_ui. Update.
4866
0efef640
TT
48672017-10-03 Tom Tromey <tom@tromey.com>
4868
4869 * symfile.c (load_progress): Use gdb::byte_vector.
4870
245ad7d3
TT
48712017-10-03 Tom Tromey <tom@tromey.com>
4872
4873 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4874 declaration.
4875 * printcmd.c (x_command): Remove unused declaration.
4876 * symfile.c (symbol_file_command): Remove unused declaration.
4877
e05550d7
TT
48782017-10-03 Tom Tromey <tom@tromey.com>
4879
4880 * utils.c (internal_vproblem): Use std::string.
4881 (defaulted_query): Likewise.
4882
b95de2b7
TT
48832017-10-03 Tom Tromey <tom@tromey.com>
4884
4885 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4886 * top.c (execute_command_to_string): Update.
4887 * utils.c (make_cleanup_restore_page_info): Remove.
4888 (do_restore_page_info_cleanup): Remove.
4889 (set_batch_flag_and_restore_page_info):
4890 New.
4891 (make_cleanup_restore_page_info): Remove.
4892 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4893 (~set_batch_flag_and_restore_page_info): New
4894 (make_cleanup_restore_uinteger): Remove.
4895 (make_cleanup_restore_integer): Remove.
4896 (struct restore_integer_closure): Remove.
4897 (restore_integer): Remove.
4898 * utils.h (struct set_batch_flag_and_restore_page_info): New
4899 class.
4900 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4901 (make_cleanup_restore_page_info): Remove.
4902 (make_cleanup_restore_uinteger) Remove.
4903 (make_cleanup_restore_integer) Remove.
4904
07036511
TT
49052017-10-03 Tom Tromey <tom@tromey.com>
4906
4907 * record-full.h (record_full_gdb_operation_disable_set): Return
4908 scoped_restore_tmpl<int>.
4909 * infrun.c (adjust_pc_after_break): Update.
4910 (handle_signal_stop): Update.
4911 * record-full.c (record_full_gdb_operation_disable_set): Return
4912 scoped_restore_tmpl<int>.
4913 (record_full_wait_1, record_full_insert_breakpoint)
4914 (record_full_remove_breakpoint, record_full_save)
4915 (record_full_goto_insn): Update.
4916
45320ffa
TT
49172017-10-02 Tom Tromey <tom@tromey.com>
4918
4919 PR rust/22236:
4920 * rust-lang.c (rust_val_print_str): New function.
4921 (val_print_struct): Call it.
4922 (rust_subscript): Preserve name of slice type.
4923
b3e3859b
TT
49242017-10-02 Tom Tromey <tom@tromey.com>
4925
4926 * rust-lang.c (rust_subscript): Handle slices in
4927 EVAL_AVOID_SIDE_EFFECTS case.
4928
01af5e0d
TT
49292017-10-02 Tom Tromey <tom@tromey.com>
4930
4931 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4932
888e3ddb
TT
49332017-10-02 Tom Tromey <tom@tromey.com>
4934
4935 * rust-lang.h (rust_slice_type): Add "extern".
4936
cc536b21
PA
49372017-10-02 Tom Tromey <tom@tromey.com>
4938 Pedro Alves <palves@redhat.com>
4939
4940 * ada-lang.h (ada_exc_info::operator<): Make const.
4941 (ada_exc_info::operator==): Make const.
4942 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4943 Make const.
4944
386c8614
TT
49452017-09-29 Tom Tromey <tom@tromey.com>
4946
4947 * target.c (read_whatever_is_readable): Change type of "result".
4948 Update.
4949 (free_memory_read_result_vector): Remove.
4950 (read_memory_robust): Change return type. Update.
4951 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4952 bin2hex, std::string.
4953 * target.h (memory_read_result_s): Remove typedef.
4954 (free_memory_read_result_vector): Remove.
4955 (read_memory_robust): Return std::vector.
4956
789c4b5e
TT
49572017-09-29 Tom Tromey <tom@tromey.com>
4958
4959 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4960
ab816a27
TT
49612017-09-29 Tom Tromey <tom@tromey.com>
4962
4963 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4964 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4965 operator< and operator==.
4966 (ada_exceptions_list): Return a std::vector.
4967 * ada-lang.c (ada_exc_info::operator<): Rename from
4968 compare_ada_exception_info.
4969 (ada_exc_info::operator==): New.
4970 (sort_remove_dups_ada_exceptions_list): Change type of
4971 "exceptions".
4972 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4973 (ada_add_global_exceptions): Likewise.
4974 (ada_exceptions_list_1): Return a std::vector.
4975 (ada_exceptions_list): Likewise.
4976
52f9abe4
TT
49772017-09-29 Tom Tromey <tom@tromey.com>
4978
4979 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4980 'std::set *'.
4981 (print_one_inferior): Update.
4982 (free_vector_of_ints): Remove.
4983 (list_available_thread_groups): Change "ids" to std::set.
4984 (mi_cmd_list_thread_groups): Update.
4985 (struct collect_cores_data) <core>: Now a std::set.
4986 (collect_cores): Update.
4987 (unique): Remove.
4988 (print_one_inferior): Update.
4989
dcd5ddcc
TT
49902017-09-29 Tom Tromey <tom@tromey.com>
4991
4992 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4993 (mi_execute_async_cli_command): Likewise.
4994 (mi_cmd_trace_frame_collected): Use field_fmt.
4995
45d288cc
TT
49962017-09-29 Tom Tromey <tom@tromey.com>
4997
4998 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4999 gdb::byte_vector.
5000
6afe2f4a
TT
50012017-09-29 Tom Tromey <tom@tromey.com>
5002
5003 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5004
9813429a
TT
50052017-09-29 Tom Tromey <tom@tromey.com>
5006
5007 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5008
2d6960b4
TT
50092017-09-29 Tom Tromey <tom@tromey.com>
5010
5011 * varobj.h (varobj_gen_name): Return std::string.
5012 * varobj.c (varobj_gen_name): Return std::string.
5013 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5014 (mi_cmd_var_delete): Don't copy "name".
5015
784c453a
TT
50162017-09-29 Tom Tromey <tom@tromey.com>
5017
5018 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5019 (mi_cmd_break_insert_1): Update.
5020
a9bc57b9
TT
50212017-09-29 Tom Tromey <tom@tromey.com>
5022
5023 * target.h (make_scoped_defer_target_commit_resume): Update.
5024 * target.c (make_scoped_defer_target_commit_resume): Rename from
5025 make_cleanup_defer_target_commit_resume. Return a
5026 scoped_restore.
5027 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5028
9754d8c4
TT
50292017-09-29 Tom Tromey <tom@tromey.com>
5030
5031 * main.c (captured_main_1): Remove unused declaration.
5032 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5033
99ef965c
TT
50342017-09-29 Tom Tromey <tom@tromey.com>
5035
5036 * symtab.c (search_symbols): Remove unused outer cleanup.
5037 (make_source_files_completion_list): Remove unused declaration.
5038
42518ba7
TT
50392017-09-29 Tom Tromey <tom@tromey.com>
5040
5041 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5042
726b2169
TT
50432017-09-29 Tom Tromey <tom@tromey.com>
5044
5045 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5046 gdb::byte_vector.
5047
55b06432
TT
50482017-09-29 Tom Tromey <tom@tromey.com>
5049
5050 * complaints.c (vcomplaint): Use std::string.
5051
8abcee91
TT
50522017-09-29 Tom Tromey <tom@tromey.com>
5053
5054 * tracepoint.c (trace_variable_command): Use std::string.
5055 (encode_actions_1): Remove unused declarations.
5056 (create_tsv_from_upload): Use std::string.
5057
6ad94bc7
TT
50582017-09-29 Tom Tromey <tom@tromey.com>
5059
5060 * cp-support.c (gdb_demangle): Use std::string.
5061
2003f3d8
TT
50622017-09-29 Tom Tromey <tom@tromey.com>
5063
5064 * stack.c (parse_frame_specification): Use std::string
5065 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5066
8f8accb5
TT
50672017-09-29 Tom Tromey <tom@tromey.com>
5068
5069 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5070
200aa7b1
TT
50712017-09-29 Tom Tromey <tom@tromey.com>
5072
5073 * utils.c (vfprintf_maybe_filtered): Use std::string.
5074 (vfprintf_unfiltered): Likewise.
5075
606aae8a
TT
50762017-09-29 Tom Tromey <tom@tromey.com>
5077
5078 * event-top.c (top_level_prompt): Return std::string.
5079 (display_gdb_prompt): Update.
5080
bd413795
TT
50812017-09-29 Tom Tromey <tom@tromey.com>
5082
5083 * unittests/common-utils-selftests.c (format): New function.
5084 (string_vprintf_tests): New function.
5085 (_initialize_common_utils_selftests): Register new tests.
5086 * common/common-utils.c (string_vprintf): New function.
5087 * common/common-utils.h (string_vprintf): Declare.
5088
256642e8
PA
50892017-09-29 Pedro Alves <palves@redhat.com>
5090
5091 * common/rsp-low.c (unpack_varlen_hex): Constify.
5092 * common/rsp-low.h (unpack_varlen_hex): Constify.
5093 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5094 Constify.
5095 * remote.c (remote_set_permissions, read_ptid)
5096 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5097 (remote_static_tracepoint_marker_at)
5098 (remote_static_tracepoint_markers_by_strid)
5099 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5100 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5101 (parse_tracepoint_definition, parse_tsv_definition)
5102 (parse_static_tracepoint_marker_definition): Constify.
5103 * tracepoint.h (parse_static_tracepoint_marker_definition)
5104 (parse_trace_status, parse_tracepoint_status)
5105 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5106
b6bb3468
PA
51072017-09-29 Pedro Alves <palves@redhat.com>
5108
5109 * remote.c (target_buf, target_buf_size): Delete.
5110 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5111 Use the connection's packet buffer instead.
5112 All callers adjusted.
5113 (_initialize_remote): Remove references to target_buf and
5114 target_buf_size.
5115
b2f8eb7a
PA
51162017-09-28 Pedro Alves <palves@redhat.com>
5117
5118 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5119 unittests/common-utils-selftests.c.
5120 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5121 (COMMON_OBS): Remove utils-selftests.o.
5122 * utils-selftests.c: Move to ...
5123 * unittests/common-utils-selftests.c: ... here and rename self
5124 test to "string_printf".
5125
08302ed2
DE
51262017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5127
5128 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5129 having NULL cus or tus.
5130
96a5a1d3
UW
51312017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5132
5133 * arm-tdep.c: (convert_from_extended): Remove.
5134 (convert_to_extended): Likewise.
5135 (arm_extract_return_value): Use convert_typed_floating.
5136 (arm_store_return_value): Likewise.
5137
5138 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5139 * sh-tdep.c: Do not include "floatformat.h".
5140 (sh_littlebyte_bigword_type): New function.
5141 (sh_register_convert_to_virtual): Use convert_typed_floating.
5142 (sh_register_convert_to_raw): Likewise.
5143 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5144 (sh64_littlebyte_bigword_type): New function.
5145 (sh64_extract_return_value): Use convert_typed_floating.
5146 (sh64_register_convert_to_virtual): Likewise.
5147 (sh64_register_convert_to_raw): Likewise.
5148
0db7851f
UW
51492017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5150
5151 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5152 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5153
5154 * gdbtypes.h (union type_specific): Make field floatformat hold
5155 just a single struct floatformat, not an array.
5156 (floatformat_from_type): Move here.
5157 * gdbtypes.c (floatformat_from_type): Move here. Update to
5158 changed TYPE_FLOATFORMAT definition.
5159 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5160 (recursive_dump_type): Likewise.
5161 (init_float_type): Install correct floatformat for byte order.
5162 (arch_float_type): Likewise.
5163
77b7c781
UW
51642017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5165
5166 * gdbtypes.c (init_type): Change incoming argument from
5167 length-in-bytes to length-in-bits. Assert length is a
5168 multiple of TARGET_CHAR_BITS.
5169 (arch_type, arch_flags_type): Likewise.
5170 (init_integer_type): Update call to init_type.
5171 (init_character_type): Likewise.
5172 (init_boolean_type): Likewise.
5173 (init_float_type): Likewise.
5174 (init_decfloat_type): Likewise.
5175 (init_complex_type): Likewise.
5176 (init_pointer_type): Likewise.
5177 (objfile_type): Likewise.
5178 (arch_integer_type): Update call to arch_type.
5179 (arch_character_type): Likewise.
5180 (arch_boolean_type): Likewise.
5181 (arch_float_type): Likewise.
5182 (arch_decfloat_type): Likewise.
5183 (arch_complex_type): Likewise.
5184 (arch_pointer_type): Likewise.
5185 (gdbtypes_post_init): Likewise.
5186
5187 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5188 (read_base_type): Likewise.
5189 * mdebugread.c (basic_type): Likewise.
5190 * stabsread.c (dbx_init_float_type): Likewise.
5191 (rs6000_builtin_type): Likewise.
5192 (read_range_type): Likewise. Also, fix call to init_integer_type
5193 with erroneous length argument.
5194
5195 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5196 * d-lang.c (build_d_types): Likewise.
5197 * f-lang.c (build_fortran_types): Likewise.
5198 * go-lang.c (build_go_types): Likewise.
5199 * opencl-lang.c (build_opencl_types): Likewise.
5200 * jit.c (finalize_symtab): Likewise.
5201 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5202 (build_std_type_info_type): Likewise.
5203 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5204 update call to arch_flags_type.
5205
5206 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5207 arch_type.
5208 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5209 * windows-tdep.c (windows_get_tlb_type): Likewise.
5210
5211 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5212 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5213 * m32c-tdep.c (make_types): Likewise.
5214 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5215 (rl78_psw_type): Update call to arch_flags_type.
5216 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5217 * rx-tdep.c (rx_psw_type): Likewise.
5218 (rx_fpsw_type): Likewise.
5219 * sparc-tdep.c (sparc_psr_type): Likewise.
5220 (sparc_fsr_type): Likewise.
5221 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5222 (sparc64_ccr_type): Likewise.
5223 (sparc64_fsr_type): Likewise.
5224 (sparc64_fprs_type): Likewise.
5225
f21b4d5c
TT
52262017-09-27 Tom Tromey <tom@tromey.com>
5227
5228 * findcmd.c (find_command): Constify.
5229
643c2ffa
TT
52302017-09-27 Tom Tromey <tom@tromey.com>
5231
5232 * ada-tasks.c (task_command_1, task_command): Constify.
5233
510e5e56
TT
52342017-09-27 Tom Tromey <tom@tromey.com>
5235
5236 * symtab.c (maintenance_print_symbol_cache)
5237 (maintenance_flush_symbol_cache)
5238 (maintenance_print_symbol_cache_statistics): Constify.
5239
e503b191
TT
52402017-09-27 Tom Tromey <tom@tromey.com>
5241
5242 * inferior.c (detach_inferior_command, kill_inferior_command)
5243 (inferior_command): Constify.
5244
4e001312
TT
52452017-09-27 Tom Tromey <tom@tromey.com>
5246
5247 * regcache.c (regcache_print, maintenance_print_registers)
5248 (maintenance_print_raw_registers)
5249 (maintenance_print_cooked_registers)
5250 (maintenance_print_register_groups)
5251 (maintenance_print_remote_registers): Constify.
5252
77763700
TT
52532017-09-27 Tom Tromey <tom@tromey.com>
5254
5255 * printcmd.c (map_display_numbers, undisplay_command)
5256 (enable_disable_display_command, enable_display_command)
5257 (disable_display_command): Constify.
5258
4495129a
TT
52592017-09-27 Tom Tromey <tom@tromey.com>
5260
5261 * breakpoint.h (delete_command): Don't declare.
5262 * breakpoint.c (delete_command, enable_once_command)
5263 (enable_count_command, enable_delete_command, breakpoint_1)
5264 (maintenance_info_breakpoints, stopin_command, stopat_command)
5265 (delete_command, delete_trace_command, save_breakpoints)
5266 (save_breakpoints_command, save_tracepoints_command): Constify.
5267
3088cf40
TT
52682017-09-27 Tom Tromey <tom@tromey.com>
5269
5270 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5271 (skip_ws, extract_identifier, macro_define_command)
5272 (macro_undef_command, macro_list_command): Constify.
5273
69f476a3
TT
52742017-09-27 Tom Tromey <tom@tromey.com>
5275
5276 * infcmd.c (environment_info, set_environment_command)
5277 (unset_environment_command, path_info, info_proc_cmd_1)
5278 (info_proc_cmd_mappings, info_proc_cmd_stat)
5279 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5280 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5281
c4a3e68e
TT
52822017-09-27 Tom Tromey <tom@tromey.com>
5283
5284 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5285 Constify.
5286
c9d31bd6
TT
52872017-09-27 Tom Tromey <tom@tromey.com>
5288
5289 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5290
1f3f85eb
TT
52912017-09-27 Tom Tromey <tom@tromey.com>
5292
5293 * demangle.c (demangle_command): Constify.
5294
9c504b5d
TT
52952017-09-27 Tom Tromey <tom@tromey.com>
5296
5297 * progspace.c (maintenance_info_program_spaces_command):
5298 Constify.
5299
6663cf91
TT
53002017-09-27 Tom Tromey <tom@tromey.com>
5301
5302 * compile/compile.c (check_raw_argument, compile_file_command)
5303 (compile_code_command, compile_print_command): Constify.
5304
34e5fa26
TT
53052017-09-27 Tom Tromey <tom@tromey.com>
5306
5307 * reggroups.c (maintenance_print_reggroups): Constify.
5308
8384c356
TT
53092017-09-27 Tom Tromey <tom@tromey.com>
5310
5311 * dwarf2read.c (save_gdb_index_command): Constify.
5312
884beb0c
TT
53132017-09-27 Tom Tromey <tom@tromey.com>
5314
5315 * stap-probe.c (info_probes_stap_command): Constify.
5316
e0b2930c
TT
53172017-09-27 Tom Tromey <tom@tromey.com>
5318
5319 * fork-child.c (unset_exec_wrapper_command): Constify.
5320
f938677d
TT
53212017-09-27 Tom Tromey <tom@tromey.com>
5322
5323 * btrace.c (get_uint, get_context_size, no_chunk)
5324 (maint_btrace_packet_history_cmd)
5325 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5326 (maint_info_btrace_cmd): Constify.
5327
8949cb87
TT
53282017-09-27 Tom Tromey <tom@tromey.com>
5329
5330 * reverse.c (delete_bookmark_command): Constify.
5331
ac88e2de
TT
53322017-09-27 Tom Tromey <tom@tromey.com>
5333
5334 * remote.c (set_memory_packet_size)
5335 (set_memory_write_packet_size, show_memory_write_packet_size)
5336 (set_memory_read_packet_size, show_memory_read_packet_size)
5337 (compare_sections_command, packet_command, remote_put_command)
5338 (remote_get_command, remote_delete_command): Constify.
5339
bd4c9dfe
TT
53402017-09-27 Tom Tromey <tom@tromey.com>
5341
5342 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5343 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5344 (set_mipsfpu_auto_command): Constify.
5345
5e93d4c6
TT
53462017-09-27 Tom Tromey <tom@tromey.com>
5347
5348 * cli/cli-cmds.h (cd_command): Constify.
5349 * cli/cli-cmds.c (cd_command): Constify.
5350
fc41a75b
TT
53512017-09-27 Tom Tromey <tom@tromey.com>
5352
5353 * thread.c (thread_name_command, thread_find_command): Constify.
5354
67810076
TT
53552017-09-27 Tom Tromey <tom@tromey.com>
5356
5357 * probe.c (enable_probes_command, disable_probes_command):
5358 Constify.
5359
1d8b34a7
TT
53602017-09-27 Tom Tromey <tom@tromey.com>
5361
5362 * symfile.c (symbol_file_command): Constify.
5363 * gdbcore.h (deprecated_file_changed_hook): Constify.
5364 * exec.c (deprecated_file_changed_hook, exec_file_command)
5365 (file_command): Constify.
5366 * defs.h (symbol_file_command): Constify.
5367
442019e1
TT
53682017-09-27 Tom Tromey <tom@tromey.com>
5369
5370 * remote-fileio.c (set_system_call_allowed)
5371 (show_system_call_allowed): Constify.
5372
2983f7cb
TT
53732017-09-27 Tom Tromey <tom@tromey.com>
5374
5375 * tracepoint.c (delete_trace_variable_command)
5376 (tfind_end_command, tfind_start_command, tfind_pc_command)
5377 (tfind_tracepoint_command, tfind_line_command)
5378 (tfind_range_command, tfind_outside_command): Constify.
5379
4fd41b24
TT
53802017-09-27 Tom Tromey <tom@tromey.com>
5381
5382 * ax-gdb.c (maint_agent_printf_command, agent_command)
5383 (agent_eval_command): Constify.
5384
f2fc3015
TT
53852017-09-27 Tom Tromey <tom@tromey.com>
5386
5387 * tracepoint.c (info_scope_command): Constify.
5388 * python/python.c (gdbpy_decode_line): Constify.
5389 * python/py-breakpoint.c (bppy_init): Constify.
5390 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5391 * location.h: (new_linespec_location)
5392 (string_to_event_location_basic, string_to_event_location):
5393 Constify.
5394 * location.c (new_linespec_location)
5395 (string_to_event_location_basic, string_to_event_location):
5396 Constify.
5397 * linespec.h (decode_line_with_current_source)
5398 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5399 * linespec.c (linespec_lex_to_end)
5400 (decode_line_with_current_source)
5401 (decode_line_with_last_displayed): Constify.
5402 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5403 Constify.
5404 * cli/cli-cmds.c (edit_command, list_command): Constify.
5405 * breakpoint.h (until_break_command, watch_command_wrapper)
5406 (awatch_command_wrapper, rwatch_command_wrapper)
5407 (init_ada_exception_breakpoint): Constify.
5408 * breakpoint.c (break_command_1, dprintf_command)
5409 (break_range_command, watch_command_wrapper)
5410 (rwatch_command_wrapper, awatch_command_wrapper)
5411 (until_break_command, init_ada_exception_breakpoint)
5412 (strace_marker_create_sals_from_location, trace_command)
5413 (ftrace_command, strace_command, struct tracepoint): Constify.
5414 * ax-gdb.c (agent_command_1): Constify.
5415 * ada-lang.c (ada_exception_sal): Constify.
5416
8c2f95f4
TT
54172017-09-27 Tom Tromey <tom@tromey.com>
5418
5419 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5420 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5421 (get_context_size, no_chunk, get_insn_history_modifiers)
5422 (cmd_record_insn_history, get_call_history_modifiers)
5423 (cmd_record_call_history): Constify.
5424
a0d65762
TT
54252017-09-27 Tom Tromey <tom@tromey.com>
5426
5427 * source.c (show_substitute_path_command)
5428 (unset_substitute_path_command, set_substitute_path_command):
5429 Constify.
5430
58971144
TT
54312017-09-27 Tom Tromey <tom@tromey.com>
5432
5433 * typeprint.c (maintenance_print_type): Constify.
5434 * maint.c (maintenance_dump_me, maintenance_demangle)
5435 (maintenance_time_display, maintenance_info_sections)
5436 (maintenance_print_statistics, maintenance_deprecate)
5437 (maintenance_undeprecate): Constify.
5438 (maintenance_do_deprecate): Constify. Use std::string.
5439 (maintenance_selftest): Constify.
5440 * gdbtypes.h (maintenance_print_type): Constify.
5441
c482f52c
TT
54422017-09-27 Tom Tromey <tom@tromey.com>
5443
5444 * hppa-tdep.c (unwind_command): Constify.
5445
e100df1a
TT
54462017-09-27 Tom Tromey <tom@tromey.com>
5447
5448 * target-descriptions.c (unset_tdesc_filename_cmd)
5449 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5450 Constify.
5451
31d56ade
TT
54522017-09-27 Tom Tromey <tom@tromey.com>
5453
5454 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5455
b961da0b
TT
54562017-09-27 Tom Tromey <tom@tromey.com>
5457
5458 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5459
e2d8ae16
TT
54602017-09-27 Tom Tromey <tom@tromey.com>
5461
5462 * tui/tui-regs.c (tui_reg_command): Constify.
5463
863779b0
TT
54642017-09-27 Tom Tromey <tom@tromey.com>
5465
5466 * skip.c (skip_file_command, skip_function_command)
5467 (skip_enable_command, skip_disable_command, skip_delete_command):
5468 Constify.
5469
cdb34d4a
TT
54702017-09-27 Tom Tromey <tom@tromey.com>
5471
5472 * record-btrace.c (cmd_record_btrace_bts_start)
5473 (cmd_record_btrace_pt_start): Constify.
5474
e99c83e7
TT
54752017-09-27 Tom Tromey <tom@tromey.com>
5476
5477 * symmisc.c (maintenance_print_symbols)
5478 (maintenance_print_msymbols, maintenance_print_objfiles)
5479 (maintenance_info_symtabs, maintenance_check_symtabs)
5480 (maintenance_expand_symtabs, maintenance_info_line_tables):
5481 Constify.
5482
32faf971
TT
54832017-09-27 Tom Tromey <tom@tromey.com>
5484
5485 * top.c (new_ui_command): Constify.
5486
2cf311eb
TT
54872017-09-27 Tom Tromey <tom@tromey.com>
5488
5489 * symfile.c (add_symbol_file_command)
5490 (remove_symbol_file_command, list_overlays_command)
5491 (map_overlay_command, unmap_overlay_command)
5492 (overlay_auto_command, overlay_manual_command)
5493 (overlay_off_command, overlay_load_command): Constify.
5494
e6738699
TT
54952017-09-27 Tom Tromey <tom@tromey.com>
5496
5497 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5498 (info_spu_mailbox_command, info_spu_dma_command)
5499 (info_spu_proxydma_command): Constify.
5500
aa360cd5
TT
55012017-09-27 Tom Tromey <tom@tromey.com>
5502
5503 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5504
898241a5
TT
55052017-09-27 Tom Tromey <tom@tromey.com>
5506
5507 * cli/cli-script.c (user_defined_command): Constify.
5508
2d0ac106
TT
55092017-09-27 Tom Tromey <tom@tromey.com>
5510
5511 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5512 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5513 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5514 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5515 (dump_binary_value, append_binary_memory, append_binary_value):
5516 Constify.
5517 (struct dump_context) <func>: Constify.
5518 (add_dump_command): Update.
5519
dede02ce
TT
55202017-09-27 Tom Tromey <tom@tromey.com>
5521
5522 * cli/cli-cmds.c (show_version, show_configuration)
5523 (source_command, show_user): Constify.
5524
d3cb6b99
TT
55252017-09-27 Tom Tromey <tom@tromey.com>
5526
5527 * target.c (maintenance_print_target_stack): Constify.
5528
1970a12f
TT
55292017-09-27 Tom Tromey <tom@tromey.com>
5530
5531 * interps.c (interpreter_exec_cmd): Constify.
5532
41243651
TT
55332017-09-27 Tom Tromey <tom@tromey.com>
5534
5535 * record-full.c (cmd_record_full_restore): Constify.
5536
4465d9db
TT
55372017-09-27 Tom Tromey <tom@tromey.com>
5538
5539 * memattr.c (enable_mem_command, disable_mem_command)
5540 (delete_mem_command): Constify.
5541
ad25e423
TT
55422017-09-27 Tom Tromey <tom@tromey.com>
5543
5544 * value.c (show_convenience): Constify.
5545
d64097b1
TT
55462017-09-27 Tom Tromey <tom@tromey.com>
5547
5548 * gdbcore.h (core_file_command): Update.
5549 * corefile.c (core_file_command): Constify.
5550
4d4589ef
TT
55512017-09-27 Tom Tromey <tom@tromey.com>
5552
5553 * user-regs.c (maintenance_print_user_registers): Constify.
5554
32a7bf17
TT
55552017-09-27 Tom Tromey <tom@tromey.com>
5556
5557 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5558
4a475551
TT
55592017-09-27 Tom Tromey <tom@tromey.com>
5560
5561 * cp-support.c (first_component_command): Constify.
5562
990b9f9f
TT
55632017-09-27 Tom Tromey <tom@tromey.com>
5564
5565 * psymtab.c (maintenance_print_psymbols)
5566 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5567 Constify.
5568
c281872e
TT
55692017-09-27 Tom Tromey <tom@tromey.com>
5570
5571 * windows-tdep.c (display_tib): Constify.
5572
5b64bf74
TT
55732017-09-27 Tom Tromey <tom@tromey.com>
5574
5575 * linux-fork.c (delete_checkpoint_command)
5576 (detach_checkpoint_command): Constify.
5577
4ada038f
TT
55782017-09-27 Tom Tromey <tom@tromey.com>
5579
5580 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5581
57f5a81b
TT
55822017-09-27 Tom Tromey <tom@tromey.com>
5583
5584 * arc-tdep.c (dump_arc_instruction_command): Constify.
5585
b0a8e6c4
TT
55862017-09-27 Tom Tromey <tom@tromey.com>
5587
5588 * valprint.c (set_radix, show_radix): Constify.
5589
8d97dc1c
TT
55902017-09-27 Tom Tromey <tom@tromey.com>
5591
5592 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5593
eb7c454d
TT
55942017-09-27 Tom Tromey <tom@tromey.com>
5595
5596 * command.h (not_just_help_class_command): Update.
5597 * cli/cli-decode.h (not_just_help_class_command): Update.
5598 * cli/cli-decode.c (not_just_help_class_command): Constify.
5599
e4e33335
TT
56002017-09-27 Tom Tromey <tom@tromey.com>
5601
5602 * gdb_bfd.c (maintenance_info_bfds): Constify.
5603
0450cc4c
TT
56042017-09-27 Tom Tromey <tom@tromey.com>
5605
5606 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5607 overloads.
5608 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5609 (do_const_cfunc): New function.
5610 (cmd_cfunc_eq): New overload.
5611 (cli_user_command_p): Check do_const_cfunc.
5612 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5613 const_cfunc.
5614 * command.h (add_cmd): Add const overload and no-function
5615 overload.
5616 (set_cmd_cfunc): Add const overload.
5617 (cmd_const_cfunc_ftype): Declare.
5618 (cmd_cfunc_eq): Add const overload.
5619 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5620 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5621 overload.
5622
a9bbfbd8
TT
56232017-09-27 Tom Tromey <tom@tromey.com>
5624
5625 * macroexp.c (get_next_token_for_substitution): New function.
5626 (substitute_args): Call it. Check for __VA_OPT__.
5627
5230b05a
WT
56282017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5629 Pedro Alves <palves@redhat.com>
5630
5631 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5632 producer_is_icc_lt_14.
5633 (producer_is_icc_lt_14): New function.
5634 (check_producer): Add code for checking version of ICC.
5635 (producer_is_icc): Move to producer.c.
5636 (read_structure_type): Restrict ICC workaround to ICC<14.
5637 * producer.c: Include selftest.h.
5638 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5639 New functions.
5640 * producer.h (producer_is_icc): New declaration.
5641
b32b108a
WT
56422017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5643
5644 * Makefile.in (SFILES): Add producer.c.
5645 (COMMON_OBS): Add producer.o
5646 * amd64-tdep.c (producer.h): Add new include.
5647 * dwarf2read.c (producer.h): Add new include.
5648 * producer.c: New file.
5649 * producer.h: New file.
5650 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5651 producer.c.
5652 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5653 producer.h.
5654
5007d765
MK
56552017-09-26 Matthias Klose <doko@ubuntu.com>
5656
5657 * configure.ac: Search ncursesw before ncurses.
5658 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5659 * gdb_curses.h: Include <ncursesw/ncurses.h>
5660 * config.in, configure: Regenerate.
5661
281c4447
RO
56622017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5663
5664 PR gdb/22185
5665 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5666 obsolete.
5667 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5668 Remove i386sol2 support.
5669 * configure.nat <i386sol2>: Remove.
5670 <sol2-64>: Fold into ...
5671 <sol2>: ... this.
5672 Move common settings to default section.
5673 Add sol-thread.o.
5674 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5675 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5676 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5677 <i[34567]86-*-solaris*>: Remove.
5678 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5679
5680 * configure.ac: Remove wctype in libw check.
5681 (_MSE_INT_H): Don't define on Solaris 7-9.
5682 <solaris*>: Remove libthread_db.so.1 check.
5683 * configure: Regenerate.
5684 * config.in: Regenerate.
5685
5686 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5687 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5688 (gdb_ps_size_t): Remove.
5689 Use base types in users.
5690 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5691
5692 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5693
39b06c20
RO
56942017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5695
5696 PR build/22206
5697 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5698 (adi_is_addr_mapped): Likewise.
5699 (PSR_ICC): Don't redefine.
5700 (PSR_IMPL): Likewise.
5701
6c3e20f1
TT
57022017-09-25 Tom Tromey <tom@tromey.com>
5703
5704 * regcache.c (regcache::dump): Use string_printf.
5705
b292235f
TT
57062017-09-25 Tom Tromey <tom@tromey.com>
5707
5708 * regcache.c (class regcache_invalidator): New.
5709 (struct register_to_invalidate): Remove.
5710 (make_cleanup_regcache_invalidate): Remove.
5711 (regcache::raw_write): Use regcache_invalidator.
5712
9ac86b52
TT
57132017-09-25 Tom Tromey <tom@tromey.com>
5714
5715 * spu-tdep.c (spu2ppu_sniffer): Update.
5716 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5717 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5718 Remove.
5719 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5720 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5721 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5722 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5723 (frame_pop): Update.
5724
c0e383c6
TT
57252017-09-25 Tom Tromey <tom@tromey.com>
5726
5727 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5728 * regcache.h (regcache_xfree): Don't declare.
5729 * regcache.c (regcache_xfree): Remove.
5730 (do_regcache_xfree): Use delete.
5731 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5732 * linux-fork.c (free_fork): Use delete.
5733 (fork_save_infrun_state): Likewise.
5734 * jit.c (jit_dealloc_cache): Use delete.
5735 * infrun.c (discard_infcall_suspend_state): Use delete.
5736
791199cc
TT
57372017-09-25 Tom Tromey <tom@tromey.com>
5738
5739 * regcache.h (regcache_xmalloc): Don't declare.
5740 (regcache_raw_set_cached_value): Update comment.
5741 * regcache.c (regcache_xmalloc): Remove.
5742 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5743 * jit.c (jit_frame_sniffer): Use new.
5744 * frame.c (frame_save_as_regcache): Use new.
5745
289e23aa
AA
57462017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5747
5748 * NEWS: Advertise support for guarded-storage registers on IBM z.
5749
1b63490c
AA
57502017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5751
5752 * s390-linux-nat.c (have_regset_gs): New static variable.
5753 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5754 control block and guarded-storage broadcast control regsets.
5755 (s390_read_description): Detect whether the target has
5756 guarded-storage support, return appropriate tdesc.
5757 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5758 (features/s390x-gs-linux64.c): Likewise.
5759 (struct gdbarch_tdep) <have_gs>: New field.
5760 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5761 (s390_gsbc_regset): New variables.
5762 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5763 and s390_gsbc_regset, if applicable.
5764 (s390_core_read_description): Check whether core file was from a
5765 target with guarded-storage support; include appropriate regsets.
5766 (s390_gdbarch_init): Add registers for guarded-storage support.
5767 (_initialize_s390_tdep): Initialize new target descriptions that
5768 include registers for guarded-storage support.
5769 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5770 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5771 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5772 (S390_NUM_REGS): Adjust macro definition.
5773 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5774 (tdesc_s390x_gs_linux64): New declarations.
5775
96235dc1
AA
57762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5777
5778 * features/s390-gs-linux64.xml: New file.
5779 * features/s390-gs.xml: New file.
5780 * features/s390-gsbc.xml: New file.
5781 * features/s390x-gs-linux64.xml: New file.
5782 * features/Makefile (WHICH): Add s390-gs-linux64 and
5783 s390x-gs-linux64.
5784 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5785 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5786 * features/s390-gs-linux64.c: New generated file.
5787 * features/s390x-gs-linux64.c: New file.
5788 * regformats/s390-gs-linux64.dat: New file.
5789 * regformats/s390x-gs-linux64.dat: New file.
5790
b4a7c699
TT
57912017-09-23 Tom Tromey <tom@tromey.com>
5792
5793 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5794
c2f97536
TT
57952017-09-22 Tom Tromey <tom@tromey.com>
5796
5797 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5798 type to scoped_restore_tmpl.
5799 <scoped_input_handler>: Initialize m_quit_handler directly.
5800
43573013
SDJ
58012017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5802
5803 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5804 (cd_command): Likewise. Free "current_directory" before
5805 assigning to it.
5806 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5807 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5808 * top.c (gdb_dirbuf): Remove global declaration.
5809 * top.h (gdb_dirbuf): Likewise.
5810
6ec2e0f5
SDJ
58112017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5812
5813 * gnulib/aclocal.m4: Regenerate.
5814 * gnulib/config.in: Regenerate.
5815 * gnulib/configure: Regenerate.
5816 * gnulib/import/Makefile.am: Regenerate.
5817 * gnulib/import/Makefile.in: Regenerate.
5818 * gnulib/import/assure.h: New file.
5819 * gnulib/import/at-func.c: Likewise
5820 * gnulib/import/chdir-long.c: New file.
5821 * gnulib/import/chdir-long.h: New file.
5822 * gnulib/import/cloexec.c: New file.
5823 * gnulib/import/cloexec.h: New file.
5824 * gnulib/import/close.c: New file.
5825 * gnulib/import/closedir.c: New file.
5826 * gnulib/import/dirent-private.h: New file.
5827 * gnulib/import/dup-safer.c: New file.
5828 * gnulib/import/dup.c: New file.
5829 * gnulib/import/dup2.c: New file.
5830 * gnulib/import/error.c: New file.
5831 * gnulib/import/error.h: New file.
5832 * gnulib/import/exitfail.c: New file.
5833 * gnulib/import/exitfail.h: New file.
5834 * gnulib/import/fchdir.c: New file.
5835 * gnulib/import/fcntl.c: New file.
5836 * gnulib/import/fcntl.in.h: New file.
5837 * gnulib/import/fd-hook.c: New file.
5838 * gnulib/import/fd-hook.h: New file.
5839 * gnulib/import/fd-safer.c: New file.
5840 * gnulib/import/fdopendir.c: New file.
5841 * gnulib/import/filename.h: New file.
5842 * gnulib/import/filenamecat-lgpl.c: New file.
5843 * gnulib/import/filenamecat.h: New file.
5844 * gnulib/import/fstat.c: New file.
5845 * gnulib/import/fstatat.c: New file.
5846 * gnulib/import/getcwd-lgpl.c: New file.
5847 * gnulib/import/getcwd.c: New file.
5848 * gnulib/import/getdtablesize.c: New file.
5849 * gnulib/import/getlogin_r.c: New file.
5850 * gnulib/import/getprogname.c: New file.
5851 * gnulib/import/getprogname.h: New file.
5852 * gnulib/import/gettext.h: New file.
5853 * gnulib/import/glob-libc.h: New file.
5854 * gnulib/import/glob.c: New file.
5855 * gnulib/import/glob.in.h: New file.
5856 * gnulib/import/intprops.h: New file.
5857 * gnulib/import/m4/chdir-long.m4: New file.
5858 * gnulib/import/m4/close.m4: New file.
5859 * gnulib/import/m4/closedir.m4: New file.
5860 * gnulib/import/m4/d-ino.m4: New file.
5861 * gnulib/import/m4/d-type.m4: New file.
5862 * gnulib/import/m4/dup.m4: New file.
5863 * gnulib/import/m4/dup2.m4: New file.
5864 * gnulib/import/m4/error.m4: New file.
5865 * gnulib/import/m4/fchdir.m4: New file.
5866 * gnulib/import/m4/fcntl.m4: New file.
5867 * gnulib/import/m4/fcntl_h.m4: New file.
5868 * gnulib/import/m4/fdopendir.m4: New file.
5869 * gnulib/import/m4/filenamecat.m4: New file.
5870 * gnulib/import/m4/fstat.m4: New file.
5871 * gnulib/import/m4/fstatat.m4: New file.
5872 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5873 * gnulib/import/m4/getcwd-path-max.m4: New file.
5874 * gnulib/import/m4/getcwd.m4: New file.
5875 * gnulib/import/m4/getdtablesize.m4: New file.
5876 * gnulib/import/m4/getlogin_r.m4: New file.
5877 * gnulib/import/m4/getprogname.m4: New file.
5878 * gnulib/import/m4/glob.m4: New file.
5879 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5880 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5881 * gnulib/import/m4/mempcpy.m4: New file.
5882 * gnulib/import/m4/memrchr.m4: New file.
5883 * gnulib/import/m4/mode_t.m4: New file.
5884 * gnulib/import/m4/msvc-inval.m4: New file.
5885 * gnulib/import/m4/msvc-nothrow.m4: New file.
5886 * gnulib/import/m4/open.m4: New file.
5887 * gnulib/import/m4/openat.m4: New file.
5888 * gnulib/import/m4/opendir.m4: New file.
5889 * gnulib/import/m4/readdir.m4: New file.
5890 * gnulib/import/m4/realloc.m4: New file.
5891 * gnulib/import/m4/rewinddir.m4: New file.
5892 * gnulib/import/m4/save-cwd.m4: New file.
5893 * gnulib/import/m4/strdup.m4: New file.
5894 * gnulib/import/m4/strerror.m4: New file.
5895 * gnulib/import/m4/unistd-safer.m4: New file.
5896 * gnulib/import/mempcpy.c: New file.
5897 * gnulib/import/memrchr.c: New file.
5898 * gnulib/import/msvc-inval.c: New file.
5899 * gnulib/import/msvc-inval.h: New file.
5900 * gnulib/import/msvc-nothrow.c: New file.
5901 * gnulib/import/msvc-nothrow.h: New file.
5902 * gnulib/import/open.c: New file.
5903 * gnulib/import/openat-die.c: New file.
5904 * gnulib/import/openat-priv.h: New file.
5905 * gnulib/import/openat-proc.c: New file.
5906 * gnulib/import/openat.c: New file.
5907 * gnulib/import/openat.h: New file.
5908 * gnulib/import/opendir.c: New file.
5909 * gnulib/import/pipe-safer.c: New file.
5910 * gnulib/import/readdir.c: New file.
5911 * gnulib/import/realloc.c: New file.
5912 * gnulib/import/rewinddir.c: New file.
5913 * gnulib/import/save-cwd.c: New file.
5914 * gnulib/import/save-cwd.h: New file.
5915 * gnulib/import/strdup.c: New file.
5916 * gnulib/import/strerror-override.c: New file.
5917 * gnulib/import/strerror-override.h: New file.
5918 * gnulib/import/strerror.c: New file.
5919 * gnulib/import/unistd--.h: New file.
5920 * gnulib/import/unistd-safer.h: New file.
5921 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5922 "getcwd" and "glob".
5923 * ser-tcp.c: Undefine "close" before redefining it.
5924
432ae719
SM
59252017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5926
5927 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5928 get rid of res_val.
5929
4fa7574e
RO
59302017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5931
5932 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5933 <sol2,sparc>: Likewise.
5934 <sol2-64,i386>: Likewise.
5935
5936 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5937 -Wdeprecated-declarations on *-*-solaris*.
5938 * configure: Regenerate.
5939
5940 * procfs.c: Include "nat/inferior.h".
5941 (procfs_info_proc): Fix typo.
5942
f6327dcb
KB
59432017-09-21 Kevin Buettner <kevinb@redhat.com>
5944
5945 * remote.c (vector): Include.
5946 (struct private_thread_info): Add field, thread_handle.
5947 (free_private_thread_info): Deallocate storage associated with
5948 thread handle.
5949 (get_private_info_thread): Initialize `thread_handle' field.
5950 (struct thread_item): Add field, thread_handle.
5951 (clear_threads_listing_context): Deallocate storage associated
5952 with thread handle.
5953 (start_thread): Add support for "handle" attribute.
5954 (thread_attributes): Add "handle".
5955 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5956 field.
5957 (remote_update_thread_list): Update thread_handle.
5958 (remote_thread_handle_to_thread_info): New function.
5959 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5960
fbbe5337
KB
59612017-09-21 Kevin Buettner <kevinb@redhat.com>
5962
5963 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5964 function.
5965 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5966 * python/python-internal.h (thread_object_type): Declare.
5967
e04ee09e
KB
59682017-09-21 Kevin Buettner <kevinb@redhat.com>
5969
5970 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5971 (target_thread_handle_to_thread_info): Declare.
5972 * target.c (target_thread_handle_to_thread_info): New function.
5973 * target-delegates.c: Regenerate.
5974 * gdbthread.h (find_thread_by_handle): Declare.
5975 * thread.c (find_thread_by_handle): New function.
5976 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5977 function.
5978 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5979
1e5b66ed
SM
59802017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5981
5982 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5983
ebe48ba0
SM
59842017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5985
5986 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5987
0a0bf5dc
YQ
59882017-09-21 Yao Qi <yao.qi@linaro.org>
5989
5990 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5991 to gdb_target_obs.
5992
d1b0a7bf
TT
59932017-09-20 Tom Tromey <tom@tromey.com>
5994
5995 * breakpoint.c (struct counted_command_line): Remove.
5996 (breakpoint_commands): Update.
5997 (alloc_counted_command_line, incref_counted_command_line)
5998 (decref_counted_command_line, do_cleanup_counted_command_line)
5999 (make_cleanup_decref_counted_command_line): Remove.
6000 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6001 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6002 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6003 (save_breakpoints): Update.
6004 * breakpoint.h (counted_command_line): Now a typedef to
6005 shared_ptr.
6006 (struct breakpoint) <commands>: Now a counted_command_line.
6007 (struct bpstats) <command>: Likewise.
6008
48649e1b
TT
60092017-09-20 Tom Tromey <tom@tromey.com>
6010
6011 * breakpoint.c (struct commands_info, do_map_commands_command):
6012 Remove.
6013 (commands_command_1): Update.
6014 (iterate_over_related_breakpoints): Take a function_view.
6015 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6016 (delete_command): Update.
6017 (map_breakpoint_numbers): Take a function_view.
6018 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6019 (disable_command): Update.
6020 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6021 (enable_command): Update.
6022 (struct disp_data, do_enable_breakpoint_disp)
6023 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6024 (do_map_enable_delete_breakpoint): Remove.
6025 (enable_once_command, enable_count_command, enable_delete_command)
6026 (delete_trace_variable_command): Update.
6027
04afa70c
TT
60282017-09-20 Tom Tromey <tom@tromey.com>
6029
6030 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6031 (bpstat_clear): Use delete.
6032 (bpstats): New constructors.
6033 (bpstat_copy, bpstat_stop_status): Use new.
6034 (dprintf_after_condition_true): Update.
6035 * breakpoint.h (bpstats::bpstats): Add constructors.
6036 (bpstats::~bpstats): Add destructor.
6037
c83833f4
PA
60382017-09-20 Pedro Alves <palves@redhat.com>
6039
6040 * eval.c (make_params): Delete, refactored as ...
6041 (class fake_method): ... this new type's ctor.
6042 (fake_method::~fake_method): New.
6043 (evaluate_subexp_standard): Use 'fake_method'.
6044
223ffa71
TT
60452017-09-20 Tom Tromey <tom@tromey.com>
6046
6047 * windows-nat.c (get_windows_debug_event, windows_wait)
6048 (do_initial_windows_stuff, windows_attach): Update.
6049 * utils.c (vwarning, internal_vproblem): Update.
6050 (ui_unregister_input_event_handler_cleanup)
6051 (prepare_to_handle_input): Remove.
6052 (class scoped_input_handler): New.
6053 (defaulted_query, prompt_for_continue): Update.
6054 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6055 Update.
6056 * top.c (undo_terminal_modifications_before_exit): Update.
6057 * target/target.h (target_terminal_init, target_terminal_inferior)
6058 (target_terminal_ours): Don't declare.
6059 (class target_terminal): New.
6060 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6061 (target_terminal_ours_for_output)
6062 (make_cleanup_restore_target_terminal): Don't declare.
6063 (target_terminal_info): Remove.
6064 * target.c (enum terminal_state, terminal_state): Remove.
6065 (target_terminal::terminal_state): Define.
6066 (target_terminal::init): Rename from target_terminal_init.
6067 (target_terminal::inferior): Rename from
6068 target_terminal_inferior.
6069 (target_terminal::ours): Rename from target_terminal_ours.
6070 (target_terminal::ours_for_output): Rename from
6071 target_terminal_ours_for_output.
6072 (target_terminal::info): New method.
6073 (cleanup_restore_target_terminal)
6074 (make_cleanup_restore_target_terminal): Remove.
6075 * solib.c (handle_solib_event): Update.
6076 * remote.c (remote_serial_quit_handler): Update.
6077 (remote_terminal_inferior, remote_wait_as): Update.
6078 * record-full.c (record_full_wait_1): Update.
6079 * nto-procfs.c (procfs_create_inferior): Update.
6080 * nat/fork-inferior.c (startup_inferior): Update.
6081 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6082 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6083 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6084 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6085 (mi_breakpoint_created, mi_breakpoint_deleted)
6086 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6087 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6088 (mi_user_selected_context_changed, report_initial_inferior):
6089 Update.
6090 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6091 (linux_nat_terminal_inferior): Update.
6092 * infrun.c (follow_fork_inferior)
6093 (handle_vfork_child_exec_or_exit, do_target_resume)
6094 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6095 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6096 Update.
6097 * inflow.c (child_terminal_init, info_terminal_command): Update.
6098 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6099 (attach_command): Update.
6100 * infcall.c (call_thread_fsm_should_stop): Update.
6101 * gnu-nat.c (gnu_attach): Update.
6102 * extension.c (struct active_ext_lang_state)
6103 (restore_active_ext_lang): Update.
6104 * exceptions.c (print_flush): Update.
6105 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6106 (struct quit_handler_cleanup_data, restore_quit_handler)
6107 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6108 Remove.
6109 * cp-support.c (gdb_demangle): Update.
6110 * breakpoint.c (update_inserted_breakpoint_locations)
6111 (insert_breakpoint_locations, handle_jit_event)
6112 (disable_breakpoints_in_unloaded_shlib): Update.
6113 * annotate.c (annotate_breakpoints_invalid)
6114 (annotate_frames_invalid): Update.
6115
013af3fc
TT
61162017-09-20 Tom Tromey <tom@tromey.com>
6117
6118 * main.c (catch_command_errors): Rename from
6119 catch_command_errors_const.
6120 (captured_main_1): Update.
6121
06871ae8
PA
61222017-09-20 Pedro Alves <palves@redhat.com>
6123
6124 * cli/cli-cmds.c (list_command): Use print_sal_location.
6125 (print_sal_location): New function.
6126 (ambiguous_line_spec): Use print_sal_location.
6127 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6128 * symtab.c (find_function_start_sal): Likewise.
6129 * symtab.h (symtab_and_line::symbol): New field.
6130
e5f25bc5
PA
61312017-09-20 Pedro Alves <palves@redhat.com>
6132
6133 * linespec.c (minsym_found): Handle non-text minsyms.
6134 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6135
1b7fa39e
WT
61362017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6137
6138 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6139 backslash.
6140
37dd0825
WT
61412017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6142
6143 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6144 vmovups instead vmovaps.
6145 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6146
4e5a4f58
JB
61472017-09-19 John Baldwin <jhb@FreeBSD.org>
6148
6149 * NEWS (Changes since GDB 8.0): Add starti.
6150 * infcmd.c (enum run_break): New.
6151 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6152 case.
6153 (run_command): Use enum run_how.
6154 (start_command): Likewise.
6155 (starti_command): New function.
6156 (RUN_ARGS_HELP): New macro.
6157 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6158 commands. Add starti command.
6159
aa70c9f1
YQ
61602017-09-19 Yao Qi <yao.qi@linaro.org>
6161
6162 * Makefile.in (monitor.o): Remove the rule.
6163
d6541620
YQ
61642017-09-19 Yao Qi <yao.qi@linaro.org>
6165
6166 * annotate.h (struct annotate_arg_emitter): Use
6167 DISABLE_COPY_AND_ASSIGN.
6168 * common/refcounted-object.h (refcounted_object): Likewise.
6169 * completer.h (struct completion_result): Likewise.
6170 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6171 * filename-seen-cache.h (filename_seen_cache): Likewise.
6172 * gdbcore.h (thread_section_name): Likewise.
6173 * gdb_regex.h (compiled_regex): Likewise.
6174 * gdbthread.h (scoped_restore_current_thread): Likewise.
6175 * inferior.h (scoped_restore_current_inferior): Likewise.
6176 * jit.c (jit_reader): Likewise.
6177 * linespec.h (struct linespec_result): Likewise.
6178 * mi/mi-parse.h (struct mi_parse): Likewise.
6179 * nat/fork-inferior.c (execv_argv): Likewise.
6180 * progspace.h (scoped_restore_current_program_space): Likewise.
6181 * python/python-internal.h (class gdbpy_enter): Likewise.
6182 * regcache.h (regcache): Likewise.
6183 * target-descriptions.c (struct tdesc_reg): Likewise.
6184 (struct tdesc_type): Likewise.
6185 (struct tdesc_feature): Likewise.
6186 * ui-out.h (ui_out_emit_type): Likewise.
6187
0615127c
SM
61882017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6189
6190 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6191 label abort_expression.
6192
5e187554
SM
61932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6194
6195 * common/buffer.c (buffer_xml_printf): Adjust.
6196 * common/xml-utils.c (xml_escape_text): Change return type to
6197 std::string, update code accordingly.
6198 * common/xml-utils.h (xml_escape_text): Change return type to
6199 std::string.
6200 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6201 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6202 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6203 Adjust.
6204
c3d7b541
SM
62052017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6206
6207 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6208 (SUBDIR_UNITTESTS_OBS): Add new object file.
6209 * unittests/xml-utils-selftests.c: New file.
6210
1526853e
SM
62112017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6212
6213 * common/selftest.h (selftest): New struct/interface.
6214 (register_test): Add name parameter, add new overload.
6215 (run_tests): Add filter parameter.
6216 (for_each_selftest_ftype): New typedef.
6217 (for_each_selftest): New declaration.
6218 * common/selftest.c (tests): Change type to
6219 map<string, unique_ptr<selftest>>.
6220 (simple_selftest): New struct.
6221 (register_test): New function.
6222 (register_test): Add name parameter and use it.
6223 (run_tests): Add filter parameter and use it. Add prints.
6224 Adjust to vector -> map change.
6225 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6226 registering selftests.
6227 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6228 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6229 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6230 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6231 * findvar.c (_initialize_findvar): Likewise.
6232 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6233 * maint.c (maintenance_selftest): Update call to run_tests.
6234 (maintenance_info_selftests): New function.
6235 (_initialize_maint_cmds): Register "maintenance info selftests"
6236 command. Update "maintenance selftest" doc.
6237 * regcache.c (_initialize_regcache): Add names when registering
6238 selftests.
6239 * rust-exp.y (_initialize_rust_exp): Likewise.
6240 * selftest-arch.c (gdbarch_selftest): New struct.
6241 (gdbarch_tests): Remove.
6242 (register_test_foreach_arch): Add name parameter. Call
6243 register_test.
6244 (tests_with_arch): Remove, move most content to
6245 gdbarch_selftest::operator().
6246 (_initialize_selftests_foreach_arch): Remove.
6247 * selftest-arch.h (register_test_foreach_arch): Add name
6248 parameter.
6249 (run_tests_with_arch): New declaration.
6250 * utils-selftests.c (_initialize_utils_selftests): Add names
6251 when registering selftests.
6252 * utils.c (_initialize_utils): Likewise.
6253 * unittests/array-view-selftests.c
6254 (_initialize_array_view_selftests): Likewise.
6255 * unittests/environ-selftests.c (_initialize_environ_selftests):
6256 Likewise.
6257 * unittests/function-view-selftests.c
6258 (_initialize_function_view_selftests): Likewise.
6259 * unittests/offset-type-selftests.c
6260 (_initialize_offset_type_selftests): Likewise.
6261 * unittests/optional-selftests.c
6262 (_initialize_optional_selftests): Likewise.
6263 * unittests/scoped_restore-selftests.c
6264 (_initialize_scoped_restore_selftests): Likewise.
6265 * NEWS: Document "maintenance selftest" and "maint info
6266 selftests".
6267
5846367a
SM
62682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6269
6270 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6271 scoped_restore.
6272
bd77e8ff
SM
62732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6274
6275 * mi/mi-main.c (mi_load_progress): Make uiout variable
6276 a unique_ptr.
6277
26a67918
PA
62782017-09-15 Pedro Alves <palves@redhat.com>
6279
6280 * compile/compile-c-types.c (convert_enum, convert_int)
6281 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6282
3f8a7804
SM
62832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6284
6285 * dwarf2read.c (copy_string): Remove.
6286 (parse_macro_definition): Replace copy_string with savestring.
6287
8d200706
YQ
62882017-09-15 Yao Qi <yao.qi@linaro.org>
6289
6290 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6291 gdb_target_obs.
6292 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6293 Likewise.
6294 (i[34567]86-*-linux*): Likewise.
6295
d185219d
SM
62962017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6297
6298 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6299 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6300 <stack>: Change type to std::vector.
6301 <stack_len, stack_allocated>: Remove.
6302 <grow_stack>: Remove.
6303 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6304 (dwarf_expr_context::~dwarf_expr_context): Remove.
6305 (dwarf_expr_context::grow_stack): Remove.
6306 (dwarf_expr_context::push): Adjust.
6307 (dwarf_expr_context::pop): Adjust.
6308 (dwarf_expr_context::fetch): Adjust.
6309 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6310 (dwarf_expr_context::stack_empty_p): Adjust.
6311 (dwarf_expr_context::execute_stack_op): Adjust.
6312
eccd80d6
SM
63132017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6314
6315 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6316 return type to bool.
6317 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6318
69009882
SM
63192017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6320
6321 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6322 Change type to bool.
6323 (dwarf_stack_value) <in_stack_memory>: Likewise.
6324 (dwarf_expr_context) <push_address>: Change parameter type to
6325 bool.
6326 <fetch_in_stack_memory>: Change return type to bool.
6327 <push>: Change parameter type to bool.
6328 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6329 to bool.
6330 (dwarf_expr_context::push_address): Likewise.
6331 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6332 to bool.
6333 (dwarf_expr_context::execute_stack_op): Adjust.
6334 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6335
1e467161
SM
63362017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6339 (struct dwarf_expr_context) <n_pieces>: Remove.
6340 <pieces>: Change type to std::vector.
6341 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6342 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6343 pieces.
6344 (dwarf_expr_context::add_piece): Adjust.
6345 * dwarf2loc.c (struct piece_closure): Initialize fields.
6346 <n_pieces>: Remove.
6347 <pieces>: Change type to std::vector.
6348 (allocate_piece_closure): Adjust, change parameter to
6349 std::vector rvalue and std::move it to piece_closure.
6350 (rw_pieced_value): Adjust.
6351 (check_pieced_synthetic_pointer): Adjust.
6352 (indirect_synthetic_pointer): Adjust.
6353 (coerce_pieced_ref): Adjust.
6354 (free_pieced_value_closure): Adjust. Use delete to free
6355 piece_closure.
6356 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6357 to allocate_piece_closure.
6358 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6359
0782db84
SM
63602017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6361
6362 * probe.h (probe_ops_cp): Remove typedef.
6363 (DEF_VEC_P (probe_ops_cp)): Remove.
6364 (all_probe_ops): Change type to std::vector.
6365 * probe.c (info_probes_for_ops): Adjust to vector change.
6366 (probe_linespec_to_ops): Likewise.
6367 (all_probe_ops): Change type to std::vector.
6368 (_initialize_probe): Adjust to vector change.
6369 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6370 * elfread.c (elf_get_probes): Likewise.
6371 * stap-probe.c (_initialize_stap_probe): Likewise.
6372
1eac6bea
SM
63732017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6374
6375 * probe.h (struct bound_probe): Define constructors.
6376 * probe.c (bound_probe_s): Remove typedef.
6377 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6378 (collect_probes): Change return type to std::vector, remove
6379 cleanup.
6380 (compare_probes): Return bool, change parameter type. Change
6381 semantic to "less than".
6382 (gen_ui_out_table_header_info): Change parameter to std::vector
6383 and update.
6384 (exists_probe_with_pops): Likewise.
6385 (info_probes_for_ops): Update to std::vector change.
6386 (enable_probes_command): Likewise.
6387 (disable_probes_command): Likewise.
6388
aaa63a31
SM
63892017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6390
6391 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6392 vec to std::vector.
6393 * probe.c (parse_probes_in_pspace): Update.
6394 (find_probes_in_objfile): Update.
6395 (find_probe_by_pc): Update.
6396 (collect_probes): Update.
6397 (probe_any_get_probes): Update.
6398 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6399 return type to reference to std::vector.
6400 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6401 std::vector and update.
6402 (dtrace_process_dof): Likewise.
6403 (dtrace_get_probes): Likewise.
6404 * elfread.c (elf_get_probes): Change return type to std::vector,
6405 store an std::vector in bfd_data.
6406 (probe_key_free): Update to std::vector.
6407 * stap-probe.c (handle_stap_probe): Change parameter to
6408 std::vector and update.
6409 (stap_get_probes): Likewise.
6410 * symfile-debug.c (debug_sym_get_probes): Change return type to
6411 std::vector and update.
6412
cb85b21b
TT
64132017-09-11 Tom Tromey <tom@tromey.com>
6414
6415 * breakpoint.c (program_breakpoint_here_p): Update.
6416 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6417 from make_show_memory_breakpoints_cleanup. Return a
6418 scoped_restore_tmpl<int>.
6419 (restore_show_memory_breakpoints): Remove.
6420 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6421 * mem-break.c (memory_validate_breakpoint): Update.
6422 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6423 (ia64_memory_remove_breakpoint): Update.
6424 (ia64_breakpoint_from_pc): Update.
6425 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6426 from make_show_memory_breakpoints_cleanup.
6427
8fbc99ef
TT
64282017-09-11 Tom Tromey <tom@tromey.com>
6429
6430 * d-namespace.c (d_lookup_symbol): Use std::string.
6431 (find_symbol_in_baseclass): Likewise.
6432
50feb4bd
TT
64332017-09-11 Tom Tromey <tom@tromey.com>
6434
6435 * ctf.c (ctf_start): Use std::string.
6436
c6dc63a1
TT
64372017-09-11 Tom Tromey <tom@tromey.com>
6438
6439 * ada-lang.c (is_known_support_routine): Update.
6440 (ada_unhandled_exception_name_addr_from_raise): Update.
6441 * guile/scm-frame.c (gdbscm_frame_name): Update.
6442 * python/py-frame.c (frapy_name): Update.
6443 (frapy_function): Update.
6444 * stack.h (find_frame_funname): Update.
6445 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6446 (print_frame): Update.
6447
d6b9b80f
TT
64482017-09-11 Tom Tromey <tom@tromey.com>
6449
6450 * findcmd.c (put_bits): Take a gdb::byte_vector.
6451 (parse_find_args): Return gdb::byte_vector. "args" now const.
6452 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6453 cleanups.
6454 (find_command): Update.
6455
a9921622
TT
64562017-09-11 Tom Tromey <tom@tromey.com>
6457
6458 * cli/cli-script.c (class scoped_restore_hook_in): New.
6459 (clear_hook_in_cleanup): Remove.
6460 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6461 scoped_restore_hook_in.
6462
be0d7abb
TT
64632017-09-11 Tom Tromey <tom@tromey.com>
6464
6465 * cli/cli-script.c (restore_interp): Remove.
6466 (read_command_lines): Use scoped_restore_interp.
6467 * interps.c (scoped_restore_interp::set_temp): Rename from
6468 interp_set_temp.
6469 * interps.h (class scoped_restore_interp): New.
6470 (interp_set_temp): Remove.
6471
00f675ff
TT
64722017-09-11 Tom Tromey <tom@tromey.com>
6473
6474 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6475 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6476 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6477 scoped_restore.
6478 (mi_cmd_break_insert_1): Update.
6479 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6480 scoped_restore.
6481
cb791d59
TT
64822017-09-11 Tom Tromey <tom@tromey.com>
6483
6484 * demangle.c (demangle_command): Update.
6485 * breakpoint.c (disable_command): Update.
6486 (enable_command): Update.
6487 (find_location_by_number): Make "number" const. Use
6488 get_number_trailer.
6489 * cli/cli-utils.c (extract_arg): Return std::string.
6490 * probe.c (parse_probe_linespec): Update. Change types.
6491 (collect_probes): Take string arguments.
6492 (parse_probe_linespec): Likewise.
6493 (info_probes_for_ops): Update.
6494 (enable_probes_command): Update.
6495 (disable_probes_command): Update.
6496 * break-catch-sig.c (catch_signal_split_args): Update.
6497 * mi/mi-parse.c (mi_parse): Update.
6498
2039bd9f
TT
64992017-09-11 Tom Tromey <tom@tromey.com>
6500
6501 * language.h (language_enum): Make argument const.
6502 * language.c (language_enum): Make argument const.
6503
f1735a53
TT
65042017-09-11 Tom Tromey <tom@tromey.com>
6505
6506 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6507 as function.
6508 (skip_to_space): Rename from skip_to_space_const.
6509 * common/common-utils.c (skip_to_space): New function.
6510 (skip_to_space): Rename from skip_to_space_const.
6511 * cli/cli-utils.h (get_number): Rename from get_number_const.
6512 (extract_arg): Rename from extract_arg_const.
6513 * cli/cli-utils.c (get_number): Rename from get_number_const.
6514 (extract_arg): Rename from extract_arg_const.
6515 (number_or_range_parser::get_number): Use ::get_number.
6516 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6517 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6518 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6519 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6520 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6521 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6522 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6523 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6524
7d221d74
TT
65252017-09-11 Tom Tromey <tom@tromey.com>
6526
6527 * python/python.c (do_start_initialization): Use
6528 py-event-types.def to initialize types.
6529 Define all object type structures.
6530 * python/python-internal.h: Don't declare event initialization
6531 functions.
6532 * python/py-threadevent.c (thread_event_object_type): Don't
6533 define.
6534 * python/py-stopevent.c (stop_event_object_type): Don't define.
6535 * python/py-signalevent.c (signal_event_object_type): Don't
6536 declare or define.
6537 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6538 (clear_objfiles_event_object_type): Don't declare or define.
6539 * python/py-infevents.c (inferior_call_pre_event_object_type)
6540 (inferior_call_post_event_object_type)
6541 (register_changed_event_object_type)
6542 (memory_changed_event_object_type): Don't declare or define.
6543 * python/py-inferior.c (new_thread_event_object_type)
6544 (new_inferior_event_object_type)
6545 (inferior_deleted_event_object_type): Don't declare or define.
6546 * python/py-exitedevent.c (exited_event_object_type): Don't
6547 declare or define.
6548 * python/py-evts.c (gdbpy_initialize_py_events): Use
6549 py-all-events.def.
6550 * python/py-events.h (thread_event_object_type): Don't declare.
6551 (events_object): Use py-all-events.def.
6552 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6553 py-event-types.def.
6554 * python/py-event-types.def: New file.
6555 * python/py-continueevent.c (create_continue_event_object): Don't
6556 declare or define.
6557 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6558 declare or define.
6559 * python/py-all-events.def: New file.
6560
35c61a1d
TT
65612017-09-11 Tom Tromey <tom@tromey.com>
6562
6563 * python/py-threadevent.c (create_thread_event_object): Return
6564 gdbpy_ref.
6565 * python/py-stopevent.h (create_stop_event_object)
6566 (create_breakpoint_event_object, create_signal_event_object):
6567 Update.
6568 * python/py-stopevent.c (create_stop_event_object): Return
6569 gdbpy_ref.
6570 (emit_stop_event): Update.
6571 * python/py-signalevent.c (create_signal_event_object): Return
6572 gdbpy_ref.
6573 * python/py-infevents.c (create_inferior_call_event_object):
6574 Update.
6575 * python/py-event.h (create_event_object)
6576 (create_thread_event_object): Update.
6577 * python/py-event.c (create_event_object): Return gdbpy_ref.
6578 * python/py-continueevent.c: Return gdbpy_ref.
6579 * python/py-bpevent.c (create_breakpoint_event_object): Return
6580 gdbpy_ref.
6581
7c96f8c1
TT
65822017-09-11 Tom Tromey <tom@tromey.com>
6583
6584 PR python/15622:
6585 * NEWS: Add entry.
6586 * python/python.c (do_start_initialization): Initialize new event
6587 types.
6588 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6589 (gdbpy_initialize_inferior_deleted_event)
6590 (gdbpy_initialize_new_thread_event): Declare.
6591 * python/py-threadevent.c (create_thread_event_object): Add option
6592 "thread" parameter.
6593 * python/py-inferior.c (new_thread_event_object_type)
6594 (new_inferior_event_object_type)
6595 (inferior_deleted_event_object_type): Declare.
6596 (python_new_inferior, python_inferior_deleted): New functions.
6597 (add_thread_object): Emit new_thread event.
6598 (gdbpy_initialize_inferior): Attach new functions to corresponding
6599 observers.
6600 (new_thread, new_inferior, inferior_deleted): Define new event
6601 types.
6602 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6603 registries.
6604 * python/py-events.h (events_object) <new_inferior,
6605 inferior_deleted, new_thread>: New fields.
6606 * python/py-event.h (create_thread_event_breakpoint): Add optional
6607 "thread" parameter.
6608
72542b8e
AB
66092017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6610
6611 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6612 check current_ui instead.
6613 (internal_vproblem): Likewise.
6614
0d64823e
SM
66152017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6616
6617 * thread.c (print_thread_info_1): Remove unnecessary calls to
6618 uiout->is_mi_like_p.
6619
eb1e02fd
TT
66202017-09-09 Tom Tromey <tom@tromey.com>
6621
6622 * namespace.h (add_using_directive): Update.
6623 * namespace.c (add_using_directive): Change type of excludes to
6624 std::vector.
6625 * dwarf2read.c (read_import_statement): Use std::vector.
6626 (read_namespace): Update.
6627 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6628
0fc21fd8
TT
66292017-09-09 Tom Tromey <tom@tromey.com>
6630
6631 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6632
49663d05
TT
66332017-09-09 Tom Tromey <tom@tromey.com>
6634
6635 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6636
0b868b60
TT
66372017-09-09 Tom Tromey <tom@tromey.com>
6638
6639 * stack.c (func_command): Use gdb::def_vector.
6640
c0470d48
TT
66412017-09-09 Tom Tromey <tom@tromey.com>
6642
6643 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6644 ui_out_emit_list, ui_out_emit_tuple.
6645 (mi_cmd_var_update): Likewise.
6646
ca5909c7
TT
66472017-09-09 Tom Tromey <tom@tromey.com>
6648
6649 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6650 ui_out_redirect_pop.
6651 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6652 ui_out_redirect_pop.
6653 * utils.c (do_ui_out_redirect_pop)
6654 (make_cleanup_ui_out_redirect_pop): Remove.
6655 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6656 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6657 * ui-out.h (ui_out_redirect_pop): New class.
6658
e6a2252a
TT
66592017-09-09 Tom Tromey <tom@tromey.com>
6660
6661 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6662 (list_available_thread_groups, mi_cmd_list_thread_groups)
6663 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6664 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6665 Likewise.
6666
393702cd
TT
66672017-09-09 Tom Tromey <tom@tromey.com>
6668
6669 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6670 ui_out_emit_tuple.
6671
76f9c9cf
TT
66722017-09-09 Tom Tromey <tom@tromey.com>
6673
6674 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6675 * stack.c (print_frame): Use ui_out_emit_tuple.
6676 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6677 (info_spu_mailbox_command, info_spu_dma_command)
6678 (info_spu_proxydma_command): Likewise.
6679 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6680 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6681 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6682 ui_out_emit_tuple.
6683 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6684
dc9fe180
TT
66852017-09-09 Tom Tromey <tom@tromey.com>
6686
6687 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6688 (class ui_out_emit_table): Update comment.
6689 * ui-out.c (do_cleanup_table_end)
6690 (make_cleanup_ui_out_table_begin_end): Remove.
6691 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6692 (info_spu_dma_cmdlist): Likewise.
6693 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6694 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6695 ui_out_emit_table.
6696
f8cc3da6
TT
66972017-09-09 Tom Tromey <tom@tromey.com>
6698
6699 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6700 ui_out_emit_list, gdb::optional.
6701
481695ed
JB
67022017-09-09 John Baldwin <jhb@FreeBSD.org>
6703
6704 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6705 prototype.
6706 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6707 prototype.
6708 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6709 prototype.
6710 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6711 * ada-exp.y: Remove _initialize_ada_exp prototype.
6712 * ada-lang.c: Remove _initialize_ada_language prototype.
6713 * ada-tasks.c: Remove _initialize_tasks prototype.
6714 * addrmap.c: Remove _initialize_addrmap prototype.
6715 * agent.c: Remove _initialize_agent prototype.
6716 * aix-thread.c: Remove _initialize_aix_thread prototype.
6717 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6718 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6719 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6720 prototype.
6721 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6722 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6723 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6724 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6725 prototype.
6726 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6727 prototype.
6728 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6729 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6730 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6731 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6732 prototype.
6733 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6734 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6735 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6736 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6737 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6738 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6739 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6740 prototype.
6741 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6742 prototype.
6743 * annotate.c: Remove _initialize_annotate prototype.
6744 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6745 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6746 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6747 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6748 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6749 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6750 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6751 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6752 prototype.
6753 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6754 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6755 * auto-load.c: Remove _initialize_auto_load prototype.
6756 * auxv.c: Remove _initialize_auxv prototype.
6757 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6758 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6759 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6760 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6761 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6762 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6763 prototype.
6764 * break-catch-throw.c: Remove _initialize_break_catch_throw
6765 prototype.
6766 * breakpoint.c: Remove _initialize_breakpoint prototype.
6767 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6768 * btrace.c: Remove _initialize_btrace prototype.
6769 * charset.c: Remove _initialize_charset prototype.
6770 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6771 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6772 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6773 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6774 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6775 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6776 * coffread.c: Remove _initialize_coffread prototype.
6777 * compile/compile.c: Remove _initialize_compile prototype.
6778 * complaints.c: Remove _initialize_complaints prototype.
6779 * completer.c: Remove _initialize_completer prototype.
6780 * copying.awk: Remove _initialize_copying prototype.
6781 * copying.c: Regenerate.
6782 * core-regset.c: Remove _initialize_core_regset prototype.
6783 * corefile.c: Remove _initialize_core prototype.
6784 * corelow.c: Remove _initialize_corelow prototype.
6785 * cp-abi.c: Remove _initialize_cp_abi prototype.
6786 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6787 * cp-support.c: Remove _initialize_cp_support prototype.
6788 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6789 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6790 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6791 * ctf.c: Remove _initialize_ctf prototype.
6792 * d-lang.c: Remove _initialize_d_language prototype.
6793 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6794 prototype.
6795 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6796 * dbxread.c: Remove _initialize_dbxread prototype.
6797 * dcache.c: Remove _initialize_dcache prototype.
6798 * demangle.c: Remove _initialize_demangler prototype.
6799 * disasm-selftests.c: Remove _initialize_disasm_selftests
6800 prototype.
6801 * disasm.c: Remove _initialize_disasm prototype.
6802 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6803 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6804 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6805 prototype.
6806 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6807 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6808 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6809 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6810 * elfread.c: Remove _initialize_elfread prototype.
6811 * exec.c: Remove _initialize_exec prototype.
6812 * extension.c: Remove _initialize_extension prototype.
6813 * f-lang.c: Remove _initialize_f_language prototype.
6814 * f-valprint.c: Remove _initialize_f_valprint prototype.
6815 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6816 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6817 * filesystem.c: Remove _initialize_filesystem prototype.
6818 * findcmd.c: Remove _initialize_mem_search prototype.
6819 * fork-child.c: Remove _initialize_fork_child prototype.
6820 * frame-base.c: Remove _initialize_frame_base prototype.
6821 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6822 * frame.c: Remove _initialize_frame prototype.
6823 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6824 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6825 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6826 * gcore.c: Remove _initialize_gcore prototype.
6827 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6828 * gdbarch.c: Regenerate.
6829 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6830 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6831 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6832 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6833 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6834 * go-lang.c: Remove _initialize_go_language prototype.
6835 * go32-nat.c: Remove _initialize_go32_nat prototype.
6836 * guile/guile.c: Remove _initialize_guile prototype.
6837 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6838 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6839 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6840 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6841 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6842 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6843 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6844 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6845 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6846 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6847 prototype.
6848 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6849 prototype.
6850 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6851 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6852 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6853 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6854 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6855 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6856 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6857 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6858 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6859 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6860 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6861 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6862 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6863 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6864 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6865 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6866 prototype.
6867 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6868 prototype.
6869 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6870 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6871 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6872 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6873 * infcall.c: Remove _initialize_infcall prototype.
6874 * infcmd.c: Remove _initialize_infcmd prototype.
6875 * inferior.c: Remove _initialize_inferiors prototype.
6876 * inflow.c: Remove _initialize_inflow prototype.
6877 * infrun.c: Remove _initialize_infrun prototype.
6878 * interps.c: Remove _initialize_interpreter prototype.
6879 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6880 * jit.c: Remove _initialize_jit prototype.
6881 * language.c: Remove _initialize_language prototype.
6882 * linux-fork.c: Remove _initialize_linux_fork prototype.
6883 * linux-nat.c: Remove _initialize_linux_nat prototype.
6884 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6885 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6886 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6887 * m2-lang.c: Remove _initialize_m2_language prototype.
6888 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6889 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6890 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6891 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6892 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6893 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6894 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6895 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6896 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6897 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6898 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6899 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6900 * machoread.c: Remove _initialize_machoread prototype.
6901 * macrocmd.c: Remove _initialize_macrocmd prototype.
6902 * macroscope.c: Remove _initialize_macroscope prototype.
6903 * maint.c: Remove _initialize_maint_cmds prototype.
6904 * mdebugread.c: Remove _initialize_mdebugread prototype.
6905 * memattr.c: Remove _initialize_mem prototype.
6906 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6907 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6908 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6909 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6910 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6911 * microblaze-linux-tdep.c: Remove
6912 _initialize_microblaze_linux_tdep prototype.
6913 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6914 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6915 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6916 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6917 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6918 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6919 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6920 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6921 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6922 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6923 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6924 prototype.
6925 * mipsread.c: Remove _initialize_mipsread prototype.
6926 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6927 prototype.
6928 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6929 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6930 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6931 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6932 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6933 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6934 prototype.
6935 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6936 * nto-procfs.c: Remove _initialize_procfs prototype.
6937 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6938 * objc-lang.c: Remove _initialize_objc_language prototype.
6939 * objfiles.c: Remove _initialize_objfiles prototype.
6940 * observer.c: Remove observer_test_first_notification_function,
6941 observer_test_second_notification_function,
6942 observer_test_third_notification_function, and
6943 _initialize_observer prototypes.
6944 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6945 * osabi.c: Remove _initialize_gdb_osabi prototype.
6946 * osdata.c: Remove _initialize_osdata prototype.
6947 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6948 * parse.c: Remove _initialize_parse prototype.
6949 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6950 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6951 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6952 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6953 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6954 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6955 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6956 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6957 * printcmd.c: Remove _initialize_printcmd prototype.
6958 * probe.c: Remove _initialize_probe prototype.
6959 * proc-api.c: Remove _initialize_proc_api prototype.
6960 * proc-events.c: Remove _initialize_proc_events prototype.
6961 * proc-service.c: Remove _initialize_proc_service prototype.
6962 * procfs.c: Remove _initialize_procfs prototype.
6963 * psymtab.c: Remove _initialize_psymtab prototype.
6964 * python/python.c: Remove _initialize_python prototype.
6965 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6966 * record-btrace.c: Remove _initialize_record_btrace prototype.
6967 * record-full.c: Remove _initialize_record_full prototype.
6968 * record.c: Remove _initialize_record prototype.
6969 * regcache.c: Remove _initialize_regcache prototype.
6970 * reggroups.c: Remove _initialize_reggroup prototype.
6971 * remote-notif.c: Remove _initialize_notif prototype.
6972 * remote-sim.c: Remove _initialize_remote_sim prototype.
6973 * remote.c: Remove _initialize_remote prototype.
6974 * reverse.c: Remove _initialize_reverse prototype.
6975 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6976 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6977 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6978 prototype.
6979 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6980 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6981 * rust-exp.y: Remove _initialize_rust_exp prototype.
6982 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6983 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6984 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6985 * score-tdep.c: Remove _initialize_score_tdep prototype.
6986 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6987 prototype.
6988 * ser-go32.c: Remove _initialize_ser_dos prototype.
6989 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6990 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6991 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6992 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6993 * serial.c: Remove _initialize_serial prototype.
6994 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6995 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6996 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6997 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6998 * skip.c: Remove _initialize_step_skip prototype.
6999 * sol-thread.c: Remove _initialize_sol_thread prototype.
7000 * solib-aix.c: Remove _initialize_solib_aix prototype.
7001 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7002 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7003 * solib-frv.c: Remove _initialize_frv_solib prototype.
7004 * solib-spu.c: Remove _initialize_spu_solib prototype.
7005 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7006 * solib-target.c: Remove _initialize_solib_target prototype.
7007 * solib.c: Remove _initialize_solib prototype.
7008 * source.c: Remove _initialize_source prototype.
7009 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7010 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7011 prototype.
7012 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7013 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7014 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7015 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7016 prototype.
7017 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7018 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7019 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7020 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7021 prototype.
7022 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7023 prototype.
7024 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7025 prototype.
7026 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7027 prototype.
7028 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7029 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7030 prototype.
7031 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7032 prototype.
7033 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7034 prototype.
7035 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7036 prototype.
7037 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7038 prototype.
7039 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7040 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7041 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7042 * stabsread.c: Remove _initialize_stabsread prototype.
7043 * stack.c: Remove _initialize_stack prototype.
7044 * stap-probe.c: Remove _initialize_stap_probe prototype.
7045 * std-regs.c: Remove _initialize_frame_reg prototype.
7046 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7047 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7048 * symfile.c: Remove _initialize_symfile prototype.
7049 * symmisc.c: Remove _initialize_symmisc prototype.
7050 * symtab.c: Remove _initialize_symtab prototype.
7051 * target-dcache.c: Remove _initialize_target_dcache prototype.
7052 * target-descriptions.c: Remove _initialize_target_descriptions
7053 prototype.
7054 * thread.c: Remove _initialize_thread prototype.
7055 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7056 prototype.
7057 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7058 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7059 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7060 prototype.
7061 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7062 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7063 * tracefile.c: Remove _initialize_tracefile prototype.
7064 * tracepoint.c: Remove _initialize_tracepoint prototype.
7065 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7066 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7067 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7068 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7069 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7070 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7071 * tui/tui.c: Remove _initialize_tui prototype.
7072 * typeprint.c: Remove _initialize_typeprint prototype.
7073 * user-regs.c: Remove _initialize_user_regs prototype.
7074 * utils.c: Remove _initialize_utils prototype.
7075 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7076 * valarith.c: Remove _initialize_valarith prototype.
7077 * valops.c: Remove _initialize_valops prototype.
7078 * valprint.c: Remove _initialize_valprint prototype.
7079 * value.c: Remove _initialize_values prototype.
7080 * varobj.c: Remove _initialize_varobj prototype.
7081 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7082 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7083 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7084 * windows-nat.c: Remove _initialize_windows_nat,
7085 _initialize_check_for_gdb_ini, and _initialize_loadable
7086 prototypes.
7087 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7088 * xcoffread.c: Remove _initialize_xcoffread prototype.
7089 * xml-support.c: Remove _initialize_xml_support prototype.
7090 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7091 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7092 prototype.
7093 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7094 prototype.
7095 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7096
a611b5cb
KS
70972017-09-08 Keith Seitz <keiths@redhat.com>
7098
7099 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7100 field.
7101
469412dd
CW
71022017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7103
7104 * f-valprint.c (f_val_print): Remove check for one byte
7105 sized integers. Remove printing of character type.
7106
a5ad232b
FP
71072017-09-08 Frank Penczek <frank.penczek@intel.com>
7108 Christoph Weinmann <christoph.t.weinmann@intel.com>
7109 Bernhard Heckel <bernhard.heckel@intel.com>
7110
7111 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7112 to maintain proper indentation when printing pointers/refs.
7113
e5014227
JB
71142017-09-07 Joel Brobecker <brobecker@adacore.com>
7115
7116 GDB 8.0.1 released.
7117
63c99141
JB
71182017-09-07 Joel Brobecker <brobecker@adacore.com>
7119
7120 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7121
69c1e056
TT
71222017-09-05 Tom Tromey <tom@tromey.com>
7123
7124 * parse.c (funcall_chain): Now a std::vector.
7125 (start_arglist, end_arglist): Simplify.
7126 (free_funcalls): Remove.
7127 (parse_exp_in_context_1): Remove cleanup.
7128
fef704bf
TT
71292017-09-05 Tom Tromey <tom@tromey.com>
7130
7131 * go-exp.y (go_parse): Don't create a cleanup.
7132
5613c585
TT
71332017-09-05 Tom Tromey <tom@tromey.com>
7134
7135 * d-exp.y (PrimaryExpression): Use std::string.
7136 (d_parse): Don't create a cleanup.
7137
eae49211
TT
71382017-09-05 Tom Tromey <tom@tromey.com>
7139
7140 * utils.c (do_clear_parser_state): Remove.
7141 (make_cleanup_clear_parser_state): Remove.
7142 * p-exp.y (pascal_parse): Use scoped_restore.
7143 * m2-exp.y (m2_parse): Use scoped_restore.
7144 * f-exp.y (f_parse): Use scoped_restore.
7145 * d-exp.y (d_parse): Use scoped_restore.
7146 * c-exp.y (c_parse): Use scoped_restore.
7147 * ada-exp.y (ada_parse): Use scoped_restore.
7148 * utils.h (make_cleanup_clear_parser_state): Remove.
7149
73b9be8b
KS
71502017-09-06 Keith Seitz <keiths@redhat.com>
7151
7152 * dwarf2read.c (dw2_linkage_name_attr): New function.
7153 (dw2_linkage_name): New function.
7154 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7155 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7156 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7157
a102602b
KR
71582017-09-06 Kamil Rytarowski <n54@gmx.com>
7159
7160 * config/djgpp/djconfig.sh: Correct shell portability issue.
7161
28ad437d
KR
71622017-09-06 Kamil Rytarowski <n54@gmx.com>
7163
7164 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7165
351787dd
JB
71662017-09-06 John Baldwin <jhb@FreeBSD.org>
7167
7168 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7169 * NEWS: Mention new FreeBSD/mips native configuration.
7170 * configure.host: Add aarch64*-*-freebsd*.
7171 * configure.nat: Likewise.
7172 * aarch64-fbsd-nat.c: New file.
7173
c0f84956
JB
71742017-09-06 John Baldwin <jhb@FreeBSD.org>
7175
7176 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7177 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7178 * NEWS: Mention new FreeBSD/aarch64 target.
7179 * configure.tgt: Add aarch64*-*-freebsd*.
7180 * aarch64-fbsd-tdep.c: New file.
7181 * aarch64-fbsd-tdep.h: New file.
7182
7610297a
KR
71832017-09-06 Kamil Rytarowski <n54@gmx.com>
7184
7185 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7186
fbd1b771
JK
71872017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7188
7189 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7190 of TLS symbols.
7191
5ca79eae
PW
71922017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7193
7194 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7195 call.
7196
bf93d7ba
SM
71972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7198
7199 * infrun.c (follow_exec): Call add_thread after
7200 target_find_description.
7201
1bb7c059
SM
72022017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7203
7204 * infrun.c (handle_inferior_event_1): When exec'ing, read
7205 stop_pc after follow_exec.
7206
fc809827
SM
72072017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7208
7209 * remote.c (process_g_packet): Update error message.
7210
d2fcdd85
YQ
72112017-09-05 Yao Qi <yao.qi@linaro.org>
7212
7213 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7214 targets.
7215
e69570ee
PA
72162017-09-05 Pedro Alves <palves@redhat.com>
7217
7218 * eval.c (eval_call, evaluate_funcall): New functions, factored
7219 out from ...
7220 (evaluate_subexp_standard): ... this.
7221
22916b07
YQ
72222017-09-05 Yao Qi <yao.qi@linaro.org>
7223
7224 * amd64-tdep.c (amd64_target_description): Create target
7225 descriptions.
7226 (_initialize_amd64_tdep): Don't call functions
7227 initialize_tdesc_amd64_*. Add self tests.
7228 * arch/amd64.c (amd64_create_target_description): Add parameter
7229 is_linux. Call set_tdesc_osabi if is_linux is true.
7230 * arch/amd64.h (amd64_create_target_description): Update the
7231 declaration.
7232 * arch/i386.c (i386_create_target_description): Add parameter
7233 is_linux. Call set_tdesc_osabi if is_linux is true.
7234 * arch/i386.h (i386_create_target_description): Update
7235 declaration.
7236 * configure.tgt: Add i386.o to gdb_target_obs.
7237 * features/Makefile (XMLTOC): Remove i386/*.xml.
7238 * features/i386/amd64-avx-avx512.c: Remove.
7239 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7240 * features/i386/amd64-avx-mpx.c: Remove.
7241 * features/i386/amd64-avx.c: Remove.
7242 * features/i386/amd64-mpx.c: Remove.
7243 * features/i386/amd64.c: Remove.
7244 * features/i386/i386-avx-avx512.c: Remove.
7245 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7246 * features/i386/i386-avx-mpx.c: Remove.
7247 * features/i386/i386-avx.c: Remove.
7248 * features/i386/i386-mmx.c: Remove.
7249 * features/i386/i386-mpx.c: Remove.
7250 * features/i386/i386.c: Remove.
7251 * i386-tdep.c: Don't include features/i386/i386*.c., include
7252 target-descriptions.h and arch/i386.h.
7253 (i386_target_description): Create target descriptions.
7254 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7255 functions. Do self tests.
7256
0854b7b1
YQ
72572017-09-05 Yao Qi <yao.qi@linaro.org>
7258
7259 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7260 * features/i386/amd64-avx-avx512-linux.c: Removed.
7261 * features/i386/amd64-avx-linux.c: Removed.
7262 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7263 * features/i386/amd64-avx-mpx-linux.c: Removed.
7264 * features/i386/amd64-linux.c: Removed.
7265 * features/i386/amd64-mpx-linux.c: Removed.
7266 * features/i386/x32-avx-avx512-linux.c: Removed.
7267 * features/i386/x32-avx-linux.c: Removed.
7268 * features/i386/x32-linux.c: Removed.
7269
b4570e4b
YQ
72702017-09-05 Yao Qi <yao.qi@linaro.org>
7271
7272 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7273 features/i386/*.c.
7274 (amd64_linux_read_description): Call
7275 amd64_create_target_description.
7276 * arch/amd64.c: New file.
7277 * arch/amd64.h: New file.
7278 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7279 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7280
6c73f67f
YQ
72812017-09-05 Yao Qi <yao.qi@linaro.org>
7282
7283 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7284 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7285 (amd64_linux_read_description): Create target descriptions.
7286 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7287 functions. Add unit tests.
7288 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7289 x32-core.xml.
7290 * features/i386/64bit-avx.c: Generated.
7291 * features/i386/64bit-avx512.c: Generated.
7292 * features/i386/64bit-core.c: Generated.
7293 * features/i386/64bit-linux.c: Generated.
7294 * features/i386/64bit-mpx.c: Generated.
7295 * features/i386/64bit-pkeys.c: Generated.
7296 * features/i386/64bit-segments.c: Generated.
7297 * features/i386/64bit-sse.c: Generated.
7298 * features/i386/x32-core.c: Generated.
7299 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7300 c files for amd64-linux and x32-linux.
7301
9d3d478b
YQ
73022017-09-05 Yao Qi <yao.qi@linaro.org>
7303
7304 * amd64-linux-tdep.c (amd64_linux_read_description): New
7305 function.
7306 (amd64_linux_core_read_description): Call
7307 amd64_linux_read_description.
7308 (amd64_linux_init_abi): Likewise.
7309 (amd64_x32_linux_init_abi): Likewise.
7310 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7311 * x86-linux-nat.c (x86_linux_read_description): Call
7312 amd64_linux_read_description.
7313
b9f1d50f
YQ
73142017-09-05 Yao Qi <yao.qi@linaro.org>
7315
7316 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7317 comments.
7318
188c9e6d
YQ
73192017-09-05 Yao Qi <yao.qi@linaro.org>
7320
7321 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7322 * features/i386/i386-avx-avx512-linux.c: Remove.
7323 * features/i386/i386-avx-linux.c: Remove.
7324 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7325 * features/i386/i386-avx-mpx-linux.c: Remove.
7326 * features/i386/i386-linux.c: Remove.
7327 * features/i386/i386-mmx-linux.c: Remove.
7328 * features/i386/i386-mpx-linux.c: Remove.
7329
5f035c07
YQ
73302017-09-05 Yao Qi <yao.qi@linaro.org>
7331
7332 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7333 (SFILES): Add arch/i386.c.
7334 (HFILES_NO_SRCDIR): Add arch/i386.h.
7335 * arch/i386.c: New file.
7336 * arch/i386.h: New file.
7337 * arch/tdesc.h (allocate_target_description): Declare.
7338 (set_tdesc_architecture): Declare.
7339 (set_tdesc_osabi): Declare.
7340 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7341 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7342 include arch/i386.h.
7343 (i386_linux_read_description): Remove code and call
7344 i386_create_target_description.
7345 (set_tdesc_architecture): New function.
7346 (set_tdesc_osabi): New function.
7347 * target-descriptions.h (allocate_target_description): Remove.
7348
0abe8a89
YQ
73492017-09-05 Yao Qi <yao.qi@linaro.org>
7350
7351 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7352 * target-descriptions.c (tdesc_create_feature): Likewise, and
7353 adjust code.
7354 * features/i386/32bit-avx.c: Re-generated.
7355 * features/i386/32bit-avx512.c: Re-generated.
7356 * features/i386/32bit-core.c: Re-generated.
7357 * features/i386/32bit-linux.c: Re-generated.
7358 * features/i386/32bit-mpx.c: Re-generated.
7359 * features/i386/32bit-pkeys.c: Re-generated.
7360 * features/i386/32bit-sse.c: Re-generated.
7361
0a188386
YQ
73622017-09-05 Yao Qi <yao.qi@linaro.org>
7363
7364 * regformats/regdef.h (struct reg): Override operator == and !=.
7365
f49ff000
YQ
73662017-09-05 Yao Qi <yao.qi@linaro.org>
7367
7368 * arch/tdesc.h: New file.
7369 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7370 * target-descriptions.c: Update comments.
7371 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7372 declarations.
7373 * features/i386/32bit-avx.c: Re-generated.
7374 * features/i386/32bit-avx512.c: Re-generated.
7375 * features/i386/32bit-core.c: Re-generated.
7376 * features/i386/32bit-linux.c: Re-generated.
7377 * features/i386/32bit-mpx.c: Re-generated.
7378 * features/i386/32bit-pkeys.c: Re-generated.
7379 * features/i386/32bit-sse.c: Re-generated.
7380
f7000548
YQ
73812017-09-05 Yao Qi <yao.qi@linaro.org>
7382
7383 * regformats/regdat.sh: Update generated code.
7384
c9a5e2a5
YQ
73852017-09-05 Yao Qi <yao.qi@linaro.org>
7386
7387 * regformats/regdat.sh: Adjust code order.
7388
d6b687ac
SM
73892017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7390
7391 * expprint.c (dump_subexp_body_standard): Use constant format
7392 string in fprintf_filtered call.
7393
a379bfd0
JB
73942017-09-04 John Baldwin <jhb@FreeBSD.org>
7395
7396 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7397 NetBSD/i386.
7398 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7399
f7efc967
JB
74002017-09-04 John Baldwin <jhb@FreeBSD.org>
7401
7402 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7403
c49fbc6c
JB
74042017-09-04 John Baldwin <jhb@FreeBSD.org>
7405
7406 * bsd-kvm.o: Define _KMEMUSER.
7407 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7408 * configure: Regenerate.
7409
26562e73
JB
74102017-09-04 John Baldwin <jhb@FreeBSD.org>
7411
7412 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7413 * i386-fbsd-nat.c: Likewise.
7414
31cf1487
JB
74152017-09-04 John Baldwin <jhb@FreeBSD.org>
7416
7417 * unittests/array-view-selftests.c: Add include of <array>.
7418
5b9f8a7c
JB
74192017-09-04 John Baldwin <jhb@FreeBSD.org>
7420
7421 * spu-tdep.c (flush_ea_cache): Add missing argument to
7422 call_function_by_hand.
7423
d69cf9b2
PA
74242017-09-04 Pedro Alves <palves@redhat.com>
7425
7426 * NEWS (Safer support for debugging with no debug info): New.
7427
3693fdb3
PA
74282017-09-04 Pedro Alves <palves@redhat.com>
7429
7430 * c-exp.y (function_method, function_method_void): Add current
7431 instance flags to TYPE_INSTANCE.
7432 * dwarf2read.c (check_modifier): New.
7433 (compute_delayed_physnames): Assert that only C++ adds delayed
7434 physnames. Mark fn_fields as const/volatile depending on
7435 physname.
7436 * eval.c (make_params): New type_instance_flags parameter. Use
7437 it as the new type's instance flags.
7438 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7439 flags element and pass it to make_params.
7440 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7441 instance flags element.
7442 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7443 * gdbtypes.h: Include "enum-flags.h".
7444 (type_instance_flags): New enum-flags type.
7445 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7446 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7447 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7448 (follow_type_instance_flags): New function.
7449 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7450 * parser-defs.h (follow_type_instance_flags): Declare.
7451 * valops.c (value_struct_elt_for_reference): const/volatile must
7452 match too.
7453
e68cb8e0
PA
74542017-09-04 Pedro Alves <palves@redhat.com>
7455
7456 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7457 function/method scopes; lookup the nested name as a function local
7458 static variable.
7459
858be34c
PA
74602017-09-04 Pedro Alves <palves@redhat.com>
7461
7462 (%type <voidval>): Add function_method.
7463 * c-exp.y (exp): New production for calls with no arguments.
7464 (function_method, function_method_void_or_typelist): New
7465 productions.
7466 (exp): New production for "method()::static_var".
7467 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7468 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7469 Handle OP_FUNC_STATIC_VAR.
7470 * parse.c (operator_length_standard):
7471 Handle OP_FUNC_STATIC_VAR.
7472
dd5901a6
PA
74732017-09-04 Pedro Alves <palves@redhat.com>
7474
7475 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7476 handling.
7477 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7478 Ditto.
7479 * parse.c (operator_length_standard, operator_check_standard):
7480 Ditto.
7481 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7482
46a4882b
PA
74832017-09-04 Pedro Alves <palves@redhat.com>
7484
7485 * ax-gdb.c: Include "typeprint.h".
7486 (gen_expr_for_cast): New function.
7487 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7488 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7489 type is unknown.
7490 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7491 nodebug_data_symbol.
7492 * eval.c: Include "typeprint.h".
7493 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7494 Error out if symbol has unknown type.
7495 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7496 evaluate_subexp_for_cast.
7497 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7498 OP_VAR_MSYM_VALUE.
7499 (evaluate_subexp_for_cast): New function.
7500 * gdbtypes.c (init_nodebug_var_type): New function.
7501 (objfile_type): Use it to initialize types of variables with no
7502 debug info.
7503 * typeprint.c (error_unknown_type): New.
7504 * typeprint.h (error_unknown_type): New declaration.
7505 * compile/compile-c-types.c (convert_type_basic): Handle
7506 TYPE_CODE_ERROR; warn and fallback to int for variables with
7507 unknown type.
7508
fe13dfec
PA
75092017-09-04 Pedro Alves <palves@redhat.com>
7510
7511 * eval.c (evaluate_var_value): New function, factored out from ...
7512 (evaluate_subexp_standard): ... here.
7513
d008ee21
PA
75142017-09-04 Pedro Alves <palves@redhat.com>
7515
7516 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7517 Remove useless assignments to 'op'.
7518
827d0c51
PA
75192017-09-04 Pedro Alves <palves@redhat.com>
7520
7521 * eval.c (eval_skip_value): New function.
7522 (evaluate_subexp_standard): Use it.
7523
2c5a2be1
PA
75242017-09-04 Pedro Alves <palves@redhat.com>
7525
7526 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7527 function name from symbol/minsym and pass it to
7528 error_call_unknown_return_type.
7529
74ea4be4
PA
75302017-09-04 Pedro Alves <palves@redhat.com>
7531
7532 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7533 * ax-gdb.c (gen_msym_var_ref): New function.
7534 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7535 * eval.c (evaluate_var_msym_value): New function.
7536 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7537 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7538 to call_function_by_hand.
7539 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7540 Handle OP_VAR_MSYM_VALUE.
7541 (union exp_element) <msymbol>: New field.
7542 * minsyms.h (struct type): Forward declare.
7543 (find_minsym_type_and_address): Declare.
7544 * parse.c (write_exp_elt_msym): New function.
7545 (write_exp_msymbol): Delete, refactored as ...
7546 (find_minsym_type_and_address): ... this new function.
7547 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7548 (operator_length_standard, operator_check_standard): Handle
7549 OP_VAR_MSYM_VALUE.
7550 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7551
7022349d
PA
75522017-09-04 Pedro Alves <palves@redhat.com>
7553
7554 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7555 TYPE_GNU_IFUNC specially here. Throw error if return type is
7556 unknown.
7557 * ada-typeprint.c (print_func_type): Handle functions with unknown
7558 return type.
7559 * c-typeprint.c (c_type_print_base): Handle functions and methods
7560 with unknown return type.
7561 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7562 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7563 * compile/compile-c-types.c: Include "objfiles.h".
7564 (convert_func): For functions with unknown return type, warn and
7565 default to int.
7566 * compile/compile-object-run.c (compile_object_run): Adjust call
7567 to call_function_by_hand_dummy.
7568 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7569 call_function_by_hand.
7570 * eval.c (evaluate_subexp_standard): Adjust calls to
7571 call_function_by_hand. Handle functions and methods with unknown
7572 return type. Pass expect_type to call_function_by_hand.
7573 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7574 return type.
7575 * gcore.c (call_target_sbrk): Adjust call to
7576 call_function_by_hand.
7577 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7578 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7579 an integer address type instead of nodebug.
7580 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7581 call_function_by_hand.
7582 * infcall.c (error_call_unknown_return_type): New function.
7583 (call_function_by_hand): New "default_return_type" parameter.
7584 Pass it down.
7585 (call_function_by_hand_dummy): New "default_return_type"
7586 parameter. Use it instead of defaulting to int. If there's no
7587 default and the return type is unknown, throw an error. If
7588 there's a default return type, and the called function has no
7589 debug info, then assume the function is prototyped.
7590 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7591 New "default_return_type" parameter.
7592 (error_call_unknown_return_type): New declaration.
7593 * linux-fork.c (call_lseek): Cast return type of lseek.
7594 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7595 call_function_by_hand.
7596 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7597 calls to call_function_by_hand.
7598 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7599 return type.
7600 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7601 (value_nsstring, print_object_command): Adjust calls to
7602 call_function_by_hand.
7603 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7604 functions with unknown return type.
7605 (pascal_type_print_func_varspec_suffix): New function.
7606 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7607 TYPE_CODE_METHOD>: Use it.
7608 * python/py-value.c (valpy_call): Adjust call to
7609 call_function_by_hand.
7610 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7611 call_function_by_hand.
7612 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7613 call_function_by_hand.
7614 * valops.c (value_allocate_space_in_inferior): Adjust call to
7615 call_function_by_hand.
7616 * typeprint.c (type_print_unknown_return_type): New function.
7617 * typeprint.h (type_print_unknown_return_type): New declaration.
7618
54990598
PA
76192017-09-04 Pedro Alves <palves@redhat.com>
7620
7621 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7622 types with more than one parameter as prototyped.
7623
9a24775b
PA
76242017-09-04 Pedro Alves <palves@redhat.com>
7625
7626 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7627 (disassemble_command): Use gdb_disassembly_flags instead of bare
7628 int.
7629 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7630 (dump_insns, do_mixed_source_and_assembly_deprecated)
7631 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7632 Use gdb_disassembly_flags instead of bare int.
7633 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7634 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7635 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7636 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7637 (enum gdb_disassembly_flag): ... values of this new enumeration.
7638 (gdb_disassembly_flags): Define.
7639 (gdb_disassembly)
7640 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7641 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7642 gdb_disassembly_flags instead of bare int.
7643 * record-btrace.c (btrace_insn_history)
7644 (record_btrace_insn_history, record_btrace_insn_history_range)
7645 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7646 instead of bare int.
7647 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7648 Use gdb_disassembly_flags instead of bare int.
7649 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7650 Define.
7651 * target-delegates.c: Regenerate.
7652 * target.c (target_insn_history, target_insn_history_from)
7653 (target_insn_history_range): Use gdb_disassembly_flags instead of
7654 bare int.
7655 * target.h: Include "disasm.h".
7656 (struct target_ops) <to_insn_history, to_insn_history_from,
7657 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7658 int.
7659 (target_insn_history, target_insn_history_from)
7660 (target_insn_history_range): Use gdb_disassembly_flags instead of
7661 bare int.
7662
80a65e9b
SM
76632017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7664
7665 * cli/cli-script.c (build_command_line): For if/while commands,
7666 check whether args is empty.
7667
6b66338c
SM
76682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7669
7670 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7671 (enum command_control_type): Likewise.
7672 (struct command_line): Likewise.
7673 (free_command_lines): Likewise.
7674 (struct command_lines_deleter): Likewise.
7675 (command_line_up): Likewise.
7676 (read_command_lines): Likewise.
7677 (read_command_lines_1): Likewise.
7678 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7679 (enum command_control_type): Likewise.
7680 (struct command_line): Likewise.
7681 (free_command_lines): Likewise.
7682 (struct command_lines_deleter): Likewise.
7683 (command_line_up): Likewise.
7684 (read_command_lines): Likewise.
7685 (read_command_lines_1): Likewise.
7686 * breakpoint.h: Include cli/cli-script.h.
7687 * extension-priv.h: Likewise.
7688 * gdbcmd.h: Likewise.
7689
51abb421
PA
76902017-09-04 Pedro Alves <palves@redhat.com>
7691
7692 * ada-lang.c (is_known_support_routine): Move sal declaration to
7693 where it is initialized.
7694 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7695 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7696 (clear_command, update_static_tracepoint): Remove init_sal
7697 references. Move declarations closer to initializations.
7698 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7699 initializations.
7700 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7701 references. Move sal declarations closer to initializations.
7702 * frame.c (find_frame_sal): Return a symtab_and_line via function
7703 return instead of output parameter. Remove init_sal references.
7704 * frame.h (find_frame_sal): Return a symtab_and_line via function
7705 return instead of output parameter.
7706 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7707 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7708 instead of memset.
7709 (gdbscm_find_pc_line): Remove init_sal reference.
7710 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7711 references. Move declarations closer to initializations.
7712 * infcmd.c (set_step_frame): Update. Move declarations closer to
7713 initializations.
7714 (finish_backward): Remove init_sal references. Move declarations
7715 closer to initializations.
7716 * infrun.c (process_event_stop_test, handle_step_into_function)
7717 (insert_hp_step_resume_breakpoint_at_frame)
7718 (insert_step_resume_breakpoint_at_caller): Likewise.
7719 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7720 (symbol_to_sal): Likewise.
7721 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7722 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7723 to its initialization.
7724 * reverse.c (save_bookmark_command): Use new/delete. Remove
7725 init_sal references. Move declarations closer to initializations.
7726 * source.c (get_current_source_symtab_and_line): Remove brace
7727 initialization.
7728 (set_current_source_symtab_and_line): Now takes the sal by const
7729 reference. Remove brace initialization.
7730 (line_info): Remove init_sal reference.
7731 * source.h (set_current_source_symtab_and_line): Now takes a
7732 symtab_and_line via const reference.
7733 * stack.c (set_current_sal_from_frame): Adjust.
7734 (print_frame_info): Adjust.
7735 (get_last_displayed_sal): Return the sal via function return
7736 instead of via output parameter. Simplify.
7737 (frame_info): Adjust.
7738 * stack.h (get_last_displayed_sal): Return the sal via function
7739 return instead of via output parameter.
7740 * symtab.c (init_sal): Delete.
7741 (find_pc_sect_line): Remove init_sal references. Move
7742 declarations closer to initializations.
7743 (find_function_start_sal): Remove init_sal references. Move
7744 declarations closer to initializations.
7745 * symtab.h (struct symtab_and_line): In-class initialize all
7746 fields.
7747 * tracepoint.c (set_traceframe_context)
7748 (print_one_static_tracepoint_marker): Remove init_sal references.
7749 Move declarations closer to initializations.
7750 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7751 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7752 declarations closer to initializations.
7753 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7754 init_sal references. Adjust.
7755
6c5b2ebe
PA
77562017-09-04 Pedro Alves <palves@redhat.com>
7757
7758 * ax-gdb.c (agent_command_1): Use range-for.
7759 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7760 * breakpoint.c: Include "common/array-view.h".
7761 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7762 parameter from struct symtabs_and_lines to
7763 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7764 (breakpoint_sals_to_pc): Change sals parameter from struct
7765 symtabs_and_lines to std::vector reference.
7766 (check_fast_tracepoint_sals): Change sals parameter from struct
7767 symtabs_and_lines to std::array_view. Use range-for.
7768 (decode_static_tracepoint_spec): Return a std::vector instead of
7769 symtabs_and_lines. Update.
7770 (create_breakpoint): Update.
7771 (break_range_command, until_break_command, clear_command): Update.
7772 (base_breakpoint_decode_location, bkpt_decode_location)
7773 (bkpt_probe_create_sals_from_location)
7774 (bkpt_probe_decode_location, tracepoint_decode_location)
7775 (tracepoint_probe_decode_location)
7776 (strace_marker_create_sals_from_location): Return a std::vector
7777 instead of symtabs_and_lines.
7778 (strace_marker_create_breakpoints_sal): Update.
7779 (strace_marker_decode_location): Return a std::vector instead of
7780 symtabs_and_lines. Update.
7781 (update_breakpoint_locations): Change struct symtabs_and_lines
7782 parameters to gdb::array_view. Adjust.
7783 (location_to_sals): Return a std::vector instead of
7784 symtabs_and_lines. Update.
7785 (breakpoint_re_set_default): Use std::vector instead of struct
7786 symtabs_and_lines.
7787 (decode_location_default): Return a std::vector instead of
7788 symtabs_and_lines. Update.
7789 * breakpoint.h: Include "common/array-view.h".
7790 (struct breakpoint_ops) <decode_location>: Now returns a
7791 std::vector instead of returning a symtabs_and_lines via output
7792 parameter.
7793 (update_breakpoint_locations): Change sals parameters to use
7794 gdb::array_view.
7795 * cli/cli-cmds.c (edit_command, list_command): Update to use
7796 std::vector and gdb::array_view.
7797 (ambiguous_line_spec): Adjust to use gdb::array_view and
7798 range-for.
7799 (compare_symtabs): Rename to ...
7800 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7801 const reference and adjust.
7802 (filter_sals): Rewrite using std::vector and standard algorithms.
7803 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7804 (jump_command): Update to use std::vector.
7805 * linespec.c (struct linespec_state) <canonical_names>: Update
7806 comment.
7807 (add_sal_to_sals_basic): Delete.
7808 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7809 (decode_line_2, create_sals_line_offset)
7810 (convert_address_location_to_sals, convert_linespec_to_sals)
7811 (convert_explicit_location_to_sals, parse_linespec)
7812 (event_location_to_sals, decode_line_full, decode_line_1)
7813 (decode_line_with_current_source)
7814 (decode_line_with_last_displayed, decode_objc)
7815 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7816 (linespec_result::~linespec_result): Adjust to use std::vector
7817 instead of symtabs_and_lines.
7818 * linespec.h (linespec_sals::sals): Now a std::vector.
7819 (struct linespec_result): Use std::vector, bool, and in-class
7820 initialization.
7821 (decode_line_1, decode_line_with_current_source)
7822 (decode_line_with_last_displayed): Return std::vector.
7823 * macrocmd.c (info_macros_command): Use std::vector.
7824 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7825 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7826 std::vector.
7827 * probe.h (parse_probes): Return a std::vector.
7828 * python/python.c (gdbpy_decode_line): Use std::vector and
7829 gdb::array_view.
7830 * source.c (select_source_symtab, line_info): Use std::vector.
7831 * stack.c (func_command): Use std::vector.
7832 * symtab.h (struct symtabs_and_lines): Delete.
7833 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7834
7c44b49c
PA
78352017-09-04 Pedro Alves <palves@redhat.com>
7836
7837 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7838 unittests/array-view-selftests.c.
7839 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7840 * common/array-view.h: New file.
7841 * unittests/array-view-selftests.c: New file.
7842
e439fa14
PA
78432017-09-04 Pedro Alves <palves@redhat.com>
7844
7845 * cli/cli-cmds.c (edit_command): Pass message to
7846 ambiguous_line_spec.
7847 (list_command): Pass message to ambiguous_line_spec. Say
7848 "first"/"last" instead of "start" and "end" to be consistent with
7849 the manual.
7850 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7851 them to print formatted message.
7852
7525b645
PA
78532017-09-04 Pedro Alves <palves@redhat.com>
7854
7855 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7856 ftrace_update_insns by reference instead of pointer.
7857
badc0020
YQ
78582017-09-04 Yao Qi <yao.qi@linaro.org>
7859
7860 * i386-go32-tdep.c: Include x86-xstate.h.
7861 (i386_go32_init_abi): Call i386_target_description.
7862 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7863 if xcr0 is X86_XSTATE_X87_MASK.
7864 * i386-tdep.h (tdesc_i386): Remove the declaration.
7865 (tdesc_i386_mmx): Likewise.
7866
d78bdb54
YQ
78672017-09-04 Yao Qi <yao.qi@linaro.org>
7868
7869 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7870 X86_XSTATE_SSE_MASK instead of 0.
7871
ca1fa5ee
YQ
78722017-09-04 Yao Qi <yao.qi@linaro.org>
7873
7874 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7875 i386_target_description.
7876 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7877 i386_target_description.
7878 * i386-tdep.c (i386_gdbarch_init): Likewise.
7879
2434b019
YQ
78802017-09-04 Yao Qi <yao.qi@linaro.org>
7881
7882 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7883 (x86_darwin_init_abi_64): Call amd64_target_description.
7884 * amd64-dicos-tdep.c: Likewise.
7885 * amd64-fbsd-nat.c: Likewise.
7886 * amd64-fbsd-tdep.c: Likewise.
7887 * amd64-nbsd-tdep.c: Likewise.
7888 * amd64-obsd-tdep.c: Likewise.
7889 * amd64-sol2-tdep.c: Likewise.
7890 * amd64-windows-tdep.c: Likewise.
7891 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7892
0860c437
SM
78932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7894
7895 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7896 (btrace_function) <insn>: Change type to use std::vector.
7897 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7898 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7899 ftrace_update_insns, ftrace_compute_global_level_offset,
7900 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7901 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7902 change to std::vector.
7903 (ftrace_update_insns): Adjust to change to std::vector, change
7904 type of INSN parameter.
7905 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7906 * record-btrace.c (btrace_call_history_insn_range,
7907 btrace_compute_src_line_range,
7908 record_btrace_frame_prev_register): Adjust to change to
7909 std::vector.
7910 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7911 to change to std::vector.
7912
0638b7f9
TT
79132017-09-03 Tom Tromey <tom@tromey.com>
7914
7915 * corefile.c (reopen_exec_file): Use std::string.
7916
8f84fb0e
TT
79172017-09-03 Tom Tromey <tom@tromey.com>
7918
7919 * compile/compile.c (compile_register_name_mangled): Return
7920 std::string.
7921 * compile/compile-loc2c.c (pushf_register_address): Update.
7922 (pushf_register): Update.
7923 * compile/compile-c-types.c (convert_array): Update.
7924 * compile/compile-c-symbols.c (generate_vla_size): Update.
7925 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7926 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7927 (convert_one_symbol): Update.
7928 (generate_c_for_for_one_variable): Update.
7929 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7930 std::string.
7931 (generate_register_struct): Update.
7932 * compile/compile-internal.h (c_get_range_decl_name): Return a
7933 std::string.
7934 (compile_register_name_mangled): Return std::string.
7935
18e9961f
TT
79362017-09-03 Tom Tromey <tom@tromey.com>
7937
7938 * utils.c (perror_string): Return a std::string.
7939 (throw_perror_with_name, perror_warning_with_name): Update.
7940
45343786
TT
79412017-09-03 Tom Tromey <tom@tromey.com>
7942
7943 * demangle.c (demangle_command): Use std::string,
7944 unique_xmalloc_ptr.
7945
b57af503
TT
79462017-09-03 Tom Tromey <tom@tromey.com>
7947
7948 * cli/cli-setshow.c (do_set_command): Use std::string.
7949
6eecf35f
TT
79502017-09-03 Tom Tromey <tom@tromey.com>
7951
7952 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7953
56496dd4
TT
79542017-09-03 Tom Tromey <tom@tromey.com>
7955
7956 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7957
e91a1fa7
TT
79582017-09-03 Tom Tromey <tom@tromey.com>
7959
7960 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7961 gdb::unique_xmalloc_ptr.
7962
7ffd83d7
TT
79632017-09-03 Tom Tromey <tom@tromey.com>
7964
7965 * thread.c (print_thread_info_1): Use string_printf.
7966 (thread_apply_command, thread_apply_all_command): Use
7967 std::string.
7968
1ccbe998
TT
79692017-09-03 Tom Tromey <tom@tromey.com>
7970
7971 * valprint.c (val_print_string): Update.
7972 * gdbcore.h (memory_error_message): Return std::string.
7973 * corefile.c (memory_error_message): Return std::string.
7974 (memory_error): Update.
7975 * breakpoint.c (insert_bp_location): Update.
7976
23fdd69e
SM
79772017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7978
7979 * target/waitstatus.h (target_waitstatus_to_string): Change
7980 return type to std::string.
7981 * target/waitstatus.c (target_waitstatus_to_string): Return
7982 std::string.
7983 * target.h (target_waitstatus_to_string): Remove declaration.
7984 * infrun.c (resume, clear_proceed_status_thread,
7985 print_target_wait_results, do_target_wait, save_waitstatus,
7986 stop_all_threads): Adjust.
7987 * record-btrace.c (record_btrace_wait): Adjust.
7988 * target-debug.h
7989 (target_debug_print_struct_target_waitstatus_p): Adjust.
7990
5c811d30
JK
79912017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7992
7993 PR gdb/22046
7994 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7995 detection.
7996
0a2dde4a
SDJ
79972017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7998
7999 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8000 for setting/unsetting environment variables on the remote target.
8001 (New remote packets): Add entries for QEnvironmentHexEncoded,
8002 QEnvironmentUnset and QEnvironmentReset.
8003 * common/environ.c (gdb_environ::operator=): Extend method to
8004 handle m_user_set_env_list and m_user_unset_env_list.
8005 (gdb_environ::clear): Likewise.
8006 (match_var_in_string): Change type of first parameter from 'char
8007 *' to 'const char *'.
8008 (gdb_environ::set): Extend method to handle
8009 m_user_set_env_list and m_user_unset_env_list.
8010 (gdb_environ::unset): Likewise.
8011 (gdb_environ::clear_user_set_env): New method.
8012 (gdb_environ::user_set_envp): Likewise.
8013 (gdb_environ::user_unset_envp): Likewise.
8014 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8015 m_user_unset_env_list on move constructor/assignment.
8016 (unset): Add new default parameter 'update_unset_list = true'.
8017 (clear_user_set_env): New method.
8018 (user_set_envp): Likewise.
8019 (user_unset_envp): Likewise.
8020 (m_user_set_env_list): New std::set.
8021 (m_user_unset_env_list): Likewise.
8022 * common/rsp-low.c (hex2str): New function.
8023 (bin2hex): New overload for bin2hex function.
8024 * common/rsp-low.c (hex2str): New prototype.
8025 (str2hex): New overload prototype.
8026 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8027 QEnvironmentUnset and QEnvironmentReset.
8028 (remote_protocol_features): Add QEnvironmentHexEncoded,
8029 QEnvironmentUnset and QEnvironmentReset packets.
8030 (send_environment_packet): New function.
8031 (extended_remote_environment_support): Likewise.
8032 (extended_remote_create_inferior): Call
8033 extended_remote_environment_support.
8034 (_initialize_remote): Add QEnvironmentHexEncoded,
8035 QEnvironmentUnset and QEnvironmentReset packet configs.
8036 * unittests/environ-selftests.c (gdb_selftest_env_var):
8037 New variable.
8038 (test_vector_initialization): New function.
8039 (test_init_from_host_environ): Likewise.
8040 (test_reinit_from_host_environ): Likewise.
8041 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8042 Likewise.
8043 (test_unset_set_empty_vector): Likewise.
8044 (test_vector_clear): Likewise.
8045 (test_std_move): Likewise.
8046 (test_move_constructor):
8047 (test_self_move): Likewise.
8048 (test_set_unset_reset): Likewise.
8049 (run_tests): Rewrite in terms of the functions above.
8050
654670a4
WP
80512017-08-31 Weimin Pan <weimin.pan@oracle.com>
8052
8053 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8054 (adi_available): Use a temp variable of type CORE_ADDR as argument
8055 3 when calling target_auxv_search.
8056 (adi_normalize_address): Use masks and xor operators to calculate
8057 normalized address.
8058 (adi_read_versions, adi_write_versions, adi_print_versions)
8059 (do_examine, do_assign): Use paddress.
8060
7755ddb7
JB
80612017-08-29 John Baldwin <jhb@FreeBSD.org>
8062
8063 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8064 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8065 out of loop and add supply of FIR.
8066 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8067 add collect of FIR.
8068
fd437cbc
SM
80692017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8070
3804a343 8071 PR gdb/21827
fd437cbc
SM
8072 * cli/cli-script.c (define_command): Don't convert command name
8073 to lower case.
8074
988f6b3d
JB
80752017-08-25 Joel Brobecker <brobecker@adacore.com>
8076
8077 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8078 Update all callers accordingly. Remove all code blocks handling
8079 the case where DISPP is not NULL.
8080
663c44ac
JK
80812017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8082
8083 PR symtab/22003
8084 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8085 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8086 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8087
f1902523
JK
80882017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8089
8090 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8091 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8092 (read_comp_units_from_section): New parameter abbrev_section, use
8093 read_and_check_comp_unit_head, allocate signatured_type if needed.
8094 (create_all_comp_units): Update read_comp_units_from_section caller.
8095
87215ad1
SDJ
80962017-08-23 Pedro Alves <palves@redhat.com>
8097
8098 PR remote/21852
8099 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8100 to null_ptid and switch to thread without reading the registers
8101 after adding the inferior.
8102
6e41ddec
JK
81032017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8104
8105 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8106 compile-gcc.
8107 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8108 (compile_to_object): Implement compile_gcc.
8109 (_initialize_compile): Install "set compile-gcc". Initialize
8110 compile_gcc.
8111
e68c32d5
JK
81122017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8113
8114 * compile/compile.c (compile_to_object): Conditionally call
8115 set_verbose. Conditionally call compile or compile_v0.
8116
58afddc6
WP
81172017-08-07 Weimin Pan <weimin.pan@oracle.com>
8118
8119 * sparc64-tdep.h: (adi_normalize_address): New export.
8120 * sparc-nat.h: (open_adi_tag_fd): New export.
8121 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8122 * sparc64-linux-tdep.c:
8123 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8124 (sparc64_linux_handle_segmentation_fault): New function.
8125 (sparc64_linux_init_abi): Register
8126 sparc64_linux_handle_segmentation_fault
8127 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8128 (sparc64_addr_bits_remove): New function.
8129 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8130 (MAX_PROC_NAME_SIZE): New macro.
8131 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8132 (sparc64adilist): New variable.
8133 (adi_proc_list): New variable.
8134 (find_adi_info): New function.
8135 (add_adi_info): New function.
8136 (get_adi_info_proc): New function.
8137 (get_adi_info): New function.
8138 (info_adi_command): New function.
8139 (read_maps_entry): New function.
8140 (adi_available): New function.
8141 (adi_normalize_address): New function.
8142 (adi_align_address): New function.
8143 (adi_convert_byte_count): New function.
8144 (adi_tag_fd): New function.
8145 (adi_is_addr_mapped): New function.
8146 (adi_read_versions): New function.
8147 (adi_write_versions): New function.
8148 (adi_print_versions): New function.
8149 (do_examine): New function.
8150 (do_assign): New function.
8151 (adi_examine_command): New function.
8152 (adi_assign_command): New function.
8153 (_initialize_sparc64_adi_tdep): New function.
8154
11db9430
SM
81552017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8156
8157 * breakpoint.c (breakpoints_info): Rename to ...
8158 (info_breakpoints_command): ... this.
8159 (watchpoints_info): Rename to ...
8160 (info_watchpoints_command): ... this.
8161 (tracepoints_info): Rename to ...
8162 (info_tracepoints_command): ... this.
8163 (_initialize_breakpoint): Adjust.
8164 * dcache.c (dcache_info): Rename to ...
8165 (info_display_command): ... this.
8166 (_initialize_dcache): Adjust.
8167 * frame.h (args_info): Rename to ...
8168 (info_args_command): ... this.
8169 (locals_info): Rename to ...
8170 (info_locals_command): ... this.
8171 * infcmd.c (nofp_registers_info): Rename to ...
8172 (info_registers_command): ... this.
8173 (float_info): Rename to ...
8174 (info_float_command): ... this.
8175 (program_info): Rename to ...
8176 (info_program_command): ... this.
8177 (all_registers_info): Rename to ...
8178 (info_all_registers_command): ... this.
8179 (vector_info): Rename to ...
8180 (info_vector_command): ... this.
8181 (float_info): Rename to ...
8182 (info_float_command): ... this.
8183 (_initialize_infcmd): Adjust.
8184 * inferior.h (term_info): Rename to ...
8185 (info_terminal_command): ... this.
8186 * inflow.c (term_info): Rename to ...
8187 (info_terminal_command): ... this.
8188 (_initialize_inflow): Adjust.
8189 * infrun.c (signals_info): Rename to ...
8190 (info_signals_command): ... this.
8191 (_initialize_infrun): Adjust.
8192 * objc-lang.c (classes_info): Rename to ...
8193 (info_classes_command): ... this.
8194 (selectors_info): Rename to ...
8195 (info_selectors_command): ... this.
8196 (_initialize_objc_language): Adjust.
8197 * printcmd.c (sym_info): Rename to ...
8198 (info_symbol_command): ... this.
8199 (address_info): Rename to ...
8200 (info_address_command): ... this.
8201 (display_info): Rename to ...
8202 (info_display_command): ... this.
8203 (_initialize_printcmd): Adjust.
8204 * reverse.c (bookmarks_info): Rename to ...
8205 (info_breakpoints_command): ... this.
8206 (_initialize_reverse): Adjust.
8207 * ser-go32.c (dos_info): Rename to ...
8208 (info_serial_command): ... this.
8209 (_initialize_ser_dos): Adjust.
8210 * skip.c (skip_info): Rename to ...
8211 (info_skip_command): ... this.
8212 (_initialize_step_skip): Adjust.
8213 * source.c (line_info): Rename to ...
8214 (info_line_command): ... this.
8215 (source_info): Rename to ...
8216 (info_source_command)
8217 * stack.c (frame_info): Rename to ...
8218 (info_frame_command): ... this.
8219 (locals_info): Rename to ...
8220 (info_locals_command): ... this.
8221 (args_info): Rename to ...
8222 (info_args_command): ... this.
8223 (_initialize_stack): Adjust.
8224 * symtab.c (sources_info): Rename to ...
8225 (info_sources_command): ... this.
8226 (variables_info): Rename to ...
8227 (info_variables_command): ... this.
8228 (functions_info): Rename to ...
8229 (info_functions_command): ... this.
8230 (types_info): Rename to ...
8231 (info_types_command): ... this.
8232 (_initialize_symtab): Adjust.
8233 * target.c (target_info): Rename to ...
8234 (info_target_command): ... this.
8235 (initialize_targets): Adjust.
8236 * tracepoint.c (tvariables_info): Rename to ...
8237 (info_tvariables_command): ... this.
8238 (scope_info): Rename to ...
8239 (info_scope_command): ... this.
8240 (trace_dump_actions): Adjust.
8241 (_initialize_tracepoint): Adjust.
8242
b270e6f9
TT
82432017-08-22 Tom Tromey <tom@tromey.com>
8244
8245 * breakpoint.h (install_breakpoint): Update.
8246 * breakpoint.c (add_solib_catchpoint): Update.
8247 (install_breakpoint): Change argument to a std::unique_ptr.
8248 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8249 (create_breakpoint_sal, create_breakpoint): Update.
8250 (watch_command_1, catch_exec_command_1)
8251 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8252 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8253 Return the breakpoint.
8254 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8255 (new_single_step_breakpoint): Update.
8256 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8257 std::unique_ptr.
8258 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8259 std::unique_ptr.
8260 * break-catch-sig.c (create_signal_catchpoint): Use
8261 std::unique_ptr.
8262 * ada-lang.c (create_ada_exception_catchpoint): Use
8263 std::unique_ptr.
8264
36bd8eaa
TT
82652017-08-22 Tom Tromey <tom@tromey.com>
8266
8267 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8268
56f37645
TT
82692017-08-22 Tom Tromey <tom@tromey.com>
8270
8271 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8272 (lookup_partial_symbol): Update.
8273
0b581c69
TT
82742017-08-22 Tom Tromey <tom@tromey.com>
8275
8276 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8277 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8278 (find_and_open_source, symtab_to_fullname): Update.
8279 * psymtab.c (psymtab_to_fullname): Update.
8280
14278e1f
TT
82812017-08-22 Tom Tromey <tom@tromey.com>
8282
8283 * exec.c (exec_file_attach): Update.
8284 * linux-thread-db.c (try_thread_db_load): Update.
8285 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8286 * utils.c (gdb_realpath): Change return type.
8287 (gdb_realpath_keepfile): Update.
8288 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8289 (_initialize_utils): Register the new self test.
8290 * source.c (openp): Update.
8291 (find_and_open_source): Update.
8292 * nto-tdep.c (nto_find_and_open_solib): Update.
8293 * main.c (set_gdb_data_directory): Update.
8294 (captured_main_1): Update.
8295 * dwarf2read.c (dwarf2_get_dwz_file): Update
8296 (dw2_map_symbol_filenames): Update.
8297 * auto-load.c (auto_load_safe_path_vec_update): Update.
8298 (filename_is_in_auto_load_safe_path_vec): Change type of
8299 "filename_realp".
8300 (auto_load_objfile_script): Update.
8301 (file_is_auto_load_safe): Update. Use std::string.
8302 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8303
4971c9a7
TT
83042017-08-22 Tom Tromey <tom@tromey.com>
8305
8306 * utils.c (gdb_realpath_keepfile): Return a
8307 gdb::unique_xmalloc_ptr.
8308 * exec.c (exec_file_attach): Update.
8309 * utils.h (gdb_realpath_keepfile): Return a
8310 gdb::unique_xmalloc_ptr.
8311
e3e41d58
TT
83122017-08-22 Tom Tromey <tom@tromey.com>
8313
8314 * compile/compile.c (compile_file_command): Use
8315 gdb::unique_xmalloc_ptr, std::string.
8316 * utils.c (gdb_abspath): Change return type.
8317 * source.c (openp): Update.
8318 * objfiles.c (allocate_objfile): Update.
8319 * main.c (set_gdb_data_directory): Update.
8320 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8321
0d999a6e
ZZ
83222017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8323
8324 * cli-cmds.c (list_commands): List actual code around more than
8325 one location.
8326
329d5e7e
JB
83272017-08-21 John Baldwin <jhb@FreeBSD.org>
8328
8329 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8330
bf223d3e
PA
83312017-08-21 Pedro Alves <palves@redhat.com>
8332
8333 PR gdb/19487
8334 * c-exp.y (variable production): Handle function aliases.
8335 * minsyms.c (msymbol_is_text): New function.
8336 * minsyms.h (msymbol_is_text): Declare.
8337 * symtab.c (find_function_alias_target): New function.
8338 * symtab.h (find_function_alias_target): Declare.
8339
c973d0aa
PA
83402017-08-21 Pedro Alves <palves@redhat.com>
8341
8342 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8343 typedefs.
8344 * typeprint.c (whatis_exp): If handling "whatis", and expression
8345 is OP_TYPE, strip one typedef level. Otherwise don't strip
8346 typedefs here.
8347 * valops.c (value_cast): Save "to" type before resolving
8348 stubs/typedefs. Use that type as resulting value's type.
8349
2989a365
TT
83502017-08-18 Tom Tromey <tom@tromey.com>
8351 Pedro Alves <palves@redhat.com>
8352
8353 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8354 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8355 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8356 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8357 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8358 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8359 (linux_get_siginfo_data): Add "thread" argument. Use
8360 scoped_restore.
8361 * linux-nat.c (linux_child_follow_fork)
8362 (check_stopped_by_watchpoint): Use scoped_restore.
8363 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8364 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8365 (restore_inferior_ptid, save_inferior_ptid): Remove.
8366 * btrace.c (btrace_fetch): Use scoped_restore.
8367 * bsd-uthread.c (bsd_uthread_fetch_registers)
8368 (bsd_uthread_store_registers): Use scoped_restore.
8369 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8370 scoped_restore.
8371 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8372 (aix_thread_xfer_partial): Use scoped_restore.
8373 * inferior.h (save_inferior_ptid): Remove.
8374
e60eb288
YQ
83752017-08-18 Yao Qi <yao.qi@linaro.org>
8376
8377 PR tdep/21818
8378 * arm-tdep.c (gdb_print_insn_arm): Mark
8379 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8380
6d580b63
YQ
83812017-08-18 Yao Qi <yao.qi@linaro.org>
8382
8383 * NEWS: Mention GDBserver's new option "--selftest".
8384 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8385 * selftest.c: Move it to common/selftest.c.
8386 * selftest.h: Move it to common/selftest.h.
8387 * selftest-arch.c (reset): New function.
8388 (tests_with_arch): Call reset.
8389
86dcbf50
YQ
83902017-08-18 Yao Qi <yao.qi@linaro.org>
8391
8392 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8393 instead of exception_fprintf and printf_filtered.
8394
7649770c
YQ
83952017-08-18 Yao Qi <yao.qi@linaro.org>
8396
8397 * selftest.c (register_self_test): Rename it to
8398 selftests::register_test.
8399 (run_self_tests): selftest::run_tests.
8400 * selftest.h: Update declarations.
8401 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8402 selftests::register_test_foreach_arch.
8403 * selftest-arch.h: Update declaration.
8404 * aarch64-tdep.c: Update.
8405 * arm-tdep.c: Likewise.
8406 * disasm-selftests.c: Likewise.
8407 * dwarf2loc.c: Likewise.
8408 * dwarf2-frame.c: Likewise.
8409 * findvar.c: Likewise.
8410 * gdbarch-selftests.c: Likewise.
8411 * maint.c (maintenance_selftest): Likewise.
8412 * regcache.c: Likewise.
8413 * rust-exp.y: Likewise.
8414 * selftest-arch.c: Likewise.
8415 * unittests/environ-selftests.c: Likewise.
8416 * unittests/function-view-selftests.c: Likewise.
8417 * unittests/offset-type-selftests.c: Likewise.
8418 * unittests/optional-selftests.c: Likewise.
8419 * unittests/scoped_restore-selftests.c: Likewise.
8420 * utils-selftests.c: Likewise.
8421
b0cba12e
PA
84222017-08-17 Pedro Alves <palves@redhat.com>
8423
8424 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8425 local.
8426
4c8aa72d
PA
84272017-08-17 Pedro Alves <palves@redhat.com>
8428
8429 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8430 field.
8431 (reset_die_in_process): Delete, replaced by ...
8432 (process_die_scope): ... this new class. Make it responsible for
8433 freeing cu->line_header too.
8434 (process_die): Use process_die_scope.
8435 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8436 cu->line_header_die_owner. Don't release the line header if it's
8437 owned by the CU.
8438 (setup_type_unit_groups): Make the CU/DIE own the line header.
8439 Don't release the line header here.
8440
ba713918
AL
84412017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8442
8443 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8444
44d0fb3a
RK
84452017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8446
8447 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8448 Single-Key mode
8449
a5afdb16
RK
84502017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8451
8452 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8453 mode command list.
8454
47613aeb
SH
84552017-08-15 Stafford Horne <shorne@gmail.com>
8456
8457 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8458
9c3cc999
SH
84592017-08-15 Stafford Horne <shorne@gmail.com>
8460
8461 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8462
206726fb
SDJ
84632017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8464
8465 PR gdb/21954
8466 * infcmd.c (unset_environment_command): Use the 'clear' method on
8467 the environment instead of resetting it.
8468
0335ac6d
JB
84692017-08-15 John Baldwin <jhb@FreeBSD.org>
8470
8471 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8472 platforms.
8473
d3abe1c8
TT
84742017-08-14 Tom Tromey <tom@tromey.com>
8475
8476 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8477 (print_binary_chars): Likewise.
8478 (BITS_IN_BYTES): Remove.
8479
d6382fff
TT
84802017-08-14 Tom Tromey <tom@tromey.com>
8481
8482 PR gdb/21675
8483 * valprint.c (LOW_ZERO): Change value to 034.
8484 (print_octal_chars): Add static_asserts for octal constants.
8485 * printcmd.c (print_scalar_formatted): Add 'd' case.
8486
f978cb06
TT
84872017-08-11 Tom Tromey <tom@tromey.com>
8488
8489 * symfile.c (add_symbol_file_command): Use std::vector.
8490
2f5404b3
TT
84912017-08-14 Tom Tromey <tom@tromey.com>
8492
8493 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8494 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8495 std::move.
8496 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8497
de7985c3
PA
84982017-08-11 Pedro Alves <palves@redhat.com>
8499
8500 * infrun.c (process_event_stop_test): Adjust
8501 function_name_is_marked_for_skip call.
8502 * skip.c: Include <list>.
8503 (skiplist_entry): Make it a class with private fields, and
8504 getters/setters.
8505 (skiplist_entry_chain): Delete.
8506 (skiplist_entries): New.
8507 (skiplist_entry_count): Delete.
8508 (highest_skiplist_entry_num): New.
8509 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8510 (add_skiplist_entry): Delete.
8511 (skiplist_entry::skiplist_entry): New.
8512 (skiplist_entry::add_entry): New.
8513 (skip_file_command, skip_function): Adjust.
8514 (compile_skip_regexp): Delete.
8515 (skip_command): Don't compile regexp here. Adjust to use
8516 skiplist_entry::add_entry.
8517 (skip_info): Adjust to use range-for and getters.
8518 (skip_enable_command, skip_disable_command): Adjust to use
8519 range-for and setters.
8520 (skip_delete_command): Adjust to use std::list.
8521 (add_skiplist_entry): Delete.
8522 (skip_file_p): Delete, refactored as ...
8523 (skiplist_entry::do_skip_file_p): ... this new method.
8524 (skip_gfile_p): Delete, refactored as ...
8525 (skiplist_entry::do_gskip_file_p): ... this new method.
8526 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8527 (skiplist_entry::skip_function_p): ... this new method.
8528 (function_name_is_marked_for_skip): Now returns bool, and takes
8529 the function sal by const reference. Adjust to use range-for and
8530 skiplist_entry methods.
8531 (_initialize_step_skip): Remove references to
8532 skiplist_entry_chain, skiplist_entry_count.
8533 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8534 takes the function sal by const reference.
8535
be7d3cd5
YQ
85362017-08-11 Yao Qi <yao.qi@linaro.org>
8537
8538 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8539 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8540 (dwarf2_frame_cache):
8541 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8542 RETURN_MASK_ALL and set *this_case to NULL.
8543 * frame-unwind.h: Update comments.
8544
1c90d9f0
YQ
85452017-08-11 Yao Qi <yao.qi@linaro.org>
8546
8547 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8548 (dwarf2_frame_state_copy_regs): Remove.
8549 (dwarf2_frame_state_free_regs): Remove.
8550 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8551 (dwarf2_restore_rule): Call method .alloc_regs instead of
8552 dwarf2_frame_state_alloc_regs.
8553 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8554 constructor. Call std::move.
8555 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8556 (dwarf2_frame_cache): Likewise.
8557
8558 [GDB_SELF_TEST]: Include selftest.h and
8559 selftest-arch.h.
8560 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8561 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8562 execute_cfa_program_test.
8563
8564 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8565 copy ctor, assignment operator, move assignment.
8566 <alloc_regs>: New method.
8567 <swap>: New method.
8568 (struct dwarf2_frame_state): Delete dtor.
8569 (dwarf2_frame_state_alloc_regs): Remove declaration.
8570 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8571 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8572
afe37d6b
YQ
85732017-08-11 Yao Qi <yao.qi@linaro.org>
8574
8575 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8576 (dwarf2_frame_state::dwarf2_frame_state): New.
8577 (dwarf2_frame_state::~dwarf2_frame_state): New.
8578 (dwarf2_fetch_cfa_info): Update.
8579 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8580 rather than a pointer. Update code.
8581 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8582 dtor.
8583 <data_align, code_align, retaddr_column>: Change them to const.
8584 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8585 to bool.
8586
b348037f
YQ
85872017-08-11 Yao Qi <yao.qi@linaro.org>
8588
8589 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8590 <loc.exp>: New field.
8591 * dwarf2-frame.c (execute_cfa_program): Update.
8592 (dwarf2_frame_prev_register): Update.
8593
e7c9de26
PA
85942017-08-10 Pedro Alves <palves@redhat.com>
8595
8596 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8597
e8c6b620
JB
85982017-08-09 John Baldwin <jhb@FreeBSD.org>
8599
8600 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8601 (fbsd_pending_children): Use std::list.
8602 (fbsd_remember_child): Likewise.
8603 (fbsd_is_child_pending): Likewise.
8604 (fbsd_pending_vfork_done): Use std::forward_list.
8605 (fbsd_add_vfork_done): Likewise.
8606 (fbsd_is_vfork_done_pending): Likewise.
8607 (fbsd_next_vfork_done): Likewise.
8608
e4a26669
JB
86092017-08-09 John Baldwin <jhb@FreeBSD.org>
8610
8611 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8612 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8613 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8614 for `mapfilename'.
8615 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8616 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8617
142311d3
JB
86182017-08-09 John Baldwin <jhb@FreeBSD.org>
8619
8620 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8621 "filestuff.h".
8622 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8623
42fa2e0e
TT
86242017-08-09 Tom Tromey <tom@tromey.com>
8625
8626 * skip.c (skiplist_entry): New constructor.
8627 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8628 (skiplist_entry::file_is_glob): Now bool.
8629 (skiplist_entry::file, skiplist_entry::function): Now
8630 std::string.
8631 (make_skip_entry): Return a unique_ptr. Use new.
8632 (free_skiplist_entry, free_skiplist_entry_cleanup)
8633 (make_free_skiplist_entry_cleanup): Remove.
8634 (skip_command, skip_disable_command, add_skiplist_entry)
8635 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8636 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8637 (function_name_is_marked_for_skip): Update.
8638 (skip_delete_command): Update. Use delete.
8639
cd3af38d
JW
86402017-08-09 Jiong Wang <jiong.wang@arm.com>
8641
8642 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8643 (aarch64_linux_core_read_description): New function.
8644 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8645
29592bde
PA
86462017-08-09 Pedro Alves <palves@redhat.com>
8647
8648 * cp-name-parser.y (cp_comp_to_string): Return a
8649 gdb::unique_xmalloc_ptr<char>.
8650 * cp-support.c (replace_typedefs_qualified_name)
8651 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8652 (cp_canonicalize_string_full): Use op= instead of explicit
8653 convertion.
8654 (cp_class_name_from_physname, method_name_from_physname)
8655 (cp_func_name, cp_remove_params): Adjust to use
8656 gdb::unique_xmalloc_ptr<char>.
8657 * cp-support.h (cp_comp_to_string): Return a
8658 gdb::unique_xmalloc_ptr<char>.
8659 * python/py-type.c (typy_lookup_type): Adjust to use
8660 gdb::unique_xmalloc_ptr<char>.
8661
b3340438
L
86622017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8663
8664 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8665
e88e8651
YQ
86662017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8667 Yao Qi <yao.qi@linaro.org>
8668
8669 * cp-support.c (cp_canonicalize_string_full): Use
8670 gdb::unique_xmalloc_ptr<char>.
8671 (cp_canonicalize_string): Likewise.
8672
f5a29eb0
YQ
86732017-08-09 Yao Qi <yao.qi@linaro.org>
8674
8675 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8676 * regformats/i386/amd64-avx-avx512.dat: Remove.
8677 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8678 * regformats/i386/amd64-avx-mpx.dat:Remove.
8679 * regformats/i386/amd64-avx.dat: Remove.
8680 * regformats/i386/amd64-mpx.dat: Remove.
8681 * regformats/i386/i386-avx-avx512.dat: Remove.
8682 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8683 * regformats/i386/i386-avx-mpx.dat: Remove.
8684 * regformats/i386/i386-mmx.dat: Remove.
8685 * regformats/i386/i386-mpx.dat: Remove.
8686
57757c2f
YQ
86872017-08-09 Yao Qi <yao.qi@linaro.org>
8688
8689 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8690 * amd64-tdep.c: Don't include features/i386/x32*.c.
8691 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8692 functions.
8693 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8694 and i386/x32-avx-avx512.
8695 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8696 and i386/x32.xml.
8697 * features/i386/x32-avx-avx512.c: Removed.
8698 * features/i386/x32-avx-avx512.xml: Removed.
8699 * features/i386/x32-avx.c: Removed.
8700 * features/i386/x32-avx.xml: Removed.
8701 * features/i386/x32.c: Removed.
8702 * features/i386/x32.xml: Removed.
8703 * regformats/i386/x32-avx-avx512.dat: Removed.
8704 * regformats/i386/x32-avx.dat: Removed.
8705 * regformats/i386/x32.dat: Removed.
8706
ba7b109b
MR
87072017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8708
8709 PR breakpoints/21886
8710 * mem-break.c (default_memory_insert_breakpoint): Use
8711 `->placed_address' rather than `->reqstd_address' for the
8712 breakpoint location.
8713
e347efc3
MR
87142017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8715
8716 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8717 assertions.
8718
0dba2a6c
MR
87192017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8720
8721 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8722 a union of `tdep_info', `tdesc_data' and `id'.
8723 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8724 rather than `info.tdep_info'.
8725 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8726 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8727 * i386-tdep.c (i386_gdbarch_init): Likewise.
8728 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8729 * mips-tdep.c (mips_gdbarch_init): Likewise.
8730 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8731 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8732 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8733 `info.tdep_info'.
8734 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8735 `info.tdep_info'.
8736 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8737 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8738 `info.tdep_info'.
8739 * spu-tdep.c (spu_gdbarch_init): Likewise.
8740 * gdbarch.h: Regenerate.
8741
16eb6b2d
LS
87422017-08-07 Leszek Swirski <leszeks@google.com>
8743
7b005726 8744 PR symtab/20899
16eb6b2d
LS
8745 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8746
74cbb09e
SM
87472017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8748
8749 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8750 (gdbsim_open): Rename gdb_argv args object to argv.
8751
ee0c3293
TT
87522017-08-05 Tom Tromey <tom@tromey.com>
8753
8754 * compile/compile-object-load.c (compile_object_load): Use
8755 gdb::unique_xmalloc_ptr.
8756 * cli/cli-dump.c (scan_filename): Rename from
8757 scan_filename_with_cleanup. Change return type.
8758 (scan_expression): Rename from scan_expression_with_cleanup.
8759 Change return type.
8760 (dump_memory_to_file, dump_value_to_file, restore_command):
8761 Use gdb::unique_xmalloc_ptr. Update.
8762 * cli/cli-cmds.c (find_and_open_script): Use
8763 gdb::unique_xmalloc_ptr.
8764 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8765 * symmisc.c (maintenance_print_symbols)
8766 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8767 * symfile.c (symfile_bfd_open, generic_load)
8768 (add_symbol_file_command, remove_symbol_file_command): Use
8769 gdb::unique_xmalloc_ptr.
8770 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8771 * psymtab.c (maintenance_print_psymbols): Use
8772 gdb::unique_xmalloc_ptr.
8773 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8774 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8775 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8776 (reload_shared_libraries_1): Likewise.
8777
3232fabd
TT
87782017-08-05 Tom Tromey <tom@tromey.com>
8779
8780 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8781 (rust_op_vector, rust_set_vector): New typedefs.
8782 (current_parser): New global.
8783 (work_obstack): Change to pointer type. Update all users.
8784 (rust_ast, pstate): Remove globals.
8785 (struct rust_parser): New.
8786 (%union) <params, field_inits>: Change type.
8787 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8788 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8789 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8790 (convert_params_to_types, convert_params_to_expression): Change
8791 type of "params".
8792 (ast_string): Change type of "fields".
8793 (rust_parse): Make a rust_parser. Remove cleanups.
8794 (rust_lex_tests): Make and install an auto_obstack.
8795
f02fd774
YQ
87962017-08-04 Yao Qi <yao.qi@linaro.org>
8797
8798 * configure.srv (ipa_x32_linux_regobj): New.
8799 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8800 instead of X86_TDESC_AVX512.
8801 (initialize_low_tracepoint): Call
8802 init_registers_x32_avx_avx512_linux.
8803
91975afd
YQ
88042017-08-04 Yao Qi <yao.qi@linaro.org>
8805
8806 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8807
2331fa3a
RK
88082017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8809
8810 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8811
744e4fe1
TT
88122017-08-03 Tom Tromey <tom@tromey.com>
8813
8814 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8815 Remove.
8816 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8817
1c034b67
TT
88182017-08-03 Tom Tromey <tom@tromey.com>
8819
8820 * python/py-param.c (compute_enum_values): Use gdb_argv.
8821
773a1edc
TT
88222017-08-03 Tom Tromey <tom@tromey.com>
8823
8824 * utils.h (struct gdb_argv_deleter): New.
8825 (gdb_argv): New class.
8826 * utils.c (gdb_argv::reset): New method.
8827 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8828 * tracefile.c (tsave_command): Use gdb_argv.
8829 * top.c (new_ui_command): Use gdb_argv.
8830 * symmisc.c (maintenance_print_symbols)
8831 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8832 * symfile.c (symbol_file_command, generic_load)
8833 (remove_symbol_file_command): Use gdb_argv.
8834 * stack.c (backtrace_command): Use gdb_argv.
8835 * source.c (add_path, show_substitute_path_command)
8836 (unset_substitute_path_command, set_substitute_path_command):
8837 Use gdb_argv.
8838 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8839 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8840 * remote.c (extended_remote_run, remote_put_command)
8841 (remote_get_command, remote_delete_command): Use gdb_argv.
8842 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8843 (gdbsim_open): Use gdb_argv.
8844 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8845 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8846 * procfs.c (procfs_info_proc): Use gdb_argv.
8847 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8848 * infrun.c (handle_command): Use gdb_argv.
8849 * inferior.c (add_inferior_command, clone_inferior_command):
8850 Use gdb_argv.
8851 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8852 * exec.c (exec_file_command): Use gdb_argv.
8853 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8854 * compile/compile.c (build_argc_argv): Use gdb_argv.
8855
0d50bde3
TT
88562017-08-03 Tom Tromey <tom@tromey.com>
8857
8858 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8859
7f968c89
TT
88602017-08-03 Tom Tromey <tom@tromey.com>
8861
8862 * python/python.c (compute_python_string): Return std::string.
8863 (gdbpy_eval_from_control_command): Update.
8864 (do_start_initialization): Use std::string.
8865 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8866 xstrprintf.
8867 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8868 xstrprintf.
8869
3c9ebddd
TT
88702017-08-03 Tom Tromey <tom@tromey.com>
8871
8872 * top.h (do_restore_instream_cleanup): Remove.
8873 * top.c (do_restore_instream_cleanup): Remove.
8874 (read_command_file): Use scoped_restore.
8875 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8876
b51b225e
TT
88772017-08-03 Tom Tromey <tom@tromey.com>
8878
8879 * cli/cli-script.c (execute_user_command)
8880 (execute_control_command): Use scoped_restore.
8881
ac991630
TT
88822017-08-03 Tom Tromey <tom@tromey.com>
8883
8884 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8885 (execute_user_command): Remove user_call_depth; use
8886 user_args_stack's size instead.
8887
898e0c8e
TT
88882017-08-03 Tom Tromey <tom@tromey.com>
8889
8890 * top.h (in_user_command): Remove.
8891 * top.c (in_user_command): Remove.
8892 * cli/cli-script.c (do_restore_user_call_depth)
8893 (execute_user_command): Update.
8894
26fcd5d7
TT
88952017-08-03 Tom Tromey <tom@tromey.com>
8896
8897 * valops.c (search_struct_method): Use gdb::byte_vector.
8898 * valarith.c (value_concat): Use std::vector.
8899 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8900 (simple_search_memory): Likewise.
8901 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8902 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8903 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8904 * elfread.c (elf_rel_plt_read): Use std::string.
8905 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8906 * cli/cli-dump.c (restore_section_callback): Use
8907 gdb::byte_vector.
8908
7c218e6c
TT
89092017-08-03 Tom Tromey <tom@tromey.com>
8910
8911 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8912
31b68d4a
TT
89132017-08-03 Tom Tromey <tom@tromey.com>
8914
8915 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8916 (tui_register_format): Use scoped_restore.
8917
2ec845e7
TT
89182017-08-03 Tom Tromey <tom@tromey.com>
8919
8920 * reverse.c (exec_direction_default): Remove.
8921 (exec_reverse_once): Use scoped_restore.
8922 * remote.c (restore_remote_timeout): Remove.
8923 (remote_flash_erase, remote_flash_write, remote_flash_done)
8924 (readchar, remote_serial_write): Use scoped_restore.
8925 * cli/cli-script.c (struct source_cleanup_lines_args)
8926 (source_cleanup_lines): Remove.
8927 (script_from_file): Use scoped_restore.
8928 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8929 (source_command): Use scoped_restore.
8930
b3bc8453
TT
89312017-08-03 Tom Tromey <tom@tromey.com>
8932
8933 * utils.h (make_cleanup_free_so): Remove.
8934 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8935 * solist.h (struct so_deleter): New.
8936 (so_list_up): New typedef.
8937 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8938
e3ad2841
TT
89392017-08-03 Tom Tromey <tom@tromey.com>
8940
8941 * utils.h (make_cleanup_restore_current_language): Remove.
8942 * utils.c (do_restore_current_language)
8943 (make_cleanup_restore_current_language): Remove.
8944 * parse.c (parse_exp_in_context_1)
8945 (parse_expression_with_language): Use
8946 scoped_restore_current_language.
8947 * mi/mi-main.c (mi_cmd_execute): Use
8948 scoped_restore_current_language.
8949 * language.h (scoped_restore_current_language): New class.
8950
b80cf838
TT
89512017-08-03 Tom Tromey <tom@tromey.com>
8952
8953 * compile/compile.c (cleanup_unlink_file): Remove.
8954 (compile_to_object): Use gdb::unlinker.
8955 (eval_compile_command): Likewise.
8956
fad0444a
TT
89572017-08-03 Tom Tromey <tom@tromey.com>
8958
8959 * utils.h (make_cleanup_fclose): Remove.
8960 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8961
6e7bc05c
TT
89622017-08-03 Tom Tromey <tom@tromey.com>
8963
8964 * top.c (open_terminal_stream): Return gdb_file_up.
8965 (new_ui_command): Update.
8966
4a45905b
TT
89672017-08-03 Tom Tromey <tom@tromey.com>
8968
8969 * source.c (print_source_lines_base, forward_search_command)
8970 (reverse_search_command): Use gdb_file_up.
8971
7cd06d6e
TT
89722017-08-03 Tom Tromey <tom@tromey.com>
8973
8974 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8975
ed166945
TT
89762017-08-03 Tom Tromey <tom@tromey.com>
8977
8978 * cli/cli-cmds.c (find_and_open_script): Change return type.
8979 Remove "streamp" and "full_path" parameters.
8980 (source_script_with_search): Update.
8981 * auto-load.c (source_script_file): Update.
8982 * cli/cli-cmds.h (find_and_open_script): Change type.
8983 (open_script): New struct.
8984
d419f42d
TT
89852017-08-03 Tom Tromey <tom@tromey.com>
8986
8987 * xml-support.c (xml_fetch_content_from_file): Update.
8988 * ui-file.c (stdio_file::open): Update.
8989 * tracefile-tfile.c (tfile_start): Update.
8990 * remote.c (remote_file_put, remote_file_get): Update.
8991 * nat/linux-procfs.c (linux_proc_get_int)
8992 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8993 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8994 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8995 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8996 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8997 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8998 * linux-nat.c (linux_proc_pending_signals): Update.
8999 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9000 (file_closer): Remove.
9001 * compile/compile.c (compile_to_object): Update.
9002 * common/filestuff.h (struct gdb_file_deleter): New.
9003 (gdb_file_up): New typedef.
9004 (gdb_fopen_cloexec): Change return type.
9005 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9006 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9007 (dump_binary_file, restore_binary_file): Update.
9008 * auto-load.c (auto_load_objfile_script_1): Update.
9009
4a2b031d
TT
90102017-08-03 Tom Tromey <tom@tromey.com>
9011
9012 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9013 (info_static_tracepoint_markers_command): Likewise.
9014 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9015 * skip.c (skip_info): Use ui_out_emit_table.
9016 * progspace.c (print_program_space): Use ui_out_emit_table.
9017 * osdata.c (info_osdata): Use ui_out_emit_table.
9018 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9019 ui_out_emit_table.
9020 * linux-thread-db.c (info_auto_load_libthread_db): Use
9021 ui_out_emit_table.
9022 * inferior.c (print_inferior): Use ui_out_emit_table.
9023 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9024 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9025 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9026 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9027 * ui-out.h (class ui_out_emit_table): New.
9028
a4f320fd
MR
90292017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9030
9031 * mips-tdep.c (mips_fpu_type_str): New function.
9032 (mips_dump_tdep): Call it.
9033
a2f1f308
MR
90342017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9035
9036 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9037 `->mips_fpu_type'.
9038
7e5ed83b
XR
90392017-07-31 Xavier Roirand <roirand@adacore.com>
9040
9041 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9042
4c9dc811
XR
90432017-07-27 Xavier Roirand <roirand@adacore.com>
9044
9045 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9046
27d41eac
YQ
90472017-07-26 Yao Qi <yao.qi@linaro.org>
9048
9049 * cli/cli-cmds.c (maintenancechecklist): New variable.
9050 * gdbcmd.h (maintenancechecklist): Declare it.
9051 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9052 Call i386_linux_read_description with different masks.
9053 * maint.c (maintenance_check_command): New function.
9054 (_initialize_maint_cmds): Call add_prefix_cmd.
9055 * target-descriptions.c (tdesc_reg): override operator != and ==.
9056 (tdesc_type): Likewise.
9057 (tdesc_feature): Likewise.
9058 (target_desc): Likewise.
9059 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9060 (maintenance_check_xml_descriptions): New function.
9061 (_initialize_target_descriptions) Add command "xml-descriptions".
9062 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9063
ea03d0d3
YQ
90642017-07-26 Yao Qi <yao.qi@linaro.org>
9065
9066 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9067 Include features/i386/32bit-*.c.
9068 (i386_linux_read_description): Generate target description if it
9069 doesn't exist.
9070 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9071 functions.
9072 * features/i386/32bit-linux.c: Re-generated.
9073 * features/i386/32bit-sse.c: Likewise.
9074 * target-descriptions.c (print_c_feature::visit): Print code to
9075 set register number if needed.
9076 (print_c_feature) <m_next_regnum>: New field.
9077
25aa13e5
YQ
90782017-07-26 Yao Qi <yao.qi@linaro.org>
9079
9080 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9081 (FEATURE_XMLFILES): New.
9082 (FEATURE_CFILES): New.
9083 New rules.
9084 (clean-cfiles): Remove generated c files.
9085 * features/i386/32bit-avx.c: Generated.
9086 * features/i386/32bit-avx512.c: Generated.
9087 * features/i386/32bit-core.c: Generated.
9088 * features/i386/32bit-linux.c: Generated.
9089 * features/i386/32bit-mpx.c: Generated.
9090 * features/i386/32bit-pkeys.c: Generated.
9091 * features/i386/32bit-sse.c: Generated.
9092 * target-descriptions.c: Include algorithm.
9093 (tdesc_element_visitor): Add method visit_end.
9094 (print_c_tdesc): Implement visit_end.
9095 (print_c_tdesc:: m_filename_after_features): Move it to
9096 protected.
9097 (print_c_feature): New class.
9098 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9099 name starts with "i386/32bit-".
9100
6eb1e6a8
YQ
91012017-07-26 Yao Qi <yao.qi@linaro.org>
9102
9103 * target-descriptions.c (tdesc_element_visitor): New class.
9104 (tdesc_element): New class.
9105 (tdesc_reg): Inherit from tdesc_element.
9106 (tdesc_reg::accept): New function.
9107 (tdesc_type): Inherit from tdesc_element.
9108 (tdesc_type::accept): New function.
9109 (tdesc_feature): Inherit from tdesc_element.
9110 (tdesc_feature::accept): New function.
9111 (target_desc): Inherit from tdesc_element.
9112 (target_desc::target_desc): New.
9113 (target_desc::~target_desc): New.
9114 (target_desc::accept): New.
9115 (allocate_target_description): Use new.
9116 (free_target_description): Use delete.
9117 (print_c_tdesc): New class.
9118 (maint_print_c_tdesc_cmd): Adjust.
9119
9120 * features/aarch64.c: Re-generated.
9121 * features/arc-arcompact.c: Re-generated.
9122 * features/arc-v2.c: Re-generated.
9123 * features/arm/arm-with-iwmmxt.c: Re-generated.
9124 * features/arm/arm-with-m.c: Re-generated.
9125 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9126 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9127 * features/arm/arm-with-neon.c: Re-generated.
9128 * features/arm/arm-with-vfpv2.c: Re-generated.
9129 * features/arm/arm-with-vfpv3.c: Re-generated.
9130 * features/i386/amd64-avx-avx512.c: Re-generated.
9131 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9132 * features/i386/amd64-avx.c: Re-generated.
9133 * features/i386/amd64-avx-linux.c: Re-generated.
9134 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9135 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9136 * features/i386/amd64-avx-mpx.c: Re-generated.
9137 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9138 * features/i386/amd64.c: Re-generated.
9139 * features/i386/amd64-linux.c: Re-generated.
9140 * features/i386/amd64-mpx.c: Re-generated.
9141 * features/i386/amd64-mpx-linux.c: Re-generated.
9142 * features/i386/i386-avx-avx512.c: Re-generated.
9143 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9144 * features/i386/i386-avx.c: Re-generated.
9145 * features/i386/i386-avx-linux.c: Re-generated.
9146 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9147 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9148 * features/i386/i386-avx-mpx.c: Re-generated.
9149 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9150 * features/i386/i386.c: Re-generated.
9151 * features/i386/i386-linux.c: Re-generated.
9152 * features/i386/i386-mmx.c: Re-generated.
9153 * features/i386/i386-mmx-linux.c: Re-generated.
9154 * features/i386/i386-mpx.c: Re-generated.
9155 * features/i386/i386-mpx-linux.c: Re-generated.
9156 * features/i386/x32-avx-avx512.c: Re-generated.
9157 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9158 * features/i386/x32-avx.c: Re-generated.
9159 * features/i386/x32-avx-linux.c: Re-generated.
9160 * features/i386/x32.c: Re-generated.
9161 * features/i386/x32-linux.c: Re-generated.
9162 * features/microblaze.c: Re-generated.
9163 * features/microblaze-with-stack-protect.c: Re-generated.
9164 * features/mips64-dsp-linux.c: Re-generated.
9165 * features/mips64-linux.c: Re-generated.
9166 * features/mips-dsp-linux.c: Re-generated.
9167 * features/mips-linux.c: Re-generated.
9168 * features/nds32.c: Re-generated.
9169 * features/nios2.c: Re-generated.
9170 * features/nios2-linux.c: Re-generated.
9171 * features/rs6000/powerpc-32.c: Re-generated.
9172 * features/rs6000/powerpc-32l.c: Re-generated.
9173 * features/rs6000/powerpc-403.c: Re-generated.
9174 * features/rs6000/powerpc-403gc.c : Re-generated.
9175 * features/rs6000/powerpc-405.c: Re-generated.
9176 * features/rs6000/powerpc-505.c: Re-generated.
9177 * features/rs6000/powerpc-601.c: Re-generated.
9178 * features/rs6000/powerpc-602.c: Re-generated.
9179 * features/rs6000/powerpc-603.c: Re-generated.
9180 * features/rs6000/powerpc-604.c: Re-generated.
9181 * features/rs6000/powerpc-64.c: Re-generated.
9182 * features/rs6000/powerpc-64l.c: Re-generated.
9183 * features/rs6000/powerpc-7400.c: Re-generated.
9184 * features/rs6000/powerpc-750.c: Re-generated.
9185 * features/rs6000/powerpc-860.c: Re-generated.
9186 * features/rs6000/powerpc-altivec32.c: Re-generated.
9187 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9188 * features/rs6000/powerpc-altivec64.c: Re-generated.
9189 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9190 * features/rs6000/powerpc-cell32l.c: Re-generated.
9191 * features/rs6000/powerpc-cell64l.c: Re-generated.
9192 * features/rs6000/powerpc-e500.c: Re-generated.
9193 * features/rs6000/powerpc-e500l.c: Re-generated.
9194 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9195 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9196 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9197 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9198 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9199 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9200 * features/rs6000/powerpc-vsx32.c: Re-generated.
9201 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9202 * features/rs6000/powerpc-vsx64.c: Re-generated.
9203 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9204 * features/rs6000/rs6000.c: Re-generated.
9205 * features/s390-linux32.c: Re-generated.
9206 * features/s390-linux32v1.c: Re-generated.
9207 * features/s390-linux32v2.c: Re-generated.
9208 * features/s390-linux64.c: Re-generated.
9209 * features/s390-linux64v1.c: Re-generated.
9210 * features/s390-linux64v2.c: Re-generated.
9211 * features/s390-te-linux64.c: Re-generated.
9212 * features/s390-tevx-linux64.c: Re-generated.
9213 * features/s390-vx-linux64.c: Re-generated.
9214 * features/s390x-linux64.c: Re-generated.
9215 * features/s390x-linux64v1.c: Re-generated.
9216 * features/s390x-linux64v2.c: Re-generated.
9217 * features/s390x-te-linux64.c: Re-generated.
9218 * features/s390x-tevx-linux64.c: Re-generated.
9219 * features/s390x-vx-linux64.c: Re-generated.
9220 * features/sparc/sparc32-solaris.c: Re-generated.
9221 * features/sparc/sparc64-solaris.c: Re-generated.
9222 * features/tic6x-c62x.c: Re-generated.
9223 * features/tic6x-c62x-linux.c: Re-generated.
9224 * features/tic6x-c64x.c: Re-generated.
9225 * features/tic6x-c64x-linux.c: Re-generated.
9226 * features/tic6x-c64xp.c: Re-generated.
9227 * features/tic6x-c64xp-linux.c: Re-generated.
9228
35b4818d
YQ
92292017-07-26 Yao Qi <yao.qi@linaro.org>
9230
9231 * i386-linux-tdep.c (i386_linux_read_description): New function.
9232 (i386_linux_core_read_description): Call
9233 i386_linux_read_description.
9234 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9235 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9236 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9237 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9238 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9239 * x86-linux-nat.c (x86_linux_read_description): Call
9240 i386_linux_read_description.
9241
8e2141c6
YQ
92422017-07-26 Yao Qi <yao.qi@linaro.org>
9243
9244 * NEWS: Mention it.
9245 * features/Makefile (%.c: %.xml): Pass the xml file name to
9246 command "maint print c-tdesc".
9247 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9248 name from 'arg'.
9249
b468ff4c
YQ
92502017-07-26 Yao Qi <yao.qi@linaro.org>
9251
9252 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9253 in-class initialization.
9254 (tdesc_create_feature): Call new instead of XCNEW.
9255 (free_target_description): Ue delete.
9256
b9c0e1b4
JB
92572017-07-25 John Baldwin <jhb@FreeBSD.org>
9258
9259 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9260
a04b5337
YQ
92612017-07-25 Yao Qi <yao.qi@linaro.org>
9262
9263 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9264 constant.
9265 (amd64_x32_init_abi): Likewise.
9266 * amd64-tdep.h (amd64_init_abi): Update declaration.
9267 (amd64_x32_init_abi): Likewise.
9268
02ad7fc2
YQ
92692017-07-25 Yao Qi <yao.qi@linaro.org>
9270
9271 PR tdep/21717
9272 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9273 condition for FPSCR.
9274 (arm_linux_store_inferior_registers): Likewise.
9275
b6f48cb0
TT
92762017-07-22 Tom Tromey <tom@tromey.com>
9277
9278 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9279 <syscalls_counts>: Now a std::vector.
9280 (get_catch_syscall_inferior_data): Use "new".
9281 (catch_syscall_inferior_data_cleanup): Use "delete".
9282 (insert_catch_syscall, remove_catch_syscall)
9283 (clear_syscall_counts): Update.
9284
e12c9b7a
TT
92852017-07-22 Tom Tromey <tom@tromey.com>
9286
9287 * break-catch-syscall.c (syscall_catchpoint)
9288 <syscalls_to_be_caught>: Now a std::vector<int>
9289 (~syscall_catchpoint): Remove.
9290 (insert_catch_syscall, remove_catch_syscall)
9291 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9292 (print_mention_catch_syscall, print_recreate_catch_syscall):
9293 Update.
9294 (create_syscall_event_catchpoint): Change type of "filter"
9295 parameter.
9296 (catch_syscall_split_args): Return a std::vector.
9297 (catch_syscall_command_1, catching_syscall_number_1): Update.
9298
4fa8aeac
TT
92992017-07-22 Tom Tromey <tom@tromey.com>
9300
9301 * break-catch-throw.c (struct exception_catchpoint)
9302 <exception_rx>: Now a std::string.
9303 (~exception_catchpoint): Remove.
9304 (print_one_detail_exception_catchpoint): Update.
9305 (handle_gnu_v3_exceptions): Change type of except_rx.
9306 (extract_exception_regexp): Return a std::string.
9307 (catch_exception_command_1): Update.
9308
f746a154
TT
93092017-07-22 Tom Tromey <tom@tromey.com>
9310
9311 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9312 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9313 std::vector.
9314 <catch_all>: Now a bool.
9315 (~signal_catchpoint): Remove.
9316 (signal_catchpoint_insert_location)
9317 (signal_catchpoint_remove_location)
9318 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9319 (signal_catchpoint_print_mention)
9320 (signal_catchpoint_print_recreate)
9321 (signal_catchpoint_explains_signal): Update.
9322 (create_signal_catchpoint): Change type of "filter" and
9323 "catch_all".
9324 (catch_signal_split_args): Return a std::vector. Change type of
9325 "catch_all".
9326 (catch_signal_command): Update.
9327
47e77640
PA
93282017-07-20 Pedro Alves <palves@redhat.com>
9329
9330 * ada-lang.c (ada_language_defn): Make extern.
9331 (_initialize_ada_language): Remove add_language call.
9332 * c-lang.c (c_language_defn, cplus_language_defn)
9333 (asm_language_defn, minimal_language_defn): Make extern.
9334 (_initialize_c_language): Delete.
9335 * completer.c (compare_cstrings): Delete, moved to utils.h.
9336 * d-lang.c (d_language_defn): Make extern.
9337 (_initialize_d_language): Remove add_language calls.
9338 * defs.h (enum language): Add comment.
9339 * f-lang.c (f_language_defn): Make extern.
9340 (_initialize_f_language): Remove add_language call.
9341 * go-lang.c (go_language_defn): Make extern.
9342 (_initialize_go_language): Remove add_language call.
9343 * language.c: Include <algorithm>.
9344 (languages): Redefine as const array.
9345 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9346 (set_language_command): Handle "local". Use for-range loop.
9347 (set_language): Remove loop.
9348 (language_enum): Rewrite.
9349 (language_def, language_str): Remove loops.
9350 (add_language): Delete.
9351 (add_set_language_command): New, based on add_languages.
9352 (skip_language_trampoline): Adjust.
9353 (local_language_defn): Delete.
9354 (language_gdbarch_post_init): Adjust.
9355 (_initialize_language): Remove add_language calls. Call
9356 add_set_language_command.
9357 * language.h (add_language): Delete.
9358 (auto_language_defn)
9359 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9360 (asm_language_defn, c_language_defn, cplus_language_defn)
9361 (d_language_defn, f_language_defn, go_language_defn)
9362 (m2_language_defn, objc_language_defn, opencl_language_defn)
9363 (pascal_language_defn, rust_language_defn): Declare.
9364 * m2-lang.c (m2_language_defn): Make extern.
9365 (_initialize_m2_language): Remove add_language call.
9366 * objc-lang.c (objc_language_defn): Make extern.
9367 (_initialize_objc_language): Remove add_language call.
9368 * opencl-lang.c (opencl_language_defn): Make extern.
9369 (_initialize_opencl_language): Remove add_language call.
9370 * p-lang.c (pascal_language_defn): Make extern.
9371 (_initialize_pascal_language): Delete.
9372 * rust-lang.c (rust_language_defn): Make extern.
9373 (_initialize_rust_language): Delete.
9374 * utils.h (compare_cstrings): New static inline function.
9375
edb0c9cb
PA
93762017-07-20 Pedro Alves <palves@redhat.com>
9377
9378 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9379 (get_var_value): Constify parameters.
9380 (get_int_var_value): Change prototype.
9381 (to_fixed_range_type): Adjust.
9382 * ada-lang.h (get_int_var_value): Change prototype.
9383
a778f165
PA
93842017-07-20 Pedro Alves <palves@redhat.com>
9385
9386 * dwarf2read.c (dw2_lookup_symbol): Use
9387 SYMBOL_MATCHES_SEARCH_NAME.
9388 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9389
42edd901
PA
93902017-07-20 Pedro Alves <palves@redhat.com>
9391
9392 * block.c (block_iter_name_step, block_iter_name_first)
9393 (block_iter_name_next): Delete.
9394 (block_lookup_symbol_primary): Adjust to use
9395 dict_iter_match_first/dict_iter_match_next.
9396 * block.h (block_iter_name_first, block_iter_name_next): Delete
9397 declarations.
9398 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9399 dict_iter_match_first/dict_iter_match_next.
9400
cf325299
PA
94012017-07-20 Pedro Alves <palves@redhat.com>
9402
9403 * cp-support.c (cp_find_first_component_aux): Add missing case for
9404 end of string.
9405
c5ed0576
DB
94062017-07-18 David Blaikie <dblaikie@gmail.com>
9407
9408 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9409 of dwo_cu's dwo_file.
9410
27841e76
YQ
94112017-07-18 Yao Qi <yao.qi@linaro.org>
9412
9413 * remote.c (store_registers_using_G): Remove one line comment.
9414
cfb7e58b
YQ
94152017-07-18 Yao Qi <yao.qi@linaro.org>
9416
9417 * regcache.c (regcache_cpy): Simplify it.
9418 (regcache::cpy_no_passthrough): Remove it.
9419 * regcache.h (cpy_no_passthrough): Remove it.
9420 (regcache_dup, regcache_cpy): Update comments.
9421
386535dd
PA
94222017-07-18 Pedro Alves <palves@redhat.com>
9423
9424 * remote-sim.c (sim_command_completer): Adjust to work with a
9425 completion_tracker instead of a VEC.
9426
c45ec17c
PA
94272017-07-17 Pedro Alves <palves@redhat.com>
9428
9429 * completer.c (complete_source_filenames): New function.
9430 (complete_address_and_linespec_locations): New function.
9431 (location_completer): Use complete_address_and_linespec_locations.
9432 (completion_tracker::build_completion_result): Honor the tracker's
9433 request to suppress append.
9434 * completer.h (completion_tracker::suppress_append_ws)
9435 (completion_tracker::set_suppress_append_ws): New methods.
9436 (completion_tracker::m_suppress_append_ws): New field.
9437 (complete_source_filenames): New declaration.
9438 * linespec.c (linespec_complete_what): New.
9439 (struct ls_parser) <complete_what, completion_word,
9440 completion_quote_char, completion_quote_end, completion_tracker>:
9441 New fields.
9442 (string_find_incomplete_keyword_at_end): New.
9443 (linespec_lexer_lex_string): Record quote char. If in completion
9444 mode, don't throw.
9445 (linespec_lexer_consume_token): Advance the completion word point.
9446 (linespec_lexer_peek_token): Save/restore completion info.
9447 (save_stream_and_consume_token): New.
9448 (set_completion_after_number): New.
9449 (linespec_parse_basic): Set what to complete next depending on
9450 token. Handle function and label completions specially.
9451 (parse_linespec): Disable objc shortcut in completion mode. Set
9452 what to complete next depending on token type. Skip keyword if in
9453 completion mode.
9454 (complete_linespec_component, linespec_complete): New.
9455 * linespec.h (linespec_complete): Declare.
9456
be966d42
PA
94572017-07-17 Pedro Alves <palves@redhat.com>
9458
9459 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9460 Handle 'operator<' / 'operator<<'.
9461
a2459270
PA
94622017-07-17 Pedro Alves <palves@redhat.com>
9463
9464 * completer.c (collect_explicit_location_matches): Handle
9465 MATCH_LABEL.
9466 (convert_explicit_location_to_linespec): New, factored out from
9467 ...
9468 (convert_explicit_location_to_sals): ... this.
9469 (complete_label): New.
9470 (linespec_complete_label, find_label_symbols_in_block): New.
9471 (find_label_symbols): Add completion_mode parameter and adjust to
9472 call find_label_symbols_in_block.
9473 * linespec.h (linespec_complete_label): Declare.
9474
c6756f62
PA
94752017-07-17 Pedro Alves <palves@redhat.com>
9476
9477 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9478 complete_symbol_mode parameter.
9479 * cli/cli-cmds.c (complete_command): Get the completion result out
9480 of the handle_brkchars tracker if used a custom word point.
9481 * completer.c: Include "linespec.h".
9482 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9483 (advance_to_expression_complete_word_point): New.
9484 (completion_tracker::completes_to_completion_word): New.
9485 (complete_files_symbols): Pass down
9486 complete_symbol_mode::EXPRESSION.
9487 (explicit_options, probe_options): New.
9488 (collect_explicit_location_matches): Complete on the
9489 explictit_loc->foo instead of word. Use
9490 linespec_complete_function. Handle MATCH_LINE. Handle offering
9491 keyword and options completions.
9492 (backup_text_ptr): Delete.
9493 (skip_keyword): New.
9494 (complete_explicit_location): Remove 'word' parameter. Add
9495 language, quoted_arg_start and quoted_arg_end parameters.
9496 Rewrite, parsing left to right.
9497 (location_completer): Rewrite.
9498 (location_completer_handle_brkchars): New function.
9499 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9500 (enum complete_line_internal_reason): Adjust comments.
9501 (completion_tracker::discard_completions): New.
9502 (completer_handle_brkchars_func_for_completer): Handle
9503 location_completer.
9504 (gdb_custom_word_point_brkchars)
9505 (gdb_org_rl_basic_quote_characters): New.
9506 (gdb_completion_word_break_characters_throw)
9507 (completion_find_completion_word): Handle trackers that use a
9508 custom word point.
9509 (completion_tracker::advance_custom_word_point_by): New.
9510 (completion_tracker::build_completion_result): Don't rely on
9511 readline appending the quote char.
9512 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9513 use a custom word point.
9514 (gdb_rl_attempted_completion_function): Restore
9515 rl_basic_quote_characters.
9516 * completer.h (class completion_tracker): Extend intro comment.
9517 (completion_tracker::set_quote_char)
9518 (completion_tracker::quote_char)
9519 (completion_tracker::set_use_custom_word_point)
9520 (completion_tracker::use_custom_word_point)
9521 (completion_tracker::custom_word_point)
9522 (completion_tracker::set_custom_word_point)
9523 (completion_tracker::advance_custom_word_point_by)
9524 (completion_tracker::completes_to_completion_word)
9525 (completion_tracker::discard_completions): New methods.
9526 (completion_tracker::m_quote_char)
9527 (completion_tracker::m_use_custom_word_point)
9528 (completion_tracker::m_custom_word_point): New fields.
9529 (advance_to_expression_complete_word_point): Declare.
9530 * f-lang.c (f_collect_symbol_completion_matches): Add
9531 complete_symbol_mode parameter.
9532 * language.h (struct language_defn)
9533 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9534 parameter.
9535 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9536 (linespec_complete_function): New function.
9537 (linespec_lexer_lex_keyword): Adjust.
9538 * linespec.h (linespec_keywords, linespec_complete_function): New
9539 declarations.
9540 * location.c (find_end_quote): New function.
9541 (explicit_location_lex_one): Add explicit_completion_info
9542 parameter. Save quoting info. Don't throw if being called for
9543 completion. Don't handle Ada operators here.
9544 (is_cp_operator, skip_op_false_positives, first_of)
9545 (explicit_location_lex_one_function): New function.
9546 (string_to_explicit_location): Replace 'dont_throw' parameter with
9547 an explicit_completion_info pointer parameter. Handle it. Don't
9548 use explicit_location_lex_one to lex function names. Use
9549 explicit_location_lex_one_function instead.
9550 * location.h (struct explicit_completion_info): New.
9551 (string_to_explicit_location): Replace 'dont_throw' parameter with
9552 an explicit_completion_info pointer parameter.
9553 * symtab.c (default_collect_symbol_completion_matches_break_on):
9554 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9555 (default_collect_symbol_completion_matches)
9556 (collect_symbol_completion_matches): Add complete_symbol_mode
9557 parameter.
9558 (collect_symbol_completion_matches_type): Pass down
9559 complete_symbol_mode::EXPRESSION.
9560 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9561 parameter. Handle LINESPEC mode.
9562 * symtab.h (complete_symbol_mode): New.
9563 (default_collect_symbol_completion_matches_break_on)
9564 (default_collect_symbol_completion_matches)
9565 (collect_symbol_completion_matches)
9566 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9567 parameter.
9568
1d550c82
PA
95692017-07-17 Pedro Alves <palves@redhat.com>
9570
9571 * utils.c (enum class strncmp_iw_mode): New.
9572 (strcmp_iw): Rename to ...
9573 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9574 parameters. Handle them.
9575 (strncmp_iw): New.
9576 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9577 * utils.h (strncmp_iw): Declare.
9578 (strcmp_iw): Move describing comments here.
9579
8090b426
PA
95802017-07-17 Pedro Alves <palves@redhat.com>
9581
9582 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9583 CP_OPERATOR_STR.
9584 * c-typeprint.c (is_type_conversion_operator): Use
9585 CP_OPERATOR_STR.
9586 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9587 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9588 CP_OPERATOR_LEN.
9589 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9590 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9591 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9592 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9593 CP_OPERATOR_STR.
9594 * location.c: Include "cp-support.h".
9595 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9596 CP_OPERATOR_STR.
9597 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9598 CP_OPERATOR_LEN.
9599
6a2c1b87
PA
96002017-07-17 Pedro Alves <palves@redhat.com>
9601
9602 * cli/cli-cmds.c (complete_command): Use a completion tracker
9603 along with completion_find_completion_word for handle_brkchars
9604 phase.
9605 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9606 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9607 (struct gdb_rl_completion_word_info): New.
9608 (gdb_rl_find_completion_word): New.
9609 (completion_find_completion_word): New.
9610 * completer.h (completion_find_completion_word): Declare.
9611
eb3ff9a5
PA
96122017-07-17 Pedro Alves <palves@redhat.com>
9613
9614 * ada-lang.c (symbol_completion_match): Adjust comments.
9615 (symbol_completion_add): Replace vector parameter with
9616 completion_tracker parameter. Use it.
9617 (ada_make_symbol_completion_list): Rename to...
9618 (ada_collect_symbol_completion_matches): ... this. Add
9619 completion_tracker parameter and use it.
9620 (ada_language_defn): Adjust.
9621 * break-catch-syscall.c (catch_syscall_completer): Adjust
9622 prototype and work with completion_tracker instead of VEC.
9623 * breakpoint.c (condition_completer): Adjust prototype and work
9624 with completion_tracker instead of VEC.
9625 * c-lang.c (c_language_defn, cplus_language_defn)
9626 (asm_language_defn, minimal_language_defn): Adjust to renames.
9627 * cli/cli-cmds.c (complete_command): Rework using
9628 completion_tracker. Catch exceptions when completing.
9629 * cli/cli-decode.c (integer_unlimited_completer)
9630 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9631 with completion_tracker instead of VEC.
9632 * command.h (struct completion_tracker): Forward declare.
9633 (completer_ftype, completer_handle_brkchars_ftype): Change
9634 types.
9635 (complete_on_cmdlist, complete_on_enum): Adjust.
9636 * completer.c: Include <algorithm>.
9637 (struct gdb_completer_state): New.
9638 (current_completion): New global.
9639 (readline_line_completion_function): Delete.
9640 (noop_completer, filename_completer)
9641 (filename_completer_handle_brkchars, complete_files_symbols)
9642 (linespec_location_completer): Adjust to work with a
9643 completion_tracker instead of a VEC.
9644 (string_or_empty): New.
9645 (collect_explicit_location_matches): Adjust to work with a
9646 completion_tracker instead of a VEC.
9647 (explicit_location_completer): Rename to ...
9648 (complete_explicit_location): ... this and adjust to work with a
9649 completion_tracker instead of a VEC.
9650 (location_completer): Adjust to work with a completion_tracker
9651 instead of a VEC.
9652 (add_struct_fields): Adjust to work with a completion_list instead
9653 of VEC.
9654 (expression_completer): Rename to ...
9655 (complete_expression): ... this and adjust to work with a
9656 completion_tracker instead of a VEC. Use complete_files_symbols.
9657 (expression_completer): Reimplement on top of complete_expression.
9658 (symbol_completer): Adjust to work with a completion_tracker
9659 instead of a VEC.
9660 (enum complete_line_internal_reason): Add describing comments.
9661 (complete_line_internal_normal_command): Adjust to work with a
9662 completion_tracker instead of a VEC.
9663 (complete_line_internal): Rename to ...
9664 (complete_line_internal_1): ... this and adjust to work with a
9665 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9666 handle_brkchars phase.
9667 (new_completion_tracker): Delete.
9668 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9669 complete_line_internal_1.
9670 (free_completion_tracker): Delete.
9671 (INITIAL_COMPLETION_HTAB_SIZE): New.
9672 (completion_tracker::completion_tracker)
9673 (completion_tracker::~completion_tracker): New.
9674 (maybe_add_completion): Delete.
9675 (completion_tracker::maybe_add_completion)
9676 (completion_tracker::add_completion)
9677 (completion_tracker::add_completions): New.
9678 (throw_max_completions_reached_error): Delete.
9679 (complete_line): Adjust to work with a completion_tracker instead
9680 of a VEC. Don't create a completion_tracker_t or check for max
9681 completions here.
9682 (command_completer, command_completer_handle_brkchars)
9683 (signal_completer, reg_or_group_completer_1)
9684 (reg_or_group_completer, default_completer_handle_brkchars):
9685 Adjust to work with a completion_tracker.
9686 (gdb_completion_word_break_characters_throw): New.
9687 (gdb_completion_word_break_characters): Reimplement.
9688 (line_completion_function): Delete.
9689 (completion_tracker::recompute_lowest_common_denominator)
9690 (expand_preserving_ws)
9691 (completion_tracker::build_completion_result)
9692 (completion_result::completion_result)
9693 (completion_result::completion_result)
9694 (completion_result::~completion_result)
9695 (completion_result::completion_result)
9696 (completion_result::release_match_list, compare_cstrings)
9697 (completion_result::sort_match_list)
9698 (completion_result::reset_match_list)
9699 (gdb_rl_attempted_completion_function_throw)
9700 (gdb_rl_attempted_completion_function): New.
9701 * completer.h (completion_list, struct completion_result)
9702 (class completion_tracker): New.
9703 (complete_line): Add completion_tracker parameter.
9704 (readline_line_completion_function): Delete.
9705 (gdb_rl_attempted_completion_function): New.
9706 (noop_completer, filename_completer, expression_completer)
9707 (location_completer, symbol_completer, command_completer)
9708 (signal_completer, reg_or_group_completer): Update prototypes.
9709 (completion_tracker_t, new_completion_tracker)
9710 (make_cleanup_free_completion_tracker): Delete.
9711 (enum maybe_add_completion_enum): Delete.
9712 (maybe_add_completion): Delete.
9713 (throw_max_completions_reached_error): Delete.
9714 * corefile.c (complete_set_gnutarget): Adjust to work with a
9715 completion_tracker instead of a VEC.
9716 * cp-abi.c (cp_abi_completer): Adjust to work with a
9717 completion_tracker instead of a VEC.
9718 * d-lang.c (d_language_defn): Adjust.
9719 * disasm.c (disassembler_options_completer): Adjust to work with a
9720 completion_tracker instead of a VEC.
9721 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9722 (f_collect_symbol_completion_matches): ... this. Adjust to work
9723 with a completion_tracker instead of a VEC.
9724 (f_language_defn): Adjust.
9725 * go-lang.c (go_language_defn): Adjust.
9726 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9727 Adjust to work with a completion_tracker instead of a VEC.
9728 * infrun.c (handle_completer): Likewise.
9729 * interps.c (interpreter_completer): Likewise.
9730 * interps.h (interpreter_completer): Likewise.
9731 * language.c (unknown_language_defn, auto_language_defn)
9732 (local_language_defn): Adjust.
9733 * language.h (language_defn::la_make_symbol_completion_list):
9734 Rename to ...
9735 (language_defn::la_collect_symbol_completion_matches): ... this
9736 and adjust to work with a completion_tracker instead of a VEC.
9737 * m2-lang.c (m2_language_defn): Adjust.
9738 * objc-lang.c (objc_language_defn): Adjust.
9739 * opencl-lang.c (opencl_language_defn): Adjust.
9740 * p-lang.c (pascal_language_defn): Adjust.
9741 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9742 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9743 with a completion_tracker.
9744 * rust-lang.c (rust_language_defn): Adjust.
9745 * symtab.c (free_completion_list, do_free_completion_list)
9746 (return_val, completion_tracker): Delete.
9747 (completion_list_add_name, completion_list_add_symbol)
9748 (completion_list_add_msymbol, completion_list_objc_symbol)
9749 (completion_list_add_fields, add_symtab_completions): Add
9750 completion_tracker parameter and use it.
9751 (default_make_symbol_completion_list_break_on_1): Rename to...
9752 (default_collect_symbol_completion_matches_break_on): ... this.
9753 Add completion_tracker parameter and use it instead of allocating
9754 a completion tracker here.
9755 (default_make_symbol_completion_list_break_on): Delete old
9756 implementation.
9757 (default_make_symbol_completion_list): Delete.
9758 (default_collect_symbol_completion_matches): New.
9759 (make_symbol_completion_list): Delete.
9760 (collect_symbol_completion_matches): New.
9761 (make_symbol_completion_type): Rename to ...
9762 (collect_symbol_completion_matches_type): ... this. Add
9763 completion_tracker parameter and use it instead of VEC.
9764 (make_file_symbol_completion_list_1): Rename to...
9765 (collect_file_symbol_completion_matches): ... this. Add
9766 completion_tracker parameter and use it instead of VEC.
9767 (make_file_symbol_completion_list): Delete.
9768 (add_filename_to_list): Use completion_list instead of a VEC.
9769 (add_partial_filename_data::list): Now a completion_list.
9770 (make_source_files_completion_list): Work with a completion_list
9771 instead of a VEC.
9772 * symtab.h: Include "completer.h".
9773 (default_make_symbol_completion_list_break_on)
9774 (default_make_symbol_completion_list, make_symbol_completion_list)
9775 (make_symbol_completion_type, make_file_symbol_completion_list)
9776 (make_source_files_completion_list): Delete.
9777 (default_collect_symbol_completion_matches_break_on)
9778 (default_collect_symbol_completion_matches)
9779 (collect_symbol_completion_matches)
9780 (collect_symbol_completion_matches_type)
9781 (collect_file_symbol_completion_matches)
9782 (make_source_files_completion_list): New.
9783 * top.c (init_main): Don't install a rl_completion_entry_function
9784 hook. Install a rl_attempted_completion_function hook instead.
9785 * tui/tui-layout.c (layout_completer): Adjust to work with a
9786 completion_tracker.
9787 * tui/tui-regs.c (tui_reggroup_completer):
9788 * tui/tui-win.c (window_name_completer, focus_completer)
9789 (winheight_completer): Adjust to work with a completion_tracker.
9790 * value.c: Include "completer.h".
9791 (complete_internalvar): Adjust to work with a completion_tracker.
9792 * value.h (complete_internalvar): Likewise.
9793
6e1dbf8c
PA
97942017-07-17 Pedro Alves <palves@redhat.com>
9795
9796 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9797 renames.
9798 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9799 comments to completer_ftype's declaration.
9800 <completer_handle_brkchars>: Change type to
9801 completer_handle_brkchars_ftype.
9802 * command.h (completer_ftype): Add describing comment and give
9803 names to parameters.
9804 (completer_ftype_void): Rename to ...
9805 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9806 (set_cmd_completer_handle_brkchars): Adjust.
9807 * completer.c (filename_completer_handle_brkchars): New function.
9808 (complete_line_internal_normal_command): New function, factored
9809 out from ...
9810 (complete_line_internal): ... here.
9811 (command_completer_handle_brkchars)
9812 (default_completer_handle_brkchars)
9813 (completer_handle_brkchars_func_for_completer): New functions.
9814 * completer.h (set_gdb_completion_word_break_characters): Delete
9815 declaration.
9816 (completer_handle_brkchars_func_for_completer): New declaration.
9817 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9818 completer_handle_brkchars_func_for_completer.
9819
78b13106
PA
98202017-07-17 Pedro Alves <palves@redhat.com>
9821
9822 * completer.c (symbol_completer): New function, based on
9823 make_symbol_completion_list_fn.
9824 * completer.h (symbol_completer): New declaration.
9825 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9826 * python/py-cmd.c (completers): Adjust.
9827 * symtab.c (make_symbol_completion_list_fn): Delete.
9828 * symtab.h (make_symbol_completion_list_fn): Delete.
9829 * cli/cli-decode.c (add_cmd): Adjust.
9830
bbf2f4df
PA
98312017-07-17 Pedro Alves <palves@redhat.com>
9832
9833 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9834 * dwarf2read.c: Include "filename-seen-cache.h".
9835 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9836 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9837 * filename-seen-cache.c: New file.
9838 * filename-seen-cache.h: New file.
9839 * symtab.c: Include "filename-seen-cache.h".
9840 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9841 (create_filename_seen_cache, clear_filename_seen_cache)
9842 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9843 to filename-seen-cache.h/filename-seen-cache.c.
9844 (output_source_filename, sources_info)
9845 (maybe_add_partial_symtab_filename)
9846 (make_source_files_completion_list): Adjust to use
9847 filename_seen_cache.
9848
330cdd98
PA
98492017-07-17 Pedro Alves <palves@redhat.com>
9850
9851 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9852 fields.
9853 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9854 dwarf2_debug_sections*)): New.
9855 (dwarf2_per_objfile::dwarf2_per_objfile(const
9856 dwarf2_per_objfile&)): Declare as deleted.
9857 (dwarf2_per_objfile::operator=): Declare as deleted.
9858 (dwarf2_per_objfile::dwarf2_per_objfile)
9859 (dwarf2_per_objfile::~dwarf2_per_objfile)
9860 (dwarf2_per_objfile::free_cached_comp_units): New.
9861 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9862 ctor. Call dwarf2_per_objfile's ctor manually.
9863 (dwarf2_locate_sections): Deleted/refactored as ...
9864 (dwarf2_per_objfile::locate_sections): ... this new method.
9865 (free_cached_comp_units): Defer to
9866 dwarf2_per_objfile::free_cached_comp_units.
9867 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9868
8880f2a9
TT
98692017-07-14 Tom Tromey <tom@tromey.com>
9870
9871 PR rust/21764:
9872 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9873 parameter.
9874 <UNOP_SIZEOF>: Split into separate case.
9875 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9876
65547233
TT
98772017-07-14 Tom Tromey <tom@tromey.com>
9878
9879 PR rust/21763:
9880 * symtab.c (symbol_matches_domain): Add language_rust to special
9881 case.
9882 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9883 treat LOC_TYPEDEF symbols as variables.
9884
8f14146e
PA
98852017-07-14 Pedro Alves <palves@redhat.com>
9886
9887 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9888 symtabs matching all symtabs with SRCFILE as file name instead of
9889 only considering the first hit, with lookup_symtab.
9890
2347965c
SM
98912017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9892
9893 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9894 operator_name parameters.
9895 (gen_expr): Update function call.
9896
40f4af28
SM
98972017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9898
9899 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9900 parameter.
9901 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9902 Likewise.
9903 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9904 parameter, use agent_expr::gdbarch instead, update function
9905 calls.
9906 (locexpr_tracepoint_var_ref): Likewise.
9907 (loclist_tracepoint_var_ref): Likewise.
9908 * ax-gdb.c (gen_trace_static_fields): Likewise.
9909 (gen_traced_pop): Likewise.
9910 (gen_frame_args_address): Likewise.
9911 (gen_frame_locals_address): Likewise.
9912 (gen_var_ref): Likewise.
9913 (gen_struct_ref_recursive): Likewise.
9914 (gen_static_field): Likewise.
9915 (gen_maybe_namespace_elt): Likewise.
9916 (gen_expr): Likewise.
9917 (gen_trace_for_var): Likewise.
9918 (gen_trace_for_expr): Likewise.
9919 (gen_trace_for_return_address): Likewise.
9920
053f8057
SM
99212017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9922
9923 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9924 parameter.
9925 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9926
6661ad48
SM
99272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9928
9929 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9930 from ax, update calls.
9931 (gen_usual_arithmetic): Likewise.
9932 (gen_integral_promotions): Likewise.
9933 (gen_bitfield_ref): Likewise.
9934 (gen_primitive_field): Likewise.
9935 (gen_struct_ref_recursive): Likewise.
9936 (gen_struct_ref): Likewise.
9937 (gen_maybe_namespace_elt): Likewise.
9938 (gen_struct_elt_for_reference): Likewise.
9939 (gen_namespace_elt): Likewise.
9940 (gen_aggregate_elt_ref): Likewise.
9941 (gen_expr): Get gdbarch from ax, update calls.
9942 (gen_expr_binop_rest): Likewise.
9943
c55a47e7
PA
99442017-07-13 Pedro Alves <palves@redhat.com>
9945
9946 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9947 as default tdesc.
9948 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9949 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9950 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9951 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9952 tdep.
9953 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9954 Get final tdesc from the tdep.
9955 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9956 default tdesc.
9957 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9958 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9959 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9960 Use it as default tdesc.
9961 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9962 down to amd_init_abi. No longer handle fallback tdesc here.
9963 * amd64-tdep.h (tdesc_x32): Declare.
9964 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9965 parameter.
9966 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9967 as default tdesc.
9968
55efceab
AA
99692017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9970
9971 * s390-linux-tdep.c (s390_process_record): Add support for
9972 instructions new in arch12.
9973
0aa37b65
JB
99742017-07-11 John Baldwin <jhb@FreeBSD.org>
9975
9976 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9977 PT_GETFSBASE and PT_GETGSBASE.
9978 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9979 PT_SETGSBASE.
9980
48aeef91
JB
99812017-07-11 John Baldwin <jhb@FreeBSD.org>
9982
9983 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9984 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9985 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9986 those rules.
9987 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9988 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9989 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9990 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9991 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9992 * features/i386/amd64.xml: Add 64bit-segments.xml.
9993 * features/i386/amd64-avx-avx512.c: Regenerated.
9994 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9995 * features/i386/amd64-avx-mpx.c: Regenerated.
9996 * features/i386/amd64-avx.c: Regenerated.
9997 * features/i386/amd64-mpx.c: Regenerated.
9998 * features/i386/amd64.c: Regenerated.
9999 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10000 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10001 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10002 * regformats/i386/amd64-avx.dat: Regenerated.
10003 * regformats/i386/amd64-mpx.dat: Regenerated.
10004 * regformats/i386/amd64.dat: Regenerated.
10005
77c501bc
YQ
100062017-07-10 Yao Qi <yao.qi@linaro.org>
10007
10008 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10009 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10010
6dc8d757
AK
100112017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10012
10013 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10014 unsetenv.
10015 * gnulib/aclocal.m4: Regenerate.
10016 * gnulib/config.in: Regenerate.
10017 * gnulib/configure: Regenerate.
10018 * gnulib/import/Makefile.am: Regenerate.
10019 * gnulib/import/Makefile.in: Regenerate.
10020 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10021 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10022 * gnulib/import/m4/environ.m4: New file.
10023 * gnulib/import/m4/setenv.m4: New file.
10024 * gnulib/import/setenv.c: New file.
10025 * gnulib/import/unsetenv.c: New file.
10026
266934d1
SM
100272017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10028
10029 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10030 address when op is DW_OP_addr.
10031
03278692
TT
100322017-07-09 Tom Tromey <tom@tromey.com>
10033
10034 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10035 check and apply to outer type.
10036
4b654465
JB
100372017-07-07 John Baldwin <jhb@FreeBSD.org>
10038
10039 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10040 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10041 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10042 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10043
2af9fc44
JB
100442017-07-07 John Baldwin <jhb@FreeBSD.org>
10045
10046 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10047
382b69bb
JB
100482017-07-07 John Baldwin <jhb@FreeBSD.org>
10049
10050 * corelow.c (get_core_siginfo): Remove.
10051 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10052 instead of get_core_siginfo.
10053 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10054 * gdbarch.h: Re-generate.
10055 * gdbarch.c: Re-generate.
10056 * linux-tdep.c (linux_core_xfer_siginfo): New.
10057 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10058
6e5eab33
JB
100592017-07-07 John Baldwin <jhb@FreeBSD.org>
10060
10061 * corelow.c (thread_section_name): Move to ...
10062 * gdbcore.h (thread_section_name): ... here.
10063
929edea9
JB
100642017-07-07 John Baldwin <jhb@FreeBSD.org>
10065
10066 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10067 (struct siginfo32): New.
10068 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10069 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10070 via ptrace(PT_LWPINFO).
10071
762c974a
JB
100722017-07-07 John Baldwin <jhb@FreeBSD.org>
10073
10074 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10075 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10076 (fbsd_get_siginfo_type): New.
10077 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10078 (_initialize_fbsd_tdep): New.
10079
33c5cd75
DB
100802017-07-06 David Blaikie <dblaikie@gmail.com>
10081
10082 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10083 a singular dwo_unit*) to support multiple CUs in the same way that
10084 multiple TUs are supported.
10085 (create_cus_hash_table): Replace create_dwo_cu with a function for
10086 parsing multiple CUs from a DWO file.
10087 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10088 create_dwo_cu.
10089 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10090 htab_find, rather than comparing the signature to a singleton CU in
10091 the dwo_file.
10092
8455d262
PA
100932017-07-06 Pedro Alves <palves@redhat.com>
10094
10095 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10096
4da3eb35
PA
100972017-07-04 Pedro Alves <palves@redhat.com>
10098
10099 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10100 * gdbtypes.h (TYPE_STATIC): Delete.
10101 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10102 is_synchronized, is_native>: Delete.
10103 <dummy>: Bump.
10104 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10105 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10106 (TYPE_FN_FIELD_ABSTRACT): Delete.
10107
5bfd255c
SM
101082017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10109
10110 * buffer.h (buffer_finish): Fix spelling mistakes.
10111
25c54127
EZ
101122017-07-01 Eli Zaretskii <eliz@gnu.org>
10113
10114 * .dir-locals.el: Automatically switch to C-style comments in
10115 versions of Emacs that support the feature.
10116
dc4bde35
SDJ
101172017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10118 Pedro Alves <palves@redhat.com>
10119
10120 PR cli/21688
10121 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10122 (process_next_line): New variable 'inline_cmd'.
10123 Adjust 'if' clauses for "python", "compile" and "guile" to use
10124 'command_name_equals' and check for '!inline_cmd'.
10125
51ed89aa
SDJ
101262017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10127
10128 PR cli/21688
10129 * cli/cli-script.c (command_name_equals_not_inline): New function.
10130 (process_next_line): Adjust 'if' clauses for "python", "compile"
10131 and "guile" to use command_name_equals_not_inline.
10132
eb17d413
PA
101332017-06-29 Pedro Alves <palves@redhat.com>
10134
10135 * completer.c (expression_completer): Call
10136 linespec_location_completer instead of location_completer.
10137
195bcdd5
PA
101382017-06-29 Pedro Alves <palves@redhat.com>
10139
10140 * completer.c (expression_completer): Remove code that recomputes
10141 'text' from 'word'.
10142
adc764e7
YQ
101432017-06-29 Yao Qi <yao.qi@linaro.org>
10144
10145 * regformats/regdat.sh: Generate code with
10146 "ifndef IN_PROCESS_AGENT".
10147
6e75794e
PA
101482017-06-28 Pedro Alves <palves@redhat.com>
10149
10150 * command.h: Include "common/scoped_restore.h".
10151
bc491f2e
YQ
101522017-06-28 Yao Qi <yao.qi@linaro.org>
10153
10154 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10155 instead of obstack_grow.
10156
41664b45
DG
101572017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10158
10159 PR gdb/21337
10160 * symfile.c (reread_symbols): Call objfiles_changed just before
10161 read_symbols.
10162
6da67eb1
PA
101632017-06-27 Pedro Alves <palves@redhat.com>
10164
10165 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10166 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10167 (completion_list_add_symbol, completion_list_add_msymbol):
10168 ... these new functions.
10169 (add_symtab_completions)
10170 (default_make_symbol_completion_list_break_on_1): Adjust.
10171
23732b1e
PA
101722017-06-27 Pedro Alves <palves@redhat.com>
10173
10174 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10175 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10176 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10177 dtor.
10178 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10179 'storage_obstack' field an auto_obstack. In-class initialize all
10180 non-bitfield fields. Make minsyms_read bool.
10181 * symfile.c (read_symbols): Adjust.
10182
a4d1e79a
AH
101832017-06-27 Alan Hayward <alan.hayward@arm.com>
10184
10185 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10186 (gdbsim_store_register): Likewise.
10187
8268c778
PA
101882017-06-27 Pedro Alves <palves@redhat.com>
10189
10190 * c-exp.y (name_obstack): Now an auto_obstack.
10191 (yylex): Use auto_obstack::clear.
10192 (c_parse): Use auto_obstack::clear instead of reinitializing and
10193 freeing the obstack.
10194 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10195 * d-exp.y (name_obstack): Now an auto_obstack.
10196 (yylex): Use auto_obstack::clear.
10197 (d_parse): Use auto_obstack::clear instead of reinitializing and
10198 freeing the obstack.
10199 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10200 auto_obstack.
10201 * dwarf2read.c (create_addrmap_from_index)
10202 (dwarf2_build_psymtabs_hard)
10203 (update_enumeration_type_from_children): Likewise.
10204 * gdb_obstack.h (auto_obstack): New type.
10205 * go-exp.y (name_obstack): Now an auto_obstack.
10206 (build_packaged_name): Use auto_obstack::clear.
10207 (go_parse): Use auto_obstack::clear instead of reinitializing and
10208 freeing the obstack.
10209 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10210 auto_obstack.
10211 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10212 * rust-exp.y (work_obstack): Now an auto_obstack.
10213 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10214 reinitializing and freeing the obstack.
10215 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10216 (host_char_to_target): Use auto_obstack.
10217 * utils.h (make_cleanup_obstack_free): Delete declaration.
10218 * valprint.c (generic_emit_char, generic_printstr): Use
10219 auto_obstack.
10220
db665f42
SM
102212017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10222
10223 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10224 thread.
10225 (darwin_init_thread_list): Don't update dummy thread.
10226 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10227
873c0814
SM
102282017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10229
10230 * record-full.c (netorder16): Remove.
10231
8b5a7a6e
SM
102322017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10233
10234 * common/diagnostics.h: Define macros for GCC.
10235 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10236 * common/vec.h: Include diagnostics.h.
10237 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10238 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10239 warning.
10240
d1435379
SM
102412017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10242
10243 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10244 New macro.
10245 * ada-lex.l: Ignore deprecated register warnings.
10246
cc75e0fd
SM
102472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10248
10249 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10250 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10251
07809eaf
SM
102522017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10253
10254 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10255 its own line.
10256
f076f034
SM
102572017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10258
10259 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10260
0dd5cbc5
AH
102612017-06-23 Alan Hayward <alan.hayward@arm.com>
10262
10263 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10264 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10265 (xtensa_register_read_masked): Likewise.
10266
d4c6ce5b
SDJ
102672017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10268
10269 * common/environ.c (gdb_environ::unset): Update comment.
10270
16892a03
AH
102712017-06-22 Alan Hayward <alan.hayward@arm.com>
10272
10273 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10274 registers.
10275
d7dcbefc
AH
102762017-06-22 Alan Hayward <alan.hayward@arm.com>
10277
10278 * record-full.c (record_full_exec_insn): Use byte_vector.
10279
b30ff123
YQ
102802017-06-22 Yao Qi <yao.qi@linaro.org>
10281
10282 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10283 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10284
4fa847d7
AH
102852017-06-22 Alan Hayward <alan.hayward@arm.com>
10286
10287 * remote.c (cached_reg): Move from here...
10288 * regcache.h (cached_reg): ...to here.
10289 * python/py-unwind.c (struct reg_info): Remove.
10290 (cached_frame_info): Use cached_reg_t.
10291 (pyuw_prev_register): Likewise.
10292 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10293 (pyuw_dealloc_cache): Free all registers.
10294
f4906a9a
PA
102952017-06-22 Pedro Alves <palves@redhat.com>
10296 Simon Marchi <simon.marchi@ericsson.com>
10297
10298 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10299 warning.
10300 * common/diagnostics.h: New file.
10301
b45a1208
PA
103022017-06-22 Pedro Alves <palves@redhat.com>
10303
10304 * common/agent.h: Add include guards.
10305
e4da2c61
SM
103062017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10307
10308 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10309 talk about addressable units instead of bytes.
10310
96160d60
SDJ
103112017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10312
10313 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10314 of '::const_iterator'.
10315
9a6c7d9c
SDJ
103162017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10317
10318 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10319 'unittests/environ-selftests.c'.
10320 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10321 * charset.c (find_charset_names): Declare object 'iconv_env'.
10322 Update code to use 'iconv_env' object. Remove call to
10323 'free_environ'.
10324 * common/environ.c: Include <utility>.
10325 (make_environ): Delete function.
10326 (free_environ): Delete function.
10327 (gdb_environ::clear): New function.
10328 (gdb_environ::operator=): New function.
10329 (gdb_environ::get): Likewise.
10330 (environ_vector): Delete function.
10331 (set_in_environ): Delete function.
10332 (gdb_environ::set): New function.
10333 (unset_in_environ): Delete function.
10334 (gdb_environ::unset): New function.
10335 (gdb_environ::envp): Likewise.
10336 * common/environ.h: Include <vector>.
10337 (struct gdb_environ): Delete; transform into...
10338 (class gdb_environ): ... this class.
10339 (free_environ): Delete prototype.
10340 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10341 environ_vector): Likewise.
10342 * infcmd.c (run_command_1): Update code to call
10343 'envp' from 'gdb_environ' class.
10344 (environment_info): Update code to call methods from 'gdb_environ'
10345 class.
10346 (unset_environment_command): Likewise.
10347 (path_info): Likewise.
10348 (path_command): Likewise.
10349 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10350 (inferior::inferior): Initialize 'environment' using the host's
10351 information.
10352 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10353 Include "environ.h".
10354 (class inferior) <environment>: Change type from 'struct
10355 gdb_environ' to 'gdb_environ'.
10356 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10357 methods from 'gdb_environ' class.
10358 * solib.c (solib_find_1): Likewise
10359 * unittests/environ-selftests.c: New file.
10360
75c554cf
YQ
103612017-06-20 Yao Qi <yao.qi@linaro.org>
10362
10363 * features/i386/i386-linux.xml: Exchange the order of including
10364 32bit-linux.xml and 32bit-sse.xml.
10365 * features/i386/i386-linux.c: Regenerated.
10366
72ddacb7
YQ
103672017-06-20 Yao Qi <yao.qi@linaro.org>
10368
10369 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10370 Delete copy ctor and assignment operator.
10371 (tdesc_type): Likewise.
10372 (tdesc_feature): Likewise.
10373 (tdesc_free_reg): Remove.
10374 (tdesc_create_reg): Use new.
10375 (tdesc_free_type): Remove.
10376 (tdesc_create_vector): Use new.
10377 (tdesc_create_union): Likewise.
10378 (tdesc_create_flags): Likewise.
10379 (tdesc_create_enum): Likewise.
10380 (tdesc_free_feature): Delete.
10381 (free_target_description): Use delete.
10382
325c9fd4
JB
103832017-06-19 John Baldwin <jhb@FreeBSD.org>
10384
10385 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10386 registers.
10387
16b7a719
PA
103882017-06-19 Pedro Alves <palves@redhat.com>
10389
10390 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10391 after gdb::unlinker.
10392
1c8e01c9
SDJ
103932017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10394
10395 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10396 gdb_environ to access an environment variable.
10397
ffce45d2
TP
103982017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10399
10400 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10401 gdb_byte*.
10402
1d4fbac9
SM
104032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10404
10405 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10406
8465943a
SM
104072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10408
10409 * configure: Re-generate.
10410 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10411
3e019bdc
SM
104122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10413
10414 * configure: Re-generate.
10415 * warning.m4: Pass -Werror to compiler when checking for
10416 supported warning flags.
10417
cf0dd6f0
SM
104182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10419
10420 * Makefile.in (COMPILE.pre): Add "-x c++".
10421
6f98355c
YQ
104222017-06-16 Alan Hayward <alan.hayward@arm.com>
10423 Pedro Alves <palves@redhat.com>
10424 Yao Qi <yao.qi@linaro.org>
10425
10426 * defs.h (RequireLongest): New.
10427 (extract_integer): Declare function template.
10428 (extract_signed_integer): Remove the declaration, but define it
10429 static inline.
10430 (extract_unsigned_integer): Likewise.
10431 (store_integer): Declare function template.
10432 (store_signed_integer): Remove the declaration, but define it
10433 static inline.
10434 (store_unsigned_integer): Likewise.
10435 * findvar.c (extract_integer): New function template.
10436 (extract_signed_integer): Remove.
10437 (extract_unsigned_integer): Remove.
10438 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10439 instantiations.
10440 (store_integer): New function template.
10441 (store_signed_integer): Remove.
10442 (store_unsigned_integer): Remove.
10443 (store_integer): Explicit instantiations.
10444 * regcache.c (regcache_raw_read_signed): Update.
10445 (regcache::raw_read): New function.
10446 (regcache::raw_read_signed): Remove.
10447 (regcache::raw_read_unsigned): Remove.
10448 (regcache_raw_read_unsigned): Update.
10449 (regcache_raw_write_unsigned): Update.
10450 (regcache::raw_write_signed): Remove.
10451 (regcache::raw_write): New function.
10452 (regcache_cooked_read_signed): Update.
10453 (regcache::raw_write_unsigned): Remove.
10454 (regcache::cooked_read_signed): Remove.
10455 (regcache_cooked_read_unsigned): Update.
10456 (regcache::cooked_read_unsigned): Remove.
10457 (regcache_cooked_write_signed): Update.
10458 (regcache_cooked_write_unsigned): Update.
10459 * regcache.h (regcache) <raw_read_signed>: Remove.
10460 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10461 <raw_read, raw_write>: New.
10462 <cooked_read_signed, cooked_write_signed>: Remove.
10463 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10464 <cooked_read, cooked_write>: New.
10465 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10466 (sh64_pseudo_register_write): Update.
10467
a87dc45a
AK
104682017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10469
10470 * arc-tdep.c (arc_disassembler_options): New variable.
10471 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10472 of default_print_insn.
10473 (arc_delayed_print_insn): Set info->section when needed,
10474 use default_print_insn to retrieve a disassembler.
10475
45159d6a
SDJ
104762017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10477
10478 PR gdb/21574
10479 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10480 to mention $SHELL and startup-with-shell.
10481
b46c4cf0
MF
104822017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10483
10484 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10485
6394c606
YQ
104862017-06-14 Yao Qi <yao.qi@linaro.org>
10487
10488 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10489 default_print_insn instead of print_insn_aarch64.
10490 * arm-tdep.c (gdb_print_insn_arm): Call
10491 default_print_insn instead of print_insn_big_arm
10492 and print_insn_little_arm.
10493 * i386-tdep.c (i386_print_insn): Call default_print_insn
10494 instead of print_insn_i386.
10495 * ia64-tdep.c (ia64_print_insn): Call
10496 default_print_insn instead of print_insn_ia64.
10497 * mips-tdep.c (gdb_print_insn_mips): Call
10498 default_print_insn instead of print_insn_big_mips
10499 and print_insn_little_mips.
10500 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10501 instead of print_insn_spu.
10502
d5722aa2
PA
105032017-06-14 Pedro Alves <palves@redhat.com>
10504
10505 * ada-lang.c: Include "common/byte-vector.h".
10506 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10507 * charset.c (wchar_iterator::iterate): Resize the vector instead
10508 of reserving it.
10509 * common/byte-vector.h: Include "common/def-vector.h".
10510 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10511 * cli/cli-dump.c: Include "common/byte-vector.h".
10512 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10513 * common/byte-vector.h: New file.
10514 * common/def-vector.h: New file.
10515 * common/default-init-alloc.h: New file.
10516 * dwarf2loc.c: Include "common/byte-vector.h".
10517 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10518 instead of reserving it.
10519 * dwarf2read.c: Include "common/byte-vector.h".
10520 (data_buf::m_vec): Now a gdb::byte_vector.
10521 * gdb_regex.c: Include "common/def-vector.h".
10522 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10523 * mi/mi-main.c: Include "common/byte-vector.h".
10524 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10525 * printcmd.c: Include "common/byte-vector.h".
10526 (print_scalar_formatted): Use gdb::byte_vector.
10527 * valprint.c: Include "common/byte-vector.h".
10528 (maybe_negate_by_bytes, print_decimal_chars): Use
10529 gdb::byte_vector.
10530
01ec7a27
SM
105312017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10532
10533 * darwin-nat.c: Include "nat/fork-inferior.h".
10534
848d9074
SM
105352017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10536
10537 * configure.nat: Factor out Darwin bits that are not
10538 architecture-specific. Add fork-inferior.o.
10539
3b912944
SM
105402017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10541
10542 * configure.nat: Factor out AIX bits that are not
10543 architecture-specific. Add fork-inferior.o.
10544
55acdf22
AA
105452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10546
10547 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10548 (read_pieced_value, write_pieced_value): ...here. Reduce to
10549 wrappers that just call rw_pieced_value.
10550
f65e2044
AA
105512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10552
10553 * dwarf2loc.c (write_pieced_value): When writing the data for a
10554 memory piece, use write_memory_with_notification instead of
10555 write_memory.
10556
23f945bf
AA
105572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10558
10559 * valops.c (read_value_memory): Change embedded_offset to
10560 represent a bit offset instead of a byte offset.
10561 * value.h (read_value_memory): Adjust comment.
10562
f236533e
AA
105632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10564
10565 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10566 dest_offset_bits and source_offset_bits.
10567 (write_pieced_value): Likewise.
10568
65d84b76
AA
105692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10570
10571 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10572 given by DW_OP_bit_piece.
10573 (write_pieced_value): Likewise.
10574
242d31ab
AA
105752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10576
10577 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10578 some other preparations to the places where sufficient information
10579 is available.
10580 (write_pieced_value): Likewise.
10581
03c8af18
AA
105822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10583
10584 * dwarf2loc.c (bits_to_bytes): New function.
10585 (read_pieced_value): Fix offset calculations for register pieces
10586 on big-endian targets.
10587 (write_pieced_value): Likewise.
10588
840989c1
AA
105892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10590
10591 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10592 (write_pieced_value): Likewise.
10593
359b19bb
AA
105942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10595
10596 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10597 transfer the source value's least significant bits, instead of its
10598 lowest-addressed ones. Rename type_len to max_offset.
10599 (read_pieced_value): Mirror above changes to write_pieced_value as
10600 applicable.
10601
07c9ca3b
AA
106022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10603
10604 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10605 truncate full bytes from dest_offset_bits before using it as an
10606 offset into the buffer.
10607
f1cc9874
AA
106082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10609
10610 * dwarf2loc.c (write_pieced_value): Include transfer size in
10611 byte-wise check.
10612
cdaac320
AA
106132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10614
10615 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10616 calculation of this_size.
10617
af547a96
AA
106182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10619
10620 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10621 when targeting a bit-field.
10622 (write_pieced_value): Likewise.
10623
ddd7882a
AA
106242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10625
10626 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10627 (allocate_piece_closure): Drop addr_size parameter.
10628 (dwarf2_evaluate_loc_desc_full): Adjust call to
10629 allocate_piece_closure.
10630
e9352324
AA
106312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10632
10633 PR gdb/21226
10634 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10635 the LSB end, independent of endianness.
10636
d5d1163e
AA
106372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10638
10639 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10640 size capping.
10641
032bb6ea
YQ
106422017-06-13 Yao Qi <yao.qi@linaro.org>
10643
10644 * mips-linux-nat.c: Move include features/mips*-linux.c to
10645 mips-linux-tdep.c.
10646 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10647 to mips-linux-tdep.c.
10648 * mips-linux-tdep.c: Include features/mips*-linux.c
10649 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10650 functions.
10651 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10652 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10653 (tdesc_mips64_dsp_linux): Declare.
10654
f12f6bad
TT
106552017-06-12 Tom Tromey <tom@tromey.com>
10656
10657 * valprint.h (val_print_type_code_int): Remove.
10658 * valprint.c (generic_val_print_int): Always call
10659 val_print_scalar_formatted.
10660 (val_print_type_code_int): Remove.
10661 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10662 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10663 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10664 * ada-valprint.c (ada_val_print_num): Use
10665 val_print_scalar_formatted.
10666
d9109c80
TT
106672017-06-12 Tom Tromey <tom@tromey.com>
10668
10669 * printcmd.c (print_scalar_formatted): Unify the two switches.
10670 Don't convert scalars to LONGEST.
10671
4ac0cb1c
TT
106722017-06-12 Tom Tromey <tom@tromey.com>
10673
10674 PR exp/16225:
10675 * valprint.h (print_decimal_chars): Update.
10676 * valprint.c (maybe_negate_by_bytes): New function.
10677 (print_decimal_chars): Add "is_signed" argument.
10678 * printcmd.c (print_scalar_formatted): Update.
10679
30a25466
TT
106802017-06-12 Tom Tromey <tom@tromey.com>
10681
10682 PR exp/16225:
10683 * valprint.h (print_binary_chars, print_hex_chars): Update.
10684 * valprint.c (val_print_type_code_int): Update.
10685 (print_binary_chars): Add "zero_pad" argument.
10686 (emit_octal_digit): New function.
10687 (print_octal_chars): Don't zero-pad.
10688 (print_decimal_chars): Likewise.
10689 (print_hex_chars): Add "zero_pad" argument.
10690 * sh64-tdep.c (sh64_do_fp_register): Update.
10691 * regcache.c (regcache::dump): Update.
10692 * printcmd.c (print_scalar_formatted): Update.
10693 * infcmd.c (default_print_one_register_info): Update.
10694
b3464d03
PA
106952017-06-12 Pedro Alves <palves@redhat.com>
10696 Alan Hayward <alan.hayward@arm.com>
10697
10698 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10699 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10700 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10701 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10702 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10703
4b76cda9
PA
107042017-06-12 Pedro Alves <palves@redhat.com>
10705
10706 * dwarf2read.c (mapped_symtab::data): Now a vector of
10707 symtab_index_entry instead of vector of
10708 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10709 whether an element's name is NULL instead of checking whether the
10710 element itself is NULL.
10711 (find_slot): Change return type. Adjust.
10712 (hash_expand, , add_index_entry, uniquify_cu_indices)
10713 (write_hash_table): Adjust.
10714
e8f8bcb3
PA
107152017-06-12 Pedro Alves <palves@redhat.com>
10716
10717 * dwarf2read.c (recursively_count_psymbols): New function.
10718 (write_psymtabs_to_index): Call it to compute number of psyms and
10719 pass estimate size of psyms_seen to unordered_set's ctor.
10720
70a1152b
PA
107212017-06-12 Pedro Alves <palves@redhat.com>
10722
10723 * dwarf2read.c (write_hash_table): Check if key already exists
10724 before emplacing.
10725
c2f134ac
PA
107262017-06-12 Pedro Alves <palves@redhat.com>
10727
10728 * dwarf2read.c (data_buf::append_space): Rename to...
10729 (data_buf::grow): ... this, and make private. Adjust all callers.
10730 (data_buf::append_uint): New method.
10731 (add_address_entry, write_one_signatured_type)
10732 (write_psymtabs_to_index): Use it.
10733
a81e6d4d
PA
107342017-06-12 Pedro Alves <palves@redhat.com>
10735
10736 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10737 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10738 (data_buf::file_write): Call ::fwrite directly.
10739
6fd931f2
PA
107402017-06-12 Pedro Alves <palves@redhat.com>
10741
10742 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10743 std::vector::erase.
10744
bc8f2430
JK
107452017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10746
10747 Code cleanup: C++ify .gdb_index producer.
10748 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10749 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10750 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10751 (create_strtab, add_string): Remove.
10752 (file_write, data_buf): New.
10753 (struct symtab_index_entry): Use std::vector for cu_indices.
10754 (struct mapped_symtab): Use std::vector for data.
10755 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10756 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10757 Remove.
10758 (find_slot): Change return type. Update it to the new data structures.
10759 (hash_expand, add_index_entry): Update it to the new data structures.
10760 (offset_type_compare): Remove.
10761 (uniquify_cu_indices): Update it to the new data structures.
10762 (c_str_view, c_str_view_hasher, vector_hasher): New.
10763 (add_indices_to_cpool): Remove.
10764 (write_hash_table): Update it to the new data structures.
10765 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10766 (eq_psymtab_cu_index): Remove.
10767 (psym_index_map): New typedef.
10768 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10769 reference and std::unordered_map for cu_index_htab.
10770 (add_address_entry, add_address_entry_worker, write_address_map)
10771 (write_psymbols): Update it to the new data structures.
10772 (write_obstack): Remove.
10773 (struct signatured_type_index_data): Change types_list to a data_buf
10774 reference and psyms_seen to a std::unordered_set reference.
10775 (write_one_signatured_type, recursively_write_psymbols)
10776 (write_psymtabs_to_index): Update it to the new data structures.
10777
c4dcb155
SM
107782017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10779
10780 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10781 separate-debug-file commands.
10782 * symfile.h (separate_debug_file_debug): New global.
10783 * symfile.c (separate_debug_file_debug): New global.
10784 (separate_debug_file_exists, find_separate_debug_file): Add
10785 debug output.
10786 (_initialize_symfile): Add "set debug separate-debug-file"
10787 command.
10788 * build-id.c (build_id_to_debug_bfd,
10789 find_separate_debug_file_by_buildid): Add debug output.
10790
6d45d4b4
SM
107912017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10792
10793 * gdbarch.sh (displaced_step_free_closure): Remove.
10794 * gdbarch.h, gdbarch.c: Re-generate.
10795 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10796 displaced_step_free_closure.
10797 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10798 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10799 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10800 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10801 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10802 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10803 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10804 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10805 * infrun.c (displaced_step_clear): Call xfree instead of
10806 gdbarch_displaced_step_free_closure.
10807
2f91880f
SDJ
108082017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10809
10810 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10811 NULL".
10812
b8b6e72f
AH
108132017-06-08 Alan Hayward <alan.hayward@arm.com>
10814
10815 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10816 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10817 (mn10300_push_dummy_call): Likewise.
10818
5369082e
AH
108192017-06-08 Alan Hayward <alan.hayward@arm.com>
10820
10821 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10822
ff4ca5ac
AH
108232017-06-08 Alan Hayward <alan.hayward@arm.com>
10824
10825 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10826
aefd8b33
SDJ
108272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10828
10829 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10830 able to start inferiors using a shell.
10831 (New remote packets): Announce new packet "QStartupWithShell".
10832 * remote.c: Add PACKET_QStartupWithShell.
10833 (extended_remote_create_inferior): Handle new
10834 PACKET_QStartupWithShell.
10835 (remote_protocol_features) <QStartupWithShell>: New entry for
10836 PACKET_QStartupWithShell.
10837 (_initialize_remote): Call "add_packet_config_cmd" for
10838 QStartupShell.
10839
2090129c
SDJ
108402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10841 Pedro Alves <palves@redhat.com>
10842
10843 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10844 and "nat/fork-inferior.h".
10845 * common/common-inferior.h: New file, with contents from
10846 "gdb/inferior.h".
10847 * commom/common-utils.c: Include "common-utils.h".
10848 (stringify_argv): New function.
10849 * common/common-utils.h (stringify_argv): New prototype.
10850 * configure.nat: Add "fork-inferior.o" as a dependency for
10851 "*linux*", "fbsd*" and "nbsd*" hosts.
10852 * corefile.c (get_exec_file): Update comment.
10853 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10854 instead of "startup_inferior".
10855 (darwin_create_inferior): Call "add_thread_silent" after
10856 "fork_inferior".
10857 * fork-child.c: Cleanup unnecessary includes.
10858 (SHELL_FILE): Move to "common/common-fork-child.c".
10859 (environ): Likewise.
10860 (exec_wrapper): Initialize.
10861 (get_exec_wrapper): New function.
10862 (breakup_args): Move to "common/common-fork-child.c"; rename to
10863 "breakup_args_for_exec".
10864 (escape_bang_in_quoted_argument): Move to
10865 "common/common-fork-child.c".
10866 (saved_ui): New variable.
10867 (prefork_hook): New function.
10868 (postfork_hook): Likewise.
10869 (postfork_child_hook): Likewise.
10870 (gdb_startup_inferior): Likewise.
10871 (fork_inferior): Move to "common/common-fork-child.c". Update
10872 function to support gdbserver.
10873 (startup_inferior): Likewise.
10874 * gdbcore.h (get_exec_file): Remove declaration.
10875 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10876 instead of "startup_inferior". Call "add_thread_silent" after
10877 "fork_inferior".
10878 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10879 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10880 instead of "startup_inferior". Call "add_thread_silent" after
10881 "fork_inferior".
10882 * inferior.h: Include "common-inferior.h".
10883 (trace_start_error): Move to "common/common-utils.h".
10884 (trace_start_error_with_name): Likewise.
10885 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10886 (startup_inferior): Likewise.
10887 (gdb_startup_inferior): New prototype.
10888 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10889 * nat/fork-inferior.h: New file.
10890 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10891 instead of "startup_inferior". Call "add_thread_silent" after
10892 "fork_inferior".
10893 * target.h (target_terminal_init): Move prototype to
10894 "target/target.h".
10895 (target_terminal_inferior): Likewise.
10896 (target_terminal_ours): Likewise.
10897 * target/target.h (target_terminal_init): New prototype, moved
10898 from "target.h".
10899 (target_terminal_inferior): Likewise.
10900 (target_terminal_ours): Likewise.
10901 * utils.c (gdb_flush_out_err): New function.
10902
043a4934
SDJ
109032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10904
10905 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10906 * common/common-gdbthread.h: New file, with parts from
10907 "gdb/gdbthread.h".
10908 * gdbthread.h: Include "common-gdbthread.h".
10909 (switch_to_thread): Moved to "common/common-gdbthread.h".
10910
15652511
SDJ
109112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10912
10913 * Makefile.in (SFILES): Add "common/job-control.c".
10914 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10915 (COMMON_OBS): Add "job-control.o".
10916 * common/job-control.c: New file, with contents from
10917 "gdb/inflow.c".
10918 * common/job-control.h: New file, with contents from "terminal.h".
10919 * fork-child.c: Include "job-control.h".
10920 * inflow.c: Include "job-control.h".
10921 (gdb_setpgid): Move to "common/common-inflow.c".
10922 (_initialize_inflow): Move setting of "job_control" to
10923 "handle_job_control".
10924 * terminal.h (job_control): Moved to "common/common-terminal.h".
10925 (gdb_setpgid): Likewise.
10926 * top.c: Include "job_control.h".
10927 * utils.c: Likewise.
10928 (job_control): Moved to "job-control.c".
10929
2d7cc5c7
PA
109302017-06-07 Pedro Alves <palves@redhat.com>
10931
10932 * Makefile.in (SFILES): Add gdb_regex.c.
10933 (COMMON_OBS): Add gdb_regex.o.
10934 * ada-lang.c (ada_add_standard_exceptions)
10935 (ada_add_exceptions_from_frame, name_matches_regex)
10936 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10937 parameter type to compiled_regex. Adjust.
10938 (ada_exceptions_list): Use compiled_regex.
10939 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10940 std::unique_ptr<compiled_regex>.
10941 (exception_catchpoint::~exception_catchpoint): Remove regfree
10942 call.
10943 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10944 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10945 * breakpoint.c (solib_catchpoint::compiled): Now a
10946 std::unique_ptr<compiled_regex>.
10947 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10948 (check_status_catch_solib): Adjust to use compiled_regex.
10949 (add_solib_catchpoint): Adjust to use compiled_regex.
10950 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10951 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10952 compiled_regex reference. Adjust to use it.
10953 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10954 declaration. Include "gdb_regex.h".
10955 (apropos_cmd): Change regex parameter to compiled_regex reference.
10956 * gdb_regex.c: New file.
10957 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10958 declarations.
10959 (class compiled_regex): New.
10960 * linux-tdep.c: Include "common/gdb_optional.h".
10961 (struct mapping_regexes): New, factored out from
10962 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10963 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10964 gdb::optional and remove cleanups. Adjust to compiled_regex.
10965 * probe.c: Include "common/gdb_optional.h".
10966 (collect_probes): Use compiled_regex and gdb::optional and remove
10967 cleanups.
10968 * skip.c: Include "common/gdb_optional.h".
10969 (skiplist_entry::compiled_function_regexp): Now a
10970 gdb::optional<compiled_regex>.
10971 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10972 (free_skiplist_entry): Remove regfree call.
10973 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10974 compiled_regex and gdb::optional.
10975 * symtab.c: Include "common/gdb_optional.h".
10976 (search_symbols): Use compiled_regex and gdb::optional.
10977 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10978 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10979 to gdb_regex.c.
10980
50d6adef
AH
109812017-06-07 Alan Hayward <alan.hayward@arm.com>
10982
10983 * regcache.c (regcache::save): Avoid buffer use.
10984 (regcache::dump): Likewise.
10985
4a8a33c8
AH
109862017-06-07 Alan Hayward <alan.hayward@arm.com>
10987
10988 * sh-tdep.c (sh_pseudo_register_read): Remove
10989 MAX_REGISTER_SIZE.
10990 (sh_pseudo_register_write): Likewise.
10991 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10992 (sh64_pseudo_register_write): Likewise
10993
d1be909e
AH
109942017-06-07 Alan Hayward <alan.hayward@arm.com>
10995
10996 * aarch64-tdep.c (aarch64_store_return_value): Use
10997 V_REGISTER_SIZE.
10998 (aarch64_pseudo_read_value): Likewise.
10999 (aarch64_pseudo_write): Likewise.
11000
f4a65042
YQ
110012017-06-06 Yao Qi <yao.qi@linaro.org>
11002
11003 * regformats/regdef.h (set_register_cache): Remove the
11004 declaration.
11005
9f7fb0aa
AH
110062017-06-06 Alan Hayward <alan.hayward@arm.com>
11007
11008 * frame.c (frame_unwind_register_signed): Use
11009 frame_unwind_register_value.
11010
e1e01040
PA
110112017-06-06 Pedro Alves <palves@redhat.com>
11012
11013 PR breakpoints/21553
11014 * breakpoint.c (create_breakpoints_sal_default)
11015 (init_breakpoint_sal, create_breakpoint_sal): Use
11016 gdb::unique_xmalloc_ptr for string parameters.
11017 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11018 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11019 (base_breakpoint_create_breakpoints_sal)
11020 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11021 (strace_marker_create_breakpoints_sal)
11022 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11023 string parameters.
11024 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11025 gdb::unique_xmalloc_ptr for string parameters.
11026 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11027 parameters.
11028
fbe654c8
AH
110292017-06-06 Alan Hayward <alan.hayward@arm.com>
11030
11031 * alpha-tdep.c (alpha_register_to_value): Use
11032 get_frame_register_value.
11033 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11034
ae0d01d6
AH
110352017-06-06 Alan Hayward <alan.hayward@arm.com>
11036
11037 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11038 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11039 (ia64_value_to_register): Likewise.
11040 (ia64_extract_return_value): Likewise.
11041 (ia64_store_return_value): Likewise.
11042 (ia64_push_dummy_call): Likewise.
11043
49cf576c
JB
110442017-06-04 Joel Brobecker <brobecker@adacore.com>
11045
11046 GDB 8.0 released.
11047
26b6a6ab
SM
110482017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11049
11050 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11051
22827c51
SM
110522017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11053
11054 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11055 parameter.
11056 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11057
0e05cf3a
SM
110582017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11059
11060 * event-loop.c (poll_timers): Unallocate timer using delete
11061 instead of xfree.
11062
c1fc2657
SM
110632017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11064
11065 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11066 (struct breakpoint) <~breakpoint>: New.
11067 (struct watchpoint): Inherit from breakpoint.
11068 <~watchpoint>: New.
11069 <base>: Remove.
11070 (struct tracepoint): Inherit from breakpoint.
11071 <base>: Remove.
11072 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11073 (struct longjmp_breakpoint): Inherit from breakpoint.
11074 <~longjmp_breakpoint>: New.
11075 <base>: Remove.
11076 (new_breakpoint_from_type): Remove casts.
11077 (watchpoint_in_thread_scope): Remove reference to base field.
11078 (watchpoint_del_at_next_stop): Likewise.
11079 (update_watchpoint): Likewise.
11080 (watchpoint_check): Likewise.
11081 (bpstat_check_watchpoint): Likewise.
11082 (set_longjmp_breakpoint): Likewise.
11083 (struct fork_catchpoint): Inherit from breakpoint.
11084 <base>: Remove.
11085 (struct solib_catchpoint): Inherit from breakpoint.
11086 <~solib_catchpoint>: New.
11087 <base>: Remove.
11088 (dtor_catch_solib): Change to ...
11089 (solib_catchpoint::~solib_catchpoint): ... this.
11090 (breakpoint_hit_catch_solib): Remove reference to base field.
11091 (add_solib_catchpoint): Likewise.
11092 (create_fork_vfork_event_catchpoint): Likewise.
11093 (struct exec_catchpoint): Inherit from breakpoint.
11094 <~exec_catchpoint>: New.
11095 <base>: Remove.
11096 (dtor_catch_exec): Change to ...
11097 (exec_catchpoint::~exec_catchpoint): ... this.
11098 (dtor_watchpoint): Change to ...
11099 (watchpoint::~watchpoint): ... this.
11100 (watch_command_1): Remove reference to base field.
11101 (catch_exec_command_1): Likewise.
11102 (base_breakpoint_dtor): Change to ...
11103 (breakpoint::~breakpoint): ... this.
11104 (base_breakpoint_ops): Remove dtor field value.
11105 (longjmp_bkpt_dtor): Change to ...
11106 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11107 (strace_marker_create_breakpoints_sal): Remove reference to base
11108 field.
11109 (delete_breakpoint): Don't manually call breakpoint destructor.
11110 (create_tracepoint_from_upload): Remove reference to base field.
11111 (trace_pass_set_count): Likewise.
11112 (initialize_breakpoint_ops): Don't initialize
11113 momentary_breakpoint_ops, don't set dtors.
11114 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11115 <~ada_catchpoint>: New.
11116 <base>: Remove.
11117 (create_excep_cond_exprs): Remove reference to base field.
11118 (dtor_exception): Change to ...
11119 (ada_catchpoint::~ada_catchpoint): ... this.
11120 (dtor_catch_exception): Remove.
11121 (dtor_catch_exception_unhandled): Remove.
11122 (dtor_catch_assert): Remove.
11123 (create_ada_exception_catchpoint): Remove reference to base
11124 field.
11125 (initialize_ada_catchpoint_ops): Don't set dtors.
11126 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11127 breakpoint.
11128 <~signal_catchpoint>: New.
11129 <base>: Remove.
11130 (signal_catchpoint_dtor): Change to ...
11131 (signal_catchpoint::~signal_catchpoint): ... this.
11132 (create_signal_catchpoint): Remove reference to base field.
11133 (initialize_signal_catchpoint_ops): Don't set dtor.
11134 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11135 from breakpoint.
11136 <~syscall_catchpoint>: New.
11137 <base>: Remove.
11138 (dtor_catch_syscall): Change to ...
11139 (syscall_catchpoint::~syscall_catchpoint): ... this.
11140 (create_syscall_event_catchpoint): Remove reference to base
11141 field.
11142 (initialize_syscall_catchpoint_ops): Don't set dtor.
11143 * break-catch-throw.c (struct exception_catchpoint): Inherit
11144 from breakpoint.
11145 <~exception_catchpoint>: New.
11146 <base>: Remove.
11147 (dtor_exception_catchpoint): Change to ...
11148 (exception_catchpoint::~exception_catchpoint): ... this.
11149 (handle_gnu_v3_exceptions): Remove reference to base field.
11150 (initialize_throw_catchpoint_ops): Don't set dtor.
11151 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11152 field.
11153 * remote.c (remote_get_tracepoint_status): Likewise.
11154 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11155 * tracefile.c (tracefile_fetch_registers): Likewise.
11156 * tracepoint.c (actions_command): Likewise.
11157 (validate_actionline): Likewise.
11158 (tfind_1): Likewise.
11159 (get_traceframe_location): Likewise.
11160 (find_matching_tracepoint_location): Likewise.
11161 (parse_tracepoint_status): Likewise.
11162 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11163
3b0871f4
SM
111642017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11165
11166 * breakpoint.c (struct longjmp_breakpoint): New struct.
11167 (is_tracepoint_type): Change return type to bool.
11168 (is_longjmp_type): New function.
11169 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11170 (set_raw_breakpoint_without_location): Use
11171 new_breakpoint_from_type.
11172 (set_raw_breakpoint): Likewise.
11173
a5e364af
SM
111742017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11175
11176 * breakpoint.c (new_breakpoint_from_type): New function.
11177 (create_breakpoint_sal): Use new_breakpoint_from_type and
11178 unique_ptr.
11179 (create_breakpoint): Likewise.
11180
ae3b3f34
SM
111812017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11182
11183 * memattr.c (mem_info_command): Rename to ...
11184 (info_mem_command): ... this.
11185 (mem_enable_command): Rename to ...
11186 (enable_mem_command): ... this.
11187 (mem_disable_command): Rename to ...
11188 (disable_mem_command): ... this.
11189 (mem_delete_command): Rename to ...
11190 (delete_mem_command): ... this.
11191 (_initialize_mem): Adjust function names.
11192
13ace077
MM
111932017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11194
11195 * btrace.c (handle_pt_insn_events): New.
11196 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11197 STATUS. Split into this and ...
11198 (handle_pt_insn_event_flags): ... this.
11199
c56ccc05
MM
112002017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11201
11202 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11203 and struct pt_insn.resynced.
11204 * configure: Regenerated.
11205 * config.in: Regenerated.
11206
08c3f6d2
TW
112072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11208
11209 * btrace.c (ftrace_find_call_by_number): New function.
11210 (ftrace_new_function): Store objects, not pointers.
11211 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11212 ftrace_new_gap, ftrace_update_function,
11213 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11214 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11215 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11216 btrace_ends_with_single_insn, btrace_call_get): Account for
11217 btrace_thread_info::functions now storing objects.
11218 * btrace.h (struct btrace_thread_info): Add constructor.
11219 (struct btrace_thread_info) <functions>: Make std::vector.
11220 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11221 Initialize with default values.
11222 * record-btrace.c (record_btrace_frame_sniffer): Account for
11223 btrace_thread_info::functions now storing objects.
11224
8ffd39f2
TW
112252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11226
11227 * btrace.c: Remove typedef bfun_s.
11228 (ftrace_new_gap): Directly add gaps to the list of gaps.
11229 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11230 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11231 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11232 instead of gdb VEC.
11233
4aeb0dfc
TW
112342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11235
11236 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11237 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11238 with btrace_thread_info::next_segment and
11239 btrace_thread_info::prev_segment.
11240 * btrace.h: Remove struct btrace_func_link.
11241 (struct btrace_function): Replace pair of function segment pointers
11242 with pair of indices.
11243 * python/py-record-btrace.c (btpy_call_prev_sibling,
11244 btpy_call_next_sibling): Replace references to
11245 btrace_thread_info::segment with btrace_thread_info::next_segment and
11246 btrace_thread_info::prev_segment.
11247 * record-btrace.c (record_btrace_frame_this_id): Use
11248 btrace_find_call_by_number.
11249
eb8f2b9c
TW
112502017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11251
11252 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11253 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11254 btrace_insn_next, btrace_insn_prev): Remove references to
11255 btrace_thread_info::flow.
11256 * btrace.h (struct btrace_function): Remove FLOW.
11257
42bfe59e
TW
112582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11259
11260 * btrace.c (ftrace_find_call_by_number): New function.
11261 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11262 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11263 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11264 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11265 index.
11266 * btrace.h (struct btrace_function): Turn UP into an index.
11267 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11268 as an index.
11269 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11270 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11271 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11272
b54b03bd
TW
112732017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11274
11275 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11276 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11277 ftrace_update_function, ftrace_compute_global_level_offset,
11278 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11279 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11280 btrace_insn_end, btrace_is_empty): Remove references to
11281 btrace_thread_info::begin and btrace_thread_info::end.
11282 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11283 (struct btrace_thread_info) <functions>: Adjust comment.
11284 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11285 btrace_thread_info::begin.
11286
8286623c
TW
112872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11288
11289 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11290 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11291 ftrace_update_function): Remove arguments that implicitly were always
11292 BTINFO->END.
11293 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11294 Don't pass BTINFO->END.
11295
a0f1b963
TW
112962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11297
11298 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11299 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11300 btrace_find_insn_by_number): Replace function segment pointer with
11301 index.
11302 (btrace_insn_cmp): Simplify.
11303 * btrace.h: (struct btrace_insn_iterator) Rename index to
11304 insn_index. Replace function segment pointer with index into function
11305 segment vector.
11306 * record-btrace.c (record_btrace_call_history): Replace function
11307 segment pointer use with index.
11308 (record_btrace_frame_sniffer): Retrieve function call segment through
11309 vector.
11310 (record_btrace_set_replay): Remove defunc't safety check.
11311
f158f208
TW
113122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11313
11314 * btrace.c (btrace_ends_with_single_insn): New function.
11315 (btrace_call_get, btrace_call_number, btrace_call_begin,
11316 btrace_call_end, btrace_call_next, btrace_call_prev,
11317 btrace_find_call_by_number): Use index into call segment vector
11318 instead of pointer.
11319 (btrace_call_cmp): Simplify.
11320 * btrace.h (struct btrace_call_iterator): Replace function call segment
11321 pointer with index into vector.
11322 * record-btrace.c (record_btrace_call_history): Use index instead of
11323 pointer.
11324
521103fd
TW
113252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11326
11327 * btrace.c (btrace_insn_begin, btrace_insn_end,
11328 btrace_find_insn_by_number): Add btinfo to iterator.
11329 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11330
17b89b34
TW
113312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11332
11333 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11334 and save pointers directly.
11335 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11336 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11337 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11338 changed signature of functions.
11339 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11340 (btrace_fetch): Remove code that adds btrace_function pointers to
11341 vector of btrace_functions.
11342 (btrace_clear): Simplify freeing vector of btrace_functions.
11343
2b51eddc
TW
113442017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11345
11346 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11347 Replace VEC_* with std::vector functions.
11348 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11349 (struct btrace_thread_info)<functions>: Change type to std::vector.
11350
db6be0d5
SM
113512017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11352
11353 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11354 "Removed targets and native configurations" up. Merge duplicate
11355 "New commands" sub-sections. Add "New options" sub-sections.
11356
b057297a
AH
113572017-05-26 Alan Hayward <alan.hayward@arm.com>
11358
11359 * defs.h (copy_integer_to_size): New declaration.
11360 * findvar.c (copy_integer_to_size): New function.
11361 (do_cint_test): New selftest function.
11362 (copy_integer_to_size_test): Likewise.
11363 (_initialize_findvar): Likewise.
11364 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11365 (mips_fbsd_collect_reg): Use raw_collect_integer.
11366 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11367 (mips64_fill_gregset): Use raw_collect_integer
11368 (mips64_fill_fpregset): Use raw_supply_integer.
11369 * regcache.c (regcache::raw_supply_integer): New function.
11370 (regcache::raw_collect_integer): Likewise.
11371 * regcache.h: (regcache::raw_supply_integer): New declaration.
11372 (regcache::raw_collect_integer): Likewise.
11373
b77b02a5
YQ
113742017-05-24 Yao Qi <yao.qi@linaro.org>
11375
11376 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11377 (COMMON_OBS): Add gdbarch-selftests.o.
11378 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11379 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11380 * gdbarch-selftests.c: New file.
11381 * regcache.h (regcache) <~regcache>: Mark it virtual if
11382 GDB_SELF_TEST.
11383 <raw_write>: Likewise.
11384
e521e87e
YQ
113852017-05-24 Yao Qi <yao.qi@linaro.org>
11386
11387 * regcache.c (current_regcache): Change it to
11388 regcache::current_regcache.
11389 (regcache_observer_target_changed): Update.
11390 (regcache_thread_ptid_changed): Make it a regcache static
11391 method.
11392 (regcache_thread_ptid_changed): Update.
11393 (class regcache_access): New.
11394 (current_regcache_test): Update.
11395 (_initialize_regcache): Update.
11396 * regcache.h: Include forward_list.
11397 (regcache): Declare regcache_thread_ptid_changed and declare
11398 registers_changed_ptid as friend.
11399
d8e07dda
YQ
114002017-05-24 Yao Qi <yao.qi@linaro.org>
11401
11402 * i387-tdep.c (i387_register_to_value): Use register_size
11403 instead of TYPE_LENGTH.
11404 * m68k-tdep.c (m68k_register_to_value): Likewise.
11405
8c8f9122
YQ
114062017-05-24 Yao Qi <yao.qi@linaro.org>
11407
11408 * i387-tdep.c (i387_convert_register_p): Return false if type
11409 code isn't TYPE_CODE_FLT.
11410
68fce50f
YQ
114112017-05-24 Yao Qi <yao.qi@linaro.org>
11412
11413 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11414 length is 4.
11415 (alpha_register_to_value): Remove type length check.
11416 (alpha_value_to_register): Likewise.
11417
88954b49
YQ
114182017-05-24 Yao Qi <yao.qi@linaro.org>
11419
11420 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11421 TYPE_CODE_FLT.
11422
e3ec9b69
YQ
114232017-05-24 Yao Qi <yao.qi@linaro.org>
11424
11425 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11426 TYPE_CODE_FLT or not.
11427
cdd238da
YQ
114282017-05-24 Yao Qi <yao.qi@linaro.org>
11429
11430 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11431 * avr-tdep.c (avr_gdbarch_init): Likewise.
11432 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11433 * cris-tdep.c (cris_gdbarch_init): Likewise.
11434 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11435 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11436 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11437 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11438 * mep-tdep.c (mep_gdbarch_init): Likewise.
11439 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11440 * mips-tdep.c (mips_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 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11445 * v850-tdep.c (v850_gdbarch_init): Likewise.
11446
7a3929c4
YQ
114472017-05-24 Yao Qi <yao.qi@linaro.org>
11448
11449 * selftest-arch.c (tests_with_arch): Call registers_changed
11450 and reinit_frame_cache.
11451 * selftest.c (run_self_tests): Likewise.
11452
f4985dba
YQ
114532017-05-24 Yao Qi <yao.qi@linaro.org>
11454
11455 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11456 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11457
ab20fa4a
YQ
114582017-05-24 Yao Qi <yao.qi@linaro.org>
11459
11460 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11461 set_gdbarch_print_insn.
11462
f532ab94
YQ
114632017-05-24 Yao Qi <yao.qi@linaro.org>
11464
11465 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11466 set_gdbarch_print_insn.
11467
39503f82
YQ
114682017-05-24 Yao Qi <yao.qi@linaro.org>
11469
11470 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11471 set_gdbarch_print_insn.
11472 * arc-tdep.c (arc_gdbarch_init): Likewise.
11473 * arch-utils.c: include dis-asm.h.
11474 (default_print_insn): New function.
11475 * arch-utils.h (default_print_insn): Declare.
11476 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11477 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11478 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11479 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11480 * frv-tdep.c (frv_gdbarch_init): Likewise.
11481 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11482 * gdbarch.sh (print_insn): Use default_print_insn.
11483 * gdbarch.c: Regenerated.
11484 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11485 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11486 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11487 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11488 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11489 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11490 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11491 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11492 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11493 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11494 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11495 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11496 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11497 * mt-tdep.c (mt_gdbarch_init): Likewise.
11498 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11499 * nios2-tdep.c (nios2_print_insn): Remove.
11500 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11501 * rx-tdep.c (rx_gdbarch_init): Likewise.
11502 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11503 * score-tdep.c (score_print_insn): Remove.
11504 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11505 * sh-tdep.c (sh_gdbarch_init): Likewise.
11506 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11507 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11508 * tic6x-tdep.c (tic6x_print_insn): Remove.
11509 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11510 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11511 * v850-tdep.c (v850_gdbarch_init): Likewise.
11512 * vax-tdep.c (vax_gdbarch_init): Likewise.
11513 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11514 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11515
f7241d4f
JB
115162017-05-23 John Baldwin <jhb@FreeBSD.org>
11517
11518 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11519 (MIPS_FP0_REGNUM): Remove.
11520 (MIPS_FSR_REGNUM): Remove.
11521 (mips_fbsd_supply_fpregs): Use mips_regnum.
11522 (mips_fbsd_supply_gregs): Likewise.
11523 (mips_fbsd_collect_fpregs): Likewise.
11524 (mips_fbsd_collect_gregs): Likewise.
11525
d489d81d
JB
115262017-05-23 John Baldwin <jhb@FreeBSD.org>
11527
11528 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11529 (getpfpregs_supplies): New function.
11530 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11531 getfpregs_supplies.
11532 (mips_fbsd_store_inferior_registers): Likewise.
11533
e11b3cdc
PA
115342017-05-22 Pedro Alves <palves@redhat.com>
11535
11536 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11537 maintainer.
11538
0f068fb5
AH
115392017-05-22 Alan Hayward <alan.hayward@arm.com>
11540
11541 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11542 (store_register): Likewise.
11543 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11544 (get_decimal_float_return_value): Likewise.
11545 (do_ppc_sysv_return_value): Likewise.
11546 (ppc64_sysv_abi_push_integer): Likewise.
11547 (ppc64_sysv_abi_push_freg): Likewise.
11548 (ppc64_sysv_abi_return_value_base): Likewise.
11549 (ppc64_sysv_abi_return_value): Likewise.
11550 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11551 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11552 * rs6000-nat.c: Likewise.
11553 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11554 (rs6000_value_to_register): Likewise.
11555 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11556
e6cf65f2
TT
115572017-05-21 Tom Tromey <tom@tromey.com>
11558
11559 PR rust/21466:
11560 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11561 arrays as "[T]", not "[T; ]".
11562
43cc5389
TT
115632017-05-19 Tom Tromey <tom@tromey.com>
11564
11565 PR rust/21484:
11566 * rust-lang.c (exp_descriptor_rust): New function.
11567 (rust_language_defn): Use it.
11568 * p-lang.c (pascal_language_defn): Update.
11569 * opencl-lang.c (opencl_language_defn): Update.
11570 * objc-lang.c (objc_language_defn): Update.
11571 * m2-lang.c (m2_language_defn): Update.
11572 * language.h (struct language_defn)
11573 <la_watch_location_expression>: New member.
11574 * language.c (unknown_language_defn, auto_language_defn)
11575 (local_language_defn): Update.
11576 * go-lang.c (go_language_defn): Update.
11577 * f-lang.c (f_language_defn): Update.
11578 * d-lang.c (d_language_defn): Update.
11579 * c-lang.h (c_watch_location_expression): Declare.
11580 * c-lang.c (c_watch_location_expression): New function.
11581 (c_language_defn, cplus_language_defn, asm_language_defn)
11582 (minimal_language_defn): Use it.
11583 * breakpoint.c (watch_command_1): Call
11584 la_watch_location_expression.
11585 * ada-lang.c (ada_language_defn): Update.
11586
7a6e7fcc
RO
115872017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11588
6e7e1744
RO
11589 PR tui/21482
11590 * gdb_curses.h (NOMACROS): Define.
11591 (NCURSES_NOMACROS): Define.
11592
115932017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11594
11595 PR tui/21482
7a6e7fcc
RO
11596 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11597 arg to char *.
11598 * tui/tui-wingeneral.c (box_win): Likewise.
11599 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11600 (tui_show_source_line): Likewise.
11601 (tui_show_exec_info_content): Likewise.
11602
1933fd8e
VM
116032017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11604
11605 * sparc-tdep.c (sparc_structure_return_p)
11606 (sparc_arg_on_registers_p): New functions.
11607 (sparc32_store_arguments): Use them.
11608 * sparc64-tdep.c (sparc64_16_byte_align_p)
11609 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11610 Handle TYPE_CODE_ARRAY.
11611
21873064
YQ
116122017-05-17 Yao Qi <yao.qi@linaro.org>
11613
11614 * cli/cli-decode.c (add_alias_cmd): New function.
11615 * command.h (add_alias_cmd): Declare.
11616 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11617 instead call add_alias_cmd.
11618
2b351b19
PA
116192017-05-17 Pedro Alves <palves@redhat.com>
11620
11621 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11622 (nat_makefile_frag): ... this. All references updated.
11623 * configure.ac: Likewise.
11624 * configure.nat: Likewise. Enhance comments.
11625 * configure: Regenerate.
11626
5f2ad7a3
RO
116272017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11628
11629 * procfs.c (procfs_create_inferior): Change prototype to match
11630 definition.
11631
adf3dde5
EZ
116322017-05-13 Eli Zaretskii <eliz@gnu.org>
11633
11634 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11635 C++ compiler warning.
11636
6830f270
TT
116372017-05-12 Tom Tromey <tom@tromey.com>
11638
11639 PR rust/21483:
11640 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11641 recurse, just call value_struct_elt directly.
11642
68f2f2e3
TT
116432017-05-12 Tom Tromey <tom@tromey.com>
11644
11645 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11646 OP_RUST_ARRAY>: Fix.
11647
256afbc2
TT
116482017-05-12 Tom Tromey <tom@tromey.com>
11649
11650 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11651
94bb8dfe
YQ
116522017-05-09 Yao Qi <yao.qi@linaro.org>
11653
11654 * regcache.c: Include <forward_list>.
11655 (struct regcache_list): Remove.
11656 (current_regcache): Update.
11657 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11658 (regcache_thread_ptid_changed): Likewise.
11659 (registers_changed_ptid): Likewise.
11660 (current_regcache_size): Likewise.
11661
8248946c
YQ
116622017-05-09 Yao Qi <yao.qi@linaro.org>
11663
11664 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11665 (current_regcache_size): New function.
11666 (current_regcache_test): New function.
11667 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11668
313c5961
AH
116692017-05-08 Alan Hayward <alan.hayward@arm.com>
11670
11671 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11672 (print_gp_register_row): Use get_frame_register_value.
11673
27bfc1d1
AH
116742017-05-08 Alan Hayward <alan.hayward@arm.com>
11675
11676 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11677 (mips_supply_fpregset): Likewise.
11678 (mips64_supply_gregset): Likewise.
11679
146e6c5c
AH
116802017-05-08 Alan Hayward <alan.hayward@arm.com>
11681
11682 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11683 regcache->raw_supply_zeroed.
11684
e50f25ec
SDJ
116852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11686
11687 * configure.nat: Rearrange 'case' statements to match
11688 host before cpu.
11689
21ea5acd
SDJ
116902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11691
11692 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11693 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11694 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11695 "@nat_extra_makefile_frag@".
11696 (Makefile): Remove dependency on "@frags@".
11697 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11698 (data-directory/Makefile): Likewise.
11699 * config/aarch64/linux.mh: Deleted; moved contents to
11700 "gdb/configure.nat".
11701 * config/alpha/alpha-linux.mh: Likewise.
11702 * config/alpha/nbsd.mh: Likewise.
11703 * config/arm/linux.mh: Likewise.
11704 * config/arm/nbsdelf.mh: Likewise.
11705 * config/i386/cygwin.mh: Likewise.
11706 * config/i386/cygwin64.mh: Likewise.
11707 * config/i386/darwin.mh: Likewise.
11708 * config/i386/fbsd.mh: Likewise.
11709 * config/i386/fbsd64.mh: Likewise.
11710 * config/i386/go32.mh: Likewise.
11711 * config/i386/i386gnu.mh: Likewise.
11712 * config/i386/i386sol2.mh: Likewise.
11713 * config/i386/linux.mh: Likewise.
11714 * config/i386/linux64.mh: Likewise.
11715 * config/i386/mingw.mh: Likewise.
11716 * config/i386/mingw64.mh: Likewise.
11717 * config/i386/nbsd64.mh: Likewise.
11718 * config/i386/nbsdelf.mh: Likewise.
11719 * config/i386/nto.mh: Likewise.
11720 * config/i386/obsd.mh: Likewise.
11721 * config/i386/obsd64.mh: Likewise.
11722 * config/i386/sol2-64.mh: Likewise.
11723 * config/ia64/linux.mh: Likewise.
11724 * config/m32r/linux.mh: Likewise.
11725 * config/m68k/linux.mh: Likewise.
11726 * config/m68k/nbsdelf.mh: Likewise.
11727 * config/m68k/obsd.mh: Likewise.
11728 * config/m88k/obsd.mh: Likewise.
11729 * config/mips/fbsd.mh: Likewise.
11730 * config/mips/linux.mh: Likewise.
11731 * config/mips/nbsd.mh: Likewise.
11732 * config/mips/obsd64.mh: Likewise.
11733 * config/pa/linux.mh: Likewise.
11734 * config/pa/nbsd.mh: Likewise.
11735 * config/pa/obsd.mh: Likewise.
11736 * config/powerpc/aix.mh: Likewise.
11737 * config/powerpc/fbsd.mh: Likewise.
11738 * config/powerpc/linux.mh: Likewise.
11739 * config/powerpc/nbsd.mh: Likewise.
11740 * config/powerpc/obsd.mh: Likewise.
11741 * config/powerpc/ppc64-linux.mh: Likewise.
11742 * config/powerpc/spu-linux.mh: Likewise.
11743 * config/s390/linux.mh: Likewise.
11744 * config/sh/nbsd.mh: Likewise.
11745 * config/sparc/fbsd.mh: Likewise.
11746 * config/sparc/linux.mh: Likewise.
11747 * config/sparc/linux64.mh: Likewise.
11748 * config/sparc/nbsd64.mh: Likewise.
11749 * config/sparc/nbsdelf.mh: Likewise.
11750 * config/sparc/obsd64.mh: Likewise.
11751 * config/sparc/sol2.mh: Likewise.
11752 * config/tilegx/linux.mh: Likewise.
11753 * config/vax/nbsdelf.mh: Likewise.
11754 * config/vax/obsd.mh: Likewise.
11755 * config/xtensa/linux.mh: Likewise.
11756 * config/i386/i386gnu.mn: New file, with excerpts from
11757 "config/i386/i386gnu.mh".
11758 * configure: Regenerate.
11759 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11760 *.mh files under "gdb/config".
11761 * configure.nat: New file, with contents from the
11762 "gdb/config/*/*.mh" files.
11763
7ed1acaf
TW
117642017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11765
11766 * btrace.c (btrace_clear): Free insn vector.
11767
e13cb306
PA
117682017-05-05 Pedro Alves <palves@redhat.com>
11769
11770 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11771 * configure: Regenerate.
11772
5ed8105e
PA
117732017-05-04 Pedro Alves <palves@redhat.com>
11774
11775 * Makefile.in (SFILES): Add progspace-and-thread.c.
11776 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11777 (COMMON_OBS): Add progspace-and-thread.o.
11778 * breakpoint.c: Include "progspace-and-thread.h".
11779 (update_inserted_breakpoint_locations)
11780 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11781 Use scoped_restore_current_pspace_and_thread.
11782 (create_std_terminate_master_breakpoint): Use
11783 scoped_restore_current_program_space.
11784 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11785 (print_breakpoint_location): Use
11786 scoped_restore_current_program_space.
11787 (bp_loc_is_permanent): Use
11788 scoped_restore_current_pspace_and_thread.
11789 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11790 (download_tracepoint_locations): Use
11791 scoped_restore_current_pspace_and_thread.
11792 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11793 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11794 (enum step_over_calls_kind): Moved from inferior.h.
11795 (class scoped_restore_current_thread): New class.
11796 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11797 declaration.
11798 (scoped_restore_current_thread): New class.
11799 * infcmd.c: Include "common/gdb_optional.h".
11800 (continue_1, proceed_after_attach): Use
11801 scoped_restore_current_thread.
11802 (notice_new_inferior): Use scoped_restore_current_thread.
11803 * inferior.c: Include "progspace-and-thread.h".
11804 (restore_inferior, save_current_inferior): Delete.
11805 (add_inferior_command, clone_inferior_command): Use
11806 scoped_restore_current_pspace_and_thread.
11807 * inferior.h (scoped_restore_current_inferior): New class.
11808 * infrun.c: Include "progspace-and-thread.h" and
11809 "common/gdb_optional.h".
11810 (follow_fork_inferior): Use
11811 scoped_restore_current_pspace_and_thread.
11812 (scoped_restore_exited_inferior): New class.
11813 (handle_vfork_child_exec_or_exit): Use
11814 scoped_restore_exited_inferior,
11815 scoped_restore_current_pspace_and_thread,
11816 scoped_restore_current_thread and scoped_restore.
11817 (fetch_inferior_event): Use scoped_restore_current_thread.
11818 * linespec.c (decode_line_full, decode_line_1): Use
11819 scoped_restore_current_program_space.
11820 * mi/mi-main.c: Include "progspace-and-thread.h".
11821 (exec_continue): Use scoped_restore_current_thread.
11822 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11823 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11824 * proc-service.c (ps_pglobal_lookup): Use
11825 scoped_restore_current_program_space.
11826 * progspace-and-thread.c: New file.
11827 * progspace-and-thread.h: New file.
11828 * progspace.c (release_program_space, clone_program_space): Use
11829 scoped_restore_current_program_space.
11830 (restore_program_space, save_current_program_space)
11831 (save_current_space_and_thread): Delete.
11832 (switch_to_program_space_and_thread): Moved to
11833 progspace-and-thread.c.
11834 * progspace.h (save_current_program_space)
11835 (save_current_space_and_thread): Delete declarations.
11836 (scoped_restore_current_program_space): New class.
11837 * remote.c (remote_btrace_maybe_reopen): Use
11838 scoped_restore_current_thread.
11839 * symtab.c: Include "progspace-and-thread.h".
11840 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11841 * thread.c (print_thread_info_1): Use
11842 scoped_restore_current_thread.
11843 (struct current_thread_cleanup): Delete.
11844 (do_restore_current_thread_cleanup)
11845 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11846 (scoped_restore_current_thread::~scoped_restore_current_thread):
11847 ... this new dtor.
11848 (make_cleanup_restore_current_thread): Rename/convert to ...
11849 (scoped_restore_current_thread::scoped_restore_current_thread):
11850 ... this new ctor.
11851 (thread_apply_all_command): Use scoped_restore_current_thread.
11852 (thread_apply_command): Use scoped_restore_current_thread.
11853 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11854 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11855
f6223dbb
PA
118562017-05-04 Pedro Alves <palves@redhat.com>
11857
11858 * thread.c (make_cleanup_restore_current_thread): Move
11859 find_thread_ptid call before the is_stopped call. Assert that the
11860 thread is found. Replace is_stopped call by checking the thread's
11861 state directly. Remove unnecessary NULL-thread check.
11862
3c3ae77e
PA
118632017-05-04 Pedro Alves <palves@redhat.com>
11864
11865 * corelow.c (thread_section_name): New class.
11866 (get_core_register_section, get_core_siginfo): Use it.
11867
45eba0ab
AA
118682017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11869
11870 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11871 (get_core_register_section): Remove xfree of NULL pointer.
11872
f81fdd35
AH
118732017-05-03 Alan Hayward <alan.hayward@arm.com>
11874
11875 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11876 * regcache.c (regcache::raw_supply_zeroed): New function.
11877 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11878
35837774
SM
118792017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11880
11881 * gdbarch.sh: Remove commented out definition of
11882 TARGET_CHAR_BIT.
11883 * gdbarch.h: Re-generate.
11884
c94fee56
SDJ
118852017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11886
11887 * configure: Regenerate.
11888
d17f7b36
SM
118892017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11890
11891 * solib-target.c (solib_target_relocate_section_addresses):
11892 Remove num_section_bases, num_bases, segment_bases variables.
11893
b560ebd6
SM
118942017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11895
11896 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11897
f2f46dfc
SM
118982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11899
11900 * solib-target.c: Include <vector>
11901 (struct lm_info_target) <~lm_info_target>: Remove.
11902 <segment_bases, section_bases>: Change type to
11903 std::vector<CORE_ADDR>.
11904 (library_list_start_segment, library_list_start_section,
11905 library_list_end_library,
11906 solib_target_relocate_section_addresses): Adjust.
11907
a0ff9e1a
SM
119082017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11909
11910 * gdbarch.sh (software_single_step): Change return type to
11911 std::vector<CORE_ADDR>.
11912 * gdbarch.c, gdbarch.h: Re-generate.
11913 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11914 Adjust.
11915 (arm_deal_with_atomic_sequence_raw): Adjust.
11916 (thumb_get_next_pcs_raw): Adjust.
11917 (arm_get_next_pcs_raw): Adjust.
11918 (arm_get_next_pcs): Adjust.
11919 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11920 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11921 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11922 (alpha_software_single_step): Adjust.
11923 * alpha-tdep.h (alpha_software_single_step): Adjust.
11924 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11925 * arm-tdep.c (arm_software_single_step): Adjust.
11926 (arm_breakpoint_kind_from_current_state): Adjust.
11927 * arm-tdep.h (arm_software_single_step): Adjust.
11928 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11929 * cris-tdep.c (cris_software_single_step): Adjust.
11930 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11931 (micromips_deal_with_atomic_sequence): Adjust.
11932 (deal_with_atomic_sequence): Adjust.
11933 (mips_software_single_step): Adjust.
11934 * mips-tdep.h (mips_software_single_step): Adjust.
11935 * moxie-tdep.c (moxie_software_single_step): Adjust.
11936 * nios2-tdep.c (nios2_software_single_step): Adjust.
11937 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11938 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11939 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11940 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11941 * sparc-tdep.c (sparc_software_single_step): Adjust.
11942 * spu-tdep.c (spu_software_single_step): Adjust.
11943 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11944
ea480a30
SM
119452017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11946
11947 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11948 * gdbarch.h: Re-generate.
11949
d050f7d7
TW
119502017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11951
11952 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11953 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11954 * python/py-instruction.c, python/py-instruction.h: New file.
11955 * python/py-record.c: Add py-instruction.h include.
11956 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11957 gdb.RecordInstruction.
11958 * python/python-internal.h: Add gdbpy_initialize_instruction
11959 declaration.
11960 * python/python.c (do_start_initialization): Add
11961 gdbpy_initialize_instruction.
11962
14f819c8
TW
119632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11964
11965 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11966 Remove.
11967 (btrace_func_from_recpy_func): New function.
11968 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11969 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11970 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11971 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11972 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11973 Also, use new helper functions.
11974 (btpy_list_item): Use new helper functions.
11975 (recpy_bt_function_call_history): Use new type name.
11976 (btpy_call_getset): Remove.
11977 (gdbpy_initialize_btrace): Remove code to initialize
11978 gdb.BtraceFunctionCall.
11979 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11980 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11981 recpy_bt_func_prev, recpy_bt_func_next): New export.
11982 * python/py-record.c (recpy_func_type): New static object.
11983 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11984 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11985 recpy_func_next): New function.
11986 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11987 (recpy_func_getset): New static object.
11988 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11989 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11990
0ed5da75
TW
119912017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11992
11993 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11994 (btpy_object, btpy_insn_type, btpy_new): Remove.
11995 (btpy_list_object): Use gdb.RecordInstruction type instead of
11996 gdb.BtraceInstruction type.
11997 (btrace_insn_from_recpy_insn): New function.
11998 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11999 btpy_new.
12000 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12001 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12002 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12003 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12004 instead of btpy_object.
12005 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12006 btpy_insn_data, btpy_insn_decode): Rename to ...
12007 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12008 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12009 recpy_bt_insn_decode): This. Also, use new helper functions.
12010 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12011 recpy_insn_type.
12012 (btpy_insn_getset): Remove.
12013 (gdbpy_initialize_btrace): Remove code to initialize
12014 gdb.BtraceInstruction. Use recpy_element_object.
12015 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12016 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12017 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12018 * python/py-record.c (recpy_insn_type): New static object.
12019 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12020 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12021 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12022 New function.
12023 (recpy_insn_getset): New static object.
12024 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12025 * python/py-record.h (recpy_element_object): New typedef.
12026 (recpy_insn_type, recpy_insn_new): New export.
12027
913aeadd
TW
120282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12029
12030 * py-record-btrace.c (btpy_insn_new): Removed.
12031 (btpy_insn_or_gap_new): New function.
12032 (btpy_insn_error): Removed.
12033 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12034 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12035 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12036 btpy_insn_or_gap_new instead of btpy_insn_new.
12037 (btpy_insn_getset): Remove btpy_insn_error.
12038 * py-record.c (recpy_gap_type): New static object.
12039 (recpy_gap_object): New typedef.
12040 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12041 recpy_gap_reason_string): New function.
12042 (recpy_gap_getset): New static object.
12043 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12044 * py-record.h (recpy_gap_new): New export.
12045
a3be24ad
TW
120462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12047
12048 * python/py-record.c (recpy_ptid): Remove.
12049 (recpy_record_getset): Remove recpy_ptid.
12050
ae20e79a
TW
120512017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12052
12053 * btrace.c (btrace_fetch): Set inferior_ptid.
12054 * python/py-record-btrace.c: Add "py-record.h" include.
12055 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12056 recpy_bt_end, recpy_bt_instruction_history,
12057 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12058 in gdb.Record object instead of current ptid.
12059 * python/py-record.c: Include new "py-record.h" file.
12060 (recpy_record_object): Moved to py-record.h.
12061 * python/py-record.h: New file.
12062
8d0050ea
TW
120632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12064
12065 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12066 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12067 indentation.
12068
3f380b50
JB
120692017-05-01 Joel Brobecker <brobecker@adacore.com>
12070
12071 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12072 the past maintainers section.
12073
07495424
YQ
120742017-04-28 Yao Qi <yao.qi@linaro.org>
12075
12076 * infcmd.c (get_return_value): Use regcache ctor, and remove
12077 cleanup.
12078
deb1fa3e
YQ
120792017-04-28 Yao Qi <yao.qi@linaro.org>
12080 Pedro Alves <palves@redhat.com>
12081
12082 * regcache.c (regcache::regcache): New tag dispatch ctor.
12083 (do_cooked_read): Moved above.
12084 (regcache_dup): Use the tag dispatch ctor..
12085 * regcache.h (regcache): Declare ctor, delete copy ctor and
12086 assignment operator, remove friend regcache_dup.
12087
b421c83c
YQ
120882017-04-28 Yao Qi <yao.qi@linaro.org>
12089
12090 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12091 call method save instead of regcache_cpy.
12092 * regcache.h (struct regcache): Make regcache_dup a friend.
12093
ef79d9a3
YQ
120942017-04-28 Yao Qi <yao.qi@linaro.org>
12095
12096 * regcache.c (struct regcache): Move to regcache.h
12097 (regcache::arch): New method.
12098 (regcache_get_ptid): Update.
12099 (get_regcache_arch): Call arch method.
12100 (get_regcache_aspace): Call method aspace.
12101 (register_buffer): Change it to method.
12102 (regcache_save): Change it to regcache::save.
12103 (regcache_restore): Likewise.
12104 (regcache_cpy_no_passthrough): Remove the declaration.
12105 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12106 (regcache_cpy_no_passthrough): Change it to method
12107 cpy_no_passthrough.
12108 (regcache_register_status): Change it to method
12109 get_register_status.
12110 (regcache_invalidate): Change it to method invalidate.
12111 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12112 (regcache_raw_update): Change it to method raw_update.
12113 (regcache_raw_read): Likewise.
12114 (regcache_raw_read_signed): Likewise.
12115 (regcache_raw_read_unsigned): Likewise.
12116 (regcache_raw_write_signed): Likewise.
12117 (regcache_raw_write_unsigned): Likewise.
12118 (regcache_cooked_read): Likewise.
12119 (regcache_cooked_read_value): Likewise.
12120 (regcache_cooked_read_signed): Likewise.
12121 (regcache_cooked_read_unsigned): Likewise.
12122 (regcache_cooked_write_signed): Likewise.
12123 (regcache_cooked_write_unsigned): Likewise.
12124 (regcache_raw_set_cached_value): Likewise.
12125 (regcache_raw_write): Likewise.
12126 (regcache_cooked_write): Likewise.
12127 (regcache_xfer_part): Likewise.
12128 (regcache_raw_read_part): Likewise.
12129 (regcache_raw_write_part): Likewise.
12130 (regcache_cooked_read_part): Likewise.
12131 (regcache_cooked_write_part): Likewise.
12132 (regcache_raw_supply): Likewise.
12133 (regcache_raw_collect): Likewise.
12134 (regcache_transfer_regset): Likewise.
12135 (regcache_supply_regset): Likewise.
12136 (regcache_collect_regset): Likewise.
12137 (regcache_debug_print_register): Likewise.
12138 (enum regcache_dump_what): Move it to regcache.h.
12139 (regcache_dump): Change it to method dump.
12140 * regcache.h (enum regcache_dump_what): New.
12141 (class regcache): New.
12142 * target.c (target_fetch_registers): Call method
12143 debug_print_register.
12144 (target_store_registers): Likewise.
12145
f8fdb78e
SM
121462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12147
12148 * windows-nat.c (struct lm_info_windows): Initialize field.
12149 (windows_make_so): Allocate lm_info_windows with new.
12150 (windows_free_so): Free lm_info_windows with delete.
12151
9ccbfd7b
SM
121522017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12153
12154 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12155 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12156 cleanup.
12157 (darwin_free_so): Free lm_info_darwin with delete.
12158
76e75227
SM
121592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12160
12161 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12162 <l_addr_p>: Change type to bool.
12163 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12164 (svr4_free_so): Free lm_info_svr4 with delete.
12165 (svr4_copy_library_list): Replace memcpy with call to copy
12166 constructor.
12167 (library_list_start_library, svr4_default_sos): Allocate
12168 lm_info_svr4 with new.
12169
51046d9e
SM
121702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12171
12172 * solib-target.c (struct lm_info_target): Add destructor,
12173 initialize fields.
12174 <name>: Change type to std::string.
12175 (library_list_start_library): Allocate lm_info_target with new.
12176 (solib_target_free_library_list): Free lm_info_target with
12177 delete.
12178 (solib_target_current_sos): Adapt to std::string.
12179 (solib_target_free_so): Free lm_info_target with delete.
12180
4023ae76
SM
121812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12182
12183 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12184 fields.
12185 (frv_current_sos): Allocate lm_info_frv with new.
12186 (frv_relocate_main_executable): Free lm_info_frv with delete,
12187 allocate with new.
12188 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12189
af43057b
SM
121902017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12191
12192 * solib-frv.c (struct lm_info_frv): Fix indentation.
12193
b0911207
SM
121942017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12195
12196 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12197 map field.
12198 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12199 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12200 and allocate with new.
12201 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12202
6c401f72
SM
122032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12204
12205 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12206 <filename, member_name>: Change type to std::string.
12207 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12208 (library_list_start_library): Allocate lm_info_aix with new.
12209 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12210 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12211 with copy constructor.
12212
d0e449a1
SM
122132017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12214
12215 * solist.h (struct lm_info): Remove.
12216 (struct lm_info_base): New class.
12217 (struct so_list) <lm_info>: Change type to lm_info_base *.
12218 * nto-tdep.c (struct lm_info): Remove.
12219 (lm_addr): Adjust.
12220 * solib-aix.c (struct lm_info): Rename to ...
12221 (struct lm_info_aix): ... this. Extend lm_info_base.
12222 (lm_info_p): Rename to ...
12223 (lm_info_aix_p): ... this, and adjust.
12224 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12225 solib_aix_parse_libraries, library_list_start_library,
12226 solib_aix_free_library_list, solib_aix_parse_libraries,
12227 solib_aix_get_library_list,
12228 solib_aix_relocate_section_addresses, solib_aix_free_so,
12229 solib_aix_get_section_offsets,
12230 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12231 Adjust.
12232 (struct solib_aix_inferior_data) <library_list>: Adjust.
12233 * solib-darwin.c (struct lm_info): Rename to ...
12234 (struct lm_info_darwin): ... this. Extend lm_info_base.
12235 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12236 * solib-dsbt.c (struct lm_info): Rename to ...
12237 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12238 (struct dsbt_info) <main_executable_lm_info): Adjust.
12239 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12240 dsbt_relocate_section_addresses): Adjust.
12241 * solib-frv.c (struct lm_info): Rename to ...
12242 (struct lm_info_frv): ... this. Extend lm_info_base.
12243 (main_executable_lm_info): Adjust.
12244 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12245 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12246 find_canonical_descriptor_in_load_object,
12247 frv_fdpic_find_canonical_descriptor): Adjust.
12248 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12249 to lm_info_svr4.
12250 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12251 svr4_clear_so, svr4_copy_library_list,
12252 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12253 svr4_current_sos, svr4_fetch_objfile_link_map,
12254 solist_update_incremental): Adjust.
12255 * solib-svr4.h (struct lm_info_svr4): Move here from
12256 solib-svr4.c.
12257 * solib-target.c (struct lm_info): Rename to ...
12258 (struct lm_info_target): ... this. Extend lm_info_base.
12259 (lm_info_p): Rename to ...
12260 (lm_info_target_p): ... this.
12261 (solib_target_parse_libraries, library_list_start_segment,
12262 library_list_start_section, library_list_start_library,
12263 library_list_end_library, solib_target_free_library_list,
12264 solib_target_current_sos, solib_target_free_so,
12265 solib_target_relocate_section_addresses): Adjust.
12266 * windows-nat.c (struct lm_info): Rename to ...
12267 (struct lm_info_windows): ... this. Extend lm_info_base.
12268 (windows_make_so, handle_load_dll, handle_unload_dll,
12269 windows_xfer_shared_libraries): Adjust.
12270
434a4023
SM
122712017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12272
12273 * solib-darwin.c (struct darwin_so_list): Remove.
12274 (darwin_current_sos): Allocate an so_list object instead of a
12275 darwin_so_list, separately allocate an lm_info object.
12276 (darwin_free_so): Free lm_info.
12277
428544e8
JB
122782017-04-28 John Baldwin <jhb@FreeBSD.org>
12279
12280 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12281 with fprintf_filtered.
12282
4621115f
YQ
122832017-04-28 Yao Qi <yao.qi@linaro.org>
12284
12285 * regcache.c (regcache::regcache): New function.
12286 (regcache::~regcache): New function.
12287 (regcache_xmalloc_1): Remove.
12288 (regcache_xmalloc): Call new regcache.
12289 (regcache_xfree): Call delete regcache.
12290 (get_thread_arch_aspace_regcache): Call new regcache.
12291
339053c2
YQ
122922017-04-28 Yao Qi <yao.qi@linaro.org>
12293
12294 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12295 lwp instead of ptid_get_lwp.
12296
7974a605
YQ
122972017-04-28 Yao Qi <yao.qi@linaro.org>
12298
12299 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12300 lwp_info instead of getting from inferior_ptid.
12301
e15c3eb4
KS
123022017-04-27 Keith Seitz <keiths@redhat.com>
12303
12304 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12305 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12306 (CV_CONVERSION_BADNESS): Define.
12307 (rank_one_type): Remove overly restrictive rvalue reference
12308 rank checks.
12309 Add cv-qualifier checks and subranks for type equality.
12310 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12311 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12312 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12313
72bc1d24
SM
123142017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12315
12316 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12317 count when creating the object.
12318
55bcecda
UW
123192017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12320 Ulrich Weigand <uweigand@de.ibm.com>
12321
12322 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12323 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12324 is used in AIX.
12325 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12326 (process_xcoff_symbol): Likewise.
12327 (scan_xcoff_symtab): Likewise.
12328
5c99fcf8
AH
123292017-04-26 Alan Hayward <alan.hayward@arm.com>
12330
12331 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12332 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12333 (ia64_access_reg): Use get_frame_register_unsigned.
12334 (ia64_access_rse_reg): Likewise.
12335 (ia64_libunwind_frame_prev_register): Likewise.
12336
b41c5a85
JW
123372017-04-26 Jiong Wang <jiong.wang@arm.com>
12338
12339 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12340 * gdbarch.c: Regenerated.
12341 * gdbarch.h: Regenerated.
12342 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12343 visibility external.
12344 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12345 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12346 (enum cfa_how_kind): Move to ...
12347 (struct dwarf2_frame_state_reg_info): Likewise.
12348 (struct dwarf2_frame_state): Likewise.
12349 * dwarf2-frame.h: ... here.
12350 (dwarf2_frame_state_alloc_regs): New declaration.
12351 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12352 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12353
c185f580
AH
123542017-04-26 Alan Hayward <alan.hayward@arm.com>
12355
12356 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12357 regcache_raw_read_unsigned.
12358 (xtensa_pseudo_register_write): Likewise.
12359
19c45594
AH
123602017-04-26 Alan Hayward <alan.hayward@arm.com>
12361
12362 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12363 (nds32_pseudo_register_write): Likewise.
12364
4658f12e
YQ
123652017-04-25 Yao Qi <yao.qi@linaro.org>
12366
12367 * regcache.c (struct regcache) <readonly_p>: Change its type
12368 to bool.
12369 (regcache_xmalloc_1): Update parameter type and callers update.
12370
d581dda8
YQ
123712017-04-25 Yao Qi <yao.qi@linaro.org>
12372
12373 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12374 set_gdbarch_wchar_bit.
12375 * arm-tdep.c (arm_gdbarch_init): Likewise.
12376
debed3db
PA
123772017-04-25 Pedro Alves <palves@redhat.com>
12378
12379 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12380 (BothAreRelocatable, memcopy, memmove): Don't define.
12381 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12382 macros.
12383
b0b92aeb
PA
123842017-04-25 Pedro Alves <palves@redhat.com>
12385
12386 * common/common-defs.h: Include "common/poison.h".
12387 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12388 and adjust.
12389 * common/poison.h: New file.
12390 * common/traits.h: Include <type_traits>.
12391 (Not, Or, Requires): New, moved from common/function-view.h.
12392
16c4d54a
PA
123932017-04-25 Pedro Alves <palves@redhat.com>
12394
12395 * breakpoint.h (struct breakpoint): In-class initialize all
12396 fields. Make boolean fields "bool".
12397 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12398 memset call and initializations no longer necessary.
12399
b5c36682
PA
124002017-04-25 Pedro Alves <palves@redhat.com>
12401
12402 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12403 reference.
12404 (pt_btrace_insn): New function.
12405 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12406
5625a286
PA
124072017-04-25 Pedro Alves <palves@redhat.com>
12408
12409 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12410 "base" field and inherit from "bp_location" instead. Add
12411 non-default ctor.
12412 (allocate_location_exception): Use new non-default ctor.
12413 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12414 (init_bp_location): Convert to ...
12415 (bp_location::bp_location): ... this new ctor, and remove memset
12416 call.
12417 (base_breakpoint_allocate_location): Use the new non-default ctor.
12418 * breakpoint.h (bp_location): Now a class. Declare default and
12419 non-default ctors. In-class initialize all members.
12420 (init_bp_location): Remove declaration.
12421
23bcc18f
PA
124222017-04-25 Pedro Alves <palves@redhat.com>
12423
12424 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12425 assignment operator.
12426
e1ba3053
YQ
124272017-04-24 Yao Qi <yao.qi@linaro.org>
12428
12429 * doublest.c (convert_doublest_to_floatformat): Call
12430 floatformat_totalsize_bytes.
12431
10f489e5
TT
124322017-04-22 Tom Tromey <tom@tromey.com>
12433
12434 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12435 ui_out_emit_list.
12436 * stack.c (print_frame): Use ui_out_emit_list.
12437 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12438 ui_out_emit_list.
12439 * mi/mi-main.c (print_one_inferior)
12440 (mi_cmd_data_list_register_names)
12441 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12442 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12443 ui_out_emit_list.
12444 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12445 (mi_output_solib_attribs): Use ui_out_emit_list,
12446 ui_out_emit_tuple.
12447 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12448 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12449 (mi_cmd_stack_list_args, list_args_or_locals): Use
12450 ui_out_emit_list.
12451 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12452 * breakpoint.c (print_solib_event, output_thread_groups): Use
12453 ui_out_emit_list.
12454
0092b74d
TT
124552017-04-22 Tom Tromey <tom@tromey.com>
12456
12457 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12458 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12459 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12460
a14a62dd
TT
124612017-04-22 Tom Tromey <tom@tromey.com>
12462
12463 * tracepoint.c (tvariables_info_1)
12464 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12465
46b9c129
TT
124662017-04-22 Tom Tromey <tom@tromey.com>
12467
12468 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12469 annotate_arg_emitter.
12470 * breakpoint.c (print_mention_watchpoint)
12471 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12472 * annotate.h (struct annotate_arg_emitter): New.
12473
2e783024
TT
124742017-04-22 Tom Tromey <tom@tromey.com>
12475
12476 * record-btrace.c (record_btrace_insn_history)
12477 (record_btrace_insn_history_range, record_btrace_call_history)
12478 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12479 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12480 ui_out_emit_tuple.
12481 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12482 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12483 * skip.c (skip_info): Use ui_out_emit_tuple.
12484 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12485 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12486 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12487 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12488 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12489 ui_out_emit_tuple.
12490 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12491 (output_register, mi_cmd_data_read_memory)
12492 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12493 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12494 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12495 Use ui_out_emit_tuple.
12496 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12497 ui_out_emit_tuple.
12498 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12499 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12500 * linux-thread-db.c (info_auto_load_libthread_db): Use
12501 ui_out_emit_tuple.
12502 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12503 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12504 * disasm.c (do_mixed_source_and_assembly_deprecated)
12505 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12506 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12507 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12508 * breakpoint.c (print_one_breakpoint_location)
12509 (print_one_breakpoint): Use ui_out_emit_tuple.
12510 * auto-load.c (print_script, info_auto_load_cmd): Use
12511 ui_out_emit_tuple.
12512 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12513
9be21bb4
SM
125142017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12515
12516 * thread.c (print_thread_info_1): Remove dead code.
12517
0d4c07af
JK
125182017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12519
12520 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12521 GDB_SELF_TEST.
12522 * arm-tdep.c (selftests::arm_record_test): Likewise.
12523
4daf993d
YQ
125242017-04-21 Yao Qi <yao.qi@linaro.org>
12525
12526 * regcache.c (regcache_restore): Remove argument 2. Replace
12527 argument 3 with regcache. Get register status from
12528 src->register_status and get register contents from
12529 register_buffer (src, regnum).
12530 (regcache_cpy): Update.
12531
a6c21d4a
PA
125322017-04-19 Pedro Alves <palves@redhat.com>
12533
12534 * gdbthread.h (thread): Add missing closing parenthesis in
12535 comment.
12536
3a3fd0fd
PA
125372017-04-19 Pedro Alves <palves@redhat.com>
12538
12539 * common/refcounted-object.h: New file.
12540 * gdbthread.h: Include "common/refcounted-object.h".
12541 (thread_info): Inherit from refcounted_object and add comments.
12542 (thread_info::incref, thread_info::decref)
12543 (thread_info::m_refcount): Delete.
12544 (thread_info::deletable): Use the refcounted_object::refcount()
12545 method.
12546 * inferior.c (current_inferior_): Add comment.
12547 (set_current_inferior): Increment/decrement refcounts.
12548 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12549 not-deletable instead of comparing with the current inferior.
12550 (initialize_inferiors): Increment the initial inferior's refcount.
12551 * inferior.h (struct inferior): Forward declare.
12552 Include "common/refcounted-object.h".
12553 (current_inferior, set_current_inferior): Move declaration to
12554 before struct inferior's definition, and fix comment.
12555 (inferior): Inherit from refcounted_object. Add comments.
12556 * thread.c (switch_to_thread_no_regs): Reference the thread's
12557 inferior pointer directly instead of doing a ptid lookup.
12558 (switch_to_no_thread): New function.
12559 (switch_to_thread(thread_info *)): New function, factored out
12560 from ...
12561 (switch_to_thread(ptid_t)): ... this.
12562 (restore_current_thread): Delete.
12563 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12564 fields, and add 'inf' field.
12565 (do_restore_current_thread_cleanup): Check whether old->inf is
12566 alive instead of looking up an inferior by ptid. Use
12567 switch_to_thread and switch_to_no_thread.
12568 (restore_current_thread_cleanup_dtor): Use old->inf directly
12569 instead of lookup up an inferior by id. Decref the inferior.
12570 Don't restore 'removable'.
12571 (make_cleanup_restore_current_thread): Same the inferior pointer
12572 in old, instead of the inferior number. Incref the inferior.
12573 Don't save/clear 'removable'.
12574
9bcb1f16
PA
125752017-04-19 Pedro Alves <palves@redhat.com>
12576
12577 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12578 unittests/scoped_restore-selftests.c.
12579 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12580 * common/scoped_restore.h (scoped_restore_base): Make "class".
12581 (scoped_restore_base::release): New public method.
12582 (scoped_restore_base::scoped_restore_base): New protected ctor.
12583 (scoped_restore_base::m_saved_var): New protected field.
12584 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12585 scoped_restore_base base class instead of m_saved_var directly.
12586 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12587 (scoped_restore_tmpl::scoped_restore_tmpl(const
12588 scoped_restore_tmpl<T>&)): Likewise.
12589 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12590 method.
12591 (scoped_restore_tmpl::saved_var): New method.
12592 (scoped_restore_tmpl::m_saved_var): Delete.
12593 * inferior.h (inferior::detaching): Now a bool.
12594 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12595 cleanup.
12596 * unittests/scoped_restore-selftests.c: New file.
12597
26fcd539
PA
125982017-04-19 Pedro Alves <palves@redhat.com>
12599
12600 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12601 Re-sort in alphabetic order.
12602
fdd243b0
PA
126032017-04-18 Pedro Alves <palves@redhat.com>
12604
12605 * xml-support.c (obstack_xml_printf): Delete.
12606 * xml-support.h (obstack_xml_printf): Delete.
12607
4895cde2
PA
126082017-04-18 Pedro Alves <palves@redhat.com>
12609
12610 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12611 vdebug, verror, body_text, start_element, end_element, name,
12612 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12613 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12614 is_xinclude>: Make private and add m_ prefix.
12615 (gdb_xml_parser::body_text): New method, based on ...
12616 (gdb_xml_body_text): ... this. Adjust.
12617 (gdb_xml_parser::vdebug): New method, based on ...
12618 (gdb_xml_debug): ... this. Adjust.
12619 (gdb_xml_parser::verror): New method, based on ...
12620 (gdb_xml_error): ... this. Adjust.
12621 (gdb_xml_parser::start_element): New method, based on ...
12622 (gdb_xml_start_element): ... this. Adjust.
12623 (gdb_xml_start_element_wrapper): Defer to
12624 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12625 (gdb_xml_parser::end_element): New method, based on ...
12626 (gdb_xml_end_element_wrapper): ... this. Adjust.
12627 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12628 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12629 (gdb_xml_parser::use_dtd): New method, based on ...
12630 (gdb_xml_use_dtd): ... this. Adjust.
12631 (gdb_xml_parser::parse): New method, based on ...
12632 (gdb_xml_parse): ... this. Adjust.
12633 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12634 (xinclude_start_include): Adjust to call the parser's name method.
12635 (xml_xinclude_default, xml_xinclude_start_doctype)
12636 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12637 method.
12638 (xml_process_xincludes): Adjust to call parser methods.
12639 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12640 declarations.
12641
bd8a901f
PA
126422017-04-18 Pedro Alves <palves@redhat.com>
12643
12644 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12645 gdb::optional<std::string>.
12646 * xml-support.c: Include <string>.
12647 (scope_level::scope_level(scope_level &&))
12648 (scope_level::~scope_level): Delete.
12649 (scope_level::body): Now a std::string.
12650 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12651 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12652 parameter.
12653 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12654 (xinclude_parsing_data::output): Now a std::string reference.
12655 (xinclude_start_include): Adjust.
12656 (xml_xinclude_default): Adjust.
12657 (xml_process_xincludes): Add 'output' parameter, and return bool.
12658 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12659 and return bool.
12660 * xml-tdesc.c: Include <unordered_map> and <string>.
12661 (tdesc_xml_cache): Delete.
12662 (tdesc_xml_cache_s): Delete.
12663 (xml_cache): Now an std::unordered_map.
12664 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12665 (target_fetch_description_xml): Change return type to
12666 gdb::optional<std::string>, and adjust.
12667 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12668 (target_fetch_description_xml): Change return type to
12669 gdb::optional<std::string>.
12670
d35d1958
PA
126712017-04-18 Pedro Alves <palves@redhat.com>
12672
12673 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12674 unittests/optional-selftests.c.
12675 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12676 * unittests/optional-selftests.c: New file.
12677 * unittests/optional/assignment/1.cc: New file.
12678 * unittests/optional/assignment/2.cc: New file.
12679 * unittests/optional/assignment/3.cc: New file.
12680 * unittests/optional/assignment/4.cc: New file.
12681 * unittests/optional/assignment/5.cc: New file.
12682 * unittests/optional/assignment/6.cc: New file.
12683 * unittests/optional/assignment/7.cc: New file.
12684 * unittests/optional/cons/copy.cc: New file.
12685 * unittests/optional/cons/default.cc: New file.
12686 * unittests/optional/cons/move.cc: New file.
12687 * unittests/optional/cons/value.cc: New file.
12688 * unittests/optional/in_place.cc: New file.
12689 * unittests/optional/observers/1.cc: New file.
12690 * unittests/optional/observers/2.cc: New file.
12691
22796e97
PA
126922017-04-18 Pedro Alves <palves@redhat.com>
12693
12694 * common/gdb_optional.h: Include common/traits.h.
12695 (in_place_t): New type.
12696 (in_place): New constexpr variable.
12697 (optional::optional): Remove member initialization of
12698 m_instantiated.
12699 (optional::optional(in_place_t...)): New constructor.
12700 (optional::~optional): Use reset.
12701 (optional::optional(const optional&)): New.
12702 (optional::optional(const optional&&)): New.
12703 (optional::optional(T &)): New.
12704 (optional::optional(T &&)): New.
12705 (operator::operator=(const optional &)): New.
12706 (operator::operator=(optional &&)): New.
12707 (operator::operator= (const T &))
12708 (operator::operator= (T &&))
12709 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12710 (operator::reset): New.
12711 (operator::m_instantiated):: Add in-class initializer.
12712 * common/traits.h: Include <type_traits>.
12713 (struct And): New types.
12714
a7fc9b61
PA
127152017-04-18 Pedro Alves <palves@redhat.com>
12716
12717 * xml-support.c: Include <vector>.
12718 (scope_level::scope_level(const gdb_xml_element *))
12719 (scope_level::scope_level(scope_level&&)): New.
12720 (scope_level::~scope_level): New.
12721 (scope_level_s): Delete.
12722 (gdb_xml_parser::scopes): Now a std::vector.
12723 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12724 Use std::vector.
12725 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12726 scope cleanup code.
12727 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12728 of the scopes member. Use std::vector::emplace_back.
12729
010151c9
PA
127302017-04-18 Pedro Alves <palves@redhat.com>
12731
12732 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12733 a bool.
12734 (gdb_xml_end_element): Change type of first parameter.
12735 (gdb_xml_cleanup): Rename to ...
12736 (gdb_xml_parser::~gdb_xml_parser): ... this.
12737 (gdb_xml_create_parser_and_cleanup): Delete with ...
12738 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12739 to this new ctor.
12740 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12741 using gdb_xml_create_parser_and_cleanup.
12742 (xinclude_parsing_data): Add ctor/dtor.
12743 (xml_xinclude_cleanup): Delete.
12744 (xml_process_xincludes): Create a local xinclude_parsing_data
12745 instead of heap-allocating one. Create a local gdb_xml_parser
12746 instead of heap-allocating one with
12747 gdb_xml_create_parser_and_cleanup.
12748
d56060f0
JB
127492017-04-18 John Baldwin <jhb@FreeBSD.org>
12750
12751 PR threads/20743
12752 * fbsd-nat.c (resume_one_thread_cb): Remove.
12753 (resume_all_threads_cb): Remove.
12754 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12755 iterate_over_threads.
12756
305d16a9
JB
127572017-04-17 Joel Brobecker <brobecker@adacore.com>
12758
12759 * NEWS: Create a new section for the next release branch.
12760 Rename the section of the current branch, now that it has
12761 been cut.
12762
8bb57231
JB
127632017-04-17 Joel Brobecker <brobecker@adacore.com>
12764
12765 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12766 * version.in: Bump version to 8.0.50.DATE-git.
12767
096c92dd
SDJ
127682017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12769
12770 PR gdb/21385
12771 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12772 independently of the host, and fix build breakage on Cygwin.
12773
0550c955
PA
127742017-04-13 Pedro Alves <palves@redhat.com>
12775
12776 * inferior.c (free_inferior): Convert to ...
12777 (inferior::~inferior): ... this dtor.
12778 (inferior::inferior): New ctor, factored out from ...
12779 (add_inferior_silent): ... here. Allocate the inferior with a new
12780 expression.
12781 (delete_inferior): Call delete instead of free_inferior.
12782 * inferior.h (gdb_environ, continuation): Forward declare.
12783 (inferior): Now a class. Add in-class initialization to all
12784 members. Make boolean fields bool, except 'detaching'.
12785 (inferior::inferior): New explicit ctor.
12786 (inferior::~inferior): New.
12787
e3d60dfc
PA
127882017-04-13 Pedro Alves <palves@redhat.com>
12789
12790 * inferior.c (init_inferior_list): Delete.
12791 * inferior.h (init_inferior_list): Delete.
12792
5fd69d0a
PA
127932017-04-13 Pedro Alves <palves@redhat.com>
12794
12795 PR threads/13217
12796 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12797 (top level): Call it twice, with different thread sets.
12798
c6609450
PA
127992017-04-13 Pedro Alves <palves@redhat.com>
12800
12801 * thread.c: Include <algorithm>.
12802 (thread_array_cleanup): Delete.
12803 (scoped_inc_dec_ref): New class.
12804 (live_threads_count): New function.
12805 (set_thread_refcount): Delete.
12806 (tp_array_compar_ascending): Now a bool.
12807 (tp_array_compar): Convert to a std::sort comparison function.
12808 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12809 and live_threads_count.
12810
2a00d7ce
PA
128112017-04-13 Pedro Alves <palves@redhat.com>
12812
12813 * infrun.c (follow_fork_inferior): Also switch the current
12814 inferior.
12815
441d7c93
PA
128162017-04-13 Pedro Alves <palves@redhat.com>
12817
12818 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12819 before calling create_internal_breakpoint.
12820
808480f6
PA
128212017-04-13 Pedro Alves <palves@redhat.com>
12822
12823 * fork-child.c (execv_argv): New class.
12824 (breakup_args): Refactored as ...
12825 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12826 Copy arguments to storage and replace separators with NULL
12827 terminators in place.
12828 (escape_bang_in_quoted_argument): Adjust to return bool.
12829 (execv_argv::execv_argv): New ctor.
12830 (execv_argv::init_for_shell): New method, factored out from
12831 fork_inferior. Don't strdup strings into the vector.
12832 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12833 Remove free_vector_argv call.
12834
ad3d022a
YQ
128352017-04-13 Yao Qi <yao.qi@linaro.org>
12836
12837 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12838 tdep->rx_psw_type.
12839
e6ddc3bf
YQ
128402017-04-13 Yao Qi <yao.qi@linaro.org>
12841
12842 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12843 * rx-tdep.c (rx_gdbarch_init): Likewise.
12844
bfb8cf90
PA
128452017-04-13 Pedro Alves <palves@redhat.com>
12846
12847 * breakpoint.h (struct breakpoint): Reindent.
12848
f5336ca5
PA
128492017-04-13 Pedro Alves <palves@redhat.com>
12850
12851 * breakpoint.c (bp_location): Rename to ...
12852 (bp_locations): ... this. All references updated.
12853 (bp_location_count): Rename to ...
12854 (bp_locations_count): ... this. All references updated.
12855 (bp_location_placed_address_before_address_max): Rename to ...
12856 (bp_locations_placed_address_before_address_max): ... this. All
12857 references updated.
12858 (bp_location_shadow_len_after_address_max): Rename to ...
12859 (bp_locations_shadow_len_after_address_max): ... this. All
12860 references updated.
12861 (bp_location_compare_addrs): Rename to ...
12862 (bp_locations_compare_addrs): ... this. All references updated.
12863 (bp_location_compare):Rename to ...
12864 (bp_locations_compare): ... this. All references updated.
12865 (bp_location_target_extensions_update): Rename to ...
12866 (bp_locations_target_extensions_update): ... this. All references
12867 updated.
12868
be628ab8
SDJ
128692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12870
12871 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12872 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12873 'sgtty.h'.
12874 * common/gdb_termios.h: New file, with parts of "terminal.h".
12875 * inflow.c: Include "gdb_termios.h".
12876 * ser-unix.c: Include "gdb_termios.h".
12877 * terminal.h: Move terminal-related defines to
12878 "common/gdb_termios.h".
12879
8e9e35b1
TT
128802017-04-12 Tom Tromey <tom@tromey.com>
12881
12882 * probe.c (parse_probes): Update.
12883 * location.h (delete_event_location): Don't declare.
12884 (event_location_deleter::operator()): Update.
12885 * location.c (event_location_deleter::operator()): Rename from
12886 delete_event_location.
12887 * linespec.h (linespec_result) <location>: Change type to
12888 event_location_up.
12889 * linespec.c (canonicalize_linespec, event_location_to_sals)
12890 (decode_objc): Update.
12891 (linespec_result): Don't call delete_event_location.
12892 * breakpoint.c (create_breakpoints_sal)
12893 (bkpt_probe_create_sals_from_location)
12894 (strace_marker_create_sals_from_location): Update.
12895
16e802b9
TT
128962017-04-12 Tom Tromey <tom@tromey.com>
12897
12898 * linespec.h (struct linespec_result): Add constructor and
12899 destructor.
12900 (init_linespec_result, destroy_linespec_result)
12901 (make_cleanup_destroy_linespec_result): Don't declare.
12902 * linespec.c (init_linespec_result): Remove.
12903 (linespec_result::~linespec_result): Rename from
12904 destroy_linespec_result. Update.
12905 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12906 Remove.
12907 * breakpoint.c (create_breakpoint, break_range_command)
12908 (decode_location_default): Update.
12909 * ax-gdb.c (agent_command_1): Update.
12910
d28cd78a
TT
129112017-04-12 Tom Tromey <tom@tromey.com>
12912
12913 * remote.c (remote_download_tracepoint): Update.
12914 * python/py-breakpoint.c (bppy_get_location): Update.
12915 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12916 (gdbscm_breakpoint_location): Update.
12917 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12918 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12919 Change type to event_location_up.
12920 * breakpoint.c (create_overlay_event_breakpoint)
12921 (create_longjmp_master_breakpoint)
12922 (create_std_terminate_master_breakpoint)
12923 (create_exception_master_breakpoint)
12924 (breakpoint_event_location_empty_p, print_breakpoint_location)
12925 (print_one_breakpoint_location, create_thread_event_breakpoint)
12926 (init_breakpoint_sal, create_breakpoint)
12927 (print_recreate_ranged_breakpoint, break_range_command)
12928 (init_ada_exception_breakpoint, say_where): Update.
12929 (base_breakpoint_dtor): Don't call delete_event_location.
12930 (bkpt_print_recreate, tracepoint_print_recreate)
12931 (dprintf_print_recreate, update_static_tracepoint)
12932 (breakpoint_re_set_default): Update.
12933
711799d5
TT
129342017-04-12 Tom Tromey <tom@tromey.com>
12935
12936 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12937 type of "to_do". Update.
12938 (compute_stack_depth): Use std::vector.
12939
52d214d3
TT
129402017-04-12 Tom Tromey <tom@tromey.com>
12941
12942 * printcmd.c (find_instruction_backward): Use std::vector.
12943
4c404b8b
TT
129442017-04-12 Tom Tromey <tom@tromey.com>
12945
12946 * symfile.c (objfilep): Remove typedef.
12947 (reread_symbols): Use a std::vector.
12948
156d9eab
TT
129492017-04-12 Tom Tromey <tom@tromey.com>
12950
12951 * mi/mi-main.c (exec_direction_forward): Remove.
12952 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12953 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12954 scoped_restore.
12955 * guile/guile.c (guile_repl_command, guile_command)
12956 (gdbscm_execute_gdb_command): Use scoped_restore.
12957 * go-exp.y (go_parse): Use scoped_restore.
12958 * d-exp.y (d_parse): Use scoped_restore.
12959 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12960 * c-exp.y (c_parse): Use scoped_restore.
12961
4d89769a
TT
129622017-04-12 Tom Tromey <tom@tromey.com>
12963
12964 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12965 (mi_parse): Update return type.
12966 (mi_parse_free): Remove.
12967 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12968 (mi_parse::~mi_parse): Rename from mi_parse_free.
12969 (mi_parse_cleanup): Remove.
12970 (mi_parse): Return a unique_ptr. Use new.
12971 * mi/mi-main.c (mi_execute_command): Update.
12972
4b217cc7
TT
129732017-04-12 Tom Tromey <tom@tromey.com>
12974
12975 * location.c (explicit_location_lex_one): Return a
12976 unique_xmalloc_ptr.
12977 (string_to_explicit_location): Update. Remove cleanups.
12978
59d3651b
TT
129792017-04-12 Tom Tromey <tom@tromey.com>
12980
12981 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12982 (compare_value_and_voffset): Change type. Update.
12983 (compute_vtable_size): Change type of "offset_vec".
12984 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12985 (gnuv3_get_typeid): Remove extraneous declaration.
12986
b24b0d6c
TT
129872017-04-12 Tom Tromey <tom@tromey.com>
12988
12989 * charset.h (wchar_iterator): Fix comment.
12990
80a3b8c5
TT
129912017-04-12 Tom Tromey <tom@tromey.com>
12992
12993 * charset.c (iconv_wrapper): New class.
12994 (cleanup_iconv): Remove.
12995 (convert_between_encodings): Use it.
12996
c83dd867
TT
129972017-04-12 Tom Tromey <tom@tromey.com>
12998
12999 * symfile.h (increment_reading_symtab): Update type.
13000 * symfile.c (decrement_reading_symtab): Remove.
13001 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13002 * psymtab.c (psymtab_to_symtab): Update.
13003 * dwarf2read.c (dw2_instantiate_symtab): Update.
13004
0e8621a0
TT
130052017-04-12 Tom Tromey <tom@tromey.com>
13006
13007 * jit.c (struct jit_reader): Declare separately. Add constructor
13008 and destructor. Change type of "handle".
13009 (loaded_jit_reader): Define separately.
13010 (jit_reader_load): Update. New "new".
13011 (jit_reader_unload_command): Use "delete".
13012 * gdb-dlfcn.h (struct dlclose_deleter): New.
13013 (gdb_dlhandle_up): New typedef.
13014 (gdb_dlopen, gdb_dlsym): Update types.
13015 (gdb_dlclose): Remove.
13016 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13017 (gdb_dlsym): Change type of "handle".
13018 (make_cleanup_dlclose): Remove.
13019 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13020 * compile/compile-c-support.c (load_libcc): Update.
13021
67d89901
TT
130222017-04-12 Tom Tromey <tom@tromey.com>
13023
13024 * symtab.h (find_pcs_for_symtab_line): Change return type.
13025 * symtab.c (find_pcs_for_symtab_line): Change return type.
13026 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13027 type of "vec". Update.
13028 (ltpy_get_pcs_for_line): Update.
13029 * linespec.c (decode_digits_ordinary): Update.
13030
93921405
TT
130312017-04-12 Tom Tromey <tom@tromey.com>
13032
13033 * tracepoint.c (actions_command): Update.
13034 * python/python.c (python_command, python_interactive_command):
13035 Update.
13036 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13037 * guile/guile.c (guile_command): Update.
13038 * defs.h (read_command_lines, read_command_lines_1): Return
13039 command_line_up.
13040 (command_lines_deleter): New struct.
13041 (command_line_up): New typedef.
13042 * compile/compile.c (compile_code_command)
13043 (compile_print_command): Update.
13044 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13045 command_line_up.
13046 (make_cleanup_free_command_lines): Remove.
13047 * cli/cli-script.c (get_command_line, read_command_lines_1)
13048 (copy_command_lines): Return command_line_up.
13049 (while_command, if_command, read_command_lines, define_command)
13050 (document_command): Update.
13051 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13052 Remove.
13053 * breakpoint.h (breakpoint_set_commands): Change type of
13054 "commands".
13055 * breakpoint.c (breakpoint_set_commands): Change type of
13056 "commands". Update.
13057 (do_map_commands_command, update_dprintf_command_list)
13058 (create_tracepoint_from_upload): Update.
13059
ffc2605c
TT
130602017-04-12 Tom Tromey <tom@tromey.com>
13061
13062 * tracepoint.c (scope_info): Update.
13063 * spu-tdep.c (spu_catch_start): Update.
13064 * python/python.c (gdbpy_decode_line): Update.
13065 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13066 * python/py-breakpoint.c (bppy_init): Update.
13067 * probe.c (parse_probes): Update.
13068 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13069 * location.h (event_location_deleter): New struct.
13070 (event_location_up): New typedef.
13071 (new_linespec_location, new_address_location, new_probe_location)
13072 (new_explicit_location, copy_event_location)
13073 (string_to_event_location, string_to_event_location_basic)
13074 (string_to_explicit_location): Update return type.
13075 (make_cleanup_delete_event_location): Remove.
13076 * location.c (new_linespec_location, new_address_location)
13077 (new_probe_location, new_explicit_location, copy_event_location):
13078 Return event_location_up.
13079 (delete_event_location_cleanup)
13080 (make_cleanup_delete_event_location): Remove.
13081 (string_to_explicit_location, string_to_event_location_basic)
13082 (string_to_event_location): Return event_location_up.
13083 * linespec.c (canonicalize_linespec, event_location_to_sals)
13084 (decode_line_with_current_source)
13085 (decode_line_with_last_displayed, decode_objc): Update.
13086 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13087 * completer.c (location_completer): Update.
13088 * cli/cli-cmds.c (edit_command, list_command): Update.
13089 * breakpoint.c (create_overlay_event_breakpoint)
13090 (create_longjmp_master_breakpoint)
13091 (create_std_terminate_master_breakpoint)
13092 (create_exception_master_breakpoint)
13093 (create_thread_event_breakpoint): Update.
13094 (init_breakpoint_sal): Update. Remove some dead code.
13095 (create_breakpoint_sal): Change type of "location". Update.
13096 (create_breakpoints_sal, create_breakpoint, break_command_1)
13097 (dprintf_command, break_range_command, until_break_command)
13098 (init_ada_exception_breakpoint)
13099 (strace_marker_create_sals_from_location)
13100 (update_static_tracepoint, trace_command, ftrace_command)
13101 (strace_command, create_tracepoint_from_upload): Update.
13102 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13103 * ax-gdb.c (agent_command_1): Update.
13104
8f10c932
PA
131052017-04-12 Pedro Alves <palves@redhat.com>
13106
13107 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13108 * configure.tgt: Handle i[34567]86-*-go32* and
13109 i[34567]86-*-msdosdjgpp*.
13110 * i386-tdep.c (i386_svr4_reg_to_regnum):
13111 Make extern.
13112 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13113 i386-go32-tdep.c.
13114 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13115 * i386-go32-tdep.c: New file.
13116 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13117 declarations.
13118
0a31ccfb
SM
131192017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13120
13121 * aix-thread.c (pd_status2str): Change return type to const char *.
13122
e9bb3fbb
PA
131232017-04-12 Pedro Alves <palves@redhat.com>
13124
13125 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13126 calls to set_gdbarch_gnu_triplet_regexp.
13127
53375380
PA
131282017-04-12 Pedro Alves <palves@redhat.com>
13129
13130 PR gdb/21323
13131 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13132 New enum value.
13133 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13134 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13135 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13136 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13137 * gdbarch.h, gdbarch.c: Regenerate.
13138 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13139 gdbarch_wchar_bit and gdbarch_wchar_signed.
13140 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13141 * arm-tdep.c (arm_gdbarch_init): Likewise.
13142 * avr-tdep.c (avr_gdbarch_init): Likewise.
13143 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13144 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13145 * i386-tdep.c (i386_go32_init_abi): Likewise.
13146 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13147 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13148 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13149 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13150 * sh-tdep.c (sh_gdbarch_init): Likewise.
13151 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13152 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13153 * windows-tdep.c (windows_init_abi): Likewise.
13154 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13155
53e710ac
PA
131562017-04-12 Pedro Alves <palves@redhat.com>
13157
13158 PR c++/21323
13159 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13160 cplus_primitive_type_char32_t>: New enum values.
13161 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13162 and cplus_primitive_type_char32_t.
13163 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13164 32, use the archtecture's built-in type for char16_t and char32_t,
13165 respectively. Otherwise, fallback to init_integer_type as before,
13166 but make the type unsigned, and issue a complaint.
13167 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13168
ab0538b8
AH
131692017-04-12 Alan Hayward <alan.hayward@arm.com>
13170
5e0e0422 13171 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13172 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13173
5430098f
SDJ
131742017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13175
13176 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13177 'const char *'.
13178
7c5ded6a
SDJ
131792017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13180
13181 * common/common-utils.c (free_vector_argv): New function.
13182 * common/common-utils.h: Include <vector>.
13183 (free_vector_argv): New prototype.
13184 * darwin-nat.c (darwin_create_inferior): Rewrite function
13185 prototype in order to constify "exec_file" and accept a
13186 "std::string" for "allargs".
13187 * fork-child.c: Include <vector>.
13188 (breakup_args): Rewrite function, using C++.
13189 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13190 and accept "std::string" for "allargs". Update the code to
13191 calculate "argv" based on "allargs". Update calls to "exec_fun"
13192 and "execvp".
13193 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13194 order to constify "exec_file" and accept a "std::string" for
13195 "allargs".
13196 * go32-nat.c (go32_create_inferior): Likewise.
13197 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13198 * infcmd.c (run_command_1): Constify "exec_file". Use
13199 "std::string" for inferior arguments.
13200 * inferior.h (fork_inferior): Update prototype.
13201 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13202 prototype in order to constify "exec_file" and accept a
13203 "std::string" for "allargs".
13204 * nto-procfs.c (procfs_create_inferior): Likewise.
13205 * procfs.c (procfs_create_inferior): Likewise.
13206 * remote-sim.c (gdbsim_create_inferior): Likewise.
13207 * remote.c (extended_remote_run): Update code to accept
13208 "std::string" as argument.
13209 (extended_remote_create_inferior): Rewrite function prototype in
13210 order to constify "exec_file" and accept a "std::string" for
13211 "allargs".
13212 * rs6000-nat.c (super_create_inferior): Likewise.
13213 (rs6000_create_inferior): Likewise.
13214 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13215 * windows-nat.c (windows_create_inferior): Likewise.
13216
ae0eee42
PA
132172017-04-11 Pedro Alves <palves@redhat.com>
13218
13219 * thread.c: Fix whitespace throughout.
13220
a6acac06
PR
132212017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13222
13223 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13224
64403bd1
AH
132252017-04-11 Alan Hayward <alan.hayward@arm.com>
13226
13227 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13228
a5bef50f
SDJ
132292017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13230
13231 PR gdb/21364
13232 * osdata.c (info_osdata): Check if 'type' is an empty string
13233 instead of NULL.
13234
9295a5a9
PA
132352017-04-10 Pedro Alves <palves@redhat.com>
13236
13237 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13238 (ptid_to_global_thread_id, in_thread_list)
13239 (do_captured_list_thread_ids, set_resumed, set_running)
13240 (set_executing, set_stop_requested, finish_thread_state)
13241 (validate_registers_access, can_access_registers_ptid)
13242 (print_thread_info_1, switch_to_thread)
13243 (do_restore_current_thread_cleanup)
13244 (make_cleanup_restore_current_thread, thread_command)
13245 (thread_name_command): Use operator== instead of ptid_equal.
13246
996812e3
PA
132472017-04-10 Pedro Alves <palves@redhat.com>
13248
13249 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13250 (current_thread_cleanup_chain): Delete.
13251 (restore_current_thread_cleanup_dtor)
13252 (make_cleanup_restore_current_thread): Remove references to
13253 current_thread_cleanup_chain.
13254
845b344f
AH
132552017-04-10 Alan Hayward <alan.hayward@arm.com>
13256
13257 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13258 REG_UNKNOWN.
13259
803bdfe4
YQ
132602017-04-10 Yao Qi <yao.qi@linaro.org>
13261
13262 PR gdb/19942
13263 * gdbthread.h (thread_info::deletable): New method.
13264 (thread_info::incref): New method.
13265 (thread_info::decref): New method.
13266 (thread_info::refcount): Move it to private.
13267 * infrun.c (save_stop_context): Call inc_refcount.
13268 (release_stop_context_cleanup): Likewise.
13269 * thread.c (set_thread_exited): New function.
13270 (init_thread_list): Delete "tp" only it is deletable, otherwise
13271 call set_thread_exited.
13272 (delete_thread_1): Call set_thread_exited.
13273 (current_thread_cleanup) <inferior_pid>: Remove.
13274 <thread>: New field.
13275 (restore_current_thread_ptid_changed): Removed.
13276 (do_restore_current_thread_cleanup): Adjust.
13277 (restore_current_thread_cleanup_dtor): Don't call
13278 find_thread_ptid.
13279 (set_thread_refcount): Use dec_refcount.
13280 (make_cleanup_restore_current_thread): Adjust.
13281 (thread_apply_all_command): Call inc_refcount.
13282 (_initialize_thread): Don't call
13283 observer_attach_thread_ptid_changed.
13284
8c25b497
YQ
132852017-04-10 Yao Qi <yao.qi@linaro.org>
13286
13287 * thread.c (delete_thread_1): Hoist code on marking thread as
13288 exited.
13289
8473b447
SM
132902017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13291
13292 * windows-nat.c (windows_detach): Initialize ptid with
13293 minus_one_ptid.
13294
6670ec13
SM
132952017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13296
13297 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13298
ba2f91bb
AH
132992017-04-07 Alan Hayward <alan.hayward@arm.com>
13300
13301 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13302 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13303 (bfin_pseudo_register_write): Likewise
13304
436252de
SM
133052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13306
13307 * common/ptid.h (struct ptid): Change to...
13308 (class ptid_t): ... this.
13309 <ptid_t>: New constructors.
13310 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13311 matches>: New methods.
13312 <make_null, make_minus_one>: New static methods.
13313 <pid>: Rename to...
13314 <m_pid>: ...this.
13315 <lwp>: Rename to...
13316 <m_lwp>: ...this.
13317 <tid>: Rename to...
13318 <m_tid>: ...this.
13319 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13320 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13321 as references, move comment to class ptid_t.
13322 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13323 ptid_t static methods.
13324 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13325 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13326 Take ptid arguments as references, implement using ptid_t methods.
13327 * unittests/ptid-selftests.c: New file.
13328 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13329 unittests/ptid-selftests.c.
13330 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13331
0dedf377
TP
133322017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13333
13334 * python/python.c (python_run_simple_file): Cast mode literal to
13335 non-const char pointer as expected by PyFile_FromString.
13336
4e9868d4
SM
133372017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13338
13339 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13340 minus_one_ptid and null_ptid.
13341
9bf2a700
PA
133422017-04-05 Pedro Alves <palves@redhat.com>
13343
13344 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13345 * configure: Regenerate.
13346
a121b7c1
PA
133472017-04-05 Pedro Alves <palves@redhat.com>
13348
13349 * ada-exp.y (yyerror): Constify.
13350 * ada-lang.c (bound_name, get_selections)
13351 (ada_variant_discrim_type)
13352 (ada_variant_discrim_name, ada_value_struct_elt)
13353 (ada_lookup_struct_elt_type, is_unchecked_variant)
13354 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13355 (catch_ada_exception_command_split)
13356 (catch_ada_assert_command_split, catch_assert_command)
13357 (ada_op_name): Constify.
13358 * ada-lang.h (ada_yyerror, get_selections)
13359 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13360 * arc-tdep.c (arc_print_frame_cache): Constify.
13361 * arm-tdep.c (arm_skip_stub): Constify.
13362 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13363 (gen_aggregate_elt_ref): Constify.
13364 * bcache.c (print_bcache_statistics): Constify.
13365 * bcache.h (print_bcache_statistics): Constify.
13366 * break-catch-throw.c (catch_exception_command_1):
13367 * breakpoint.c (struct ep_type_description::description):
13368 Constify.
13369 (add_solib_catchpoint): Constify.
13370 (catch_fork_command_1): Add cast.
13371 (add_catch_command): Constify.
13372 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13373 Constify.
13374 * bsd-uthread.c (bsd_uthread_state): Constify.
13375 * buildsym.c (patch_subfile_names): Constify.
13376 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13377 Constify.
13378 * c-exp.y (yyerror): Constify.
13379 (token::oper): Constify.
13380 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13381 * c-varobj.c (cplus_describe_child): Constify.
13382 * charset.c (find_charset_names): Add cast.
13383 (find_charset_names): Constify array and add const_cast.
13384 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13385 (edit_command): Constify.
13386 * cli/cli-decode.c (lookup_cmd): Constify.
13387 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13388 Constify.
13389 (struct dump_context): Constify.
13390 (add_dump_command, restore_command): Constify.
13391 * cli/cli-script.c (get_command_line): Constify.
13392 * cli/cli-script.h (get_command_line): Constify.
13393 * cli/cli-utils.c (check_for_argument): Constify.
13394 * cli/cli-utils.h (check_for_argument): Constify.
13395 * coff-pe-read.c (struct read_pe_section_data): Constify.
13396 * command.h (lookup_cmd): Constify.
13397 * common/print-utils.c (decimal2str): Constify.
13398 * completer.c (gdb_print_filename): Constify.
13399 * corefile.c (set_gnutarget): Constify.
13400 * cp-name-parser.y (yyerror): Constify.
13401 * cp-valprint.c (cp_print_class_member): Constify.
13402 * cris-tdep.c (cris_register_name, crisv32_register_name):
13403 Constify.
13404 * d-exp.y (yyerror): Constify.
13405 (struct token::oper): Constify.
13406 * d-lang.h (d_yyerror): Constify.
13407 * dbxread.c (struct header_file_location::name): Constify.
13408 (add_old_header_file, add_new_header_file, last_function_name)
13409 (dbx_next_symbol_text, add_bincl_to_list)
13410 (find_corresponding_bincl_psymtab, set_namestring)
13411 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13412 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13413 * defs.h (command_line_input, print_address_symbolic)
13414 (deprecated_readline_begin_hook): Constify.
13415 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13416 Constify.
13417 * event-top.c (handle_line_of_input): Constify and add cast.
13418 * exceptions.c (catch_errors): Constify.
13419 * exceptions.h (catch_errors): Constify.
13420 * expprint.c (print_subexp_standard, op_string, op_name)
13421 (op_name_standard, dump_raw_expression, dump_raw_expression):
13422 * expression.h (op_name, op_string, dump_raw_expression):
13423 Constify.
13424 * f-exp.y (yyerror): Constify.
13425 (struct token::oper): Constify.
13426 (struct f77_boolean_val::name): Constify.
13427 * f-lang.c (f_word_break_characters): Constify.
13428 * f-lang.h (f_yyerror): Constify.
13429 * fork-child.c (fork_inferior): Add cast.
13430 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13431 (new_variant): Constify.
13432 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13433 * gdbarch.c: Regenerate.
13434 * gdbcore.h (set_gnutarget): Constify.
13435 * go-exp.y (yyerror): Constify.
13436 (token::oper): Constify.
13437 * go-lang.h (go_yyerror): Constify.
13438 * go32-nat.c (go32_sysinfo): Constify.
13439 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13440 * guile/scm-cmd.c (cmdscm_function): Constify.
13441 * guile/scm-param.c (pascm_param_value): Constify.
13442 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13443 (h8300sx_register_name): Constify.
13444 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13445 Constify.
13446 * ia64-tdep.c (ia64_register_names): Constify.
13447 * infcmd.c (construct_inferior_arguments): Constify.
13448 (path_command, attach_post_wait): Constify.
13449 * language.c (show_range_command, show_case_command)
13450 (unk_lang_error): Constify.
13451 * language.h (language_defn::la_error)
13452 (language_defn::la_name_of_this): Constify.
13453 * linespec.c (decode_line_2): Constify.
13454 * linux-thread-db.c (thread_db_err_str): Constify.
13455 * lm32-tdep.c (lm32_register_name): Constify.
13456 * m2-exp.y (yyerror): Constify.
13457 * m2-lang.h (m2_yyerror): Constify.
13458 * m32r-tdep.c (m32r_register_names): Constify and make static.
13459 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13460 * m88k-tdep.c (m88k_register_name): Constify.
13461 * macroexp.c (appendmem): Constify.
13462 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13463 (upgrade_type, parse_external, parse_partial_symbols)
13464 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13465 (new_symbol): Constify.
13466 * memattr.c (mem_info_command): Constify.
13467 * mep-tdep.c (register_name_from_keyword): Constify.
13468 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13469 Constify.
13470 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13471 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13472 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13473 cast.
13474 (mi_execute_async_cli_command): Constify.
13475 * mips-tdep.c (mips_register_name): Constify.
13476 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13477 (am33_register_name, am33_2_register_name)
13478 * moxie-tdep.c (moxie_register_names): Constify.
13479 * nat/linux-osdata.c (osdata_type): Constify fields.
13480 * nto-tdep.c (nto_parse_redirection): Constify.
13481 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13482 (lookup_child_selector): Constify.
13483 (objc_methcall::name): Constify.
13484 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13485 (lookup_struct_typedef): Constify.
13486 * objfiles.c (pc_in_section): Constify.
13487 * objfiles.h (pc_in_section): Constify.
13488 * p-exp.y (struct token::oper): Constify.
13489 (yyerror): Constify.
13490 * p-lang.h (pascal_yyerror): Constify.
13491 * parser-defs.h (op_name_standard): Constify.
13492 (op_print::string): Constify.
13493 (exp_descriptor::op_name): Constify.
13494 * printcmd.c (print_address_symbolic): Constify.
13495 * psymtab.c (print_partial_symbols): Constify.
13496 * python/py-breakpoint.c (stop_func): Constify.
13497 (bppy_get_expression): Constify.
13498 * python/py-cmd.c (cmdpy_completer::name): Constify.
13499 (cmdpy_function): Constify.
13500 * python/py-event.c (evpy_add_attribute)
13501 (gdbpy_initialize_event_generic): Constify.
13502 * python/py-event.h (evpy_add_attribute)
13503 (gdbpy_initialize_event_generic): Constify.
13504 * python/py-evts.c (add_new_registry): Constify.
13505 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13506 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13507 * python/py-inferior.c (get_buffer): Add cast.
13508 * python/py-param.c (parm_constant::name): Constify.
13509 * python/py-unwind.c (fprint_frame_id): Constify.
13510 * python/python.c (gdbpy_parameter_value): Constify.
13511 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13512 * remote.c (memory_packet_config::name): Constify.
13513 (show_packet_config_cmd, remote_write_bytes)
13514 (remote_buffer_add_string):
13515 * reverse.c (exec_reverse_once): Constify.
13516 * rs6000-tdep.c (variant::name, variant::description): Constify.
13517 * rust-exp.y (rustyyerror): Constify.
13518 * rust-lang.c (rust_op_name): Constify.
13519 * rust-lang.h (rustyyerror): Constify.
13520 * serial.h (serial_ops::name): Constify.
13521 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13522 (sh_sh3e_register_name, sh_sh2e_register_name)
13523 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13524 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13525 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13526 (sh_sh4al_dsp_register_name): Constify.
13527 * sh64-tdep.c (sh64_register_name): Constify.
13528 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13529 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13530 * stabsread.c (patch_block_stabs, read_type_number)
13531 (ref_map::stabs, ref_add, process_reference)
13532 (symbol_reference_defined, define_symbol, define_symbol)
13533 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13534 (read_one_struct_field, read_struct_fields, read_baseclasses)
13535 (read_tilde_fields, read_struct_type, read_array_type)
13536 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13537 (read_huge_number, read_range_type, read_args, common_block_start)
13538 (find_name_end): Constify.
13539 * stabsread.h (common_block_start, define_symbol)
13540 (process_one_symbol, symbol_reference_defined, ref_add):
13541 * symfile.c (get_section_index, add_symbol_file_command):
13542 * symfile.h (get_section_index): Constify.
13543 * target-descriptions.c (tdesc_type::name): Constify.
13544 (tdesc_free_type): Add cast.
13545 * target.c (find_default_run_target):
13546 (add_deprecated_target_alias, find_default_run_target)
13547 (target_announce_detach): Constify.
13548 (do_option): Constify.
13549 * target.h (add_deprecated_target_alias): Constify.
13550 * thread.c (print_thread_info_1): Constify.
13551 * top.c (deprecated_readline_begin_hook, command_line_input):
13552 Constify.
13553 (init_main): Add casts.
13554 * top.h (handle_line_of_input): Constify.
13555 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13556 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13557 (tfind_command): Rename to ...
13558 (tfind_command_1): ... this and constify.
13559 (tfind_command): New function.
13560 (tfind_end_command, tfind_start_command): Adjust.
13561 (encode_source_string): Constify.
13562 * tracepoint.h (encode_source_string): Constify.
13563 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13564 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13565 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13566 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13567 * tui/tui-win.c (parse_scrolling_args): Constify.
13568 * tui/tui-windata.c (tui_erase_data_content): Constify.
13569 * tui/tui-windata.h (tui_erase_data_content): Constify.
13570 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13571 * tui/tui.c (tui_enable): Add cast.
13572 * utils.c (defaulted_query): Constify.
13573 (init_page_info): Add cast.
13574 (puts_debug, subset_compare): Constify.
13575 * utils.h (subset_compare): Constify.
13576 * varobj.c (varobj_format_string): Constify.
13577 * varobj.h (varobj_format_string): Constify.
13578 * vax-tdep.c (vax_register_name): Constify.
13579 * windows-nat.c (windows_detach): Constify.
13580 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13581 * xml-support.c (gdb_xml_end_element): Constify.
13582 * xml-tdesc.c (tdesc_start_reg): Constify.
13583 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13584 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13585 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13586
995816ba
PA
135872017-04-05 Pedro Alves <palves@redhat.com>
13588
13589 * proc-api.c (struct trans): Constify.
13590 (procfs_note): Constify.
13591 * proc-events.c (struct trans, syscall_table):
13592 * proc-flags.c (struct trans): Constify.
13593 * proc-utils.h (procfs_note): Constify.
13594 * proc-why.c (struct trans): Constify.
13595 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13596 (procfs_detach): Constify.
13597 * sol-thread.c (struct string_map): Constify.
13598 (td_err_string, td_state_string): Constify.
13599
3e83a920
PA
136002017-04-05 Pedro Alves <palves@redhat.com>
13601
13602 * proc-api.c (procfs_filename): Don't initialize
13603 procfs_filename.
13604 (prepare_to_trace): Assume procfs_filename is non-NULL.
13605 (_initialize_proc_api): Give procfs_filename a default value here.
13606
63160a43
PA
136072017-04-05 Pedro Alves <palves@redhat.com>
13608
13609 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13610 'cond_string' parameter.
13611 (extract_exception_regexp): Constify 'string' parameter.
13612 (catch_exception_command_1): Constify.
13613 * breakpoint.c (init_catchpoint)
13614 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13615 parameter.
13616 (ep_parse_optional_if_clause, catch_fork_command_1)
13617 (catch_exec_command_1): Constify.
13618 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13619 parameter.
13620 (ep_parse_optional_if_clause): Constify.
13621 * cli/cli-utils.c (remove_trailing_whitespace)
13622 (check_for_argument): Constify.
13623 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13624 non-const overload.
13625 (check_for_argument): Likewise.
13626
9b2eba3d
PA
136272017-04-05 Pedro Alves <palves@redhat.com>
13628
13629 * event-top.c (command_line_handler): Add cast to execute_command
13630 call.
13631 * record-btrace.c (cmd_record_btrace_bts_start)
13632 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13633 (cmd_record_btrace_start): Add cast to execute_command call.
13634 * record-full.c (record_full_goto_insn):
13635 * record.c (record_start, record_stop): Add cast to
13636 execute_command_to_string calls.
13637 (cmd_record_start): Add cast to execute_command calls.
13638
2adadf51
PA
136392017-04-05 Pedro Alves <palves@redhat.com>
13640
13641 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13642 static inline function.
13643 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13644 array and use gdb_PyArg_ParseTupleAndKeywords.
13645 * python/py-cmd.c (cmdpy_init): Likewise.
13646 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13647 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13648 (infpy_search_memory): Likewise.
13649 * python/py-objfile.c (objfpy_add_separate_debug_file)
13650 (gdbpy_lookup_objfile): Likewise.
13651 * python/py-symbol.c (gdbpy_lookup_symbol)
13652 (gdbpy_lookup_global_symbol): Likewise.
13653 * python/py-type.c (gdbpy_lookup_type): Likewise.
13654 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13655 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13656 Likewise.
13657
0d1f4ceb
PA
136582017-04-05 Pedro Alves <palves@redhat.com>
13659
13660 * python/python-internal.h (gdb_PyGetSetDef): New type.
13661 * python/py-block.c (block_object_getset)
13662 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13663 * python/py-event.c (event_object_getset)
13664 (finish_breakpoint_object_getset): Likewise.
13665 * python/py-inferior.c (inferior_object_getset): Likewise.
13666 * python/py-infthread.c (thread_object_getset): Likewise.
13667 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13668 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13669 * python/py-objfile.c (objfile_getset): Likewise.
13670 * python/py-progspace.c (pspace_getset): Likewise.
13671 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13672 Likewise.
13673 * python/py-record.c (recpy_record_getset): Likewise.
13674 * python/py-symbol.c (symbol_object_getset): Likewise.
13675 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13676 Likewise.
13677 * python/py-type.c (type_object_getset, field_object_getset):
13678 Likewise.
13679 * python/py-value.c (value_object_getset): Likewise.
13680
4d759979
PA
136812017-04-05 Pedro Alves <palves@redhat.com>
13682
13683 * python/python-internal.h (gdb_PyObject_CallMethod)
13684 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13685 New functions.
13686 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13687 (PySys_GetObject, PySys_SetPath): New macros.
13688
fdf9e36f
PA
136892017-04-05 Pedro Alves <palves@redhat.com>
13690
13691 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13692 info_osdata_command.
13693 * osdata.c (info_osdata_command): Rename to ...
13694 (info_osdata): ... this. Constify 'type' parameter, and remove
13695 the 'from_tty' parameter. Accept NULL TYPE.
13696 (info_osdata_command): New function.
13697 * osdata.h (info_osdata_command): Remove declaration.
13698 (info_osdata): New declaration.
13699
9f33b8b7
PA
137002017-04-05 Pedro Alves <palves@redhat.com>
13701
13702 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13703 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13704 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13705 parameter.
13706 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13707 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13708 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13709 parameter.
13710 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13711 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13712 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13713 (mi_cmd_file_list_exec_source_files)
13714 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13715 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13716 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13717 parameter.
13718 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13719 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13720 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13721 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13722 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13723 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13724 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13725 'command' parameter.
13726 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13727 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13728 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13729 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13730 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13731 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13732 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13733 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13734 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13735 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13736 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13737 parameter.
13738 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13739 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13740 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13741 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13742 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13743 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13744 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13745 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13746 (mi_cmd_data_list_changed_registers)
13747 (mi_cmd_data_write_register_values)
13748 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13749 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13750 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13751 (mi_cmd_list_features, mi_cmd_list_target_features)
13752 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13753 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13754 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13755 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13756 (mi_cmd_trace_frame_collected): Constify 'command'
13757 parameter.
13758 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13759 'command' parameter.
13760
67cb5b2d
PA
137612017-04-05 Pedro Alves <palves@redhat.com>
13762
13763 * ada-lang.c (ada_completer_word_break_characters): Now a const
13764 array.
13765 (ada_get_gdb_completer_word_break_characters): Constify.
13766 * completer.c (gdb_completer_command_word_break_characters)
13767 (gdb_completer_file_name_break_characters)
13768 (gdb_completer_quote_characters): Now const arrays.
13769 (get_gdb_completer_quote_characters): Constify.
13770 (set_rl_completer_word_break_characters): New function.
13771 (set_gdb_completion_word_break_characters)
13772 (complete_line_internal): Use it.
13773 * completer.h (get_gdb_completer_quote_characters): Constify.
13774 (set_rl_completer_word_break_characters): Declare.
13775 * f-lang.c (f_word_break_characters): Constify.
13776 * language.c (default_word_break_characters): Constify.
13777 * language.h (language_defn::la_word_break_characters): Constify.
13778 (default_word_break_characters): Constify.
13779 * top.c (init_main): Use set_rl_completer_word_break_characters.
13780
7a114964
PA
137812017-04-05 Pedro Alves <palves@redhat.com>
13782
13783 * aix-thread.c (aix_thread_pid_to_str)
13784 (aix_thread_extra_thread_info): Constify.
13785 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13786 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13787 (bsd_uthread_pid_to_str): Constify.
13788 * corelow.c (core_pid_to_str): Constify.
13789 * darwin-nat.c (darwin_pid_to_str): Constify.
13790 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13791 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13792 Constify.
13793 * gnu-nat.c (gnu_pid_to_str): Constify.
13794 * go32-nat.c (go32_pid_to_str): Constify.
13795 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13796 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13797 * inferior.c (inferior_pid_to_str): Constify.
13798 * linux-nat.c (linux_nat_pid_to_str): Constify.
13799 * linux-tdep.c (linux_core_pid_to_str): Constify.
13800 * linux-thread-db.c (thread_db_pid_to_str)
13801 (thread_db_extra_thread_info): Constify.
13802 * nto-tdep.c (nto_extra_thread_info): Constify.
13803 * nto-tdep.h (nto_extra_thread_info): Constify.
13804 * obsd-nat.c (obsd_pid_to_str): Constify.
13805 * procfs.c (procfs_pid_to_str): Constify.
13806 * ravenscar-thread.c (ravenscar_extra_thread_info)
13807 (ravenscar_pid_to_str): Constify.
13808 * remote-sim.c (gdbsim_pid_to_str): Constify.
13809 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13810 Constify.
13811 * sol-thread.c (solaris_pid_to_str): Constify.
13812 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13813 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13814 * target.c (default_pid_to_str, target_pid_to_str)
13815 (normal_pid_to_str, default_pid_to_str): Constify.
13816 * target.h (target_ops::to_pid_to_str)
13817 (target_ops::to_extra_thread_info): Constify.
13818 (target_pid_to_str, normal_pid_to_str): Constify.
13819 * windows-nat.c (windows_pid_to_str): Constify.
13820 * gdbarch.sh (core_pid_to_str): Constify.
13821 * target-delegates.c: Regenerate.
13822 * gdbarch.h, gdbarch.c: Regenerate.
13823
69bbf465
PA
138242017-04-05 Pedro Alves <palves@redhat.com>
13825
13826 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13827 the memory of the temporary warning_pre_print override.
13828 * utils.c (warning_pre_print): Constify.
13829 * utils.h (warning_pre_print): Constify.
13830
be47f9e8
PA
138312017-04-05 Pedro Alves <palves@redhat.com>
13832
13833 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13834 (shell_command): New function.
13835 (make_command): Use std::string.
13836 (init_cli_cmds): Register shell_command instead of shell_escape.
13837
bde6261a
PA
138382017-04-05 Pedro Alves <palves@redhat.com>
13839
13840 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13841 * tracepoint.c (default_collect): Don't initialize.
13842
b38ef47f
PA
138432017-04-05 Pedro Alves <palves@redhat.com>
13844
13845 * macroexp.c (macro_buffer::shared): Now a bool.
13846 (init_buffer): Update.
13847 (init_shared_buffer): Constify 'addr' parameter.
13848 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13849 casts.
13850
f995bbe8
PA
138512017-04-05 Pedro Alves <palves@redhat.com>
13852
13853 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13854 * disasm.c (set_disassembler_options): Constify local.
13855 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13856
4a596fe2
SDJ
138572017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13858
13859 PR gdb/21352
13860 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13861 option.
13862
2cad08ea
YQ
138632017-04-05 Yao Qi <yao.qi@linaro.org>
13864
13865 * frame.c (frame_unwind_register_unsigned): Call
13866 frame_unwind_register_value.
13867
55a98976
YQ
138682017-04-05 Yao Qi <yao.qi@linaro.org>
13869
13870 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13871 Use gdb_test_multiple, and don't match anchor.
13872
4ac40124
PA
138732017-04-05 Pedro Alves <palves@redhat.com>
13874
13875 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13876 (Write After Approval): Remove Simon Marchi.
13877
c053b654
PA
138782017-04-05 Pedro Alves <palves@redhat.com>
13879
13880 * common/gdb_optional.h (optional::optional): Make constexpr and
13881 initialize m_dummy.
13882
4c7bf4f9
JB
138832017-04-04 John Baldwin <jhb@FreeBSD.org>
13884
13885 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13886 (amd64fbsd_jmp_buf_reg_offset): Remove.
13887 (amd64fbsd_supply_uthread): Remove function.
13888 (amd64fbsd_collect_uthread): Remove function.
13889 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13890 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13891 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13892 (fbsd-nat.c): Update comment.
13893 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13894 (i386fbsd_jmp_buf_reg_offset): Remove.
13895 (i386fbsd_supply_uthread): Remove function.
13896 (i386fbsd_collect_uthread): Remove function.
13897 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13898
1e1a8bef
JB
138992017-04-04 John Baldwin <jhb@FreeBSD.org>
13900
13901 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13902 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13903 * NEWS: Mention that support for FreeBSD/alpha was removed.
13904 * alpha-fbsd-tdep.c: Delete file.
13905 * config/alpha/fbsd.mh: Delete file.
13906 * configure.host: Delete alpha*-*-freebsd* and
13907 alpha*-*-kfreebsd*-gnu.
13908 * configure.tgt: Delete alpha*-*-freebsd* and
13909 alpha*-*-kfreebsd*-gnu.
13910
49907934
JB
139112017-04-04 John Baldwin <jhb@FreeBSD.org>
13912
13913 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13914 amd64bsd_store_inferior_registers): Use ptid from regcache.
13915
6f77053d
PA
139162017-04-04 Pedro Alves <palves@redhat.com>
13917
13918 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13919 data fields, make them private and add "m_" prefixes.
13920 (lnp_state_machine::lnp_state_machine): New ctor.
13921 (record_line, check_line_address, handle_set_discriminator)
13922 (handle_set_address, handle_advance_pc, handle_special_opcode)
13923 (handle_advance_line, handle_set_file, handle_negate_stmt)
13924 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13925 (end_sequence, advance_line): New methods.
13926 (m_gdbarch, m_record_lines_p): New fields.
13927 (lnp_reader_state): Delete.
13928 (dwarf_record_line): Rename to ...
13929 (lnp_state_machine::record_line): ... adjust.
13930 (init_lnp_state_machine): Delete.
13931 (lnp_state_machine::lnp_state_machine): New.
13932 (check_line_address): Rename to ...
13933 (lnp_state_machine::check_line_address): This.
13934 (dwarf_decode_lines_1): Remove reference to "reader_state".
13935 Adjust lnp_state_machine having a non-default ctor. Use bool.
13936 State machine internal state manipulation moved to
13937 lnp_state_machine methods.
13938
9c541725
PA
139392017-04-04 Pedro Alves <palves@redhat.com>
13940
13941 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13942 unittests/offset-type-selftests.c.
13943 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13944 * common/offset-type.h: New file.
13945 * common/preprocessor.h: New file.
13946 * common/traits.h: New file.
13947 * common/valid-expr.h: New file.
13948 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13949 sect_offset and cu_offset strong typedefs throughout.
13950 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13951 typedefs throughout.
13952 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13953 sect_offset and cu_offset strong typedefs throughout.
13954 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13955 typedefs throughout.
13956 * gdbtypes.h: Include "common/offset-type.h".
13957 (cu_offset): Now an offset type (strong typedef) instead of a
13958 struct.
13959 (sect_offset): Likewise.
13960 (union call_site_parameter_u): Rename "param_offset" field to
13961 "param_cu_off".
13962 * unittests/offset-type-selftests.c: New file.
13963
ecfb656c
PA
139642017-04-04 Pedro Alves <palves@redhat.com>
13965
13966 * common/underlying.h: New file.
13967 * dwarf2read.c: Include "common/gdb_optional.h" and
13968 "common/underlying.h".
13969 (dir_index, file_name_index): New types.
13970 (file_entry): Use them.
13971 (file_entry::include): Use to_underlying.
13972 (line_header::add_file_name): Use dir_index.
13973 (read_formatted_entries): Use gdb::optional. Read form before
13974 writting to file_entry.
13975 (dwarf_decode_line_header): Use dir_index.
13976 (lnp_state_machine::current_file): Use to_underlying.
13977 (lnp_state_machine::file): Change type to file_name_index.
13978 (dwarf_record_line): Use to_underlying.
13979 (init_lnp_state_machine): Use file_name_index.
13980 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13981
d194f1fe
PA
139822017-04-04 Pedro Alves <palves@redhat.com>
13983
13984 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13985 operator bool, has_value and get methods.
13986
fff8551c
PA
139872017-04-04 Pedro Alves <palves@redhat.com>
13988
13989 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13990 fields.
13991 (line_header): Initialize all data fields. Change type of
13992 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13993 Change type of include_dirs to std::vector<const char *>. Remove
13994 num_include_dirs, include_dirs_size. Change type of file_names to
13995 std::vector<file_entry>. Remove num_file_names, file_names_size.
13996 (line_header::line_header): New.
13997 (line_header::add_include_dir, line_header::add_file_name): New
13998 methods.
13999 (line_header::include_dir_at): Remove NULL check.
14000 (line_header::file_name_at): Add const overload.
14001 (line_header_up): New unique_ptr typedef.
14002 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14003 std::vector. Remove free_line_header call.
14004 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14005 free_line_header call.
14006 (free_cu_line_header): Delete.
14007 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14008 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14009 Adjust to use std::vector.
14010 (free_line_header): Delete.
14011 (free_line_header_voidp): Use delete.
14012 (add_include_dir): Replace with ...
14013 (line_header::add_include_dir): ... this method. Use std::vector.
14014 (add_file_name): Replace with ...
14015 (line_header::add_file_name): ... this method. Use std::vector.
14016 (add_include_dir_stub): Delete.
14017 (read_formatted_entries): Remove memset.
14018 (dwarf_decode_line_header): Return a line_header_up instead of a
14019 raw pointer. Remove cleanup handling. Pass lambdas to
14020 read_formatted_entries. Adjust to use line_header methods.
14021 (dwarf_decode_lines_1): Adjust to use line_header methods.
14022 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14023 use std::vector.
14024
d62a8ae2
SM
140252017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14026
14027 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14028 instead of struct ptid.
14029
db3a1dc7
AH
140302017-05-04 Alan Hayward <alan.hayward@arm.com>
14031
14032 * frame.c (get_frame_register_bytes): Unwind using value.
14033 (put_frame_register_bytes): Likewise.
14034
b1b45502
IB
140352017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14036
14037 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14038 aggregate-like.
14039
ec13808e
JK
140402017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14041
14042 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14043
12316564
YQ
140442017-03-29 Yao Qi <yao.qi@linaro.org>
14045
14046 * gdbthread.h (struct thread_info): Declare constructor and
14047 destructor. Add some in-class member initializers.
14048 * thread.c (free_thread): Remove.
14049 (init_thread_list): Call delete instead of free_thread.
14050 (new_thread): Call thread_info constructor.
14051 (thread_info::thread_info): New function.
14052 (thread_info::~thread_info): New function.
14053 (delete_thread_1): Call delete instead of free_thread.
14054 (make_cleanup_restore_current_thread): Move tp and frame to
14055 inner block.
14056
fe5f7374
AK
140572017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14058
14059 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14060 (arc_skip_prologue): Likewise.
14061 (arc_make_frame_cache): Likewise.
14062 (arc_pv_get_operand): New function.
14063 (arc_is_in_prologue): Likewise.
14064 (arc_analyze_prologue): Likewise.
14065 (arc_print_frame_cache): Likewise.
14066 (MAX_PROLOGUE_LENGTH): New constant.
14067
eea78757
AK
140682017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14069
14070 * configure.tgt: Add arc-insn.o.
14071 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14072 (dump_arc_instruction_command): New function.
14073 (arc_fprintf_disasm): Likewise.
14074 (arc_disassemble_info): Likewise.
14075 (arc_insn_get_operand_value): Likewise.
14076 (arc_insn_get_operand_value_signed): Likewise.
14077 (arc_insn_get_memory_base_reg): Likewise.
14078 (arc_insn_get_memory_offset): Likewise.
14079 (arc_insn_get_branch_target): Likewise.
14080 (arc_insn_dump): Likewise.
14081 (arc_insn_get_linear_next_pc): Likewise.
14082 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14083 (arc_disassemble_info): Likewise.
14084 (arc_insn_get_branch_target): Likewise.
14085 (arc_insn_get_linear_next_pc): Likewise.
14086 * NEWS: Mention new "maint print arc arc-instruction".
14087
3be78afd
AK
140882017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14089
14090 * arc-tdep (maintenance_print_arc_list): New variable.
14091 (maintenance_print_arc_command): New function.
14092
296ec4fa
AK
140932017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14094
14095 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14096 Add "limm" and "reserved".
14097 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14098 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14099 * arc-tdep.h (arc_regnum): Likewise.
14100
f74f865e
MF
141012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14102
14103 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14104 for THREADPTR register.
14105 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14106 register.
14107 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14108 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14109 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14110
0d0bf81a
MF
141112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14112
14113 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14114 registers above gdbarch_num_regs (gdbarch) as privileged in
14115 call0 ABI.
14116
0ce4291e
MF
141172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14118
14119 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14120 for a single specified register or for all registers in
14121 a0_base..a0_base + C0_NREGS range.
14122 (supply_gregset_reg): Call regcache_raw_supply for a single
14123 specified register or for all registers in a0_base..a0_base +
14124 C0_NREGS range.
14125
c56054f9
MF
141262017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14127
14128 * arch/xtensa.h (C0_NREGS): Add definition.
14129 * xtensa-tdep.c (C0_NREGS): Remove definition.
14130
a4398628
MF
141312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14132
14133 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14134 Drop xtensa_default_isa initialization.
14135 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14136
8c43009f
PA
141372017-03-27 Pedro Alves <palves@redhat.com>
14138
14139 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14140 (file_entry::include_dir): New method.
14141 (line_header::include_dir_at, line_header::file_name_at): New
14142 methods.
14143 (setup_type_unit_groups, setup_type_unit_groups)
14144 (psymtab_include_file_name): Simplify using the new methods.
14145 (lnp_state_machine) <the_line_header>: New field.
14146 <file>: Add comment.
14147 (lnp_state_machine::current_file): New method.
14148 (dwarf_record_line): Simplify using the new methods.
14149 (init_lnp_state_machine): Initialize the "the_line_header" field.
14150 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14151 Simplify using the new methods.
14152
a7e80b9e
PA
141532017-03-27 Pedro Alves <palves@redhat.com>
14154
14155 * cp-name-parser.y (make_empty): Delete.
14156 (demangler_special, nested_name, ptr_operator, array_indicator)
14157 (direct_declarator, declarator_1): Use fill_comp instead of
14158 make_empty.
14159
21047726
PA
141602017-03-27 Pedro Alves <palves@redhat.com>
14161
14162 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14163 to ATTRIBUTE_PRINTF.
14164 * solib-target.c (library_list_start_list): Print "string" not
14165 "version".
14166 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14167 gdb_xml_error call.
14168
d721ba37
PA
141692017-03-27 Pedro Alves <palves@redhat.com>
14170
14171 * dwarf2read.c (struct file_and_directory): New.
14172 (dwarf2_get_dwz_file): Adjust to use std::string.
14173 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14174 (find_file_and_directory): Adjust to return a file_and_directory
14175 object.
14176 (read_file_scope): Adjust to use file_and_directory. Remove
14177 make_cleanup/do_cleanups calls.
14178 (open_and_init_dwp_file): Adjust to use std::string. Remove
14179 make_cleanup/do_cleanups calls.
14180 * python/python.c (do_start_initialization): Adjust to ldirname
14181 returning a std::string.
14182 * utils.c (ldirname): Now returns a std::string.
14183 * utils.h (ldirname): Change return type to std::string.
14184 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14185 returning a std::string.
14186 * xml-tdesc.c (file_read_description_xml): Likewise.
14187
ed771251
AH
141882017-03-24 Alan Hayward <alan.hayward@arm.com>
14189
14190 * regcache.c (regcache_debug_print_register): New function.
14191 * regcache.h (regcache_debug_print_register): New declaration.
14192 * target.c (debug_print_register): Remove.
14193 (target_fetch_registers): Call regcache_debug_print_register.
14194 (target_store_registers): Likewise.
14195
568c1b9f
PB
141962017-03-24 Pádraig Brady <pbrady@fb.com>
14197
14198 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14199 reference beyond the 'lh->include_dirs' array before accessing to
14200 it.
14201 (psymtab_include_file_name): Likewise.
14202 (dwarf_decode_lines_1): Likewise.
14203 (dwarf_decode_lines): Likewise.
14204 (file_file_name): Likewise.
14205
3e00d44f
SM
142062017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14207
14208 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14209 inferior_ptid.
14210 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14211 ps_lsetfpregs): Likewise.
14212 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14213 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14214 ps_lsetfpregs): Likewise.
14215 * target.c (target_fetch_registers, target_store_registers):
14216 Remove asserts.
14217
077ae656
AH
142182017-03-23 Alan Hayward <alan.hayward@arm.com>
14219
14220 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14221
1e2b521d
YQ
142222017-03-23 Yao Qi <yao.qi@linaro.org>
14223
14224 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14225 (_initialize_aarch64_tdep): Register it.
14226 (aarch64_record_load_store): Handle PRFM instruction.
14227 (aarch64_process_record_test): New function.
14228
33877125
YQ
142292017-03-23 Yao Qi <yao.qi@linaro.org>
14230
14231 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14232 indentation.
14233
a0eef940
YQ
142342017-03-23 Yao Qi <yao.qi@linaro.org>
14235
14236 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14237
3f2a3564
PR
142382017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14239
14240 python/python.c (do_start_initialization): Fix memory leak.
14241
b67aeab0
SM
142422017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14243
14244 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14245 using get_ptrace_pid.
14246 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14247 inferior_ptid.
14248 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14249 inferior_ptid instead of pid.
14250
ffdbe864
YQ
142512017-03-22 Yao Qi <yao.qi@linaro.org>
14252
14253 * aarch64-tdep.c: Wrap locally used classes in anonymous
14254 namespace.
14255 * arm-tdep.c: Likewise.
14256 * linespec.c: Likewise.
14257 * ui-out.c: Likewise.
14258
9d736fbf
JG
142592017-03-22 Jonah Graham <jonah@kichwacoders.com>
14260
14261 PR gdb/19637
14262 * python/lib/gdb/printer/bound_registers.py: Import sys.
14263
3de88e9a
SM
142642017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14265
14266 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14267 windows_thread_info parameter and use it instead of
14268 current_thread.
14269 (windows_fetch_inferior_registers): Don't set current_thread,
14270 pass the thread to do_windows_fetch_inferior_registers. Use
14271 ptid from regcache instead of inferior_ptid.
14272 (do_windows_store_inferior_registers): Add windows_thread_info
14273 parameter and use it instead of current_thread.
14274 (windows_store_inferior_registers): Don't set current_thread,
14275 pass the thread to do_windows_store_inferior_registers. Use
14276 ptid from regcache instead of inferior_ptid.
14277
0e7b8f61
SM
142782017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14279
14280 * ser-mingw.c (ser_windows_raw): Remove reference to
14281 struct serial::current_timeout.
14282
5badf10a
IR
142832017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14284
14285 PR tdep/20928
14286 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14287 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14288 (sparc64_fsr_type): Fix %fsr decoding.
14289
cee59b3f
TW
142902017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14291
14292 * python/py-record-btrace.c (btpy_insn_data): Change return type
14293 for Python 2.
14294
639a9038
SM
142952017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14296
14297 * spu-linux-nat.c (spu_fetch_inferior_registers,
14298 spu_store_inferior_registers): Use ptid from regcache, set and
14299 restore inferior_ptid.
14300 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14301 Likewise.
14302
bcc0c096
SM
143032017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14304
14305 * i386-linux-nat.c (fetch_register, store_register,
14306 i386_linux_fetch_inferior_registers,
14307 i386_linux_store_inferior_registers): Use ptid from regcache.
14308 * ia64-linux-nat.c (ia64_linux_fetch_register,
14309 ia64_linux_store_register): Likewise.
14310 * inf-ptrace.c (inf_ptrace_fetch_register,
14311 inf_ptrace_store_register): Likewise.
14312 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14313 m32r_linux_store_inferior_registers): Likewise.
14314 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14315 m68kbsd_store_inferior_registers): Likewise.
14316 * m68k-linux-nat.c (fetch_register, store_register,
14317 m68k_linux_fetch_inferior_registers,
14318 m68k_linux_store_inferior_registers): Likewise.
14319 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14320 m88kbsd_store_inferior_registers): Likewise.
14321 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14322 mips_fbsd_store_inferior_registers): Likewise.
14323 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14324 mips64_linux_regsets_store_registers): Likewise.
14325 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14326 mipsnbsd_store_inferior_registers): Likewise.
14327 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14328 mips64obsd_store_inferior_registers): Likewise.
14329 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14330 Likewise.
14331 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14332 ppcfbsd_store_inferior_registers): Likewise.
14333 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14334 ppc_linux_store_inferior_registers): Likewise.
14335 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14336 ppcnbsd_store_inferior_registers): Likewise.
14337 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14338 ppcobsd_store_registers): Likewise.
14339 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14340 Likewise.
14341 * ravenscar-thread.c (ravenscar_fetch_registers,
14342 ravenscar_store_registers, ravenscar_prepare_to_store):
14343 Likewise.
14344 * record-btrace.c (record_btrace_fetch_registers,
14345 record_btrace_store_registers, record_btrace_prepare_to_store):
14346 Likewise.
14347 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14348 Lookup inferior using ptid from regcache, instead of
14349 current_inferior.
14350 * remote.c (remote_fetch_registers, remote_store_registers): Use
14351 ptid from regcache.
14352 * rs6000-nat.c (fetch_register, store_register): Likewise.
14353 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14354 s390_linux_store_inferior_registers): Likewise.
14355 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14356 shnbsd_store_inferior_registers): Likewise.
14357 * sol-thread.c (sol_thread_fetch_registers,
14358 sol_thread_store_registers): Likewise.
14359 * sparc-nat.c (sparc_fetch_inferior_registers,
14360 sparc_store_inferior_registers): Likewise.
14361 * tilegx-linux-nat.c (fetch_inferior_registers,
14362 store_inferior_registers): Likewise.
14363 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14364 vaxbsd_store_inferior_registers): Likewise.
14365 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14366 store_xtregs): Likewise.
14367
c0f55cc6
AV
143682017-03-20 Artemiy Volkov <artemiyv@acm.org>
14369
14370 PR gdb/14441
14371 * NEWS: Mention support for rvalue references in GDB and python.
14372 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14373 supports both lvalue and rvalue references.
14374
15c0a2a9
AV
143752017-03-20 Artemiy Volkov <artemiyv@acm.org>
14376
14377 PR gdb/14441
14378 * gdbtypes.c (rank_one_type): Implement overloading
14379 resolution rules regarding rvalue references.
14380
aa006118
AV
143812017-03-20 Artemiy Volkov <artemiyv@acm.org>
14382
14383 PR gdb/14441
14384 * aarch64-tdep.c (aarch64_type_align)
14385 (aarch64_extract_return_value, aarch64_store_return_value): Change
14386 lvalue reference type checks to general reference type checks.
14387 * amd64-tdep.c (amd64_classify): Likewise.
14388 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14389 Likewise.
14390 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14391 (arm_store_return_value): Likewise.
14392 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14393 * c-typeprint.c (c_print_type): Likewise.
14394 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14395 (cplus_number_of_children, cplus_describe_child): Likewise.
14396 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14397 * completer.c (expression_completer): Likewise.
14398 * cp-support.c (make_symbol_overload_list_adl_namespace):
14399 Likewise.
14400 * darwin-nat-info.c (info_mach_region_command): Likewise.
14401 * dwarf2loc.c (entry_data_value_coerce_ref)
14402 (value_of_dwarf_reg_entry): Likewise.
14403 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14404 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14405 Likewise.
14406 * findvar.c (extract_typed_address, store_typed_address):
14407 Likewise.
14408 * gdbtypes.c (rank_one_type): Likewise.
14409 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14410 * infcall.c (value_arg_coerce): Likewise.
14411 * language.c (pointer_type): Likewise.
14412 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14413 Likewise.
14414 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14415 * mn10300-tdep.c (mn10300_type_align): Likewise.
14416 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14417 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14418 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14419 Likewise.
14420 * printcmd.c (print_formatted, x_command): Likewise.
14421 * python/py-type.c (typy_get_composite, typy_template_argument):
14422 Likewise.
14423 * python/py-value.c (valpy_referenced_value)
14424 (valpy_get_dynamic_type, value_has_field): Likewise.
14425 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14426 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14427 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14428 * spu-tdep.c (spu_scalar_value_p): Likewise.
14429 * symtab.c (lookup_symbol_aux): Likewise.
14430 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14431 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14432 Likewise.
14433 * valops.c (value_cast_pointers, value_cast)
14434 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14435 (value_struct_elt, value_struct_elt_bitpos)
14436 (value_find_oload_method_list, find_overload_match)
14437 (value_rtti_indirect_type): Likewise.
14438 * valprint.c (val_print_scalar_type_p, generic_val_print):
14439 Likewise.
14440 * value.c (value_actual_type, value_as_address, unpack_long)
14441 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14442 (coerce_ref): Likewise.
14443 * varobj.c (varobj_get_value_type): Likewise.
14444
3fcf899d
AV
144452017-03-20 Artemiy Volkov <artemiyv@acm.org>
14446
14447 PR gdb/14441
14448 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14449 table of constants.
14450 * python/lib/gdb/command/explore.py: Support exploring values
14451 of rvalue reference types.
14452 * python/lib/gdb/types.py: Implement get_basic_type() for
14453 rvalue reference types.
14454 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14455 constant.
14456 * python/py-value.c (valpy_getitem): Add an rvalue reference
14457 check.
14458 (valpy_reference_value): Add new parameter "refcode".
14459 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14460 New wrappers for valpy_reference_value().
14461 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14462 (gdbpy_invoke_xmethod): Likewise.
14463
4297a3f0
AV
144642017-03-20 Artemiy Volkov <artemiyv@acm.org>
14465
14466 PR gdb/14441
14467 * dwarf2read.c (process_die, read_type_die_1): Handle the
14468 DW_TAG_rvalue_reference_type DIE.
14469 (read_tag_reference_type): Add new parameter "refcode".
14470
e1cb3213
AV
144712017-03-20 Artemiy Volkov <artemiyv@acm.org>
14472
14473 PR gdb/14441
14474 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14475 (c_type_print_modifier, c_type_print_varspec_suffix)
14476 (c_type_print_base): Support printing rvalue reference types.
14477 * c-valprint.c (c_val_print, c_value_print): Support printing
14478 rvalue reference values.
14479
e4347c89
AV
144802017-03-20 Artemiy Volkov <artemiyv@acm.org>
14481
14482 PR gdb/14441
14483 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14484 typename.
14485 * cp-support.c (replace_typedefs): Handle
14486 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14487 * python/py-type.c (typy_lookup_type): Likewise.
14488
53cc15f5
AV
144892017-03-20 Artemiy Volkov <artemiyv@acm.org>
14490
14491 PR gdb/14441
14492 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14493 * parse.c (insert_type): Change assert statement.
14494 (follow_types): Handle rvalue reference types.
14495 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14496 constant.
14497
a65cfae5
AV
144982017-03-20 Artemiy Volkov <artemiyv@acm.org>
14499
14500 PR gdb/14441
14501 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14502 value_ref() interface.
14503 * c-valprint.c (c_value_print): Likewise.
14504 * infcall.c (value_arg_coerce): Likewise.
14505 * python/py-value.c (valpy_reference_value): Likewise.
14506 * valops.c (value_cast, value_reinterpret_cast)
14507 (value_dynamic_cast, typecmp): Likewise.
14508 (value_ref): Parameterize by kind of return value reference type.
14509 * value.h (value_ref): Add new parameter "refcode".
14510
3b224330
AV
145112017-03-20 Artemiy Volkov <artemiyv@acm.org>
14512
14513 PR gdb/14441
14514 * dwarf2read.c (read_tag_reference_type): Use
14515 lookup_lvalue_reference_type() instead of lookup_reference_type().
14516 * eval.c (evaluate_subexp_standard): Likewise.
14517 * f-exp.y: Likewise.
14518 * gdbtypes.c (make_reference_type, lookup_reference_type):
14519 Generalize with rvalue reference types.
14520 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14521 convenience wrappers for lookup_reference_type().
14522 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14523 reference kind parameter.
14524 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14525 wrappers for lookup_reference_type().
14526 * guile/scm-type.c (gdbscm_type_reference): Use
14527 lookup_lvalue_reference_type() instead of lookup_reference_type().
14528 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14529 * parse.c (follow_types): Likewise.
14530 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14531 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14532 Likewise.
14533 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14534 (gdbpy_invoke_xmethod): Likewise.
14535 * stabsread.c: Provide extra argument to make_reference_type()
14536 call.
14537 * valops.c (value_ref, value_rtti_indirect_type): Use
14538 lookup_lvalue_reference_type() instead of lookup_reference_type().
14539
f9aeb8d4
AV
145402017-03-20 Artemiy Volkov <artemiyv@acm.org>
14541
14542 PR gdb/14441
14543 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14544 (TYPE_IS_REFERENCE): New macro.
14545 (struct type): Add rvalue_reference_type field.
14546 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14547
51457a05
MAL
145482017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14549
14550 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14551 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14552 New function definition.
14553 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14554 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14555 New function declaration.
14556 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14557 * mi/mi-interp.h: New file.
14558 * solib.c (info_sharedlibrary_command): Replace for loop with
14559 ALL_SO_LIBS macro
14560 * solib.h (update_solib_list): New function declaration.
14561 (so_list_head): Move macro.
14562 * solist.h (ALL_SO_LIBS): New macro.
14563
e696b3ad
MAL
145642017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14565
14566 * infcmd.c (post_create_inferior): Remove unused argument in
14567 call to solib_add.
14568 * remote.c (remote_start_remote): Likewise.
14569 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14570 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14571 (enable_break): Likewise.
14572 * solib.c (update_solib_list): Remove unused target argument
14573 and its documentation.
14574 (solib_add): Remove unused target argument. Remove unused
14575 argument in call to update_solib_list.
14576 (info_sharedlibrary_command): Remove unused argument in call
14577 to update_solib_list.
14578 (sharedlibrary_command): Remove unused argument in call to
14579 solib_add.
14580 (handle_solib_event): Likewise.
14581 (reload_shared_libraries): Likewise.
14582 * solib.h (solib_add): Remove unused target argument.
14583
dcb84eda
AA
145842017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14585
14586 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14587 (s390_displaced_step_fixup): Cover relative branches with the
14588 default fixup handling. This fixes lack of support for some
14589 relative branch instructions.
14590
d9cb6cdc
SM
145912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14592
14593 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14594 ptid from regcache.
14595
1afaf9f4
SM
145962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14597
14598 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14599 i386_darwin_store_inferior_registers): Use ptid from regcache.
14600
aac12e24
SM
146012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14602
14603 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14604 i386bsd_store_inferior_registers): Use ptid from regcache.
14605
bbe1eef1
SM
146062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14607
14608 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14609 hppaobsd_store_registers): Use ptid from regcache.
14610
10799020
SM
146112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14612
14613 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14614 hppanbsd_store_registers): Use ptid from regcache.
14615
00204cf7
SM
146162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14617
14618 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14619 from regcache. Use get_ptrace_pid.
14620
11a33714
SM
146212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14622
14623 * corelow.c (get_core_register_section): Use ptid from regcache,
14624 update doc.
14625
317cd492
SM
146262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14627
14628 * bsd-uthread.c (bsd_uthread_fetch_registers,
14629 bsd_uthread_store_registers): Use ptid from regcache, set and
14630 restore inferior_ptid.
14631
9ac8a7c2
SM
146322017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14633
14634 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14635 fetch_fp_regs, store_register, store_regs, store_fp_register,
14636 store_fp_regs): Use ptid from regcache.
14637
4ac4bb6a
SM
146382017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14639
14640 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14641 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14642 store_vfp_regs): Use ptid from regcache.
14643
9bcbdca8
PA
146442017-03-17 Pedro Alves <palves@redhat.com>
14645
14646 PR remote/21188
14647 * ser-base.c (ser_base_wait_for): Add comment.
14648 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14649 version.
14650 * ser-unix.c (hardwire_raw): Remove reference to
14651 scb->current_timeout.
14652 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14653 (hardwire_ops): Install ser_base_readchar instead of
14654 hardwire_readchar.
14655 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14656 Remove fields.
14657
7503099f
JG
146582017-03-17 Jonah Graham <jonah@kichwacoders.com>
14659
14660 PR gdb/19637
14661 * python/lib/gdb/printer/bound_registers.py: Add support for
14662 Python 3.
14663
7942e96e
AA
146642017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14665
14666 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14667 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14668 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14669 byte_offset to subobj_byte_offset. Fix the handling of
14670 DWARF_VALUE_STACK on big-endian targets when coming via an
14671 implicit pointer.
14672 (dwarf2_evaluate_loc_desc): Adjust call to
14673 dwarf2_evaluate_loc_desc_full.
14674 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14675 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14676
ba14f379
YQ
146772017-03-16 Yao Qi <yao.qi@linaro.org>
14678
14679 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14680 and REVSH instructions.
14681
b121eeb9
YQ
146822017-03-16 Yao Qi <yao.qi@linaro.org>
14683
14684 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14685 (arm_record_test): Declare.
14686 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14687 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14688 align with the manual.
14689 (thumb_record_misc): Adjust the code order to align with the
14690 manual.
14691 (thumb2_record_decode_insn_handler): Fix instruction matching.
14692 (instruction_reader_thumb): New class.
14693 (arm_record_test): New function.
14694
728a7913
YQ
146952017-03-16 Yao Qi <yao.qi@linaro.org>
14696
14697 * arm-tdep.c (abstract_memory_reader): New class.
14698 (instruction_reader): New class.
14699 (extract_arm_insn): Add argument 'reader'. Callers updated.
14700 (decode_insn): Likewise.
14701
34b43320
DE
147022017-03-16 Doug Evans <dje@google.com>
14703
a7c0469f
DE
14704 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14705 member. Change type of TYPE member to SCM. All uses updated.
14706 (lsscm_make_lazy_string_smob): Add assert.
14707 (lsscm_make_lazy_string): Flag bad length values.
14708 (lsscm_elt_type): New function.
14709 (gdbscm_lazy_string_to_value): Rewrite to use
14710 lsscm_safe_lazy_string_to_value.
14711 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14712 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14713 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14714 in incoming type.
14715 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14716 * guile/scm-type.c (tyscm_scm_to_type): New function.
14717
147182017-03-15 Doug Evans <dje@google.com>
14719
34b43320
DE
14720 PR python/17728, python/18439, python/18779
14721 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14722 member. Change type of TYPE member to PyObject *. All uses updated.
14723 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14724 (gdbpy_create_lazy_string_object): Flag bad length values.
14725 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14726 Handle typedefs in incoming type.
14727 (stpy_lazy_string_elt_type): New function.
14728 (gdbpy_extract_lazy_string): Call it.
14729 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14730 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14731 typedefs in incoming type.
14732
a3a5fecc
DE
147332017-03-16 Doug Evans <dje@google.com>
14734
14735 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14736 * guile/scm-type.c (tyscm_scm_to_type): New function.
14737
28f1c605
JW
147382017-03-16 Jiong Wang <jiong.wang@arm.com>
14739
14740 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14741 "ULONGEST" for "skip".
14742
87c336f6
AA
147432017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14744
14745 PR gdb/21220
14746 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14747 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14748 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14749 over ptrace peek/poke until end of buffer or error.
14750
cf81cf60
SM
147512017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14752
14753 * parse.c (length_of_subexp): Make static.
14754 * parser-defs.h (length_of_subexp): Remove.
14755
a379284a
AA
147562017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14757
14758 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14759 as well.
14760
8a6200ba
PA
147612017-03-14 Pedro Alves <palves@redhat.com>
14762
14763 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14764 (main): Use std::unique_ptr. Remove calls to
14765 cp_demangled_name_parse_free.
14766
f79ec206
SM
147672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14768
14769 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14770 alphabsd_store_inferior_registers): Use regcache->ptid instead
14771 of inferior_ptid.
14772
edb5fb00
SM
147732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14774
14775 * aix-thread.c (aix_thread_fetch_registers,
14776 aix_thread_store_registers): Use regcache->ptid instead of
14777 inferior_ptid.
14778
55119686
SM
147792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14780
14781 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14782 store_gregs_to_thread, fetch_fpregs_from_thread,
14783 store_fpregs_to_thread): Use regcache->ptid instead of
14784 inferior_ptid.
14785
6a06fbb7
SM
147862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14787
14788 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14789 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14790 instead of inferior_ptid.
14791
c6386875
SM
147922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14793
14794 * target.c (target_fetch_registers, target_store_registers): Add
14795 assert.
14796
ddaaf0fb
SM
147972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14798
14799 * regcache.h (regcache_get_ptid): New function.
14800 * regcache.c (regcache_get_ptid): New function.
14801
b9da89d1 148022017-03-13 Mark Wielaard <mark@klomp.org>
14803
14804 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14805
5f4d1085
KS
148062017-03-10 Keith Seitz <keiths@redhat.com>
14807
14808 PR c++/8218
14809 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14810
c65d6b55
PA
148112017-03-08 Pedro Alves <palves@redhat.com>
14812
14813 PR gdb/18360
14814 * infrun.c (start_step_over, do_target_resume, resume)
14815 (restart_threads): Assert we're not resuming a thread that is
14816 meant to be stopped.
14817 (infrun_thread_stop_requested_callback): Delete.
14818 (infrun_thread_stop_requested): If the thread is internally
14819 stopped, queue a pending stop event and clear the thread's
14820 inline-frame state.
14821 (handle_stop_requested): New function.
14822 (handle_syscall_event, handle_inferior_event_1): Use
14823 handle_stop_requested.
14824 (handle_stop_requested): New function.
14825 (handle_signal_stop): Set the thread's stop_signal here instead of
14826 at caller.
14827 (finish_step_over): Clear step over info unconditionally.
14828 (handle_signal_stop): If the user had interrupted the event
14829 thread, consider the stop a random signal.
14830 (handle_signal_stop) <signal arrived while stepping over
14831 breakpoint>: Don't restart threads here.
14832 (stop_waiting): Don't clear step-over info here.
14833
15c22686
PA
148342017-03-08 Pedro Alves <palves@redhat.com>
14835
14836 PR 21206
14837 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14838 goes to argument 2, not 1.
14839
6e5d74e7
PA
148402017-03-08 Pedro Alves <palves@redhat.com>
14841
14842 PR cli/21218
14843 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14844 display_gdb_prompt.
14845 (command_line_input): Add comment.
14846
9753a2f6
PA
148472017-03-08 Pedro Alves <palves@redhat.com>
14848
14849 PR tui/21216
14850 * tui/tui-file.c (tui_file::write): New.
14851 * tui/tui-file.h (tui_file): Override "write".
14852 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14853 factored out from ...
14854 (tui_puts): ... here.
14855 (tui_putc): Use them.
14856 (tui_write): New function.
14857 * tui/tui-io.h (tui_write): Declare.
14858
1672e0d9
SDJ
148592017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14860
14861 * Makefile.in (SFILES): Replace "environ.c" with
14862 "common/environ.c".
14863 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14864 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14865 to...
14866 * common/environ.c: ... here.
14867 * environ.h: Moved to...
14868 * common/environ.h: ... here.
14869
f7bb4e3a
PB
148702017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14871
14872 * gdbarch.sh (pstring_ptr): New static function.
14873 (gdbarch_disassembler_options): Use it.
14874 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14875 not valid_disassembler_option->name.
14876 * gdbarch.c: Regenerate.
14877
e45ced6c
PB
148782017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14879
14880 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14881
5f6fd321
PA
148822017-03-07 Pedro Alves <palves@redhat.com>
14883
14884 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14885
6dbb839a 148862017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14887
14888 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14889 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14890 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14891 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14892
d274ecf4
SM
148932017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14894
14895 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14896
df97be55
SM
148972017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14898
14899 * remote.c (remote_add_target_side_commands): Use range-based
14900 for loop.
14901
7d45f3df
YQ
149022017-03-03 Yao Qi <yao.qi@linaro.org>
14903
14904 PR gdb/21165
14905 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14906 value is lazy.
14907 * valprint.c (common_val_print): Likewise.
14908
65b48a81
PB
149092017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14910
14911 * NEWS: Mention new set/show disassembler-options commands.
14912 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14913 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14914 (prospective_options): New static variable.
14915 (gdb_disassembler::gdb_disassembler): Initialize
14916 m_di.disassembler_options.
14917 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14918 (get_disassembler_options): New function.
14919 (set_disassembler_options): Likewise.
14920 (set_disassembler_options_sfunc): Likewise.
14921 (show_disassembler_options_sfunc): Likewise.
14922 (disassembler_options_completer): Likewise.
14923 (_initialize_disasm): Likewise.
14924 * disasm.h (get_disassembler_options): New prototype.
14925 (set_disassembler_options): Likewise.
14926 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14927 (gdbarch_verify_disassembler_options): Likewise.
14928 * gdbarch.c: Regenerate.
14929 * gdbarch.h: Likewise.
14930 * arm-tdep.c (num_disassembly_options): Delete.
14931 (set_disassembly_style): Likewise.
14932 (arm_disassembler_options): New static variable.
14933 (set_disassembly_style_sfunc): Convert short style name into long
14934 option name. Call set_disassembler_options.
14935 (show_disassembly_style_sfunc): New function.
14936 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14937 set_gdbarch_verify_disassembler_options.
14938 (_initialize_arm_tdep): Delete regnames variable and update callers.
14939 (arm_disassembler_options): Initialize.
14940 (disasm_options): New variable.
14941 (num_disassembly_options): Rename from this...
14942 (num_disassembly_styles): ...to this. Compute by scanning through
14943 disasm_options.
14944 (valid_disassembly_styles): Initialize using disasm_options.
14945 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14946 set_arm_regname_option.
14947 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14948 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14949 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14950 set_gdbarch_verify_disassembler_options.
14951 * s390-tdep.c (s390_disassembler_options): New static variable.
14952 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14953 set_gdbarch_verify_disassembler_options.
14954
d538e36d
SM
149552017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14956
14957 * remote.c (remote_add_target_side_condition): Remove "struct"
14958 keyword from range-based for loop.
14959
83621223
SM
149602017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14961
14962 * remote.c (remote_add_target_side_condition): Use range-based
14963 for loop. Update comment.
14964
2123df0e
YQ
149652017-02-27 Yao Qi <yao.qi@linaro.org>
14966
14967 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14968
8e368124
AH
149692017-02-26 Alan Hayward <alan.hayward@arm.com>
14970
14971 * regcache.c (regcache_raw_update): New function.
14972 (regcache_raw_read): Move code to regcache_raw_update.
14973 * regcache.h (regcache_raw_update): New declaration.
14974 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14975
a49dd8dd
JK
149762017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14977
14978 * dwarf2read.c (create_debug_type_hash_table): Initialize
14979 header.signature and header.type_offset_in_tu.
14980
34e4bae9
PA
149812017-02-24 Pedro Alves <palves@redhat.com>
14982
14983 * symtab.c (make_file_symbol_completion_list_1): Use
14984 add_symtab_completions.
14985
b0e4b369
AH
149862017-02-24 Alan Hayward <alan.hayward@arm.com>
14987
14988 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14989
975c21ab
AH
149902017-02-24 Alan Hayward <alan.hayward@arm.com>
14991
14992 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14993 I386_MAX_REGISTER_SIZE.
14994 (i386_pseudo_register_write): Likewise.
14995 (i386_process_record): Likewise.
14996 * i387-tdep.c (i387_supply_xsave): Likewise.
14997 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14998 (store_register): Likewise.
14999
14bc53a8
PA
150002017-02-23 Pedro Alves <palves@redhat.com>
15001
15002 * ada-lang.c: Include "common/function-view.h".
15003 (ada_iterate_over_symbols): Adjust to use function_view as
15004 callback type.
15005 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15006 (ada_make_symbol_completion_list): Use a lambda.
15007 (ada_exc_search_name_matches): Delete.
15008 (name_matches_regex): New.
15009 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15010 * compile/compile-c-support.c: Include "common/function-view.h".
15011 (print_one_macro): Change prototype to accept a ui_file pointer.
15012 (write_macro_definitions): Use a lambda.
15013 * dwarf2read.c: Include "common/function-view.h".
15014 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15015 (dw2_expand_symtabs_matching): Adjust to use function_view as
15016 callback type.
15017 * language.h: Include "common/function-view.h".
15018 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15019 function_view as callback type.
15020 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15021 * linespec.c: Include "common/function-view.h".
15022 (collect_info::add_symbol): New method.
15023 (struct symbol_and_data_callback, iterate_inline_only, struct
15024 symbol_matcher_data, iterate_name_matcher): Delete.
15025 (iterate_over_all_matching_symtabs): Adjust to use function_view
15026 as callback type and lambdas.
15027 (iterate_over_file_blocks): Adjust to use function_view as
15028 callback type.
15029 (decode_compound_collector): Now a class with private fields.
15030 (decode_compound_collector::release_symbols): New method.
15031 (collect_one_symbol): Rename to...
15032 (decode_compound_collector::operator()): ... this and adjust.
15033 (lookup_prefix_sym): decode_compound_collector construction bits
15034 move to decode_compound_collector ctor. Pass the
15035 decode_compound_collector object directly as callback. Remove
15036 cleanups and use decode_compound_collector::release_symbols
15037 instead.
15038 (symtab_collector): Now a class with private fields.
15039 (symtab_collector::release_symtabs): New method.
15040 (add_symtabs_to_list): Rename to...
15041 (symtab_collector::operator()): ... this and adjust.
15042 (collect_symtabs_from_filename): symtab_collector construction
15043 bits move to symtab_collector ctor. Pass the symtab_collector
15044 object directly as callback. Remove cleanups and use
15045 symtab_collector::release_symtabs instead.
15046 (collect_symbols): Delete.
15047 (add_matching_symbols_to_info): Use lambdas.
15048 * macrocmd.c (print_macro_callback): Delete.
15049 (info_macro_command): Use a lambda.
15050 (info_macros_command): Pass print_macro_definition as callable
15051 directly.
15052 (print_one_macro): Remove 'ignore' parameter.
15053 (macro_list_command): Adjust.
15054 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15055 (macro_for_each_data::user_data): Delete field.
15056 (foreach_macro): Adjust to call the function_view.
15057 (macro_for_each): Adjust to use function_view as callback type.
15058 (foreach_macro_in_scope): Adjust to call the function_view.
15059 (macro_for_each_in_scope): Adjust to use function_view as callback
15060 type.
15061 * macrotab.h: Include "common/function-view.h".
15062 (macro_callback_fn): Declare a prototype instead of a pointer.
15063 Remove "user_data" parameter.
15064 (macro_for_each, macro_for_each_in_scope): Adjust to use
15065 function_view as callback type.
15066 * psymtab.c (partial_map_expand_apply)
15067 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15068 Adjust to use function_view as callback type and to return bool.
15069 (psym_expand_symtabs_matching): Adjust to use function_view as
15070 callback types.
15071 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15072 to use function_view as callback type and to return bool.
15073 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15074 callback types.
15075 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15076 as callback types.
15077 * symfile.h: Include "common/function-view.h".
15078 (expand_symtabs_file_matcher_ftype)
15079 (expand_symtabs_symbol_matcher_ftype)
15080 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15081 return bool.
15082 (quick_symbol_functions::map_symtabs_matching_filename)
15083 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15084 function_view as callback type and return bool.
15085 (expand_symtabs_matching): Adjust to use function_view as callback
15086 type.
15087 (maintenance_expand_name_matcher)
15088 (maintenance_expand_file_matcher): Delete.
15089 (maintenance_expand_symtabs): Use lambdas.
15090 * symtab.c (iterate_over_some_symtabs): Adjust to use
15091 function_view as callback types and return bool.
15092 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15093 of a cleanup.
15094 (lookup_symtab_callback): Delete.
15095 (lookup_symtab): Use a lambda.
15096 (iterate_over_symbols): Adjust to use function_view as callback
15097 type.
15098 (struct search_symbols_data, search_symbols_file_matches)
15099 (search_symbols_name_matches): Delete.
15100 (search_symbols): Use a pair of lambdas.
15101 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15102 (symtab_expansion_callback): Delete.
15103 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15104 * symtab.h: Include "common/function-view.h".
15105 (iterate_over_some_symtabs): Adjust to use function_view as
15106 callback type and return bool.
15107 (iterate_over_symtabs): Adjust to use function_view as callback
15108 type.
15109 (symbol_found_callback_ftype): Remove 'data' parameter and return
15110 bool.
15111 (iterate_over_symbols): Adjust to use function_view as callback
15112 type.
15113
07e253aa
PA
151142017-02-23 Pedro Alves <palves@redhat.com>
15115
15116 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15117 (%.o) <unittests/%.c>: New pattern.
15118 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15119 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15120 * common/function-view.h: New file.
15121 * unittests/function-view-selftests.c: New file.
15122 * configure: Regenerate.
15123
8eaf5320
SM
151242017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15125
15126 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15127 inferior_ptid.
15128 * go32-nat.c (go32_thread_alive): Likewise.
15129
38768751
YQ
151302017-02-23 Yao Qi <yao.qi@linaro.org>
15131
15132 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15133 delete.
15134
0a8beaba
YQ
151352017-02-23 Yao Qi <yao.qi@linaro.org>
15136
15137 * varobj.c (varobj_clear_saved_item): Use delete instead of
15138 xfree.
15139 (update_dynamic_varobj_children): Likewise.
15140
58fdfd2c
JK
151412017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15142
15143 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15144
1b90b139
SM
151452017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15146
15147 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15148 m_enum_value to 0 in default constructor.
15149
2039d74e
EBM
151502017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15151
15152 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15153 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15154 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15155 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15156 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15157 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15158 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15159 IS_STORE_CONDITIONAL_INSN.
15160
7814882a
JK
151612017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15162
15163 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15164
0ae60b63
JK
151652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15166
15167 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15168
0224619f
JK
151692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15170
15171 * dwarf2read.c (skip_one_die, read_attribute_value)
15172 (dwarf2_const_value_attr, dump_die_shallow)
15173 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15174 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15175
0af92d60
JK
151762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15177
15178 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15179 (dwarf_parse_macro_header): Accept DWARF version 5.
15180 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15181
216f72a1
JK
151822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15183
15184 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15185 DW_AT_GNU_*.
15186 * common/common-exceptions.h (enum errors): Likewise.
15187 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15188 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15189 (dwarf_expr_context::execute_stack_op): Likewise.
15190 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15191 Likewise.
15192 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15193 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15194 (show_entry_values_debug, call_site_to_target_addr)
15195 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15196 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15197 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15198 (value_of_dwarf_block_entry, indirect_pieced_value)
15199 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15200 (disassemble_dwarf_expression): Likewise.
15201 * dwarf2read.c (process_die, inherit_abstract_dies)
15202 (read_call_site_scope): Likewise.
15203 * gdbtypes.h (struct func_type, struct call_site_parameter)
15204 (struct call_site): Likewise.
15205 * stack.c (read_frame_arg): Likewise.
15206 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15207
43988095
JK
152082017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15209
15210 * defs.h (read_unsigned_leb128): New declaration.
15211 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15212 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15213 (dwarf2_find_location_expression): Call also
15214 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15215 * dwarf2loc.h (dwarf2_version): New declaration.
15216 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15217 rnglists.
15218 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15219 .debug_rnglists.
15220 (struct dwop_section_names): Add loclists_dwo.
15221 (dwop_section_names): Add .debug_loclists.dwo.
15222 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15223 (struct dwarf2_per_cu_data): Add dwarf_version.
15224 (struct dwo_sections): Add loclists.
15225 (struct attr_abbrev): Add implicit_const.
15226 (read_indirect_line_string): New declaration.
15227 (read_unsigned_leb128): Delete declaration.
15228 (rcuh_kind): New definition.
15229 (read_and_check_comp_unit_head): Change parameter
15230 is_debug_types_section to section_kind.
15231 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15232 (read_comp_unit_head): Change parameter abfd to section, add parameter
15233 section_kind. Handle DWARF-5.
15234 (error_check_comp_unit_head): Accept also DWARF version 5.
15235 (read_and_check_comp_unit_head): Change parameter
15236 is_debug_types_section to section_kind.
15237 (read_and_check_type_unit_head): Delete function.
15238 (read_abbrev_offset): Handle DWARF-5.
15239 (create_debug_type_hash_table): Add parameter section_kind. Process
15240 only DW_UT_type. Use signature and type_offset_in_tu from struct
15241 comp_unit_head.
15242 (create_debug_types_hash_table): Update create_debug_type_hash_table
15243 caller.
15244 (create_all_type_units): Call create_debug_type_hash_table.
15245 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15246 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15247 caller.
15248 (skip_one_die): Handle DW_FORM_implicit_const.
15249 (dwarf2_rnglists_process): New function.
15250 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15251 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15252 (read_attribute_value): Handle DW_FORM_implicit_const,
15253 DW_FORM_line_strp.
15254 (read_attribute): Handle DW_FORM_implicit_const.
15255 (read_indirect_string_at_offset_from): New function from
15256 read_indirect_string_at_offset.
15257 (read_indirect_string_at_offset): Call
15258 read_indirect_string_at_offset_from.
15259 (read_indirect_line_string_at_offset): New function.
15260 (read_indirect_string): New function comment.
15261 (read_indirect_line_string): New function.
15262 (read_unsigned_leb128): Make it global.
15263 (dwarf2_string_attr): Handle DWARF-5.
15264 (add_include_dir_stub, read_formatted_entries): New functions.
15265 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15266 Handle DWARF-5.
15267 (per_cu_header_read_in): Update read_comp_unit_head caller.
15268 (dwarf2_version): New function.
15269 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15270 rnglists.
15271 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15272 fields.
15273
22d2f3ab
JK
152742017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15275
15276 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15277
5f46c5a5
JK
152782017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15279
15280 * dwarf2read.c (dwarf2_ranges_process): New function from
15281 dwarf2_ranges_read.
15282 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15283 dwarf2_ranges_process.
15284
78d4d2c5
JK
152852017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15286
15287 * dwarf2read.c (create_debug_type_hash_table): New function from
15288 create_debug_types_hash_table.
15289 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15290 (create_all_type_units, open_and_init_dwo_file): Update
15291 create_debug_types_hash_table callers.
15292
1b076f25
SDJ
152932017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15294
15295 PR gdb/16188
15296 * fork-child.c (trace_start_error): Fix thinko. va_end should
15297 refer to 'ap', not 'args'.
15298
0db8980c
SDJ
152992017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15300 Pedro Alves <palves@redhat.com>
15301
15302 PR gdb/16188
15303 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15304 calls succeeded.
15305 * fork-child.c (trace_start_error): New function.
15306 (trace_start_error_with_name): Likewise.
15307 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15308 * inf-ptrace.c (inf_ptrace_me): Likewise.
15309 * inferior.h (trace_start_error): New prototype.
15310 (trace_start_error_with_name): Likewise.
15311
99e8a4f9
SDJ
153122017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15313
15314 PR gdb/21164
15315 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15316 NULL before using it.
15317 * symmisc.c (maintenance_print_symbols): Likewise.
15318 (maintenance_print_msymbols): Likewise.
15319
4e746bb6
TW
153202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15321
15322 * NEWS: Add record Python bindings entry.
15323
153242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15325
15326 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15327 py-record-full.o.
15328 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15329 * python/py-record-btrace.c, python/py-record-btrace.h,
15330 python/py-record-full.c, python/py-record-full.h: New file.
15331 * python/py-record.c: Add include for py-record-btrace.h and
15332 py-record-full.h.
15333 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15334 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15335 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15336 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15337 New definition.
15338 (gdbpy_initialize_btrace): New export.
15339 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15340
153412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15342
15343 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15344 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15345 * python/py-record.c: New file.
15346 * python/python-internal.h (gdbpy_start_recording,
15347 gdbpy_current_recording, gdpy_stop_recording,
15348 gdbpy_initialize_record): New export.
15349 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15350 (python_GdbMethods): Add gdbpy_start_recording,
15351 gdbpy_current_recording and gdbpy_stop_recording.
15352
153532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15354
15355 * record-btrace.c (record_btrace_record_method): New function.
15356 (init_record_btrace_ops): Initialize to_record_method.
15357 * record-full.c (record_full_record_method): New function.
15358 (init_record_full_ops, init_record_full_core_ops): Add
15359 record_full_record_method.
15360 * record.h (enum record_method): New enum.
15361 * target-debug.h (target_debug_print_enum_record_method: New define.
15362 * target-delegates.c: Regenerate.
15363 * target.c (target_record_method): New function.
15364 * target.h: Include record.h.
15365 (struct target_ops) <to_record_method>: New field.
15366 (target_record_method): New export.
15367
153682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15369
15370 * record.h (record_start, record_stop): New export.
15371 * record.c (record_start, record_stop): New function.
15372
153732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15374
15375 * btrace.c (btrace_fetch): Copy function call segments pointer
15376 into a vector.
15377 (btrace_clear): Clear the vector.
15378 (btrace_find_insn_by_number): Use binary search to find the correct
15379 function call segment.
15380 * btrace.h (brace_fun_p): New typedef.
15381 (struct btrace_thread_info) <functions>: New field.
15382
153832017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15384
15385 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15386 * btrace.c (btrace_decode_error): ... here. New function.
15387 * btrace.h (btrace_decode_error): New export.
15388
153892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15390
15391 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15392 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15393 btrace_find_insn_by_number): Remove special case for gaps.
15394 * btrace.h (btrace_insn_get_error): New export.
15395 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15396 * record-btrace.c (btrace_insn_history): Print number for gaps.
15397 (record_btrace_info, record_btrace_goto): Handle gaps.
15398
3f77c769
TT
153992017-02-14 Tom Tromey <tom@tromey.com>
15400
15401 PR python/13598:
15402 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15403 event.
15404 * python/py-evts.c (gdbpy_initialize_py_events): Add
15405 before_prompt registry.
15406 * python/py-events.h (events_object) <before_prompt>: New field.
15407
4c2c7ac6
MM
154082017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15409
15410 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15411
5cf30ebf
LM
154122017-02-13 Luis Machado <lgustavo@codesourcery.com>
15413
15414 * symfile (_initialize_symfile): Add usage text to the load command's
15415 help text.
15416
26a06916
SM
154172017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15418
15419 * utils.c (defaulted_query): Don't query on secondary UIs.
15420
0b145e37
TT
154212017-02-10 Tom Tromey <tom@tromey.com>
15422
15423 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15424
2d8365c4
TT
154252017-02-10 Tom Tromey <tom@tromey.com>
15426
15427 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15428 "cleanup" local.
15429 * python/py-type.c (typy_legacy_template_argument): Remove
15430 unnecessary "cleanup" local.
15431
2bb8f231
TT
154322017-02-10 Tom Tromey <tom@tromey.com>
15433
15434 * python/python.c (do_start_initialization): New function, from
15435 _initialize_python.
15436 (_initialize_python): Call do_start_initialization.
15437 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15438 goto.
15439
1bdfaf42
TT
154402017-02-10 Tom Tromey <tom@tromey.com>
15441
15442 * python/py-prettyprint.c (pretty_print_one_value): Use
15443 gdbpy_ref.
15444
88b6faea
TT
154452017-02-10 Tom Tromey <tom@tromey.com>
15446
15447 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15448 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15449 gdbpy_ref.
15450 * python/py-type.c (field_new): Use gdbpy_ref.
15451 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15452 gdbpy_ref.
15453 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15454 (py_free_pspace): Likewise.
15455 (pspace_to_pspace_object): Likewise.
15456 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15457 (py_free_objfile): Likewise.
15458 (objfile_to_objfile_object): Likewise.
15459 * python/py-inferior.c (delete_thread_object): Use
15460 gdbpy_ref.
15461 (infpy_read_memory): Likewise.
15462 (py_free_inferior): Likewise.
15463 * python/py-evtregistry.c (create_eventregistry_object): Use
15464 gdbpy_ref.
15465 * python/py-event.c (create_event_object): Use gdbpy_ref.
15466
7780f186
TT
154672017-02-10 Tom Tromey <tom@tromey.com>
15468
15469 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15470 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15471 used.
15472 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15473 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15474 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15475 python/py-framefilter.c, python/py-function.c,
15476 python/py-inferior.c, python/py-infevents.c,
15477 python/py-linetable.c, python/py-newobjfileevent.c,
15478 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15479 python/py-signalevent.c, python/py-stopevent.c,
15480 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15481 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15482 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15483 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15484
d4b0bb18
TT
154852017-02-10 Tom Tromey <tom@tromey.com>
15486
15487 * ui-out.h (ui_out_emit_type): New class.
15488 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15489 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15490 and ui_out_emit_tuple.
15491 (enumerate_locals): Likewise.
15492 (py_mi_print_variables, py_print_locals, py_print_args): Use
15493 ui_out_emit_list.
15494 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15495 ui_out_emit_list.
15496 * common/gdb_optional.h: New file.
15497
f67f945c
MG
154982017-02-10 Martin Galvan <martingalvan@sourceware.org>
15499
15500 * MAINTAINERS (Write After Approval): Update my e-mail address.
15501
18da0c51
MG
155022017-02-10 Martin Galvan <martingalvan@sourceware.org>
15503
15504 PR gdb/21122
15505 * breakpoint.c (_initialize_breakpoint): Update the help description
15506 of the 'commands' command to indicate that it takes a list argument.
15507
62c14536
SM
155082017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15509
15510 * interps.c (current_interp_set_logging): Remove "return".
15511
ff6fa247
GB
155122017-02-09 Gary Benson <gbenson@redhat.com>
15513
15514 * symtab.c (add_symtab_completions): Prevent NULL pointer
15515 dereference.
15516
a474bd8e
PA
155172017-02-08 Pedro Alves <palves@redhat.com>
15518
15519 * interps.c (interp::interp): Remove reference to quiet_p.
15520 (interp_set): Make static. Remove dead "Switching to" output
15521 code.
15522 (interp_quiet_p, interp_set_quiet): Delete.
15523 (interpreter_exec_cmd): Don't set the interpreter quiet.
15524 * interps.h (interp_quiet_p): Make static.
15525 (class interp) <quiet_p>: Remove field
15526
3d7b173c
JG
155272017-02-08 Jerome Guitton <guitton@adacore.com>
15528
604c4576
JG
15529 * cli/cli-decode.c (find_command_name_length): Make it extern.
15530 * cli/cli-decode.h (find_command_name_length): Declare.
15531 * cli/cli-script.c (command_name_equals, line_first_arg):
15532 New functions.
15533 (process_next_line): Use cli-decode to parse command names.
15534 (build_command_line): Make args a constant pointer.
15535
155362017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15537
3d7b173c
JG
15538 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15539 Remove case-insensitive search.
15540
1291063d
JM
155412017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15542
15543 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15544 at the end of the line. Avoids an ARI warning.
15545
20b477a7
LM
155462017-02-06 Luis Machado <lgustavo@codesourcery.com>
15547
15548 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15549 rdseed instructions.
15550 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15551
3f7b46f2
IR
155522017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15553
15554 PR tdep/20936
15555 Provide and use sparc32 and sparc64 target description XML files.
15556 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15557 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15558 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15559 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15560 * features/sparc/sparc32-solaris.xml: New file.
15561 * features/sparc/sparc64-solaris.xml: New file.
15562 * features/sparc/sparc32-solaris.c: Generated.
15563 * features/sparc/sparc64-solaris.c: Generated.
15564 * sparc-tdep.h: Account for differences in target descriptions.
15565 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15566 (sparc32_register_type): Use target provided registers.
15567 (validate_tdesc_registers): New function.
15568 (sparc32_gdbarch_init): Use tdesc_has_registers.
15569 Set pseudoregister functions.
15570 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15571 (sparc64_register_type): Use target provided registers.
15572 (sparc64_init_abi): Set pseudoregister functions.
15573
f0fd41c1
TT
155742017-02-03 Tom Tromey <tom@tromey.com>
15575
15576 PR rust/21097:
15577 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15578 with a single member.
15579
d6f9b0fb
PA
155802017-02-03 Pedro Alves <palves@redhat.com>
15581
15582 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15583 (cli_interp_base::~cli_interp_base): New.
15584 (cli_interp): New struct.
15585 (as_cli_interp): Cast the interp itself to cli_interp.
15586 (cli_interpreter_pre_command_loop): Rename to ...
15587 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15588 parameter.
15589 (cli_interpreter_init): Rename to ...
15590 (cli_interp::init): ... this. Remove 'self' parameter. Use
15591 boolean. Make extern.
15592 (cli_interpreter_resume): Rename to ...
15593 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15594 extern.
15595 (cli_interpreter_suspend): Rename to ...
15596 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15597 extern.
15598 (cli_interpreter_exec): Rename to ...
15599 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15600 extern.
15601 (cli_interpreter_supports_command_editing): Rename to ...
15602 (cli_interp_base::supports_command_editing): ... this. Remove
15603 'interp' parameter. Make extern.
15604 (cli_ui_out): Rename to ...
15605 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15606 Make extern.
15607 (cli_set_logging): Rename to ...
15608 (cli_interp_base::set_logging): ... this. Remove 'interp'
15609 parameter. Make extern.
15610 (cli_interp_procs): Delete.
15611 (cli_interp_factory): Adjust to use "new".
15612 * cli/cli-interp.h: Include "interps.h".
15613 (struct cli_interp_base): New struct.
15614 * interps.c (struct interp): Delete. Fields moved to interps.h.
15615 (interp_new): Delete.
15616 (interp::interp, interp::~interp): New.
15617 (interp_set): Use bool, and return void. Assume the interpreter
15618 has suspend, init and resume methods, and that the all return
15619 void.
15620 (set_top_level_interpreter): interp_set returns void.
15621 (interp_ui_out): Adapt.
15622 (current_interp_set_logging): Adapt.
15623 (interp_data): Delete.
15624 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15625 (interp_exec): Adapt.
15626 (top_level_interpreter_data): Delete.
15627 * interps.h (interp_init_ftype, interp_resume_ftype)
15628 (interp_suspend_ftype, interp_exec_ftype)
15629 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15630 (class interp): New.
15631 (interp_new): Delete.
15632 (interp_set): Now returns void. Use bool.
15633 (interp_data, top_level_interpreter_data): Delete.
15634 * mi/mi-common.h: Include interps.h.
15635 (class mi_interp): Inherit from interp. Define a ctor. Declare
15636 init, resume, suspect, exec, interp_ui_out, set_logging and
15637 pre_command_loop methods.
15638 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15639 (mi_interpreter_init): Rename to ...
15640 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15641 bool, return void and make extern. Adjust.
15642 (mi_interpreter_resume): ... Rename to ...
15643 (mi_interp::resume): ... this. Remove the 'data' parameter,
15644 return void and make extern. Adjust.
15645 (mi_interpreter_suspend): ... Rename to ...
15646 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15647 return void and make extern. Adjust.
15648 (mi_interpreter_exec): ... Rename to ...
15649 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15650 extern. Adjust.
15651 (mi_interpreter_pre_command_loop): ... Rename to ...
15652 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15653 parameter and make extern.
15654 (mi_on_normal_stop_1): Adjust.
15655 (mi_ui_out): Rename to ...
15656 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15657 parameter and make extern. Adjust.
15658 (mi_set_logging): Rename to ...
15659 (mi_interp::set_logging): ... this. Remove the 'interp'
15660 parameter and make extern. Adjust.
15661 (mi_interp_procs): Delete.
15662 (mi_interp_factory): Adjust to use 'new'.
15663 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15664 (mi_print_exception, mi_execute_command, mi_load_progress):
15665 Adjust.
15666 * tui/tui-interp.c (tui_interp): New class.
15667 (as_tui_interp): Return a tui_interp pointer.
15668 (tui_on_normal_stop, tui_on_signal_received)
15669 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15670 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15671 to use interp::interp_ui_out.
15672 (tui_init): Rename to ...
15673 (tui_interp::init): ... this. Remove the 'self' parameter, use
15674 bool, return void and make extern. Adjust.
15675 (tui_resume): Rename to ...
15676 (tui_interp::resume): ... this. Remove the 'data' parameter,
15677 return void and make extern. Adjust.
15678 (tui_suspend): Rename to ...
15679 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15680 return void and make extern. Adjust.
15681 (tui_ui_out): Rename to ...
15682 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15683 parameter, and make extern. Adjust.
15684 (tui_exec): Rename to ...
15685 (tui_interp::exec): ... this. Remove the 'data' parameter and
15686 make extern.
15687 (tui_interp_procs): Delete.
15688 (tui_interp_factory): Use "new".
15689
65c40c95
TT
156902017-02-02 Tom Tromey <tom@tromey.com>
15691
15692 * rust-exp.y (ends_raw_string, space_then_number)
15693 (rust_identifier_start_p): Return bool.
15694 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15695 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15696 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15697 (rust_chartype_p): Return bool.
15698 (val_print_struct, rust_print_struct_def, rust_print_type):
15699 Update.
15700 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15701 Return bool.
15702
b50f188d
TT
157032017-02-02 Tom Tromey <tom@tromey.com>
15704
15705 * rust-lang.c: Reindent.
15706
03c85b11
TT
157072017-02-02 Tom Tromey <tom@tromey.com>
15708
15709 * rust-lang.h (rust_crate_for_block): Update.
15710 * rust-lang.c (rust_crate_for_block): Return std::string.
15711 (rust_get_disr_info): Use std:;string, not
15712 gdb::unique_xmalloc_ptr.
15713 * rust-exp.y (crate_name): Update.
15714
9b6da501
PA
157152017-02-02 Pedro Alves <palves@redhat.com>
15716
15717 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15718 field out of gdb_disassembler_test and make it static.
15719
ec4cb20b
PA
157202017-02-02 Pedro Alves <palves@redhat.com>
15721
15722 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15723 mi1_interp and mi_interp fields.
15724
5be5dbf0
PA
157252017-02-02 Pedro Alves <palves@redhat.com>
15726
616268b6
PA
15727 * cli/cli-interp.c (struct saved_output_files, saved_output):
15728 Moved from cli/cli-logging.c.
15729 (cli_set_logging): New function.
15730 (cli_interp_procs): Install cli_set_logging.
15731 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15732 Declare.
15733 * cli/cli-logging.c (struct saved_output_files, saved_output):
15734 Moved to cli/cli-interp.c.
15735 (pop_output_files): Don't save outputs here.
15736 (make_logging_output): New function.
15737 (handle_redirections): Don't build tee nor save previous outputs
15738 here.
15739 * interps.c (current_interp_set_logging): Change prototype.
15740 Assume there's always a set_logging_proc method installed.
15741 * interps.h (interp_set_logging_ftype): Change prototype.
15742 (current_interp_set_logging): Change prototype and adjust comment.
15743 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15744 use make_logging_output.
15745 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
157462017-02-02 Pedro Alves <palves@redhat.com>
15747
5be5dbf0
PA
15748 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15749 from ...
15750 (set_logging_overwrite): ... here.
15751 (logging_no_redirect_file): Delete.
15752 (set_logging_redirect): Don't handle redirection on the fly.
15753 Instead warn that "logging off" / "logging on" is necessary.
15754 (pop_output_files): Delete references to logging_no_redirect_file.
15755 (show_logging_command): Always speak in terms of what will happen
15756 once logging is reenabled.
15757
c99cc448
PA
157582017-02-02 Pedro Alves <palves@redhat.com>
15759
15760 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15761
8b172ce7
PA
157622017-02-02 Pedro Alves <palves@redhat.com>
15763
15764 * disasm.c (gdb_pretty_print_insn): Rename to ...
15765 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15766 Remove gdbarch parameter. Adapt to clear the object's buffers
15767 instead of allocating new buffers, and to print using the object's
15768 gdb_disassembler instead of calling gdb_print_insn.
15769 (dump_insns): Use gdb_pretty_print_disassembler.
15770 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15771 (gdb_pretty_print_disassembler): New class.
15772 * record-btrace.c (btrace_insn_history): Use
15773 gdb_pretty_print_disassembler.
15774
d7e74731
PA
157752017-02-02 Pedro Alves <palves@redhat.com>
15776
15777 * ada-lang.c (type_as_string): Use string_file.
15778 * ada-valprint.c (ada_print_floating): Use string_file.
15779 * ada-varobj.c (ada_varobj_scalar_image)
15780 (ada_varobj_get_value_image): Use string_file.
15781 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15782 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15783 * breakpoint.c (update_inserted_breakpoint_locations)
15784 (insert_breakpoint_locations, reattach_breakpoints)
15785 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15786 (print_it_watchpoint): Use string_file.
15787 (save_breakpoints): Use stdio_file.
15788 * c-exp.y (oper): Use string_file.
15789 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15790 tee_file.
15791 (pop_output_files): Use delete.
15792 (handle_redirections): Use stdio_file and tee_file.
15793 * cli/cli-setshow.c (do_show_command): Use string_file.
15794 * compile/compile-c-support.c (c_compute_program): Use
15795 string_file.
15796 * compile/compile-c-symbols.c (generate_vla_size): Take a
15797 'string_file &' instead of a 'ui_file *'.
15798 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15799 of a 'ui_file *'. Use string_file.
15800 (generate_c_for_variable_locations): Take a 'string_file &'
15801 instead of a 'ui_file *'.
15802 * compile/compile-internal.h (generate_c_for_for_one_variable):
15803 Take a 'string_file &' instead of a 'ui_file *'.
15804 * compile/compile-loc2c.c (push, pushf, unary, binary)
15805 (print_label, pushf_register_address, pushf_register)
15806 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15807 'ui_file *'. Adjust.
15808 * compile/compile.c (compile_to_object): Use string_file.
15809 * compile/compile.h (compile_dwarf_expr_to_c)
15810 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15811 'ui_file *'.
15812 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15813 (replace_typedefs_qualified_name): Use string_file and
15814 obstack_copy0.
15815 * disasm.c (gdb_pretty_print_insn): Use string_file.
15816 (gdb_disassembly): Adjust reference the null_stream global.
15817 (do_ui_file_delete): Delete.
15818 (gdb_insn_length): Use null_stream.
15819 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15820 * dwarf2loc.c (dwarf2_compile_property_to_c)
15821 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15822 'string_file &' instead of a 'ui_file *'.
15823 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15824 * dwarf2read.c (do_ui_file_peek_last): Delete.
15825 (dwarf2_compute_name): Use string_file.
15826 * event-top.c (gdb_setup_readline): Use stdio_file.
15827 * gdbarch.sh (verify_gdbarch): Use string_file.
15828 * gdbtypes.c (safe_parse_type): Use null_stream.
15829 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15830 string_file.
15831 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15832 'string_file *' instead of a 'ui_file *'.
15833 (gdbscm_arch_disassemble): Use string_file.
15834 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15835 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15836 inherits from ui_file.
15837 (ioscm_file_port_delete, ioscm_file_port_rewind)
15838 (ioscm_file_port_put): Delete.
15839 (ioscm_file_port_write): Rename to ...
15840 (ioscm_file_port::write): ... this. Remove file_port_magic
15841 checks.
15842 (ioscm_file_port_new): Delete.
15843 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15844 ui_file_up.
15845 * guile/scm-type.c (tyscm_type_name): Use string_file.
15846 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15847 Use string_file.
15848 * infcmd.c (print_return_value_1): Use string_file.
15849 * infrun.c (print_target_wait_results): Use string_file.
15850 * language.c (add_language): Use string_file.
15851 * location.c (explicit_to_string_internal): Use string_file.
15852 * main.c (captured_main_1): Use null_file.
15853 * maint.c (maintenance_print_architecture): Use stdio_file.
15854 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15855 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15856 event_channel>: Change type to mi_console_file pointer.
15857 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15858 (mi_console_file_delete): Delete.
15859 (struct mi_console_file): Delete.
15860 (mi_console_file_magic): Delete.
15861 (mi_console_file_new): Delete.
15862 (mi_console_file::mi_console_file): New.
15863 (mi_console_file_delete): Delete.
15864 (mi_console_file_fputs): Delete.
15865 (mi_console_file::write): New.
15866 (mi_console_raw_packet): Delete.
15867 (mi_console_file::flush): New.
15868 (mi_console_file_flush): Delete.
15869 (mi_console_set_raw): Rename to ...
15870 (mi_console_file::set_raw): ... this.
15871 * mi/mi-console.h (class mi_console_file): New class.
15872 (mi_console_file_new, mi_console_set_raw): Delete.
15873 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15874 (mi_set_logging): Use delete and tee_file. Adjust.
15875 * mi/mi-main.c (output_register): Use string_file.
15876 (mi_cmd_data_evaluate_expression): Use string_file.
15877 (mi_cmd_data_read_memory): Use string_file.
15878 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15879 * mi/mi-out.c (mi_ui_out::main_stream): New.
15880 (mi_ui_out::rewind): Use main_stream and
15881 string_file.
15882 (mi_ui_out::put): Use main_stream and string_file.
15883 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15884 Allocate a 'string_file' instead.
15885 (mi_out_new): Don't allocate a mem_fileopen stream here.
15886 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15887 (mi_ui_out::main_stream): Declare method.
15888 * printcmd.c (eval_command): Use string_file.
15889 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15890 * python/py-arch.c (archpy_disassemble): Use string_file.
15891 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15892 * python/py-frame.c (frapy_str): Use string_file.
15893 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15894 Use string_file.
15895 * python/py-type.c (typy_str): Use string_file.
15896 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15897 * python/py-value.c (valpy_str): Use string_file.
15898 * record-btrace.c (btrace_insn_history): Use string_file.
15899 * regcache.c (regcache_print): Use stdio_file.
15900 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15901 * remote.c (escape_buffer): Use string_file.
15902 * rust-lang.c (rust_get_disr_info): Use string_file.
15903 * serial.c (serial_open_ops_1): Use stdio_file.
15904 (do_serial_close): Use delete.
15905 * stack.c (print_frame_arg): Use string_file.
15906 (print_frame_args): Remove local mem_fileopen stream, not used.
15907 (print_frame): Use string_file.
15908 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15909 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15910 Take a 'string_file *' instead of a 'ui_file *'.
15911 * top.c (new_ui): Use stdio_file and stderr_file.
15912 (free_ui): Use delete.
15913 (execute_command_to_string): Use string_file.
15914 (quit_confirm): Use string_file.
15915 * tracepoint.c (collection_list::append_exp): Use string_file.
15916 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15917 * tui/tui-file.c: Don't include "ui-file.h".
15918 (enum streamtype, struct tui_stream): Delete.
15919 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15920 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15921 (tui_file::tui_file): New method.
15922 (tui_file_fputs): Delete.
15923 (tui_file_get_strbuf): Delete.
15924 (tui_file::puts): New method.
15925 (tui_file_adjust_strbuf): Delete.
15926 (tui_file_flush): Delete.
15927 (tui_file::flush): New method.
15928 * tui/tui-file.h: Tweak intro comment.
15929 Include ui-file.h.
15930 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15931 (tui_file_adjust_strbuf): Delete declarations.
15932 (class tui_file): New class.
15933 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15934 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15935 (tui_register_format): Use string_stream.
15936 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15937 (tui_get_function_from_frame): Use string_file.
15938 * typeprint.c (type_to_string): Use string_file.
15939 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15940 (null_stream): New global.
15941 (ui_file_delete): Delete.
15942 (ui_file::ui_file): New.
15943 (null_file_isatty): Delete.
15944 (ui_file::~ui_file): New.
15945 (null_file_rewind): Delete.
15946 (ui_file::printf): New.
15947 (null_file_put): Delete.
15948 (null_file_flush): Delete.
15949 (ui_file::putstr): New.
15950 (null_file_write): Delete.
15951 (ui_file::putstrn): New.
15952 (null_file_read): Delete.
15953 (ui_file::putc): New.
15954 (null_file_fputs): Delete.
15955 (null_file_write_async_safe): Delete.
15956 (ui_file::vprintf): New.
15957 (null_file_delete): Delete.
15958 (null_file::write): New.
15959 (null_file_fseek): Delete.
15960 (null_file::puts): New.
15961 (ui_file_data): Delete.
15962 (null_file::write_async_safe): New.
15963 (gdb_flush, ui_file_isatty): Adjust.
15964 (ui_file_put, ui_file_rewind): Delete.
15965 (ui_file_write): Adjust.
15966 (ui_file_write_for_put): Delete.
15967 (ui_file_write_async_safe, ui_file_read): Adjust.
15968 (ui_file_fseek): Delete.
15969 (fputs_unfiltered): Adjust.
15970 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15971 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15972 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15973 (set_ui_file_data): Delete.
15974 (string_file::~string_file, string_file::write)
15975 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15976 (do_ui_file_as_string, ui_file_as_string): Delete.
15977 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15978 (struct mem_file): Delete.
15979 (mem_file_new): Delete.
15980 (stdio_file::stdio_file): New.
15981 (mem_file_delete): Delete.
15982 (stdio_file::stdio_file): New.
15983 (mem_fileopen): Delete.
15984 (stdio_file::~stdio_file): New.
15985 (mem_file_rewind): Delete.
15986 (stdio_file::set_stream): New.
15987 (mem_file_put): Delete.
15988 (stdio_file::open): New.
15989 (mem_file_write): Delete.
15990 (stdio_file_magic, struct stdio_file): Delete.
15991 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15992 (stdio_file::flush): New.
15993 (stdio_file_read): Rename to ...
15994 (stdio_file::read): ... this. Adjust.
15995 (stdio_file_write): Rename to ...
15996 (stdio_file::write): ... this. Adjust.
15997 (stdio_file_write_async_safe): Rename to ...
15998 (stdio_file::write_async_safe) ... this. Adjust.
15999 (stdio_file_fputs): Rename to ...
16000 (stdio_file::puts) ... this. Adjust.
16001 (stdio_file_isatty): Delete.
16002 (stdio_file_fseek): Delete.
16003 (stdio_file::isatty): New.
16004 (stderr_file_write): Rename to ...
16005 (stderr_file::write) ... this. Adjust.
16006 (stderr_file_fputs): Rename to ...
16007 (stderr_file::puts) ... this. Adjust.
16008 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16009 (stderr_file::stderr_file): New.
16010 (tee_file_magic): Delete.
16011 (struct tee_file): Delete.
16012 (tee_file::tee_file): New.
16013 (tee_file_new): Delete.
16014 (tee_file::~tee_file): New.
16015 (tee_file_delete): Delete.
16016 (tee_file_flush): Rename to ...
16017 (tee_file::flush): ... this. Adjust.
16018 (tee_file_write): Rename to ...
16019 (tee_file::write): ... this. Adjust.
16020 (tee_file::write_async_safe): New.
16021 (tee_file_fputs): Rename to ...
16022 (tee_file::puts): ... this. Adjust.
16023 (tee_file_isatty): Rename to ...
16024 (tee_file::isatty): ... this. Adjust.
16025 * ui-file.h (struct obstack, struct ui_file): Don't
16026 forward-declare.
16027 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16028 (ui_file_write_ftype)
16029 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16030 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16031 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16032 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16033 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16034 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16035 (set_ui_file_fseek): Delete.
16036 (ui_file_data, ui_file_delete, ui_file_rewind)
16037 (struct ui_file): New.
16038 (ui_file_up): New.
16039 (class null_file): New.
16040 (null_stream): Declare.
16041 (ui_file_write_for_put, ui_file_put): Delete.
16042 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16043 Delete.
16044 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16045 (gdb_fopen, tee_file_new): Delete.
16046 (struct string_file): New.
16047 (struct stdio_file): New.
16048 (stdio_file_up): New.
16049 (struct stderr_file): New.
16050 (class tee_file): New.
16051 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16052 of a 'ui_file *'. Adjust.
16053 * ui-out.h (class ui_out) <field_stream>: Likewise.
16054 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16055 (null_stream): Delete.
16056 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16057 Adjust.
16058 * utils.h (struct ui_file): Delete forward declaration..
16059 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16060 (error_stream): Take a 'string_file &' instead of a
16061 'ui_file *'.
16062 * varobj.c (varobj_value_get_print_value): Use string_file.
16063 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16064 * gdbarch.c: Regenerate.
16065
187808b0
PA
160662017-02-02 Pedro Alves <palves@redhat.com>
16067
16068 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16069 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16070 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16071 Adjust to call gdb_print_insn instead of
16072 gdb_disassembler::print_insn.
16073 (dump_insns, do_mixed_source_and_assembly_deprecated)
16074 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16075 'gdbarch' parameter. Remove gdb_disassembler parameter.
16076 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16077 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16078 declaration.
16079 (gdb_pretty_print_insn): Re-add declaration.
16080 * record-btrace.c (btrace_insn_history): Don't allocate a
16081 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16082
7a8eb317
SM
160832017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16084
16085 * disasm.h (gdb_disassembly): Remove file_string parameter.
16086 * disasm.c (gdb_disassembly): Likewise.
16087 * cli/cli-cmds.c (print_disassembly): Adapt.
16088 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16089 * stack.c (do_gdb_disassembly): Likewise.
16090
7346ef59
AA
160912017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16092
16093 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16094 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16095 targets. And if the implicit value is longer than needed, extract
16096 the first bytes instead of the "least significant" ones.
16097
cd4007e4
MM
160982017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16099
16100 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16101 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16102 (btrace_fetch): Assert can_access_registers_ptid.
16103 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16104 validate_registers_access.
16105
cf77c34e
MM
161062017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16107
16108 * gdbthread.h (can_access_registers_ptid): New.
16109 * thread.c (can_access_registers_ptid): New.
16110
be85ce7d
PA
161112017-02-01 Pedro Alves <palves@redhat.com>
16112
16113 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16114
29b0b251
PA
161152017-01-31 Pedro Alves <palves@redhat.com>
16116
16117 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16118 Fix typos.
16119
289b5b24
PA
161202017-01-31 Pedro Alves <palves@redhat.com>
16121
16122 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16123 not used.
16124
b47413b4
PA
161252017-01-31 Pedro Alves <palves@redhat.com>
16126
16127 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16128
60adb36c
PA
161292017-01-31 Pedro Alves <palves@redhat.com>
16130
16131 * common/scoped_restore.h
16132 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16133 change the value's parameter type to T2.
16134 (make_scoped_restore): Likewise.
16135
2735833d
WT
161362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16137 Richard Henderson <rth@redhat.com>
16138
16139 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16140 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16141 GS_BASE for older kernels.
16142 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16143 GS_BASE for older kernels.
16144 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16145 and GS_BASE to the offset table.
16146 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16147 system register group.
16148 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16149 for older kernels.
16150 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16151 amd64 ABI.
16152 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16153 AMD64_GSBASE_REGNUM.
16154 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16155 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16156 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16157 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16158 i386/64bit-segments.xml in those rules.
16159 * features/i386/64bit-segments.xml: New file.
16160 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16161 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16162 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16163 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16164 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16165 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16166 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16167 * features/i386/amd64-avx-linux.c: Regenerated.
16168 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16169 * features/i386/amd64-avx-mpx.c: Regenerated.
16170 * features/i386/amd64-avx512-linux.c: Regenerated.
16171 * features/i386/amd64-linux.c: Regenerated.
16172 * features/i386/amd64-mpx-linux.c: Regenerated.
16173 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16174 * features/i386/i386-avx-mpx.c: Regenerated.
16175 * features/i386/x32-avx-linux.c: Regenerated.
16176 * features/i386/x32-avx512-linux.c: Regenerated.
16177 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16178 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16179 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16180 * regformats/i386/amd64-linux.dat: Regenerated.
16181 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16182 * regformats/i386/x32-avx-linux.dat: Regenerated.
16183 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16184 * regformats/i386/x32-linux.dat: Regenerated.
16185
8884e97e
WT
161862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16187
16188 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16189 Set to AMD64_NUM_REGS.
16190
7005d26a
WT
161912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16192
16193 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16194 that checks validity of a register number.
16195
4bd2e1b2
KC
161962017-01-27 Kees Cook <keescook@google.com>
16197
16198 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16199 fetch_fpregs if target has fpa registers.
16200 (arm_linux_store_inferior_registers): Call store_fpregs if target
16201 has fpa registers.
16202
7cf1de6c
AA
162032017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16204
16205 * cris-tdep.c (cris_gdbarch_init): Remove check for
16206 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16207
874a1c8c
AT
162082017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16209
16210 * corelow.c (get_core_register_section): Check for regset
16211 existence before checking for REGSET_VARIABLE_SIZE.
16212
d8b49cf0
YQ
162132017-01-26 Yao Qi <yao.qi@linaro.org>
16214 Pedro Alves <palves@redhat.com>
16215
16216 PR gdb/20939
16217 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16218 call memory_error, save memaddr instead.
16219 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16220 negative, cal memory_error.
16221 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16222
658ca58c
YQ
162232017-01-26 Yao Qi <yao.qi@linaro.org>
16224
16225 * disasm-selftests.c (memory_error_test): New function.
16226 (_initialize_disasm_selftests): Register memory_error_test.
16227
79843d45
YQ
162282017-01-26 Yao Qi <yao.qi@linaro.org>
16229
16230 * Makefile.in (SFILES): Add disasm-selftests.c and
16231 selftest-arch.c.
16232 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16233 * disasm-selftests.c: New file.
16234 * selftest-arch.c: New file.
16235 * selftest-arch.h: New file.
16236
8cafda32
YQ
162372017-01-26 Yao Qi <yao.qi@linaro.org>
16238
16239 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16240 to bfd_arch_mep. Don't return 0 if section is not
16241 found. Call print_insn_mep.
16242
e47ad6c0
YQ
162432017-01-26 Pedro Alves <palves@redhat.com>
16244 Yao Qi <yao.qi@linaro.org>
16245
16246 * arm-tdep.c: Include "disasm.h".
16247 (gdb_print_insn_arm): Update code to get gdbarch.
16248 * disasm.c (dis_asm_read_memory): Change it to
16249 gdb_disassembler::dis_asm_read_memory.
16250 (dis_asm_memory_error): Likewise.
16251 (dis_asm_print_address): Likewise.
16252 (gdb_pretty_print_insn): Change it to
16253 gdb_disassembler::pretty_print_insn.
16254 (dump_insns): Add one argument gdb_disassemlber. All
16255 callers updated.
16256 (do_mixed_source_and_assembly_deprecated): Likewise.
16257 (do_mixed_source_and_assembly): Likewise.
16258 (do_assembly_only): Likewise.
16259 (gdb_disassembler::gdb_disassembler): New.
16260 (gdb_disassembler::print_insn): New.
16261 * disasm.h (class gdb_disassembler): New.
16262 (gdb_pretty_print_insn): Remove declaration.
16263 (gdb_disassemble_info): Likewise.
16264 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16265 (gdbscm_disasm_read_memory_worker): Update.
16266 (gdbscm_disasm_read_memory): Update.
16267 (gdbscm_disasm_memory_error): Remove.
16268 (gdbscm_disasm_print_address): Remove.
16269 (gdbscm_disassembler::gdbscm_disassembler): New.
16270 (gdbscm_print_insn_from_port): Update.
16271 * mips-tdep.c: Include disasm.h.
16272 (gdb_print_insn_mips): Update code to get gdbarch.
16273 * record-btrace.c (btrace_insn_history): Update.
16274 * spu-tdep.c: Include disasm.h.
16275 (struct spu_dis_asm_data): Remove.
16276 (struct spu_dis_asm_info): New.
16277 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16278 SPU id.
16279 (gdb_print_insn_spu): Cast disassemble_info to
16280 spu_dis_asm_info.
16281
80d75874
YQ
162822017-01-26 Yao Qi <yao.qi@linaro.org>
16283
16284 * disasm.c (do_ui_file_delete): Delete.
16285 (gdb_insn_length): Move code creating stream to ...
16286 * utils.c (null_stream): ... here. New function.
16287 * utils.h (null_stream): Declare.
16288
60685cd0
SM
162892017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16290
16291 * python/py-inferior.c (find_thread_object): Return directly
16292 from the loop. Remove "found" variable.
16293
eb1cdb62
JB
162942017-01-21 Joel Brobecker <brobecker@adacore.com>
16295
16296 GDB 7.12.1 released.
16297
b1ce6568
SM
162982017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16299
16300 * python/py-function.c (fnpy_call): Reorder declarations to have
16301 the gdbpy_enter object declared first.
16302 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16303
6f8b0407
SM
163042017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16305
fec93fb1 16306 PR python/21068
6f8b0407
SM
16307 * python/python-internal.h (PyMem_RawMalloc): Define for
16308 Python < 3.4.
16309 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16310 PyMem_RawMalloc instead of PyMem_Malloc.
16311
78cbbba8
LM
163122017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16313 Luis Machado <lgustavo@codesourcery.com>
16314
16315 * NEWS (New commands): Mention flash-erase.
16316 (New MI commands): Mention target-flash-erase.
16317 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16318 command.
16319 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16320 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16321 * target.c (flash_erase_command): New function.
16322 (initialize_targets): Add new flash-erase command.
16323 * target.h (flash_erase_command): New declaration.
16324
2132fe85
JB
163252017-01-20 Joel Brobecker <brobecker@adacore.com>
16326
16327 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16328 HAVE_SYS_PROCFS_H is defined.
16329
d1dff226
AH
163302017-01-18 Alan Hayward <alan.hayward@arm.com>
16331
16332 * remote.c (struct cached_reg): Change data into a pointer.
16333 * (stop_reply_dtr): Free data pointers before deleting vector.
16334 (process_stop_reply): Likewise.
16335 (remote_parse_stop_reply): Allocate space for data
16336
9890e433
AH
163372017-01-18 Alan Hayward <alan.hayward@arm.com>
16338
16339 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16340 MAX_REGISTER_SIZE.
16341 (amd64_pseudo_register_read_value): Likewise.
16342 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16343 (store_register_using_P): Likewise.
16344 * regcache.c (regcache_xfer_part): Likewise.
16345
7a36499a
IR
163462017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16347
16348 Split real and pseudo registers.
16349 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16350 (sparc32_pseudo_regnum): New enum.
16351 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16352 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16353 (SPARC32_CP0_REGISTERS): New macro.
16354 (sparc32_pseudo_register_name): New function.
16355 (sparc32_register_name): Use sparc32_pseudo_register_name.
16356 (sparc32_pseudo_register_type): New function.
16357 (sparc32_register_type): Use sparc32_pseudo_register_type.
16358 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16359 pseudo register numbers.
16360 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16361 (SPARC64_CP0_REGISTERS): New macro.
16362 (sparc64_pseudo_register_name): New function.
16363 (sparc64_register_name): Use sparc64_pseudo_register_name.
16364 (sparc64_pseudo_register_type): New function.
16365 (sparc64_register_type): Use sparc64_pseudo_register_type.
16366 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16367 pseudo register numbers.
16368 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16369 sparc64_store_arguments): Handle pseudo register numbers.
16370
6f8976bf
YQ
163712017-01-13 Yao Qi <yao.qi@linaro.org>
16372
16373 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16374 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16375 output.
16376 (getpkt_or_notif_sane_1): Likewise.
16377
e4241ace
YQ
163782017-01-13 Yao Qi <yao.qi@linaro.org>
16379
16380 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16381 of CC. Pass "-x c++-header" instead of "-x c".
16382
3015c064
SM
163832017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16384
16385 * remote.c (remote_can_async_p): Update comment.
16386
fde1b17d
SM
163872017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16388
16389 * linux-nat.c (linux_nat_can_async_p): Update comment.
16390
ca1ca08b
SM
163912017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16392
16393 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16394
4ad2da73
SM
163952017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16396
16397 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16398
c8b23b3f
TT
163992017-01-10 Tom Tromey <tom@tromey.com>
16400
16401 * python/py-type.c (typy_legacy_template_argument): Update.
16402 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16403 ~demangle_parse_info): Declare new members.
16404 (cp_demangled_name_to_comp): Return unique_ptr.
16405 (cp_demangled_name_parse_free)
16406 (make_cleanup_cp_demangled_name_parse_free)
16407 (cp_new_demangle_parse_info): Remove.
16408 * cp-support.c (do_demangled_name_parse_free_cleanup)
16409 (make_cleanup_cp_demangled_name_parse_free): Remove.
16410 (inspect_type, cp_canonicalize_string_full)
16411 (cp_canonicalize_string): Update.
16412 (mangled_name_to_comp): Change return type.
16413 (cp_class_name_from_physname, method_name_from_physname)
16414 (cp_func_name, cp_remove_params): Update.
16415 * cp-name-parser.y (demangle_parse_info): New constructor, from
16416 cp_new_demangle_parse_info.
16417 (~demangle_parse_info): New destructor, from
16418 cp_demangled_name_parse_free.
16419 (cp_merge_demangle_parse_infos): Update.
16420 (cp_demangled_name_to_comp): Change return type.
16421
1ac32117
TT
164222017-01-10 Tom Tromey <tom@tromey.com>
16423
16424 * top.c (prevent_dont_repeat): Change return type.
16425 * python/python.c (execute_gdb_command): Use std::string.
16426 Update.
16427 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16428 * command.h (prevent_dont_repeat): Change return type.
16429 * breakpoint.c (bpstat_do_actions_1): Update.
16430
0cf08227
TT
164312017-01-10 Tom Tromey <tom@tromey.com>
16432
16433 * value.h (scoped_value_mark::~scoped_value_mark): Call
16434 free_to_mark.
16435 (scoped_value_mark::free_to_mark): New method.
16436 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16437 scoped_value_mark.
16438
eb115069
TT
164392017-01-10 Tom Tromey <tom@tromey.com>
16440
16441 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16442 (valpy_reference_value, valpy_const_value, valpy_get_address)
16443 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16444 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16445 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16446 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16447 scoped_value_mark.
16448 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16449 * value.h (scoped_value_mark): New class.
16450
906768f9
TT
164512017-01-10 Tom Tromey <tom@tromey.com>
16452
16453 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16454 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16455 * psymtab.c (discard_psymtabs_upto): Remove.
16456 (make_cleanup_discard_psymtabs): Remove.
16457 (struct psymtab_state): Remove.
16458
bef155c3
TT
164592017-01-10 Tom Tromey <tom@tromey.com>
16460
16461 * record-full.c (record_full_save_cleanups): Remove.
16462 (record_full_save): Use gdb::unlinker.
16463 * gcore.c (do_bfd_delete_cleanup): Remove.
16464 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16465 cleanups.
16466 * dwarf2read.c (unlink_if_set): Remove.
16467 (write_psymtabs_to_index): Use gdb::unlinker.
16468 * common/gdb_unlinker.h: New file.
16469
192b62ce
TT
164702017-01-10 Tom Tromey <tom@tromey.com>
16471
16472 * windows-tdep.c (windows_xfer_shared_library): Update.
16473 * windows-nat.c (windows_make_so): Update.
16474 * utils.h (make_cleanup_bfd_unref): Remove.
16475 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16476 * symfile.h (symfile_bfd_open)
16477 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16478 * symfile.c (read_symbols, symbol_file_add)
16479 (separate_debug_file_exists): Update.
16480 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16481 (generic_load, reread_symbols): Update.
16482 * symfile-mem.c (symbol_file_add_from_memory): Update.
16483 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16484 (spu_symbol_file_add_from_memory): Update.
16485 * solist.h (struct target_so_ops) <bfd_open>: Return
16486 gdb_bfd_ref_ptr.
16487 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16488 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16489 gdb_bfd_ref_ptr.
16490 (solib_map_sections, reload_shared_libraries_1): Update.
16491 * solib-svr4.c (enable_break): Update.
16492 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16493 * solib-frv.c (enable_break2): Update.
16494 * solib-dsbt.c (enable_break): Update.
16495 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16496 gdb_bfd_ref_ptr.
16497 (darwin_solib_get_all_image_info_addr_at_init): Update.
16498 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16499 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16500 * record-full.c (record_full_save): Update.
16501 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16502 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16503 * minidebug.c (find_separate_debug_file_in_section): Return
16504 gdb_bfd_ref_ptr.
16505 * machoread.c (macho_add_oso_symfile): Change abfd to
16506 gdb_bfd_ref_ptr.
16507 (macho_symfile_read_all_oso): Update.
16508 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16509 (macho_symfile_read): Update.
16510 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16511 (jit_bfd_try_read_symtab): Update.
16512 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16513 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16514 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16515 gdb_bfd_ref_ptr.
16516 (gdb_bfd_ref_policy): New struct.
16517 (gdb_bfd_ref_ptr): New typedef.
16518 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16519 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16520 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16521 gdb_bfd_ref_ptr.
16522 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16523 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16524 (gcore_command): Update.
16525 * exec.c (exec_file_attach): Update.
16526 * elfread.c (elf_symfile_read): Update.
16527 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16528 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16529 (open_and_init_dwo_file): Update.
16530 (open_dwp_file): Return gdb_bfd_ref_ptr.
16531 (open_and_init_dwp_file): Update.
16532 * corelow.c (core_open): Update.
16533 * compile/compile-object-load.c (compile_object_load): Update.
16534 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16535 * coffread.c (coff_symfile_read): Update.
16536 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16537 gdb_bfd_ref_ptr. Rename.
16538 (dump_bfd_file, restore_command): Update.
16539 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16540 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16541 (find_separate_debug_file_by_buildid): Update.
16542
50315b21
TT
165432017-01-10 Tom Tromey <tom@tromey.com>
16544
16545 * common/gdb_ref_ptr.h: New file.
16546 * python/py-ref.h (struct gdbpy_ref_policy): New.
16547 (gdbpy_ref): Now a typedef.
16548
fc4007c9
TT
165492017-01-10 Tom Tromey <tom@tromey.com>
16550
16551 * utils.h (make_cleanup_htab_delete): Don't declare.
16552 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16553 Remove.
16554 * linespec.c (decode_compound_collector): Add constructor,
16555 destructor.
16556 (lookup_prefix_sym): Remove cleanup.
16557 (symtab_collector): Add constructor, destructor.
16558 (collect_symtabs_from_filename): Remove cleanup.
16559 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16560 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16561 Use htab_up.
16562 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16563 * dwarf2read.c (dw2_expand_symtabs_matching)
16564 (dw2_map_symbol_filenames, dwarf_decode_macros)
16565 (write_psymtabs_to_index): Use htab_up.
16566 * dwarf2loc.c (func_verify_no_selftailcall)
16567 (call_site_find_chain_1, func_verify_no_selftailcall)
16568 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16569 std::vector, gdb::unique_xmalloc_ptr.
16570 (call_sitep): Remove typedef.
16571 (dwarf2_locexpr_baton_eval): Remove unused variable.
16572
8dbcee67
TT
165732017-01-10 Tom Tromey <tom@tromey.com>
16574
16575 * python/python-internal.h (make_cleanup_py_decref)
16576 (make_cleanup_py_xdecref): Don't declare.
16577 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16578 (py_xdecref, make_cleanup_py_xdecref): Remove.
16579
13df46cc
TT
165802017-01-10 Tom Tromey <tom@tromey.com>
16581
16582 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16583 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16584
06fc9bf7
TT
165852017-01-10 Tom Tromey <tom@tromey.com>
16586
16587 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16588
830a4934
TT
165892017-01-10 Tom Tromey <tom@tromey.com>
16590
16591 * python/py-utils.c (unicode_to_encoded_string)
16592 (python_string_to_target_string)
16593 (python_string_to_target_python_string)
16594 (python_string_to_host_string, gdbpy_obj_to_string)
16595 (get_addr_from_python): Use gdbpy_ref.
16596
4586d543
TT
165972017-01-10 Tom Tromey <tom@tromey.com>
16598
16599 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16600 gdbpy_ref.
16601
59876f8f
TT
166022017-01-10 Tom Tromey <tom@tromey.com>
16603
16604 * python/python.c (eval_python_command, gdbpy_decode_line)
16605 (gdbpy_run_events, gdbpy_start_type_printers)
16606 (gdbpy_apply_type_printers): Use gdbpy_ref.
16607
97d83487
TT
166082017-01-10 Tom Tromey <tom@tromey.com>
16609
16610 * python/py-param.c (get_doc_string, compute_enum_values): Use
16611 gdbpy_ref.
16612
9205649a
TT
166132017-01-10 Tom Tromey <tom@tromey.com>
16614
16615 * python/py-inferior.c (find_thread_object, build_inferior_list):
16616 Use gdbpy_ref.
16617
74c49d45
TT
166182017-01-10 Tom Tromey <tom@tromey.com>
16619
16620 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16621
16361ffb
TT
166222017-01-10 Tom Tromey <tom@tromey.com>
16623
16624 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16625 gdbpy_ref.
16626
905f2cca
TT
166272017-01-10 Tom Tromey <tom@tromey.com>
16628
16629 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16630 extra incref.
16631 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16632 Use gdbpy_ref.
16633
64081434
TT
166342017-01-10 Tom Tromey <tom@tromey.com>
16635
16636 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16637 gdbpy_ref.
16638
59e9e831
TT
166392017-01-10 Tom Tromey <tom@tromey.com>
16640
16641 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16642 decref results of PyArg_ParseTupleAndKeywords.
16643
9de10f6d
TT
166442017-01-10 Tom Tromey <tom@tromey.com>
16645
16646 * python/python.c (python_run_simple_file): Use
16647 unique_xmalloc_ptr, gdbpy_ref.
16648
2bd5759d
TT
166492017-01-10 Tom Tromey <tom@tromey.com>
16650
16651 * python/py-prettyprint.c (print_stack_unless_memory_error)
16652 (print_string_repr, print_children): Use gdbpy_ref.
16653 (dummy_python_frame): New class.
16654 (dummy_python_frame::dummy_python_frame): Rename from
16655 push_dummy_python_frame.
16656 (py_restore_tstate): Remove.
16657
3b4e0e01
TT
166582017-01-10 Tom Tromey <tom@tromey.com>
16659
16660 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16661
17a22718
TT
166622017-01-10 Tom Tromey <tom@tromey.com>
16663
16664 * python/python.c (ensure_python_env, restore_python_env):
16665 Remove.
16666 * python/python-internal.h (ensure_python_env): Don't declare.
16667 * varobj.h (varobj_ensure_python_env): Don't declare.
16668 * varobj.c (varobj_ensure_python_env): Remove.
16669
68cdc557
TT
166702017-01-10 Tom Tromey <tom@tromey.com>
16671
16672 * varobj.c (varobj_value_get_print_value): Use
16673 gdbpy_enter_varobj.
16674
1eba6383
TT
166752017-01-10 Tom Tromey <tom@tromey.com>
16676
16677 * python/py-prettyprint.c (print_string_repr, print_children):
16678 Update.
16679 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16680 of "encoding".
16681 * varobj.c (varobj_value_get_print_value): Update.
16682 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16683
bde7b3e3
TT
166842017-01-10 Tom Tromey <tom@tromey.com>
16685
16686 * varobj.c (varobj_get_display_hint)
16687 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16688 (varobj_set_visualizer, free_variable): Use
16689 gdbpy_enter_varobj.
16690
a7785f8c
TT
166912017-01-10 Tom Tromey <tom@tromey.com>
16692
16693 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16694 (do_finish_initialization): New function. Use gdbpy_ref.
16695 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16696 do_finish_initialization.
16697
2865bfce
TT
166982017-01-10 Tom Tromey <tom@tromey.com>
16699
16700 * python/py-param.c (get_set_value, get_show_value): Use
16701 gdbpy_enter, gdbpy_ref.
16702
0e9dcc75
TT
167032017-01-10 Tom Tromey <tom@tromey.com>
16704
16705 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16706
12a5cedd
TT
167072017-01-10 Tom Tromey <tom@tromey.com>
16708
16709 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16710
788f2586
TT
167112017-01-10 Tom Tromey <tom@tromey.com>
16712
16713 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16714 Use gdbpy_enter_varobj.
16715
6cd67bea
TT
167162017-01-10 Tom Tromey <tom@tromey.com>
16717
16718 * varobj.c (gdbpy_enter_varobj): New constructor.
16719 * python/python-internal.h (gdbpy_enter_varobj): New class.
16720 * python/py-varobj.c (py_varobj_get_iterator): Use
16721 gdbpy_enter_varobj.
16722
14b122bf
TT
167232017-01-10 Tom Tromey <tom@tromey.com>
16724
16725 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16726 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16727 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16728 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16729 unique_xmalloc_ptr.
16730 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16731
bf1ca3b9
TT
167322017-01-10 Tom Tromey <tom@tromey.com>
16733
16734 * python/py-xmethods.c (invoke_match_method): Use
16735 gdbpy_ref.
16736
572a5524
TT
167372017-01-10 Tom Tromey <tom@tromey.com>
16738
16739 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16740 gdbpy_enter, gdbpy_ref.
16741
396a78b6
TT
167422017-01-10 Tom Tromey <tom@tromey.com>
16743
16744 * python/python.c (python_interactive_command): Use gdbpy_enter.
16745
a88b13c7
TT
167462017-01-10 Tom Tromey <tom@tromey.com>
16747
16748 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16749 gdbpy_ref.
16750
e9f0c363
TT
167512017-01-10 Tom Tromey <tom@tromey.com>
16752
16753 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16754 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16755
6349f452
TT
167562017-01-10 Tom Tromey <tom@tromey.com>
16757
16758 * utils.h (htab_deleter): New struct.
16759 (htab_up): New typedef.
16760 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16761 gdbpy_enter, gdbpy_ref, htab_up.
16762
c0171de6
TT
167632017-01-10 Tom Tromey <tom@tromey.com>
16764
16765 * python/py-unwind.c (pending_frame_invalidate): Remove.
16766 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16767
f18e226f
TT
167682017-01-10 Tom Tromey <tom@tromey.com>
16769
16770 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16771 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16772
c57af3f1
TT
167732017-01-10 Tom Tromey <tom@tromey.com>
16774
16775 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16776
60e600ec
TT
167772017-01-10 Tom Tromey <tom@tromey.com>
16778
16779 * python/python.c (gdbpy_eval_from_control_command)
16780 (gdbpy_source_script, gdbpy_run_events)
16781 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16782 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16783 gdbpy_enter.
16784
bf7da5b0
TT
167852017-01-10 Tom Tromey <tom@tromey.com>
16786
16787 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16788
2d38bced
TT
167892017-01-10 Tom Tromey <tom@tromey.com>
16790
16791 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16792
07bc7329
TT
167932017-01-10 Tom Tromey <tom@tromey.com>
16794
16795 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16796 (python_on_inferior_call_pre, python_on_inferior_call_post)
16797 (python_on_memory_change, python_on_register_change)
16798 (python_inferior_exit, python_new_objfile, add_thread_object)
16799 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16800
6e7c365e
TT
168012017-01-10 Tom Tromey <tom@tromey.com>
16802
16803 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16804 (bpfinishpy_handle_exit): Use gdbpy_enter.
16805
6ba0cd40
TT
168062017-01-10 Tom Tromey <tom@tromey.com>
16807
16808 * python/py-cmd.c (cmdpy_destroyer)
16809 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16810 gdbpy_enter.
16811
de2dc875
TT
168122017-01-10 Tom Tromey <tom@tromey.com>
16813
16814 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16815 gdbpy_enter.
16816 (gdbpy_breakpoint_has_cond): Likewise.
16817
4ecee2c4
TT
168182017-01-10 Tom Tromey <tom@tromey.com>
16819
16820 * python/python.c (gdbpy_enter): New constructor.
16821 (~gdbpy_enter): New destructor.
16822 (restore_python_env, ensure_python_env): Rewrite.
16823 * python/python-internal.h (gdbpy_enter): New class.
16824
37fce74f
TT
168252017-01-10 Tom Tromey <tom@tromey.com>
16826
16827 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16828
53a0cca3
TT
168292017-01-10 Tom Tromey <tom@tromey.com>
16830
16831 * python/py-value.c (value_has_field, get_field_flag)
16832 (get_field_type, valpy_getitem, convert_value_from_python): Use
16833 gdbpy_ref.
16834
ff3724f5
TT
168352017-01-10 Tom Tromey <tom@tromey.com>
16836
16837 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16838 gdbpy_ref.
16839
0700aea5
TT
168402017-01-10 Tom Tromey <tom@tromey.com>
16841
16842 * python/py-prettyprint.c (search_pp_list)
16843 (find_pretty_printer_from_objfiles)
16844 (find_pretty_printer_from_progspace)
16845 (find_pretty_printer_from_gdb, find_pretty_printer)
16846 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16847 gdbpy_ref.
16848
1bb44c9f
TT
168492017-01-10 Tom Tromey <tom@tromey.com>
16850
16851 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16852
87ce03fd
TT
168532017-01-10 Tom Tromey <tom@tromey.com>
16854
16855 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16856 (ltpy_get_all_source_lines): Use gdbpy_ref.
16857
ee0a3fb8
TT
168582017-01-10 Tom Tromey <tom@tromey.com>
16859
16860 * python/py-framefilter.c (extract_sym, extract_value)
16861 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16862 gdbpy_ref.
16863
bf2a52fa
TT
168642017-01-10 Tom Tromey <tom@tromey.com>
16865
16866 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16867
f59fe7f8
TT
168682017-01-10 Tom Tromey <tom@tromey.com>
16869
16870 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16871
80bd970a
TT
168722017-01-10 Tom Tromey <tom@tromey.com>
16873
16874 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16875 gdbpy_ref.
16876
d1b3de2e
TT
168772017-01-10 Tom Tromey <tom@tromey.com>
16878
16879 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16880
3bb43384
TT
168812017-01-10 Tom Tromey <tom@tromey.com>
16882
16883 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16884 (typy_range): Use gdbpy_ref.
16885
abf5651e
TT
168862017-01-10 Tom Tromey <tom@tromey.com>
16887
16888 * python/py-threadevent.c (create_thread_event_object): Use
16889 gdbpy_ref.
16890 * python/py-stopevent.c (create_stop_event_object): Simplify.
16891 (emit_stop_event): Use gdbpy_ref.
16892 * python/py-signalevent.c (create_signal_event_object): Use
16893 gdbpy_ref.
16894 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16895 (emit_new_objfile_event, create_clear_objfiles_event_object)
16896 (emit_clear_objfiles_event): Use gdbpy_ref.
16897 * python/py-infevents.c (create_inferior_call_event_object)
16898 (create_register_changed_event_object)
16899 (create_memory_changed_event_object, emit_inferior_call_event)
16900 (emit_memory_changed_event, emit_register_changed_event): Use
16901 gdbpy_ref.
16902 * python/py-exitedevent.c (create_exited_event_object)
16903 (emit_exited_event): Use gdbpy_ref.
16904 * python/py-event.h (evpy_emit_event): Remove
16905 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16906 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16907 * python/py-continueevent.c (emit_continue_event): Use
16908 gdbpy_ref.
16909 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16910 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16911 gdbpy_ref.
16912 * python/py-bpevent.c (create_breakpoint_event_object): Use
16913 gdbpy_ref.
16914
a68ff33e
TT
169152017-01-10 Tom Tromey <tom@tromey.com>
16916
16917 * python/py-ref.h: New file.
16918
7becfd03
SM
169192017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16920
16921 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16922 void.
16923 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16924 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16925 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16926 * ui-out.c (ui_out::redirect): Likewise.
16927 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16928 * cli/cli-logging.c (set_logging_redirect): Update call site of
16929 ui_out::redirect.
16930 (handle_redirections): Likewise.
16931 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16932 * top.c (execute_command_to_string): Likewise.
16933 * utils.c (do_ui_out_redirect_pop): Likewise.
16934
df294654
SM
169352017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16936
16937 * stack.c (_initialize_stack): Update "frame" command help message.
16938
f5e6296e
IB
169392017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16940
16941 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16942
0e2d6fa6
YQ
169432017-01-06 Yao Qi <yao.qi@linaro.org>
16944
16945 * x86-linux-nat.h: Include gdb_proc_service.h.
16946
44d6d3f9
YQ
169472017-01-06 Yao Qi <yao.qi@linaro.org>
16948
16949 * ser-base.h: Include serial.h.
16950
656731fe
YQ
169512017-01-06 Yao Qi <yao.qi@linaro.org>
16952
16953 * ppc-linux-tdep.h: Include ppc-tdep.h.
16954
1ca8f924
YQ
169552017-01-06 Yao Qi <yao.qi@linaro.org>
16956
16957 * nat/amd64-linux-siginfo.h: Include signal.h.
16958
bc3008c4
YQ
169592017-01-06 Yao Qi <yao.qi@linaro.org>
16960
16961 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16962
66c80d03
YQ
169632017-01-06 Yao Qi <yao.qi@linaro.org>
16964
16965 * mi/mi-parse.h: Include mi-cmds.h.
16966
051d2dda
YQ
169672017-01-06 Yao Qi <yao.qi@linaro.org>
16968
16969 * inf-loop.c: Don't include "target.h".
16970 * inf-loop.h: Include it here.
16971
8018d34f
YQ
169722017-01-06 Yao Qi <yao.qi@linaro.org>
16973
16974 * dfp.h: Include "dboulest.h" and "expression.h".
16975
c0b8369c
YQ
169762017-01-06 Yao Qi <yao.qi@linaro.org>
16977
16978 * ax-gdb.h: Include "ax.h".
16979
ad5cba2a
YQ
169802017-01-06 Yao Qi <yao.qi@linaro.org>
16981
16982 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16983 with nat/gdb_ptrace.h.
16984
1c33cd7f
YQ
169852017-01-05 Yao Qi <yao.qi@linaro.org>
16986
16987 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16988 new line.
16989 (mips64_fbsd_sigframe_init): Likewise.
16990
c988ac1d
JB
169912017-01-04 John Baldwin <jhb@FreeBSD.org>
16992
16993 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16994 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16995
b268007c
JB
169962017-01-04 John Baldwin <jhb@FreeBSD.org>
16997
16998 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16999 * NEWS: Mention new FreeBSD/mips native configuration.
17000 * config/mips/fbsd.mh: New file.
17001 * configure.host: Add mips*-*-freebsd*.
17002 * mips-fbsd-nat.c: New file.
17003
387360da
JB
170042017-01-04 John Baldwin <jhb@FreeBSD.org>
17005
17006 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17007 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17008 * NEWS: Mention new FreeBSD/mips target.
17009 * configure.tgt: Add mips*-*-freebsd*.
17010 * mips-fbsd-tdep.c: New file.
17011 * mips-fbsd-tdep.h: New file.
17012
2aaaf250
YQ
170132017-01-04 Yao Qi <yao.qi@linaro.org>
17014
17015 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17016 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17017
61baf725
JB
170182017-01-01 Joel Brobecker <brobecker@adacore.com>
17019
6dbb839a 17020 Update copyright year range in all GDB files.
61baf725 17021
c113e7ff 170222017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17023
c113e7ff 17024 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17025
c113e7ff 17026For older changes see ChangeLog-2016.
c906108c
SS
17027\f
17028Local Variables:
17029mode: change-log
17030left-margin: 8
17031fill-column: 74
17032version-control: never
57da7796 17033coding: utf-8
c906108c 17034End: