Add include guards to common/format.h
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
6a997029
TT
12017-11-26 Tom Tromey <tom@tromey.com>
2
3 * common/format.h: Add include guards.
4
41272101
TT
52017-11-26 Tom Tromey <tom@tromey.com>
6
7 * nat/linux-personality.h (class
8 maybe_disable_address_space_randomization): New class.
9 (maybe_disable_address_space_randomization): Don't declare
10 function.
11 * nat/linux-personality.c (restore_personality)
12 (make_disable_asr_cleanup): Remove.
13 (maybe_disable_address_space_randomization): Now a constructor.
14 (~maybe_disable_address_space_randomization): New destructor.
15 * linux-nat.c (linux_nat_create_inferior): Update.
16
44287fd8
TT
172017-11-26 Tom Tromey <tom@tromey.com>
18
19 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
20
5ffd2cb7
UW
212017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
22
23 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
24 "cooked" register. Access only first four bytes of branch target
25 registers.
26
0e5457dc
SDJ
272017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
28
29 PR gdb/22491
30 * stap-probe.c (relocate_address): New function.
31 (stap_probe::get_relocated_address): Use 'relocate_address'.
32 (stap_probe::set_semaphore): Use 'relocate_address' and pass
33 'm_sem_addr'.
34 (stap_probe::clear_semaphore): Likewise.
35
deeeba55
PA
362017-11-25 Pedro Alves <palves@redhat.com>
37
38 * dictionary.c: Include "safe-ctype.h".
39 * minsyms.c: Include "safe-ctype.h".
40 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
41
a81aaca0
PA
422017-11-25 Pedro Alves <palves@redhat.com>
43
44 * completer.c (complete_line_internal_1): Skip spaces until the
45 start of the command.
46
0662b6a7
PA
472017-11-24 Pedro Alves <palves@redhat.com>
48
49 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
50 cp_fq_symbol_name_matches. Pass language_cplus to
51 strncmp_with_mode.
52 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
53 (selftests::test_cp_symbol_name_cmp): New.
54 (_initialize_cp_support): Register "cp_symbol_name_matches"
55 selftests.
56 * language.c (default_symbol_name_matcher): Pass language_minimal
57 to strncmp_iw_with_mode.
58 * utils.c: Include "cp-support.h" and <algorithm>.
59 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
60 (cp_is_operator): New functions.
61 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
62 skip whitespace in the symbol name when the lookup name doesn't
63 have spaces, and vice versa.
64 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
65 * utils.h (strncmp_iw_with_mode): Add language parameter.
66
e547c119
JB
672017-11-24 Joel Brobecker <brobecker@adacore.com>
68
69 * ada-lang.c (ada_exception_message_1, ada_exception_message):
70 New functions.
71 (print_it_exception): If available, display the exception
72 message as well.
73 * NEWS: Document new feature.
74
d7fcdff9
UW
752017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
76
77 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
78
30649c14
PR
792017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
80
81 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
82 (dtrace_probe::is_enabled, dtrace_probe::enable)
83 (dtrace_probe::disable): Remove keyword 'struct' at for-range
84 variable
85 * probe.c (gen_ui_out_table_header_info)
86 (print_ui_out_not_applicables): Remove keyword 'struct' at
87 for-range variable
88
7696f5c9
AH
892017-11-24 Alan Hayward <alan.hayward@arm.com>
90
91 * configure.tgt: Add arch/aarch64.o
92
8172f16b
SM
932017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
94
95 * common/common-utils.h: Include poison.h.
96 (xfree): Remove declaration, add definition with static_assert.
97 * common/common-utils.c (xfree): Remove.
98 * common/poison.h (IsMallocatable): Define.
99 (IsFreeable): Define.
100 (free): Delete for non-freeable types.
101 (xnew): New.
102 (XNEW): Undef and redefine.
103 (xcnew): New.
104 (XCNEW): Undef and redefine.
105 (xdelete): New.
106 (XDELETE): Undef and redefine.
107 (xnewvec): New.
108 (XNEWVEC): Undef and redefine.
109 (xcnewvec): New.
110 (XCNEWVEC): Undef and redefine.
111 (xresizevec): New.
112 (XRESIZEVEC): Undef and redefine.
113 (xdeletevec): New.
114 (XDELETEVEC): Undef and redefine.
115 (xnewvar): New.
116 (XNEWVAR): Undef and redefine.
117 (xcnewvar): New.
118 (XCNEWVAR): Undef and redefine.
119 (xresizevar): New.
120 (XRESIZEVAR): Undef and redefine.
121
7aabaf9d
SM
1222017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
123
124 * gdbthread.h (private_thread_info): Define structure type, add
125 virtual pure destructor.
126 (thread_info) <priv>: Change type to unique_ptr.
127 <private_dtor>: Remove.
128 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
129 (private_thread_info::~private_thread_info): Provide default
130 implementation.
131 (thread_info::~thread_info): Don't call private_dtor nor
132 manually free priv.
133 * aix-thread.c (private_thread_info): Rename to ...
134 (aix_thread_info): ... this.
135 (get_aix_thread_info): New.
136 (sync_threadlists): Adjust.
137 (iter_tid): Adjust.
138 (aix_thread_resume): Adjust.
139 (aix_thread_fetch_registers): Adjust.
140 (aix_thread_store_registers): Adjust.
141 (aix_thread_extra_thread_info): Adjust.
142 * darwin-nat.h (private_thread_info): Rename to ...
143 (darwin_thread_info): ... this.
144 (get_darwin_thread_info): New.
145 * darwin-nat.c (darwin_init_thread_list): Adjust.
146 (darwin_check_new_threads): Adjust.
147 (thread_info_from_private_thread_info): Adjust.
148 * linux-thread-db.c (private_thread_info): Rename to ...
149 (thread_db_thread_info): ... this, initialize fields.
150 (get_thread_db_thread_info): New.
151 <dying>: Change type to bool.
152 (update_thread_state): Adjust to type rename.
153 (record_thread): Adjust to type rename an use of unique_ptr.
154 (thread_db_pid_to_str): Likewise.
155 (thread_db_extra_thread_info): Likewise.
156 (thread_db_thread_handle_to_thread_info): Likewise.
157 (thread_db_get_thread_local_address): Likewise.
158 * nto-tdep.h (private_thread_info): Rename to ...
159 (nto_thread_info): ... this, initialize fields.
160 (get_nto_thread_info): New.
161 <name>: Change type to std::string.
162 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
163 use of unique_ptr.
164 * nto-procfs.c (update_thread_private_data_name): Adjust to
165 std::string change, allocate nto_private_thread_info with new.
166 (update_thread_private_data): Adjust to unique_ptr.
167 * remote.c (private_thread_info): Rename to ...
168 (remote_thread_info): ... this, initialize data members with
169 default values.
170 <extra, name>: Change type to std::string.
171 <thread_handle>: Change type to non-pointer.
172 (free_private_thread_info): Remove.
173 (get_private_info_thread): Rename to...
174 (get_remote_thread_info): ... this, change return type, adjust to
175 use of unique_ptr, use remote_thread_info constructor.
176 (remote_add_thread): Adjust.
177 (get_private_info_ptid): Rename to...
178 (get_remote_thread_info): ...this, change return type.
179 (remote_thread_name): Use get_remote_thread_info, adjust to
180 change to std::string.
181 (struct thread_item) <~thread_item>: Remove.
182 <thread_handle>: Make non pointer.
183 (start_thread): Adjust to thread_item::thread_handle type
184 change.
185 (remote_update_thread_list): Adjust to type name change, move
186 strings from temporary to long-lived object instead of
187 duplicating.
188 (remote_threads_extra_info): Use get_remote_thread_info.
189 (process_initial_stop_replies): Likewise.
190 (resume_clear_thread_private_info): Likewise.
191 (remote_resume): Adjust to type name change.
192 (remote_commit_resume): Use get_remote_thread_info.
193 (process_stop_reply): Adjust to type name change.
194 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
195 (remote_stopped_by_hw_breakpoint): Likewise.
196 (remote_stopped_by_watchpoint): Likewise.
197 (remote_stopped_data_address): Likewise.
198 (remote_core_of_thread): Likewise.
199 (remote_thread_handle_to_thread_info): Use
200 get_private_info_thread, adjust to thread_handle field type
201 change.
202
21fe1c75
SM
2032017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * remote.c (struct thread_item): Add constructor, disable copy
206 construction and copy assignment, define default move
207 construction and move assignment.
208 <extra, name>: Change type to std::string.
209 <core>: Initialize.
210 <thread_handle>: Make non-pointer.
211 (thread_item_t): Remove typedef.
212 (DEF_VEC_O(thread_item_t)): Remove.
213 (threads_listing_context) <contains_thread>: New method.
214 <remove_thread>: New method.
215 <items>: Change type to std::vector.
216 (clear_threads_listing_context): Remove.
217 (threads_listing_context_remove): Remove.
218 (remote_newthread_step): Use thread_item constructor, adjust to
219 change to std::vector.
220 (start_thread): Use thread_item constructor, adjust to change to
221 std::vector.
222 (end_thread): Adjust to change to std::vector and std::string.
223 (remote_get_threads_with_qthreadinfo): Use thread_item
224 constructor, adjust to std::vector.
225 (remote_update_thread_list): Adjust to change to std::vector and
226 std::string, use threads_listing_context methods.
227 (remove_child_of_pending_fork): Adjust.
228 (remove_new_fork_children): Adjust.
229 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
230 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
231 * unittests/rsp-low-selftests.c: New file.
232 * common/rsp-low.h: Include common/byte-vector.h.
233 (hex2bin): New overload.
234 * common/rsp-low.c (hex2bin): New overload.
235
089354bb
SM
2362017-11-24 Simon Marchi <simon.marchi@ericsson.com>
237
238 * inferior.h (private_inferior): Define structure type, add
239 virtual pure destructor.
240 (inferior) <priv>: Change type to unique_ptr.
241 * inferior.c (private_inferior::~private_inferior): Provide
242 default implementation.
243 (inferior::~inferior): Don't free priv field.
244 (exit_inferior_1): Likewise.
245 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
246 (darwin_exception_info): Remove typedef.
247 (DEF_VEC_O (darwin_thread_t)); Remove.
248 (private_inferior): Rename to ...
249 (darwin_private_inferior): ... this, extend private_inferior.
250 (get_darwin_inferior): New.
251 <threads>: Change type to std::vector of darwin_thread_t pointers.
252 * darwin-nat.c (darwin_check_new_threads): Adjust.
253 (find_inferior_task_it): Adjust.
254 (darwin_find_thread); Adjust.
255 (darwin_suspend_inferior): Adjust.
256 (darwin_resume_inferior): Adjust.
257 (darwin_find_new_inferior): Adjust.
258 (darwin_decode_notify_message): Adjust.
259 (darwin_send_reply): Adjust.
260 (darwin_resume_inferior_threads): Adjust.
261 (darwin_suspend_inferior_threads): Adjust.
262 (darwin_decode_message): Adjust.
263 (darwin_wait): Adjust.
264 (darwin_interrupt): Adjust.
265 (darwin_deallocate_threads): Adjust.
266 (darwin_mourn_inferior): Adjust, don't free private data.
267 (darwin_reply_to_all_pending_messages): Adjust.
268 (darwin_stop_inferior): Adjust.
269 (darwin_setup_exceptions): Adjust.
270 (darwin_kill_inferior): Adjust.
271 (darwin_setup_request_notification): Adjust.
272 (darwin_attach_pid): Adjust.
273 (darwin_init_thread_list): Adjust.
274 (darwin_setup_fake_stop_event): Adjust.
275 (darwin_attach): Adjust.
276 (darwin_detach): Adjust.
277 (darwin_xfer_partial): Adjust.
278 (set_enable_mach_exceptions): Adjust.
279 (darwin_pid_to_exec_file): Adjust.
280 (darwin_get_ada_task_ptid): Adjust.
281 * darwin-nat-info.c (get_task_from_args): Adjust.
282 (info_mach_ports_command): Adjust.
283 (info_mach_region_command): Adjust.
284 (info_mach_exceptions_command): Adjust.
285 * remote.c (private_inferior): Rename to ...
286 (remote_private_inferior): ... this, initialize fields.
287 (get_remote_inferior); New.
288 (remote_commit_resume): Use get_remote_inferior.
289 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
290
d044bac8
PA
2912017-11-24 Pedro Alves <palves@redhat.com>
292
293 * NEWS: Mention linespecs and explicit locations, and completion
294 improvements.
295
e8d58cba
YQ
2962017-11-24 Yao Qi <yao.qi@linaro.org>
297
298 * regcache.c (regcache::dump): Remove footnote_register_size.
299
a63f2d2f
YQ
3002017-11-24 Yao Qi <yao.qi@linaro.org>
301
302 * regcache.c (cooked_read_test): Add more test for readonly
303 regcache.
304
1b30aaa5
YQ
3052017-11-24 Yao Qi <yao.qi@linaro.org>
306
307 * gdbarch-selftests.c (test_target_has_registers): Move it to
308 target.c.
309 (test_target_has_stack): Likewise.
310 (test_target_has_memory): Likewise.
311 (test_target_prepare_to_store): Likewise.
312 (test_target_store_registers): Likewise.
313 (test_target_ops): Likewise.
314 * regcache.c: Include selftest-arch.h and gdbthread.h.
315 (target_ops_no_register): New class.
316 (test_target_fetch_registers): New.
317 (test_target_store_registers): New.
318 (test_target_xfer_partial): New.
319 (readwrite_regcache): New.
320 (cooked_read_test): New.
321 (_initialize_regcache): Register the test.
322 * target.c: (test_target_has_registers): Moved from
323 gdbarch-selftests.c.
324 (test_target_has_stack): Likewise.
325 (test_target_has_memory): Likewise.
326 (test_target_prepare_to_store): Likewise.
327 (test_target_store_registers): Likewise.
328 * target.h (test_target_ops): New class.
329
6654d750
AH
3302017-11-24 Alan Hayward <alan.hayward@arm.com>
331
332 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
333 selftest.
334
49bdb7ee
AH
3352017-11-24 Alan Hayward <alan.hayward@arm.com>
336
337 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
338 * arch/aarch64.c (aarch64_create_target_description): Create
339 new target description.
340 * features/Makefile: Add new files.
341 * features/aarch64.c: Remove file.
342 * features/aarch64-core.c: New autogenerated file.
343 * features/aarch64-fpu.c: New autogenerated file.
344 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
345
3462017-11-24 Alan Hayward <alan.hayward@arm.com>
347
348 * Makefile.in: Add new files.
349 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
350 aarch64_read_description.
351 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
352 Call aarch64_read_description.
353 * aarch64-tdep.c (aarch64_read_description): New function.
354 (aarch64_gdbarch_init): Call aarch64_read_description.
355 * aarch64-tdep.h (aarch64_read_description): New function.
356 * arch/aarch64.c: New file.
357 * configure.tgt: Add new files.
358
98ead37e
YQ
3592017-11-24 Yao Qi <yao.qi@linaro.org>
360
361 * mi/mi-main.c (register_changed_p): Update.
362 * value.c (value_contents_bits_eq): Change return type.
363 (value_contents_eq): Likewise.
364 * value.h: Update comments.
365
62ad7ce7
YQ
3662017-11-24 Yao Qi <yao.qi@linaro.org>
367
368 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
369 local 'changed'. Remove error.
370 (register_changed_p): Change return type to bool.
371
506fe5f4
YQ
3722017-11-24 Yao Qi <yao.qi@linaro.org>
373
374 * arch/tic6x.c: New file.
375 * arch/tic6x.h: New file.
376 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
377 tic6x-core.xml and tic6x-gp.xml.
378 * features/tic6x-c6xp.c: Generated.
379 * features/tic6x-core.c: Generated.
380 * features/tic6x-gp.c: Generated.
381 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
382 "tic6x-".
383
00ea2e2a
SM
3842017-11-23 Simon Marchi <simon.marchi@ericsson.com>
385
386 * mi/mi-main.c (list_available_thread_groups): Change map value
387 type to std::vector.
388
f45e2a77
SM
3892017-11-23 Simon Marchi <simon.marchi@ericsson.com>
390
391 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
392
bd046f64
SM
3932017-11-23 Simon Marchi <simon.marchi@ericsson.com>
394
395 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
396 back to...
397 <children_requested>: ... this.
398 (varobj_get_num_children, varobj_update): Adjust.
399
4c37490d
SM
4002017-11-23 Simon Marchi <simon.marchi@ericsson.com>
401
402 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
403 (ada_value_has_mutated): Likewise.
404 * c-varobj.c (varobj_is_anonymous_child): Likewise.
405 (c_is_path_expr_parent): Likewise.
406 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
407 (mi_cmd_var_set_frozen): Likewise.
408 (mi_cmd_var_update_iter): Likewise.
409 (mi_cmd_var_update): Likewise.
410 * varobj.c (pretty_printing): Likewise.
411 (varobj_enable_pretty_printing): Likewise.
412 (struct varobj_root) <floating, is_valid>: Likewise.
413 (struct varobj_dynamic) <children_requested>: Likewise.
414 (delete_variable): Likewise.
415 (delete_variable_1): Likewise.
416 (install_variable): Likewise.
417 (update_type_if_necessary): Likewise.
418 (install_new_value): Likewise.
419 (value_of_root): Likewise.
420 (is_root_p): Likewise.
421 (varobj_create): Likewise.
422 (varobj_delete): Likewise.
423 (varobj_has_more): Likewise.
424 (varobj_set_frozen): Likewise.
425 (varobj_get_frozen): Likewise.
426 (install_dynamic_child): Likewise.
427 (dynamic_varobj_has_child_method): Likewise.
428 (update_dynamic_varobj_children): Likewise.
429 (varobj_get_num_children): Likewise.
430 (varobj_list_children): Likewise.
431 (is_path_expr_parent): Likewise.
432 (varobj_default_is_path_expr_parent): Likewise.
433 (varobj_is_dynamic_p): Likewise.
434 (varobj_set_value): Likewise.
435 (varobj_value_has_mutated): Likewise.
436 (varobj_update): Likewise.
437 (check_scope): Likewise.
438 (value_of_root_1): Likewise.
439 (varobj_value_get_print_value): Likewise.
440 (varobj_editable_p): Likewise.
441 (varobj_value_is_changeable_p): Likewise.
442 (varobj_floating_p): Likewise.
443 (varobj_default_value_is_changeable_p): Likewise.
444 (varobj_invalidate_iter): Likewise.
445 * varobj.h (struct varobj_update_result) <type_changed,
446 children_changed, changed, value_installed>: Likewise.
447 (struct varobj) <updated, frozen, not_fetched>: Likewise.
448 (struct lang_varobj_ops) <value_is_changeable_p,
449 value_has_mutated, is_path_expr_parent>: Likewise.
450 (varobj_delete): Likewise.
451 (varobj_set_frozen): Likewise.
452 (varobj_get_frozen): Likewise.
453 (varobj_set_value): Likewise.
454 (varobj_update): Likewise.
455 (varobj_editable_p): Likewise.
456 (varobj_floating_p): Likewise.
457 (varobj_has_more): Likewise.
458 (varobj_is_dynamic_p): Likewise.
459 (varobj_default_value_is_changeable_p): Likewise.
460 (varobj_value_is_changeable_p): Likewise.
461 (varobj_is_anonymous_child): Likewise.
462 (varobj_default_is_path_expr_parent): Likewise.
463
9c23b42f
SDJ
4642017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
465
466 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
467 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
468 <type_str>: Convert to 'std::string'.
469 <expr>: Convert to 'expression_up'.
470 (dtrace_probe_arg_s): Delete type and VEC.
471 (dtrace_probe_enabler_s): Likewise.
472 (struct dtrace_probe): Replace by...
473 (class dtrace_static_probe_ops): ...this and...
474 (class dtrace_probe): ...this.
475 (dtrace_probe_is_linespec): Rename to...
476 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
477 to reflect change.
478 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
479 Adjust code. Create new instance of 'dtrace_probe'.
480 (dtrace_build_arg_exprs): Rename to...
481 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
482 reflect change.
483 (dtrace_get_probes): Rename to...
484 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
485 to reflect change.
486 (dtrace_get_arg): Rename to...
487 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
488 reflect change.
489 (dtrace_probe_is_enabled): Rename to...
490 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
491 change.
492 (dtrace_get_probe_address): Rename to...
493 (dtrace_probe::get_relocated_address): ...this. Adjust code
494 to reflect change.
495 (dtrace_get_probe_argument_count): Rename to...
496 (dtrace_probe::get_argument_count): ...this. Adjust code to
497 reflect change.
498 (dtrace_can_evaluate_probe_arguments): Rename to...
499 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
500 to reflect change.
501 (dtrace_evaluate_probe_argument): Rename to...
502 (dtrace_probe::evaluate_argument): ...this. Adjust code to
503 reflect change.
504 (dtrace_compile_to_ax): Rename to...
505 (dtrace_probe::compile_to_ax): ...this. Adjust code to
506 reflect change.
507 (dtrace_probe_destroy): Delete.
508 (dtrace_type_name): Rename to...
509 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
510 reflect change.
511 (dtrace_probe::get_static_ops): New method.
512 (dtrace_gen_info_probes_table_header): Rename to...
513 (dtrace_static_probe_ops::gen_info_probes_table_header):
514 ...this. Adjust code to reflect change.
515 (dtrace_gen_info_probes_table_values): Rename to...
516 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
517 code to reflect change.
518 (dtrace_enable_probe): Rename to...
519 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
520 change.
521 (dtrace_disable_probe): Rename to...
522 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
523 change.
524 (struct probe_ops dtrace_probe_ops): Delete.
525 (info_probes_dtrace_command): Call 'info_probes_for_spops'
526 instead of 'info_probes_for_ops'.
527 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
528 of 'all_probe_ops'.
529
0e9ae10f
SDJ
5302017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
531 Simon Marchi <simark@simark.ca>
532
533 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
534 variable.
535 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
536 <aexpr>: Change type to 'expression_up'.
537 (stap_probe_arg_s): Delete type and VEC.
538 (struct stap_probe): Delete. Replace by...
539 (class stap_static_probe_ops): ...this and...
540 (class stap_probe): ...this. Rename variables to add 'm_'
541 prefix. Do not use 'union' for arguments anymore.
542 (stap_get_expected_argument_type): Receive probe name instead
543 of 'struct stap_probe'. Adjust code.
544 (stap_parse_probe_arguments): Rename to...
545 (stap_probe::parse_arguments): ...this. Adjust code to
546 reflect change.
547 (stap_get_probe_address): Rename to...
548 (stap_probe::get_relocated_address): ...this. Adjust code
549 to reflect change.
550 (stap_get_probe_argument_count): Rename to...
551 (stap_probe::get_argument_count): ...this. Adjust code
552 to reflect change.
553 (stap_get_arg): Rename to...
554 (stap_probe::get_arg_by_number'): ...this. Adjust code to
555 reflect change.
556 (can_evaluate_probe_arguments): Rename to...
557 (stap_probe::can_evaluate_arguments): ...this. Adjust code
558 to reflect change.
559 (stap_evaluate_probe_argument): Rename to...
560 (stap_probe::evaluate_argument): ...this. Adjust code
561 to reflect change.
562 (stap_compile_to_ax): Rename to...
563 (stap_probe::compile_to_ax): ...this. Adjust code to
564 reflect change.
565 (stap_probe_destroy): Delete.
566 (stap_modify_semaphore): Adjust comment.
567 (stap_set_semaphore): Rename to...
568 (stap_probe::set_semaphore): ...this. Adjust code to reflect
569 change.
570 (stap_clear_semaphore): Rename to...
571 (stap_probe::clear_semaphore): ...this. Adjust code to
572 reflect change.
573 (stap_probe::get_static_ops): New method.
574 (handle_stap_probe): Adjust code to create instance of
575 'stap_probe'.
576 (stap_get_probes): Rename to...
577 (stap_static_probe_ops::get_probes): ...this. Adjust code to
578 reflect change.
579 (stap_probe_is_linespec): Rename to...
580 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
581 reflect change.
582 (stap_type_name): Rename to...
583 (stap_static_probe_ops::type_name): ...this. Adjust code to
584 reflect change.
585 (stap_gen_info_probes_table_header): Rename to...
586 (stap_static_probe_ops::gen_info_probes_table_header):
587 ...this. Adjust code to reflect change.
588 (stap_gen_info_probes_table_values): Rename to...
589 (stap_probe::gen_info_probes_table_values): ...this. Adjust
590 code to reflect change.
591 (struct probe_ops stap_probe_ops): Delete.
592 (info_probes_stap_command): Use 'info_probes_for_spops'
593 instead of 'info_probes_for_ops'.
594 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
595 of 'all_probe_ops'.
596
935676c9
SDJ
5972017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
598
599 * break-catch-throw.c (fetch_probe_arguments): Use
600 'probe.prob' instead of 'probe.probe'.
601 * breakpoint.c (create_longjmp_master_breakpoint): Call
602 'can_evaluate_arguments' and 'get_relocated_address' methods
603 from probe.
604 (create_exception_master_breakpoint): Likewise.
605 (add_location_to_breakpoint): Use 'sal->prob' instead of
606 'sal->probe'.
607 (bkpt_probe_insert_location): Call 'set_semaphore' method from
608 probe.
609 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
610 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
611 of 'probe_ops'.
612 (probe_key_free): Call 'delete' on probe.
613 (check_exception_resume): Use 'probe.prob' instead of
614 'probe.probe'.
615 * location.c (string_to_event_location_basic): Call
616 'probe_linespec_to_static_ops'.
617 * probe.c (class any_static_probe_ops): New class.
618 (any_static_probe_ops any_static_probe_ops): New variable.
619 (parse_probes_in_pspace): Receive 'static_probe_ops' as
620 argument. Adjust code to reflect change.
621 (parse_probes): Use 'static_probe_ops' instead of
622 'probe_ops'. Adjust code to reflect change.
623 (find_probes_in_objfile): Call methods to get name and
624 provider from probe.
625 (find_probe_by_pc): Use 'result.prob' instead of
626 'result.probe'. Call 'get_relocated_address' method from
627 probe.
628 (collect_probes): Adjust comment and argument list to receive
629 'static_probe_ops' instead of 'probe_ops'. Adjust code to
630 reflect change. Call necessary methods from probe.
631 (compare_probes): Call methods to get name and provider from
632 probes.
633 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
634 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
635 adjust code accordingly.
636 (print_ui_out_not_applicables): Likewise.
637 (info_probes_for_ops): Rename to...
638 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
639 as argument instead of 'probe_ops'. Adjust code. Call
640 necessary methods from probe.
641 (info_probes_command): Use 'info_probes_for_spops'.
642 (enable_probes_command): Pass correct argument to
643 'collect_probes'. Call methods from probe.
644 (disable_probes_command): Likewise.
645 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
646 (get_probe_argument_count): Move to
647 'any_static_probe_ops::get_argument_count'.
648 (can_evaluate_probe_arguments): Move to
649 'any_static_probe_ops::can_evaluate_arguments'.
650 (evaluate_probe_argument): Move to
651 'any_static_probe_ops::evaluate_argument'.
652 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
653 'probe.probe'.
654 (probe_linespec_to_ops): Rename to...
655 (probe_linespec_to_static_ops): ...this. Adjust code.
656 (probe_any_is_linespec): Rename to...
657 (any_static_probe_ops::is_linespec): ...this.
658 (probe_any_get_probes): Rename to...
659 (any_static_probe_ops::get_probes): ...this.
660 (any_static_probe_ops::type_name): New method.
661 (any_static_probe_ops::gen_info_probes_table_header): New
662 method.
663 (compute_probe_arg): Use 'pc_probe.prob' instead of
664 'pc_probe.probe'. Call methods from probe.
665 (compile_probe_arg): Likewise.
666 (std::vector<const probe_ops *> all_probe_ops): Delete.
667 (std::vector<const static_probe_ops *> all_static_probe_ops):
668 New variable.
669 (_initialize_probe): Use 'all_static_probe_ops' instead of
670 'all_probe_ops'.
671 * probe.h (struct info_probe_column) <field_name>: Delete
672 extraneous newline
673 (info_probe_column_s): Delete type and VEC.
674 (struct probe_ops): Delete. Replace with...
675 (class static_probe_ops): ...this and...
676 (clas probe): ...this.
677 (struct bound_probe) <bound_probe>: Delete extraneous
678 newline. Adjust constructor to receive 'probe' instead of
679 'struct probe'.
680 <probe>: Rename to...
681 <prob>: ...this. Delete extraneous newline.
682 <objfile>: Delete extraneous newline.
683 (register_probe_ops): Delete unused prototype.
684 (info_probes_for_ops): Rename to...
685 (info_probes_for_spops): ...this. Adjust comment.
686 (get_probe_address): Move to 'probe::get_address'.
687 (get_probe_argument_count): Move to
688 'probe::get_argument_count'.
689 (can_evaluate_probe_arguments): Move to
690 'probe::can_evaluate_arguments'.
691 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
692 * solib-svr4.c (struct svr4_info): Adjust comment.
693 (struct probe_and_action) <probe>: Rename to...
694 <prob>: ...this.
695 (register_solib_event_probe): Receive 'probe' instead of
696 'struct probe' as argument. Use 'prob' instead of 'probe'
697 when applicable.
698 (solib_event_probe_action): Call 'get_argument_count' method
699 from probe. Adjust comment.
700 (svr4_handle_solib_event): Adjust comment. Call
701 'evaluate_argument' method from probe.
702 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
703 from probe.
704 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
705 'struct probe'. Call 'can_evaluate_arguments' from probe.
706 * symfile.h: Forward declare 'class probe' instead of 'struct
707 probe'.
708 * symtab.h: Likewise.
709 (struct symtab_and_line) <probe>: Rename to...
710 <prob>: ...this.
711 * tracepoint.c (start_tracing): Use 'prob' when applicable.
712 Call probe methods.
713 (stop_tracing): Likewise.
714
8f6cb6c3
JB
7152017-11-22 Joel Brobecker <brobecker@adacore.com>
716
717 * ravenscar-thread.c (ravenscar_inferior_created): Remove
718 trailing newline at end of string in call to warning.
719
479f8de1
SM
7202017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
721
722 * osdata.h: Include vector isntead of vec.h.
723 (osdata_column_s): Remove typedef.
724 (struct osdata_column): Add constructor.
725 <name, value>: Change type to std::string.
726 (DEF_VEC_O (osdata_column_s)): Remove.
727 (osdata_item_s): Remove typedef.
728 (struct osdata_item) <columns>: Change type to std::vector.
729 (DEF_VEC_O (osdata_item_s)): Remove.
730 (struct osdata): Add constructor.
731 <type>: Change type to std::string.
732 <items>: Change type to std::vector.
733 (osdata_p): Remove typedef.
734 (DEF_VEC_P (osdata_p)): Remove.
735 (osdata_parse): Return a unique_ptr.
736 (osdata_free): Remove.
737 (make_cleanup_osdata_free): Remove.
738 (get_osdata): Return a unique_ptr.
739 (get_osdata_column): Return pointer to std::string, take a
740 reference to osdata_item as parameter.
741 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
742 unique_ptr.
743 <property_name>: Change type to std::string.
744 (osdata_start_osdata): Allocate osdata with new and adjust.
745 (osdata_start_item): Adjust.
746 (osdata_start_column): Adjust.
747 (osdata_end_column): Adjust.
748 (clear_parsing_data): Remove.
749 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
750 (osdata_item_clear): Remove.
751 (get_osdata): return a unique_ptr and adjust.
752 (get_osdata_column): Return a pointer to std::string and adjust.
753 (info_osdata): Adjust.
754 * mi/mi-main.c: Include <map>.
755 (free_vector_of_osdata_items): Remove.
756 (list_available_thread_groups): Adjust, use std::map instead of
757 splay tree.
758
41bd68f5
SM
7592017-11-22 Simon Marchi <simon.marchi@ericsson.com>
760
761 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
762 case in switch.
763
7e2fd2f4
SM
7642017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
767
0604393c
SM
7682017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
769
770 * varobj.h (struct varobj_update_result): Add constructor, add
771 move constructor, disable copy and assign, initialize fields.
772 <newobj>: Change type to std::vector.
773 (varobj_update): Return std::vector.
774 * varobj.c (install_dynamic_child): Change VEC parameters to
775 std::vector and adjust.
776 (update_dynamic_varobj_children): Likewise.
777 (varobj_update): Return std::vector and adjust.
778 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
779
ddf0ea08
SM
7802017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
781
782 * varobj.h (struct varobj) <parent>: Remove const.
783 <children>: Change type to std::vector.
784 (varobj_list_children): Return std::vector const reference.
785 (varobj_restrict_range): Change parameter type to std::vector
786 const reference.
787 * varobj.c (varobj_has_more): Adjust.
788 (varobj_restrict_range): Change parameter type to std::vector
789 const reference and adjust.
790 (install_dynamic_child): Adjust.
791 (update_dynamic_varobj_children): Adjust.
792 (varobj_list_children): Return std::vector const reference and
793 adjust.
794 (varobj_add_child): Adjust.
795 (update_type_if_necessary): Adjust.
796 (varobj_update): Adjust.
797 (delete_variable_1): Adjust.
798 * ada-varobj.c (ada_value_has_mutated): Adjust.
799 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
800
9e5b9d2b
SM
8012017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
802
803 * varobj.h (struct varobj): Add constructor and destructor,
804 initialize fields.
805 * varobj.c (struct varobj_root): Initialize fields.
806 (struct varobj_dynamic): Initialize fields.
807 (varobj_create): Use unique_ptr instead of cleanup. Create
808 varobj with new instead of new_root_variable.
809 (delete_variable_1): Free variable with delete instead of
810 free_variable.
811 (create_child_with_value): Create variable with new instead of
812 new_variable.
813 (varobj::varobj): New.
814 (varobj::~varobj): New (body mostly coming from free_variable).
815 (new_variable): Remove.
816 (free_variable): Remove.
817 (do_free_variable_cleanup): Remove.
818 (make_cleanup_free_variable): Remove.
819
fc35dab1
UW
8202017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
821
822 * core-regset.c: Remove file.
823 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
824
2400729e
UW
8252017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
826
827 * NEWS: Document use of GNU MPFR.
828 * README: Likewise.
829
830 * Makefile.in (LIBMPFR): Add define.
831 (CLIBS): Add $(LIBMPFR).
832 * configure.ac: Add --with-mpfr configure option.
833 * configure: Regenerate.
834 * config.in: Regenerate.
835
836 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
837 (class mpfr_float_ops): New type.
838 (mpfr_float_ops::from_target): Two new overloaded functions.
839 (mpfr_float_ops::to_target): Likewise.
840 (mpfr_float_ops::to_string): New function.
841 (mpfr_float_ops::from_string): Likewise.
842 (mpfr_float_ops::to_longest): Likewise.
843 (mpfr_float_ops::from_longest): Likewise.
844 (mpfr_float_ops::from_ulongest): Likewise.
845 (mpfr_float_ops::to_host_double): Likewise.
846 (mpfr_float_ops::from_host_double): Likewise.
847 (mpfr_float_ops::convert): Likewise.
848 (mpfr_float_ops::binop): Likewise.
849 (mpfr_float_ops::compare): Likewise.
850 (get_target_float_ops): Use mpfr_float_ops if available.
851
7a26362d
UW
8522017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
853
854 * target-float.c: Do not include <math.h>.
855 Include <cmath> and <limits>.
856 (DOUBLEST): Do not define.
857 (class target_float_ops): New type.
858 (class host_float_ops): New templated type.
859 (class decimal_float_ops): New type.
860
861 (floatformat_to_doublest): Rename to ...
862 (host_float_ops<T>::from_target): ... this. Use template type T
863 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
864 (host_float_ops<T>::from_target): New overload using a type argument.
865 (floatformat_from_doublest): Rename to ...
866 (host_float_ops<T>::to_target): ... this. Use template type T
867 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
868 (host_float_ops<T>::to_target): New overload using a type argument.
869 (floatformat_printf_format): New function.
870 (struct printf_length_modifier): New templated type.
871 (floatformat_to_string): Rename to ...
872 (host_float_ops<T>::to_string): ... this. Use type instead of
873 floatformat argument. Use floatformat_printf_format and
874 printf_length_modifier. Remove special handling of invalid numbers,
875 infinities and NaN (moved to target_float_to_string).
876 (struct scanf_length_modifier): New templated type.
877 (floatformat_from_string): Rename to ...
878 (host_float_ops<T>::from_string): ... this. Use type instead of
879 floatformat argument. Use scanf_length_modifier.
880 (floatformat_to_longest): Rename to ...
881 (host_float_ops<T>::to_longest): ... this. Use type instead of
882 floatformat argument. Handle out-of-range values deterministically.
883 (floatformat_from_longest): Rename to ...
884 (host_float_ops<T>::from_longest): ... this. Use type instead of
885 floatformat argument.
886 (floatformat_from_ulongest): Rename to ...
887 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
888 floatformat argument.
889 (floatformat_to_host_double): Rename to ...
890 (host_float_ops<T>::to_host_double): ... this. Use type instead of
891 floatformat argument.
892 (floatformat_from_host_double): Rename to ...
893 (host_float_ops<T>::from_host_double): ... this. Use type instead of
894 floatformat argument.
895 (floatformat_convert): Rename to ...
896 (host_float_ops<T>::convert): ... this. Use type instead of
897 floatformat arguments. Remove handling of no-op conversions.
898 (floatformat_binop): Rename to ...
899 (host_float_ops<T>::binop): ... this. Use type instead of
900 floatformat arguments.
901 (floatformat_compare): Rename to ...
902 (host_float_ops<T>::compare): ... this. Use type instead of
903 floatformat arguments.
904
905 (match_endianness): Use type instead of length/byte_order arguments.
906 (set_decnumber_context): Likewise.
907 (decimal_from_number): Likewise. Update calls.
908 (decimal_to_number): Likewise.
909 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
910 (decimal_float_ops::to_host_double): New dummy function.
911 (decimal_float_ops::from_host_double): Likewise.
912 (decimal_to_string): Rename to ...
913 (decimal_float_ops::to_string): ... this. Use type instead of
914 length/byte_order arguments. Update calls.
915 (decimal_from_string): Rename to ...
916 (decimal_float_ops::from_string): ... this. Use type instead of
917 length/byte_order arguments. Update calls.
918 (decimal_from_longest): Rename to ...
919 (decimal_float_ops::from_longest): ... this. Use type instead of
920 length/byte_order arguments. Update calls.
921 (decimal_from_ulongest): Rename to ...
922 (decimal_float_ops::from_ulongest): ... this. Use type instead of
923 length/byte_order arguments. Update calls.
924 (decimal_to_longest): Rename to ...
925 (decimal_float_ops::to_longest): ... this. Use type instead of
926 length/byte_order arguments. Update calls.
927 (decimal_binop): Rename to ...
928 (decimal_float_ops::binop): ... this. Use type instead of
929 length/byte_order arguments. Update calls.
930 (decimal_compare): Rename to ...
931 (decimal_float_ops::compare): ... this. Use type instead of
932 length/byte_order arguments. Update calls.
933 (decimal_convert): Rename to ...
934 (decimal_float_ops::convert): ... this. Use type instead of
935 length/byte_order arguments. Update calls.
936
937 (target_float_same_category_p): New function.
938 (target_float_same_format_p): Likewise.
939 (target_float_format_length): Likewise.
940 (enum target_float_ops_kind): New type.
941 (get_target_float_ops_kind): New function.
942 (get_target_float_ops): Three new overloaded functions.
943
944 (target_float_is_zero): Update call.
945 (target_float_to_string): Add special handling of invalid numbers,
946 infinities and NaN (moved from floatformat_to_string). Use
947 target_float_ops callback.
948 (target_float_from_string): Use target_float_ops callback.
949 (target_float_to_longest): Likewise.
950 (target_float_from_longest): Likewise.
951 (target_float_from_ulongest): Likewise.
952 (target_float_to_host_double): Likewise.
953 (target_float_from_host_double): Likewise.
954 (target_float_convert): Add special case for no-op conversions.
955 Use target_float_ops callback.
956 (target_float_binop): Use target_float_ops callback.
957 (target_float_compare): Likewise.
958
a9f26f60
YQ
9592017-11-22 Yao Qi <yao.qi@linaro.org>
960
961 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
962
29f9a567
YQ
9632017-11-22 Yao Qi <yao.qi@linaro.org>
964
965 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
966 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
967
3b1b69bf
JG
9682017-11-21 Jerome Guitton <guitton@adacore.com>
969
970 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
971 with event ptid from the lower layer before doing the
972 ravenscar-specific update.
973
54aa6c67
JB
9742017-11-21 Joel Brobecker <brobecker@adacore.com>
975
976 * ravenscar-thread.c (is_ravenscar_task): Also verify that
977 the ptid's TID is nonzero.
978
cf3fbed4
JB
9792017-11-21 Joel Brobecker <brobecker@adacore.com>
980
981 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
982 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
983 Make non-static. Change return type to char *. Adjust code
984 accordingly. Rewrite the function's documentation.
985 (read_atcb): Adjust call to get_tcb_types_info accordingly.
986 * ravenscar-thread.c (ravenscar_inferior_created): Check that
987 we have enough debugging information in the runtime to support
988 Ada task debugging before we enable the ravenscar-thread layer.
989
9edcc12f
JB
9902017-11-21 Joel Brobecker <brobecker@adacore.com>
991
992 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
993 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
994 * ravenscar-thread.c: Add into comment.
995 (base_magic_null_ptid): Delete.
996 (base_ptid): Change documentation.
997 (ravenscar_active_task): Renames ravenscar_running_thread.
998 All callers updated throughout.
999 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1000 (ravenscar_task_is_currently_active): Likewise.
1001 (get_base_thread_from_ravenscar_task): Ditto.
1002 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1003 (ravenscar_runtime_initialized): Likewise.
1004 (get_running_thread_id): Add new parameter "cpu". Adjust
1005 implementation to handle this new parameter.
1006 (ravenscar_fetch_registers): Small adjustment to use
1007 is_ravenscar_task and ravenscar_task_is_currently_active in
1008 order to decide whether to use the target beneath or this
1009 module's arch_ops.
1010 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1011 (ravenscar_stopped_by_sw_breakpoint): Use
1012 get_base_thread_from_ravenscar_task to get the underlying
1013 thread, rather than using base_ptid.
1014 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1015 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1016 Likewise.
1017 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1018
65d40437
JB
10192017-11-21 Joel Brobecker <brobecker@adacore.com>
1020
1021 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1022 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1023 (get_tcb_types_info): Set fieldnos.base_cpu.
1024 (read_atcb): Set task_info->base_cpu.
1025 (info_task): Print "Base CPU" info if set by runtime.
1026
e02544b2
JB
10272017-11-21 Joel Brobecker <brobecker@adacore.com>
1028
1029 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1030 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1031 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1032 New functions.
1033 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1034 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1035 to_stopped_data_address and to_core_of_thread fields of
1036 ravenscar_ops.
1037
ed0f4273
UW
10382017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1039
1040 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1041 (struct gdbarch_tdep): New member long_double_abi.
1042 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1043 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1044 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1045 format depending on long_double_abi tdep member.
1046 (ppc_floatformat_for_type): Handle __ibm128 type.
1047
0fc76421
SM
10482017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1049
1050 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1051
e6b2f5ef
PA
10522017-11-21 Pedro Alves <palves@redhat.com>
1053
1054 * dwarf2read.c (mapped_index::find_name_components_bounds)
1055 <completion mode, upper bound>: Use std::lower_bound instead of
1056 std::upper_bound.
1057 (test_mapped_index_find_name_component_bounds): Remove incorrect
1058 "t1_fund" from expected symbols.
1059
5c58de74
PA
10602017-11-21 Pedro Alves <palves@redhat.com>
1061
1062 * dwarf2read.c (mapped_index::name_components_casing): New field.
1063 (mapped_index) <build_name_components,
1064 find_name_components_bounds): Declare new methods.
1065 (mapped_index::find_name_components_bounds)
1066 (mapped_index::build_name_components): New methods, factored out
1067 from dw2_expand_symtabs_matching_symbol.
1068 (check_find_bounds_finds)
1069 (test_mapped_index_find_name_component_bounds): New.
1070 (run_test): Rename to ...
1071 (test_dw2_expand_symtabs_matching_symbol): ... this.
1072 (run_test): Reimplement.
1073
e1ef7d7a
PA
10742017-11-21 Pedro Alves <palves@redhat.com>
1075
1076 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1077 (symbol_end): Use cp_ident_is_alnum.
1078 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1079 * dwarf2read.c (make_sort_after_prefix_name): New function.
1080 (dw2_expand_symtabs_matching_symbol): Use it.
1081 (test_symbols): Add more symbols.
1082 (run_test): Add tests.
1083
cf724bc9
TT
10842017-11-17 Tom Tromey <tom@tromey.com>
1085
1086 * symtab.h (enum symbol_subclass_kind): New.
1087 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1088 Remove.
1089 <subclass>: New member.
1090 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1091 * rust-lang.c (rust_get_trait_object_pointer): Update.
1092 * dwarf2read.c (read_func_scope): Update.
1093 (read_variable): Update.
1094
68e745e3
TT
10952017-11-17 Tom Tromey <tom@tromey.com>
1096
1097 * dwarf2read.c (read_func_scope): Update.
1098 * symtab.h (struct template_symbol): Derive from symbol.
1099 <base>: Remove.
1100
71a3c369
TT
11012017-11-17 Tom Tromey <tom@tromey.com>
1102
1103 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1104 (struct rust_vtable_symbol): New.
1105 (find_symbol_at_address): Declare.
1106 * symtab.c (find_symbol_at_address): New function.
1107 * symfile.h (struct quick_symbol_functions)
1108 <find_compunit_symtab_by_address>: New member.
1109 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1110 function.
1111 (debug_sym_quick_functions): Link to
1112 debug_qf_find_compunit_symtab_by_address.
1113 * rust-lang.c (rust_get_trait_object_pointer): New function.
1114 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1115 rust_get_trait_object_pointer.
1116 * psymtab.c (psym_relocate): Clear psymbol_map.
1117 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1118 functions.
1119 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1120 * objfiles.h (struct objfile) <psymbol_map>: New member.
1121 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1122 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1123 (rust_containing_type, read_variable): New functions.
1124
7468702d
SM
11252017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1128
37269bc9
SM
11292017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1130
1131 * common/filestuff.c: Include <algorithm>.
1132 (open_fds): Change type to std::vector<int>.
1133 (do_mark_open_fd): Adjust.
1134 (unmark_fd_no_cloexec): Adjust.
1135 (do_close): Adjust.
1136
5c632425
SM
11372017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * breakpoint.c (output_thread_groups): Take an std::vector.
1140 (print_one_breakpoint_location): Adjust.
1141
ced9779b
JB
11422017-11-17 Joel Brobecker <brobecker@adacore.com>
1143
1144 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1145 (ada_evaluate_subexp_for_cast): New function.
1146 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1147 ada_evaluate_subexp_for_cast.
1148 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1149 eval_skip_value.
1150 * eval.c (evaluate_var_value): Make non-static.
1151 (evaluate_var_msym_value, eval_skip_value): Likewise.
1152 * value.h (evaluate_var_value, evaluate_var_msym_value)
1153 (eval_skip_value): Declare.
1154
b7e22850
JB
11552017-11-16 Joel Brobecker <brobecker@adacore.com>
1156
1157 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1158 Update all callers.
1159
9ccabccd
PA
11602017-11-16 Pedro Alves <palves@redhat.com>
1161
1162 * python/py-unwind.c (pyuw_sniffer): Translate
1163 PyExc_KeyboardInterrupt to a GDB Quit exception.
1164
d930703d
PA
11652017-11-16 Pedro Alves <palves@redhat.com>
1166
1167 * infrun.c (resume_cleanups): Delete.
1168 (resume): No longer install a resume_cleanups cleanup nor call
1169 QUIT.
1170 (proceed): Pass the terminal to the inferior.
1171 (keep_going_pass_signal): No longer install a resume_cleanups
1172 cleanup.
1173
38dc2859
PA
11742017-11-16 Pedro Alves <palves@redhat.com>
1175
1176 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1177 if the prompt is blocked.
1178
688fca4f
PA
11792017-11-16 Pedro Alves <palves@redhat.com>
1180
1181 * breakpoint.c (insert_bp_location): Replace bp_err and
1182 bp_err_message locals by a gdb_exception local.
1183
e2c33ac7
PA
11842017-11-16 Pedro Alves <palves@redhat.com>
1185
1186 * inflow.c (scoped_ignore_sigttou): New class.
1187 (child_terminal_ours_1, new_tty): Use it.
1188
d7236961
UW
11892017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1190
1191 * target-float.c (decimal_from_number): Add byte_order argument and
1192 call match_endianness. Error if unknown floating-point type.
1193 (decimal_to_number): Add byte_order argument and call match_endianness.
1194 (decimal_from_longest): Update call. Do not call match_endianness.
1195 (decimal_from_ulongest): Likewise.
1196 (decimal_binop): Likewise.
1197 (decimal_is_zero): Likewise.
1198 (decimal_compare): Likewise.
1199 (decimal_convert): Likewise.
1200
d8ae99a7
PM
12012017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1202
1203 * python/python.c (gdbpy_rbreak): New function.
1204 * NEWS: Document Python rbreak feature.
1205
c632b645
YQ
12062017-11-16 Yao Qi <yao.qi@linaro.org>
1207
1208 * features/tic6x-c62x.xml: Remove.
1209 * features/tic6x-c64x.xml: Remove.
1210 * features/tic6x-c64xp.xml: Remove.
1211
a014b87a
JB
12122017-11-15 John Baldwin <jhb@FreeBSD.org>
1213
1214 * symtab.h: Include <array>.
1215
94765011
JB
12162017-11-15 John Baldwin <jhb@FreeBSD.org>
1217
1218 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1219 (bsd_kvm_proc_cmd): Likewise.
1220
625ad440
SM
12212017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * tui/tui-win.c (window_name_completer): Replace VEC with
1224 std::vector.
1225
c0c11fa9
AC
12262017-11-15 Andrew Cagney <cagney@gnu.org>
1227
1228 * MAINTAINERS: Remove no-longer applicable entries.
1229
34a7ebaf
AC
12302017-11-15 Andrew Cagney <cagney@gnu.org>
1231
1232 * MAINTAINERS: Move self to Past Maintainers.
1233
5334ef39
YQ
12342017-11-15 Yao Qi <yao.qi@linaro.org>
1235
1236 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1237 * features/nios2-linux.c: Remove.
1238 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1239 initialize_tdesc_nios2_linux.
1240
a714b0d6
YQ
12412017-11-15 Yao Qi <yao.qi@linaro.org>
1242
1243 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1244 M68HC11_LAST_HARD_REG + 1.
1245
92ffd475
PC
12462017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1247
1248 PR gdb/22388
1249 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1250 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1251 Return TARGET_XFER_EOF if size of returned data is 0.
1252
07431908
SM
12532017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1254
1255 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1256 memory-map-selftests.c.
1257 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1258 * memory-map.c (memory_map_start_memory): Fix computation of hi
1259 address.
1260 * unittests/memory-map-selftests.c: New file.
1261
31432a67
JB
12622017-11-09 Joel Brobecker <brobecker@adacore.com>
1263
1264 * ada-lang.c: Fix some typos in the general command documenting
1265 how Ada expressions are being evaluated and how their result
1266 is printed.
1267
e793c052
TT
12682017-11-09 Tom Tromey <tom@tromey.com>
1269
1270 * psymtab.c (psymbol_hash): Do not hash string contents.
1271 (psymbol_compare): Add comment.
1272
7e8835c5
TT
12732017-11-09 Tom Tromey <tom@tromey.com>
1274
1275 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1276
286acbb5
JB
12772017-11-08 Joel Brobecker <brobecker@adacore.com>
1278
1279 * ada-exp.y (write_var_from_sym): Remove parameter
1280 "orig_left_context". Update all callers.
1281
b44ec619
SM
12822017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * tracepoint.h (class collection_list) <stringify>: Return
1285 std::vector<std::string>.
1286 (encode_actions_rsp): Change parameters to
1287 std::vector<std::string> *.
1288 * tracepoint.c (collection_list::stringify): Return
1289 std::vector<std::string> and adjust accordingly.
1290 (encode_actions_rsp): Changee parameters to
1291 std::vector<std::string> and adjust accordingly.
1292 * remote.c (free_actions_list),
1293 free_actions_list_cleanup_wrapper): Remove.
1294 (remote_download_tracepoint): Adjust to std::vector.
1295
2f4732b0
TT
12962017-11-08 Tom Tromey <tom@tromey.com>
1297
1298 * dwarf2read.c (symbolp): Remove typedef.
1299 (read_func_scope): Use std::vector.
1300 (process_structure_scope): Use std::vector.
1301
f9d67a22
PA
13022017-11-08 Pedro Alves <palves@redhat.com>
1303
1304 * ada-lang.c (ada_make_symbol_completion_list): Use
1305 completion_skip_symbol.
1306 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1307 (symbol_is_function_or_method(symbol*)): New.
1308 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1309 completion_skip_symbol.
1310 (default_collect_symbol_completion_matches_break_on): Use
1311 completion_skip_symbol. Pass down mode.
1312 (collect_file_symbol_completion_matches): Pass down mode.
1313 * symtab.h (symbol_is_function_or_method): New declarations.
1314 (completion_skip_symbol): New template function.
1315
56d87ef7
PA
13162017-11-08 Pedro Alves <palves@redhat.com>
1317
1318 * linespec.c (iterate_over_all_matching_symtabs): Add
1319 search_domain parameter. Pass it down to expand_symtabs_matching.
1320 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1321 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1322 search_domain.
1323 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1324 Pass it down.
1325 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1326 symbols.
1327 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1328 it down.
1329
1b026119
PA
13302017-11-08 Pedro Alves <palves@redhat.com>
1331
1332 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1333 text_len locals and don't pass them down.
1334 * symtab.c (completion_list_add_name): Remove
1335 sym_text/sym_text_len parameters and adjust.
1336 (completion_list_add_symbol, completion_list_add_msymbol)
1337 (completion_list_objc_symbol, completion_list_add_fields)
1338 (add_symtab_completions): Likewise.
1339 (default_collect_symbol_completion_matches_break_on)
1340 (collect_file_symbol_completion_matches): Remove sym_text_len
1341 local and don't pass it down.
1342 * symtab.h (completion_list_add_name): Remove
1343 sym_text/sym_text_len parameters.
1344
c62446b1
PA
13452017-11-08 Pedro Alves <palves@redhat.com>
1346
1347 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1348 unittests/lookup_name_info-selftests.c.
1349 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1350 * cp-support.c: Include "selftest.h".
1351 (cp_remove_params_1): Rename from cp_remove_params. Add
1352 'require_param' parameter, and handle it.
1353 (cp_remove_params): Reimplement.
1354 (cp_remove_params_if_any): New.
1355 (selftests::quote): New.
1356 (selftests::check_remove_params): New.
1357 (selftests::test_cp_remove_params): New.
1358 (_initialize_cp_support): Install
1359 selftests::test_cp_remove_params.
1360 * cp-support.h (cp_remove_params_if_any): Declare.
1361 * dwarf2read.c :Include "selftest.h".
1362 (dw2_expand_symtabs_matching_symbol): Use
1363 lookup_name_info::make_ignore_params.
1364 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1365 (selftests::dw2_expand_symtabs_matching::string_or_null)
1366 (selftests::dw2_expand_symtabs_matching::check_match)
1367 (selftests::dw2_expand_symtabs_matching::test_symbols)
1368 (selftests::dw2_expand_symtabs_matching::run_test): New.
1369 (_initialize_dwarf2_read): Register
1370 selftests::dw2_expand_symtabs_matching::run_test.
1371 * psymtab.c (psym_expand_symtabs_matching): Use
1372 lookup_name_info::make_ignore_params.
1373 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1374 If the lookup name wants to ignore parameters, strip them.
1375 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1376 code handling '('.
1377 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1378 (default_collect_symbol_completion_matches_break_on): Don't try to
1379 strip parameters.
1380 * symtab.h (lookup_name_info::lookup_name_info): Add
1381 'ignore_parameters' parameter.
1382 (lookup_name_info::ignore_parameters)
1383 (lookup_name_info::make_ignore_params): New methods.
1384 (lookup_name_info::m_ignore_parameters): New field.
1385 * unittests/lookup_name_info-selftests.c: New file.
1386
61920122
PA
13872017-11-08 Pedro Alves <palves@redhat.com>
1388
1389 * dwarf2read.c (dw2_expand_marked_cus)
1390 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1391 (dw2_expand_symtabs_matching): Move further below.
1392 (dw2_expand_marked_cus): Reindent.
1393
3f563c84
PA
13942017-11-08 Pedro Alves <palves@redhat.com>
1395
1396 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1397 (struct name_component): New.
1398 (mapped_index::name_components): New field.
1399 (mapped_index::symbol_name_at): New method.
1400 (dwarf2_read_index): Call mapped_index ctor.
1401 (dw2_map_matching_symbols): Add comment about name_components
1402 table.
1403 (dw2_expand_symtabs_matching): Factor part to...
1404 (dw2_expand_symtabs_matching_symbol): ... this new function.
1405 Build name components table, and lookup symbols in it before
1406 calling the name matcher.
1407 (dw2_expand_marked_cus): New, factored out from
1408 dw2_expand_symtabs_matching.
1409 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1410
b5ec771e
PA
14112017-11-08 Pedro Alves <palves@redhat.com>
1412
1413 * ada-lang.c (ada_encode): Rename to ..
1414 (ada_encode_1): ... this. Add throw_errors parameter and handle
1415 it.
1416 (ada_encode): Reimplement.
1417 (match_name): Delete, folded into full_name.
1418 (resolve_subexp): No longer pass the encoded name to
1419 ada_lookup_symbol_list.
1420 (should_use_wild_match): Delete.
1421 (name_match_type_from_name): New.
1422 (ada_lookup_simple_minsym): Use lookup_name_info and the
1423 language's symbol_name_matcher_ftype.
1424 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1425 (ada_add_block_renamings): Adjust to use lookup_name_info.
1426 (ada_lookup_name): New.
1427 (add_nonlocal_symbols, ada_add_all_symbols)
1428 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1429 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1430 (ada_name_for_lookup): Delete.
1431 (ada_lookup_encoded_symbol): Construct a verbatim name.
1432 (wild_match): Reverse sense of return type. Use bool.
1433 (full_match): Reverse sense of return type. Inline bits of old
1434 match_name here.
1435 (ada_add_block_symbols): Adjust to use lookup_name_info.
1436 (symbol_completion_match): Delete, folded into...
1437 (ada_lookup_name_info::matches): ... .this new method.
1438 (symbol_completion_add): Delete.
1439 (ada_collect_symbol_completion_matches): Add name_match_type
1440 parameter. Adjust to use lookup_name_info and
1441 completion_list_add_name.
1442 (get_var_value, ada_add_global_exceptions): Adjust to use
1443 lookup_name_info.
1444 (ada_get_symbol_name_cmp): Delete.
1445 (do_wild_match, do_full_match): New functions.
1446 (ada_lookup_name_info::ada_lookup_name_info): New method.
1447 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1448 functions.
1449 (ada_language_defn): Install ada_get_symbol_name_matcher.
1450 * ada-lex.l (processId): If name starts with '<', copy it
1451 verbatim.
1452 * block.c (block_iter_match_step, block_iter_match_first)
1453 (block_iter_match_next, block_lookup_symbol)
1454 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1455 lookup_name_info.
1456 * block.h (block_iter_match_first, block_iter_match_next)
1457 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1458 * c-lang.c (c_language_defn, cplus_language_defn)
1459 (asm_language_defn, minimal_language_defn): Adjust comments to
1460 refer to la_get_symbol_name_matcher.
1461 * completer.c (complete_files_symbols)
1462 (collect_explicit_location_matches, symbol_completer): Pass a
1463 symbol_name_match_type down.
1464 * completer.h (class completion_match, completion_match_result):
1465 New classes.
1466 (completion_tracker::reset_completion_match_result): New method.
1467 (completion_tracker::m_completion_match_result): New field.
1468 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1469 lookup_name_info.
1470 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1471 functions.
1472 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1473 * d-lang.c: Adjust comments to refer to
1474 la_get_symbol_name_matcher.
1475 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1476 Adjust to use lookup_name_info.
1477 (dict_iter_match_first, dict_iter_match_next)
1478 (iter_match_first_hashed, iter_match_next_hashed)
1479 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1480 with a lookup_name_info.
1481 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1482 Likewise.
1483 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1484 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1485 (gdb_index_symbol_name_matcher): New class.
1486 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1487 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1488 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1489 with a symbol_name_match_type.
1490 (f_language_defn): Adjust comments to refer to
1491 la_get_symbol_name_matcher.
1492 * go-lang.c (go_language_defn): Adjust comments to refer to
1493 la_get_symbol_name_matcher.
1494 * language.c (default_symbol_name_matcher)
1495 (language_get_symbol_name_matcher): New functions.
1496 (unknown_language_defn, auto_language_defn): Adjust comments to
1497 refer to la_get_symbol_name_matcher.
1498 * language.h (symbol_name_cmp_ftype): Delete.
1499 (language_defn) <la_collect_symbol_completion_matches>: Add match
1500 type parameter.
1501 <la_get_symbol_name_cmp>: Delete field.
1502 <la_get_symbol_name_matcher>: New field.
1503 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1504 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1505 Declare.
1506 * linespec.c (iterate_over_all_matching_symtabs)
1507 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1508 (find_methods): Add language parameter, and use lookup_name_info
1509 and the language's symbol_name_matcher_ftype.
1510 (linespec_complete_function): Adjust.
1511 (lookup_prefix_sym): Use lookup_name_info.
1512 (add_all_symbol_names_from_pspace): Adjust.
1513 (find_superclass_methods): Add language parameter and pass it
1514 down.
1515 (find_method): Pass symbol language down.
1516 (find_linespec_symbols): Don't demangle or Ada encode here.
1517 (search_minsyms_for_name): Add lookup_name_info parameter.
1518 (add_matching_symbols_to_info): Add name_match_type parameter.
1519 Use lookup_name_info.
1520 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1521 la_get_symbol_name_matcher.
1522 * minsyms.c: Include <algorithm>.
1523 (add_minsym_to_demangled_hash_table): Remove table parameter and
1524 add objfile parameter. Use search_name_hash, and add language to
1525 demangled languages vector.
1526 (struct found_minimal_symbols): New struct.
1527 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1528 New functions.
1529 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1530 input names here. Use lookup_name_info instead. Lookup up
1531 demangled names once for each language in the demangled names
1532 vector.
1533 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1534 demangled names once for each language in the demangled names
1535 vector.
1536 (build_minimal_symbol_hash_tables): Adjust.
1537 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1538 lookup_name_info.
1539 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1540 la_get_symbol_name_matcher.
1541 * objfiles.h: Include <vector>.
1542 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1543 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1544 la_get_symbol_name_matcher.
1545 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1546 la_get_symbol_name_matcher.
1547 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1548 (match_partial_symbol): Use symbol_name_match_type,
1549 lookup_name_info and psymbol_name_matches.
1550 (lookup_partial_symbol): Use lookup_name_info.
1551 (map_block): Use symbol_name_match_type and lookup_name_info.
1552 (psym_map_matching_symbols): Use symbol_name_match_type.
1553 (psymbol_name_matches): New.
1554 (recursively_search_psymtabs): Use lookup_name_info and
1555 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1556 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1557 'kind' parameter to 'domain'.
1558 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1559 la_get_symbol_name_matcher.
1560 * symfile-debug.c (debug_qf_map_matching_symbols)
1561 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1562 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1563 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1564 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1565 Adjust to use symbol_name_match_type.
1566 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1567 (expand_symtabs_matching): Adjust to use lookup_name_info.
1568 * symmisc.c (maintenance_expand_symtabs): Use
1569 lookup_name_info::match_any ().
1570 * symtab.c (symbol_matches_search_name): New.
1571 (eq_symbol_entry): Adjust to use lookup_name_info and the
1572 language's matcher.
1573 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1574 (lookup_name_info::match_any): New.
1575 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1576 (compare_symbol_name): Add language, lookup_name_info and
1577 completion_match_result parameters, and use them.
1578 (completion_list_add_name): Make extern. Add language and
1579 lookup_name_info parameters. Use them.
1580 (completion_list_add_symbol, completion_list_add_msymbol)
1581 (completion_list_objc_symbol): Add lookup_name_info parameters and
1582 adjust. Pass down language.
1583 (completion_list_add_fields): Add lookup_name_info parameters and
1584 adjust. Pass down language.
1585 (add_symtab_completions): Add lookup_name_info parameters and
1586 adjust.
1587 (default_collect_symbol_completion_matches_break_on): Add
1588 name_match_type parameter, and use it. Use lookup_name_info.
1589 (default_collect_symbol_completion_matches)
1590 (collect_symbol_completion_matches): Add name_match_type
1591 parameter, and pass it down.
1592 (collect_symbol_completion_matches_type): Adjust.
1593 (collect_file_symbol_completion_matches): Add name_match_type
1594 parameter, and use lookup_name_info.
1595 * symtab.h: Include <string> and "common/gdb_optional.h".
1596 (enum class symbol_name_match_type): New.
1597 (class ada_lookup_name_info): New.
1598 (struct demangle_for_lookup_info): New.
1599 (class lookup_name_info): New.
1600 (symbol_name_matcher_ftype): New.
1601 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1602 (symbol_matches_search_name): Declare.
1603 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1604 (default_collect_symbol_completion_matches)
1605 (collect_symbol_completion_matches)
1606 (collect_file_symbol_completion_matches): Add name_match_type
1607 parameter.
1608 (iterate_over_symbols): Use lookup_name_info.
1609 (completion_list_add_name): Declare.
1610 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1611 (strncmp_iw_with_mode): Now extern.
1612 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1613 (strncmp_iw_with_mode): Declare.
1614
5ffa0793
PA
16152017-11-08 Keith Seitz <keiths@redhat.com>
1616 Pedro Alves <palves@redhat.com>
1617
1618 * ada-lang.c (ada_language_defn): Install
1619 default_search_name_hash.
1620 * buildsym.c (struct buildsym_compunit): <language>: New field.
1621 (finish_block_internal): Pass language when creating dictionaries.
1622 (start_buildsym_compunit, start_symtab): New language parameters.
1623 Use them.
1624 (restart_symtab): Pass down compilation unit's language.
1625 * buildsym.h (enum language): Forward declare.
1626 (start_symtab): New 'language' parameter.
1627 * c-lang.c (c_language_defn, cplus_language_defn)
1628 (asm_language_defn, minimal_language_defn): Install
1629 default_search_name_hash.
1630 * coffread.c (coff_start_symtab): Adjust.
1631 * d-lang.c (d_language_defn): Install default_search_name_hash.
1632 * dbxread.c (struct symloc): Add 'pst_language' field.
1633 (PST_LANGUAGE): Define.
1634 (start_psymtab, read_ofile_symtab): Use it.
1635 (process_one_symbol): New 'language' parameter. Pass it down.
1636 * dictionary.c (struct dictionary) <language>: New field.
1637 (DICT_LANGUAGE): Define.
1638 (dict_create_hashed, dict_create_hashed_expandable)
1639 (dict_create_linear, dict_create_linear_expandable): New parameter
1640 'language'. Set the dictionary's language.
1641 (iter_match_first_hashed): Adjust to rename.
1642 (insert_symbol_hashed): Assert we don't see mismatching
1643 languages. Adjust to rename.
1644 (dict_hash): Rename to ...
1645 (default_search_name_hash): ... this and make extern.
1646 * dictionary.h (struct language_defn): Forward declare.
1647 (dict_create_hashed): New parameter 'language'.
1648 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1649 * f-lang.c (f_language_defn): Install default_search_name_hash.
1650 * go-lang.c (go_language_defn): Install default_search_name_hash.
1651 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1652 creation.
1653 * language.c (unknown_language_defn, auto_language_defn):
1654 * language.h (language_defn::la_search_name_hash): New field.
1655 (default_search_name_hash): Declare.
1656 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1657 * mdebugread.c (new_block): New parameter 'language'.
1658 * mdebugread.c (parse_symbol): Pass symbol language to block
1659 allocation.
1660 (psymtab_to_symtab_1): Pass down language.
1661 (new_symtab): Pass compunit's language to block allocation.
1662 * objc-lang.c (objc_language_defn): Install
1663 default_search_name_hash.
1664 * opencl-lang.c (opencl_language_defn):
1665 * p-lang.c (pascal_language_defn): Install
1666 default_search_name_hash.
1667 * rust-lang.c (rust_language_defn): Install
1668 default_search_name_hash.
1669 * stabsread.h (enum language): Forward declare.
1670 (process_one_symbol): Add 'language' parameter.
1671 * symtab.c (search_name_hash): New function.
1672 * symtab.h (search_name_hash): Declare.
1673 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1674
2a1dde5d
PA
16752017-11-08 Pedro Alves <palves@redhat.com>
1676
1677 * cp-name-parser.y (main): Don't initialize extra_chars.
1678
95a6b0a1
TT
16792017-11-07 Tom Tromey <tom@tromey.com>
1680
1681 * event-top.h (command_handler): Constify.
1682 * record-full.c (cmd_record_full_start): Update.
1683 * thread.c (thread_apply_all_command): Update.
1684 * printcmd.c (eval_command): Update.
1685 * mi/mi-main.c (mi_execute_cli_command): Update.
1686 (mi_execute_async_cli_command): Update.
1687 * tui/tui-stack.c (tui_update_command): Update.
1688 * cli/cli-interp.c (safe_execute_command): Constify.
1689 * record.c (record_start): Update.
1690 (record_start, record_stop, cmd_record_start): Update.
1691 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1692 (cmd_record_btrace_pt_start): Update.
1693 (cmd_record_btrace_start): Update.
1694 (cmd_record_btrace_start): Update.
1695 * reverse.c (exec_reverse_once): Update.
1696 * python/python.c (execute_gdb_command): Don't copy the command.
1697 * event-top.c (command_line_handler): Update.
1698 (command_handler): Constify.
1699 * defs.h (deprecated_call_command_hook): Constify.
1700 * cli/cli-script.h (execute_user_command): Constify.
1701 * cli/cli-script.c (execute_user_command): Constify.
1702 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1703 (enum command_control_type): Update.
1704 * main.c (catch_command_errors): Remove non-const overload.
1705 (catch_command_errors_ftype): Remove.
1706 * python/py-cmd.c (cmdpy_function): Constify.
1707 * guile/scm-cmd.c (cmdscm_function): Constify.
1708 * cli/cli-dump.c (call_dump_func): Constify.
1709 * cli/cli-decode.c (do_const_cfunc): Constify.
1710 (do_sfunc): Constify.
1711 (cmd_func): Constify.
1712 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1713 * top.h (execute_command): Constify.
1714 * top.c (execute_command): Constify.
1715 (execute_command_to_string): Constify.
1716 (deprecated_call_command_hook): Constify.
1717 * command.h (cmd_func): Constify.
1718 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1719
eb4c3f4a
TT
17202017-11-07 Tom Tromey <tom@tromey.com>
1721
1722 * ada-lang.c (catch_ada_exception_command): Constify.
1723 (catch_assert_command): Constify.
1724 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1725 (catch_rethrow_command): Constify.
1726 (catch_exception_command_1): Constify.
1727 * breakpoint.h (add_catch_command): Constify.
1728 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1729 (catch_syscall_split_args): Constify.
1730 * break-catch-sig.c (catch_signal_command): Constify.
1731 (catch_signal_split_args): Constify.
1732 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1733 cmd_const_sfunc_ftype.
1734 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1735 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1736 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1737 (add_setshow_string_cmd, struct cmd_list_element)
1738 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1739 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1740 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1741 Constify.
1742 (set_cmd_sfunc): Constify.
1743 (empty_sfunc): Constify.
1744 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1745 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1746 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1747 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1748 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1749 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1750 Constify.
1751 (set_cmd_sfunc): Constify.
1752 (cmd_sfunc_ftype): Remove.
1753 * compile/compile.c (set_compile_args): Constify.
1754 * infrun.c (set_disable_randomization): Constify.
1755 * infcmd.c (set_args_command, set_cwd_command): Constify.
1756 * breakpoint.c (set_condition_evaluation_mode): Constify.
1757 (add_catch_command): Constify.
1758 (catch_fork_command_1, catch_exec_command_1)
1759 (catch_load_command_1, catch_unload_command_1): Constify.
1760 (catch_load_or_unload): Constify.
1761 * guile/scm-param.c (pascm_set_func): Constify.
1762 (add_setshow_generic): Constify.
1763 * python/py-param.c (get_set_value): Constify.
1764 * top.h (set_verbose): Constify.
1765 * tui/tui-win.c (tui_set_var_cmd): Constify.
1766 * mi/mi-main.c (set_mi_async_command): Constify.
1767 * cli/cli-logging.c (set_logging_overwrite)
1768 (set_logging_redirect): Constify.
1769 * value.c (set_max_value_size): Constify.
1770 * valprint.c (set_input_radix, set_output_radix): Constify.
1771 * utils.c (set_width_command, set_height_command): Constify.
1772 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1773 * tracepoint.c (set_disconnected_tracing)
1774 (set_circular_trace_buffer, set_trace_buffer_size)
1775 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1776 * top.c (set_history_size_command, set_verbose, set_editing)
1777 (set_gdb_datadir, set_history_filename): Constify.
1778 * target.c (set_targetdebug, maint_set_target_async_command)
1779 (maint_set_target_non_stop_command, set_target_permissions)
1780 (set_write_memory_permission): Constify.
1781 (open_target): Constify.
1782 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1783 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1784 * symtab.c (set_symbol_cache_size_handler): Constify.
1785 * symfile.c (set_ext_lang_command): Constify.
1786 * symfile-debug.c (set_debug_symfile): Constify.
1787 * source.c (set_directories_command): Constify.
1788 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1789 * serial.c (set_parity): Constify.
1790 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1791 * remote.c (set_remote_exec_file, set_remotebreak)
1792 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1793 * record.c (set_record_insn_history_size)
1794 (set_record_call_history_size): Constify.
1795 * record-full.c (set_record_full_insn_max_num): Constify.
1796 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1797 * osabi.c (set_osabi): Constify.
1798 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1799 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1800 * maint.c (maintenance_set_profile_cmd): Constify.
1801 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1802 * language.c (set_language_command, set_range_command)
1803 (set_case_command): Constify.
1804 * infrun.c (set_non_stop, set_observer_mode)
1805 (set_stop_on_solib_events, set_schedlock_func)
1806 (set_exec_direction_func): Constify.
1807 * infcmd.c (set_inferior_tty_command): Constify.
1808 * disasm.c (set_disassembler_options_sfunc): Constify.
1809 * demangle.c (set_demangling_command): Constify.
1810 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1811 * cris-tdep.c (set_cris_version, set_cris_mode)
1812 (set_cris_dwarf2_cfi): Constify.
1813 * corefile.c (set_gnutarget_command): Constify.
1814 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1815 (set_target_wide_charset_sfunc): Constify.
1816 * breakpoint.c (update_dprintf_commands): Constify.
1817 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1818 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1819 (set_disassembly_style_sfunc): Constify.
1820 * arch-utils.c (set_endian, set_architecture): Constify.
1821 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1822 * agent.c (set_can_use_agent): Constify.
1823
5fed81ff
TT
18242017-11-07 Tom Tromey <tom@tromey.com>
1825
1826 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1827 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1828 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1829 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1830 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1831 (parse_int_arg, show_thread_default_detach_sc_cmd)
1832 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1833 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1834 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1835 (show_task_pause_cmd, set_task_detach_sc_cmd)
1836 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1837 (set_noninvasive_cmd, set_thread_pause_cmd)
1838 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1839 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1840 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1841 * windows-nat.c (display_selectors): Constify.
1842 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1843 non-const "cfunc".
1844 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1845 (cmd_cfunc_eq): Likewise.
1846 (struct cmd_list_element): Likewise.
1847 (do_cfunc): Remove.
1848 (cli_user_command_p): Update.
1849 * command.h (add_cmd): Remove non-const overload.
1850 (cmd_cfunc_ftype): Remove typedef.
1851 (cmd_cfunc_eq): Remove non-const overload.
1852 * value.c (show_values): Constify.
1853 * thread.c (thread_apply_all_command): Constify.
1854 * symfile.c (load_command): Constify.
1855 * source.c (directory_command): Constify.
1856 * maint.c (maintenance_internal_error)
1857 (maintenance_demangler_warning, maintenance_space_display)
1858 (maintenance_print_architecture, maintenance_translate_address)
1859 (maintenance_info_selftests, maintenance_internal_warning):
1860 Constify.
1861 * breakpoint.c (disable_trace_command, enable_trace_command):
1862 Constify.
1863 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1864 Constify.
1865 (add_auto_load_safe_path): Constify.
1866 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1867 * top.h (show_commands): Constify.
1868 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1869 * sparc64-tdep.c (adi_examine_command): Constify.
1870 (adi_assign_command): Constify.
1871
1d12d88f
TT
18722017-11-07 Tom Tromey <tom@tromey.com>
1873
1874 * frame.h (info_locals_command, info_args_command): Constify.
1875 * auto-load.h (auto_load_info_scripts): Constify.
1876 * inferior.h (registers_info): Constify.
1877 * copying.c: Rebuild.
1878 * copying.awk: Constify generated commands.
1879 * auto-load.c (auto_load_info_scripts)
1880 (info_auto_load_gdb_scripts): Constify.
1881 * cli/cli-decode.c (struct cmd_list_element): Take a
1882 cmd_const_cfunc_ftype.
1883 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1884 * tui/tui-win.c (tui_all_windows_info): Constify.
1885 * python/py-auto-load.c (info_auto_load_python_scripts):
1886 Constify.
1887 * cli/cli-cmds.c (show_command): Remove non-const overload.
1888 * tracepoint.c (info_tvariables_command, info_scope_command):
1889 Constify.
1890 (info_static_tracepoint_markers_command): Constify.
1891 * thread.c (info_threads_command): Constify.
1892 (print_thread_info_1): Constify.
1893 * target.c (info_target_command): Constify.
1894 * symtab.c (info_sources_command, info_functions_command)
1895 (info_types_command): Constify.
1896 (info_variables_command): Remove non-const overload.
1897 * symfile.c (info_ext_lang_command): Constify.
1898 * stack.c (info_frame_command, info_locals_command)
1899 (info_args_command): Constify.
1900 (backtrace_command): Remove non-const overload.
1901 * source.c (info_source_command, info_line_command): Constify.
1902 * solib.c (info_sharedlibrary_command): Constify.
1903 * skip.c (info_skip_command): Constify.
1904 * ser-go32.c (info_serial_command): Constify.
1905 * reverse.c (info_bookmarks_command): Constify.
1906 * printcmd.c (info_symbol_command, info_address_command)
1907 (info_display_command): Constify.
1908 * osdata.c (info_osdata_command): Constify.
1909 * objc-lang.c (info_selectors_command, info_classes_command):
1910 Constify.
1911 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1912 * memattr.c (info_mem_command): Constify.
1913 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1914 * linux-fork.c (info_checkpoints_command): Constify.
1915 * infrun.c (info_signals_command): Constify.
1916 * inflow.c (info_terminal_command): Constify.
1917 * inferior.c (info_inferiors_command): Constify.
1918 (print_inferior): Constify.
1919 * infcmd.c (info_program_command, info_all_registers_command)
1920 (info_registers_command, info_vector_command)
1921 (info_float_command): Constify.
1922 (registers_info): Constify.
1923 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1924 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1925 Constify.
1926 * f-valprint.c (info_common_command): Constify.
1927 * dcache.c (info_dcache_command): Constify.
1928 (dcache_info_1): Constify.
1929 * darwin-nat-info.c (info_mach_tasks_command)
1930 (info_mach_task_command, info_mach_ports_command)
1931 (info_mach_port_command, info_mach_threads_command)
1932 (info_mach_thread_command, info_mach_regions_command)
1933 (info_mach_regions_recurse_command, info_mach_region_command)
1934 (info_mach_exceptions_command): Constify.
1935 (get_task_from_args): Constify.
1936 * cp-support.c (info_vtbl_command): Constify.
1937 * breakpoint.c (info_watchpoints_command)
1938 (info_tracepoints_command): Constify.
1939 (info_breakpoints_command): Remove non-const overload.
1940 * avr-tdep.c (avr_io_reg_read_command): Constify.
1941 * auxv.c (info_auxv_command): Constify.
1942 * ada-tasks.c (info_tasks_command): Constify.
1943 (info_task): Constify.
1944 * ada-lang.c (info_exceptions_command): Constify.
1945
0b39b52e
TT
19462017-11-07 Tom Tromey <tom@tromey.com>
1947
1948 * solib.h (no_shared_libraries): Constify.
1949 * frame.h (return_command): Constify.
1950 * cli/cli-cmds.h (quit_command): Constify.
1951 * top.h (quit_command, execute_command): Constify.
1952 * target.h (flash_erase_command): Constify.
1953 * inferior.h (set_inferior_args, attach_command): Constify.
1954 * tracepoint.h (start_tracing, stop_tracing): Constify.
1955 * breakpoint.h (break_command, tbreak_command)
1956 (hbreak_command_wrapper, thbreak_command_wrapper)
1957 (rbreak_command_wrapper, watch_command_wrapper)
1958 (awatch_command_wrapper, rwatch_command_wrapper)
1959 (get_tracepoint_by_number): Constify.
1960 * symtab.c (info_variables_command, rbreak_command)
1961 (symtab_symbol_info): Constify.
1962 (info_variables_command): Add non-const overload.
1963 * top.c (dont_repeat_command): Constify.
1964 * breakpoint.c (ignore_command, commands_command)
1965 (condition_command, tbreak_command, hbreak_command)
1966 (thbreak_command, clear_command, break_command)
1967 (info_breakpoints_command, watch_command, rwatch_command)
1968 (awatch_command, trace_command, ftrace_command, strace_command)
1969 (trace_pass_command, break_range_command, dprintf_command)
1970 (agent_printf_command, get_tracepoint_by_number)
1971 (watch_maybe_just_location, trace_pass_command): Constify.
1972 (info_breakpoints_command): Add non-const overload.
1973 * tracefile.c (tsave_command): Constify.
1974 * infcmd.c (attach_command, disconnect_command, signal_command)
1975 (queue_signal_command, stepi_command, nexti_command)
1976 (finish_command, next_command, step_command, until_command)
1977 (advance_command, jump_command, continue_command, run_command)
1978 (start_command, starti_command, interrupt_command)
1979 (run_command_1, set_inferior_args, step_1): Constify.
1980 * inferior.c (add_inferior_command, remove_inferior_command)
1981 (clone_inferior_command): Constify.
1982 * linux-fork.c (checkpoint_command, restart_command): Constify.
1983 * windows-nat.c (signal_event_command): Constify.
1984 * guile/guile.c (guile_repl_command, guile_command): Constify.
1985 * printcmd.c (x_command, display_command, printf_command)
1986 (output_command, set_command, call_command, print_command)
1987 (eval_command): Constify.
1988 (non_const_set_command): Remove.
1989 (_initialize_printcmd): Update.
1990 * source.c (forward_search_command, reverse_search_command):
1991 Constify.
1992 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1993 Constify.
1994 * infrun.c (handle_command): Constify.
1995 * memattr.c (mem_command): Constify.
1996 * stack.c (return_command, up_command, up_silently_command)
1997 (down_command, down_silently_command, frame_command)
1998 (backtrace_command, func_command, backtrace_command_1): Constify.
1999 (backtrace_command): Add non-const overload.
2000 * remote-sim.c (simulator_command): Constify.
2001 * exec.c (set_section_command): Constify.
2002 * tracepoint.c (tdump_command, trace_variable_command)
2003 (tstatus_command, tstop_command, tstart_command)
2004 (end_actions_pseudocommand, while_stepping_pseudocommand)
2005 (collect_pseudocommand, teval_pseudocommand, actions_command)
2006 (start_tracing, stop_tracing): Constify.
2007 * value.c (init_if_undefined_command): Constify.
2008 * tui/tui-stack.c (tui_update_command): Constify.
2009 * tui/tui-win.c (tui_refresh_all_command)
2010 (tui_set_tab_width_command, tui_set_win_height_command)
2011 (tui_set_focus_command, tui_scroll_forward_command)
2012 (tui_scroll_backward_command, tui_scroll_left_command)
2013 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2014 (tui_set_win_height): Constify.
2015 * tui/tui-layout.c (tui_layout_command): Constify.
2016 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2017 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2018 (proc_untrace_sysexit_cmd): Constify.
2019 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2020 (threadset_test_cmd, threadlist_update_test_cmd)
2021 (threadalive_test): Constify.
2022 * objc-lang.c (print_object_command): Constify.
2023 * command.h (add_com): Constify.
2024 * cli/cli-dump.c (restore_command): Constify.
2025 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2026 (help_command, complete_command, shell_command, edit_command)
2027 (list_command, disassemble_command, make_command)
2028 (apropos_command, alias_command): Constify.
2029 * cli/cli-script.c (document_command, define_command)
2030 (while_command, if_command, validate_comname): Constify.
2031 * cli/cli-decode.c (struct cmd_list_element): Change type of
2032 "fun".
2033 * target.c (do_monitor_command, flash_erase_command): Constify.
2034 * regcache.c (reg_flush_command): Constify.
2035 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2036 (reverse_nexti, reverse_continue, reverse_finish)
2037 (save_bookmark_command, goto_bookmark_command)
2038 (exec_reverse_once): Constify.
2039 * python/python.c (python_interactive_command, python_command):
2040 Constify.
2041 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2042 Constify.
2043 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2044 * gcore.c (gcore_command): Constify.
2045
85c4be7c
TT
20462017-11-07 Tom Tromey <tom@tromey.com>
2047
2048 * printcmd.c (x_command): Call set_repeat_arguments.
2049 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2050 * top.c (repeat_arguments): New global.
2051 (set_repeat_arguments): New function.
2052 (execute_command): Handle repeat_arguments.
2053 (show_commands): Calls set_repeat_arguments.
2054 * command.h (set_repeat_arguments): Declare.
2055
022643b4
TT
20562017-11-07 Tom Tromey <tom@tromey.com>
2057
2058 * stack.c (backtrace_command): Use std::string.
2059 (backtrace_command_1): Make "count_exp" const.
2060
5614fb77
TT
20612017-11-07 Tom Tromey <tom@tromey.com>
2062
2063 * source.c (directory_switch, mod_path, add_path): Constify.
2064 * defs.h (add_path, mod_path, directory_switch): Constify.
2065 * mi/mi-cmd-env.c (env_mod_path): Constify.
2066
6be9a197
TT
20672017-11-07 Tom Tromey <tom@tromey.com>
2068
2069 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2070 (run_command_1, continue_command, step_1, jump_command)
2071 (signal_command, until_command, advance_command, finish_command)
2072 (attach_command): Update.
2073
c2252c0d
TT
20742017-11-07 Tom Tromey <tom@tromey.com>
2075
2076 * command.h (set_cmd_cfunc): Don't declare.
2077 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2078
1ee870c5
TT
20792017-11-07 Tom Tromey <tom@tromey.com>
2080
2081 * stack.c (select_frame_command): Constify.
2082 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2083 * command.h (add_com_suppress_notification): Constify.
2084
ee7ddd71
TT
20852017-11-07 Tom Tromey <tom@tromey.com>
2086
2087 * breakpoint.c (stop_command): Constify.
2088 * cli/cli-decode.c (struct cmd_list_element): Constify.
2089 * command.h (add_abbrev_prefix_cmd): Constify.
2090
95e95a6d
PA
20912017-11-07 Pedro Alves <palves@redhat.com>
2092
2093 * breakpoint.c (extract_bp_kind): New enum.
2094 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2095 factored out from ...
2096 (extract_bp_number_and_location): ... here.
2097 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2098
cc638e86
PA
20992017-11-07 Pedro Alves <palves@redhat.com>
2100
2101 * breakpoint.c (extract_bp_number_and_location): Change return
2102 type to void. Throw error instead of warning.
2103 (enable_disable_command): Adjust.
2104
d0fe4701
XR
21052017-11-07 Xavier Roirand <roirand@adacore.com>
2106 Pedro Alves <palves@redhat.com>
2107
2108 * breakpoint.c (map_breakpoint_number_range): New, factored out
2109 from ...
2110 (map_breakpoint_numbers): ... here.
2111 (find_location_by_number): Change parameters from string to
2112 breakpoint number and location.
2113 (extract_bp_number_and_location): New function.
2114 (enable_disable_bp_num_loc)
2115 (enable_disable_breakpoint_location_range)
2116 (enable_disable_command): New functions, factored out ...
2117 (enable_command, disable_command): ... these functions, and
2118 adjusted to support ranges.
2119 * NEWS: Document enable/disable breakpoint location range feature.
2120
635dc5b2
LM
21212017-11-06 Luis Machado <luis.machado@linaro.org>
2122
2123 * MAINTAINERS (Write After Approval): Update my e-mail address.
2124
556e5da5
PA
21252017-11-06 Pedro Alves <palves@redhat.com>
2126
2127 * gnu-nat.c (gnu_terminal_init): Delete.
2128 (gnu_target): Don't install gnu_terminal_init.
2129 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2130 (child_terminal_init): ... this function.
2131
d1928160
PA
21322017-11-06 Pedro Alves <palves@redhat.com>
2133
2134 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2135 sgtty.h.
2136 * config.in, configure: Regenerate.
2137
6aa899ce
PA
21382017-11-06 Pedro Alves <palves@redhat.com>
2139
2140 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2141 (async_init_signals): Adjust.
2142 (handle_stop_sig): Rename to ...
2143 (handle_sigtstp): ... this.
2144 (async_stop_sig): Rename to ...
2145 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2146 SIGTSTP path.
2147 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2148 instead of STOP_SIGNAL thoughout.
2149 (handle_stop_sig): Rename to ...
2150 (handle_sigtstp): ... this.
2151 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2152
a94799ac
PA
21532017-11-06 Pedro Alves <palves@redhat.com>
2154
2155 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2156 longer set flags twice in row.
2157
726e1356
PA
21582017-11-06 Pedro Alves <palves@redhat.com>
2159
2160 * Makefile.in (SER_HARDWIRE): Update comment.
2161 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2162 * common/gdb_termios.h: Delete file.
2163 * common/job-control.c: Include termios.h and unistd.h instead of
2164 gdb_termios.h.
2165 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2166 check.
2167 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2168 Remove sgtty code.
2169 * configure.ac: No longer check for termio.h and sgtty.h.
2170 * configure: Regenerate.
2171 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2172 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2173 Replace PROCESS_GROUP_TYPE references with pid_t references
2174 throughout.
2175 (gdb_getpgrp): Delete.
2176 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2177 (child_terminal_inferior): Remove comment. Remove sgtty code.
2178 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2179 gdb_getpgrp. Use serial_set_tty_state instead aof
2180 serial_noflush_set_tty_state. Remove sgtty code.
2181 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2182 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2183 (inferior_process_group): Now returns pid_t.
2184 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2185 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2186 * ser-event.c (serial_event_ops): Update.
2187 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2188 (dos_ops): Update.
2189 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2190 * ser-pipe.c (pipe_ops): Update.
2191 * ser-tcp.c (tcp_ops): Update.
2192 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2193 HAVE_TERMIOS checks.
2194 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2195 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2196 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2197 assume termios.
2198 (hardwire_noflush_set_tty_state): Delete.
2199 (hardwire_print_tty_state, hardwire_drain_output)
2200 (hardwire_flush_output, hardwire_flush_input)
2201 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2202 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2203 code, and assume termios.
2204 (hardwire_ops): Update.
2205 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2206 * serial.c (serial_noflush_set_tty_state): Delete.
2207 * serial.h (serial_noflush_set_tty_state): Delete.
2208 (serial_ops::noflush_set_tty_state): Delete.
2209
1cfb73db
UW
22102017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2211
2212 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2213 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2214 (COMMON_OBS): Remove doublest.o and dfp.o.
2215 Do not build target-float.c (instead of doublest.c)
2216 with -Wformat-nonliteral.
2217
2218 * doublest.c: Remove file.
2219 * doublest.h: Remove file.
2220 * dfp.c: Remove file.
2221 * dfp.h: Remove file.
2222
2223 * target-float.c: Do not include "doublest.h" and "dfp.h".
2224 (DOUBLEST): Move here from doublest.h.
2225 (enum float_kind): Likewise.
2226 (FLOATFORMAT_CHAR_BIT): Likewise.
2227 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2228 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2229 (floatformat_precision): Likewise.
2230 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2231 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2232 Likewise.
2233 (host_float_format, host_double_format, host_long_double_format):
2234 Likewise.
2235 (floatformat_to_string, floatformat_from_string): Likewise.
2236 (floatformat_to_doublest): Likewise. Also, inline the original
2237 convert_floatformat_to_doublest.
2238 (floatformat_from_doublest): Likewise. Also, inline the original
2239 convert_floatformat_from_doublest.
2240
2241 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2242 (MAX_DECIMAL_STRING): Move here from dfp.c.
2243 (match_endianness): Likewise.
2244 (set_decnumber_context, decimal_check_errors): Likewise.
2245 (decimal_from_number, decimal_to_number): Likewise.
2246 (decimal_to_string, decimal_from_string): Likewise. Make static.
2247 (decimal_from_longest, decimal_from_ulongest): Likewise.
2248 (decimal_to_longest): Likewise.
2249 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2250 (decimal_convert): Likewise.
2251
b07e9c46
UW
22522017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2253
2254 * doublest.c: Do not include "gdbtypes.h".
2255 (extract_typed_floating): Remove.
2256 (store_typed_floating): Remove.
2257 (convert_typed_floating): Remove.
2258 * doublest.h (struct type): Remove.
2259 (DOUBLEST_PRINT_FORMAT): Remove.
2260 (DOUBLEST_SCAN_FORMAT): Remove.
2261 (extract_typed_floating): Remove.
2262 (store_typed_floating): Remove.
2263 (convert_typed_floating): Remove.
2264
2265 * dfp.c (decimal_from_doublest): Remove.
2266 (decimal_to_doublest): Remove.
2267 * dfp.h: Do not include "doublest.h".
2268 (decimal_from_doublest): Remove.
2269 (decimal_to_doublest): Remove.
2270
2271 * value.c: Do not include "doublest.h" and "dfp.h".
2272 (value_as_double): Remove.
2273 (unpack_double): Remove.
2274 (value_from_double): Remove.
2275 (value_from_decfloat): Remove.
2276 * value.h: Do not include "doublest.h".
2277 (value_as_double): Remove.
2278 (unpack_double): Remove.
2279 (value_from_double): Remove.
2280 (value_from_decfloat): Remove.
2281
3b2ca824
UW
22822017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2283
2284 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2285 (i386_extract_return_value): Use target_float_convert.
2286 (i386_store_return_value): Likewise.
2287 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2288 (i387_value_to_register): Likewise.
2289 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2290 (ia64_register_to_value): Use target_float_convert.
2291 (ia64_value_to_register): Likewise.
2292 (ia64_extract_return_value): Likewise.
2293 (ia64_store_return_value): Likewise.
2294 (ia64_push_dummy_call): Likewise.
2295 * m68k-tdep.c: Include "target-float.h".
2296 (m68k_register_to_value): Use target_float_convert.
2297 (m68k_value_to_register): Likewise.
2298 (m68k_svr4_extract_return_value): Likewise.
2299 (m68k_svr4_store_return_value): Likewise.
2300 * ppc-sysv-tdep.c: Include "target-float.h".
2301 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2302 (do_ppc_sysv_return_value): Likewise.
2303 (ppc64_sysv_abi_push_freg): Likewise.
2304 (ppc64_sysv_abi_return_value_base): Likewise.
2305 * rs6000-aix-tdep.c: Include "target-float.h".
2306 (rs6000_push_dummy_call): Use target_float_convert.
2307 (rs6000_return_value): Likewise.
2308 * rs6000-lynx178-tdep.c: Include "target-float.h".
2309 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2310 (rs6000_lynx178_return_value): Likewise.
2311 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2312 (rs6000_register_to_value): Use target_float_convert.
2313 (rs6000_value_to_register): Likewise.
2314 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2315 (arm_extract_return_value): Use target_float_convert.
2316 (arm_store_return_value): Likewise.
2317 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2318 (sh_register_convert_to_virtual): Use target_float_convert.
2319 (sh_register_convert_to_raw): Likewise.
2320 * sh64-tdep.c: Include "target-float.h".
2321 (sh64_extract_return_value): Use target_float_convert.
2322 (sh64_register_convert_to_virtual): Likewise.
2323 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2324
14ad9311
UW
23252017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2326
2327 * target-float.c (floatformat_to_host_double): New function.
2328 (floatformat_from_host_double): Likewise.
2329 (target_float_to_host_double): Likewise.
2330 (target_float_from_host_double): Likewise.
2331 * target-float.h (target_float_to_host_double): Add prototype.
2332 (target_float_from_host_double): Likewise.
2333
2334 * guile/scm-value.c: Include "target-float.h".
2335 (gdbscm_value_to_real): Use target_float_to_host_double.
2336 Handle integer source values via value_as_long.
2337 * guile/scm-math.c: Include "target-float.h". Do not include
2338 "doublest.h", "dfp.h", and "expression.h".
2339 (vlscm_convert_typed_number): Use target_float_from_host_double.
2340 (vlscm_convert_number): Likewise.
2341
2342 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2343 (convert_value_from_python): Use target_float_from_host_double.
2344
50eff16b
UW
23452017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2346
2347 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2348 (cast_from_fixed): Likewise.
2349 (ada_scaling_type): New function.
2350 (ada_delta): Return value instead of DOUBLEST. Perform target
2351 arithmetic instead of host arithmetic.
2352 (scaling_factor): Rename to ...
2353 (ada_scaling_factor) ... this. Make non-static. Return value instead
2354 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2355 (ada_fixed_to_float): Remove.
2356 (ada_float_to_fixed): Remove.
2357 * ada-lang.h (ada_fixed_to_float): Remove.
2358 (ada_float_to_fixed): Remove.
2359 (ada_delta): Return value instead of DOUBLEST.
2360 (ada_scaling_factor): Add prototype.
2361
2362 * ada-typeprint.c: Include "target-float.h".
2363 (print_fixed_point_type): Perform target arithmetic instead of
2364 host arithmetic.
2365 * ada-valprint.c: Include "target-float.h".
2366 (ada_val_print_num): Perform target arithmetic instead of
2367 host arithmetic for fixed-point types.
2368
66c02b9e
UW
23692017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2370
2371 * target-float.c: Include <math.h>.
2372 (floatformat_binop): New function.
2373 (floatformat_compare): Likewise.
2374 (target_float_binop): Likewise.
2375 (target_float_compare): Likewise.
2376 * target-float.h: Include "expression.h".
2377 (target_float_binop): Add prototype.
2378 (target_float_compare): Likewise.
2379
2380 * valarith.c: Do not include "doublest.h" and "dfp.h".
2381 Include "common/byte-vector.h".
2382 (value_args_as_decimal): Remove, replace by ...
2383 (value_args_as_target_float): ... this function. Handle both
2384 binary and decimal target floating-point formats.
2385 (scalar_binop): Handle both binary and decimal FP using
2386 value_args_as_target_float and target_float_binop.
2387 (value_equal): Handle both binary and decimal FP using
2388 value_args_as_target_float and target_float_compare.
2389 (value_less): Likewise.
2390 (value_pos): Handle all scalar types as simple copy.
2391 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2392 * dfp.c (decimal_binop): Throw error instead of internal_error
2393 when called with an unsupported operation code.
2394
f69fdf9b
UW
23952017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2396
2397 * target-float.c (target_float_to_string): New function.
2398 (target_float_from_string): New function.
2399 * target-float.h (target_float_to_string): Add prototype.
2400 (target_float_from_string): Add prototype.
2401
2402 * valprint.c: Include "target-float.h". Do not include
2403 "doublest.h" and "dfp.h".
2404 (print_floating): Use target_float_to_string.
2405 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2406 (printf_floating): Use target_float_to_string.
2407 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2408 (print_i387_value): Use target_float_to_string.
2409 * mips-tdep.c: Include "target-float.h".
2410 (mips_print_fp_register): Use target_float_to_string.
2411 * sh64-tdep.c: Include "target-float.h".
2412 (sh64_do_fp_register): Use target_float_to_string.
2413
2414 * parse.c: Include "target-float.h". Do not include
2415 "doublest.h" and "dfp.h".
2416 (parse_float): Use target_float_from_string.
2417 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2418 (define_symbol): Use target_float_from_string.
2419 * gdbarch-selftests.c: Include "target-float.h".
2420 (register_to_value_test): Use target_float_from_string.
2421
70100014
UW
24222017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2423
2424 * Makefile.c (SFILES): Add target-float.c.
2425 (HFILES_NO_SRCDIR): Add target-float.h.
2426 (COMMON_OBS): Add target-float.o.
2427 * target-float.h: New file.
2428 * target-float.c: New file.
2429
2430 * doublest.c (floatformat_classify): Fix detection of float_zero.
2431
2432 * gdbtypes.c (is_floating_type): New function.
2433 * gdbtypes.h (is_floating_type): Add prototype.
2434
2435 * value.c: Do not include "floatformat.h".
2436 (unpack_double): Use target_float_is_valid.
2437 (is_floating_value): New function.
2438 * value.h (is_floating_value): Add prototype-
2439
2440 * valarith.c: Include "target-float.h".
2441 (value_logical_not): Use target_float_is_zero.
2442
2443 * python/py-value.c: Include "target-float.h".
2444 (valpy_nonzero): Use target_float_is_zero.
2445
ab4b1c46
TT
24462017-11-04 Tom Tromey <tom@tromey.com>
2447
2448 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2449
454dafbd
TT
24502017-11-04 Tom Tromey <tom@tromey.com>
2451
2452 * breakpoint.c (set_momentary_breakpoint): Return
2453 breakpoint_up.
2454 (until_break_command): Update.
2455 (new_until_break_fsm): Change argument types to
2456 breakpoint_up.
2457 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2458 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2459 Remove.
2460 * infcmd.c (finish_forward): Update.
2461 * breakpoint.h (set_momentary_breakpoint)
2462 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2463 (make_cleanup_delete_breakpoint): Remove.
2464 (struct breakpoint_deleter): New.
2465 (breakpoint_up): New typedef.
2466 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2467 (insert_exception_resume_breakpoint): Update.
2468 (insert_exception_resume_from_probe): Update.
2469 (insert_longjmp_resume_breakpoint): Update.
2470 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2471 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2472 * infcall.c (call_function_by_hand_dummy): Update
2473
331b71e5
TT
24742017-11-04 Tom Tromey <tom@tromey.com>
2475
2476 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2477
9f584b37
TT
24782017-11-04 Tom Tromey <tom@tromey.com>
2479
2480 * linux-tdep.c (linux_core_info_proc_mappings): Use
2481 gdb::def_vector.
2482 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2483 "size" argument.
2484 (linux_corefile_thread): Update.
2485 (linux_make_corefile_notes): Remove unused variable.
2486
779bc38e
TT
24872017-11-04 Tom Tromey <tom@tromey.com>
2488
2489 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2490 gdb::byte_vector.
2491
ed2b3126
TT
24922017-11-04 Tom Tromey <tom@tromey.com>
2493
2494 * objfiles.c (do_free_objfile_cleanup): Remove.
2495 * compile/compile-object-load.c (compile_object_load): Update.
2496 * objfiles.h (make_cleanup_free_objfile): Remove.
2497
7f6743fd
TT
24982017-11-04 Tom Tromey <tom@tromey.com>
2499
2500 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2501 (adi_read_versions): Change "tags" to "gdb_byte *".
2502 (adi_print_versions): Likewise.
2503
c80049d3
TT
25042017-11-04 Tom Tromey <tom@tromey.com>
2505
2506 * breakpoint.c
2507 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2508 from start_rbreak_breakpoints.
2509 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2510 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2511 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2512 * symtab.c (do_end_rbreak_breakpoints): Remove.
2513 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2514
167b0be1
TT
25152017-11-04 Tom Tromey <tom@tromey.com>
2516
2517 * cp-namespace.c (reset_directive_searched): Remove.
2518 (cp_lookup_symbol_via_imports): Use scoped_restore.
2519 * cp-support.c (reset_directive_searched): Remove.
2520 (make_symbol_overload_list_using): Use scoped_restore.
2521 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2522 (reset_directive_searched): Remove.
2523
5eae7aea
TT
25242017-11-04 Tom Tromey <tom@tromey.com>
2525
2526 * symfile.c (find_separate_debug_file_by_debuglink): Use
2527 unique_xmalloc_ptr.
2528
c6bcad5f
TT
25292017-11-04 Tom Tromey <tom@tromey.com>
2530
2531 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2532 type of "info".
2533 (compute_stack_depth): Likewise.
2534 (do_compile_dwarf_expr_to_c): Use std::vector.
2535
20dcd8ca
TT
25362017-11-04 Tom Tromey <tom@tromey.com>
2537
2538 * compile/compile-object-load.c (link_callbacks_einfo): Use
2539 std::string.
2540
33c7c59d
TT
25412017-11-04 Tom Tromey <tom@tromey.com>
2542
2543 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2544 Use scoped_free_pendings.
2545 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2546 scoped_free_pendings.
2547 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2548 (xcoff_initial_scan): Likewise.
2549 * buildsym.c (reset_symtab_globals): Update comment.
2550 (scoped_free_pendings): Rename from really_free_pendings.
2551 (prepare_for_building): Update comment.
2552 (buildsym_init): Likewise.
2553 * buildsym.h (class scoped_free_pendings): New class.
2554 (really_free_pendings): Don't declare.
2555
67fa57cf
UW
25562017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2557
2558 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2559 output when converting a zero value to a special byteorder format.
2560
f26ae15b
YQ
25612017-11-02 Yao Qi <yao.qi@linaro.org>
2562
2563 * frame.c (do_frame_register_read): Remove aspace.
2564 * jit.c (jit_frame_sniffer): Likwise.
2565 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2566 * regcache.c (regcache::regcache): Pass nullptr.
2567 (regcache_print): Caller updated.
2568 * regcache.h (regcache::regcache): Remove one constructor
2569 parameter aspace.
2570
6c6e9412
YQ
25712017-11-02 Yao Qi <yao.qi@linaro.org>
2572
2573 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2574
8b86c959
YQ
25752017-11-02 Yao Qi <yao.qi@linaro.org>
2576
2577 * breakpoint.c (insert_single_step_breakpoints): Update.
2578 * frame.c (struct frame_info) <aspace>: Add const.
2579 (frame_save_as_regcache): Add const.
2580 (get_frame_address_space): Return const address_space *.
2581 * frame.h (get_frame_address_space): Update declaration.
2582 * infrun.c (struct step_over_info) <aspace>: Add const.
2583 (set_step_over_info): Make aspace const.
2584 (displaced_step_prepare_throw): Change variable const.
2585 (resume): Likewise.
2586 (proceed): Likewise.
2587 (adjust_pc_after_break): Likewise.
2588 (save_waitstatus): Likewise.
2589 (handle_signal_stop): Likewise.
2590 (keep_going_pass_signal): Likewise.
2591 * jit.c (jit_frame_sniffer): Add const.
2592 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2593 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2594 * record-full.c (record_full_wait_1): Likewise.
2595 * regcache.c (regcache::regcache): Change parameter to const.
2596 * regcache.h (regcache::regcache): Likewise.
2597 (regcache::aspace): Return const address_space *.
2598 (regcache) <m_aspace>: Add const.
2599
a01bda52
YQ
26002017-11-02 Yao Qi <yao.qi@linaro.org>
2601
2602 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2603 * frame.c (create_sentinel_frame): Likewise.
2604 * infrun.c (displaced_step_prepare_throw): Likewise.
2605 (resume): Likewise.
2606 (thread_still_needs_step_over_bp): Likewise.
2607 (proceed): Likewise.
2608 (do_target_wait): Likewise.
2609 (adjust_pc_after_break): Likewise.
2610 (handle_syscall_event): Likewise.
2611 (save_waitstatus): Likewise.
2612 (handle_inferior_event_1): Likewise.
2613 (handle_signal_stop): Likewise.
2614 (keep_going_pass_signal): Likewise.
2615 * linux-nat.c (status_callback): Likewise.
2616 (save_stop_reason): Likewise.
2617 (resume_stopped_resumed_lwps): Likewise.
2618 * record-full.c (record_full_exec_insn): Likewise.
2619 (record_full_wait_1): Likewise.
2620 * regcache.c (get_regcache_aspace): Remove.
2621 * regcache.h (get_regcache_aspace): Remove.
2622
d999647b
YQ
26232017-11-02 Yao Qi <yao.qi@linaro.org>
2624
2625 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2626 (init_regcache_descr): Use gdbarch_num_regs.
2627 (regcache::regcache): Likewise.
2628 (regcache::get_register_status): Likewise.
2629 (regcache::assert_raw_regnum): Likewise.
2630 (regcache::cooked_read): Likewise.
2631 (regcache::cooked_read_value): Likewise.
2632 (regcache::cooked_write): Likewise.
2633 (regcache::dump): Likewise.
2634 (regcache::num_raw_registers): New method.
2635 * regcache.h (class regcache) <num_raw_registers>: New.
2636
4e888c28
YQ
26372017-11-02 Yao Qi <yao.qi@linaro.org>
2638
2639 * regcache.c (regcache::assert_regnum): New method.
2640 (regcache::invalidate): Call assert_regnum.
2641 (regcache::raw_update): Likewise.
2642 (regcache::raw_write): Likewise.
2643 (regcache::raw_read_part): Likewise.
2644 (regcache::raw_write_part): Likewise.
2645 (regcache::raw_supply): Likewise.
2646 (regcache::raw_supply_integer): Likewise.
2647 (regcache::raw_supply_zeroed): Likewise.
2648 (regcache::raw_collect): Likewise.
2649 (regcache::raw_collect_integer): Likewise.
2650 * regcache.h (regcache::assert_regnum): Declare.
2651
2e1b49b3
YQ
26522017-11-02 Yao Qi <yao.qi@linaro.org>
2653
2654 * regcache.c (regcache::dump): Remove code.
2655
6c5218df
YQ
26562017-11-02 Yao Qi <yao.qi@linaro.org>
2657
2658 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2659 Remove.
2660 <sizeof_cooked_register_status>: Remove.
2661 (init_regcache_descr): Update.
2662 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2663 (regcache::save): Likewise.
2664 (regcache::dump): Likewise.
2665
dcc31d28
JB
26662017-11-01 James Bowman <james.bowman@ftdichip.com>
2667
2668 * ft32-tdep.c (ft32_fetch_instruction): New function.
2669 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2670
3a87ae65
SM
26712017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2672
2673 * cli/cli-script.c (execute_control_command): Rename to ...
2674 (execute_control_command_1): ... this.
2675 (execute_control_command): New function.
2676
09b847f3
SM
26772017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2678
2679 * tracepoint.c (tfind_command): Remove const_cast.
2680
f871c485
MG
26812017-10-30 Mike Gulick <mgulick@mathworks.com>
2682
2683 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2684
b020ff80
SM
26852017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2686
2687 * common/common-utils.h (in_inclusive_range): New function.
2688 * arm-tdep.c (arm_record_extension_space): Use
2689 in_inclusive_range.
2690 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2691 * cris-tdep.c (cris_spec_reg_applicable): Use
2692 in_inclusive_range.
2693
1b81856f
PA
26942017-10-30 Pedro Alves <palves@redhat.com>
2695 Simon Marchi <simon.marchi@ericsson.com>
2696
2697 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2698 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2699
31b833b3
PA
27002017-10-30 Pedro Alves <palves@redhat.com>
2701
2702 * common/common-utils.c (string_appendf, string_vappendf): New
2703 functions.
2704 * common/common-utils.h (string_appendf, string_vappendf): New
2705 declarations.
2706 * unittests/common-utils-selftests.c (string_appendf_func)
2707 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2708 (string_vappendf_tests): New functions.
2709 (_initialize_common_utils_selftests): Register "string_appendf" and
2710 "string_vappendf tests".
2711
4a250334
PA
27122017-10-30 Pedro Alves <palves@redhat.com>
2713
2714 * unittests/common-utils-selftests.c (format_func): New typedef.
2715 (string_printf_tests, string_vprintf_tests): Tests factored out
2716 and merged to ...
2717 (test_format_func): ... this new function.
2718 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2719 test_format_func.
2720
16c5c17e
SM
27212017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * darwin-nat.c: Remove include of gdb.h.
2724
7ca51576
SM
27252017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2726
2727 * xtensa-xtregs.c: Fix formatting issues.
2728
c1342859
SM
27292017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2730
2731 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2732
484d8d36
MD
27332017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2734
2735 PR python/21213
2736 * python/py-infthread.c (thpy_get_inferior): Increment reference
2737 of inferior before returning it.
2738
b5540b5f
SM
27392017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2740
2741 * unittests/common-utils-selftests.c (format): Add
2742 ATTRIBUTE_PRINTF.
2743
5a9dcda1
SM
27442017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2745
2746 * xml-syscall.c (struct syscall_desc): Add constructor.
2747 <name>: Change type to std::string.
2748 (syscall_desc_up): New typedef.
2749 (syscall_desc_p): Remove typeder.
2750 (DEF_VEC_P(syscall_desc_p)): Remove.
2751 (struct syscall_group_desc): Add constructor.
2752 <name>: Change type to std::string.
2753 <syscalls>: Change type to std::vector.
2754 (syscall_group_desc_up): New typedef.
2755 (syscall_group_desc_p): Remove typedef.
2756 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2757 (struct syscalls_info) <syscalls>: Change type to std::vector of
2758 unique_ptr.
2759 <groups>: Likewise.
2760 <my_gdb_datadir>: Change type to std::string.
2761 (syscalls_info_up): New typedef.
2762 (allocate_syscalls_info): Remove.
2763 (syscalls_info_free_syscalls_desc): Remove.
2764 (syscalls_info_free_syscall_group_desc): Remove.
2765 (free_syscalls_info): Remove.
2766 (make_cleanup_free_syscalls_info): Remove.
2767 (syscall_group_create_syscall_group_desc): Adjust.
2768 (syscall_group_add_syscall): Adjust.
2769 (syscall_create_syscall_desc): Adjust.
2770 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2771 (init_syscalls_info): Adjust.
2772 (syscall_group_get_group_by_name): Adjust.
2773 (xml_get_syscall_number): Adjust.
2774 (xml_get_syscall_name): Adjust.
2775 (xml_list_of_syscalls): Adjust.
2776 (xml_list_syscalls_by_group): Adjust.
2777 (xml_list_of_groups): Adjust.
2778
45461e0d
SM
27792017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2780
2781 * probe.h: Don't include gdb_vecs.h.
2782 (DEF_VEC_P (probe_p)): Remove.
2783 (find_probes_in_objfile): Return an std::vector.
2784 * probe.c (find_probes_in_objfile): Likewise.
2785 * breakpoint.c (breakpoint_objfile_data)
2786 <longjmp_probes>: Change type to std::vector.
2787 <exception_probes>: Likewise.
2788 (free_breakpoint_probes): Don't manually free vectors.
2789 (create_longjmp_master_breakpoint): Adjust.
2790 (create_exception_master_breakpoint): Adjust.
2791 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2792 parameter type, adjust.
2793 (svr4_create_solib_event_breakpoints): Adjust.
2794
43dce439
SM
27952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2798 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2799 with new.
2800 (free_breakpoint_probes): Rename to ...
2801 (free_breakpoint_objfile_data): ... this, and call delete on
2802 bp_objfile_data..
2803
6a1b9516
SM
28042017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2805
2806 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2807 (loaded_script_ptr): Remove typedef.
2808 (DEF_VEC_P (loaded_script_ptr)): Remove.
2809 (struct collect_matching_scripts_data): Add constructor.
2810 <scripts_p>: Change type to (pointer to) std::vector.
2811 (collect_matching_scripts_data): Adjust.
2812 (sort_scripts_by_name): Make suitable for std::sort.
2813 (print_scripts): Don't sort vector, adjust to std::vector.
2814 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2815
593e3209
SM
28162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2817
2818 * symfile.c (filename_language): Make struct, not typedef. Add
2819 constructor.
2820 <ext>: Change type to std::string.
2821 (DEF_VEC_O (filename_language)): Remove.
2822 (filename_language_table): Change type to std::vector.
2823 (add_filename_language): Adjust.
2824 (set_ext_lang_command): Adjust.
2825 (info_ext_lang_command): Adjust.
2826 (deduce_language_from_filename): Adjust.
2827 (class scoped_restore_filename_language_table): Remove.
2828 (test_filename_language): Use scoped_restore.
2829 (test_set_ext_lang_command): Use scoped_restore, adjust to
2830 std::vector change.
2831
32fa66eb
SM
28322017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2833
2834 * symfile.c: Include selftest.h.
2835 (class scoped_restore_filename_language_table): New.
2836 (test_filename_language): New test.
2837 (test_set_ext_lang_command): New test.
2838 (_initialize_symfile): Register tests.
2839
4a27f119
KS
28402017-10-27 Keith Seitz <keiths@redhat.com>
2841
2842 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2843 in the bp_location, falling back to find_pc_sect_function when
2844 needed.
2845 (add_location_to_breakpoint): Save sal->symbol.
2846 * breakpoint.h (struct bp_location) <symbol>: New field.
2847 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2848 * symtab.h (struct symtab_and_line) <symbol>: New field.
2849
a43f3893
PF
28502017-10-26 Patrick Frants <osscontribute@gmail.com>
2851
7453e6b2 2852 PR gdb/13669
a43f3893
PF
2853 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2854 to rewind obstack.
2855
23cc4e1b
PA
28562017-10-26 Pedro Alves <palves@redhat.com>
2857
2858 * remote.c (remote_async_terminal_ours_p): Delete.
2859 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2860 Remove references to 'remote_async_terminal_ours_p'.
2861
6abc18bb
YQ
28622017-10-26 Yao Qi <yao.qi@linaro.org>
2863
2864 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2865
bd522513
YQ
28662017-10-26 Yao Qi <yao.qi@linaro.org>
2867
2868 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2869 aspace const.
2870 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2871 Likewise.
2872 * breakpoint.c (bpstat_check_location): Remove cast.
2873 (breakpoint_hit_catch_fork): Make aspce const.
2874 (breakpoint_hit_catch_solib): Likewise.
2875 (breakpoint_hit_catch_exec): Likewise.
2876 (breakpoint_hit_ranged_breakpoint): Likewise.
2877 (breakpoint_hit_watchpoint): Likewise.
2878 (base_breakpoint_breakpoint_hit): Likewise.
2879 (bkpt_breakpoint_hit): Likewise.
2880 (dprintf_breakpoint_hit): Likewise.
2881 (tracepoint_breakpoint_hit): Likewise.
2882 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2883
accd0bcd
YQ
28842017-10-26 Yao Qi <yao.qi@linaro.org>
2885
2886 * breakpoint.c (breakpoint_location_address_match): Change
2887 "struct address_space *" to "const address_space".
2888 (breakpoint_location_address_range_overlap): Likewise.
2889 (breakpoint_here_p): Likewise.
2890 (breakpoint_in_range_p): Likewise.
2891 (moribund_breakpoint_here_p): Likewise.
2892 (bp_location_inserted_here_p): Likewise.
2893 (software_breakpoint_inserted_here_p): Likewise.
2894 (hardware_breakpoint_inserted_here_p): Likewise.
2895 (hardware_watchpoint_inserted_in_range): Likewise.
2896 (bpstat_check_location): Likewise.
2897 (bpstat_stop_status): Likewise.
2898 (breakpoint_address_match): Likewise.
2899 (breakpoint_address_match_range): Likewise.
2900 (breakpoint_location_address_match): Likewise.
2901 (breakpoint_location_address_range_overlap): Likewise.
2902 (insert_single_step_breakpoint): Likewise.
2903 (breakpoint_has_location_inserted_here): Likewise.
2904 (single_step_breakpoint_inserted_here_p): Likewise.
2905 (pc_at_non_inline_function): Likewise.
2906 * breakpoint.h (bpstat_stop_status): Update declaration.
2907 (breakpoint_here_p): Likewise.
2908 (breakpoint_in_range_p): Likewise.
2909 (moribund_breakpoint_here_p): Likewise.
2910 (breakpoint_inserted_here_p): Likewise.
2911 (software_breakpoint_inserted_here_p): Likewise.
2912 (hardware_breakpoint_inserted_here_p): Likewise.
2913 (breakpoint_has_location_inserted_here): Likewise.
2914 (single_step_breakpoint_inserted_here_p): Likewise.
2915 (hardware_watchpoint_inserted_in_range): Likewise.
2916 (breakpoint_address_match): Likewise.
2917 (insert_single_step_breakpoint): Likewise.
2918 (pc_at_non_inline_function): Likewise.
2919 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2920 * record.c (record_check_stopped_by_breakpoint): Likewise.
2921 * record.h (record_check_stopped_by_breakpoint): Likewise.
2922 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2923
ac7936df
YQ
29242017-10-25 Yao Qi <yao.qi@linaro.org>
2925
2926 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2927 regcache->arch () instead get_regcache_arch.
2928 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2929 Likewise.
2930 (aarch64_fbsd_store_inferior_registers): Likewise.
2931 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2932 (store_gregs_to_thread): Likewise.
2933 (fetch_fpregs_from_thread): Likewise.
2934 (store_fpregs_to_thread): Likewise.
2935 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2936 (aarch64_store_return_value): Likewise.
2937 (aarch64_software_single_step): Likewise.
2938 * aix-thread.c (aix_thread_wait): Likewise.
2939 (supply_reg32): Likewise.
2940 (supply_sprs64): Likewise.
2941 (supply_sprs32): Likewise.
2942 (fill_gprs64): Likewise.
2943 (fill_gprs32): Likewise.
2944 (fill_sprs64): Likewise.
2945 (fill_sprs32): Likewise.
2946 (store_regs_user_thread): Likewise.
2947 (store_regs_kernel_thread): Likewise.
2948 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2949 (alphabsd_store_inferior_registers): Likewise.
2950 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2951 (alpha_store_return_value): Likewise.
2952 (alpha_deal_with_atomic_sequence): Likewise.
2953 (alpha_next_pc): Likewise.
2954 (alpha_software_single_step): Likewise.
2955 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2956 (amd64bsd_store_inferior_registers): Likewise.
2957 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2958 Likewise.
2959 (amd64_linux_store_inferior_registers): Likewise.
2960 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2961 (amd64_collect_native_gregset): Likewise.
2962 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2963 (amd64obsd_collect_uthread): Likewise.
2964 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2965 (amd64_collect_fpregset): Likewise.
2966 (amd64_supply_fxsave): Likewise.
2967 (amd64_supply_xsave): Likewise.
2968 (amd64_collect_fxsave): Likewise.
2969 (amd64_collect_xsave): Likewise.
2970 * arc-tdep.c (arc_write_pc): Likewise.
2971 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2972 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2973 (arm_fbsd_store_inferior_registers): Likewise.
2974 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2975 (store_vfp_regs): Likewise.
2976 (arm_linux_fetch_inferior_registers): Likewise.
2977 (arm_linux_store_inferior_registers): Likewise.
2978 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2979 (arm_linux_sigreturn_next_pc): Likewise.
2980 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2981 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2982 (fetch_register): Likewise.
2983 (store_register): Likewise.
2984 * arm-tdep.c (arm_is_thumb): Likewise.
2985 (displaced_in_arm_mode): Likewise.
2986 (bx_write_pc): Likewise.
2987 (arm_get_next_pcs_addr_bits_remove): Likewise.
2988 (arm_software_single_step): Likewise.
2989 (arm_extract_return_value): Likewise.
2990 (arm_store_return_value): Likewise.
2991 (arm_write_pc): Likewise.
2992 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2993 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2994 (bsd_uthread_store_registers): Likewise.
2995 * core-regset.c (fetch_core_registers): Likewise.
2996 * corelow.c (get_core_registers): Likewise.
2997 * cris-tdep.c (cris_store_return_value): Likewise.
2998 (cris_extract_return_value): Likewise.
2999 (find_step_target): Likewise.
3000 (find_step_target): Likewise.
3001 (cris_software_single_step): Likewise.
3002 * ctf.c (ctf_fetch_registers): Likewise.
3003 * darwin-nat.c (cancel_breakpoint): Likewise.
3004 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3005 * frv-tdep.c (frv_extract_return_value): Likewise.
3006 * ft32-tdep.c (ft32_store_return_value): Likewise.
3007 (ft32_extract_return_value): Likewise.
3008 * go32-nat.c (fetch_register): Likewise.
3009 (go32_fetch_registers): Likewise.
3010 (go32_store_registers): Likewise.
3011 (store_register): Likewise.
3012 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3013 (h8300_store_return_value): Likewise.
3014 * hppa-linux-nat.c (fetch_register): Likewise.
3015 (store_register): Likewise.
3016 (hppa_linux_fetch_inferior_registers): Likewise.
3017 (hppa_linux_store_inferior_registers): Likewise.
3018 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3019 (i386_darwin_store_inferior_registers): Likewise.
3020 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3021 (gnu_store_registers): Likewise.
3022 * i386-linux-nat.c (fetch_register): Likewise.
3023 (store_register): Likewise.
3024 (supply_gregset): Likewise.
3025 (fill_gregset): Likewise.
3026 (i386_linux_fetch_inferior_registers): Likewise.
3027 (i386_linux_store_inferior_registers): Likewise.
3028 (i386_linux_resume): Likewise.
3029 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3030 Likewise.
3031 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3032 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3033 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3034 (i386obsd_collect_uthread): Likewise.
3035 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3036 (i386_supply_gregset): Likewise.
3037 (i386_collect_gregset): Likewise.
3038 (i386_supply_fpregset): Likewise.
3039 (i386_collect_fpregset): Likewise.
3040 (i386_mpx_bd_base): Likewise.
3041 * i386-v4-nat.c (supply_fpregset): Likewise.
3042 (fill_fpregset): Likewise.
3043 * i387-tdep.c (i387_supply_fsave): Likewise.
3044 (i387_collect_fsave): Likewise.
3045 (i387_supply_fxsave): Likewise.
3046 (i387_collect_fxsave): Likewise.
3047 (i387_supply_xsave): Likewise.
3048 (i387_collect_xsave): Likewise.
3049 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3050 (ia64_linux_store_registers): Likewise.
3051 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3052 (ia64_extract_return_value): Likewise.
3053 (ia64_store_return_value): Likewise.
3054 (find_func_descr): Likewise.
3055 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3056 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3057 (inf_ptrace_store_registers): Likewise.
3058 * infrun.c (use_displaced_stepping): Likewise.
3059 (displaced_step_prepare_throw): Likewise.
3060 (resume): Likewise.
3061 (proceed): Likewise.
3062 (do_target_wait): Likewise.
3063 (adjust_pc_after_break): Likewise.
3064 (handle_inferior_event_1): Likewise.
3065 (handle_signal_stop): Likewise.
3066 (save_infcall_suspend_state): Likewise.
3067 (restore_infcall_suspend_state): Likewise.
3068 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3069 * jit.c (jit_frame_prev_register): Likewise.
3070 * linux-nat.c (save_stop_reason): Likewise.
3071 (linux_nat_wait_1): Likewise.
3072 (resume_stopped_resumed_lwps): Likewise.
3073 * linux-record.c (record_linux_sockaddr): Likewise.
3074 (record_linux_msghdr): Likewise.
3075 (record_linux_system_call): Likewise.
3076 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3077 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3078 (lm32_store_return_value): Likewise.
3079 * m32c-tdep.c (m32c_read_flg): Likewise.
3080 (m32c_pseudo_register_read): Likewise.
3081 (m32c_pseudo_register_write): Likewise.
3082 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3083 (m32r_linux_collect_gregset): Likewise.
3084 * m32r-tdep.c (m32r_store_return_value): Likewise.
3085 (m32r_extract_return_value): Likewise.
3086 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3087 (m68kbsd_collect_fpregset): Likewise.
3088 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3089 * m68k-linux-nat.c (fetch_register): Likewise.
3090 (old_fetch_inferior_registers): Likewise.
3091 (old_store_inferior_registers): Likewise.
3092 (store_regs): Likewise.
3093 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3094 (m68k_svr4_store_return_value): Likewise.
3095 * m88k-tdep.c (m88k_store_arguments): Likewise.
3096 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3097 (mi_cmd_data_write_register_values): Likewise.
3098 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3099 (mips_fbsd_store_inferior_registers): Likewise.
3100 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3101 (mips_fbsd_supply_gregs): Likewise.
3102 (mips_fbsd_collect_fpregs): Likewise.
3103 (mips_fbsd_collect_gregs): Likewise.
3104 (mips_fbsd_supply_fpregset): Likewise.
3105 (mips_fbsd_collect_fpregset): Likewise.
3106 (mips_fbsd_supply_gregset): Likewise.
3107 (mips_fbsd_collect_gregset): Likewise.
3108 * mips-linux-nat.c (supply_gregset): Likewise.
3109 (fill_gregset): Likewise.
3110 (supply_fpregset): Likewise.
3111 (fill_fpregset): Likewise.
3112 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3113 (mips_fill_gregset): Likewise.
3114 (mips_supply_fpregset): Likewise.
3115 (mips_fill_fpregset): Likewise.
3116 (mips64_supply_gregset): Likewise.
3117 (micromips_linux_sigframe_validate): Likewise.
3118 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3119 (mipsnbsd_fetch_inferior_registers): Likewise.
3120 (mipsnbsd_store_inferior_registers): Likewise.
3121 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3122 (mipsnbsd_supply_gregset): Likewise.
3123 (mipsnbsd_iterate_over_regset_sections): Likewise.
3124 (mipsnbsd_supply_reg): Likewise.
3125 (mipsnbsd_supply_fpreg): Likewise.
3126 * mips-tdep.c (mips_in_frame_stub): Likewise.
3127 (mips_dummy_id): Likewise.
3128 (is_octeon_bbit_op): Likewise.
3129 (micromips_bc1_pc): Likewise.
3130 (extended_mips16_next_pc): Likewise.
3131 (mips16_next_pc): Likewise.
3132 (deal_with_atomic_sequence): Likewise.
3133 * moxie-tdep.c (moxie_process_readu): Likewise.
3134 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3135 * nto-procfs.c (procfs_store_registers): Likewise.
3136 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3137 (ppcfbsd_store_inferior_registers): Likewise.
3138 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3139 (fetch_altivec_register): Likewise.
3140 (get_spe_registers): Likewise.
3141 (fetch_spe_register): Likewise.
3142 (fetch_altivec_registers): Likewise.
3143 (fetch_all_gp_regs): Likewise.
3144 (fetch_all_fp_regs): Likewise.
3145 (store_vsx_register): Likewise.
3146 (store_altivec_register): Likewise.
3147 (set_spe_registers): Likewise.
3148 (store_spe_register): Likewise.
3149 (store_altivec_registers): Likewise.
3150 (store_all_gp_regs): Likewise.
3151 (store_all_fp_regs): Likewise.
3152 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3153 (ppc_linux_collect_gregset): Likewise.
3154 (ppc_canonicalize_syscall): Likewise.
3155 (ppc_linux_record_signal): Likewise.
3156 (ppu2spu_prev_register): Likewise.
3157 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3158 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3159 (ppcobsd_store_registers): Likewise.
3160 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3161 Likewise.
3162 (ppc_ravenscar_generic_store_registers): Likewise.
3163 * procfs.c (procfs_fetch_registers): Likewise.
3164 (procfs_store_registers): Likewise.
3165 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3166 (ravenscar_store_registers): Likewise.
3167 (ravenscar_prepare_to_store): Likewise.
3168 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3169 * record-full.c (record_full_wait_1): Likewise.
3170 (record_full_registers_change): Likewise.
3171 (record_full_store_registers): Likewise.
3172 (record_full_core_fetch_registers): Likewise.
3173 (record_full_save): Likewise.
3174 (record_full_goto_insn): Likewise.
3175 * regcache.c (regcache_register_size): Likewise.
3176 (get_regcache_arch): Remove.
3177 (regcache_read_pc): Likewise.
3178 * regcache.h (get_regcache_arch): Remove.
3179 * remote-sim.c (gdbsim_fetch_register): Likewise.
3180 (gdbsim_store_register): Likewise.
3181 * remote.c (fetch_register_using_p): Likewise.
3182 (send_g_packet): Likewise.
3183 (remote_prepare_to_store): Likewise.
3184 (store_registers_using_G): Likewise.
3185 * reverse.c (save_bookmark_command): Likewise.
3186 (goto_bookmark_command): Likewise.
3187 * rs6000-aix-tdep.c (branch_dest): Likewise.
3188 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3189 (fetch_register): Likewise.
3190 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3191 (ppc_collect_reg): Likewise.
3192 (ppc_collect_gregset): Likewise.
3193 (ppc_collect_fpregset): Likewise.
3194 (ppc_collect_vsxregset): Likewise.
3195 (ppc_collect_vrregset): Likewise.
3196 (ppc_displaced_step_hw_singlestep): Likewise.
3197 (rs6000_pseudo_register_read): Likewise.
3198 (rs6000_pseudo_register_write): Likewise.
3199 * s390-linux-nat.c (supply_gregset): Likewise.
3200 (fill_gregset): Likewise.
3201 (s390_linux_fetch_inferior_registers): Likewise.
3202 * s390-linux-tdep.c (s390_write_pc): Likewise.
3203 (s390_software_single_step): Likewise.
3204 (s390_all_but_pc_registers_record): Likewise.
3205 (s390_linux_syscall_record): Likewise.
3206 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3207 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3208 (shnbsd_store_inferior_registers): Likewise.
3209 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3210 (sh_extract_return_value_fpu): Likewise.
3211 (sh_store_return_value_nofpu): Likewise.
3212 (sh_corefile_supply_regset): Likewise.
3213 (sh_corefile_collect_regset): Likewise.
3214 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3215 (sh64_store_return_value): Likewise.
3216 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3217 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3218 (sparc_store_inferior_registers): Likewise.
3219 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3220 (sparc_ravenscar_prepare_to_store): Likewise.
3221 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3222 (sparc_analyze_control_transfer): Likewise.
3223 (sparc_step_trap): Likewise.
3224 (sparc_software_single_step): Likewise.
3225 (sparc32_gdbarch_init): Likewise.
3226 (sparc_supply_rwindow): Likewise.
3227 (sparc_collect_rwindow): Likewise.
3228 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3229 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3230 (sparc64nbsd_collect_gregset): Likewise.
3231 (sparc64nbsd_supply_fpregset): Likewise.
3232 (sparc64nbsd_collect_fpregset): Likewise.
3233 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3234 (sparc64_supply_gregset): Likewise.
3235 (sparc64_collect_gregset): Likewise.
3236 (sparc64_supply_fpregset): Likewise.
3237 (sparc64_collect_fpregset): Likewise.
3238 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3239 * spu-tdep.c (spu_unwind_sp): Likewise.
3240 (spu2ppu_prev_register): Likewise.
3241 (spu_memory_remove_breakpoint): Likewise.
3242 * stack.c (return_command): Likewise.
3243 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3244 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3245 * tracefile.c (trace_save_ctf): Likewise.
3246 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3247 (do_windows_store_inferior_registers): Likewise.
3248 (windows_resume): Likewise.
3249 * xtensa-linux-nat.c (fill_gregset): Likewise.
3250 (supply_gregset_reg): Likewise.
3251 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3252 (xtensa_register_read_masked): Likewise.
3253 (xtensa_supply_gregset): Likewise.
3254 (xtensa_extract_return_value): Likewise.
3255 (xtensa_store_return_value): Likewise.
3256
edd079d9
UW
32572017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3258
3259 * doublest.c (floatformat_from_string): New function.
3260 * doublest.h (floatformat_from_string): Add prototype.
3261
3262 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3263 (OP_FLOAT): ... this.
3264 * expression.h: Do not include "doublest.h".
3265 (union exp_element): Replace doubleconst and decfloatconst by
3266 new element floatconst.
3267 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3268 (ada_evaluate_subexp): Likewise.
3269 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3270 OP_DOUBLE and OP_DECFLOAT.
3271 * expprint.c (print_subexp_standard): Likewise.
3272 (dump_subexp_body_standard): Likewise.
3273 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3274
3275 * parse.c: Include "dfp.h".
3276 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3277 (write_exp_elt_floatcst): New function.
3278 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3279 and OP_DECFLOAT.
3280 (operator_check_standard): Likewise.
3281 (parse_float): Do not accept suffix. Take type as input. Return bool.
3282 Return target format buffer instead of host DOUBLEST.
3283 Use floatformat_from_string and decimal_from_string to parse
3284 either binary or decimal floating-point types.
3285 (parse_c_float): Remove.
3286 * parser-defs.h: Do not include "doublest.h".
3287 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3288 (write_exp_elt_floatcst): Add prototype.
3289 (parse_float): Update prototype.
3290 (parse_c_float): Remove.
3291
3292 * c-exp.y: Do not include "dfp.h".
3293 (typed_val_float): Use byte buffer instead of DOUBLEST.
3294 (typed_val_decfloat): Remove.
3295 (DECFLOAT): Remove.
3296 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3297 (parse_number): Update to new parse_float interface.
3298 Parse suffixes and determine type before calling parse_float.
3299 Handle decimal and binary FP types the same way.
3300
3301 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3302 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3303 (parse_number): Update to new parse_float interface.
3304 Parse suffixes and determine type before calling parse_float.
3305
3306 * f-exp.y: Replace dval by typed_val_float.
3307 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3308 (parse_number): Use parse_float instead of atof.
3309
3310 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3311 (parse_go_float): Remove.
3312 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3313 (parse_number): Call parse_float instead of parse_go_float.
3314 Parse suffixes and determine type before calling parse_float.
3315
3316 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3317 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3318 (parse_number): Update to new parse_float interface.
3319 Parse suffixes and determine type before calling parse_float.
3320
3321 * m2-exp.y: Replace dval by byte buffer val.
3322 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3323 (parse_number): Call parse_float instead of atof.
3324
3325 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3326 (lex_number): Call parse_float instead of strtod.
3327 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3328 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3329 Use write_exp_elt_floatcst.
3330 (unit_testing): Remove static variable.
3331 (rust_type): Do not check unit_testing.
3332 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3333
3334 * ada-exp.y (type_float, type_double): Remove.
3335 (typed_val_float): Use byte buffer instead of DOUBLEST.
3336 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3337 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3338
cc628f3d
AH
33392017-10-25 Alan Hayward <alan.hayward@arm.com>
3340
3341 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3342 * arch/aarch64.h: New file.
3343
09a7c6aa
UW
33442017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3345
3346 * dfp.h (decimal_from_string): Use const reference for argument.
3347 * dfp.c (decimal_from_string): Likewise.
3348
8ba0dd51
UW
33492017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3350
3351 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3352 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3353 * mips-tdep.c (mips_print_fp_register): Likewise.
3354
16e812b2
UW
33552017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3356
3357 * common/format.h (enum argclass): Replace decfloat_arg by
3358 dec32float_arg, dec64float_arg, and dec128float_arg.
3359 * common/format.c (parse_format_string): Update to return
3360 new decimal float argument classes.
3361
3362 * printcmd.c (printf_decfloat): Rename to ...
3363 (printf_floating): ... this. Add argclass argument, and use it
3364 instead of parsing the format string again. Add support for
3365 binary floating-point values, using floatformat_to_string.
3366 Convert value to the target format if it doesn't already match.
3367 (ui_printf): Call printf_floating instead of printf_decfloat,
3368 also for double_arg / long_double_arg. Pass argclass.
3369
3370 * dfp.c (decimal_to_string): Add format string argument.
3371 * dfp.h (decimal_to_string): Likewise.
3372
3373 * doublest.c (floatformat_to_string): Add format string argument.
3374 * doublest.h (floatformat_to_string): Likewise.
3375
fdf0cbc2
UW
33762017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3377
3378 * doublest.c (floatformat_precision): New routine.
3379 (floatformat_to_string): Likewise.
3380 * doublest.c (floatformat_to_string): Add prototype.
3381
3382 * printcmd.c (print_scalar_formatted): Only call print_floating
3383 on floating-point types.
3384 * valprint.c: Do not include "floatformat.h".
3385 (generic_val_print_decfloat): Remove.
3386 (generic_val_print): Call generic_val_print_float for both
3387 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3388 (print_floating): Use floatformat_to_string. Handle decimal float.
3389 (print_decimal_floating): Remove, merge into floatformat_to_string.
3390 * value.h (print_decimal_floating): Remove.
3391
3392 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3393
5033013f
UW
33942017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3395
3396 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3397
a664f67e
SM
33982017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3399
3400 * memattr.h: Don't include vec.h.
3401 (struct mem_attrib): Initialize fields.
3402 <unknown>: New static method.
3403 (struct mem_region): Add constructors, operator<, initialize
3404 fields.
3405 * memattr.c: Include algorithm.
3406 (default_mem_attrib, unknown_mem_attrib): Remove.
3407 (user_mem_region_list): New global.
3408 (target_mem_region_list, mem_region_list): Change type to
3409 std::vector<mem_region>.
3410 (mem_use_target): Now a function.
3411 (target_mem_regions_valid): Change type to bool.
3412 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3413 (require_user_regions): Adjust.
3414 (require_target_regions): Adjust.
3415 (create_mem_region): Adjust.
3416 (lookup_mem_region): Adjust.
3417 (invalidate_target_mem_regions): Adjust.
3418 (mem_clear): Rename to...
3419 (user_mem_clear): ... this, and adjust.
3420 (mem_command): Adjust.
3421 (info_mem_command): Adjust.
3422 (mem_enable, enable_mem_command, mem_disable,
3423 disable_mem_command): Adjust.
3424 (mem_delete): Adjust.
3425 (delete_mem_command): Adjust.
3426 * memory-map.h (parse_memory_map): Return an std::vector.
3427 * memory-map.c (parse_memory_map): Likewise.
3428 (struct memory_map_parsing_data): Add constructor.
3429 <memory_map>: Point to std::vector.
3430 (memory_map_start_memory): Adjust.
3431 (memory_map_end_memory): Adjust.
3432 (memory_map_end_property): Adjust.
3433 (clear_result): Remove.
3434 * remote.c (remote_memory_map): Return an std::vector.
3435 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3436 Remove.
3437 (target_debug_print_mem_region_vector): New.
3438 * target-delegates.c: Regenerate.
3439 * target.h (mem_region_vector): New typedef.
3440 (to_memory_map): Return mem_region_vector.
3441 (target_memory_map): Return an std::vector.
3442 * target.c (target_memory_map): Return an std::vector.
3443 (flash_erase_command): Adjust.
3444
6e17c565
SM
34452017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3446
3447 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3448 Change type to std::string.
3449 (memory_map_start_property): Adjust.
3450 (memory_map_end_property): Adjust.
3451
cfba9872
SM
34522017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3453
3454 * infrun.h: Include common/byte-vector.h.
3455 (struct displaced_step_closure): New struct.
3456 (struct buf_displaced_step_closure): New struct.
3457 * infrun.c (displaced_step_closure::~displaced_step_closure):
3458 Provide default implementation.
3459 (displaced_step_clear): Deallocate step closure with delete.
3460 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3461 (aarch64_displaced_step_closure): ... this, extend
3462 displaced_step_closure.
3463 (aarch64_displaced_step_data) <dsc>: Change type to
3464 aarch64_displaced_step_closure.
3465 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3466 unique_ptr.
3467 (aarch64_displaced_step_fixup): Add cast for displaced step
3468 closure.
3469 * amd64-tdep.c (displaced_step_closure): Rename to ...
3470 (amd64_displaced_step_closure): ... this, extend
3471 displaced_step_closure.
3472 <insn_buf>: Change type to std::vector<gdb_byte>.
3473 <max_len>: Remove.
3474 (fixup_riprel): Change type of DSC parameter, adjust to type
3475 change of insn_buf.
3476 (fixup_displaced_copy): Change type of DSC parameter.
3477 (amd64_displaced_step_copy_insn): Instantiate
3478 amd64_displaced_step_closure.
3479 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3480 to type change of insn_buf.
3481 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3482 parameter DSC.
3483 (arm_linux_copy_svc): Likewise.
3484 (cleanup_kernel_helper_return): Likewise.
3485 (arm_catch_kernel_helper_return): Likewise.
3486 (arm_linux_displaced_step_copy_insn): Instantiate
3487 arm_displaced_step_closure.
3488 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3489 (displaced_read_reg): Change type of parameter DSC.
3490 (branch_write_pc): Likewise.
3491 (load_write_pc): Likewise.
3492 (alu_write_pc): Likewise.
3493 (displaced_write_reg): Likewise.
3494 (arm_copy_unmodified): Likewise.
3495 (thumb_copy_unmodified_32bit): Likewise.
3496 (thumb_copy_unmodified_16bit): Likewise.
3497 (cleanup_preload): Likewise.
3498 (install_preload): Likewise.
3499 (arm_copy_preload): Likewise.
3500 (thumb2_copy_preload): Likewise.
3501 (install_preload_reg): Likewise.
3502 (arm_copy_preload_reg): Likewise.
3503 (cleanup_copro_load_store): Likewise.
3504 (install_copro_load_store): Likewise.
3505 (arm_copy_copro_load_store) Likewise.
3506 (thumb2_copy_copro_load_store): Likewise.
3507 (cleanup_branch): Likewise.
3508 (install_b_bl_blx): Likewise.
3509 (arm_copy_b_bl_blx): Likewise.
3510 (thumb2_copy_b_bl_blx): Likewise.
3511 (thumb_copy_b): Likewise.
3512 (install_bx_blx_reg): Likewise.
3513 (arm_copy_bx_blx_reg): Likewise.
3514 (thumb_copy_bx_blx_reg): Likewise.
3515 (cleanup_alu_imm): Likewise.
3516 (arm_copy_alu_imm): Likewise.
3517 (thumb2_copy_alu_imm): Likewise.
3518 (cleanup_alu_reg): Likewise.
3519 (install_alu_reg): Likewise.
3520 (arm_copy_alu_reg): Likewise.
3521 (thumb_copy_alu_reg): Likewise.
3522 (cleanup_alu_shifted_reg): Likewise.
3523 (install_alu_shifted_reg): Likewise.
3524 (arm_copy_alu_shifted_reg): Likewise.
3525 (cleanup_load): Likewise.
3526 (cleanup_store): Likewise.
3527 (arm_copy_extra_ld_st): Likewise.
3528 (install_load_store): Likewise.
3529 (thumb2_copy_load_literal): Likewise.
3530 (thumb2_copy_load_reg_imm): Likewise.
3531 (arm_copy_ldr_str_ldrb_strb): Likewise.
3532 (cleanup_block_load_all): Likewise.
3533 (cleanup_block_store_pc): Likewise.
3534 (cleanup_block_load_pc): Likewise.
3535 (arm_copy_block_xfer): Likewise.
3536 (thumb2_copy_block_xfer): Likewise.
3537 (cleanup_svc): Likewise.
3538 (install_svc): Likewise.
3539 (arm_copy_svc): Likewise.
3540 (thumb_copy_svc): Likewise.
3541 (arm_copy_undef): Likewise.
3542 (thumb_32bit_copy_undef): Likewise.
3543 (arm_copy_unpred): Likewise.
3544 (arm_decode_misc_memhint_neon): Likewise.
3545 (arm_decode_unconditional): Likewise.
3546 (arm_decode_miscellaneous): Likewise.
3547 (arm_decode_dp_misc): Likewise.
3548 (arm_decode_ld_st_word_ubyte): Likewise.
3549 (arm_decode_media): Likewise.
3550 (arm_decode_b_bl_ldmstm): Likewise.
3551 (arm_decode_ext_reg_ld_st): Likewise.
3552 (thumb2_decode_dp_shift_reg): Likewise.
3553 (thumb2_decode_ext_reg_ld_st): Likewise.
3554 (arm_decode_svc_copro): Likewise.
3555 (thumb2_decode_svc_copro): Likewise.
3556 (install_pc_relative): Likewise.
3557 (thumb_copy_pc_relative_16bit): Likewise.
3558 (thumb_decode_pc_relative_16bit): Likewise.
3559 (thumb_copy_pc_relative_32bit): Likewise.
3560 (thumb_copy_16bit_ldr_literal): Likewise.
3561 (thumb_copy_cbnz_cbz): Likewise.
3562 (thumb2_copy_table_branch): Likewise.
3563 (cleanup_pop_pc_16bit_all): Likewise.
3564 (thumb_copy_pop_pc_16bit): Likewise.
3565 (thumb_process_displaced_16bit_insn): Likewise.
3566 (decode_thumb_32bit_ld_mem_hints): Likewise.
3567 (thumb_process_displaced_32bit_insn): Likewise.
3568 (thumb_process_displaced_insn): Likewise.
3569 (arm_process_displaced_insn): Likewise.
3570 (arm_displaced_init_closure): Likewise.
3571 (arm_displaced_step_fixup): Add cast for closure.
3572 * arm-tdep.h: Include infrun.h.
3573 (displaced_step_closure): Rename to ...
3574 (arm_displaced_step_closure): ... this, extend
3575 displaced_step_closure.
3576 <u::svc::copy_svc_os>: Change type of parameter DSC.
3577 <cleanup>: Likewise.
3578 (arm_process_displaced_insn): Likewise.
3579 (arm_displaced_init_closure): Likewise.
3580 (displaced_read_reg): Likewise.
3581 (displaced_write_reg): Likewise.
3582 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3583 Adjust.
3584 * i386-tdep.h: Include infrun.h.
3585 (i386_displaced_step_closure): New typedef.
3586 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3587 i386_displaced_step_closure.
3588 (i386_displaced_step_fixup): Adjust.
3589 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3590 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3591 and unique_ptr.
3592 (ppc_displaced_step_fixup): Adjust.
3593 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3594 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3595 and unique_ptr.
3596 (s390_displaced_step_fixup): Adjust.
3597
b392b304
SM
35982017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3599
3600 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3601 Remove declarations.
3602
d5833c62
TT
36032017-10-20 Tom Tromey <tom@tromey.com>
3604
3605 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3606 std::vector.
3607 (gdb_bfd_record_inclusion): Update.
3608 (bfdp): Remove typedef.
3609
06d5bbc8
TT
36102017-10-20 Tom Tromey <tom@tromey.com>
3611
3612 * gdb_bfd.c (gdb_bfd_ref): Use new.
3613 (struct gdb_bfd_data): Add constructor, destructor, and member
3614 initializers.
3615 (gdb_bfd_unref): Use delete.
3616
2712ce2e
TT
36172017-10-20 Tom Tromey <tom@tromey.com>
3618
3619 * exec.c (exec_file_attach): Use new_bfd_ref.
3620 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3621 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3622 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3623 new_bfd_ref.
3624 * gdb_bfd.h (new_bfd_ref): New function.
3625
fcc8fb2f
PA
36262017-10-20 Pedro Alves <palves@redhat.com>
3627
3628 * main.c (captured_command_loop): Add attribute noinline.
3629
4c2287b0
SM
36302017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3631
3632 * interps.c (struct interp_factory): Add constructor.
3633 (interp_factory_p): Remove typedef.
3634 (DEF_VEC_P(interp_factory_p)): Remove.
3635 (interpreter_factories): Change type to std::vector.
3636 (interp_factory_register): Adjust.
3637 (interp_lookup): Adjust.
3638 (interpreter_completer): Adjust.
3639
3d415c26
TT
36402017-10-19 Tom Tromey <tom@tromey.com>
3641
3642 * break-catch-syscall.c (catch_syscall_completer): Use
3643 std::string, gdb::unique_xmalloc_ptr.
3644
395423c4
TT
36452017-10-19 Tom Tromey <tom@tromey.com>
3646
3647 * infcall.c (call_function_by_hand_dummy): Use std::string.
3648
54f70bc1
TT
36492017-10-19 Tom Tromey <tom@tromey.com>
3650
3651 * mi/mi-main.c (mi_cmd_execute): Update.
3652 * top.h (prepare_execute_command): Return scoped_value_mark.
3653 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3654 Add move constructor.
3655 * top.c (prepare_execute_command): Return scoped_value_mark.
3656 (execute_command): Update.
3657
63929e84
PA
36582017-10-19 Pedro Alves <palves@redhat.com>
3659
3660 * xml-support.c (xml_fetch_content_from_file): Check fread's
3661 return.
3662
a75868f5
PA
36632017-10-19 Pedro Alves <palves@redhat.com>
3664
3665 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3666 async.
3667 (handle_error_fd): New function.
3668 (ser_base_async): Add/delete an event loop file handler for
3669 error_fd.
3670
2edf834e
PA
36712017-10-19 Pedro Alves <palves@redhat.com>
3672
3673 * xml-support.c (xml_fetch_content_from_file): Don't read in
3674 chunks. Instead use fseek to determine the file's size, and read
3675 it in one go.
3676
c8ba13ad
KS
36772017-11-18 Keith Seitz <keiths@redhat.com>
3678
3679 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3680 types.
3681 Add whitespace to front of type name.
3682
37534686
KS
36832017-10-18 Keith Seitz <keiths@redhat.com>
3684
3685 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3686 DW_AT_accessibility.
3687
28c7c158
YQ
36882017-10-18 Yao Qi <yao.qi@linaro.org>
3689
3690 * features/tic6x-c62x-linux.c: Remove.
3691
30f0b101
TT
36922017-10-17 Tom Tromey <tom@tromey.com>
3693
3694 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3695 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3696 (do_mixed_source_and_assembly): Likewise.
3697
57e12da9
TT
36982017-10-17 Tom Tromey <tom@tromey.com>
3699
3700 * regcache.c (regcache::xfer_part): Remove assertion.
3701
7b700999
PA
37022017-10-17 Pedro Alves <palves@redhat.com>
3703
3704 * xml-support.c (xml_fetch_content_from_file): Call
3705 unique_ptr::release() instead unique_ptr::get() when passing
3706 through xrealloc.
3707
d3037ba6
YQ
37082017-10-17 Yao Qi <yao.qi@linaro.org>
3709
3710 * regcache.c (regcache::xfer_part): Remove parameters read and
3711 write, add parameter is_raw. All callers are updated.
3712
83d5a34d
KS
37132017-10-16 Keith Seitz <keiths@redhat.com>
3714
3715 * c-typeprint.c (enum access_specifier): Moved here from
3716 c_type_print_base.
3717 (output_access_specifier): New function.
3718 (c_type_print_base): Consider typedefs when assessing
3719 whether access labels are needed.
3720 Use output_access_specifier as needed.
3721 Output access specifier for typedefs, if needed.
3722 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3723 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3724 fields.
3725 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3726 accessor macros.
3727
87028b87
TT
37282017-10-16 Tom Tromey <tom@tromey.com>
3729
3730 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3731 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3732 * target.c (target_fileio_read_stralloc): Update.
3733 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3734 * target.h (target_fileio_read_stralloc): Return
3735 unique_xmalloc_ptr.
3736
b7b030ad
TT
37372017-10-16 Tom Tromey <tom@tromey.com>
3738
3739 * xml-syscall.c (xml_init_syscalls_info): Update.
3740 * xml-support.c (xinclude_start_include): Update.
3741 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3742 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3743 (xml_fetch_content_from_file): Likewise.
3744 * osdata.c (get_osdata): Update.
3745 * target.h (target_read_stralloc, target_get_osdata): Return
3746 unique_xmalloc_ptr.
3747 * solib-aix.c (solib_aix_get_library_list): Update.
3748 * solib-target.c (solib_target_current_sos): Update.
3749 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3750 * xml-tdesc.c (fetch_available_features_from_target): Update.
3751 (target_fetch_description_xml): Update.
3752 (file_read_description_xml): Update.
3753 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3754 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3755 (remote_pid_to_exec_file): Update.
3756 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3757 (target_get_osdata): Likewise.
3758
b80406ac
TT
37592017-10-16 Tom Tromey <tom@tromey.com>
3760
3761 * remote.c (remote_register_number_and_offset): Use std::vector.
3762 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3763 (putpkt_binary): Use gdb::def_vector.
3764 (compare_sections_command): Use gdb::byte_vector.
3765
a90ecff8
TT
37662017-10-16 Tom Tromey <tom@tromey.com>
3767
3768 * ppc-linux-nat.c (hwdebug_insert_point): Use
3769 gdb::unique_xmalloc_ptr, XDUP.
3770
2dc0e219
TT
37712017-10-16 Tom Tromey <tom@tromey.com>
3772
3773 * probe.c (parse_probes): Use std::string.
3774 (info_probes_for_ops, enable_probes_command)
3775 (disable_probes_command): Remove cleanups.
3776
b05628f0
TT
37772017-10-16 Tom Tromey <tom@tromey.com>
3778
3779 * buildsym.c (block_compar): Remove.
3780 (end_symtab_get_static_block): Use std::vector.
3781
a79b1bc6
SM
37822017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3783
3784 * memrange.h (struct mem_range): Define operator< and operator==.
3785 (mem_range_s): Remove.
3786 (DEF_VEC_O (mem_range_s)): Remove.
3787 (normalize_mem_ranges): Change parameter type to std::vector.
3788 * memrange.c (compare_mem_ranges): Remove.
3789 (normalize_mem_ranges): Change parameter type to std::vector,
3790 adjust to vector change.
3791 * exec.c (section_table_available_memory): Return vector, remove
3792 parameter.
3793 (section_table_read_available_memory): Adjust to std::vector
3794 change.
3795 * remote.c (remote_read_bytes): Adjust to std::vector
3796 change.
3797 * tracepoint.h (traceframe_available_memory): Change parameter
3798 type to std::vector.
3799 * tracepoint.c (traceframe_available_memory): Change parameter
3800 type to std::vector, adjust.
3801 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3802 std::vector change.
3803 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3804 unittests/memrange-selftests.c.
3805 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3806 * gdb/unittests/memrange-selftests.c: New file.
3807
63f0e930
PA
38082017-10-16 Pedro Alves <palves@redhat.com>
3809
3810 * elfread.c (probe_key_free): Rename range-for variable.
3811 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3812 (find_probe_by_pc, collect_probes): Rename range-for variable.
3813
c40c7bfc
YQ
38142017-10-16 Yao Qi <yao.qi@linaro.org>
3815
3816 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3817 * features/tic6x-c62x.c: Remove.
3818 * features/tic6x-c64x-linux.c: Remove.
3819 * features/tic6x-c64x.c: Remove.
3820 * features/tic6x-c64xp-linux.c: Remove.
3821 * features/tic6x-c64xp.c: Remove.
3822 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3823 initialize_tdesc_tic6x_*_linux functions.
3824 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3825 initialize_tdesc_tic6x_* functions.
3826
df27ae6a
YQ
38272017-10-16 Yao Qi <yao.qi@linaro.org>
3828
3829 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3830 tic6x-c62x.
3831 * regformats/tic6x-c62x.dat: Remove.
3832 * regformats/tic6x-c64x.dat: Remove.
3833 * regformats/tic6x-c64xp.dat: Remove.
3834
86766165
SM
38352017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3836
3837 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3838 (the !HAVE_LIBEXPAT version).
3839
824dfcc3
SM
38402017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3841
3842 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3843 const.
3844
2098b393
SM
38452017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3846
3847 * target.h: Include tracepoint.h.
3848 (enum trace_find_type): Move to tracepoint.h.
3849 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3850 * tracepoint.h: Don't include target.h
3851 (enum trace_find_type): Move from target.h.
3852 (parse_traceframe_info): Return a unique ptr.
3853 * tracepoint.c (current_traceframe_info): Change type to unique
3854 ptr.
3855 (free_traceframe_info): Remove.
3856 (clear_traceframe_info): Don't manually free
3857 current_traceframe_info.
3858 (free_result): Remove.
3859 (parse_traceframe_info): Return a unique ptr.
3860 (get_traceframe_info): Adjust to unique ptr.
3861 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3862 * remote.c (remote_traceframe_info): Return a unique ptr.
3863 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3864 ptr.
3865 * target-debug.h (target_debug_print_traceframe_info_up): New
3866 macro.
3867 * target-delegates.c: Regenerate.
3868
4cdd21a8
SM
38692017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3870
3871 * memrange.h (struct mem_range): Add constructors.
3872 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3873 std::vector<mem_range>.
3874 * tracepoint.c (free_traceframe_info): Don't manually free
3875 vector.
3876 (traceframe_info_start_memory): Adjust to vector change.
3877 (traceframe_available_memory): Likewise.
3878 * tracefile-tfile.c (build_traceframe_info): Likewise.
3879 * ctf.c (ctf_traceframe_info): Likewise.
3880
d0d292a2
SM
38812017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3882
3883 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3884 std::vector<int>.
3885 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3886 (traceframe_info_start_tvar): Adjust to vector change.
3887 (parse_traceframe_info): Allocate with new.
3888 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3889 vector change.
3890 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3891 change.
3892 tfile_traceframe_info): Allocate with new.
3893 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3894 change.
3895
8d3c73ef
SM
38962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3897
3898 * tracepoint.c (traceframe_info): Rename to...
3899 (current_traceframe_info): ...this.
3900 (clear_traceframe_info): Adjust.
3901 (get_traceframe_info): Adjust.
3902
b129dcac
SM
39032017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3904
3905 * nat/linux-osdata.c: Include algorithm.
3906 (compare_processes): Remove.
3907 (struct pid_pgid_entry): New struct.
3908 (linux_xfer_osdata_processgroups): Use std::vector instead of
3909 XNEWVEC.
3910
af5bf4ad
SM
39112017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3912
3913 * objfiles.h: Don't include symfile.h.
3914 (struct partial_symbol): Remove forward-declaration.
3915 (struct objfile) <global_psymbols, static_psymbols>: Change type
3916 to std::vector<partial_symbol *>.
3917 * objfiles.c (objfile::objfile): Don't memset those fields.
3918 (objfile::~objfile): Don't free those fields.
3919 * psympriv.h (struct psymbol_allocation_list): Remove
3920 forward-declaration.
3921 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3922 to std::vector.
3923 (start_psymtab_common): Change parameters to std::vector.
3924 * psymtab.c: Include algorithm.
3925 (require_partial_symbols): Call shrink_to_fit.
3926 (find_pc_sect_psymbol): Adjust to vector change.
3927 (match_partial_symbol): Likewise.
3928 (lookup_partial_symbol): Likewise.
3929 (psym_relocate): Likewise.
3930 (dump_psymtab): Likewise.
3931 (recursively_search_psymtabs): Likewise.
3932 (compare_psymbols): Remove.
3933 (sort_pst_symbols): Adjust to vector change.
3934 (start_psymtab_common): Likewise.
3935 (end_psymtab_common): Likewise.
3936 (psymbol_bcache_full): De-constify return value.
3937 (add_psymbol_to_bcache): Likewise.
3938 (extend_psymbol_list): Remove.
3939 (append_psymbol_to_list): Adjust to vector change.
3940 (add_psymbol_to_list): Likewise.
3941 (init_psymbol_list): Likewise.
3942 (maintenance_info_psymtabs): Likewise.
3943 (maintenance_check_psymtabs): Likewise.
3944 * symfile.h (struct psymbol_allocation_list): Remove.
3945 * symfile.c (reread_symbols): Adjust to vector change.
3946 * dbxread.c (start_psymtab): Change type of parameters.
3947 (dbx_symfile_read): Adjust to vector change.
3948 (read_dbx_symtab): Likewise.
3949 (start_psymtab): Change type of parameters.
3950 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3951 (create_partial_symtab): Likewise.
3952 (add_partial_symbol): Likewise.
3953 (write_one_signatured_type): Likewise.
3954 (recursively_write_psymbols): Likewise.
3955 * mdebugread.c (parse_partial_symbols): Likewise.
3956 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3957 (scan_xcoff_symtab): Adjust to vector change.
3958 (xcoff_initial_scan): Likewise.
3959
3ec5942f
SM
39602017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3961
3962 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3963
2399fe6a
YQ
39642017-10-13 Yao Qi <yao.qi@linaro.org>
3965
3966 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3967 Remove s390x-*-expedite, add s390x-expedite.
3968
4bf3f4a8
YQ
39692017-10-13 Yao Qi <yao.qi@linaro.org>
3970
3971 * features/s390-gs-linux64.c: Regenerated.
3972 * features/s390x-gs-linux64.c: Regenerated.
3973
9e86da07
TT
39742017-10-13 Tom Tromey <tom@tromey.com>
3975
3976 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3977 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3978 delete.
3979 * symfile.c (symbol_file_add_with_addrs): Use new.
3980 (symbol_file_add_separate): Update comment.
3981 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3982 * jit.c (jit_object_close_impl): Use new.
3983 (jit_unregister_code): Use delete.
3984 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3985 (~objfile): Rename from free_objfile.
3986 (free_objfile_separate_debug, do_free_objfile_cleanup)
3987 (free_all_objfiles, objfile_purge_solibs): Use delete.
3988 * objfiles.h (struct objfile): Add constructor and destructor.
3989 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3990 (allocate_objfile, free_objfile): Don't declare.
3991 (struct objstats): Add initializers.
3992
c2508e90
SM
39932017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3996 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3997 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3998 * gdbarch.h: Regenerate.
3999 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4000 Adjust comment.
4001 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4002 (i386_displaced_step_fixup): Adjust comment.
4003 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4004
a900ff72
TT
40052017-10-12 Tom Tromey <tom@tromey.com>
4006
4007 * prologue-value.h (pv_area::store_would_trash): Return bool.
4008 (pv_area::find_reg): Likewise.
4009 * prologue-value.c (pv_area::store_would_trash): Return bool.
4010 (pv_area::find_reg): Likewise.
4011
f7b7ed97
TT
40122017-10-12 Tom Tromey <tom@tromey.com>
4013
4014 * s390-linux-tdep.c (s390_store, s390_load)
4015 (s390_check_for_saved, s390_analyze_prologue): Update.
4016 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4017 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4018 * prologue-value.h (class pv_area): Move from prologue-value.c.
4019 Change names of members. Add constructor, destructor, member
4020 functions.
4021 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4022 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4023 (pv_area_fetch, pv_area_scan): Don't declare.
4024 * prologue-value.c (struct pv_area::area_entry): Now member of
4025 pv_area.
4026 (struct pv_area): Move to prologue-value.h.
4027 (pv_area::pv_area): Rename from make_pv_area.
4028 (pv_area::~pv_area): Rename from free_pv_area.
4029 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4030 (clear_entries, find_entry, overlaps, store_would_trash, store)
4031 (fetch, find_reg, scan): Now member of pv_area.
4032 Remove "area" argument. Update.
4033 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4034 Update.
4035 * mn10300-tdep.c (push_reg, check_for_saved)
4036 (mn10300_analyze_prologue): Update.
4037 * mep-tdep.c (is_arg_spill, check_for_saved)
4038 (mep_analyze_prologue): Update.
4039 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4040 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4041 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4042 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4043 Update.
4044 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4045 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4046
466eecee
SM
40472017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4048
4049 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4050 * linux-nat.c (linux_nat_delete_thread): New variable.
4051 (lwp_free): Invoke linux_nat_delete_thread if set.
4052 (linux_nat_set_delete_thread): New function.
4053 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4054 thread delete callback.
4055 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4056 (_initialize_arm_linux_nat): Assign thread delete callback.
4057 * s390-linux-nat.c (s390_delete_thread): New function.
4058 (_initialize_s390_nat): Assign thread delete callback.
4059 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4060 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4061 function.
4062 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4063 declaration.
4064 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4065 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4066
f71c8822
TT
40672017-10-09 Tom Tromey <tom@tromey.com>
4068
4069 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4070 std::string.
4071 * tui/tui-layout.c (enum tui_status): Use std::string.
4072
981a3fb3
TT
40732017-10-11 Tom Tromey <tom@tromey.com>
4074
4075 * gdbthread.h (thread_command): Constify.
4076 * inferior.h (detach_command): Constify.
4077 * top.h (set_history, show_history): Constify.
4078 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4079 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4080 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4081 * printcmd.c (set_command): Constify.
4082 (non_const_set_command): New function.
4083 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4084 * breakpoint.c (enable_command, disable_command, delete_command)
4085 (catch_command, tcatch_command, set_breakpoint_cmd)
4086 (show_breakpoint_cmd): Constify.
4087 * macrocmd.c (macro_command): Constify.
4088 * infcmd.c (unset_command, kill_command, detach_command)
4089 (info_proc_cmd): Constify.
4090 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4091 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4092 (info_auto_load_cmd): Constify.
4093 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4094 (unset_tdesc_cmd): Constify.
4095 * ada-lang.c (set_ada_command, show_ada_command)
4096 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4097 * guile/guile.c (set_guile_command, show_guile_command)
4098 (info_guile_command): Constify.
4099 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4100 Constify.
4101 * skip.c (skip_command): Constify.
4102 * compile/compile.c (_initialize_compile): Constify.
4103 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4104 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4105 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4106 (maint_btrace_pt_show_cmd): Constify.
4107 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4108 Constify.
4109 * python/python.c (user_show_python, user_set_python): Constify.
4110 * mips-tdep.c (set_mips_command, show_mips_command)
4111 (set_mipsfpu_command): Constify.
4112 * record-btrace.c (cmd_record_btrace_start)
4113 (cmd_set_record_btrace, cmd_show_record_btrace)
4114 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4115 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4116 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4117 Constify.
4118 * symfile.c (overlay_command): Constify.
4119 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4120 * cli/cli-logging.c (set_logging_command, show_logging_command):
4121 Constify.
4122 * cli/cli-dump.c (dump_command, append_command)
4123 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4124 (tekhex_dump_command, binary_dump_command)
4125 (binary_append_command): Constify.
4126 * cli/cli-decode.c (struct cmd_list_element): Change type of
4127 "fun".
4128 * cli/cli-cmds.c (info_command, show_command, set_debug)
4129 (show_debug): Constify.
4130 (show_command): Add non-const overload.
4131 * top.c (set_history, show_history): Constify.
4132 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4133 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4134 * target.c (target_command): Constify.
4135 * sparc64-tdep.c (info_adi_command): Constify.
4136 * record-full.c (cmd_record_full_start): Constify.
4137 (set_record_full_command): Constify. Fix typo.
4138 (show_record_full_command): Constify.
4139 * thread.c (thread_command, thread_apply_command): Constify.
4140 * memattr.c (dummy_cmd): Constify.
4141 * value.c (function_command): Constify.
4142 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4143 * probe.c (info_probes_command): Constify.
4144 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4145 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4146 (show_thread_cmd, set_thread_default_cmd)
4147 (show_thread_default_cmd): Constify.
4148 (check_empty): Constify.
4149 * tracepoint.c (tfind_command): Constify.
4150 * cp-support.c (maint_cplus_command): Constify.
4151 * windows-tdep.c (info_w32_command): Constify.
4152 * record.c (cmd_record_start, set_record_command)
4153 (show_record_command, info_record_command, cmd_record_goto):
4154 Constify.
4155 * ravenscar-thread.c (set_ravenscar_command)
4156 (show_ravenscar_command): Constify.
4157 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4158 Constify.
4159 (add_internal_problem_command): Remove casts.
4160 * arc-tdep.c (maintenance_print_arc_command): Constify.
4161 * valprint.c (set_print, show_print, set_print_raw)
4162 (show_print_raw): Constify.
4163 * maint.c (maintenance_command, maintenance_info_command)
4164 (maintenance_print_command, maintenance_set_cmd)
4165 (maintenance_show_cmd, set_per_command_cmd)
4166 (show_per_command_cmd, maintenance_check_command): Constify.
4167 * language.c (set_check, show_check): Constify.
4168 * typeprint.c (show_print_type, set_print_type): Constify.
4169 * go32-nat.c (go32_info_dos_command): Constify.
4170
fdf44873
TT
41712017-10-11 Tom Tromey <tom@tromey.com>
4172
4173 * breakpoint.c (prepare_re_set_context): Remove.
4174 (breakpoint_re_set_one): Update. Don't use cleanups.
4175 (breakpoint_re_set): Use scoped_restore, std::string, and
4176 scoped_restore_current_language.
4177
81b1e71c
TT
41782017-10-11 Tom Tromey <tom@tromey.com>
4179
4180 * breakpoint.c (commands_command_1): Use std::string.
4181 (cleanup_executing_breakpoints): Remove.
4182 (bpstat_do_actions_1): Use scoped_restore.
4183 (bpstat_check_watchpoint): Use std::string.
4184 (decode_static_tracepoint_spec): Likewise.
4185 (break_range_command): Likewise.
4186 (watch_command_1): Likewise.
4187 (compare_breakpoints): Change argument types.
4188 (clear_command): Use std::vector.
4189 (cleanup_executing_breakpoints): Remove.
4190 (update_global_location_list): Use unique_xmalloc_ptr.
4191 (strace_command): Remove unused declaration.
4192
4f9d9906
JB
41932017-10-11 John Baldwin <jhb@FreeBSD.org>
4194
4195 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4196 * NEWS: Mention new FreeBSD/arm native configuration.
4197 * configure.host: Add arm*-*-freebsd*.
4198 * configure.nat: Likewise.
4199 * arm-fbsd-nat.c: New file.
4200
7176dfd2
JB
42012017-10-11 John Baldwin <jhb@FreeBSD.org>
4202
4203 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4204 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4205 * NEWS: Mention new FreeBSD/arm target.
4206 * configure.tgt: Add arm*-*-freebsd*.
4207 * arm-fbsd-tdep.c: New file.
4208 * arm-fbsd-tdep.h: New file.
4209
fe220226
MR
42102017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4211
4212 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4213 `gdbarch_elfcore_write_linux_prpsinfo'.
4214 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4215 method.
4216 (elf_internal_linux_prpsinfo): Remove declaration.
4217 * gdbarch.h: Regenerate.
4218 * gdbarch.c: Regenerate.
4219
a2f63b2e
MR
42202017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4221
4222 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4223 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4224
458ca1d0
PA
42252017-10-11 Pedro Alves <palves@redhat.com>
4226
4227 * breakpoint.c (reattach_breakpoints): Delete.
4228 * breakpoint.h (reattach_breakpoints): Delete.
4229
905014d7
SM
42302017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4231
4232 * symfile.c (registered_sym_fns): Make struct, not typedef.
4233 (DEF_VEC_O (registered_sym_fns)): Remove.
4234 (symtab_fns): Change type to std::vector.
4235 (add_symtab_fns): Adjust.
4236 (find_sym_fns): Adjust.
4237
56d704da
AK
42382017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4239
4240 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4241 * arc-tdep.h (arc_arch_is_em): New function.
4242 (arc_arch_is_hs): Likewise.
4243
7fa29be9
EB
42442017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4245
4246 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4247 parentheses in the declaration.
4248 (macro_lookup_inclusion): Likewise.
4249 (macro_lookup_definition): Likewise.
4250 * p-lang.h (pascal_builtin_types): Likewise.
4251 * tui/tui-data.c (tui_win_list): Likewise.
4252 * tui/tui-data.h (tui_win_list): Likewise.
4253 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4254
d9b477e3
KB
42552017-10-11 Mark Rages <markrages@gmail.com>
4256
4257 * target-memory.c (block_boundaries): Fix for block address not
4258 aligned on block size.
4259
65630365
PA
42602017-10-10 Pedro Alves <palves@redhat.com>
4261 Tom Tromey <tom@tromey.com>
4262
4263 * breakpoint.c (struct captured_breakpoint_query_args)
4264 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4265 (print_breakpoint): New.
4266 * breakpoint.h (print_breakpoint): Declare.
4267 * common/common-exceptions.h (enum return_reason): Remove
4268 references to catch_exceptions.
4269 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4270 Delete.
4271 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4272 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4273 * gdb.h: Delete.
4274 * gdbthread.h (thread_select): Declare.
4275 * mi/mi-cmd-break.c: Don't include gdb.h.
4276 (breakpoint_notify): Use print_breakpoint.
4277 * mi/mi-cmd-catch.c: Don't include gdb.h.
4278 * mi/mi-interp.c: Don't include gdb.h.
4279 (mi_print_breakpoint_for_event): New.
4280 (mi_breakpoint_created, mi_breakpoint_modified): Use
4281 mi_print_breakpoint_for_event.
4282 * mi/mi-main.c: Don't include gdb.h.
4283 (mi_cmd_thread_select): Parse the global thread ID here. Use
4284 thread_select instead of gdb_thread_select.
4285 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4286 of using gdb_list_thread_ids.
4287 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4288 FILEIO_ENOSYS here.
4289 (remote_fileio_request): Use TRY/CATCH instead of
4290 catch_exceptions.
4291 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4292 (symbol_file_add_from_memory_wrapper): Delete.
4293 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4294 * thread.c: Don't include gdb.h.
4295 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4296 (thread_alive): Use thread_select.
4297 (do_captured_thread_select): Delete, parts salvaged as ...
4298 (thread_select): ... this new function.
4299 (gdb_thread_select): Delete.
4300
bf469271
PA
43012017-10-10 Pedro Alves <palves@redhat.com>
4302 Tom Tromey <tom@tromey.com>
4303
4304 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4305 and reverse logic.
4306 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4307 No longer macros. Instead ...
4308 (enum wp_check_result): They're now values of this new
4309 enumeration.
4310 (watchpoint_check): Change return type to wp_check_result and
4311 parameter type to bpstat.
4312 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4313 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4314 catch_errors. Reverse logic of watchpoint_check call.
4315 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4316 pointer as parameter.
4317 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4318 * common/common-exceptions.c (throw_exception_sjlj): Update
4319 comments to avoid mentioning catch_errors.
4320 * exceptions.c (catch_errors): Delete.
4321 * exceptions.h: Update comments to avoid mentioning catch_errors.
4322 (catch_errors_ftype, catch_errors): Delete.
4323 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4324 (hook_stop_stub): Delete.
4325 (restore_selected_frame): Change return type to void, and
4326 parameter type to const frame_id &.
4327 (restore_infcall_control_state): Use TRY/CATCH instead of
4328 catch_errors.
4329 * main.c (captured_command_loop): Return void and remove
4330 parameter. Remove references to catch_errors.
4331 (captured_main): Use TRY/CATCH instead of catch_errors.
4332 * objc-lang.c (objc_submethod_helper_data)
4333 (find_objc_msgcall_submethod_helper): Delete.
4334 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4335 catch_errors.
4336 * record-full.c (record_full_message): Return void.
4337 (record_full_message_args, record_full_message_wrapper): Delete.
4338 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4339 instead of catch_errors.
4340 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4341 parameter type to int.
4342 * solib-darwin.c (open_symbol_file_object): Ditto.
4343 * solib-dsbt.c (open_symbol_file_object): Ditto.
4344 * solib-frv.c (open_symbol_file_object): Ditto.
4345 * solib-svr4.c (open_symbol_file_object): Ditto.
4346 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4347 * solib.c (update_solib_list): Use TRY/CATCH instead of
4348 catch_errors.
4349 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4350 Change type.
4351 * symmisc.c (struct print_symbol_args): Remove.
4352 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4353 (print_symbol): Change type.
4354 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4355 and remove parameters.
4356 (catch_errors): New.
4357 (get_windows_debug_event): Adjust.
4358
1a56bfa5
TT
43592017-10-09 Tom Tromey <tom@tromey.com>
4360
4361 * mi/mi-main.c (free_splay_tree): Remove.
4362 (list_available_thread_groups): Use splay_tree_up.
4363 * common/gdb_splay_tree.h: New file.
4364
0c478e2d
TT
43652017-10-09 Tom Tromey <tom@tromey.com>
4366
4367 * mi/mi-main.c (do_nothing): Remove.
4368 (list_available_thread_groups): Update.
4369
cbd2b4e3
PA
43702017-10-09 Pedro Alves <palves@redhat.com>
4371
4372 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4373 reading registers when switching context.
4374
a181c0bf
JB
43752017-10-09 John Baldwin <jhb@FreeBSD.org>
4376
4377 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4378 (fbsd_convert_siginfo): Likewise.
4379 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4380
6e66f753
SM
43812017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4382
4383 * configure.ac (try_guile_versions): Remove guile-2.2.
4384 * configure: Regenerate.
4385
890e9790
TT
43862017-10-09 Tom Tromey <tom@tromey.com>
4387
4388 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4389 (COMPILE.pre): Use $(CXX).
4390
109483d9
PA
43912017-10-09 Pedro Alves <palves@redhat.com>
4392
4393 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4394 Use bool.
4395 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4396 * cp-support.h (cp_remove_params): Now returns a
4397 gdb::unique_xmalloc_ptr.
4398 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4399 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4400 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4401 returning a gdb::unique_xmalloc_ptr.
4402 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4403 * stack.c (find_frame_funname): Adjust to cp_remove_params
4404 returning a gdb::unique_xmalloc_ptr.
4405
791afaa2
TT
44062017-10-08 Tom Tromey <tom@tromey.com>
4407
4408 * dwarf2read.c (dwarf2_get_dwz_file): Use
4409 gdb::unique_xmalloc_ptr.
4410 (find_slot_in_mapped_hash): Likewise.
4411 (dwarf2_physname): Likewise.
4412 (create_dwo_unit_in_dwp_v1): Use std::string.
4413 (create_dwo_unit_in_dwp_v2): Likewise.
4414 (lookup_dwo_cutu): Likewise.
4415 (inherit_abstract_dies): Use std::vector.
4416 (read_array_type): Likewise.
4417 (dwarf_decode_macros): Remove unused declaration.
4418 (unsigned_int_compar): Remove.
4419 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4420 (psymtabs_addrmap_cleanup): Remove.
4421
30a9c02f
TT
44222017-10-08 Tom Tromey <tom@tromey.com>
4423
4424 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4425 * frame.h (frame_cleanup_after_sniffer): Declare.
4426 (frame_prepare_for_sniffer): Return void.
4427 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4428 type of argument.
4429 (frame_prepare_for_sniffer): Return void.
4430
757325a3
TT
44312017-10-08 Tom Tromey <tom@tromey.com>
4432
4433 * utils.h (make_cleanup_value_free): Remove.
4434 * utils.c (do_value_free, struct cleanup): Remove.
4435 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4436 Use gdb_value_up.
4437 * value.h (struct value_deleter): New.
4438 (gdb_value_up): New typedef.
4439
b9c04fb2
TT
44402017-10-08 Tom Tromey <tom@tromey.com>
4441
4442 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4443 (make_cleanup_free_search_symbols): Remove.
4444 (search_symbols): Return std::vector.
4445 (symbol_search::compare_search_syms): Now member of
4446 symbol_search. Change arguments.
4447 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4448 (symtab_symbol_info, rbreak_command): Update.
4449 * symtab.h (struct symbol_search) <next>: Remove.
4450 Add constructors.
4451 (symbol_search::operator<): New function.
4452 (symbol_search::operator==): New function.
4453 (search_symbols): Remove std::vector.
4454 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4455 (symbol_search::compare_search_syms): Declare.
4456
0d28b0a5
YQ
44572017-10-06 Yao Qi <yao.qi@linaro.org>
4458
4459 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4460 arch/aarch64-insn.o.
4461 Remove one rule.
4462 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4463
71917808
YQ
44642017-10-06 Yao Qi <yao.qi@linaro.org>
4465
4466 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4467 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4468 arch/arm-linux.o respectively.
4469 * configure.tgt: Likewise.
4470
2081b2b2
YQ
44712017-10-06 Yao Qi <yao.qi@linaro.org>
4472
4473 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4474 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4475
a1b85d28
PA
44762017-10-06 Pedro Alves <palves@redhat.com>
4477
4478 * windows-nat.c: Include <algorithm>.
4479
d97987e2
YQ
44802017-10-06 Yao Qi <yao.qi@linaro.org>
4481
4482 * configure.tgt (i386_tobjs): New variable.
4483 (amd64_tobjs): New variable.
4484 Set $cpu_obs and $os_obs.
4485
f38307f5
YQ
44862017-10-06 Yao Qi <yao.qi@linaro.org>
4487
4488 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4489 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4490 (clean): Remove object files and dependency files.
4491 (distclean): Remove the directory.
4492 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4493 * configure: Re-generated.
4494 * configure.tgt: Replace amd64.o with arch/amd64.o.
4495
2f924de6
JM
44962017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4497
4498 PR build/22188
4499 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4500 and SETEND.
4501
2fd9d7ca
PA
45022017-10-05 Pedro Alves <palves@redhat.com>
4503
4504 * linux-nat.c (linux_child_follow_fork): When following the parent
4505 and detaching the child, consult the parent thread's architecture
4506 instead of the child's.
4507
d13b8493
UW
45082017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4509
4510 * ax.h: Do not include "doublest.h".
4511 (union agent_val): Remove.
4512
3b4b2f16
UW
45132017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4514
4515 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4516 (decimal_to_string): Return std::string object.
4517 (decimal_from_string): Accept std::string object. Return bool.
4518 (decimal_from_integral, decimal_from_doublest): Remove.
4519 (decimal_from_longest): Add prototype.
4520 (decimal_from_ulongest): Likewise.
4521 (decimal_to_longest): Likewise.
4522 (decimal_from_doublest): Likewise.
4523 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4524 (MAX_DECIMAL_STRING): Move here.
4525 (decimal_to_string): Return std::string object.
4526 (decimal_from_string): Accept std::string object. Return bool.
4527 (decimal_from_integral): Remove, replace by ...
4528 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4529 (decimal_to_longest): New function.
4530 (decimal_from_floating): Remove, replace by ...
4531 (decimal_from_doublest): ... this new function.
4532 (decimal_to_doublest): Update to new decimal_to_string interface.
4533
4534 * value.c (unpack_long): Use decimal_to_longest.
4535 * valops.c (value_cast): Use decimal_from_doublest instead of
4536 decimal_from_floating. Use decimal_from_[u]longest isntead of
4537 decimal_from_integral.
4538 * valarith.c (value_args_as_decimal): Likewise.
4539 * valprint.c (print_decimal_floating): Update to new
4540 decimal_to_string interface.
4541 * printcmd.c (printf_decfloat): Likewise.
4542 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4543
1841ee5d
UW
45442017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4545
4546 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4547 * gdbtypes.c: Include "floatformat.h".
4548 * value.c: Likewise.
4549 * m68k-tdep.c: Likewise.
4550
4551 * findvar.c: Do not include "floatformat.h".
4552 * amd64-darwin-tdep.c: Likewise.
4553 * arm-linux-tdep.c: Likewise.
4554 * i386-darwin-tdep.c: Likewise.
4555 * i387-tdep.c: Likewise.
4556 * m68k-linux-tdep.c: Likewise.
4557 * mep-tdep.c: Likewise.
4558 * mips-tdep.c: Likewise.
4559 * nios2-tdep.c: Likewise.
4560 * s390-linux-tdep.c: Likewise.
4561 * sparc-obsd-tdep.c: Likewise.
4562 * sparc-tdep.c: Likewise.
4563 * sparc64-tdep.c: Likewise.
4564 * spu-tdep.c: Likewise.
4565 * tic6x-tdep.c: Likewise.
4566 * tilegx-tdep.c: Likewise.
4567 * vax-tdep.c: Likewise.
4568 * xstormy16-tdep.c: Likewise.
4569 * xtensa-tdep.c: Likewise.
4570
4571 * top.c: Do not include "doublest.h".
4572 * aarch64-tdep.c: Likewise.
4573 * alpha-tdep.c: Likewise.
4574 * arm-linux-tdep.c: Likewise.
4575 * m68k-linux-tdep.c: Likewise.
4576 * tilegx-tdep.c: Likewise.
4577 * xstormy16-tdep.c: Likewise.
4578
a80a6471
JB
45792017-10-05 John Baldwin <jhb@FreeBSD.org>
4580
4581 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4582 (mipsn32_fbsd_sigframe): Define.
4583 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4584 for FreeBSD/mipsn32.
4585
12c4bd7f
JB
45862017-10-05 John Baldwin <jhb@FreeBSD.org>
4587
4588 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4589 AT_HWCAP.
4590
c91933e9
TG
45912017-10-05 Tristan Gingold <tgingold@free.fr>
4592
4593 * MAINTAINERS (Misc): Update my email address.
4594
5cd63fda
PA
45952017-10-04 Pedro Alves <palves@redhat.com>
4596
4597 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4598 it instead of target_gdbarch.
4599 (get_remote_state, get_remote_packet_size): Adjust
4600 get_remote_arch_state calls, passing down target_gdbarch
4601 explicitly.
4602 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4603 'gdbarch' and use it instead of target_gdbarch.
4604 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4605 passing down target_gdbarch explicitly.
4606 (struct stop_reply) <arch>: New field.
4607 (remote_parse_stop_reply): Use the stopped thread's architecture,
4608 not the current inferior's. Save the architecture in the
4609 stop_reply.
4610 (process_stop_reply): Use the stop reply's architecture.
4611 (process_g_packet, remote_fetch_registers)
4612 (remote_prepare_to_store, store_registers_using_G)
4613 (remote_store_registers): Adjust get_remote_arch_state calls,
4614 using the regcache's architecture.
4615 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4616 passing down target_gdbarch explicitly.
4617 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4618 beneath instead of calling target_gdbarch.
4619 * target.c (default_thread_architecture): Use the specified
4620 inferior's architecture, instead of the current inferior's
4621 architecture (via target_gdbarch).
4622
ed4227b7
PA
46232017-10-04 Pedro Alves <palves@redhat.com>
4624
4625 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4626 case.
4627 (regcache_print): Handle !target_has_registers here instead.
4628
55b11ddf
PA
46292017-10-04 Pedro Alves <palves@redhat.com>
4630
4631 * frame.c (create_test_frame): Delete.
4632 * frame.h (create_test_frame): Delete.
4633 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4634 (class regcache_test): Delete.
4635 (test_target_has_registers, test_target_has_stack)
4636 (test_target_has_memory, test_target_prepare_to_store)
4637 (test_target_store_registers): New functions.
4638 (test_target_ops): New class.
4639 (register_to_value_test): Error out if there's already a
4640 process_stratum (or higher) target pushed. Create a fuller mock
4641 environment, with mock target_ops, inferior, address space, thread
4642 and inferior_ptid.
4643 * progspace.c (struct address_space): Move to ...
4644 * progspace.h (struct address_space): ... here.
4645 * regcache.h (regcache::~regcache, regcache::raw_write)
4646 [GDB_SELF_TEST]: No longer virtual.
4647
4c71c105
SM
46482017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4649
4650 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4651
73dcd72d
PA
46522017-10-04 Pedro Alves <palves@redhat.com>
4653
4654 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4655 out of 'between TRY and CATCH'.
4656
44704526
PA
46572017-10-04 Pedro Alves <palves@redhat.com>
4658
4659 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4660 * common/common-exceptions.h (TRY): Open an outermost scope.
4661 Expand intro comment.
4662 (CATCH): Reindent.
4663 (END_CATCH): Close the outermost scope.
4664 * completer.c (complete_line_internal): Add missing END_CATCH.
4665
bc3b087d
SDJ
46662017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4667
4668 * NEWS (Changes since GDB 8.0): Add entry about new
4669 'set-cwd-on-gdbserver' feature.
4670 (New remote packets): Add entry for QSetWorkingDir.
4671 * common/common-inferior.h (set_inferior_cwd): New prototype.
4672 * infcmd.c (set_inferior_cwd): Remove "static".
4673 (show_cwd_command): Expand text to include remote debugging.
4674 * remote.c: Add PACKET_QSetWorkingDir.
4675 (remote_protocol_features) <QSetWorkingDir>: New entry for
4676 PACKET_QSetWorkingDir.
4677 (extended_remote_set_inferior_cwd): New function.
4678 (extended_remote_create_inferior): Call
4679 "extended_remote_set_inferior_cwd".
4680 (_initialize_remote): Call "add_packet_config_cmd" for
4681 QSetWorkingDir.
4682
d092c5a2
SDJ
46832017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4684
4685 * NEWS (New commands): Mention "set/show cwd".
4686 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4687 "cd" command's help text.
4688 * common/common-inferior.h (get_inferior_cwd): New prototype.
4689 * infcmd.c (inferior_cwd_scratch): New global variable.
4690 (set_inferior_cwd): New function.
4691 (get_inferior_cwd): Likewise.
4692 (set_cwd_command): Likewise.
4693 (show_cwd_command): Likewise.
4694 (_initialize_infcmd): Add "set/show cwd" commands.
4695 * inferior.h (class inferior) <cwd>: New field.
4696 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4697 (fork_inferior): Change inferior's cwd before its execution.
4698 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4699 to CreateProcess.
4700
7da0a886
SDJ
47012017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4702
4703 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4704 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4705 (COMMON_OBS): Add gdb_tilde_expand.o.
4706 * common/gdb_tilde_expand.c: New file.
4707 * common/gdb_tilde_expand.h: Likewise.
4708
db8dd160
MR
47092017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4710
4711 * gdbarch.sh (objfile): Remove duplicate declaration.
4712 * gdbarch.h: Regenerate.
4713
f8bfbf22
TT
47142017-10-03 Tom Tromey <tom@tromey.com>
4715
4716 * utils.c (internal_vproblem): Use string_vprintf.
4717
5178ed48
TT
47182017-10-03 Tom Tromey <tom@tromey.com>
4719
4720 * printcmd.c (info_symbol_command): Use std::string.
4721
8cff8730
TT
47222017-10-03 Tom Tromey <tom@tromey.com>
4723
4724 * top.c (gdb_safe_append_history): Use std::string.
4725
895b8f30
TT
47262017-10-03 Tom Tromey <tom@tromey.com>
4727
4728 * event-top.c (stdin_event_handler): Update.
4729 * main.c (captured_main_1): Update.
4730 * top.h (make_delete_ui_cleanup): Remove.
4731 (struct ui): Add constructor and destructor.
4732 (new_ui, delete_ui): Remove.
4733 * top.c (make_delete_ui_cleanup): Remove.
4734 (new_ui_command): Use std::unique_ptr.
4735 (delete_ui_cleanup): Remove.
4736 (ui::ui): Rename from new_ui. Update.
4737 (free_ui): Remove.
4738 (ui::~ui): Rename from delete_ui. Update.
4739
0efef640
TT
47402017-10-03 Tom Tromey <tom@tromey.com>
4741
4742 * symfile.c (load_progress): Use gdb::byte_vector.
4743
245ad7d3
TT
47442017-10-03 Tom Tromey <tom@tromey.com>
4745
4746 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4747 declaration.
4748 * printcmd.c (x_command): Remove unused declaration.
4749 * symfile.c (symbol_file_command): Remove unused declaration.
4750
e05550d7
TT
47512017-10-03 Tom Tromey <tom@tromey.com>
4752
4753 * utils.c (internal_vproblem): Use std::string.
4754 (defaulted_query): Likewise.
4755
b95de2b7
TT
47562017-10-03 Tom Tromey <tom@tromey.com>
4757
4758 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4759 * top.c (execute_command_to_string): Update.
4760 * utils.c (make_cleanup_restore_page_info): Remove.
4761 (do_restore_page_info_cleanup): Remove.
4762 (set_batch_flag_and_restore_page_info):
4763 New.
4764 (make_cleanup_restore_page_info): Remove.
4765 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4766 (~set_batch_flag_and_restore_page_info): New
4767 (make_cleanup_restore_uinteger): Remove.
4768 (make_cleanup_restore_integer): Remove.
4769 (struct restore_integer_closure): Remove.
4770 (restore_integer): Remove.
4771 * utils.h (struct set_batch_flag_and_restore_page_info): New
4772 class.
4773 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4774 (make_cleanup_restore_page_info): Remove.
4775 (make_cleanup_restore_uinteger) Remove.
4776 (make_cleanup_restore_integer) Remove.
4777
07036511
TT
47782017-10-03 Tom Tromey <tom@tromey.com>
4779
4780 * record-full.h (record_full_gdb_operation_disable_set): Return
4781 scoped_restore_tmpl<int>.
4782 * infrun.c (adjust_pc_after_break): Update.
4783 (handle_signal_stop): Update.
4784 * record-full.c (record_full_gdb_operation_disable_set): Return
4785 scoped_restore_tmpl<int>.
4786 (record_full_wait_1, record_full_insert_breakpoint)
4787 (record_full_remove_breakpoint, record_full_save)
4788 (record_full_goto_insn): Update.
4789
45320ffa
TT
47902017-10-02 Tom Tromey <tom@tromey.com>
4791
4792 PR rust/22236:
4793 * rust-lang.c (rust_val_print_str): New function.
4794 (val_print_struct): Call it.
4795 (rust_subscript): Preserve name of slice type.
4796
b3e3859b
TT
47972017-10-02 Tom Tromey <tom@tromey.com>
4798
4799 * rust-lang.c (rust_subscript): Handle slices in
4800 EVAL_AVOID_SIDE_EFFECTS case.
4801
01af5e0d
TT
48022017-10-02 Tom Tromey <tom@tromey.com>
4803
4804 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4805
888e3ddb
TT
48062017-10-02 Tom Tromey <tom@tromey.com>
4807
4808 * rust-lang.h (rust_slice_type): Add "extern".
4809
cc536b21
PA
48102017-10-02 Tom Tromey <tom@tromey.com>
4811 Pedro Alves <palves@redhat.com>
4812
4813 * ada-lang.h (ada_exc_info::operator<): Make const.
4814 (ada_exc_info::operator==): Make const.
4815 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4816 Make const.
4817
386c8614
TT
48182017-09-29 Tom Tromey <tom@tromey.com>
4819
4820 * target.c (read_whatever_is_readable): Change type of "result".
4821 Update.
4822 (free_memory_read_result_vector): Remove.
4823 (read_memory_robust): Change return type. Update.
4824 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4825 bin2hex, std::string.
4826 * target.h (memory_read_result_s): Remove typedef.
4827 (free_memory_read_result_vector): Remove.
4828 (read_memory_robust): Return std::vector.
4829
789c4b5e
TT
48302017-09-29 Tom Tromey <tom@tromey.com>
4831
4832 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4833
ab816a27
TT
48342017-09-29 Tom Tromey <tom@tromey.com>
4835
4836 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4837 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4838 operator< and operator==.
4839 (ada_exceptions_list): Return a std::vector.
4840 * ada-lang.c (ada_exc_info::operator<): Rename from
4841 compare_ada_exception_info.
4842 (ada_exc_info::operator==): New.
4843 (sort_remove_dups_ada_exceptions_list): Change type of
4844 "exceptions".
4845 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4846 (ada_add_global_exceptions): Likewise.
4847 (ada_exceptions_list_1): Return a std::vector.
4848 (ada_exceptions_list): Likewise.
4849
52f9abe4
TT
48502017-09-29 Tom Tromey <tom@tromey.com>
4851
4852 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4853 'std::set *'.
4854 (print_one_inferior): Update.
4855 (free_vector_of_ints): Remove.
4856 (list_available_thread_groups): Change "ids" to std::set.
4857 (mi_cmd_list_thread_groups): Update.
4858 (struct collect_cores_data) <core>: Now a std::set.
4859 (collect_cores): Update.
4860 (unique): Remove.
4861 (print_one_inferior): Update.
4862
dcd5ddcc
TT
48632017-09-29 Tom Tromey <tom@tromey.com>
4864
4865 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4866 (mi_execute_async_cli_command): Likewise.
4867 (mi_cmd_trace_frame_collected): Use field_fmt.
4868
45d288cc
TT
48692017-09-29 Tom Tromey <tom@tromey.com>
4870
4871 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4872 gdb::byte_vector.
4873
6afe2f4a
TT
48742017-09-29 Tom Tromey <tom@tromey.com>
4875
4876 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4877
9813429a
TT
48782017-09-29 Tom Tromey <tom@tromey.com>
4879
4880 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4881
2d6960b4
TT
48822017-09-29 Tom Tromey <tom@tromey.com>
4883
4884 * varobj.h (varobj_gen_name): Return std::string.
4885 * varobj.c (varobj_gen_name): Return std::string.
4886 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4887 (mi_cmd_var_delete): Don't copy "name".
4888
784c453a
TT
48892017-09-29 Tom Tromey <tom@tromey.com>
4890
4891 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4892 (mi_cmd_break_insert_1): Update.
4893
a9bc57b9
TT
48942017-09-29 Tom Tromey <tom@tromey.com>
4895
4896 * target.h (make_scoped_defer_target_commit_resume): Update.
4897 * target.c (make_scoped_defer_target_commit_resume): Rename from
4898 make_cleanup_defer_target_commit_resume. Return a
4899 scoped_restore.
4900 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4901
9754d8c4
TT
49022017-09-29 Tom Tromey <tom@tromey.com>
4903
4904 * main.c (captured_main_1): Remove unused declaration.
4905 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4906
99ef965c
TT
49072017-09-29 Tom Tromey <tom@tromey.com>
4908
4909 * symtab.c (search_symbols): Remove unused outer cleanup.
4910 (make_source_files_completion_list): Remove unused declaration.
4911
42518ba7
TT
49122017-09-29 Tom Tromey <tom@tromey.com>
4913
4914 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4915
726b2169
TT
49162017-09-29 Tom Tromey <tom@tromey.com>
4917
4918 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4919 gdb::byte_vector.
4920
55b06432
TT
49212017-09-29 Tom Tromey <tom@tromey.com>
4922
4923 * complaints.c (vcomplaint): Use std::string.
4924
8abcee91
TT
49252017-09-29 Tom Tromey <tom@tromey.com>
4926
4927 * tracepoint.c (trace_variable_command): Use std::string.
4928 (encode_actions_1): Remove unused declarations.
4929 (create_tsv_from_upload): Use std::string.
4930
6ad94bc7
TT
49312017-09-29 Tom Tromey <tom@tromey.com>
4932
4933 * cp-support.c (gdb_demangle): Use std::string.
4934
2003f3d8
TT
49352017-09-29 Tom Tromey <tom@tromey.com>
4936
4937 * stack.c (parse_frame_specification): Use std::string
4938 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4939
8f8accb5
TT
49402017-09-29 Tom Tromey <tom@tromey.com>
4941
4942 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4943
200aa7b1
TT
49442017-09-29 Tom Tromey <tom@tromey.com>
4945
4946 * utils.c (vfprintf_maybe_filtered): Use std::string.
4947 (vfprintf_unfiltered): Likewise.
4948
606aae8a
TT
49492017-09-29 Tom Tromey <tom@tromey.com>
4950
4951 * event-top.c (top_level_prompt): Return std::string.
4952 (display_gdb_prompt): Update.
4953
bd413795
TT
49542017-09-29 Tom Tromey <tom@tromey.com>
4955
4956 * unittests/common-utils-selftests.c (format): New function.
4957 (string_vprintf_tests): New function.
4958 (_initialize_common_utils_selftests): Register new tests.
4959 * common/common-utils.c (string_vprintf): New function.
4960 * common/common-utils.h (string_vprintf): Declare.
4961
256642e8
PA
49622017-09-29 Pedro Alves <palves@redhat.com>
4963
4964 * common/rsp-low.c (unpack_varlen_hex): Constify.
4965 * common/rsp-low.h (unpack_varlen_hex): Constify.
4966 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4967 Constify.
4968 * remote.c (remote_set_permissions, read_ptid)
4969 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4970 (remote_static_tracepoint_marker_at)
4971 (remote_static_tracepoint_markers_by_strid)
4972 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4973 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4974 (parse_tracepoint_definition, parse_tsv_definition)
4975 (parse_static_tracepoint_marker_definition): Constify.
4976 * tracepoint.h (parse_static_tracepoint_marker_definition)
4977 (parse_trace_status, parse_tracepoint_status)
4978 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4979
b6bb3468
PA
49802017-09-29 Pedro Alves <palves@redhat.com>
4981
4982 * remote.c (target_buf, target_buf_size): Delete.
4983 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4984 Use the connection's packet buffer instead.
4985 All callers adjusted.
4986 (_initialize_remote): Remove references to target_buf and
4987 target_buf_size.
4988
b2f8eb7a
PA
49892017-09-28 Pedro Alves <palves@redhat.com>
4990
4991 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4992 unittests/common-utils-selftests.c.
4993 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4994 (COMMON_OBS): Remove utils-selftests.o.
4995 * utils-selftests.c: Move to ...
4996 * unittests/common-utils-selftests.c: ... here and rename self
4997 test to "string_printf".
4998
08302ed2
DE
49992017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5000
5001 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5002 having NULL cus or tus.
5003
96a5a1d3
UW
50042017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5005
5006 * arm-tdep.c: (convert_from_extended): Remove.
5007 (convert_to_extended): Likewise.
5008 (arm_extract_return_value): Use convert_typed_floating.
5009 (arm_store_return_value): Likewise.
5010
5011 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5012 * sh-tdep.c: Do not include "floatformat.h".
5013 (sh_littlebyte_bigword_type): New function.
5014 (sh_register_convert_to_virtual): Use convert_typed_floating.
5015 (sh_register_convert_to_raw): Likewise.
5016 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5017 (sh64_littlebyte_bigword_type): New function.
5018 (sh64_extract_return_value): Use convert_typed_floating.
5019 (sh64_register_convert_to_virtual): Likewise.
5020 (sh64_register_convert_to_raw): Likewise.
5021
0db7851f
UW
50222017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5023
5024 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5025 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5026
5027 * gdbtypes.h (union type_specific): Make field floatformat hold
5028 just a single struct floatformat, not an array.
5029 (floatformat_from_type): Move here.
5030 * gdbtypes.c (floatformat_from_type): Move here. Update to
5031 changed TYPE_FLOATFORMAT definition.
5032 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5033 (recursive_dump_type): Likewise.
5034 (init_float_type): Install correct floatformat for byte order.
5035 (arch_float_type): Likewise.
5036
77b7c781
UW
50372017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5038
5039 * gdbtypes.c (init_type): Change incoming argument from
5040 length-in-bytes to length-in-bits. Assert length is a
5041 multiple of TARGET_CHAR_BITS.
5042 (arch_type, arch_flags_type): Likewise.
5043 (init_integer_type): Update call to init_type.
5044 (init_character_type): Likewise.
5045 (init_boolean_type): Likewise.
5046 (init_float_type): Likewise.
5047 (init_decfloat_type): Likewise.
5048 (init_complex_type): Likewise.
5049 (init_pointer_type): Likewise.
5050 (objfile_type): Likewise.
5051 (arch_integer_type): Update call to arch_type.
5052 (arch_character_type): Likewise.
5053 (arch_boolean_type): Likewise.
5054 (arch_float_type): Likewise.
5055 (arch_decfloat_type): Likewise.
5056 (arch_complex_type): Likewise.
5057 (arch_pointer_type): Likewise.
5058 (gdbtypes_post_init): Likewise.
5059
5060 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5061 (read_base_type): Likewise.
5062 * mdebugread.c (basic_type): Likewise.
5063 * stabsread.c (dbx_init_float_type): Likewise.
5064 (rs6000_builtin_type): Likewise.
5065 (read_range_type): Likewise. Also, fix call to init_integer_type
5066 with erroneous length argument.
5067
5068 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5069 * d-lang.c (build_d_types): Likewise.
5070 * f-lang.c (build_fortran_types): Likewise.
5071 * go-lang.c (build_go_types): Likewise.
5072 * opencl-lang.c (build_opencl_types): Likewise.
5073 * jit.c (finalize_symtab): Likewise.
5074 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5075 (build_std_type_info_type): Likewise.
5076 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5077 update call to arch_flags_type.
5078
5079 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5080 arch_type.
5081 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5082 * windows-tdep.c (windows_get_tlb_type): Likewise.
5083
5084 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5085 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5086 * m32c-tdep.c (make_types): Likewise.
5087 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5088 (rl78_psw_type): Update call to arch_flags_type.
5089 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5090 * rx-tdep.c (rx_psw_type): Likewise.
5091 (rx_fpsw_type): Likewise.
5092 * sparc-tdep.c (sparc_psr_type): Likewise.
5093 (sparc_fsr_type): Likewise.
5094 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5095 (sparc64_ccr_type): Likewise.
5096 (sparc64_fsr_type): Likewise.
5097 (sparc64_fprs_type): Likewise.
5098
f21b4d5c
TT
50992017-09-27 Tom Tromey <tom@tromey.com>
5100
5101 * findcmd.c (find_command): Constify.
5102
643c2ffa
TT
51032017-09-27 Tom Tromey <tom@tromey.com>
5104
5105 * ada-tasks.c (task_command_1, task_command): Constify.
5106
510e5e56
TT
51072017-09-27 Tom Tromey <tom@tromey.com>
5108
5109 * symtab.c (maintenance_print_symbol_cache)
5110 (maintenance_flush_symbol_cache)
5111 (maintenance_print_symbol_cache_statistics): Constify.
5112
e503b191
TT
51132017-09-27 Tom Tromey <tom@tromey.com>
5114
5115 * inferior.c (detach_inferior_command, kill_inferior_command)
5116 (inferior_command): Constify.
5117
4e001312
TT
51182017-09-27 Tom Tromey <tom@tromey.com>
5119
5120 * regcache.c (regcache_print, maintenance_print_registers)
5121 (maintenance_print_raw_registers)
5122 (maintenance_print_cooked_registers)
5123 (maintenance_print_register_groups)
5124 (maintenance_print_remote_registers): Constify.
5125
77763700
TT
51262017-09-27 Tom Tromey <tom@tromey.com>
5127
5128 * printcmd.c (map_display_numbers, undisplay_command)
5129 (enable_disable_display_command, enable_display_command)
5130 (disable_display_command): Constify.
5131
4495129a
TT
51322017-09-27 Tom Tromey <tom@tromey.com>
5133
5134 * breakpoint.h (delete_command): Don't declare.
5135 * breakpoint.c (delete_command, enable_once_command)
5136 (enable_count_command, enable_delete_command, breakpoint_1)
5137 (maintenance_info_breakpoints, stopin_command, stopat_command)
5138 (delete_command, delete_trace_command, save_breakpoints)
5139 (save_breakpoints_command, save_tracepoints_command): Constify.
5140
3088cf40
TT
51412017-09-27 Tom Tromey <tom@tromey.com>
5142
5143 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5144 (skip_ws, extract_identifier, macro_define_command)
5145 (macro_undef_command, macro_list_command): Constify.
5146
69f476a3
TT
51472017-09-27 Tom Tromey <tom@tromey.com>
5148
5149 * infcmd.c (environment_info, set_environment_command)
5150 (unset_environment_command, path_info, info_proc_cmd_1)
5151 (info_proc_cmd_mappings, info_proc_cmd_stat)
5152 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5153 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5154
c4a3e68e
TT
51552017-09-27 Tom Tromey <tom@tromey.com>
5156
5157 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5158 Constify.
5159
c9d31bd6
TT
51602017-09-27 Tom Tromey <tom@tromey.com>
5161
5162 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5163
1f3f85eb
TT
51642017-09-27 Tom Tromey <tom@tromey.com>
5165
5166 * demangle.c (demangle_command): Constify.
5167
9c504b5d
TT
51682017-09-27 Tom Tromey <tom@tromey.com>
5169
5170 * progspace.c (maintenance_info_program_spaces_command):
5171 Constify.
5172
6663cf91
TT
51732017-09-27 Tom Tromey <tom@tromey.com>
5174
5175 * compile/compile.c (check_raw_argument, compile_file_command)
5176 (compile_code_command, compile_print_command): Constify.
5177
34e5fa26
TT
51782017-09-27 Tom Tromey <tom@tromey.com>
5179
5180 * reggroups.c (maintenance_print_reggroups): Constify.
5181
8384c356
TT
51822017-09-27 Tom Tromey <tom@tromey.com>
5183
5184 * dwarf2read.c (save_gdb_index_command): Constify.
5185
884beb0c
TT
51862017-09-27 Tom Tromey <tom@tromey.com>
5187
5188 * stap-probe.c (info_probes_stap_command): Constify.
5189
e0b2930c
TT
51902017-09-27 Tom Tromey <tom@tromey.com>
5191
5192 * fork-child.c (unset_exec_wrapper_command): Constify.
5193
f938677d
TT
51942017-09-27 Tom Tromey <tom@tromey.com>
5195
5196 * btrace.c (get_uint, get_context_size, no_chunk)
5197 (maint_btrace_packet_history_cmd)
5198 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5199 (maint_info_btrace_cmd): Constify.
5200
8949cb87
TT
52012017-09-27 Tom Tromey <tom@tromey.com>
5202
5203 * reverse.c (delete_bookmark_command): Constify.
5204
ac88e2de
TT
52052017-09-27 Tom Tromey <tom@tromey.com>
5206
5207 * remote.c (set_memory_packet_size)
5208 (set_memory_write_packet_size, show_memory_write_packet_size)
5209 (set_memory_read_packet_size, show_memory_read_packet_size)
5210 (compare_sections_command, packet_command, remote_put_command)
5211 (remote_get_command, remote_delete_command): Constify.
5212
bd4c9dfe
TT
52132017-09-27 Tom Tromey <tom@tromey.com>
5214
5215 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5216 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5217 (set_mipsfpu_auto_command): Constify.
5218
5e93d4c6
TT
52192017-09-27 Tom Tromey <tom@tromey.com>
5220
5221 * cli/cli-cmds.h (cd_command): Constify.
5222 * cli/cli-cmds.c (cd_command): Constify.
5223
fc41a75b
TT
52242017-09-27 Tom Tromey <tom@tromey.com>
5225
5226 * thread.c (thread_name_command, thread_find_command): Constify.
5227
67810076
TT
52282017-09-27 Tom Tromey <tom@tromey.com>
5229
5230 * probe.c (enable_probes_command, disable_probes_command):
5231 Constify.
5232
1d8b34a7
TT
52332017-09-27 Tom Tromey <tom@tromey.com>
5234
5235 * symfile.c (symbol_file_command): Constify.
5236 * gdbcore.h (deprecated_file_changed_hook): Constify.
5237 * exec.c (deprecated_file_changed_hook, exec_file_command)
5238 (file_command): Constify.
5239 * defs.h (symbol_file_command): Constify.
5240
442019e1
TT
52412017-09-27 Tom Tromey <tom@tromey.com>
5242
5243 * remote-fileio.c (set_system_call_allowed)
5244 (show_system_call_allowed): Constify.
5245
2983f7cb
TT
52462017-09-27 Tom Tromey <tom@tromey.com>
5247
5248 * tracepoint.c (delete_trace_variable_command)
5249 (tfind_end_command, tfind_start_command, tfind_pc_command)
5250 (tfind_tracepoint_command, tfind_line_command)
5251 (tfind_range_command, tfind_outside_command): Constify.
5252
4fd41b24
TT
52532017-09-27 Tom Tromey <tom@tromey.com>
5254
5255 * ax-gdb.c (maint_agent_printf_command, agent_command)
5256 (agent_eval_command): Constify.
5257
f2fc3015
TT
52582017-09-27 Tom Tromey <tom@tromey.com>
5259
5260 * tracepoint.c (info_scope_command): Constify.
5261 * python/python.c (gdbpy_decode_line): Constify.
5262 * python/py-breakpoint.c (bppy_init): Constify.
5263 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5264 * location.h: (new_linespec_location)
5265 (string_to_event_location_basic, string_to_event_location):
5266 Constify.
5267 * location.c (new_linespec_location)
5268 (string_to_event_location_basic, string_to_event_location):
5269 Constify.
5270 * linespec.h (decode_line_with_current_source)
5271 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5272 * linespec.c (linespec_lex_to_end)
5273 (decode_line_with_current_source)
5274 (decode_line_with_last_displayed): Constify.
5275 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5276 Constify.
5277 * cli/cli-cmds.c (edit_command, list_command): Constify.
5278 * breakpoint.h (until_break_command, watch_command_wrapper)
5279 (awatch_command_wrapper, rwatch_command_wrapper)
5280 (init_ada_exception_breakpoint): Constify.
5281 * breakpoint.c (break_command_1, dprintf_command)
5282 (break_range_command, watch_command_wrapper)
5283 (rwatch_command_wrapper, awatch_command_wrapper)
5284 (until_break_command, init_ada_exception_breakpoint)
5285 (strace_marker_create_sals_from_location, trace_command)
5286 (ftrace_command, strace_command, struct tracepoint): Constify.
5287 * ax-gdb.c (agent_command_1): Constify.
5288 * ada-lang.c (ada_exception_sal): Constify.
5289
8c2f95f4
TT
52902017-09-27 Tom Tromey <tom@tromey.com>
5291
5292 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5293 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5294 (get_context_size, no_chunk, get_insn_history_modifiers)
5295 (cmd_record_insn_history, get_call_history_modifiers)
5296 (cmd_record_call_history): Constify.
5297
a0d65762
TT
52982017-09-27 Tom Tromey <tom@tromey.com>
5299
5300 * source.c (show_substitute_path_command)
5301 (unset_substitute_path_command, set_substitute_path_command):
5302 Constify.
5303
58971144
TT
53042017-09-27 Tom Tromey <tom@tromey.com>
5305
5306 * typeprint.c (maintenance_print_type): Constify.
5307 * maint.c (maintenance_dump_me, maintenance_demangle)
5308 (maintenance_time_display, maintenance_info_sections)
5309 (maintenance_print_statistics, maintenance_deprecate)
5310 (maintenance_undeprecate): Constify.
5311 (maintenance_do_deprecate): Constify. Use std::string.
5312 (maintenance_selftest): Constify.
5313 * gdbtypes.h (maintenance_print_type): Constify.
5314
c482f52c
TT
53152017-09-27 Tom Tromey <tom@tromey.com>
5316
5317 * hppa-tdep.c (unwind_command): Constify.
5318
e100df1a
TT
53192017-09-27 Tom Tromey <tom@tromey.com>
5320
5321 * target-descriptions.c (unset_tdesc_filename_cmd)
5322 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5323 Constify.
5324
31d56ade
TT
53252017-09-27 Tom Tromey <tom@tromey.com>
5326
5327 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5328
b961da0b
TT
53292017-09-27 Tom Tromey <tom@tromey.com>
5330
5331 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5332
e2d8ae16
TT
53332017-09-27 Tom Tromey <tom@tromey.com>
5334
5335 * tui/tui-regs.c (tui_reg_command): Constify.
5336
863779b0
TT
53372017-09-27 Tom Tromey <tom@tromey.com>
5338
5339 * skip.c (skip_file_command, skip_function_command)
5340 (skip_enable_command, skip_disable_command, skip_delete_command):
5341 Constify.
5342
cdb34d4a
TT
53432017-09-27 Tom Tromey <tom@tromey.com>
5344
5345 * record-btrace.c (cmd_record_btrace_bts_start)
5346 (cmd_record_btrace_pt_start): Constify.
5347
e99c83e7
TT
53482017-09-27 Tom Tromey <tom@tromey.com>
5349
5350 * symmisc.c (maintenance_print_symbols)
5351 (maintenance_print_msymbols, maintenance_print_objfiles)
5352 (maintenance_info_symtabs, maintenance_check_symtabs)
5353 (maintenance_expand_symtabs, maintenance_info_line_tables):
5354 Constify.
5355
32faf971
TT
53562017-09-27 Tom Tromey <tom@tromey.com>
5357
5358 * top.c (new_ui_command): Constify.
5359
2cf311eb
TT
53602017-09-27 Tom Tromey <tom@tromey.com>
5361
5362 * symfile.c (add_symbol_file_command)
5363 (remove_symbol_file_command, list_overlays_command)
5364 (map_overlay_command, unmap_overlay_command)
5365 (overlay_auto_command, overlay_manual_command)
5366 (overlay_off_command, overlay_load_command): Constify.
5367
e6738699
TT
53682017-09-27 Tom Tromey <tom@tromey.com>
5369
5370 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5371 (info_spu_mailbox_command, info_spu_dma_command)
5372 (info_spu_proxydma_command): Constify.
5373
aa360cd5
TT
53742017-09-27 Tom Tromey <tom@tromey.com>
5375
5376 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5377
898241a5
TT
53782017-09-27 Tom Tromey <tom@tromey.com>
5379
5380 * cli/cli-script.c (user_defined_command): Constify.
5381
2d0ac106
TT
53822017-09-27 Tom Tromey <tom@tromey.com>
5383
5384 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5385 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5386 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5387 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5388 (dump_binary_value, append_binary_memory, append_binary_value):
5389 Constify.
5390 (struct dump_context) <func>: Constify.
5391 (add_dump_command): Update.
5392
dede02ce
TT
53932017-09-27 Tom Tromey <tom@tromey.com>
5394
5395 * cli/cli-cmds.c (show_version, show_configuration)
5396 (source_command, show_user): Constify.
5397
d3cb6b99
TT
53982017-09-27 Tom Tromey <tom@tromey.com>
5399
5400 * target.c (maintenance_print_target_stack): Constify.
5401
1970a12f
TT
54022017-09-27 Tom Tromey <tom@tromey.com>
5403
5404 * interps.c (interpreter_exec_cmd): Constify.
5405
41243651
TT
54062017-09-27 Tom Tromey <tom@tromey.com>
5407
5408 * record-full.c (cmd_record_full_restore): Constify.
5409
4465d9db
TT
54102017-09-27 Tom Tromey <tom@tromey.com>
5411
5412 * memattr.c (enable_mem_command, disable_mem_command)
5413 (delete_mem_command): Constify.
5414
ad25e423
TT
54152017-09-27 Tom Tromey <tom@tromey.com>
5416
5417 * value.c (show_convenience): Constify.
5418
d64097b1
TT
54192017-09-27 Tom Tromey <tom@tromey.com>
5420
5421 * gdbcore.h (core_file_command): Update.
5422 * corefile.c (core_file_command): Constify.
5423
4d4589ef
TT
54242017-09-27 Tom Tromey <tom@tromey.com>
5425
5426 * user-regs.c (maintenance_print_user_registers): Constify.
5427
32a7bf17
TT
54282017-09-27 Tom Tromey <tom@tromey.com>
5429
5430 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5431
4a475551
TT
54322017-09-27 Tom Tromey <tom@tromey.com>
5433
5434 * cp-support.c (first_component_command): Constify.
5435
990b9f9f
TT
54362017-09-27 Tom Tromey <tom@tromey.com>
5437
5438 * psymtab.c (maintenance_print_psymbols)
5439 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5440 Constify.
5441
c281872e
TT
54422017-09-27 Tom Tromey <tom@tromey.com>
5443
5444 * windows-tdep.c (display_tib): Constify.
5445
5b64bf74
TT
54462017-09-27 Tom Tromey <tom@tromey.com>
5447
5448 * linux-fork.c (delete_checkpoint_command)
5449 (detach_checkpoint_command): Constify.
5450
4ada038f
TT
54512017-09-27 Tom Tromey <tom@tromey.com>
5452
5453 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5454
57f5a81b
TT
54552017-09-27 Tom Tromey <tom@tromey.com>
5456
5457 * arc-tdep.c (dump_arc_instruction_command): Constify.
5458
b0a8e6c4
TT
54592017-09-27 Tom Tromey <tom@tromey.com>
5460
5461 * valprint.c (set_radix, show_radix): Constify.
5462
8d97dc1c
TT
54632017-09-27 Tom Tromey <tom@tromey.com>
5464
5465 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5466
eb7c454d
TT
54672017-09-27 Tom Tromey <tom@tromey.com>
5468
5469 * command.h (not_just_help_class_command): Update.
5470 * cli/cli-decode.h (not_just_help_class_command): Update.
5471 * cli/cli-decode.c (not_just_help_class_command): Constify.
5472
e4e33335
TT
54732017-09-27 Tom Tromey <tom@tromey.com>
5474
5475 * gdb_bfd.c (maintenance_info_bfds): Constify.
5476
0450cc4c
TT
54772017-09-27 Tom Tromey <tom@tromey.com>
5478
5479 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5480 overloads.
5481 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5482 (do_const_cfunc): New function.
5483 (cmd_cfunc_eq): New overload.
5484 (cli_user_command_p): Check do_const_cfunc.
5485 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5486 const_cfunc.
5487 * command.h (add_cmd): Add const overload and no-function
5488 overload.
5489 (set_cmd_cfunc): Add const overload.
5490 (cmd_const_cfunc_ftype): Declare.
5491 (cmd_cfunc_eq): Add const overload.
5492 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5493 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5494 overload.
5495
a9bbfbd8
TT
54962017-09-27 Tom Tromey <tom@tromey.com>
5497
5498 * macroexp.c (get_next_token_for_substitution): New function.
5499 (substitute_args): Call it. Check for __VA_OPT__.
5500
5230b05a
WT
55012017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5502 Pedro Alves <palves@redhat.com>
5503
5504 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5505 producer_is_icc_lt_14.
5506 (producer_is_icc_lt_14): New function.
5507 (check_producer): Add code for checking version of ICC.
5508 (producer_is_icc): Move to producer.c.
5509 (read_structure_type): Restrict ICC workaround to ICC<14.
5510 * producer.c: Include selftest.h.
5511 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5512 New functions.
5513 * producer.h (producer_is_icc): New declaration.
5514
b32b108a
WT
55152017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5516
5517 * Makefile.in (SFILES): Add producer.c.
5518 (COMMON_OBS): Add producer.o
5519 * amd64-tdep.c (producer.h): Add new include.
5520 * dwarf2read.c (producer.h): Add new include.
5521 * producer.c: New file.
5522 * producer.h: New file.
5523 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5524 producer.c.
5525 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5526 producer.h.
5527
5007d765
MK
55282017-09-26 Matthias Klose <doko@ubuntu.com>
5529
5530 * configure.ac: Search ncursesw before ncurses.
5531 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5532 * gdb_curses.h: Include <ncursesw/ncurses.h>
5533 * config.in, configure: Regenerate.
5534
281c4447
RO
55352017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5536
5537 PR gdb/22185
5538 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5539 obsolete.
5540 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5541 Remove i386sol2 support.
5542 * configure.nat <i386sol2>: Remove.
5543 <sol2-64>: Fold into ...
5544 <sol2>: ... this.
5545 Move common settings to default section.
5546 Add sol-thread.o.
5547 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5548 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5549 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5550 <i[34567]86-*-solaris*>: Remove.
5551 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5552
5553 * configure.ac: Remove wctype in libw check.
5554 (_MSE_INT_H): Don't define on Solaris 7-9.
5555 <solaris*>: Remove libthread_db.so.1 check.
5556 * configure: Regenerate.
5557 * config.in: Regenerate.
5558
5559 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5560 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5561 (gdb_ps_size_t): Remove.
5562 Use base types in users.
5563 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5564
5565 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5566
39b06c20
RO
55672017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5568
5569 PR build/22206
5570 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5571 (adi_is_addr_mapped): Likewise.
5572 (PSR_ICC): Don't redefine.
5573 (PSR_IMPL): Likewise.
5574
6c3e20f1
TT
55752017-09-25 Tom Tromey <tom@tromey.com>
5576
5577 * regcache.c (regcache::dump): Use string_printf.
5578
b292235f
TT
55792017-09-25 Tom Tromey <tom@tromey.com>
5580
5581 * regcache.c (class regcache_invalidator): New.
5582 (struct register_to_invalidate): Remove.
5583 (make_cleanup_regcache_invalidate): Remove.
5584 (regcache::raw_write): Use regcache_invalidator.
5585
9ac86b52
TT
55862017-09-25 Tom Tromey <tom@tromey.com>
5587
5588 * spu-tdep.c (spu2ppu_sniffer): Update.
5589 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5590 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5591 Remove.
5592 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5593 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5594 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5595 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5596 (frame_pop): Update.
5597
c0e383c6
TT
55982017-09-25 Tom Tromey <tom@tromey.com>
5599
5600 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5601 * regcache.h (regcache_xfree): Don't declare.
5602 * regcache.c (regcache_xfree): Remove.
5603 (do_regcache_xfree): Use delete.
5604 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5605 * linux-fork.c (free_fork): Use delete.
5606 (fork_save_infrun_state): Likewise.
5607 * jit.c (jit_dealloc_cache): Use delete.
5608 * infrun.c (discard_infcall_suspend_state): Use delete.
5609
791199cc
TT
56102017-09-25 Tom Tromey <tom@tromey.com>
5611
5612 * regcache.h (regcache_xmalloc): Don't declare.
5613 (regcache_raw_set_cached_value): Update comment.
5614 * regcache.c (regcache_xmalloc): Remove.
5615 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5616 * jit.c (jit_frame_sniffer): Use new.
5617 * frame.c (frame_save_as_regcache): Use new.
5618
289e23aa
AA
56192017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5620
5621 * NEWS: Advertise support for guarded-storage registers on IBM z.
5622
1b63490c
AA
56232017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5624
5625 * s390-linux-nat.c (have_regset_gs): New static variable.
5626 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5627 control block and guarded-storage broadcast control regsets.
5628 (s390_read_description): Detect whether the target has
5629 guarded-storage support, return appropriate tdesc.
5630 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5631 (features/s390x-gs-linux64.c): Likewise.
5632 (struct gdbarch_tdep) <have_gs>: New field.
5633 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5634 (s390_gsbc_regset): New variables.
5635 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5636 and s390_gsbc_regset, if applicable.
5637 (s390_core_read_description): Check whether core file was from a
5638 target with guarded-storage support; include appropriate regsets.
5639 (s390_gdbarch_init): Add registers for guarded-storage support.
5640 (_initialize_s390_tdep): Initialize new target descriptions that
5641 include registers for guarded-storage support.
5642 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5643 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5644 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5645 (S390_NUM_REGS): Adjust macro definition.
5646 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5647 (tdesc_s390x_gs_linux64): New declarations.
5648
96235dc1
AA
56492017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5650
5651 * features/s390-gs-linux64.xml: New file.
5652 * features/s390-gs.xml: New file.
5653 * features/s390-gsbc.xml: New file.
5654 * features/s390x-gs-linux64.xml: New file.
5655 * features/Makefile (WHICH): Add s390-gs-linux64 and
5656 s390x-gs-linux64.
5657 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5658 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5659 * features/s390-gs-linux64.c: New generated file.
5660 * features/s390x-gs-linux64.c: New file.
5661 * regformats/s390-gs-linux64.dat: New file.
5662 * regformats/s390x-gs-linux64.dat: New file.
5663
b4a7c699
TT
56642017-09-23 Tom Tromey <tom@tromey.com>
5665
5666 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5667
c2f97536
TT
56682017-09-22 Tom Tromey <tom@tromey.com>
5669
5670 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5671 type to scoped_restore_tmpl.
5672 <scoped_input_handler>: Initialize m_quit_handler directly.
5673
43573013
SDJ
56742017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5675
5676 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5677 (cd_command): Likewise. Free "current_directory" before
5678 assigning to it.
5679 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5680 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5681 * top.c (gdb_dirbuf): Remove global declaration.
5682 * top.h (gdb_dirbuf): Likewise.
5683
6ec2e0f5
SDJ
56842017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5685
5686 * gnulib/aclocal.m4: Regenerate.
5687 * gnulib/config.in: Regenerate.
5688 * gnulib/configure: Regenerate.
5689 * gnulib/import/Makefile.am: Regenerate.
5690 * gnulib/import/Makefile.in: Regenerate.
5691 * gnulib/import/assure.h: New file.
5692 * gnulib/import/at-func.c: Likewise
5693 * gnulib/import/chdir-long.c: New file.
5694 * gnulib/import/chdir-long.h: New file.
5695 * gnulib/import/cloexec.c: New file.
5696 * gnulib/import/cloexec.h: New file.
5697 * gnulib/import/close.c: New file.
5698 * gnulib/import/closedir.c: New file.
5699 * gnulib/import/dirent-private.h: New file.
5700 * gnulib/import/dup-safer.c: New file.
5701 * gnulib/import/dup.c: New file.
5702 * gnulib/import/dup2.c: New file.
5703 * gnulib/import/error.c: New file.
5704 * gnulib/import/error.h: New file.
5705 * gnulib/import/exitfail.c: New file.
5706 * gnulib/import/exitfail.h: New file.
5707 * gnulib/import/fchdir.c: New file.
5708 * gnulib/import/fcntl.c: New file.
5709 * gnulib/import/fcntl.in.h: New file.
5710 * gnulib/import/fd-hook.c: New file.
5711 * gnulib/import/fd-hook.h: New file.
5712 * gnulib/import/fd-safer.c: New file.
5713 * gnulib/import/fdopendir.c: New file.
5714 * gnulib/import/filename.h: New file.
5715 * gnulib/import/filenamecat-lgpl.c: New file.
5716 * gnulib/import/filenamecat.h: New file.
5717 * gnulib/import/fstat.c: New file.
5718 * gnulib/import/fstatat.c: New file.
5719 * gnulib/import/getcwd-lgpl.c: New file.
5720 * gnulib/import/getcwd.c: New file.
5721 * gnulib/import/getdtablesize.c: New file.
5722 * gnulib/import/getlogin_r.c: New file.
5723 * gnulib/import/getprogname.c: New file.
5724 * gnulib/import/getprogname.h: New file.
5725 * gnulib/import/gettext.h: New file.
5726 * gnulib/import/glob-libc.h: New file.
5727 * gnulib/import/glob.c: New file.
5728 * gnulib/import/glob.in.h: New file.
5729 * gnulib/import/intprops.h: New file.
5730 * gnulib/import/m4/chdir-long.m4: New file.
5731 * gnulib/import/m4/close.m4: New file.
5732 * gnulib/import/m4/closedir.m4: New file.
5733 * gnulib/import/m4/d-ino.m4: New file.
5734 * gnulib/import/m4/d-type.m4: New file.
5735 * gnulib/import/m4/dup.m4: New file.
5736 * gnulib/import/m4/dup2.m4: New file.
5737 * gnulib/import/m4/error.m4: New file.
5738 * gnulib/import/m4/fchdir.m4: New file.
5739 * gnulib/import/m4/fcntl.m4: New file.
5740 * gnulib/import/m4/fcntl_h.m4: New file.
5741 * gnulib/import/m4/fdopendir.m4: New file.
5742 * gnulib/import/m4/filenamecat.m4: New file.
5743 * gnulib/import/m4/fstat.m4: New file.
5744 * gnulib/import/m4/fstatat.m4: New file.
5745 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5746 * gnulib/import/m4/getcwd-path-max.m4: New file.
5747 * gnulib/import/m4/getcwd.m4: New file.
5748 * gnulib/import/m4/getdtablesize.m4: New file.
5749 * gnulib/import/m4/getlogin_r.m4: New file.
5750 * gnulib/import/m4/getprogname.m4: New file.
5751 * gnulib/import/m4/glob.m4: New file.
5752 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5753 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5754 * gnulib/import/m4/mempcpy.m4: New file.
5755 * gnulib/import/m4/memrchr.m4: New file.
5756 * gnulib/import/m4/mode_t.m4: New file.
5757 * gnulib/import/m4/msvc-inval.m4: New file.
5758 * gnulib/import/m4/msvc-nothrow.m4: New file.
5759 * gnulib/import/m4/open.m4: New file.
5760 * gnulib/import/m4/openat.m4: New file.
5761 * gnulib/import/m4/opendir.m4: New file.
5762 * gnulib/import/m4/readdir.m4: New file.
5763 * gnulib/import/m4/realloc.m4: New file.
5764 * gnulib/import/m4/rewinddir.m4: New file.
5765 * gnulib/import/m4/save-cwd.m4: New file.
5766 * gnulib/import/m4/strdup.m4: New file.
5767 * gnulib/import/m4/strerror.m4: New file.
5768 * gnulib/import/m4/unistd-safer.m4: New file.
5769 * gnulib/import/mempcpy.c: New file.
5770 * gnulib/import/memrchr.c: New file.
5771 * gnulib/import/msvc-inval.c: New file.
5772 * gnulib/import/msvc-inval.h: New file.
5773 * gnulib/import/msvc-nothrow.c: New file.
5774 * gnulib/import/msvc-nothrow.h: New file.
5775 * gnulib/import/open.c: New file.
5776 * gnulib/import/openat-die.c: New file.
5777 * gnulib/import/openat-priv.h: New file.
5778 * gnulib/import/openat-proc.c: New file.
5779 * gnulib/import/openat.c: New file.
5780 * gnulib/import/openat.h: New file.
5781 * gnulib/import/opendir.c: New file.
5782 * gnulib/import/pipe-safer.c: New file.
5783 * gnulib/import/readdir.c: New file.
5784 * gnulib/import/realloc.c: New file.
5785 * gnulib/import/rewinddir.c: New file.
5786 * gnulib/import/save-cwd.c: New file.
5787 * gnulib/import/save-cwd.h: New file.
5788 * gnulib/import/strdup.c: New file.
5789 * gnulib/import/strerror-override.c: New file.
5790 * gnulib/import/strerror-override.h: New file.
5791 * gnulib/import/strerror.c: New file.
5792 * gnulib/import/unistd--.h: New file.
5793 * gnulib/import/unistd-safer.h: New file.
5794 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5795 "getcwd" and "glob".
5796 * ser-tcp.c: Undefine "close" before redefining it.
5797
432ae719
SM
57982017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5799
5800 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5801 get rid of res_val.
5802
4fa7574e
RO
58032017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5804
5805 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5806 <sol2,sparc>: Likewise.
5807 <sol2-64,i386>: Likewise.
5808
5809 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5810 -Wdeprecated-declarations on *-*-solaris*.
5811 * configure: Regenerate.
5812
5813 * procfs.c: Include "nat/inferior.h".
5814 (procfs_info_proc): Fix typo.
5815
f6327dcb
KB
58162017-09-21 Kevin Buettner <kevinb@redhat.com>
5817
5818 * remote.c (vector): Include.
5819 (struct private_thread_info): Add field, thread_handle.
5820 (free_private_thread_info): Deallocate storage associated with
5821 thread handle.
5822 (get_private_info_thread): Initialize `thread_handle' field.
5823 (struct thread_item): Add field, thread_handle.
5824 (clear_threads_listing_context): Deallocate storage associated
5825 with thread handle.
5826 (start_thread): Add support for "handle" attribute.
5827 (thread_attributes): Add "handle".
5828 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5829 field.
5830 (remote_update_thread_list): Update thread_handle.
5831 (remote_thread_handle_to_thread_info): New function.
5832 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5833
fbbe5337
KB
58342017-09-21 Kevin Buettner <kevinb@redhat.com>
5835
5836 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5837 function.
5838 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5839 * python/python-internal.h (thread_object_type): Declare.
5840
e04ee09e
KB
58412017-09-21 Kevin Buettner <kevinb@redhat.com>
5842
5843 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5844 (target_thread_handle_to_thread_info): Declare.
5845 * target.c (target_thread_handle_to_thread_info): New function.
5846 * target-delegates.c: Regenerate.
5847 * gdbthread.h (find_thread_by_handle): Declare.
5848 * thread.c (find_thread_by_handle): New function.
5849 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5850 function.
5851 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5852
1e5b66ed
SM
58532017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5854
5855 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5856
ebe48ba0
SM
58572017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5858
5859 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5860
0a0bf5dc
YQ
58612017-09-21 Yao Qi <yao.qi@linaro.org>
5862
5863 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5864 to gdb_target_obs.
5865
d1b0a7bf
TT
58662017-09-20 Tom Tromey <tom@tromey.com>
5867
5868 * breakpoint.c (struct counted_command_line): Remove.
5869 (breakpoint_commands): Update.
5870 (alloc_counted_command_line, incref_counted_command_line)
5871 (decref_counted_command_line, do_cleanup_counted_command_line)
5872 (make_cleanup_decref_counted_command_line): Remove.
5873 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5874 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5875 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5876 (save_breakpoints): Update.
5877 * breakpoint.h (counted_command_line): Now a typedef to
5878 shared_ptr.
5879 (struct breakpoint) <commands>: Now a counted_command_line.
5880 (struct bpstats) <command>: Likewise.
5881
48649e1b
TT
58822017-09-20 Tom Tromey <tom@tromey.com>
5883
5884 * breakpoint.c (struct commands_info, do_map_commands_command):
5885 Remove.
5886 (commands_command_1): Update.
5887 (iterate_over_related_breakpoints): Take a function_view.
5888 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5889 (delete_command): Update.
5890 (map_breakpoint_numbers): Take a function_view.
5891 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5892 (disable_command): Update.
5893 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5894 (enable_command): Update.
5895 (struct disp_data, do_enable_breakpoint_disp)
5896 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5897 (do_map_enable_delete_breakpoint): Remove.
5898 (enable_once_command, enable_count_command, enable_delete_command)
5899 (delete_trace_variable_command): Update.
5900
04afa70c
TT
59012017-09-20 Tom Tromey <tom@tromey.com>
5902
5903 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5904 (bpstat_clear): Use delete.
5905 (bpstats): New constructors.
5906 (bpstat_copy, bpstat_stop_status): Use new.
5907 (dprintf_after_condition_true): Update.
5908 * breakpoint.h (bpstats::bpstats): Add constructors.
5909 (bpstats::~bpstats): Add destructor.
5910
c83833f4
PA
59112017-09-20 Pedro Alves <palves@redhat.com>
5912
5913 * eval.c (make_params): Delete, refactored as ...
5914 (class fake_method): ... this new type's ctor.
5915 (fake_method::~fake_method): New.
5916 (evaluate_subexp_standard): Use 'fake_method'.
5917
223ffa71
TT
59182017-09-20 Tom Tromey <tom@tromey.com>
5919
5920 * windows-nat.c (get_windows_debug_event, windows_wait)
5921 (do_initial_windows_stuff, windows_attach): Update.
5922 * utils.c (vwarning, internal_vproblem): Update.
5923 (ui_unregister_input_event_handler_cleanup)
5924 (prepare_to_handle_input): Remove.
5925 (class scoped_input_handler): New.
5926 (defaulted_query, prompt_for_continue): Update.
5927 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5928 Update.
5929 * top.c (undo_terminal_modifications_before_exit): Update.
5930 * target/target.h (target_terminal_init, target_terminal_inferior)
5931 (target_terminal_ours): Don't declare.
5932 (class target_terminal): New.
5933 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5934 (target_terminal_ours_for_output)
5935 (make_cleanup_restore_target_terminal): Don't declare.
5936 (target_terminal_info): Remove.
5937 * target.c (enum terminal_state, terminal_state): Remove.
5938 (target_terminal::terminal_state): Define.
5939 (target_terminal::init): Rename from target_terminal_init.
5940 (target_terminal::inferior): Rename from
5941 target_terminal_inferior.
5942 (target_terminal::ours): Rename from target_terminal_ours.
5943 (target_terminal::ours_for_output): Rename from
5944 target_terminal_ours_for_output.
5945 (target_terminal::info): New method.
5946 (cleanup_restore_target_terminal)
5947 (make_cleanup_restore_target_terminal): Remove.
5948 * solib.c (handle_solib_event): Update.
5949 * remote.c (remote_serial_quit_handler): Update.
5950 (remote_terminal_inferior, remote_wait_as): Update.
5951 * record-full.c (record_full_wait_1): Update.
5952 * nto-procfs.c (procfs_create_inferior): Update.
5953 * nat/fork-inferior.c (startup_inferior): Update.
5954 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5955 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5956 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5957 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5958 (mi_breakpoint_created, mi_breakpoint_deleted)
5959 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5960 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5961 (mi_user_selected_context_changed, report_initial_inferior):
5962 Update.
5963 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5964 (linux_nat_terminal_inferior): Update.
5965 * infrun.c (follow_fork_inferior)
5966 (handle_vfork_child_exec_or_exit, do_target_resume)
5967 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5968 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5969 Update.
5970 * inflow.c (child_terminal_init, info_terminal_command): Update.
5971 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5972 (attach_command): Update.
5973 * infcall.c (call_thread_fsm_should_stop): Update.
5974 * gnu-nat.c (gnu_attach): Update.
5975 * extension.c (struct active_ext_lang_state)
5976 (restore_active_ext_lang): Update.
5977 * exceptions.c (print_flush): Update.
5978 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5979 (struct quit_handler_cleanup_data, restore_quit_handler)
5980 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5981 Remove.
5982 * cp-support.c (gdb_demangle): Update.
5983 * breakpoint.c (update_inserted_breakpoint_locations)
5984 (insert_breakpoint_locations, handle_jit_event)
5985 (disable_breakpoints_in_unloaded_shlib): Update.
5986 * annotate.c (annotate_breakpoints_invalid)
5987 (annotate_frames_invalid): Update.
5988
013af3fc
TT
59892017-09-20 Tom Tromey <tom@tromey.com>
5990
5991 * main.c (catch_command_errors): Rename from
5992 catch_command_errors_const.
5993 (captured_main_1): Update.
5994
06871ae8
PA
59952017-09-20 Pedro Alves <palves@redhat.com>
5996
5997 * cli/cli-cmds.c (list_command): Use print_sal_location.
5998 (print_sal_location): New function.
5999 (ambiguous_line_spec): Use print_sal_location.
6000 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6001 * symtab.c (find_function_start_sal): Likewise.
6002 * symtab.h (symtab_and_line::symbol): New field.
6003
e5f25bc5
PA
60042017-09-20 Pedro Alves <palves@redhat.com>
6005
6006 * linespec.c (minsym_found): Handle non-text minsyms.
6007 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6008
1b7fa39e
WT
60092017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6010
6011 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6012 backslash.
6013
37dd0825
WT
60142017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6015
6016 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6017 vmovups instead vmovaps.
6018 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6019
4e5a4f58
JB
60202017-09-19 John Baldwin <jhb@FreeBSD.org>
6021
6022 * NEWS (Changes since GDB 8.0): Add starti.
6023 * infcmd.c (enum run_break): New.
6024 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6025 case.
6026 (run_command): Use enum run_how.
6027 (start_command): Likewise.
6028 (starti_command): New function.
6029 (RUN_ARGS_HELP): New macro.
6030 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6031 commands. Add starti command.
6032
aa70c9f1
YQ
60332017-09-19 Yao Qi <yao.qi@linaro.org>
6034
6035 * Makefile.in (monitor.o): Remove the rule.
6036
d6541620
YQ
60372017-09-19 Yao Qi <yao.qi@linaro.org>
6038
6039 * annotate.h (struct annotate_arg_emitter): Use
6040 DISABLE_COPY_AND_ASSIGN.
6041 * common/refcounted-object.h (refcounted_object): Likewise.
6042 * completer.h (struct completion_result): Likewise.
6043 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6044 * filename-seen-cache.h (filename_seen_cache): Likewise.
6045 * gdbcore.h (thread_section_name): Likewise.
6046 * gdb_regex.h (compiled_regex): Likewise.
6047 * gdbthread.h (scoped_restore_current_thread): Likewise.
6048 * inferior.h (scoped_restore_current_inferior): Likewise.
6049 * jit.c (jit_reader): Likewise.
6050 * linespec.h (struct linespec_result): Likewise.
6051 * mi/mi-parse.h (struct mi_parse): Likewise.
6052 * nat/fork-inferior.c (execv_argv): Likewise.
6053 * progspace.h (scoped_restore_current_program_space): Likewise.
6054 * python/python-internal.h (class gdbpy_enter): Likewise.
6055 * regcache.h (regcache): Likewise.
6056 * target-descriptions.c (struct tdesc_reg): Likewise.
6057 (struct tdesc_type): Likewise.
6058 (struct tdesc_feature): Likewise.
6059 * ui-out.h (ui_out_emit_type): Likewise.
6060
0615127c
SM
60612017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6062
6063 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6064 label abort_expression.
6065
5e187554
SM
60662017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6067
6068 * common/buffer.c (buffer_xml_printf): Adjust.
6069 * common/xml-utils.c (xml_escape_text): Change return type to
6070 std::string, update code accordingly.
6071 * common/xml-utils.h (xml_escape_text): Change return type to
6072 std::string.
6073 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6074 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6075 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6076 Adjust.
6077
c3d7b541
SM
60782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6079
6080 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6081 (SUBDIR_UNITTESTS_OBS): Add new object file.
6082 * unittests/xml-utils-selftests.c: New file.
6083
1526853e
SM
60842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6085
6086 * common/selftest.h (selftest): New struct/interface.
6087 (register_test): Add name parameter, add new overload.
6088 (run_tests): Add filter parameter.
6089 (for_each_selftest_ftype): New typedef.
6090 (for_each_selftest): New declaration.
6091 * common/selftest.c (tests): Change type to
6092 map<string, unique_ptr<selftest>>.
6093 (simple_selftest): New struct.
6094 (register_test): New function.
6095 (register_test): Add name parameter and use it.
6096 (run_tests): Add filter parameter and use it. Add prints.
6097 Adjust to vector -> map change.
6098 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6099 registering selftests.
6100 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6101 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6102 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6103 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6104 * findvar.c (_initialize_findvar): Likewise.
6105 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6106 * maint.c (maintenance_selftest): Update call to run_tests.
6107 (maintenance_info_selftests): New function.
6108 (_initialize_maint_cmds): Register "maintenance info selftests"
6109 command. Update "maintenance selftest" doc.
6110 * regcache.c (_initialize_regcache): Add names when registering
6111 selftests.
6112 * rust-exp.y (_initialize_rust_exp): Likewise.
6113 * selftest-arch.c (gdbarch_selftest): New struct.
6114 (gdbarch_tests): Remove.
6115 (register_test_foreach_arch): Add name parameter. Call
6116 register_test.
6117 (tests_with_arch): Remove, move most content to
6118 gdbarch_selftest::operator().
6119 (_initialize_selftests_foreach_arch): Remove.
6120 * selftest-arch.h (register_test_foreach_arch): Add name
6121 parameter.
6122 (run_tests_with_arch): New declaration.
6123 * utils-selftests.c (_initialize_utils_selftests): Add names
6124 when registering selftests.
6125 * utils.c (_initialize_utils): Likewise.
6126 * unittests/array-view-selftests.c
6127 (_initialize_array_view_selftests): Likewise.
6128 * unittests/environ-selftests.c (_initialize_environ_selftests):
6129 Likewise.
6130 * unittests/function-view-selftests.c
6131 (_initialize_function_view_selftests): Likewise.
6132 * unittests/offset-type-selftests.c
6133 (_initialize_offset_type_selftests): Likewise.
6134 * unittests/optional-selftests.c
6135 (_initialize_optional_selftests): Likewise.
6136 * unittests/scoped_restore-selftests.c
6137 (_initialize_scoped_restore_selftests): Likewise.
6138 * NEWS: Document "maintenance selftest" and "maint info
6139 selftests".
6140
5846367a
SM
61412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6142
6143 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6144 scoped_restore.
6145
bd77e8ff
SM
61462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6147
6148 * mi/mi-main.c (mi_load_progress): Make uiout variable
6149 a unique_ptr.
6150
26a67918
PA
61512017-09-15 Pedro Alves <palves@redhat.com>
6152
6153 * compile/compile-c-types.c (convert_enum, convert_int)
6154 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6155
3f8a7804
SM
61562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6157
6158 * dwarf2read.c (copy_string): Remove.
6159 (parse_macro_definition): Replace copy_string with savestring.
6160
8d200706
YQ
61612017-09-15 Yao Qi <yao.qi@linaro.org>
6162
6163 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6164 gdb_target_obs.
6165 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6166 Likewise.
6167 (i[34567]86-*-linux*): Likewise.
6168
d185219d
SM
61692017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6170
6171 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6172 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6173 <stack>: Change type to std::vector.
6174 <stack_len, stack_allocated>: Remove.
6175 <grow_stack>: Remove.
6176 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6177 (dwarf_expr_context::~dwarf_expr_context): Remove.
6178 (dwarf_expr_context::grow_stack): Remove.
6179 (dwarf_expr_context::push): Adjust.
6180 (dwarf_expr_context::pop): Adjust.
6181 (dwarf_expr_context::fetch): Adjust.
6182 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6183 (dwarf_expr_context::stack_empty_p): Adjust.
6184 (dwarf_expr_context::execute_stack_op): Adjust.
6185
eccd80d6
SM
61862017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6187
6188 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6189 return type to bool.
6190 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6191
69009882
SM
61922017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6193
6194 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6195 Change type to bool.
6196 (dwarf_stack_value) <in_stack_memory>: Likewise.
6197 (dwarf_expr_context) <push_address>: Change parameter type to
6198 bool.
6199 <fetch_in_stack_memory>: Change return type to bool.
6200 <push>: Change parameter type to bool.
6201 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6202 to bool.
6203 (dwarf_expr_context::push_address): Likewise.
6204 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6205 to bool.
6206 (dwarf_expr_context::execute_stack_op): Adjust.
6207 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6208
1e467161
SM
62092017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6210
6211 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6212 (struct dwarf_expr_context) <n_pieces>: Remove.
6213 <pieces>: Change type to std::vector.
6214 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6215 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6216 pieces.
6217 (dwarf_expr_context::add_piece): Adjust.
6218 * dwarf2loc.c (struct piece_closure): Initialize fields.
6219 <n_pieces>: Remove.
6220 <pieces>: Change type to std::vector.
6221 (allocate_piece_closure): Adjust, change parameter to
6222 std::vector rvalue and std::move it to piece_closure.
6223 (rw_pieced_value): Adjust.
6224 (check_pieced_synthetic_pointer): Adjust.
6225 (indirect_synthetic_pointer): Adjust.
6226 (coerce_pieced_ref): Adjust.
6227 (free_pieced_value_closure): Adjust. Use delete to free
6228 piece_closure.
6229 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6230 to allocate_piece_closure.
6231 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6232
0782db84
SM
62332017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6234
6235 * probe.h (probe_ops_cp): Remove typedef.
6236 (DEF_VEC_P (probe_ops_cp)): Remove.
6237 (all_probe_ops): Change type to std::vector.
6238 * probe.c (info_probes_for_ops): Adjust to vector change.
6239 (probe_linespec_to_ops): Likewise.
6240 (all_probe_ops): Change type to std::vector.
6241 (_initialize_probe): Adjust to vector change.
6242 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6243 * elfread.c (elf_get_probes): Likewise.
6244 * stap-probe.c (_initialize_stap_probe): Likewise.
6245
1eac6bea
SM
62462017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6247
6248 * probe.h (struct bound_probe): Define constructors.
6249 * probe.c (bound_probe_s): Remove typedef.
6250 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6251 (collect_probes): Change return type to std::vector, remove
6252 cleanup.
6253 (compare_probes): Return bool, change parameter type. Change
6254 semantic to "less than".
6255 (gen_ui_out_table_header_info): Change parameter to std::vector
6256 and update.
6257 (exists_probe_with_pops): Likewise.
6258 (info_probes_for_ops): Update to std::vector change.
6259 (enable_probes_command): Likewise.
6260 (disable_probes_command): Likewise.
6261
aaa63a31
SM
62622017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6263
6264 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6265 vec to std::vector.
6266 * probe.c (parse_probes_in_pspace): Update.
6267 (find_probes_in_objfile): Update.
6268 (find_probe_by_pc): Update.
6269 (collect_probes): Update.
6270 (probe_any_get_probes): Update.
6271 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6272 return type to reference to std::vector.
6273 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6274 std::vector and update.
6275 (dtrace_process_dof): Likewise.
6276 (dtrace_get_probes): Likewise.
6277 * elfread.c (elf_get_probes): Change return type to std::vector,
6278 store an std::vector in bfd_data.
6279 (probe_key_free): Update to std::vector.
6280 * stap-probe.c (handle_stap_probe): Change parameter to
6281 std::vector and update.
6282 (stap_get_probes): Likewise.
6283 * symfile-debug.c (debug_sym_get_probes): Change return type to
6284 std::vector and update.
6285
cb85b21b
TT
62862017-09-11 Tom Tromey <tom@tromey.com>
6287
6288 * breakpoint.c (program_breakpoint_here_p): Update.
6289 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6290 from make_show_memory_breakpoints_cleanup. Return a
6291 scoped_restore_tmpl<int>.
6292 (restore_show_memory_breakpoints): Remove.
6293 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6294 * mem-break.c (memory_validate_breakpoint): Update.
6295 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6296 (ia64_memory_remove_breakpoint): Update.
6297 (ia64_breakpoint_from_pc): Update.
6298 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6299 from make_show_memory_breakpoints_cleanup.
6300
8fbc99ef
TT
63012017-09-11 Tom Tromey <tom@tromey.com>
6302
6303 * d-namespace.c (d_lookup_symbol): Use std::string.
6304 (find_symbol_in_baseclass): Likewise.
6305
50feb4bd
TT
63062017-09-11 Tom Tromey <tom@tromey.com>
6307
6308 * ctf.c (ctf_start): Use std::string.
6309
c6dc63a1
TT
63102017-09-11 Tom Tromey <tom@tromey.com>
6311
6312 * ada-lang.c (is_known_support_routine): Update.
6313 (ada_unhandled_exception_name_addr_from_raise): Update.
6314 * guile/scm-frame.c (gdbscm_frame_name): Update.
6315 * python/py-frame.c (frapy_name): Update.
6316 (frapy_function): Update.
6317 * stack.h (find_frame_funname): Update.
6318 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6319 (print_frame): Update.
6320
d6b9b80f
TT
63212017-09-11 Tom Tromey <tom@tromey.com>
6322
6323 * findcmd.c (put_bits): Take a gdb::byte_vector.
6324 (parse_find_args): Return gdb::byte_vector. "args" now const.
6325 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6326 cleanups.
6327 (find_command): Update.
6328
a9921622
TT
63292017-09-11 Tom Tromey <tom@tromey.com>
6330
6331 * cli/cli-script.c (class scoped_restore_hook_in): New.
6332 (clear_hook_in_cleanup): Remove.
6333 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6334 scoped_restore_hook_in.
6335
be0d7abb
TT
63362017-09-11 Tom Tromey <tom@tromey.com>
6337
6338 * cli/cli-script.c (restore_interp): Remove.
6339 (read_command_lines): Use scoped_restore_interp.
6340 * interps.c (scoped_restore_interp::set_temp): Rename from
6341 interp_set_temp.
6342 * interps.h (class scoped_restore_interp): New.
6343 (interp_set_temp): Remove.
6344
00f675ff
TT
63452017-09-11 Tom Tromey <tom@tromey.com>
6346
6347 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6348 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6349 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6350 scoped_restore.
6351 (mi_cmd_break_insert_1): Update.
6352 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6353 scoped_restore.
6354
cb791d59
TT
63552017-09-11 Tom Tromey <tom@tromey.com>
6356
6357 * demangle.c (demangle_command): Update.
6358 * breakpoint.c (disable_command): Update.
6359 (enable_command): Update.
6360 (find_location_by_number): Make "number" const. Use
6361 get_number_trailer.
6362 * cli/cli-utils.c (extract_arg): Return std::string.
6363 * probe.c (parse_probe_linespec): Update. Change types.
6364 (collect_probes): Take string arguments.
6365 (parse_probe_linespec): Likewise.
6366 (info_probes_for_ops): Update.
6367 (enable_probes_command): Update.
6368 (disable_probes_command): Update.
6369 * break-catch-sig.c (catch_signal_split_args): Update.
6370 * mi/mi-parse.c (mi_parse): Update.
6371
2039bd9f
TT
63722017-09-11 Tom Tromey <tom@tromey.com>
6373
6374 * language.h (language_enum): Make argument const.
6375 * language.c (language_enum): Make argument const.
6376
f1735a53
TT
63772017-09-11 Tom Tromey <tom@tromey.com>
6378
6379 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6380 as function.
6381 (skip_to_space): Rename from skip_to_space_const.
6382 * common/common-utils.c (skip_to_space): New function.
6383 (skip_to_space): Rename from skip_to_space_const.
6384 * cli/cli-utils.h (get_number): Rename from get_number_const.
6385 (extract_arg): Rename from extract_arg_const.
6386 * cli/cli-utils.c (get_number): Rename from get_number_const.
6387 (extract_arg): Rename from extract_arg_const.
6388 (number_or_range_parser::get_number): Use ::get_number.
6389 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6390 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6391 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6392 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6393 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6394 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6395 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6396 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6397
7d221d74
TT
63982017-09-11 Tom Tromey <tom@tromey.com>
6399
6400 * python/python.c (do_start_initialization): Use
6401 py-event-types.def to initialize types.
6402 Define all object type structures.
6403 * python/python-internal.h: Don't declare event initialization
6404 functions.
6405 * python/py-threadevent.c (thread_event_object_type): Don't
6406 define.
6407 * python/py-stopevent.c (stop_event_object_type): Don't define.
6408 * python/py-signalevent.c (signal_event_object_type): Don't
6409 declare or define.
6410 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6411 (clear_objfiles_event_object_type): Don't declare or define.
6412 * python/py-infevents.c (inferior_call_pre_event_object_type)
6413 (inferior_call_post_event_object_type)
6414 (register_changed_event_object_type)
6415 (memory_changed_event_object_type): Don't declare or define.
6416 * python/py-inferior.c (new_thread_event_object_type)
6417 (new_inferior_event_object_type)
6418 (inferior_deleted_event_object_type): Don't declare or define.
6419 * python/py-exitedevent.c (exited_event_object_type): Don't
6420 declare or define.
6421 * python/py-evts.c (gdbpy_initialize_py_events): Use
6422 py-all-events.def.
6423 * python/py-events.h (thread_event_object_type): Don't declare.
6424 (events_object): Use py-all-events.def.
6425 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6426 py-event-types.def.
6427 * python/py-event-types.def: New file.
6428 * python/py-continueevent.c (create_continue_event_object): Don't
6429 declare or define.
6430 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6431 declare or define.
6432 * python/py-all-events.def: New file.
6433
35c61a1d
TT
64342017-09-11 Tom Tromey <tom@tromey.com>
6435
6436 * python/py-threadevent.c (create_thread_event_object): Return
6437 gdbpy_ref.
6438 * python/py-stopevent.h (create_stop_event_object)
6439 (create_breakpoint_event_object, create_signal_event_object):
6440 Update.
6441 * python/py-stopevent.c (create_stop_event_object): Return
6442 gdbpy_ref.
6443 (emit_stop_event): Update.
6444 * python/py-signalevent.c (create_signal_event_object): Return
6445 gdbpy_ref.
6446 * python/py-infevents.c (create_inferior_call_event_object):
6447 Update.
6448 * python/py-event.h (create_event_object)
6449 (create_thread_event_object): Update.
6450 * python/py-event.c (create_event_object): Return gdbpy_ref.
6451 * python/py-continueevent.c: Return gdbpy_ref.
6452 * python/py-bpevent.c (create_breakpoint_event_object): Return
6453 gdbpy_ref.
6454
7c96f8c1
TT
64552017-09-11 Tom Tromey <tom@tromey.com>
6456
6457 PR python/15622:
6458 * NEWS: Add entry.
6459 * python/python.c (do_start_initialization): Initialize new event
6460 types.
6461 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6462 (gdbpy_initialize_inferior_deleted_event)
6463 (gdbpy_initialize_new_thread_event): Declare.
6464 * python/py-threadevent.c (create_thread_event_object): Add option
6465 "thread" parameter.
6466 * python/py-inferior.c (new_thread_event_object_type)
6467 (new_inferior_event_object_type)
6468 (inferior_deleted_event_object_type): Declare.
6469 (python_new_inferior, python_inferior_deleted): New functions.
6470 (add_thread_object): Emit new_thread event.
6471 (gdbpy_initialize_inferior): Attach new functions to corresponding
6472 observers.
6473 (new_thread, new_inferior, inferior_deleted): Define new event
6474 types.
6475 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6476 registries.
6477 * python/py-events.h (events_object) <new_inferior,
6478 inferior_deleted, new_thread>: New fields.
6479 * python/py-event.h (create_thread_event_breakpoint): Add optional
6480 "thread" parameter.
6481
72542b8e
AB
64822017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6483
6484 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6485 check current_ui instead.
6486 (internal_vproblem): Likewise.
6487
0d64823e
SM
64882017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6489
6490 * thread.c (print_thread_info_1): Remove unnecessary calls to
6491 uiout->is_mi_like_p.
6492
eb1e02fd
TT
64932017-09-09 Tom Tromey <tom@tromey.com>
6494
6495 * namespace.h (add_using_directive): Update.
6496 * namespace.c (add_using_directive): Change type of excludes to
6497 std::vector.
6498 * dwarf2read.c (read_import_statement): Use std::vector.
6499 (read_namespace): Update.
6500 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6501
0fc21fd8
TT
65022017-09-09 Tom Tromey <tom@tromey.com>
6503
6504 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6505
49663d05
TT
65062017-09-09 Tom Tromey <tom@tromey.com>
6507
6508 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6509
0b868b60
TT
65102017-09-09 Tom Tromey <tom@tromey.com>
6511
6512 * stack.c (func_command): Use gdb::def_vector.
6513
c0470d48
TT
65142017-09-09 Tom Tromey <tom@tromey.com>
6515
6516 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6517 ui_out_emit_list, ui_out_emit_tuple.
6518 (mi_cmd_var_update): Likewise.
6519
ca5909c7
TT
65202017-09-09 Tom Tromey <tom@tromey.com>
6521
6522 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6523 ui_out_redirect_pop.
6524 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6525 ui_out_redirect_pop.
6526 * utils.c (do_ui_out_redirect_pop)
6527 (make_cleanup_ui_out_redirect_pop): Remove.
6528 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6529 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6530 * ui-out.h (ui_out_redirect_pop): New class.
6531
e6a2252a
TT
65322017-09-09 Tom Tromey <tom@tromey.com>
6533
6534 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6535 (list_available_thread_groups, mi_cmd_list_thread_groups)
6536 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6537 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6538 Likewise.
6539
393702cd
TT
65402017-09-09 Tom Tromey <tom@tromey.com>
6541
6542 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6543 ui_out_emit_tuple.
6544
76f9c9cf
TT
65452017-09-09 Tom Tromey <tom@tromey.com>
6546
6547 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6548 * stack.c (print_frame): Use ui_out_emit_tuple.
6549 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6550 (info_spu_mailbox_command, info_spu_dma_command)
6551 (info_spu_proxydma_command): Likewise.
6552 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6553 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6554 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6555 ui_out_emit_tuple.
6556 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6557
dc9fe180
TT
65582017-09-09 Tom Tromey <tom@tromey.com>
6559
6560 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6561 (class ui_out_emit_table): Update comment.
6562 * ui-out.c (do_cleanup_table_end)
6563 (make_cleanup_ui_out_table_begin_end): Remove.
6564 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6565 (info_spu_dma_cmdlist): Likewise.
6566 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6567 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6568 ui_out_emit_table.
6569
f8cc3da6
TT
65702017-09-09 Tom Tromey <tom@tromey.com>
6571
6572 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6573 ui_out_emit_list, gdb::optional.
6574
481695ed
JB
65752017-09-09 John Baldwin <jhb@FreeBSD.org>
6576
6577 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6578 prototype.
6579 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6580 prototype.
6581 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6582 prototype.
6583 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6584 * ada-exp.y: Remove _initialize_ada_exp prototype.
6585 * ada-lang.c: Remove _initialize_ada_language prototype.
6586 * ada-tasks.c: Remove _initialize_tasks prototype.
6587 * addrmap.c: Remove _initialize_addrmap prototype.
6588 * agent.c: Remove _initialize_agent prototype.
6589 * aix-thread.c: Remove _initialize_aix_thread prototype.
6590 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6591 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6592 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6593 prototype.
6594 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6595 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6596 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6597 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6598 prototype.
6599 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6600 prototype.
6601 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6602 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6603 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6604 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6605 prototype.
6606 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6607 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6608 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6609 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6610 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6611 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6612 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6613 prototype.
6614 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6615 prototype.
6616 * annotate.c: Remove _initialize_annotate prototype.
6617 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6618 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6619 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6620 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6621 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6622 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6623 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6624 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6625 prototype.
6626 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6627 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6628 * auto-load.c: Remove _initialize_auto_load prototype.
6629 * auxv.c: Remove _initialize_auxv prototype.
6630 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6631 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6632 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6633 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6634 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6635 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6636 prototype.
6637 * break-catch-throw.c: Remove _initialize_break_catch_throw
6638 prototype.
6639 * breakpoint.c: Remove _initialize_breakpoint prototype.
6640 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6641 * btrace.c: Remove _initialize_btrace prototype.
6642 * charset.c: Remove _initialize_charset prototype.
6643 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6644 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6645 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6646 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6647 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6648 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6649 * coffread.c: Remove _initialize_coffread prototype.
6650 * compile/compile.c: Remove _initialize_compile prototype.
6651 * complaints.c: Remove _initialize_complaints prototype.
6652 * completer.c: Remove _initialize_completer prototype.
6653 * copying.awk: Remove _initialize_copying prototype.
6654 * copying.c: Regenerate.
6655 * core-regset.c: Remove _initialize_core_regset prototype.
6656 * corefile.c: Remove _initialize_core prototype.
6657 * corelow.c: Remove _initialize_corelow prototype.
6658 * cp-abi.c: Remove _initialize_cp_abi prototype.
6659 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6660 * cp-support.c: Remove _initialize_cp_support prototype.
6661 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6662 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6663 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6664 * ctf.c: Remove _initialize_ctf prototype.
6665 * d-lang.c: Remove _initialize_d_language prototype.
6666 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6667 prototype.
6668 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6669 * dbxread.c: Remove _initialize_dbxread prototype.
6670 * dcache.c: Remove _initialize_dcache prototype.
6671 * demangle.c: Remove _initialize_demangler prototype.
6672 * disasm-selftests.c: Remove _initialize_disasm_selftests
6673 prototype.
6674 * disasm.c: Remove _initialize_disasm prototype.
6675 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6676 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6677 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6678 prototype.
6679 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6680 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6681 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6682 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6683 * elfread.c: Remove _initialize_elfread prototype.
6684 * exec.c: Remove _initialize_exec prototype.
6685 * extension.c: Remove _initialize_extension prototype.
6686 * f-lang.c: Remove _initialize_f_language prototype.
6687 * f-valprint.c: Remove _initialize_f_valprint prototype.
6688 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6689 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6690 * filesystem.c: Remove _initialize_filesystem prototype.
6691 * findcmd.c: Remove _initialize_mem_search prototype.
6692 * fork-child.c: Remove _initialize_fork_child prototype.
6693 * frame-base.c: Remove _initialize_frame_base prototype.
6694 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6695 * frame.c: Remove _initialize_frame prototype.
6696 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6697 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6698 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6699 * gcore.c: Remove _initialize_gcore prototype.
6700 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6701 * gdbarch.c: Regenerate.
6702 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6703 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6704 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6705 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6706 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6707 * go-lang.c: Remove _initialize_go_language prototype.
6708 * go32-nat.c: Remove _initialize_go32_nat prototype.
6709 * guile/guile.c: Remove _initialize_guile prototype.
6710 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6711 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6712 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6713 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6714 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6715 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6716 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6717 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6718 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6719 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6720 prototype.
6721 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6722 prototype.
6723 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6724 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6725 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6726 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6727 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6728 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6729 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6730 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6731 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6732 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6733 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6734 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6735 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6736 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6737 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6738 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6739 prototype.
6740 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6741 prototype.
6742 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6743 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6744 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6745 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6746 * infcall.c: Remove _initialize_infcall prototype.
6747 * infcmd.c: Remove _initialize_infcmd prototype.
6748 * inferior.c: Remove _initialize_inferiors prototype.
6749 * inflow.c: Remove _initialize_inflow prototype.
6750 * infrun.c: Remove _initialize_infrun prototype.
6751 * interps.c: Remove _initialize_interpreter prototype.
6752 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6753 * jit.c: Remove _initialize_jit prototype.
6754 * language.c: Remove _initialize_language prototype.
6755 * linux-fork.c: Remove _initialize_linux_fork prototype.
6756 * linux-nat.c: Remove _initialize_linux_nat prototype.
6757 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6758 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6759 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6760 * m2-lang.c: Remove _initialize_m2_language prototype.
6761 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6762 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6763 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6764 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6765 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6766 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6767 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6768 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6769 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6770 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6771 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6772 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6773 * machoread.c: Remove _initialize_machoread prototype.
6774 * macrocmd.c: Remove _initialize_macrocmd prototype.
6775 * macroscope.c: Remove _initialize_macroscope prototype.
6776 * maint.c: Remove _initialize_maint_cmds prototype.
6777 * mdebugread.c: Remove _initialize_mdebugread prototype.
6778 * memattr.c: Remove _initialize_mem prototype.
6779 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6780 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6781 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6782 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6783 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6784 * microblaze-linux-tdep.c: Remove
6785 _initialize_microblaze_linux_tdep prototype.
6786 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6787 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6788 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6789 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6790 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6791 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6792 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6793 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6794 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6795 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6796 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6797 prototype.
6798 * mipsread.c: Remove _initialize_mipsread prototype.
6799 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6800 prototype.
6801 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6802 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6803 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6804 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6805 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6806 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6807 prototype.
6808 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6809 * nto-procfs.c: Remove _initialize_procfs prototype.
6810 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6811 * objc-lang.c: Remove _initialize_objc_language prototype.
6812 * objfiles.c: Remove _initialize_objfiles prototype.
6813 * observer.c: Remove observer_test_first_notification_function,
6814 observer_test_second_notification_function,
6815 observer_test_third_notification_function, and
6816 _initialize_observer prototypes.
6817 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6818 * osabi.c: Remove _initialize_gdb_osabi prototype.
6819 * osdata.c: Remove _initialize_osdata prototype.
6820 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6821 * parse.c: Remove _initialize_parse prototype.
6822 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6823 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6824 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6825 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6826 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6827 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6828 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6829 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6830 * printcmd.c: Remove _initialize_printcmd prototype.
6831 * probe.c: Remove _initialize_probe prototype.
6832 * proc-api.c: Remove _initialize_proc_api prototype.
6833 * proc-events.c: Remove _initialize_proc_events prototype.
6834 * proc-service.c: Remove _initialize_proc_service prototype.
6835 * procfs.c: Remove _initialize_procfs prototype.
6836 * psymtab.c: Remove _initialize_psymtab prototype.
6837 * python/python.c: Remove _initialize_python prototype.
6838 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6839 * record-btrace.c: Remove _initialize_record_btrace prototype.
6840 * record-full.c: Remove _initialize_record_full prototype.
6841 * record.c: Remove _initialize_record prototype.
6842 * regcache.c: Remove _initialize_regcache prototype.
6843 * reggroups.c: Remove _initialize_reggroup prototype.
6844 * remote-notif.c: Remove _initialize_notif prototype.
6845 * remote-sim.c: Remove _initialize_remote_sim prototype.
6846 * remote.c: Remove _initialize_remote prototype.
6847 * reverse.c: Remove _initialize_reverse prototype.
6848 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6849 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6850 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6851 prototype.
6852 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6853 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6854 * rust-exp.y: Remove _initialize_rust_exp prototype.
6855 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6856 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6857 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6858 * score-tdep.c: Remove _initialize_score_tdep prototype.
6859 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6860 prototype.
6861 * ser-go32.c: Remove _initialize_ser_dos prototype.
6862 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6863 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6864 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6865 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6866 * serial.c: Remove _initialize_serial prototype.
6867 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6868 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6869 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6870 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6871 * skip.c: Remove _initialize_step_skip prototype.
6872 * sol-thread.c: Remove _initialize_sol_thread prototype.
6873 * solib-aix.c: Remove _initialize_solib_aix prototype.
6874 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6875 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6876 * solib-frv.c: Remove _initialize_frv_solib prototype.
6877 * solib-spu.c: Remove _initialize_spu_solib prototype.
6878 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6879 * solib-target.c: Remove _initialize_solib_target prototype.
6880 * solib.c: Remove _initialize_solib prototype.
6881 * source.c: Remove _initialize_source prototype.
6882 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6883 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6884 prototype.
6885 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6886 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6887 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6888 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6889 prototype.
6890 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6891 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6892 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6893 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6894 prototype.
6895 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6896 prototype.
6897 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6898 prototype.
6899 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6900 prototype.
6901 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6902 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6903 prototype.
6904 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6905 prototype.
6906 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6907 prototype.
6908 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6909 prototype.
6910 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6911 prototype.
6912 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6913 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6914 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6915 * stabsread.c: Remove _initialize_stabsread prototype.
6916 * stack.c: Remove _initialize_stack prototype.
6917 * stap-probe.c: Remove _initialize_stap_probe prototype.
6918 * std-regs.c: Remove _initialize_frame_reg prototype.
6919 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6920 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6921 * symfile.c: Remove _initialize_symfile prototype.
6922 * symmisc.c: Remove _initialize_symmisc prototype.
6923 * symtab.c: Remove _initialize_symtab prototype.
6924 * target-dcache.c: Remove _initialize_target_dcache prototype.
6925 * target-descriptions.c: Remove _initialize_target_descriptions
6926 prototype.
6927 * thread.c: Remove _initialize_thread prototype.
6928 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6929 prototype.
6930 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6931 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6932 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6933 prototype.
6934 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6935 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6936 * tracefile.c: Remove _initialize_tracefile prototype.
6937 * tracepoint.c: Remove _initialize_tracepoint prototype.
6938 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6939 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6940 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6941 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6942 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6943 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6944 * tui/tui.c: Remove _initialize_tui prototype.
6945 * typeprint.c: Remove _initialize_typeprint prototype.
6946 * user-regs.c: Remove _initialize_user_regs prototype.
6947 * utils.c: Remove _initialize_utils prototype.
6948 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6949 * valarith.c: Remove _initialize_valarith prototype.
6950 * valops.c: Remove _initialize_valops prototype.
6951 * valprint.c: Remove _initialize_valprint prototype.
6952 * value.c: Remove _initialize_values prototype.
6953 * varobj.c: Remove _initialize_varobj prototype.
6954 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6955 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6956 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6957 * windows-nat.c: Remove _initialize_windows_nat,
6958 _initialize_check_for_gdb_ini, and _initialize_loadable
6959 prototypes.
6960 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6961 * xcoffread.c: Remove _initialize_xcoffread prototype.
6962 * xml-support.c: Remove _initialize_xml_support prototype.
6963 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6964 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6965 prototype.
6966 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6967 prototype.
6968 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6969
a611b5cb
KS
69702017-09-08 Keith Seitz <keiths@redhat.com>
6971
6972 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6973 field.
6974
469412dd
CW
69752017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6976
6977 * f-valprint.c (f_val_print): Remove check for one byte
6978 sized integers. Remove printing of character type.
6979
a5ad232b
FP
69802017-09-08 Frank Penczek <frank.penczek@intel.com>
6981 Christoph Weinmann <christoph.t.weinmann@intel.com>
6982 Bernhard Heckel <bernhard.heckel@intel.com>
6983
6984 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6985 to maintain proper indentation when printing pointers/refs.
6986
e5014227
JB
69872017-09-07 Joel Brobecker <brobecker@adacore.com>
6988
6989 GDB 8.0.1 released.
6990
63c99141
JB
69912017-09-07 Joel Brobecker <brobecker@adacore.com>
6992
6993 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6994
69c1e056
TT
69952017-09-05 Tom Tromey <tom@tromey.com>
6996
6997 * parse.c (funcall_chain): Now a std::vector.
6998 (start_arglist, end_arglist): Simplify.
6999 (free_funcalls): Remove.
7000 (parse_exp_in_context_1): Remove cleanup.
7001
fef704bf
TT
70022017-09-05 Tom Tromey <tom@tromey.com>
7003
7004 * go-exp.y (go_parse): Don't create a cleanup.
7005
5613c585
TT
70062017-09-05 Tom Tromey <tom@tromey.com>
7007
7008 * d-exp.y (PrimaryExpression): Use std::string.
7009 (d_parse): Don't create a cleanup.
7010
eae49211
TT
70112017-09-05 Tom Tromey <tom@tromey.com>
7012
7013 * utils.c (do_clear_parser_state): Remove.
7014 (make_cleanup_clear_parser_state): Remove.
7015 * p-exp.y (pascal_parse): Use scoped_restore.
7016 * m2-exp.y (m2_parse): Use scoped_restore.
7017 * f-exp.y (f_parse): Use scoped_restore.
7018 * d-exp.y (d_parse): Use scoped_restore.
7019 * c-exp.y (c_parse): Use scoped_restore.
7020 * ada-exp.y (ada_parse): Use scoped_restore.
7021 * utils.h (make_cleanup_clear_parser_state): Remove.
7022
73b9be8b
KS
70232017-09-06 Keith Seitz <keiths@redhat.com>
7024
7025 * dwarf2read.c (dw2_linkage_name_attr): New function.
7026 (dw2_linkage_name): New function.
7027 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7028 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7029 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7030
a102602b
KR
70312017-09-06 Kamil Rytarowski <n54@gmx.com>
7032
7033 * config/djgpp/djconfig.sh: Correct shell portability issue.
7034
28ad437d
KR
70352017-09-06 Kamil Rytarowski <n54@gmx.com>
7036
7037 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7038
351787dd
JB
70392017-09-06 John Baldwin <jhb@FreeBSD.org>
7040
7041 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7042 * NEWS: Mention new FreeBSD/mips native configuration.
7043 * configure.host: Add aarch64*-*-freebsd*.
7044 * configure.nat: Likewise.
7045 * aarch64-fbsd-nat.c: New file.
7046
c0f84956
JB
70472017-09-06 John Baldwin <jhb@FreeBSD.org>
7048
7049 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7050 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7051 * NEWS: Mention new FreeBSD/aarch64 target.
7052 * configure.tgt: Add aarch64*-*-freebsd*.
7053 * aarch64-fbsd-tdep.c: New file.
7054 * aarch64-fbsd-tdep.h: New file.
7055
7610297a
KR
70562017-09-06 Kamil Rytarowski <n54@gmx.com>
7057
7058 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7059
fbd1b771
JK
70602017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7061
7062 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7063 of TLS symbols.
7064
5ca79eae
PW
70652017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7066
7067 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7068 call.
7069
bf93d7ba
SM
70702017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7071
7072 * infrun.c (follow_exec): Call add_thread after
7073 target_find_description.
7074
1bb7c059
SM
70752017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7076
7077 * infrun.c (handle_inferior_event_1): When exec'ing, read
7078 stop_pc after follow_exec.
7079
fc809827
SM
70802017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7081
7082 * remote.c (process_g_packet): Update error message.
7083
d2fcdd85
YQ
70842017-09-05 Yao Qi <yao.qi@linaro.org>
7085
7086 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7087 targets.
7088
e69570ee
PA
70892017-09-05 Pedro Alves <palves@redhat.com>
7090
7091 * eval.c (eval_call, evaluate_funcall): New functions, factored
7092 out from ...
7093 (evaluate_subexp_standard): ... this.
7094
22916b07
YQ
70952017-09-05 Yao Qi <yao.qi@linaro.org>
7096
7097 * amd64-tdep.c (amd64_target_description): Create target
7098 descriptions.
7099 (_initialize_amd64_tdep): Don't call functions
7100 initialize_tdesc_amd64_*. Add self tests.
7101 * arch/amd64.c (amd64_create_target_description): Add parameter
7102 is_linux. Call set_tdesc_osabi if is_linux is true.
7103 * arch/amd64.h (amd64_create_target_description): Update the
7104 declaration.
7105 * arch/i386.c (i386_create_target_description): Add parameter
7106 is_linux. Call set_tdesc_osabi if is_linux is true.
7107 * arch/i386.h (i386_create_target_description): Update
7108 declaration.
7109 * configure.tgt: Add i386.o to gdb_target_obs.
7110 * features/Makefile (XMLTOC): Remove i386/*.xml.
7111 * features/i386/amd64-avx-avx512.c: Remove.
7112 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7113 * features/i386/amd64-avx-mpx.c: Remove.
7114 * features/i386/amd64-avx.c: Remove.
7115 * features/i386/amd64-mpx.c: Remove.
7116 * features/i386/amd64.c: Remove.
7117 * features/i386/i386-avx-avx512.c: Remove.
7118 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7119 * features/i386/i386-avx-mpx.c: Remove.
7120 * features/i386/i386-avx.c: Remove.
7121 * features/i386/i386-mmx.c: Remove.
7122 * features/i386/i386-mpx.c: Remove.
7123 * features/i386/i386.c: Remove.
7124 * i386-tdep.c: Don't include features/i386/i386*.c., include
7125 target-descriptions.h and arch/i386.h.
7126 (i386_target_description): Create target descriptions.
7127 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7128 functions. Do self tests.
7129
0854b7b1
YQ
71302017-09-05 Yao Qi <yao.qi@linaro.org>
7131
7132 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7133 * features/i386/amd64-avx-avx512-linux.c: Removed.
7134 * features/i386/amd64-avx-linux.c: Removed.
7135 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7136 * features/i386/amd64-avx-mpx-linux.c: Removed.
7137 * features/i386/amd64-linux.c: Removed.
7138 * features/i386/amd64-mpx-linux.c: Removed.
7139 * features/i386/x32-avx-avx512-linux.c: Removed.
7140 * features/i386/x32-avx-linux.c: Removed.
7141 * features/i386/x32-linux.c: Removed.
7142
b4570e4b
YQ
71432017-09-05 Yao Qi <yao.qi@linaro.org>
7144
7145 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7146 features/i386/*.c.
7147 (amd64_linux_read_description): Call
7148 amd64_create_target_description.
7149 * arch/amd64.c: New file.
7150 * arch/amd64.h: New file.
7151 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7152 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7153
6c73f67f
YQ
71542017-09-05 Yao Qi <yao.qi@linaro.org>
7155
7156 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7157 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7158 (amd64_linux_read_description): Create target descriptions.
7159 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7160 functions. Add unit tests.
7161 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7162 x32-core.xml.
7163 * features/i386/64bit-avx.c: Generated.
7164 * features/i386/64bit-avx512.c: Generated.
7165 * features/i386/64bit-core.c: Generated.
7166 * features/i386/64bit-linux.c: Generated.
7167 * features/i386/64bit-mpx.c: Generated.
7168 * features/i386/64bit-pkeys.c: Generated.
7169 * features/i386/64bit-segments.c: Generated.
7170 * features/i386/64bit-sse.c: Generated.
7171 * features/i386/x32-core.c: Generated.
7172 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7173 c files for amd64-linux and x32-linux.
7174
9d3d478b
YQ
71752017-09-05 Yao Qi <yao.qi@linaro.org>
7176
7177 * amd64-linux-tdep.c (amd64_linux_read_description): New
7178 function.
7179 (amd64_linux_core_read_description): Call
7180 amd64_linux_read_description.
7181 (amd64_linux_init_abi): Likewise.
7182 (amd64_x32_linux_init_abi): Likewise.
7183 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7184 * x86-linux-nat.c (x86_linux_read_description): Call
7185 amd64_linux_read_description.
7186
b9f1d50f
YQ
71872017-09-05 Yao Qi <yao.qi@linaro.org>
7188
7189 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7190 comments.
7191
188c9e6d
YQ
71922017-09-05 Yao Qi <yao.qi@linaro.org>
7193
7194 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7195 * features/i386/i386-avx-avx512-linux.c: Remove.
7196 * features/i386/i386-avx-linux.c: Remove.
7197 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7198 * features/i386/i386-avx-mpx-linux.c: Remove.
7199 * features/i386/i386-linux.c: Remove.
7200 * features/i386/i386-mmx-linux.c: Remove.
7201 * features/i386/i386-mpx-linux.c: Remove.
7202
5f035c07
YQ
72032017-09-05 Yao Qi <yao.qi@linaro.org>
7204
7205 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7206 (SFILES): Add arch/i386.c.
7207 (HFILES_NO_SRCDIR): Add arch/i386.h.
7208 * arch/i386.c: New file.
7209 * arch/i386.h: New file.
7210 * arch/tdesc.h (allocate_target_description): Declare.
7211 (set_tdesc_architecture): Declare.
7212 (set_tdesc_osabi): Declare.
7213 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7214 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7215 include arch/i386.h.
7216 (i386_linux_read_description): Remove code and call
7217 i386_create_target_description.
7218 (set_tdesc_architecture): New function.
7219 (set_tdesc_osabi): New function.
7220 * target-descriptions.h (allocate_target_description): Remove.
7221
0abe8a89
YQ
72222017-09-05 Yao Qi <yao.qi@linaro.org>
7223
7224 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7225 * target-descriptions.c (tdesc_create_feature): Likewise, and
7226 adjust code.
7227 * features/i386/32bit-avx.c: Re-generated.
7228 * features/i386/32bit-avx512.c: Re-generated.
7229 * features/i386/32bit-core.c: Re-generated.
7230 * features/i386/32bit-linux.c: Re-generated.
7231 * features/i386/32bit-mpx.c: Re-generated.
7232 * features/i386/32bit-pkeys.c: Re-generated.
7233 * features/i386/32bit-sse.c: Re-generated.
7234
0a188386
YQ
72352017-09-05 Yao Qi <yao.qi@linaro.org>
7236
7237 * regformats/regdef.h (struct reg): Override operator == and !=.
7238
f49ff000
YQ
72392017-09-05 Yao Qi <yao.qi@linaro.org>
7240
7241 * arch/tdesc.h: New file.
7242 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7243 * target-descriptions.c: Update comments.
7244 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7245 declarations.
7246 * features/i386/32bit-avx.c: Re-generated.
7247 * features/i386/32bit-avx512.c: Re-generated.
7248 * features/i386/32bit-core.c: Re-generated.
7249 * features/i386/32bit-linux.c: Re-generated.
7250 * features/i386/32bit-mpx.c: Re-generated.
7251 * features/i386/32bit-pkeys.c: Re-generated.
7252 * features/i386/32bit-sse.c: Re-generated.
7253
f7000548
YQ
72542017-09-05 Yao Qi <yao.qi@linaro.org>
7255
7256 * regformats/regdat.sh: Update generated code.
7257
c9a5e2a5
YQ
72582017-09-05 Yao Qi <yao.qi@linaro.org>
7259
7260 * regformats/regdat.sh: Adjust code order.
7261
d6b687ac
SM
72622017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7263
7264 * expprint.c (dump_subexp_body_standard): Use constant format
7265 string in fprintf_filtered call.
7266
a379bfd0
JB
72672017-09-04 John Baldwin <jhb@FreeBSD.org>
7268
7269 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7270 NetBSD/i386.
7271 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7272
f7efc967
JB
72732017-09-04 John Baldwin <jhb@FreeBSD.org>
7274
7275 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7276
c49fbc6c
JB
72772017-09-04 John Baldwin <jhb@FreeBSD.org>
7278
7279 * bsd-kvm.o: Define _KMEMUSER.
7280 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7281 * configure: Regenerate.
7282
26562e73
JB
72832017-09-04 John Baldwin <jhb@FreeBSD.org>
7284
7285 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7286 * i386-fbsd-nat.c: Likewise.
7287
31cf1487
JB
72882017-09-04 John Baldwin <jhb@FreeBSD.org>
7289
7290 * unittests/array-view-selftests.c: Add include of <array>.
7291
5b9f8a7c
JB
72922017-09-04 John Baldwin <jhb@FreeBSD.org>
7293
7294 * spu-tdep.c (flush_ea_cache): Add missing argument to
7295 call_function_by_hand.
7296
d69cf9b2
PA
72972017-09-04 Pedro Alves <palves@redhat.com>
7298
7299 * NEWS (Safer support for debugging with no debug info): New.
7300
3693fdb3
PA
73012017-09-04 Pedro Alves <palves@redhat.com>
7302
7303 * c-exp.y (function_method, function_method_void): Add current
7304 instance flags to TYPE_INSTANCE.
7305 * dwarf2read.c (check_modifier): New.
7306 (compute_delayed_physnames): Assert that only C++ adds delayed
7307 physnames. Mark fn_fields as const/volatile depending on
7308 physname.
7309 * eval.c (make_params): New type_instance_flags parameter. Use
7310 it as the new type's instance flags.
7311 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7312 flags element and pass it to make_params.
7313 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7314 instance flags element.
7315 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7316 * gdbtypes.h: Include "enum-flags.h".
7317 (type_instance_flags): New enum-flags type.
7318 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7319 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7320 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7321 (follow_type_instance_flags): New function.
7322 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7323 * parser-defs.h (follow_type_instance_flags): Declare.
7324 * valops.c (value_struct_elt_for_reference): const/volatile must
7325 match too.
7326
e68cb8e0
PA
73272017-09-04 Pedro Alves <palves@redhat.com>
7328
7329 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7330 function/method scopes; lookup the nested name as a function local
7331 static variable.
7332
858be34c
PA
73332017-09-04 Pedro Alves <palves@redhat.com>
7334
7335 (%type <voidval>): Add function_method.
7336 * c-exp.y (exp): New production for calls with no arguments.
7337 (function_method, function_method_void_or_typelist): New
7338 productions.
7339 (exp): New production for "method()::static_var".
7340 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7341 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7342 Handle OP_FUNC_STATIC_VAR.
7343 * parse.c (operator_length_standard):
7344 Handle OP_FUNC_STATIC_VAR.
7345
dd5901a6
PA
73462017-09-04 Pedro Alves <palves@redhat.com>
7347
7348 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7349 handling.
7350 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7351 Ditto.
7352 * parse.c (operator_length_standard, operator_check_standard):
7353 Ditto.
7354 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7355
46a4882b
PA
73562017-09-04 Pedro Alves <palves@redhat.com>
7357
7358 * ax-gdb.c: Include "typeprint.h".
7359 (gen_expr_for_cast): New function.
7360 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7361 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7362 type is unknown.
7363 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7364 nodebug_data_symbol.
7365 * eval.c: Include "typeprint.h".
7366 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7367 Error out if symbol has unknown type.
7368 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7369 evaluate_subexp_for_cast.
7370 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7371 OP_VAR_MSYM_VALUE.
7372 (evaluate_subexp_for_cast): New function.
7373 * gdbtypes.c (init_nodebug_var_type): New function.
7374 (objfile_type): Use it to initialize types of variables with no
7375 debug info.
7376 * typeprint.c (error_unknown_type): New.
7377 * typeprint.h (error_unknown_type): New declaration.
7378 * compile/compile-c-types.c (convert_type_basic): Handle
7379 TYPE_CODE_ERROR; warn and fallback to int for variables with
7380 unknown type.
7381
fe13dfec
PA
73822017-09-04 Pedro Alves <palves@redhat.com>
7383
7384 * eval.c (evaluate_var_value): New function, factored out from ...
7385 (evaluate_subexp_standard): ... here.
7386
d008ee21
PA
73872017-09-04 Pedro Alves <palves@redhat.com>
7388
7389 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7390 Remove useless assignments to 'op'.
7391
827d0c51
PA
73922017-09-04 Pedro Alves <palves@redhat.com>
7393
7394 * eval.c (eval_skip_value): New function.
7395 (evaluate_subexp_standard): Use it.
7396
2c5a2be1
PA
73972017-09-04 Pedro Alves <palves@redhat.com>
7398
7399 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7400 function name from symbol/minsym and pass it to
7401 error_call_unknown_return_type.
7402
74ea4be4
PA
74032017-09-04 Pedro Alves <palves@redhat.com>
7404
7405 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7406 * ax-gdb.c (gen_msym_var_ref): New function.
7407 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7408 * eval.c (evaluate_var_msym_value): New function.
7409 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7410 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7411 to call_function_by_hand.
7412 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7413 Handle OP_VAR_MSYM_VALUE.
7414 (union exp_element) <msymbol>: New field.
7415 * minsyms.h (struct type): Forward declare.
7416 (find_minsym_type_and_address): Declare.
7417 * parse.c (write_exp_elt_msym): New function.
7418 (write_exp_msymbol): Delete, refactored as ...
7419 (find_minsym_type_and_address): ... this new function.
7420 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7421 (operator_length_standard, operator_check_standard): Handle
7422 OP_VAR_MSYM_VALUE.
7423 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7424
7022349d
PA
74252017-09-04 Pedro Alves <palves@redhat.com>
7426
7427 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7428 TYPE_GNU_IFUNC specially here. Throw error if return type is
7429 unknown.
7430 * ada-typeprint.c (print_func_type): Handle functions with unknown
7431 return type.
7432 * c-typeprint.c (c_type_print_base): Handle functions and methods
7433 with unknown return type.
7434 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7435 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7436 * compile/compile-c-types.c: Include "objfiles.h".
7437 (convert_func): For functions with unknown return type, warn and
7438 default to int.
7439 * compile/compile-object-run.c (compile_object_run): Adjust call
7440 to call_function_by_hand_dummy.
7441 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7442 call_function_by_hand.
7443 * eval.c (evaluate_subexp_standard): Adjust calls to
7444 call_function_by_hand. Handle functions and methods with unknown
7445 return type. Pass expect_type to call_function_by_hand.
7446 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7447 return type.
7448 * gcore.c (call_target_sbrk): Adjust call to
7449 call_function_by_hand.
7450 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7451 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7452 an integer address type instead of nodebug.
7453 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7454 call_function_by_hand.
7455 * infcall.c (error_call_unknown_return_type): New function.
7456 (call_function_by_hand): New "default_return_type" parameter.
7457 Pass it down.
7458 (call_function_by_hand_dummy): New "default_return_type"
7459 parameter. Use it instead of defaulting to int. If there's no
7460 default and the return type is unknown, throw an error. If
7461 there's a default return type, and the called function has no
7462 debug info, then assume the function is prototyped.
7463 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7464 New "default_return_type" parameter.
7465 (error_call_unknown_return_type): New declaration.
7466 * linux-fork.c (call_lseek): Cast return type of lseek.
7467 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7468 call_function_by_hand.
7469 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7470 calls to call_function_by_hand.
7471 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7472 return type.
7473 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7474 (value_nsstring, print_object_command): Adjust calls to
7475 call_function_by_hand.
7476 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7477 functions with unknown return type.
7478 (pascal_type_print_func_varspec_suffix): New function.
7479 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7480 TYPE_CODE_METHOD>: Use it.
7481 * python/py-value.c (valpy_call): Adjust call to
7482 call_function_by_hand.
7483 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7484 call_function_by_hand.
7485 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7486 call_function_by_hand.
7487 * valops.c (value_allocate_space_in_inferior): Adjust call to
7488 call_function_by_hand.
7489 * typeprint.c (type_print_unknown_return_type): New function.
7490 * typeprint.h (type_print_unknown_return_type): New declaration.
7491
54990598
PA
74922017-09-04 Pedro Alves <palves@redhat.com>
7493
7494 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7495 types with more than one parameter as prototyped.
7496
9a24775b
PA
74972017-09-04 Pedro Alves <palves@redhat.com>
7498
7499 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7500 (disassemble_command): Use gdb_disassembly_flags instead of bare
7501 int.
7502 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7503 (dump_insns, do_mixed_source_and_assembly_deprecated)
7504 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7505 Use gdb_disassembly_flags instead of bare int.
7506 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7507 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7508 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7509 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7510 (enum gdb_disassembly_flag): ... values of this new enumeration.
7511 (gdb_disassembly_flags): Define.
7512 (gdb_disassembly)
7513 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7514 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7515 gdb_disassembly_flags instead of bare int.
7516 * record-btrace.c (btrace_insn_history)
7517 (record_btrace_insn_history, record_btrace_insn_history_range)
7518 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7519 instead of bare int.
7520 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7521 Use gdb_disassembly_flags instead of bare int.
7522 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7523 Define.
7524 * target-delegates.c: Regenerate.
7525 * target.c (target_insn_history, target_insn_history_from)
7526 (target_insn_history_range): Use gdb_disassembly_flags instead of
7527 bare int.
7528 * target.h: Include "disasm.h".
7529 (struct target_ops) <to_insn_history, to_insn_history_from,
7530 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7531 int.
7532 (target_insn_history, target_insn_history_from)
7533 (target_insn_history_range): Use gdb_disassembly_flags instead of
7534 bare int.
7535
80a65e9b
SM
75362017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7537
7538 * cli/cli-script.c (build_command_line): For if/while commands,
7539 check whether args is empty.
7540
6b66338c
SM
75412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7542
7543 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7544 (enum command_control_type): Likewise.
7545 (struct command_line): Likewise.
7546 (free_command_lines): Likewise.
7547 (struct command_lines_deleter): Likewise.
7548 (command_line_up): Likewise.
7549 (read_command_lines): Likewise.
7550 (read_command_lines_1): Likewise.
7551 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7552 (enum command_control_type): Likewise.
7553 (struct command_line): Likewise.
7554 (free_command_lines): Likewise.
7555 (struct command_lines_deleter): Likewise.
7556 (command_line_up): Likewise.
7557 (read_command_lines): Likewise.
7558 (read_command_lines_1): Likewise.
7559 * breakpoint.h: Include cli/cli-script.h.
7560 * extension-priv.h: Likewise.
7561 * gdbcmd.h: Likewise.
7562
51abb421
PA
75632017-09-04 Pedro Alves <palves@redhat.com>
7564
7565 * ada-lang.c (is_known_support_routine): Move sal declaration to
7566 where it is initialized.
7567 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7568 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7569 (clear_command, update_static_tracepoint): Remove init_sal
7570 references. Move declarations closer to initializations.
7571 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7572 initializations.
7573 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7574 references. Move sal declarations closer to initializations.
7575 * frame.c (find_frame_sal): Return a symtab_and_line via function
7576 return instead of output parameter. Remove init_sal references.
7577 * frame.h (find_frame_sal): Return a symtab_and_line via function
7578 return instead of output parameter.
7579 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7580 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7581 instead of memset.
7582 (gdbscm_find_pc_line): Remove init_sal reference.
7583 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7584 references. Move declarations closer to initializations.
7585 * infcmd.c (set_step_frame): Update. Move declarations closer to
7586 initializations.
7587 (finish_backward): Remove init_sal references. Move declarations
7588 closer to initializations.
7589 * infrun.c (process_event_stop_test, handle_step_into_function)
7590 (insert_hp_step_resume_breakpoint_at_frame)
7591 (insert_step_resume_breakpoint_at_caller): Likewise.
7592 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7593 (symbol_to_sal): Likewise.
7594 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7595 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7596 to its initialization.
7597 * reverse.c (save_bookmark_command): Use new/delete. Remove
7598 init_sal references. Move declarations closer to initializations.
7599 * source.c (get_current_source_symtab_and_line): Remove brace
7600 initialization.
7601 (set_current_source_symtab_and_line): Now takes the sal by const
7602 reference. Remove brace initialization.
7603 (line_info): Remove init_sal reference.
7604 * source.h (set_current_source_symtab_and_line): Now takes a
7605 symtab_and_line via const reference.
7606 * stack.c (set_current_sal_from_frame): Adjust.
7607 (print_frame_info): Adjust.
7608 (get_last_displayed_sal): Return the sal via function return
7609 instead of via output parameter. Simplify.
7610 (frame_info): Adjust.
7611 * stack.h (get_last_displayed_sal): Return the sal via function
7612 return instead of via output parameter.
7613 * symtab.c (init_sal): Delete.
7614 (find_pc_sect_line): Remove init_sal references. Move
7615 declarations closer to initializations.
7616 (find_function_start_sal): Remove init_sal references. Move
7617 declarations closer to initializations.
7618 * symtab.h (struct symtab_and_line): In-class initialize all
7619 fields.
7620 * tracepoint.c (set_traceframe_context)
7621 (print_one_static_tracepoint_marker): Remove init_sal references.
7622 Move declarations closer to initializations.
7623 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7624 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7625 declarations closer to initializations.
7626 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7627 init_sal references. Adjust.
7628
6c5b2ebe
PA
76292017-09-04 Pedro Alves <palves@redhat.com>
7630
7631 * ax-gdb.c (agent_command_1): Use range-for.
7632 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7633 * breakpoint.c: Include "common/array-view.h".
7634 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7635 parameter from struct symtabs_and_lines to
7636 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7637 (breakpoint_sals_to_pc): Change sals parameter from struct
7638 symtabs_and_lines to std::vector reference.
7639 (check_fast_tracepoint_sals): Change sals parameter from struct
7640 symtabs_and_lines to std::array_view. Use range-for.
7641 (decode_static_tracepoint_spec): Return a std::vector instead of
7642 symtabs_and_lines. Update.
7643 (create_breakpoint): Update.
7644 (break_range_command, until_break_command, clear_command): Update.
7645 (base_breakpoint_decode_location, bkpt_decode_location)
7646 (bkpt_probe_create_sals_from_location)
7647 (bkpt_probe_decode_location, tracepoint_decode_location)
7648 (tracepoint_probe_decode_location)
7649 (strace_marker_create_sals_from_location): Return a std::vector
7650 instead of symtabs_and_lines.
7651 (strace_marker_create_breakpoints_sal): Update.
7652 (strace_marker_decode_location): Return a std::vector instead of
7653 symtabs_and_lines. Update.
7654 (update_breakpoint_locations): Change struct symtabs_and_lines
7655 parameters to gdb::array_view. Adjust.
7656 (location_to_sals): Return a std::vector instead of
7657 symtabs_and_lines. Update.
7658 (breakpoint_re_set_default): Use std::vector instead of struct
7659 symtabs_and_lines.
7660 (decode_location_default): Return a std::vector instead of
7661 symtabs_and_lines. Update.
7662 * breakpoint.h: Include "common/array-view.h".
7663 (struct breakpoint_ops) <decode_location>: Now returns a
7664 std::vector instead of returning a symtabs_and_lines via output
7665 parameter.
7666 (update_breakpoint_locations): Change sals parameters to use
7667 gdb::array_view.
7668 * cli/cli-cmds.c (edit_command, list_command): Update to use
7669 std::vector and gdb::array_view.
7670 (ambiguous_line_spec): Adjust to use gdb::array_view and
7671 range-for.
7672 (compare_symtabs): Rename to ...
7673 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7674 const reference and adjust.
7675 (filter_sals): Rewrite using std::vector and standard algorithms.
7676 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7677 (jump_command): Update to use std::vector.
7678 * linespec.c (struct linespec_state) <canonical_names>: Update
7679 comment.
7680 (add_sal_to_sals_basic): Delete.
7681 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7682 (decode_line_2, create_sals_line_offset)
7683 (convert_address_location_to_sals, convert_linespec_to_sals)
7684 (convert_explicit_location_to_sals, parse_linespec)
7685 (event_location_to_sals, decode_line_full, decode_line_1)
7686 (decode_line_with_current_source)
7687 (decode_line_with_last_displayed, decode_objc)
7688 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7689 (linespec_result::~linespec_result): Adjust to use std::vector
7690 instead of symtabs_and_lines.
7691 * linespec.h (linespec_sals::sals): Now a std::vector.
7692 (struct linespec_result): Use std::vector, bool, and in-class
7693 initialization.
7694 (decode_line_1, decode_line_with_current_source)
7695 (decode_line_with_last_displayed): Return std::vector.
7696 * macrocmd.c (info_macros_command): Use std::vector.
7697 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7698 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7699 std::vector.
7700 * probe.h (parse_probes): Return a std::vector.
7701 * python/python.c (gdbpy_decode_line): Use std::vector and
7702 gdb::array_view.
7703 * source.c (select_source_symtab, line_info): Use std::vector.
7704 * stack.c (func_command): Use std::vector.
7705 * symtab.h (struct symtabs_and_lines): Delete.
7706 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7707
7c44b49c
PA
77082017-09-04 Pedro Alves <palves@redhat.com>
7709
7710 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7711 unittests/array-view-selftests.c.
7712 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7713 * common/array-view.h: New file.
7714 * unittests/array-view-selftests.c: New file.
7715
e439fa14
PA
77162017-09-04 Pedro Alves <palves@redhat.com>
7717
7718 * cli/cli-cmds.c (edit_command): Pass message to
7719 ambiguous_line_spec.
7720 (list_command): Pass message to ambiguous_line_spec. Say
7721 "first"/"last" instead of "start" and "end" to be consistent with
7722 the manual.
7723 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7724 them to print formatted message.
7725
7525b645
PA
77262017-09-04 Pedro Alves <palves@redhat.com>
7727
7728 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7729 ftrace_update_insns by reference instead of pointer.
7730
badc0020
YQ
77312017-09-04 Yao Qi <yao.qi@linaro.org>
7732
7733 * i386-go32-tdep.c: Include x86-xstate.h.
7734 (i386_go32_init_abi): Call i386_target_description.
7735 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7736 if xcr0 is X86_XSTATE_X87_MASK.
7737 * i386-tdep.h (tdesc_i386): Remove the declaration.
7738 (tdesc_i386_mmx): Likewise.
7739
d78bdb54
YQ
77402017-09-04 Yao Qi <yao.qi@linaro.org>
7741
7742 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7743 X86_XSTATE_SSE_MASK instead of 0.
7744
ca1fa5ee
YQ
77452017-09-04 Yao Qi <yao.qi@linaro.org>
7746
7747 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7748 i386_target_description.
7749 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7750 i386_target_description.
7751 * i386-tdep.c (i386_gdbarch_init): Likewise.
7752
2434b019
YQ
77532017-09-04 Yao Qi <yao.qi@linaro.org>
7754
7755 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7756 (x86_darwin_init_abi_64): Call amd64_target_description.
7757 * amd64-dicos-tdep.c: Likewise.
7758 * amd64-fbsd-nat.c: Likewise.
7759 * amd64-fbsd-tdep.c: Likewise.
7760 * amd64-nbsd-tdep.c: Likewise.
7761 * amd64-obsd-tdep.c: Likewise.
7762 * amd64-sol2-tdep.c: Likewise.
7763 * amd64-windows-tdep.c: Likewise.
7764 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7765
0860c437
SM
77662017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7767
7768 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7769 (btrace_function) <insn>: Change type to use std::vector.
7770 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7771 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7772 ftrace_update_insns, ftrace_compute_global_level_offset,
7773 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7774 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7775 change to std::vector.
7776 (ftrace_update_insns): Adjust to change to std::vector, change
7777 type of INSN parameter.
7778 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7779 * record-btrace.c (btrace_call_history_insn_range,
7780 btrace_compute_src_line_range,
7781 record_btrace_frame_prev_register): Adjust to change to
7782 std::vector.
7783 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7784 to change to std::vector.
7785
0638b7f9
TT
77862017-09-03 Tom Tromey <tom@tromey.com>
7787
7788 * corefile.c (reopen_exec_file): Use std::string.
7789
8f84fb0e
TT
77902017-09-03 Tom Tromey <tom@tromey.com>
7791
7792 * compile/compile.c (compile_register_name_mangled): Return
7793 std::string.
7794 * compile/compile-loc2c.c (pushf_register_address): Update.
7795 (pushf_register): Update.
7796 * compile/compile-c-types.c (convert_array): Update.
7797 * compile/compile-c-symbols.c (generate_vla_size): Update.
7798 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7799 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7800 (convert_one_symbol): Update.
7801 (generate_c_for_for_one_variable): Update.
7802 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7803 std::string.
7804 (generate_register_struct): Update.
7805 * compile/compile-internal.h (c_get_range_decl_name): Return a
7806 std::string.
7807 (compile_register_name_mangled): Return std::string.
7808
18e9961f
TT
78092017-09-03 Tom Tromey <tom@tromey.com>
7810
7811 * utils.c (perror_string): Return a std::string.
7812 (throw_perror_with_name, perror_warning_with_name): Update.
7813
45343786
TT
78142017-09-03 Tom Tromey <tom@tromey.com>
7815
7816 * demangle.c (demangle_command): Use std::string,
7817 unique_xmalloc_ptr.
7818
b57af503
TT
78192017-09-03 Tom Tromey <tom@tromey.com>
7820
7821 * cli/cli-setshow.c (do_set_command): Use std::string.
7822
6eecf35f
TT
78232017-09-03 Tom Tromey <tom@tromey.com>
7824
7825 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7826
56496dd4
TT
78272017-09-03 Tom Tromey <tom@tromey.com>
7828
7829 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7830
e91a1fa7
TT
78312017-09-03 Tom Tromey <tom@tromey.com>
7832
7833 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7834 gdb::unique_xmalloc_ptr.
7835
7ffd83d7
TT
78362017-09-03 Tom Tromey <tom@tromey.com>
7837
7838 * thread.c (print_thread_info_1): Use string_printf.
7839 (thread_apply_command, thread_apply_all_command): Use
7840 std::string.
7841
1ccbe998
TT
78422017-09-03 Tom Tromey <tom@tromey.com>
7843
7844 * valprint.c (val_print_string): Update.
7845 * gdbcore.h (memory_error_message): Return std::string.
7846 * corefile.c (memory_error_message): Return std::string.
7847 (memory_error): Update.
7848 * breakpoint.c (insert_bp_location): Update.
7849
23fdd69e
SM
78502017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7851
7852 * target/waitstatus.h (target_waitstatus_to_string): Change
7853 return type to std::string.
7854 * target/waitstatus.c (target_waitstatus_to_string): Return
7855 std::string.
7856 * target.h (target_waitstatus_to_string): Remove declaration.
7857 * infrun.c (resume, clear_proceed_status_thread,
7858 print_target_wait_results, do_target_wait, save_waitstatus,
7859 stop_all_threads): Adjust.
7860 * record-btrace.c (record_btrace_wait): Adjust.
7861 * target-debug.h
7862 (target_debug_print_struct_target_waitstatus_p): Adjust.
7863
5c811d30
JK
78642017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7865
7866 PR gdb/22046
7867 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7868 detection.
7869
0a2dde4a
SDJ
78702017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7871
7872 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7873 for setting/unsetting environment variables on the remote target.
7874 (New remote packets): Add entries for QEnvironmentHexEncoded,
7875 QEnvironmentUnset and QEnvironmentReset.
7876 * common/environ.c (gdb_environ::operator=): Extend method to
7877 handle m_user_set_env_list and m_user_unset_env_list.
7878 (gdb_environ::clear): Likewise.
7879 (match_var_in_string): Change type of first parameter from 'char
7880 *' to 'const char *'.
7881 (gdb_environ::set): Extend method to handle
7882 m_user_set_env_list and m_user_unset_env_list.
7883 (gdb_environ::unset): Likewise.
7884 (gdb_environ::clear_user_set_env): New method.
7885 (gdb_environ::user_set_envp): Likewise.
7886 (gdb_environ::user_unset_envp): Likewise.
7887 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7888 m_user_unset_env_list on move constructor/assignment.
7889 (unset): Add new default parameter 'update_unset_list = true'.
7890 (clear_user_set_env): New method.
7891 (user_set_envp): Likewise.
7892 (user_unset_envp): Likewise.
7893 (m_user_set_env_list): New std::set.
7894 (m_user_unset_env_list): Likewise.
7895 * common/rsp-low.c (hex2str): New function.
7896 (bin2hex): New overload for bin2hex function.
7897 * common/rsp-low.c (hex2str): New prototype.
7898 (str2hex): New overload prototype.
7899 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7900 QEnvironmentUnset and QEnvironmentReset.
7901 (remote_protocol_features): Add QEnvironmentHexEncoded,
7902 QEnvironmentUnset and QEnvironmentReset packets.
7903 (send_environment_packet): New function.
7904 (extended_remote_environment_support): Likewise.
7905 (extended_remote_create_inferior): Call
7906 extended_remote_environment_support.
7907 (_initialize_remote): Add QEnvironmentHexEncoded,
7908 QEnvironmentUnset and QEnvironmentReset packet configs.
7909 * unittests/environ-selftests.c (gdb_selftest_env_var):
7910 New variable.
7911 (test_vector_initialization): New function.
7912 (test_init_from_host_environ): Likewise.
7913 (test_reinit_from_host_environ): Likewise.
7914 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7915 Likewise.
7916 (test_unset_set_empty_vector): Likewise.
7917 (test_vector_clear): Likewise.
7918 (test_std_move): Likewise.
7919 (test_move_constructor):
7920 (test_self_move): Likewise.
7921 (test_set_unset_reset): Likewise.
7922 (run_tests): Rewrite in terms of the functions above.
7923
654670a4
WP
79242017-08-31 Weimin Pan <weimin.pan@oracle.com>
7925
7926 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7927 (adi_available): Use a temp variable of type CORE_ADDR as argument
7928 3 when calling target_auxv_search.
7929 (adi_normalize_address): Use masks and xor operators to calculate
7930 normalized address.
7931 (adi_read_versions, adi_write_versions, adi_print_versions)
7932 (do_examine, do_assign): Use paddress.
7933
7755ddb7
JB
79342017-08-29 John Baldwin <jhb@FreeBSD.org>
7935
7936 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7937 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7938 out of loop and add supply of FIR.
7939 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7940 add collect of FIR.
7941
fd437cbc
SM
79422017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7943
3804a343 7944 PR gdb/21827
fd437cbc
SM
7945 * cli/cli-script.c (define_command): Don't convert command name
7946 to lower case.
7947
988f6b3d
JB
79482017-08-25 Joel Brobecker <brobecker@adacore.com>
7949
7950 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7951 Update all callers accordingly. Remove all code blocks handling
7952 the case where DISPP is not NULL.
7953
663c44ac
JK
79542017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7955
7956 PR symtab/22003
7957 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7958 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7959 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7960
f1902523
JK
79612017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7962
7963 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7964 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7965 (read_comp_units_from_section): New parameter abbrev_section, use
7966 read_and_check_comp_unit_head, allocate signatured_type if needed.
7967 (create_all_comp_units): Update read_comp_units_from_section caller.
7968
87215ad1
SDJ
79692017-08-23 Pedro Alves <palves@redhat.com>
7970
7971 PR remote/21852
7972 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7973 to null_ptid and switch to thread without reading the registers
7974 after adding the inferior.
7975
6e41ddec
JK
79762017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7977
7978 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7979 compile-gcc.
7980 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7981 (compile_to_object): Implement compile_gcc.
7982 (_initialize_compile): Install "set compile-gcc". Initialize
7983 compile_gcc.
7984
e68c32d5
JK
79852017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7986
7987 * compile/compile.c (compile_to_object): Conditionally call
7988 set_verbose. Conditionally call compile or compile_v0.
7989
58afddc6
WP
79902017-08-07 Weimin Pan <weimin.pan@oracle.com>
7991
7992 * sparc64-tdep.h: (adi_normalize_address): New export.
7993 * sparc-nat.h: (open_adi_tag_fd): New export.
7994 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7995 * sparc64-linux-tdep.c:
7996 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7997 (sparc64_linux_handle_segmentation_fault): New function.
7998 (sparc64_linux_init_abi): Register
7999 sparc64_linux_handle_segmentation_fault
8000 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8001 (sparc64_addr_bits_remove): New function.
8002 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8003 (MAX_PROC_NAME_SIZE): New macro.
8004 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8005 (sparc64adilist): New variable.
8006 (adi_proc_list): New variable.
8007 (find_adi_info): New function.
8008 (add_adi_info): New function.
8009 (get_adi_info_proc): New function.
8010 (get_adi_info): New function.
8011 (info_adi_command): New function.
8012 (read_maps_entry): New function.
8013 (adi_available): New function.
8014 (adi_normalize_address): New function.
8015 (adi_align_address): New function.
8016 (adi_convert_byte_count): New function.
8017 (adi_tag_fd): New function.
8018 (adi_is_addr_mapped): New function.
8019 (adi_read_versions): New function.
8020 (adi_write_versions): New function.
8021 (adi_print_versions): New function.
8022 (do_examine): New function.
8023 (do_assign): New function.
8024 (adi_examine_command): New function.
8025 (adi_assign_command): New function.
8026 (_initialize_sparc64_adi_tdep): New function.
8027
11db9430
SM
80282017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8029
8030 * breakpoint.c (breakpoints_info): Rename to ...
8031 (info_breakpoints_command): ... this.
8032 (watchpoints_info): Rename to ...
8033 (info_watchpoints_command): ... this.
8034 (tracepoints_info): Rename to ...
8035 (info_tracepoints_command): ... this.
8036 (_initialize_breakpoint): Adjust.
8037 * dcache.c (dcache_info): Rename to ...
8038 (info_display_command): ... this.
8039 (_initialize_dcache): Adjust.
8040 * frame.h (args_info): Rename to ...
8041 (info_args_command): ... this.
8042 (locals_info): Rename to ...
8043 (info_locals_command): ... this.
8044 * infcmd.c (nofp_registers_info): Rename to ...
8045 (info_registers_command): ... this.
8046 (float_info): Rename to ...
8047 (info_float_command): ... this.
8048 (program_info): Rename to ...
8049 (info_program_command): ... this.
8050 (all_registers_info): Rename to ...
8051 (info_all_registers_command): ... this.
8052 (vector_info): Rename to ...
8053 (info_vector_command): ... this.
8054 (float_info): Rename to ...
8055 (info_float_command): ... this.
8056 (_initialize_infcmd): Adjust.
8057 * inferior.h (term_info): Rename to ...
8058 (info_terminal_command): ... this.
8059 * inflow.c (term_info): Rename to ...
8060 (info_terminal_command): ... this.
8061 (_initialize_inflow): Adjust.
8062 * infrun.c (signals_info): Rename to ...
8063 (info_signals_command): ... this.
8064 (_initialize_infrun): Adjust.
8065 * objc-lang.c (classes_info): Rename to ...
8066 (info_classes_command): ... this.
8067 (selectors_info): Rename to ...
8068 (info_selectors_command): ... this.
8069 (_initialize_objc_language): Adjust.
8070 * printcmd.c (sym_info): Rename to ...
8071 (info_symbol_command): ... this.
8072 (address_info): Rename to ...
8073 (info_address_command): ... this.
8074 (display_info): Rename to ...
8075 (info_display_command): ... this.
8076 (_initialize_printcmd): Adjust.
8077 * reverse.c (bookmarks_info): Rename to ...
8078 (info_breakpoints_command): ... this.
8079 (_initialize_reverse): Adjust.
8080 * ser-go32.c (dos_info): Rename to ...
8081 (info_serial_command): ... this.
8082 (_initialize_ser_dos): Adjust.
8083 * skip.c (skip_info): Rename to ...
8084 (info_skip_command): ... this.
8085 (_initialize_step_skip): Adjust.
8086 * source.c (line_info): Rename to ...
8087 (info_line_command): ... this.
8088 (source_info): Rename to ...
8089 (info_source_command)
8090 * stack.c (frame_info): Rename to ...
8091 (info_frame_command): ... this.
8092 (locals_info): Rename to ...
8093 (info_locals_command): ... this.
8094 (args_info): Rename to ...
8095 (info_args_command): ... this.
8096 (_initialize_stack): Adjust.
8097 * symtab.c (sources_info): Rename to ...
8098 (info_sources_command): ... this.
8099 (variables_info): Rename to ...
8100 (info_variables_command): ... this.
8101 (functions_info): Rename to ...
8102 (info_functions_command): ... this.
8103 (types_info): Rename to ...
8104 (info_types_command): ... this.
8105 (_initialize_symtab): Adjust.
8106 * target.c (target_info): Rename to ...
8107 (info_target_command): ... this.
8108 (initialize_targets): Adjust.
8109 * tracepoint.c (tvariables_info): Rename to ...
8110 (info_tvariables_command): ... this.
8111 (scope_info): Rename to ...
8112 (info_scope_command): ... this.
8113 (trace_dump_actions): Adjust.
8114 (_initialize_tracepoint): Adjust.
8115
b270e6f9
TT
81162017-08-22 Tom Tromey <tom@tromey.com>
8117
8118 * breakpoint.h (install_breakpoint): Update.
8119 * breakpoint.c (add_solib_catchpoint): Update.
8120 (install_breakpoint): Change argument to a std::unique_ptr.
8121 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8122 (create_breakpoint_sal, create_breakpoint): Update.
8123 (watch_command_1, catch_exec_command_1)
8124 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8125 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8126 Return the breakpoint.
8127 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8128 (new_single_step_breakpoint): Update.
8129 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8130 std::unique_ptr.
8131 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8132 std::unique_ptr.
8133 * break-catch-sig.c (create_signal_catchpoint): Use
8134 std::unique_ptr.
8135 * ada-lang.c (create_ada_exception_catchpoint): Use
8136 std::unique_ptr.
8137
36bd8eaa
TT
81382017-08-22 Tom Tromey <tom@tromey.com>
8139
8140 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8141
56f37645
TT
81422017-08-22 Tom Tromey <tom@tromey.com>
8143
8144 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8145 (lookup_partial_symbol): Update.
8146
0b581c69
TT
81472017-08-22 Tom Tromey <tom@tromey.com>
8148
8149 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8150 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8151 (find_and_open_source, symtab_to_fullname): Update.
8152 * psymtab.c (psymtab_to_fullname): Update.
8153
14278e1f
TT
81542017-08-22 Tom Tromey <tom@tromey.com>
8155
8156 * exec.c (exec_file_attach): Update.
8157 * linux-thread-db.c (try_thread_db_load): Update.
8158 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8159 * utils.c (gdb_realpath): Change return type.
8160 (gdb_realpath_keepfile): Update.
8161 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8162 (_initialize_utils): Register the new self test.
8163 * source.c (openp): Update.
8164 (find_and_open_source): Update.
8165 * nto-tdep.c (nto_find_and_open_solib): Update.
8166 * main.c (set_gdb_data_directory): Update.
8167 (captured_main_1): Update.
8168 * dwarf2read.c (dwarf2_get_dwz_file): Update
8169 (dw2_map_symbol_filenames): Update.
8170 * auto-load.c (auto_load_safe_path_vec_update): Update.
8171 (filename_is_in_auto_load_safe_path_vec): Change type of
8172 "filename_realp".
8173 (auto_load_objfile_script): Update.
8174 (file_is_auto_load_safe): Update. Use std::string.
8175 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8176
4971c9a7
TT
81772017-08-22 Tom Tromey <tom@tromey.com>
8178
8179 * utils.c (gdb_realpath_keepfile): Return a
8180 gdb::unique_xmalloc_ptr.
8181 * exec.c (exec_file_attach): Update.
8182 * utils.h (gdb_realpath_keepfile): Return a
8183 gdb::unique_xmalloc_ptr.
8184
e3e41d58
TT
81852017-08-22 Tom Tromey <tom@tromey.com>
8186
8187 * compile/compile.c (compile_file_command): Use
8188 gdb::unique_xmalloc_ptr, std::string.
8189 * utils.c (gdb_abspath): Change return type.
8190 * source.c (openp): Update.
8191 * objfiles.c (allocate_objfile): Update.
8192 * main.c (set_gdb_data_directory): Update.
8193 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8194
0d999a6e
ZZ
81952017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8196
8197 * cli-cmds.c (list_commands): List actual code around more than
8198 one location.
8199
329d5e7e
JB
82002017-08-21 John Baldwin <jhb@FreeBSD.org>
8201
8202 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8203
bf223d3e
PA
82042017-08-21 Pedro Alves <palves@redhat.com>
8205
8206 PR gdb/19487
8207 * c-exp.y (variable production): Handle function aliases.
8208 * minsyms.c (msymbol_is_text): New function.
8209 * minsyms.h (msymbol_is_text): Declare.
8210 * symtab.c (find_function_alias_target): New function.
8211 * symtab.h (find_function_alias_target): Declare.
8212
c973d0aa
PA
82132017-08-21 Pedro Alves <palves@redhat.com>
8214
8215 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8216 typedefs.
8217 * typeprint.c (whatis_exp): If handling "whatis", and expression
8218 is OP_TYPE, strip one typedef level. Otherwise don't strip
8219 typedefs here.
8220 * valops.c (value_cast): Save "to" type before resolving
8221 stubs/typedefs. Use that type as resulting value's type.
8222
2989a365
TT
82232017-08-18 Tom Tromey <tom@tromey.com>
8224 Pedro Alves <palves@redhat.com>
8225
8226 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8227 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8228 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8229 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8230 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8231 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8232 (linux_get_siginfo_data): Add "thread" argument. Use
8233 scoped_restore.
8234 * linux-nat.c (linux_child_follow_fork)
8235 (check_stopped_by_watchpoint): Use scoped_restore.
8236 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8237 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8238 (restore_inferior_ptid, save_inferior_ptid): Remove.
8239 * btrace.c (btrace_fetch): Use scoped_restore.
8240 * bsd-uthread.c (bsd_uthread_fetch_registers)
8241 (bsd_uthread_store_registers): Use scoped_restore.
8242 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8243 scoped_restore.
8244 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8245 (aix_thread_xfer_partial): Use scoped_restore.
8246 * inferior.h (save_inferior_ptid): Remove.
8247
e60eb288
YQ
82482017-08-18 Yao Qi <yao.qi@linaro.org>
8249
8250 PR tdep/21818
8251 * arm-tdep.c (gdb_print_insn_arm): Mark
8252 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8253
6d580b63
YQ
82542017-08-18 Yao Qi <yao.qi@linaro.org>
8255
8256 * NEWS: Mention GDBserver's new option "--selftest".
8257 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8258 * selftest.c: Move it to common/selftest.c.
8259 * selftest.h: Move it to common/selftest.h.
8260 * selftest-arch.c (reset): New function.
8261 (tests_with_arch): Call reset.
8262
86dcbf50
YQ
82632017-08-18 Yao Qi <yao.qi@linaro.org>
8264
8265 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8266 instead of exception_fprintf and printf_filtered.
8267
7649770c
YQ
82682017-08-18 Yao Qi <yao.qi@linaro.org>
8269
8270 * selftest.c (register_self_test): Rename it to
8271 selftests::register_test.
8272 (run_self_tests): selftest::run_tests.
8273 * selftest.h: Update declarations.
8274 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8275 selftests::register_test_foreach_arch.
8276 * selftest-arch.h: Update declaration.
8277 * aarch64-tdep.c: Update.
8278 * arm-tdep.c: Likewise.
8279 * disasm-selftests.c: Likewise.
8280 * dwarf2loc.c: Likewise.
8281 * dwarf2-frame.c: Likewise.
8282 * findvar.c: Likewise.
8283 * gdbarch-selftests.c: Likewise.
8284 * maint.c (maintenance_selftest): Likewise.
8285 * regcache.c: Likewise.
8286 * rust-exp.y: Likewise.
8287 * selftest-arch.c: Likewise.
8288 * unittests/environ-selftests.c: Likewise.
8289 * unittests/function-view-selftests.c: Likewise.
8290 * unittests/offset-type-selftests.c: Likewise.
8291 * unittests/optional-selftests.c: Likewise.
8292 * unittests/scoped_restore-selftests.c: Likewise.
8293 * utils-selftests.c: Likewise.
8294
b0cba12e
PA
82952017-08-17 Pedro Alves <palves@redhat.com>
8296
8297 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8298 local.
8299
4c8aa72d
PA
83002017-08-17 Pedro Alves <palves@redhat.com>
8301
8302 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8303 field.
8304 (reset_die_in_process): Delete, replaced by ...
8305 (process_die_scope): ... this new class. Make it responsible for
8306 freeing cu->line_header too.
8307 (process_die): Use process_die_scope.
8308 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8309 cu->line_header_die_owner. Don't release the line header if it's
8310 owned by the CU.
8311 (setup_type_unit_groups): Make the CU/DIE own the line header.
8312 Don't release the line header here.
8313
ba713918
AL
83142017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8315
8316 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8317
44d0fb3a
RK
83182017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8319
8320 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8321 Single-Key mode
8322
a5afdb16
RK
83232017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8324
8325 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8326 mode command list.
8327
47613aeb
SH
83282017-08-15 Stafford Horne <shorne@gmail.com>
8329
8330 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8331
9c3cc999
SH
83322017-08-15 Stafford Horne <shorne@gmail.com>
8333
8334 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8335
206726fb
SDJ
83362017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8337
8338 PR gdb/21954
8339 * infcmd.c (unset_environment_command): Use the 'clear' method on
8340 the environment instead of resetting it.
8341
0335ac6d
JB
83422017-08-15 John Baldwin <jhb@FreeBSD.org>
8343
8344 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8345 platforms.
8346
d3abe1c8
TT
83472017-08-14 Tom Tromey <tom@tromey.com>
8348
8349 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8350 (print_binary_chars): Likewise.
8351 (BITS_IN_BYTES): Remove.
8352
d6382fff
TT
83532017-08-14 Tom Tromey <tom@tromey.com>
8354
8355 PR gdb/21675
8356 * valprint.c (LOW_ZERO): Change value to 034.
8357 (print_octal_chars): Add static_asserts for octal constants.
8358 * printcmd.c (print_scalar_formatted): Add 'd' case.
8359
f978cb06
TT
83602017-08-11 Tom Tromey <tom@tromey.com>
8361
8362 * symfile.c (add_symbol_file_command): Use std::vector.
8363
2f5404b3
TT
83642017-08-14 Tom Tromey <tom@tromey.com>
8365
8366 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8367 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8368 std::move.
8369 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8370
de7985c3
PA
83712017-08-11 Pedro Alves <palves@redhat.com>
8372
8373 * infrun.c (process_event_stop_test): Adjust
8374 function_name_is_marked_for_skip call.
8375 * skip.c: Include <list>.
8376 (skiplist_entry): Make it a class with private fields, and
8377 getters/setters.
8378 (skiplist_entry_chain): Delete.
8379 (skiplist_entries): New.
8380 (skiplist_entry_count): Delete.
8381 (highest_skiplist_entry_num): New.
8382 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8383 (add_skiplist_entry): Delete.
8384 (skiplist_entry::skiplist_entry): New.
8385 (skiplist_entry::add_entry): New.
8386 (skip_file_command, skip_function): Adjust.
8387 (compile_skip_regexp): Delete.
8388 (skip_command): Don't compile regexp here. Adjust to use
8389 skiplist_entry::add_entry.
8390 (skip_info): Adjust to use range-for and getters.
8391 (skip_enable_command, skip_disable_command): Adjust to use
8392 range-for and setters.
8393 (skip_delete_command): Adjust to use std::list.
8394 (add_skiplist_entry): Delete.
8395 (skip_file_p): Delete, refactored as ...
8396 (skiplist_entry::do_skip_file_p): ... this new method.
8397 (skip_gfile_p): Delete, refactored as ...
8398 (skiplist_entry::do_gskip_file_p): ... this new method.
8399 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8400 (skiplist_entry::skip_function_p): ... this new method.
8401 (function_name_is_marked_for_skip): Now returns bool, and takes
8402 the function sal by const reference. Adjust to use range-for and
8403 skiplist_entry methods.
8404 (_initialize_step_skip): Remove references to
8405 skiplist_entry_chain, skiplist_entry_count.
8406 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8407 takes the function sal by const reference.
8408
be7d3cd5
YQ
84092017-08-11 Yao Qi <yao.qi@linaro.org>
8410
8411 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8412 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8413 (dwarf2_frame_cache):
8414 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8415 RETURN_MASK_ALL and set *this_case to NULL.
8416 * frame-unwind.h: Update comments.
8417
1c90d9f0
YQ
84182017-08-11 Yao Qi <yao.qi@linaro.org>
8419
8420 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8421 (dwarf2_frame_state_copy_regs): Remove.
8422 (dwarf2_frame_state_free_regs): Remove.
8423 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8424 (dwarf2_restore_rule): Call method .alloc_regs instead of
8425 dwarf2_frame_state_alloc_regs.
8426 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8427 constructor. Call std::move.
8428 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8429 (dwarf2_frame_cache): Likewise.
8430
8431 [GDB_SELF_TEST]: Include selftest.h and
8432 selftest-arch.h.
8433 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8434 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8435 execute_cfa_program_test.
8436
8437 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8438 copy ctor, assignment operator, move assignment.
8439 <alloc_regs>: New method.
8440 <swap>: New method.
8441 (struct dwarf2_frame_state): Delete dtor.
8442 (dwarf2_frame_state_alloc_regs): Remove declaration.
8443 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8444 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8445
afe37d6b
YQ
84462017-08-11 Yao Qi <yao.qi@linaro.org>
8447
8448 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8449 (dwarf2_frame_state::dwarf2_frame_state): New.
8450 (dwarf2_frame_state::~dwarf2_frame_state): New.
8451 (dwarf2_fetch_cfa_info): Update.
8452 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8453 rather than a pointer. Update code.
8454 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8455 dtor.
8456 <data_align, code_align, retaddr_column>: Change them to const.
8457 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8458 to bool.
8459
b348037f
YQ
84602017-08-11 Yao Qi <yao.qi@linaro.org>
8461
8462 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8463 <loc.exp>: New field.
8464 * dwarf2-frame.c (execute_cfa_program): Update.
8465 (dwarf2_frame_prev_register): Update.
8466
e7c9de26
PA
84672017-08-10 Pedro Alves <palves@redhat.com>
8468
8469 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8470
e8c6b620
JB
84712017-08-09 John Baldwin <jhb@FreeBSD.org>
8472
8473 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8474 (fbsd_pending_children): Use std::list.
8475 (fbsd_remember_child): Likewise.
8476 (fbsd_is_child_pending): Likewise.
8477 (fbsd_pending_vfork_done): Use std::forward_list.
8478 (fbsd_add_vfork_done): Likewise.
8479 (fbsd_is_vfork_done_pending): Likewise.
8480 (fbsd_next_vfork_done): Likewise.
8481
e4a26669
JB
84822017-08-09 John Baldwin <jhb@FreeBSD.org>
8483
8484 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8485 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8486 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8487 for `mapfilename'.
8488 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8489 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8490
142311d3
JB
84912017-08-09 John Baldwin <jhb@FreeBSD.org>
8492
8493 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8494 "filestuff.h".
8495 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8496
42fa2e0e
TT
84972017-08-09 Tom Tromey <tom@tromey.com>
8498
8499 * skip.c (skiplist_entry): New constructor.
8500 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8501 (skiplist_entry::file_is_glob): Now bool.
8502 (skiplist_entry::file, skiplist_entry::function): Now
8503 std::string.
8504 (make_skip_entry): Return a unique_ptr. Use new.
8505 (free_skiplist_entry, free_skiplist_entry_cleanup)
8506 (make_free_skiplist_entry_cleanup): Remove.
8507 (skip_command, skip_disable_command, add_skiplist_entry)
8508 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8509 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8510 (function_name_is_marked_for_skip): Update.
8511 (skip_delete_command): Update. Use delete.
8512
cd3af38d
JW
85132017-08-09 Jiong Wang <jiong.wang@arm.com>
8514
8515 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8516 (aarch64_linux_core_read_description): New function.
8517 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8518
29592bde
PA
85192017-08-09 Pedro Alves <palves@redhat.com>
8520
8521 * cp-name-parser.y (cp_comp_to_string): Return a
8522 gdb::unique_xmalloc_ptr<char>.
8523 * cp-support.c (replace_typedefs_qualified_name)
8524 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8525 (cp_canonicalize_string_full): Use op= instead of explicit
8526 convertion.
8527 (cp_class_name_from_physname, method_name_from_physname)
8528 (cp_func_name, cp_remove_params): Adjust to use
8529 gdb::unique_xmalloc_ptr<char>.
8530 * cp-support.h (cp_comp_to_string): Return a
8531 gdb::unique_xmalloc_ptr<char>.
8532 * python/py-type.c (typy_lookup_type): Adjust to use
8533 gdb::unique_xmalloc_ptr<char>.
8534
b3340438
L
85352017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8536
8537 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8538
e88e8651
YQ
85392017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8540 Yao Qi <yao.qi@linaro.org>
8541
8542 * cp-support.c (cp_canonicalize_string_full): Use
8543 gdb::unique_xmalloc_ptr<char>.
8544 (cp_canonicalize_string): Likewise.
8545
f5a29eb0
YQ
85462017-08-09 Yao Qi <yao.qi@linaro.org>
8547
8548 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8549 * regformats/i386/amd64-avx-avx512.dat: Remove.
8550 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8551 * regformats/i386/amd64-avx-mpx.dat:Remove.
8552 * regformats/i386/amd64-avx.dat: Remove.
8553 * regformats/i386/amd64-mpx.dat: Remove.
8554 * regformats/i386/i386-avx-avx512.dat: Remove.
8555 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8556 * regformats/i386/i386-avx-mpx.dat: Remove.
8557 * regformats/i386/i386-mmx.dat: Remove.
8558 * regformats/i386/i386-mpx.dat: Remove.
8559
57757c2f
YQ
85602017-08-09 Yao Qi <yao.qi@linaro.org>
8561
8562 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8563 * amd64-tdep.c: Don't include features/i386/x32*.c.
8564 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8565 functions.
8566 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8567 and i386/x32-avx-avx512.
8568 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8569 and i386/x32.xml.
8570 * features/i386/x32-avx-avx512.c: Removed.
8571 * features/i386/x32-avx-avx512.xml: Removed.
8572 * features/i386/x32-avx.c: Removed.
8573 * features/i386/x32-avx.xml: Removed.
8574 * features/i386/x32.c: Removed.
8575 * features/i386/x32.xml: Removed.
8576 * regformats/i386/x32-avx-avx512.dat: Removed.
8577 * regformats/i386/x32-avx.dat: Removed.
8578 * regformats/i386/x32.dat: Removed.
8579
ba7b109b
MR
85802017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8581
8582 PR breakpoints/21886
8583 * mem-break.c (default_memory_insert_breakpoint): Use
8584 `->placed_address' rather than `->reqstd_address' for the
8585 breakpoint location.
8586
e347efc3
MR
85872017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8588
8589 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8590 assertions.
8591
0dba2a6c
MR
85922017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8593
8594 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8595 a union of `tdep_info', `tdesc_data' and `id'.
8596 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8597 rather than `info.tdep_info'.
8598 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8599 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8600 * i386-tdep.c (i386_gdbarch_init): Likewise.
8601 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8602 * mips-tdep.c (mips_gdbarch_init): Likewise.
8603 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8604 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8605 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8606 `info.tdep_info'.
8607 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8608 `info.tdep_info'.
8609 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8610 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8611 `info.tdep_info'.
8612 * spu-tdep.c (spu_gdbarch_init): Likewise.
8613 * gdbarch.h: Regenerate.
8614
16eb6b2d
LS
86152017-08-07 Leszek Swirski <leszeks@google.com>
8616
7b005726 8617 PR symtab/20899
16eb6b2d
LS
8618 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8619
74cbb09e
SM
86202017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8621
8622 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8623 (gdbsim_open): Rename gdb_argv args object to argv.
8624
ee0c3293
TT
86252017-08-05 Tom Tromey <tom@tromey.com>
8626
8627 * compile/compile-object-load.c (compile_object_load): Use
8628 gdb::unique_xmalloc_ptr.
8629 * cli/cli-dump.c (scan_filename): Rename from
8630 scan_filename_with_cleanup. Change return type.
8631 (scan_expression): Rename from scan_expression_with_cleanup.
8632 Change return type.
8633 (dump_memory_to_file, dump_value_to_file, restore_command):
8634 Use gdb::unique_xmalloc_ptr. Update.
8635 * cli/cli-cmds.c (find_and_open_script): Use
8636 gdb::unique_xmalloc_ptr.
8637 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8638 * symmisc.c (maintenance_print_symbols)
8639 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8640 * symfile.c (symfile_bfd_open, generic_load)
8641 (add_symbol_file_command, remove_symbol_file_command): Use
8642 gdb::unique_xmalloc_ptr.
8643 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8644 * psymtab.c (maintenance_print_psymbols): Use
8645 gdb::unique_xmalloc_ptr.
8646 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8647 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8648 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8649 (reload_shared_libraries_1): Likewise.
8650
3232fabd
TT
86512017-08-05 Tom Tromey <tom@tromey.com>
8652
8653 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8654 (rust_op_vector, rust_set_vector): New typedefs.
8655 (current_parser): New global.
8656 (work_obstack): Change to pointer type. Update all users.
8657 (rust_ast, pstate): Remove globals.
8658 (struct rust_parser): New.
8659 (%union) <params, field_inits>: Change type.
8660 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8661 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8662 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8663 (convert_params_to_types, convert_params_to_expression): Change
8664 type of "params".
8665 (ast_string): Change type of "fields".
8666 (rust_parse): Make a rust_parser. Remove cleanups.
8667 (rust_lex_tests): Make and install an auto_obstack.
8668
f02fd774
YQ
86692017-08-04 Yao Qi <yao.qi@linaro.org>
8670
8671 * configure.srv (ipa_x32_linux_regobj): New.
8672 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8673 instead of X86_TDESC_AVX512.
8674 (initialize_low_tracepoint): Call
8675 init_registers_x32_avx_avx512_linux.
8676
91975afd
YQ
86772017-08-04 Yao Qi <yao.qi@linaro.org>
8678
8679 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8680
2331fa3a
RK
86812017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8682
8683 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8684
744e4fe1
TT
86852017-08-03 Tom Tromey <tom@tromey.com>
8686
8687 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8688 Remove.
8689 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8690
1c034b67
TT
86912017-08-03 Tom Tromey <tom@tromey.com>
8692
8693 * python/py-param.c (compute_enum_values): Use gdb_argv.
8694
773a1edc
TT
86952017-08-03 Tom Tromey <tom@tromey.com>
8696
8697 * utils.h (struct gdb_argv_deleter): New.
8698 (gdb_argv): New class.
8699 * utils.c (gdb_argv::reset): New method.
8700 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8701 * tracefile.c (tsave_command): Use gdb_argv.
8702 * top.c (new_ui_command): Use gdb_argv.
8703 * symmisc.c (maintenance_print_symbols)
8704 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8705 * symfile.c (symbol_file_command, generic_load)
8706 (remove_symbol_file_command): Use gdb_argv.
8707 * stack.c (backtrace_command): Use gdb_argv.
8708 * source.c (add_path, show_substitute_path_command)
8709 (unset_substitute_path_command, set_substitute_path_command):
8710 Use gdb_argv.
8711 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8712 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8713 * remote.c (extended_remote_run, remote_put_command)
8714 (remote_get_command, remote_delete_command): Use gdb_argv.
8715 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8716 (gdbsim_open): Use gdb_argv.
8717 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8718 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8719 * procfs.c (procfs_info_proc): Use gdb_argv.
8720 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8721 * infrun.c (handle_command): Use gdb_argv.
8722 * inferior.c (add_inferior_command, clone_inferior_command):
8723 Use gdb_argv.
8724 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8725 * exec.c (exec_file_command): Use gdb_argv.
8726 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8727 * compile/compile.c (build_argc_argv): Use gdb_argv.
8728
0d50bde3
TT
87292017-08-03 Tom Tromey <tom@tromey.com>
8730
8731 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8732
7f968c89
TT
87332017-08-03 Tom Tromey <tom@tromey.com>
8734
8735 * python/python.c (compute_python_string): Return std::string.
8736 (gdbpy_eval_from_control_command): Update.
8737 (do_start_initialization): Use std::string.
8738 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8739 xstrprintf.
8740 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8741 xstrprintf.
8742
3c9ebddd
TT
87432017-08-03 Tom Tromey <tom@tromey.com>
8744
8745 * top.h (do_restore_instream_cleanup): Remove.
8746 * top.c (do_restore_instream_cleanup): Remove.
8747 (read_command_file): Use scoped_restore.
8748 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8749
b51b225e
TT
87502017-08-03 Tom Tromey <tom@tromey.com>
8751
8752 * cli/cli-script.c (execute_user_command)
8753 (execute_control_command): Use scoped_restore.
8754
ac991630
TT
87552017-08-03 Tom Tromey <tom@tromey.com>
8756
8757 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8758 (execute_user_command): Remove user_call_depth; use
8759 user_args_stack's size instead.
8760
898e0c8e
TT
87612017-08-03 Tom Tromey <tom@tromey.com>
8762
8763 * top.h (in_user_command): Remove.
8764 * top.c (in_user_command): Remove.
8765 * cli/cli-script.c (do_restore_user_call_depth)
8766 (execute_user_command): Update.
8767
26fcd5d7
TT
87682017-08-03 Tom Tromey <tom@tromey.com>
8769
8770 * valops.c (search_struct_method): Use gdb::byte_vector.
8771 * valarith.c (value_concat): Use std::vector.
8772 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8773 (simple_search_memory): Likewise.
8774 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8775 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8776 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8777 * elfread.c (elf_rel_plt_read): Use std::string.
8778 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8779 * cli/cli-dump.c (restore_section_callback): Use
8780 gdb::byte_vector.
8781
7c218e6c
TT
87822017-08-03 Tom Tromey <tom@tromey.com>
8783
8784 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8785
31b68d4a
TT
87862017-08-03 Tom Tromey <tom@tromey.com>
8787
8788 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8789 (tui_register_format): Use scoped_restore.
8790
2ec845e7
TT
87912017-08-03 Tom Tromey <tom@tromey.com>
8792
8793 * reverse.c (exec_direction_default): Remove.
8794 (exec_reverse_once): Use scoped_restore.
8795 * remote.c (restore_remote_timeout): Remove.
8796 (remote_flash_erase, remote_flash_write, remote_flash_done)
8797 (readchar, remote_serial_write): Use scoped_restore.
8798 * cli/cli-script.c (struct source_cleanup_lines_args)
8799 (source_cleanup_lines): Remove.
8800 (script_from_file): Use scoped_restore.
8801 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8802 (source_command): Use scoped_restore.
8803
b3bc8453
TT
88042017-08-03 Tom Tromey <tom@tromey.com>
8805
8806 * utils.h (make_cleanup_free_so): Remove.
8807 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8808 * solist.h (struct so_deleter): New.
8809 (so_list_up): New typedef.
8810 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8811
e3ad2841
TT
88122017-08-03 Tom Tromey <tom@tromey.com>
8813
8814 * utils.h (make_cleanup_restore_current_language): Remove.
8815 * utils.c (do_restore_current_language)
8816 (make_cleanup_restore_current_language): Remove.
8817 * parse.c (parse_exp_in_context_1)
8818 (parse_expression_with_language): Use
8819 scoped_restore_current_language.
8820 * mi/mi-main.c (mi_cmd_execute): Use
8821 scoped_restore_current_language.
8822 * language.h (scoped_restore_current_language): New class.
8823
b80cf838
TT
88242017-08-03 Tom Tromey <tom@tromey.com>
8825
8826 * compile/compile.c (cleanup_unlink_file): Remove.
8827 (compile_to_object): Use gdb::unlinker.
8828 (eval_compile_command): Likewise.
8829
fad0444a
TT
88302017-08-03 Tom Tromey <tom@tromey.com>
8831
8832 * utils.h (make_cleanup_fclose): Remove.
8833 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8834
6e7bc05c
TT
88352017-08-03 Tom Tromey <tom@tromey.com>
8836
8837 * top.c (open_terminal_stream): Return gdb_file_up.
8838 (new_ui_command): Update.
8839
4a45905b
TT
88402017-08-03 Tom Tromey <tom@tromey.com>
8841
8842 * source.c (print_source_lines_base, forward_search_command)
8843 (reverse_search_command): Use gdb_file_up.
8844
7cd06d6e
TT
88452017-08-03 Tom Tromey <tom@tromey.com>
8846
8847 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8848
ed166945
TT
88492017-08-03 Tom Tromey <tom@tromey.com>
8850
8851 * cli/cli-cmds.c (find_and_open_script): Change return type.
8852 Remove "streamp" and "full_path" parameters.
8853 (source_script_with_search): Update.
8854 * auto-load.c (source_script_file): Update.
8855 * cli/cli-cmds.h (find_and_open_script): Change type.
8856 (open_script): New struct.
8857
d419f42d
TT
88582017-08-03 Tom Tromey <tom@tromey.com>
8859
8860 * xml-support.c (xml_fetch_content_from_file): Update.
8861 * ui-file.c (stdio_file::open): Update.
8862 * tracefile-tfile.c (tfile_start): Update.
8863 * remote.c (remote_file_put, remote_file_get): Update.
8864 * nat/linux-procfs.c (linux_proc_get_int)
8865 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8866 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8867 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8868 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8869 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8870 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8871 * linux-nat.c (linux_proc_pending_signals): Update.
8872 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8873 (file_closer): Remove.
8874 * compile/compile.c (compile_to_object): Update.
8875 * common/filestuff.h (struct gdb_file_deleter): New.
8876 (gdb_file_up): New typedef.
8877 (gdb_fopen_cloexec): Change return type.
8878 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8879 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8880 (dump_binary_file, restore_binary_file): Update.
8881 * auto-load.c (auto_load_objfile_script_1): Update.
8882
4a2b031d
TT
88832017-08-03 Tom Tromey <tom@tromey.com>
8884
8885 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8886 (info_static_tracepoint_markers_command): Likewise.
8887 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8888 * skip.c (skip_info): Use ui_out_emit_table.
8889 * progspace.c (print_program_space): Use ui_out_emit_table.
8890 * osdata.c (info_osdata): Use ui_out_emit_table.
8891 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8892 ui_out_emit_table.
8893 * linux-thread-db.c (info_auto_load_libthread_db): Use
8894 ui_out_emit_table.
8895 * inferior.c (print_inferior): Use ui_out_emit_table.
8896 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8897 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8898 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8899 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8900 * ui-out.h (class ui_out_emit_table): New.
8901
a4f320fd
MR
89022017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8903
8904 * mips-tdep.c (mips_fpu_type_str): New function.
8905 (mips_dump_tdep): Call it.
8906
a2f1f308
MR
89072017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8908
8909 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8910 `->mips_fpu_type'.
8911
7e5ed83b
XR
89122017-07-31 Xavier Roirand <roirand@adacore.com>
8913
8914 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8915
4c9dc811
XR
89162017-07-27 Xavier Roirand <roirand@adacore.com>
8917
8918 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8919
27d41eac
YQ
89202017-07-26 Yao Qi <yao.qi@linaro.org>
8921
8922 * cli/cli-cmds.c (maintenancechecklist): New variable.
8923 * gdbcmd.h (maintenancechecklist): Declare it.
8924 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8925 Call i386_linux_read_description with different masks.
8926 * maint.c (maintenance_check_command): New function.
8927 (_initialize_maint_cmds): Call add_prefix_cmd.
8928 * target-descriptions.c (tdesc_reg): override operator != and ==.
8929 (tdesc_type): Likewise.
8930 (tdesc_feature): Likewise.
8931 (target_desc): Likewise.
8932 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8933 (maintenance_check_xml_descriptions): New function.
8934 (_initialize_target_descriptions) Add command "xml-descriptions".
8935 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8936
ea03d0d3
YQ
89372017-07-26 Yao Qi <yao.qi@linaro.org>
8938
8939 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8940 Include features/i386/32bit-*.c.
8941 (i386_linux_read_description): Generate target description if it
8942 doesn't exist.
8943 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8944 functions.
8945 * features/i386/32bit-linux.c: Re-generated.
8946 * features/i386/32bit-sse.c: Likewise.
8947 * target-descriptions.c (print_c_feature::visit): Print code to
8948 set register number if needed.
8949 (print_c_feature) <m_next_regnum>: New field.
8950
25aa13e5
YQ
89512017-07-26 Yao Qi <yao.qi@linaro.org>
8952
8953 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8954 (FEATURE_XMLFILES): New.
8955 (FEATURE_CFILES): New.
8956 New rules.
8957 (clean-cfiles): Remove generated c files.
8958 * features/i386/32bit-avx.c: Generated.
8959 * features/i386/32bit-avx512.c: Generated.
8960 * features/i386/32bit-core.c: Generated.
8961 * features/i386/32bit-linux.c: Generated.
8962 * features/i386/32bit-mpx.c: Generated.
8963 * features/i386/32bit-pkeys.c: Generated.
8964 * features/i386/32bit-sse.c: Generated.
8965 * target-descriptions.c: Include algorithm.
8966 (tdesc_element_visitor): Add method visit_end.
8967 (print_c_tdesc): Implement visit_end.
8968 (print_c_tdesc:: m_filename_after_features): Move it to
8969 protected.
8970 (print_c_feature): New class.
8971 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8972 name starts with "i386/32bit-".
8973
6eb1e6a8
YQ
89742017-07-26 Yao Qi <yao.qi@linaro.org>
8975
8976 * target-descriptions.c (tdesc_element_visitor): New class.
8977 (tdesc_element): New class.
8978 (tdesc_reg): Inherit from tdesc_element.
8979 (tdesc_reg::accept): New function.
8980 (tdesc_type): Inherit from tdesc_element.
8981 (tdesc_type::accept): New function.
8982 (tdesc_feature): Inherit from tdesc_element.
8983 (tdesc_feature::accept): New function.
8984 (target_desc): Inherit from tdesc_element.
8985 (target_desc::target_desc): New.
8986 (target_desc::~target_desc): New.
8987 (target_desc::accept): New.
8988 (allocate_target_description): Use new.
8989 (free_target_description): Use delete.
8990 (print_c_tdesc): New class.
8991 (maint_print_c_tdesc_cmd): Adjust.
8992
8993 * features/aarch64.c: Re-generated.
8994 * features/arc-arcompact.c: Re-generated.
8995 * features/arc-v2.c: Re-generated.
8996 * features/arm/arm-with-iwmmxt.c: Re-generated.
8997 * features/arm/arm-with-m.c: Re-generated.
8998 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8999 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9000 * features/arm/arm-with-neon.c: Re-generated.
9001 * features/arm/arm-with-vfpv2.c: Re-generated.
9002 * features/arm/arm-with-vfpv3.c: Re-generated.
9003 * features/i386/amd64-avx-avx512.c: Re-generated.
9004 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9005 * features/i386/amd64-avx.c: Re-generated.
9006 * features/i386/amd64-avx-linux.c: Re-generated.
9007 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9008 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9009 * features/i386/amd64-avx-mpx.c: Re-generated.
9010 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9011 * features/i386/amd64.c: Re-generated.
9012 * features/i386/amd64-linux.c: Re-generated.
9013 * features/i386/amd64-mpx.c: Re-generated.
9014 * features/i386/amd64-mpx-linux.c: Re-generated.
9015 * features/i386/i386-avx-avx512.c: Re-generated.
9016 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9017 * features/i386/i386-avx.c: Re-generated.
9018 * features/i386/i386-avx-linux.c: Re-generated.
9019 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9020 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9021 * features/i386/i386-avx-mpx.c: Re-generated.
9022 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9023 * features/i386/i386.c: Re-generated.
9024 * features/i386/i386-linux.c: Re-generated.
9025 * features/i386/i386-mmx.c: Re-generated.
9026 * features/i386/i386-mmx-linux.c: Re-generated.
9027 * features/i386/i386-mpx.c: Re-generated.
9028 * features/i386/i386-mpx-linux.c: Re-generated.
9029 * features/i386/x32-avx-avx512.c: Re-generated.
9030 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9031 * features/i386/x32-avx.c: Re-generated.
9032 * features/i386/x32-avx-linux.c: Re-generated.
9033 * features/i386/x32.c: Re-generated.
9034 * features/i386/x32-linux.c: Re-generated.
9035 * features/microblaze.c: Re-generated.
9036 * features/microblaze-with-stack-protect.c: Re-generated.
9037 * features/mips64-dsp-linux.c: Re-generated.
9038 * features/mips64-linux.c: Re-generated.
9039 * features/mips-dsp-linux.c: Re-generated.
9040 * features/mips-linux.c: Re-generated.
9041 * features/nds32.c: Re-generated.
9042 * features/nios2.c: Re-generated.
9043 * features/nios2-linux.c: Re-generated.
9044 * features/rs6000/powerpc-32.c: Re-generated.
9045 * features/rs6000/powerpc-32l.c: Re-generated.
9046 * features/rs6000/powerpc-403.c: Re-generated.
9047 * features/rs6000/powerpc-403gc.c : Re-generated.
9048 * features/rs6000/powerpc-405.c: Re-generated.
9049 * features/rs6000/powerpc-505.c: Re-generated.
9050 * features/rs6000/powerpc-601.c: Re-generated.
9051 * features/rs6000/powerpc-602.c: Re-generated.
9052 * features/rs6000/powerpc-603.c: Re-generated.
9053 * features/rs6000/powerpc-604.c: Re-generated.
9054 * features/rs6000/powerpc-64.c: Re-generated.
9055 * features/rs6000/powerpc-64l.c: Re-generated.
9056 * features/rs6000/powerpc-7400.c: Re-generated.
9057 * features/rs6000/powerpc-750.c: Re-generated.
9058 * features/rs6000/powerpc-860.c: Re-generated.
9059 * features/rs6000/powerpc-altivec32.c: Re-generated.
9060 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9061 * features/rs6000/powerpc-altivec64.c: Re-generated.
9062 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9063 * features/rs6000/powerpc-cell32l.c: Re-generated.
9064 * features/rs6000/powerpc-cell64l.c: Re-generated.
9065 * features/rs6000/powerpc-e500.c: Re-generated.
9066 * features/rs6000/powerpc-e500l.c: Re-generated.
9067 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9068 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9069 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9070 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9071 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9072 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9073 * features/rs6000/powerpc-vsx32.c: Re-generated.
9074 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9075 * features/rs6000/powerpc-vsx64.c: Re-generated.
9076 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9077 * features/rs6000/rs6000.c: Re-generated.
9078 * features/s390-linux32.c: Re-generated.
9079 * features/s390-linux32v1.c: Re-generated.
9080 * features/s390-linux32v2.c: Re-generated.
9081 * features/s390-linux64.c: Re-generated.
9082 * features/s390-linux64v1.c: Re-generated.
9083 * features/s390-linux64v2.c: Re-generated.
9084 * features/s390-te-linux64.c: Re-generated.
9085 * features/s390-tevx-linux64.c: Re-generated.
9086 * features/s390-vx-linux64.c: Re-generated.
9087 * features/s390x-linux64.c: Re-generated.
9088 * features/s390x-linux64v1.c: Re-generated.
9089 * features/s390x-linux64v2.c: Re-generated.
9090 * features/s390x-te-linux64.c: Re-generated.
9091 * features/s390x-tevx-linux64.c: Re-generated.
9092 * features/s390x-vx-linux64.c: Re-generated.
9093 * features/sparc/sparc32-solaris.c: Re-generated.
9094 * features/sparc/sparc64-solaris.c: Re-generated.
9095 * features/tic6x-c62x.c: Re-generated.
9096 * features/tic6x-c62x-linux.c: Re-generated.
9097 * features/tic6x-c64x.c: Re-generated.
9098 * features/tic6x-c64x-linux.c: Re-generated.
9099 * features/tic6x-c64xp.c: Re-generated.
9100 * features/tic6x-c64xp-linux.c: Re-generated.
9101
35b4818d
YQ
91022017-07-26 Yao Qi <yao.qi@linaro.org>
9103
9104 * i386-linux-tdep.c (i386_linux_read_description): New function.
9105 (i386_linux_core_read_description): Call
9106 i386_linux_read_description.
9107 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9108 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9109 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9110 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9111 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9112 * x86-linux-nat.c (x86_linux_read_description): Call
9113 i386_linux_read_description.
9114
8e2141c6
YQ
91152017-07-26 Yao Qi <yao.qi@linaro.org>
9116
9117 * NEWS: Mention it.
9118 * features/Makefile (%.c: %.xml): Pass the xml file name to
9119 command "maint print c-tdesc".
9120 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9121 name from 'arg'.
9122
b468ff4c
YQ
91232017-07-26 Yao Qi <yao.qi@linaro.org>
9124
9125 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9126 in-class initialization.
9127 (tdesc_create_feature): Call new instead of XCNEW.
9128 (free_target_description): Ue delete.
9129
b9c0e1b4
JB
91302017-07-25 John Baldwin <jhb@FreeBSD.org>
9131
9132 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9133
a04b5337
YQ
91342017-07-25 Yao Qi <yao.qi@linaro.org>
9135
9136 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9137 constant.
9138 (amd64_x32_init_abi): Likewise.
9139 * amd64-tdep.h (amd64_init_abi): Update declaration.
9140 (amd64_x32_init_abi): Likewise.
9141
02ad7fc2
YQ
91422017-07-25 Yao Qi <yao.qi@linaro.org>
9143
9144 PR tdep/21717
9145 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9146 condition for FPSCR.
9147 (arm_linux_store_inferior_registers): Likewise.
9148
b6f48cb0
TT
91492017-07-22 Tom Tromey <tom@tromey.com>
9150
9151 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9152 <syscalls_counts>: Now a std::vector.
9153 (get_catch_syscall_inferior_data): Use "new".
9154 (catch_syscall_inferior_data_cleanup): Use "delete".
9155 (insert_catch_syscall, remove_catch_syscall)
9156 (clear_syscall_counts): Update.
9157
e12c9b7a
TT
91582017-07-22 Tom Tromey <tom@tromey.com>
9159
9160 * break-catch-syscall.c (syscall_catchpoint)
9161 <syscalls_to_be_caught>: Now a std::vector<int>
9162 (~syscall_catchpoint): Remove.
9163 (insert_catch_syscall, remove_catch_syscall)
9164 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9165 (print_mention_catch_syscall, print_recreate_catch_syscall):
9166 Update.
9167 (create_syscall_event_catchpoint): Change type of "filter"
9168 parameter.
9169 (catch_syscall_split_args): Return a std::vector.
9170 (catch_syscall_command_1, catching_syscall_number_1): Update.
9171
4fa8aeac
TT
91722017-07-22 Tom Tromey <tom@tromey.com>
9173
9174 * break-catch-throw.c (struct exception_catchpoint)
9175 <exception_rx>: Now a std::string.
9176 (~exception_catchpoint): Remove.
9177 (print_one_detail_exception_catchpoint): Update.
9178 (handle_gnu_v3_exceptions): Change type of except_rx.
9179 (extract_exception_regexp): Return a std::string.
9180 (catch_exception_command_1): Update.
9181
f746a154
TT
91822017-07-22 Tom Tromey <tom@tromey.com>
9183
9184 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9185 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9186 std::vector.
9187 <catch_all>: Now a bool.
9188 (~signal_catchpoint): Remove.
9189 (signal_catchpoint_insert_location)
9190 (signal_catchpoint_remove_location)
9191 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9192 (signal_catchpoint_print_mention)
9193 (signal_catchpoint_print_recreate)
9194 (signal_catchpoint_explains_signal): Update.
9195 (create_signal_catchpoint): Change type of "filter" and
9196 "catch_all".
9197 (catch_signal_split_args): Return a std::vector. Change type of
9198 "catch_all".
9199 (catch_signal_command): Update.
9200
47e77640
PA
92012017-07-20 Pedro Alves <palves@redhat.com>
9202
9203 * ada-lang.c (ada_language_defn): Make extern.
9204 (_initialize_ada_language): Remove add_language call.
9205 * c-lang.c (c_language_defn, cplus_language_defn)
9206 (asm_language_defn, minimal_language_defn): Make extern.
9207 (_initialize_c_language): Delete.
9208 * completer.c (compare_cstrings): Delete, moved to utils.h.
9209 * d-lang.c (d_language_defn): Make extern.
9210 (_initialize_d_language): Remove add_language calls.
9211 * defs.h (enum language): Add comment.
9212 * f-lang.c (f_language_defn): Make extern.
9213 (_initialize_f_language): Remove add_language call.
9214 * go-lang.c (go_language_defn): Make extern.
9215 (_initialize_go_language): Remove add_language call.
9216 * language.c: Include <algorithm>.
9217 (languages): Redefine as const array.
9218 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9219 (set_language_command): Handle "local". Use for-range loop.
9220 (set_language): Remove loop.
9221 (language_enum): Rewrite.
9222 (language_def, language_str): Remove loops.
9223 (add_language): Delete.
9224 (add_set_language_command): New, based on add_languages.
9225 (skip_language_trampoline): Adjust.
9226 (local_language_defn): Delete.
9227 (language_gdbarch_post_init): Adjust.
9228 (_initialize_language): Remove add_language calls. Call
9229 add_set_language_command.
9230 * language.h (add_language): Delete.
9231 (auto_language_defn)
9232 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9233 (asm_language_defn, c_language_defn, cplus_language_defn)
9234 (d_language_defn, f_language_defn, go_language_defn)
9235 (m2_language_defn, objc_language_defn, opencl_language_defn)
9236 (pascal_language_defn, rust_language_defn): Declare.
9237 * m2-lang.c (m2_language_defn): Make extern.
9238 (_initialize_m2_language): Remove add_language call.
9239 * objc-lang.c (objc_language_defn): Make extern.
9240 (_initialize_objc_language): Remove add_language call.
9241 * opencl-lang.c (opencl_language_defn): Make extern.
9242 (_initialize_opencl_language): Remove add_language call.
9243 * p-lang.c (pascal_language_defn): Make extern.
9244 (_initialize_pascal_language): Delete.
9245 * rust-lang.c (rust_language_defn): Make extern.
9246 (_initialize_rust_language): Delete.
9247 * utils.h (compare_cstrings): New static inline function.
9248
edb0c9cb
PA
92492017-07-20 Pedro Alves <palves@redhat.com>
9250
9251 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9252 (get_var_value): Constify parameters.
9253 (get_int_var_value): Change prototype.
9254 (to_fixed_range_type): Adjust.
9255 * ada-lang.h (get_int_var_value): Change prototype.
9256
a778f165
PA
92572017-07-20 Pedro Alves <palves@redhat.com>
9258
9259 * dwarf2read.c (dw2_lookup_symbol): Use
9260 SYMBOL_MATCHES_SEARCH_NAME.
9261 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9262
42edd901
PA
92632017-07-20 Pedro Alves <palves@redhat.com>
9264
9265 * block.c (block_iter_name_step, block_iter_name_first)
9266 (block_iter_name_next): Delete.
9267 (block_lookup_symbol_primary): Adjust to use
9268 dict_iter_match_first/dict_iter_match_next.
9269 * block.h (block_iter_name_first, block_iter_name_next): Delete
9270 declarations.
9271 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9272 dict_iter_match_first/dict_iter_match_next.
9273
cf325299
PA
92742017-07-20 Pedro Alves <palves@redhat.com>
9275
9276 * cp-support.c (cp_find_first_component_aux): Add missing case for
9277 end of string.
9278
c5ed0576
DB
92792017-07-18 David Blaikie <dblaikie@gmail.com>
9280
9281 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9282 of dwo_cu's dwo_file.
9283
27841e76
YQ
92842017-07-18 Yao Qi <yao.qi@linaro.org>
9285
9286 * remote.c (store_registers_using_G): Remove one line comment.
9287
cfb7e58b
YQ
92882017-07-18 Yao Qi <yao.qi@linaro.org>
9289
9290 * regcache.c (regcache_cpy): Simplify it.
9291 (regcache::cpy_no_passthrough): Remove it.
9292 * regcache.h (cpy_no_passthrough): Remove it.
9293 (regcache_dup, regcache_cpy): Update comments.
9294
386535dd
PA
92952017-07-18 Pedro Alves <palves@redhat.com>
9296
9297 * remote-sim.c (sim_command_completer): Adjust to work with a
9298 completion_tracker instead of a VEC.
9299
c45ec17c
PA
93002017-07-17 Pedro Alves <palves@redhat.com>
9301
9302 * completer.c (complete_source_filenames): New function.
9303 (complete_address_and_linespec_locations): New function.
9304 (location_completer): Use complete_address_and_linespec_locations.
9305 (completion_tracker::build_completion_result): Honor the tracker's
9306 request to suppress append.
9307 * completer.h (completion_tracker::suppress_append_ws)
9308 (completion_tracker::set_suppress_append_ws): New methods.
9309 (completion_tracker::m_suppress_append_ws): New field.
9310 (complete_source_filenames): New declaration.
9311 * linespec.c (linespec_complete_what): New.
9312 (struct ls_parser) <complete_what, completion_word,
9313 completion_quote_char, completion_quote_end, completion_tracker>:
9314 New fields.
9315 (string_find_incomplete_keyword_at_end): New.
9316 (linespec_lexer_lex_string): Record quote char. If in completion
9317 mode, don't throw.
9318 (linespec_lexer_consume_token): Advance the completion word point.
9319 (linespec_lexer_peek_token): Save/restore completion info.
9320 (save_stream_and_consume_token): New.
9321 (set_completion_after_number): New.
9322 (linespec_parse_basic): Set what to complete next depending on
9323 token. Handle function and label completions specially.
9324 (parse_linespec): Disable objc shortcut in completion mode. Set
9325 what to complete next depending on token type. Skip keyword if in
9326 completion mode.
9327 (complete_linespec_component, linespec_complete): New.
9328 * linespec.h (linespec_complete): Declare.
9329
be966d42
PA
93302017-07-17 Pedro Alves <palves@redhat.com>
9331
9332 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9333 Handle 'operator<' / 'operator<<'.
9334
a2459270
PA
93352017-07-17 Pedro Alves <palves@redhat.com>
9336
9337 * completer.c (collect_explicit_location_matches): Handle
9338 MATCH_LABEL.
9339 (convert_explicit_location_to_linespec): New, factored out from
9340 ...
9341 (convert_explicit_location_to_sals): ... this.
9342 (complete_label): New.
9343 (linespec_complete_label, find_label_symbols_in_block): New.
9344 (find_label_symbols): Add completion_mode parameter and adjust to
9345 call find_label_symbols_in_block.
9346 * linespec.h (linespec_complete_label): Declare.
9347
c6756f62
PA
93482017-07-17 Pedro Alves <palves@redhat.com>
9349
9350 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9351 complete_symbol_mode parameter.
9352 * cli/cli-cmds.c (complete_command): Get the completion result out
9353 of the handle_brkchars tracker if used a custom word point.
9354 * completer.c: Include "linespec.h".
9355 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9356 (advance_to_expression_complete_word_point): New.
9357 (completion_tracker::completes_to_completion_word): New.
9358 (complete_files_symbols): Pass down
9359 complete_symbol_mode::EXPRESSION.
9360 (explicit_options, probe_options): New.
9361 (collect_explicit_location_matches): Complete on the
9362 explictit_loc->foo instead of word. Use
9363 linespec_complete_function. Handle MATCH_LINE. Handle offering
9364 keyword and options completions.
9365 (backup_text_ptr): Delete.
9366 (skip_keyword): New.
9367 (complete_explicit_location): Remove 'word' parameter. Add
9368 language, quoted_arg_start and quoted_arg_end parameters.
9369 Rewrite, parsing left to right.
9370 (location_completer): Rewrite.
9371 (location_completer_handle_brkchars): New function.
9372 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9373 (enum complete_line_internal_reason): Adjust comments.
9374 (completion_tracker::discard_completions): New.
9375 (completer_handle_brkchars_func_for_completer): Handle
9376 location_completer.
9377 (gdb_custom_word_point_brkchars)
9378 (gdb_org_rl_basic_quote_characters): New.
9379 (gdb_completion_word_break_characters_throw)
9380 (completion_find_completion_word): Handle trackers that use a
9381 custom word point.
9382 (completion_tracker::advance_custom_word_point_by): New.
9383 (completion_tracker::build_completion_result): Don't rely on
9384 readline appending the quote char.
9385 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9386 use a custom word point.
9387 (gdb_rl_attempted_completion_function): Restore
9388 rl_basic_quote_characters.
9389 * completer.h (class completion_tracker): Extend intro comment.
9390 (completion_tracker::set_quote_char)
9391 (completion_tracker::quote_char)
9392 (completion_tracker::set_use_custom_word_point)
9393 (completion_tracker::use_custom_word_point)
9394 (completion_tracker::custom_word_point)
9395 (completion_tracker::set_custom_word_point)
9396 (completion_tracker::advance_custom_word_point_by)
9397 (completion_tracker::completes_to_completion_word)
9398 (completion_tracker::discard_completions): New methods.
9399 (completion_tracker::m_quote_char)
9400 (completion_tracker::m_use_custom_word_point)
9401 (completion_tracker::m_custom_word_point): New fields.
9402 (advance_to_expression_complete_word_point): Declare.
9403 * f-lang.c (f_collect_symbol_completion_matches): Add
9404 complete_symbol_mode parameter.
9405 * language.h (struct language_defn)
9406 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9407 parameter.
9408 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9409 (linespec_complete_function): New function.
9410 (linespec_lexer_lex_keyword): Adjust.
9411 * linespec.h (linespec_keywords, linespec_complete_function): New
9412 declarations.
9413 * location.c (find_end_quote): New function.
9414 (explicit_location_lex_one): Add explicit_completion_info
9415 parameter. Save quoting info. Don't throw if being called for
9416 completion. Don't handle Ada operators here.
9417 (is_cp_operator, skip_op_false_positives, first_of)
9418 (explicit_location_lex_one_function): New function.
9419 (string_to_explicit_location): Replace 'dont_throw' parameter with
9420 an explicit_completion_info pointer parameter. Handle it. Don't
9421 use explicit_location_lex_one to lex function names. Use
9422 explicit_location_lex_one_function instead.
9423 * location.h (struct explicit_completion_info): New.
9424 (string_to_explicit_location): Replace 'dont_throw' parameter with
9425 an explicit_completion_info pointer parameter.
9426 * symtab.c (default_collect_symbol_completion_matches_break_on):
9427 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9428 (default_collect_symbol_completion_matches)
9429 (collect_symbol_completion_matches): Add complete_symbol_mode
9430 parameter.
9431 (collect_symbol_completion_matches_type): Pass down
9432 complete_symbol_mode::EXPRESSION.
9433 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9434 parameter. Handle LINESPEC mode.
9435 * symtab.h (complete_symbol_mode): New.
9436 (default_collect_symbol_completion_matches_break_on)
9437 (default_collect_symbol_completion_matches)
9438 (collect_symbol_completion_matches)
9439 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9440 parameter.
9441
1d550c82
PA
94422017-07-17 Pedro Alves <palves@redhat.com>
9443
9444 * utils.c (enum class strncmp_iw_mode): New.
9445 (strcmp_iw): Rename to ...
9446 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9447 parameters. Handle them.
9448 (strncmp_iw): New.
9449 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9450 * utils.h (strncmp_iw): Declare.
9451 (strcmp_iw): Move describing comments here.
9452
8090b426
PA
94532017-07-17 Pedro Alves <palves@redhat.com>
9454
9455 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9456 CP_OPERATOR_STR.
9457 * c-typeprint.c (is_type_conversion_operator): Use
9458 CP_OPERATOR_STR.
9459 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9460 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9461 CP_OPERATOR_LEN.
9462 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9463 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9464 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9465 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9466 CP_OPERATOR_STR.
9467 * location.c: Include "cp-support.h".
9468 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9469 CP_OPERATOR_STR.
9470 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9471 CP_OPERATOR_LEN.
9472
6a2c1b87
PA
94732017-07-17 Pedro Alves <palves@redhat.com>
9474
9475 * cli/cli-cmds.c (complete_command): Use a completion tracker
9476 along with completion_find_completion_word for handle_brkchars
9477 phase.
9478 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9479 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9480 (struct gdb_rl_completion_word_info): New.
9481 (gdb_rl_find_completion_word): New.
9482 (completion_find_completion_word): New.
9483 * completer.h (completion_find_completion_word): Declare.
9484
eb3ff9a5
PA
94852017-07-17 Pedro Alves <palves@redhat.com>
9486
9487 * ada-lang.c (symbol_completion_match): Adjust comments.
9488 (symbol_completion_add): Replace vector parameter with
9489 completion_tracker parameter. Use it.
9490 (ada_make_symbol_completion_list): Rename to...
9491 (ada_collect_symbol_completion_matches): ... this. Add
9492 completion_tracker parameter and use it.
9493 (ada_language_defn): Adjust.
9494 * break-catch-syscall.c (catch_syscall_completer): Adjust
9495 prototype and work with completion_tracker instead of VEC.
9496 * breakpoint.c (condition_completer): Adjust prototype and work
9497 with completion_tracker instead of VEC.
9498 * c-lang.c (c_language_defn, cplus_language_defn)
9499 (asm_language_defn, minimal_language_defn): Adjust to renames.
9500 * cli/cli-cmds.c (complete_command): Rework using
9501 completion_tracker. Catch exceptions when completing.
9502 * cli/cli-decode.c (integer_unlimited_completer)
9503 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9504 with completion_tracker instead of VEC.
9505 * command.h (struct completion_tracker): Forward declare.
9506 (completer_ftype, completer_handle_brkchars_ftype): Change
9507 types.
9508 (complete_on_cmdlist, complete_on_enum): Adjust.
9509 * completer.c: Include <algorithm>.
9510 (struct gdb_completer_state): New.
9511 (current_completion): New global.
9512 (readline_line_completion_function): Delete.
9513 (noop_completer, filename_completer)
9514 (filename_completer_handle_brkchars, complete_files_symbols)
9515 (linespec_location_completer): Adjust to work with a
9516 completion_tracker instead of a VEC.
9517 (string_or_empty): New.
9518 (collect_explicit_location_matches): Adjust to work with a
9519 completion_tracker instead of a VEC.
9520 (explicit_location_completer): Rename to ...
9521 (complete_explicit_location): ... this and adjust to work with a
9522 completion_tracker instead of a VEC.
9523 (location_completer): Adjust to work with a completion_tracker
9524 instead of a VEC.
9525 (add_struct_fields): Adjust to work with a completion_list instead
9526 of VEC.
9527 (expression_completer): Rename to ...
9528 (complete_expression): ... this and adjust to work with a
9529 completion_tracker instead of a VEC. Use complete_files_symbols.
9530 (expression_completer): Reimplement on top of complete_expression.
9531 (symbol_completer): Adjust to work with a completion_tracker
9532 instead of a VEC.
9533 (enum complete_line_internal_reason): Add describing comments.
9534 (complete_line_internal_normal_command): Adjust to work with a
9535 completion_tracker instead of a VEC.
9536 (complete_line_internal): Rename to ...
9537 (complete_line_internal_1): ... this and adjust to work with a
9538 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9539 handle_brkchars phase.
9540 (new_completion_tracker): Delete.
9541 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9542 complete_line_internal_1.
9543 (free_completion_tracker): Delete.
9544 (INITIAL_COMPLETION_HTAB_SIZE): New.
9545 (completion_tracker::completion_tracker)
9546 (completion_tracker::~completion_tracker): New.
9547 (maybe_add_completion): Delete.
9548 (completion_tracker::maybe_add_completion)
9549 (completion_tracker::add_completion)
9550 (completion_tracker::add_completions): New.
9551 (throw_max_completions_reached_error): Delete.
9552 (complete_line): Adjust to work with a completion_tracker instead
9553 of a VEC. Don't create a completion_tracker_t or check for max
9554 completions here.
9555 (command_completer, command_completer_handle_brkchars)
9556 (signal_completer, reg_or_group_completer_1)
9557 (reg_or_group_completer, default_completer_handle_brkchars):
9558 Adjust to work with a completion_tracker.
9559 (gdb_completion_word_break_characters_throw): New.
9560 (gdb_completion_word_break_characters): Reimplement.
9561 (line_completion_function): Delete.
9562 (completion_tracker::recompute_lowest_common_denominator)
9563 (expand_preserving_ws)
9564 (completion_tracker::build_completion_result)
9565 (completion_result::completion_result)
9566 (completion_result::completion_result)
9567 (completion_result::~completion_result)
9568 (completion_result::completion_result)
9569 (completion_result::release_match_list, compare_cstrings)
9570 (completion_result::sort_match_list)
9571 (completion_result::reset_match_list)
9572 (gdb_rl_attempted_completion_function_throw)
9573 (gdb_rl_attempted_completion_function): New.
9574 * completer.h (completion_list, struct completion_result)
9575 (class completion_tracker): New.
9576 (complete_line): Add completion_tracker parameter.
9577 (readline_line_completion_function): Delete.
9578 (gdb_rl_attempted_completion_function): New.
9579 (noop_completer, filename_completer, expression_completer)
9580 (location_completer, symbol_completer, command_completer)
9581 (signal_completer, reg_or_group_completer): Update prototypes.
9582 (completion_tracker_t, new_completion_tracker)
9583 (make_cleanup_free_completion_tracker): Delete.
9584 (enum maybe_add_completion_enum): Delete.
9585 (maybe_add_completion): Delete.
9586 (throw_max_completions_reached_error): Delete.
9587 * corefile.c (complete_set_gnutarget): Adjust to work with a
9588 completion_tracker instead of a VEC.
9589 * cp-abi.c (cp_abi_completer): Adjust to work with a
9590 completion_tracker instead of a VEC.
9591 * d-lang.c (d_language_defn): Adjust.
9592 * disasm.c (disassembler_options_completer): Adjust to work with a
9593 completion_tracker instead of a VEC.
9594 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9595 (f_collect_symbol_completion_matches): ... this. Adjust to work
9596 with a completion_tracker instead of a VEC.
9597 (f_language_defn): Adjust.
9598 * go-lang.c (go_language_defn): Adjust.
9599 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9600 Adjust to work with a completion_tracker instead of a VEC.
9601 * infrun.c (handle_completer): Likewise.
9602 * interps.c (interpreter_completer): Likewise.
9603 * interps.h (interpreter_completer): Likewise.
9604 * language.c (unknown_language_defn, auto_language_defn)
9605 (local_language_defn): Adjust.
9606 * language.h (language_defn::la_make_symbol_completion_list):
9607 Rename to ...
9608 (language_defn::la_collect_symbol_completion_matches): ... this
9609 and adjust to work with a completion_tracker instead of a VEC.
9610 * m2-lang.c (m2_language_defn): Adjust.
9611 * objc-lang.c (objc_language_defn): Adjust.
9612 * opencl-lang.c (opencl_language_defn): Adjust.
9613 * p-lang.c (pascal_language_defn): Adjust.
9614 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9615 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9616 with a completion_tracker.
9617 * rust-lang.c (rust_language_defn): Adjust.
9618 * symtab.c (free_completion_list, do_free_completion_list)
9619 (return_val, completion_tracker): Delete.
9620 (completion_list_add_name, completion_list_add_symbol)
9621 (completion_list_add_msymbol, completion_list_objc_symbol)
9622 (completion_list_add_fields, add_symtab_completions): Add
9623 completion_tracker parameter and use it.
9624 (default_make_symbol_completion_list_break_on_1): Rename to...
9625 (default_collect_symbol_completion_matches_break_on): ... this.
9626 Add completion_tracker parameter and use it instead of allocating
9627 a completion tracker here.
9628 (default_make_symbol_completion_list_break_on): Delete old
9629 implementation.
9630 (default_make_symbol_completion_list): Delete.
9631 (default_collect_symbol_completion_matches): New.
9632 (make_symbol_completion_list): Delete.
9633 (collect_symbol_completion_matches): New.
9634 (make_symbol_completion_type): Rename to ...
9635 (collect_symbol_completion_matches_type): ... this. Add
9636 completion_tracker parameter and use it instead of VEC.
9637 (make_file_symbol_completion_list_1): Rename to...
9638 (collect_file_symbol_completion_matches): ... this. Add
9639 completion_tracker parameter and use it instead of VEC.
9640 (make_file_symbol_completion_list): Delete.
9641 (add_filename_to_list): Use completion_list instead of a VEC.
9642 (add_partial_filename_data::list): Now a completion_list.
9643 (make_source_files_completion_list): Work with a completion_list
9644 instead of a VEC.
9645 * symtab.h: Include "completer.h".
9646 (default_make_symbol_completion_list_break_on)
9647 (default_make_symbol_completion_list, make_symbol_completion_list)
9648 (make_symbol_completion_type, make_file_symbol_completion_list)
9649 (make_source_files_completion_list): Delete.
9650 (default_collect_symbol_completion_matches_break_on)
9651 (default_collect_symbol_completion_matches)
9652 (collect_symbol_completion_matches)
9653 (collect_symbol_completion_matches_type)
9654 (collect_file_symbol_completion_matches)
9655 (make_source_files_completion_list): New.
9656 * top.c (init_main): Don't install a rl_completion_entry_function
9657 hook. Install a rl_attempted_completion_function hook instead.
9658 * tui/tui-layout.c (layout_completer): Adjust to work with a
9659 completion_tracker.
9660 * tui/tui-regs.c (tui_reggroup_completer):
9661 * tui/tui-win.c (window_name_completer, focus_completer)
9662 (winheight_completer): Adjust to work with a completion_tracker.
9663 * value.c: Include "completer.h".
9664 (complete_internalvar): Adjust to work with a completion_tracker.
9665 * value.h (complete_internalvar): Likewise.
9666
6e1dbf8c
PA
96672017-07-17 Pedro Alves <palves@redhat.com>
9668
9669 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9670 renames.
9671 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9672 comments to completer_ftype's declaration.
9673 <completer_handle_brkchars>: Change type to
9674 completer_handle_brkchars_ftype.
9675 * command.h (completer_ftype): Add describing comment and give
9676 names to parameters.
9677 (completer_ftype_void): Rename to ...
9678 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9679 (set_cmd_completer_handle_brkchars): Adjust.
9680 * completer.c (filename_completer_handle_brkchars): New function.
9681 (complete_line_internal_normal_command): New function, factored
9682 out from ...
9683 (complete_line_internal): ... here.
9684 (command_completer_handle_brkchars)
9685 (default_completer_handle_brkchars)
9686 (completer_handle_brkchars_func_for_completer): New functions.
9687 * completer.h (set_gdb_completion_word_break_characters): Delete
9688 declaration.
9689 (completer_handle_brkchars_func_for_completer): New declaration.
9690 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9691 completer_handle_brkchars_func_for_completer.
9692
78b13106
PA
96932017-07-17 Pedro Alves <palves@redhat.com>
9694
9695 * completer.c (symbol_completer): New function, based on
9696 make_symbol_completion_list_fn.
9697 * completer.h (symbol_completer): New declaration.
9698 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9699 * python/py-cmd.c (completers): Adjust.
9700 * symtab.c (make_symbol_completion_list_fn): Delete.
9701 * symtab.h (make_symbol_completion_list_fn): Delete.
9702 * cli/cli-decode.c (add_cmd): Adjust.
9703
bbf2f4df
PA
97042017-07-17 Pedro Alves <palves@redhat.com>
9705
9706 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9707 * dwarf2read.c: Include "filename-seen-cache.h".
9708 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9709 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9710 * filename-seen-cache.c: New file.
9711 * filename-seen-cache.h: New file.
9712 * symtab.c: Include "filename-seen-cache.h".
9713 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9714 (create_filename_seen_cache, clear_filename_seen_cache)
9715 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9716 to filename-seen-cache.h/filename-seen-cache.c.
9717 (output_source_filename, sources_info)
9718 (maybe_add_partial_symtab_filename)
9719 (make_source_files_completion_list): Adjust to use
9720 filename_seen_cache.
9721
330cdd98
PA
97222017-07-17 Pedro Alves <palves@redhat.com>
9723
9724 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9725 fields.
9726 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9727 dwarf2_debug_sections*)): New.
9728 (dwarf2_per_objfile::dwarf2_per_objfile(const
9729 dwarf2_per_objfile&)): Declare as deleted.
9730 (dwarf2_per_objfile::operator=): Declare as deleted.
9731 (dwarf2_per_objfile::dwarf2_per_objfile)
9732 (dwarf2_per_objfile::~dwarf2_per_objfile)
9733 (dwarf2_per_objfile::free_cached_comp_units): New.
9734 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9735 ctor. Call dwarf2_per_objfile's ctor manually.
9736 (dwarf2_locate_sections): Deleted/refactored as ...
9737 (dwarf2_per_objfile::locate_sections): ... this new method.
9738 (free_cached_comp_units): Defer to
9739 dwarf2_per_objfile::free_cached_comp_units.
9740 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9741
8880f2a9
TT
97422017-07-14 Tom Tromey <tom@tromey.com>
9743
9744 PR rust/21764:
9745 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9746 parameter.
9747 <UNOP_SIZEOF>: Split into separate case.
9748 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9749
65547233
TT
97502017-07-14 Tom Tromey <tom@tromey.com>
9751
9752 PR rust/21763:
9753 * symtab.c (symbol_matches_domain): Add language_rust to special
9754 case.
9755 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9756 treat LOC_TYPEDEF symbols as variables.
9757
8f14146e
PA
97582017-07-14 Pedro Alves <palves@redhat.com>
9759
9760 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9761 symtabs matching all symtabs with SRCFILE as file name instead of
9762 only considering the first hit, with lookup_symtab.
9763
2347965c
SM
97642017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9765
9766 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9767 operator_name parameters.
9768 (gen_expr): Update function call.
9769
40f4af28
SM
97702017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9771
9772 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9773 parameter.
9774 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9775 Likewise.
9776 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9777 parameter, use agent_expr::gdbarch instead, update function
9778 calls.
9779 (locexpr_tracepoint_var_ref): Likewise.
9780 (loclist_tracepoint_var_ref): Likewise.
9781 * ax-gdb.c (gen_trace_static_fields): Likewise.
9782 (gen_traced_pop): Likewise.
9783 (gen_frame_args_address): Likewise.
9784 (gen_frame_locals_address): Likewise.
9785 (gen_var_ref): Likewise.
9786 (gen_struct_ref_recursive): Likewise.
9787 (gen_static_field): Likewise.
9788 (gen_maybe_namespace_elt): Likewise.
9789 (gen_expr): Likewise.
9790 (gen_trace_for_var): Likewise.
9791 (gen_trace_for_expr): Likewise.
9792 (gen_trace_for_return_address): Likewise.
9793
053f8057
SM
97942017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9795
9796 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9797 parameter.
9798 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9799
6661ad48
SM
98002017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9801
9802 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9803 from ax, update calls.
9804 (gen_usual_arithmetic): Likewise.
9805 (gen_integral_promotions): Likewise.
9806 (gen_bitfield_ref): Likewise.
9807 (gen_primitive_field): Likewise.
9808 (gen_struct_ref_recursive): Likewise.
9809 (gen_struct_ref): Likewise.
9810 (gen_maybe_namespace_elt): Likewise.
9811 (gen_struct_elt_for_reference): Likewise.
9812 (gen_namespace_elt): Likewise.
9813 (gen_aggregate_elt_ref): Likewise.
9814 (gen_expr): Get gdbarch from ax, update calls.
9815 (gen_expr_binop_rest): Likewise.
9816
c55a47e7
PA
98172017-07-13 Pedro Alves <palves@redhat.com>
9818
9819 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9820 as default tdesc.
9821 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9822 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9823 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9824 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9825 tdep.
9826 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9827 Get final tdesc from the tdep.
9828 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9829 default tdesc.
9830 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9831 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9832 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9833 Use it as default tdesc.
9834 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9835 down to amd_init_abi. No longer handle fallback tdesc here.
9836 * amd64-tdep.h (tdesc_x32): Declare.
9837 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9838 parameter.
9839 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9840 as default tdesc.
9841
55efceab
AA
98422017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9843
9844 * s390-linux-tdep.c (s390_process_record): Add support for
9845 instructions new in arch12.
9846
0aa37b65
JB
98472017-07-11 John Baldwin <jhb@FreeBSD.org>
9848
9849 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9850 PT_GETFSBASE and PT_GETGSBASE.
9851 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9852 PT_SETGSBASE.
9853
48aeef91
JB
98542017-07-11 John Baldwin <jhb@FreeBSD.org>
9855
9856 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9857 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9858 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9859 those rules.
9860 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9861 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9862 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9863 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9864 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9865 * features/i386/amd64.xml: Add 64bit-segments.xml.
9866 * features/i386/amd64-avx-avx512.c: Regenerated.
9867 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9868 * features/i386/amd64-avx-mpx.c: Regenerated.
9869 * features/i386/amd64-avx.c: Regenerated.
9870 * features/i386/amd64-mpx.c: Regenerated.
9871 * features/i386/amd64.c: Regenerated.
9872 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9873 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9874 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9875 * regformats/i386/amd64-avx.dat: Regenerated.
9876 * regformats/i386/amd64-mpx.dat: Regenerated.
9877 * regformats/i386/amd64.dat: Regenerated.
9878
77c501bc
YQ
98792017-07-10 Yao Qi <yao.qi@linaro.org>
9880
9881 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9882 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9883
6dc8d757
AK
98842017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9885
9886 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9887 unsetenv.
9888 * gnulib/aclocal.m4: Regenerate.
9889 * gnulib/config.in: Regenerate.
9890 * gnulib/configure: Regenerate.
9891 * gnulib/import/Makefile.am: Regenerate.
9892 * gnulib/import/Makefile.in: Regenerate.
9893 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9894 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9895 * gnulib/import/m4/environ.m4: New file.
9896 * gnulib/import/m4/setenv.m4: New file.
9897 * gnulib/import/setenv.c: New file.
9898 * gnulib/import/unsetenv.c: New file.
9899
266934d1
SM
99002017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9901
9902 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9903 address when op is DW_OP_addr.
9904
03278692
TT
99052017-07-09 Tom Tromey <tom@tromey.com>
9906
9907 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9908 check and apply to outer type.
9909
4b654465
JB
99102017-07-07 John Baldwin <jhb@FreeBSD.org>
9911
9912 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9913 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9914 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9915 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9916
2af9fc44
JB
99172017-07-07 John Baldwin <jhb@FreeBSD.org>
9918
9919 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9920
382b69bb
JB
99212017-07-07 John Baldwin <jhb@FreeBSD.org>
9922
9923 * corelow.c (get_core_siginfo): Remove.
9924 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9925 instead of get_core_siginfo.
9926 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9927 * gdbarch.h: Re-generate.
9928 * gdbarch.c: Re-generate.
9929 * linux-tdep.c (linux_core_xfer_siginfo): New.
9930 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9931
6e5eab33
JB
99322017-07-07 John Baldwin <jhb@FreeBSD.org>
9933
9934 * corelow.c (thread_section_name): Move to ...
9935 * gdbcore.h (thread_section_name): ... here.
9936
929edea9
JB
99372017-07-07 John Baldwin <jhb@FreeBSD.org>
9938
9939 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9940 (struct siginfo32): New.
9941 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9942 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9943 via ptrace(PT_LWPINFO).
9944
762c974a
JB
99452017-07-07 John Baldwin <jhb@FreeBSD.org>
9946
9947 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9948 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9949 (fbsd_get_siginfo_type): New.
9950 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9951 (_initialize_fbsd_tdep): New.
9952
33c5cd75
DB
99532017-07-06 David Blaikie <dblaikie@gmail.com>
9954
9955 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9956 a singular dwo_unit*) to support multiple CUs in the same way that
9957 multiple TUs are supported.
9958 (create_cus_hash_table): Replace create_dwo_cu with a function for
9959 parsing multiple CUs from a DWO file.
9960 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9961 create_dwo_cu.
9962 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9963 htab_find, rather than comparing the signature to a singleton CU in
9964 the dwo_file.
9965
8455d262
PA
99662017-07-06 Pedro Alves <palves@redhat.com>
9967
9968 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9969
4da3eb35
PA
99702017-07-04 Pedro Alves <palves@redhat.com>
9971
9972 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9973 * gdbtypes.h (TYPE_STATIC): Delete.
9974 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9975 is_synchronized, is_native>: Delete.
9976 <dummy>: Bump.
9977 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9978 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9979 (TYPE_FN_FIELD_ABSTRACT): Delete.
9980
5bfd255c
SM
99812017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9982
9983 * buffer.h (buffer_finish): Fix spelling mistakes.
9984
25c54127
EZ
99852017-07-01 Eli Zaretskii <eliz@gnu.org>
9986
9987 * .dir-locals.el: Automatically switch to C-style comments in
9988 versions of Emacs that support the feature.
9989
dc4bde35
SDJ
99902017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9991 Pedro Alves <palves@redhat.com>
9992
9993 PR cli/21688
9994 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9995 (process_next_line): New variable 'inline_cmd'.
9996 Adjust 'if' clauses for "python", "compile" and "guile" to use
9997 'command_name_equals' and check for '!inline_cmd'.
9998
51ed89aa
SDJ
99992017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10000
10001 PR cli/21688
10002 * cli/cli-script.c (command_name_equals_not_inline): New function.
10003 (process_next_line): Adjust 'if' clauses for "python", "compile"
10004 and "guile" to use command_name_equals_not_inline.
10005
eb17d413
PA
100062017-06-29 Pedro Alves <palves@redhat.com>
10007
10008 * completer.c (expression_completer): Call
10009 linespec_location_completer instead of location_completer.
10010
195bcdd5
PA
100112017-06-29 Pedro Alves <palves@redhat.com>
10012
10013 * completer.c (expression_completer): Remove code that recomputes
10014 'text' from 'word'.
10015
adc764e7
YQ
100162017-06-29 Yao Qi <yao.qi@linaro.org>
10017
10018 * regformats/regdat.sh: Generate code with
10019 "ifndef IN_PROCESS_AGENT".
10020
6e75794e
PA
100212017-06-28 Pedro Alves <palves@redhat.com>
10022
10023 * command.h: Include "common/scoped_restore.h".
10024
bc491f2e
YQ
100252017-06-28 Yao Qi <yao.qi@linaro.org>
10026
10027 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10028 instead of obstack_grow.
10029
41664b45
DG
100302017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10031
10032 PR gdb/21337
10033 * symfile.c (reread_symbols): Call objfiles_changed just before
10034 read_symbols.
10035
6da67eb1
PA
100362017-06-27 Pedro Alves <palves@redhat.com>
10037
10038 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10039 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10040 (completion_list_add_symbol, completion_list_add_msymbol):
10041 ... these new functions.
10042 (add_symtab_completions)
10043 (default_make_symbol_completion_list_break_on_1): Adjust.
10044
23732b1e
PA
100452017-06-27 Pedro Alves <palves@redhat.com>
10046
10047 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10048 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10049 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10050 dtor.
10051 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10052 'storage_obstack' field an auto_obstack. In-class initialize all
10053 non-bitfield fields. Make minsyms_read bool.
10054 * symfile.c (read_symbols): Adjust.
10055
a4d1e79a
AH
100562017-06-27 Alan Hayward <alan.hayward@arm.com>
10057
10058 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10059 (gdbsim_store_register): Likewise.
10060
8268c778
PA
100612017-06-27 Pedro Alves <palves@redhat.com>
10062
10063 * c-exp.y (name_obstack): Now an auto_obstack.
10064 (yylex): Use auto_obstack::clear.
10065 (c_parse): Use auto_obstack::clear instead of reinitializing and
10066 freeing the obstack.
10067 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10068 * d-exp.y (name_obstack): Now an auto_obstack.
10069 (yylex): Use auto_obstack::clear.
10070 (d_parse): Use auto_obstack::clear instead of reinitializing and
10071 freeing the obstack.
10072 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10073 auto_obstack.
10074 * dwarf2read.c (create_addrmap_from_index)
10075 (dwarf2_build_psymtabs_hard)
10076 (update_enumeration_type_from_children): Likewise.
10077 * gdb_obstack.h (auto_obstack): New type.
10078 * go-exp.y (name_obstack): Now an auto_obstack.
10079 (build_packaged_name): Use auto_obstack::clear.
10080 (go_parse): Use auto_obstack::clear instead of reinitializing and
10081 freeing the obstack.
10082 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10083 auto_obstack.
10084 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10085 * rust-exp.y (work_obstack): Now an auto_obstack.
10086 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10087 reinitializing and freeing the obstack.
10088 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10089 (host_char_to_target): Use auto_obstack.
10090 * utils.h (make_cleanup_obstack_free): Delete declaration.
10091 * valprint.c (generic_emit_char, generic_printstr): Use
10092 auto_obstack.
10093
db665f42
SM
100942017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10095
10096 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10097 thread.
10098 (darwin_init_thread_list): Don't update dummy thread.
10099 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10100
873c0814
SM
101012017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10102
10103 * record-full.c (netorder16): Remove.
10104
8b5a7a6e
SM
101052017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10106
10107 * common/diagnostics.h: Define macros for GCC.
10108 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10109 * common/vec.h: Include diagnostics.h.
10110 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10111 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10112 warning.
10113
d1435379
SM
101142017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10115
10116 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10117 New macro.
10118 * ada-lex.l: Ignore deprecated register warnings.
10119
cc75e0fd
SM
101202017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10121
10122 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10123 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10124
07809eaf
SM
101252017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10126
10127 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10128 its own line.
10129
f076f034
SM
101302017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10131
10132 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10133
0dd5cbc5
AH
101342017-06-23 Alan Hayward <alan.hayward@arm.com>
10135
10136 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10137 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10138 (xtensa_register_read_masked): Likewise.
10139
d4c6ce5b
SDJ
101402017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10141
10142 * common/environ.c (gdb_environ::unset): Update comment.
10143
16892a03
AH
101442017-06-22 Alan Hayward <alan.hayward@arm.com>
10145
10146 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10147 registers.
10148
d7dcbefc
AH
101492017-06-22 Alan Hayward <alan.hayward@arm.com>
10150
10151 * record-full.c (record_full_exec_insn): Use byte_vector.
10152
b30ff123
YQ
101532017-06-22 Yao Qi <yao.qi@linaro.org>
10154
10155 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10156 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10157
4fa847d7
AH
101582017-06-22 Alan Hayward <alan.hayward@arm.com>
10159
10160 * remote.c (cached_reg): Move from here...
10161 * regcache.h (cached_reg): ...to here.
10162 * python/py-unwind.c (struct reg_info): Remove.
10163 (cached_frame_info): Use cached_reg_t.
10164 (pyuw_prev_register): Likewise.
10165 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10166 (pyuw_dealloc_cache): Free all registers.
10167
f4906a9a
PA
101682017-06-22 Pedro Alves <palves@redhat.com>
10169 Simon Marchi <simon.marchi@ericsson.com>
10170
10171 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10172 warning.
10173 * common/diagnostics.h: New file.
10174
b45a1208
PA
101752017-06-22 Pedro Alves <palves@redhat.com>
10176
10177 * common/agent.h: Add include guards.
10178
e4da2c61
SM
101792017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10180
10181 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10182 talk about addressable units instead of bytes.
10183
96160d60
SDJ
101842017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10185
10186 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10187 of '::const_iterator'.
10188
9a6c7d9c
SDJ
101892017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10190
10191 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10192 'unittests/environ-selftests.c'.
10193 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10194 * charset.c (find_charset_names): Declare object 'iconv_env'.
10195 Update code to use 'iconv_env' object. Remove call to
10196 'free_environ'.
10197 * common/environ.c: Include <utility>.
10198 (make_environ): Delete function.
10199 (free_environ): Delete function.
10200 (gdb_environ::clear): New function.
10201 (gdb_environ::operator=): New function.
10202 (gdb_environ::get): Likewise.
10203 (environ_vector): Delete function.
10204 (set_in_environ): Delete function.
10205 (gdb_environ::set): New function.
10206 (unset_in_environ): Delete function.
10207 (gdb_environ::unset): New function.
10208 (gdb_environ::envp): Likewise.
10209 * common/environ.h: Include <vector>.
10210 (struct gdb_environ): Delete; transform into...
10211 (class gdb_environ): ... this class.
10212 (free_environ): Delete prototype.
10213 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10214 environ_vector): Likewise.
10215 * infcmd.c (run_command_1): Update code to call
10216 'envp' from 'gdb_environ' class.
10217 (environment_info): Update code to call methods from 'gdb_environ'
10218 class.
10219 (unset_environment_command): Likewise.
10220 (path_info): Likewise.
10221 (path_command): Likewise.
10222 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10223 (inferior::inferior): Initialize 'environment' using the host's
10224 information.
10225 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10226 Include "environ.h".
10227 (class inferior) <environment>: Change type from 'struct
10228 gdb_environ' to 'gdb_environ'.
10229 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10230 methods from 'gdb_environ' class.
10231 * solib.c (solib_find_1): Likewise
10232 * unittests/environ-selftests.c: New file.
10233
75c554cf
YQ
102342017-06-20 Yao Qi <yao.qi@linaro.org>
10235
10236 * features/i386/i386-linux.xml: Exchange the order of including
10237 32bit-linux.xml and 32bit-sse.xml.
10238 * features/i386/i386-linux.c: Regenerated.
10239
72ddacb7
YQ
102402017-06-20 Yao Qi <yao.qi@linaro.org>
10241
10242 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10243 Delete copy ctor and assignment operator.
10244 (tdesc_type): Likewise.
10245 (tdesc_feature): Likewise.
10246 (tdesc_free_reg): Remove.
10247 (tdesc_create_reg): Use new.
10248 (tdesc_free_type): Remove.
10249 (tdesc_create_vector): Use new.
10250 (tdesc_create_union): Likewise.
10251 (tdesc_create_flags): Likewise.
10252 (tdesc_create_enum): Likewise.
10253 (tdesc_free_feature): Delete.
10254 (free_target_description): Use delete.
10255
325c9fd4
JB
102562017-06-19 John Baldwin <jhb@FreeBSD.org>
10257
10258 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10259 registers.
10260
16b7a719
PA
102612017-06-19 Pedro Alves <palves@redhat.com>
10262
10263 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10264 after gdb::unlinker.
10265
1c8e01c9
SDJ
102662017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10267
10268 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10269 gdb_environ to access an environment variable.
10270
ffce45d2
TP
102712017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10272
10273 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10274 gdb_byte*.
10275
1d4fbac9
SM
102762017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10277
10278 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10279
8465943a
SM
102802017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10281
10282 * configure: Re-generate.
10283 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10284
3e019bdc
SM
102852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10286
10287 * configure: Re-generate.
10288 * warning.m4: Pass -Werror to compiler when checking for
10289 supported warning flags.
10290
cf0dd6f0
SM
102912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10292
10293 * Makefile.in (COMPILE.pre): Add "-x c++".
10294
6f98355c
YQ
102952017-06-16 Alan Hayward <alan.hayward@arm.com>
10296 Pedro Alves <palves@redhat.com>
10297 Yao Qi <yao.qi@linaro.org>
10298
10299 * defs.h (RequireLongest): New.
10300 (extract_integer): Declare function template.
10301 (extract_signed_integer): Remove the declaration, but define it
10302 static inline.
10303 (extract_unsigned_integer): Likewise.
10304 (store_integer): Declare function template.
10305 (store_signed_integer): Remove the declaration, but define it
10306 static inline.
10307 (store_unsigned_integer): Likewise.
10308 * findvar.c (extract_integer): New function template.
10309 (extract_signed_integer): Remove.
10310 (extract_unsigned_integer): Remove.
10311 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10312 instantiations.
10313 (store_integer): New function template.
10314 (store_signed_integer): Remove.
10315 (store_unsigned_integer): Remove.
10316 (store_integer): Explicit instantiations.
10317 * regcache.c (regcache_raw_read_signed): Update.
10318 (regcache::raw_read): New function.
10319 (regcache::raw_read_signed): Remove.
10320 (regcache::raw_read_unsigned): Remove.
10321 (regcache_raw_read_unsigned): Update.
10322 (regcache_raw_write_unsigned): Update.
10323 (regcache::raw_write_signed): Remove.
10324 (regcache::raw_write): New function.
10325 (regcache_cooked_read_signed): Update.
10326 (regcache::raw_write_unsigned): Remove.
10327 (regcache::cooked_read_signed): Remove.
10328 (regcache_cooked_read_unsigned): Update.
10329 (regcache::cooked_read_unsigned): Remove.
10330 (regcache_cooked_write_signed): Update.
10331 (regcache_cooked_write_unsigned): Update.
10332 * regcache.h (regcache) <raw_read_signed>: Remove.
10333 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10334 <raw_read, raw_write>: New.
10335 <cooked_read_signed, cooked_write_signed>: Remove.
10336 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10337 <cooked_read, cooked_write>: New.
10338 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10339 (sh64_pseudo_register_write): Update.
10340
a87dc45a
AK
103412017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10342
10343 * arc-tdep.c (arc_disassembler_options): New variable.
10344 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10345 of default_print_insn.
10346 (arc_delayed_print_insn): Set info->section when needed,
10347 use default_print_insn to retrieve a disassembler.
10348
45159d6a
SDJ
103492017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10350
10351 PR gdb/21574
10352 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10353 to mention $SHELL and startup-with-shell.
10354
b46c4cf0
MF
103552017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10356
10357 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10358
6394c606
YQ
103592017-06-14 Yao Qi <yao.qi@linaro.org>
10360
10361 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10362 default_print_insn instead of print_insn_aarch64.
10363 * arm-tdep.c (gdb_print_insn_arm): Call
10364 default_print_insn instead of print_insn_big_arm
10365 and print_insn_little_arm.
10366 * i386-tdep.c (i386_print_insn): Call default_print_insn
10367 instead of print_insn_i386.
10368 * ia64-tdep.c (ia64_print_insn): Call
10369 default_print_insn instead of print_insn_ia64.
10370 * mips-tdep.c (gdb_print_insn_mips): Call
10371 default_print_insn instead of print_insn_big_mips
10372 and print_insn_little_mips.
10373 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10374 instead of print_insn_spu.
10375
d5722aa2
PA
103762017-06-14 Pedro Alves <palves@redhat.com>
10377
10378 * ada-lang.c: Include "common/byte-vector.h".
10379 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10380 * charset.c (wchar_iterator::iterate): Resize the vector instead
10381 of reserving it.
10382 * common/byte-vector.h: Include "common/def-vector.h".
10383 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10384 * cli/cli-dump.c: Include "common/byte-vector.h".
10385 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10386 * common/byte-vector.h: New file.
10387 * common/def-vector.h: New file.
10388 * common/default-init-alloc.h: New file.
10389 * dwarf2loc.c: Include "common/byte-vector.h".
10390 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10391 instead of reserving it.
10392 * dwarf2read.c: Include "common/byte-vector.h".
10393 (data_buf::m_vec): Now a gdb::byte_vector.
10394 * gdb_regex.c: Include "common/def-vector.h".
10395 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10396 * mi/mi-main.c: Include "common/byte-vector.h".
10397 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10398 * printcmd.c: Include "common/byte-vector.h".
10399 (print_scalar_formatted): Use gdb::byte_vector.
10400 * valprint.c: Include "common/byte-vector.h".
10401 (maybe_negate_by_bytes, print_decimal_chars): Use
10402 gdb::byte_vector.
10403
01ec7a27
SM
104042017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10405
10406 * darwin-nat.c: Include "nat/fork-inferior.h".
10407
848d9074
SM
104082017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10409
10410 * configure.nat: Factor out Darwin bits that are not
10411 architecture-specific. Add fork-inferior.o.
10412
3b912944
SM
104132017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10414
10415 * configure.nat: Factor out AIX bits that are not
10416 architecture-specific. Add fork-inferior.o.
10417
55acdf22
AA
104182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10419
10420 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10421 (read_pieced_value, write_pieced_value): ...here. Reduce to
10422 wrappers that just call rw_pieced_value.
10423
f65e2044
AA
104242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10425
10426 * dwarf2loc.c (write_pieced_value): When writing the data for a
10427 memory piece, use write_memory_with_notification instead of
10428 write_memory.
10429
23f945bf
AA
104302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10431
10432 * valops.c (read_value_memory): Change embedded_offset to
10433 represent a bit offset instead of a byte offset.
10434 * value.h (read_value_memory): Adjust comment.
10435
f236533e
AA
104362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10437
10438 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10439 dest_offset_bits and source_offset_bits.
10440 (write_pieced_value): Likewise.
10441
65d84b76
AA
104422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10443
10444 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10445 given by DW_OP_bit_piece.
10446 (write_pieced_value): Likewise.
10447
242d31ab
AA
104482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10449
10450 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10451 some other preparations to the places where sufficient information
10452 is available.
10453 (write_pieced_value): Likewise.
10454
03c8af18
AA
104552017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10456
10457 * dwarf2loc.c (bits_to_bytes): New function.
10458 (read_pieced_value): Fix offset calculations for register pieces
10459 on big-endian targets.
10460 (write_pieced_value): Likewise.
10461
840989c1
AA
104622017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10463
10464 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10465 (write_pieced_value): Likewise.
10466
359b19bb
AA
104672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10468
10469 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10470 transfer the source value's least significant bits, instead of its
10471 lowest-addressed ones. Rename type_len to max_offset.
10472 (read_pieced_value): Mirror above changes to write_pieced_value as
10473 applicable.
10474
07c9ca3b
AA
104752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10476
10477 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10478 truncate full bytes from dest_offset_bits before using it as an
10479 offset into the buffer.
10480
f1cc9874
AA
104812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10482
10483 * dwarf2loc.c (write_pieced_value): Include transfer size in
10484 byte-wise check.
10485
cdaac320
AA
104862017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10487
10488 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10489 calculation of this_size.
10490
af547a96
AA
104912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10492
10493 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10494 when targeting a bit-field.
10495 (write_pieced_value): Likewise.
10496
ddd7882a
AA
104972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10498
10499 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10500 (allocate_piece_closure): Drop addr_size parameter.
10501 (dwarf2_evaluate_loc_desc_full): Adjust call to
10502 allocate_piece_closure.
10503
e9352324
AA
105042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10505
10506 PR gdb/21226
10507 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10508 the LSB end, independent of endianness.
10509
d5d1163e
AA
105102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10511
10512 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10513 size capping.
10514
032bb6ea
YQ
105152017-06-13 Yao Qi <yao.qi@linaro.org>
10516
10517 * mips-linux-nat.c: Move include features/mips*-linux.c to
10518 mips-linux-tdep.c.
10519 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10520 to mips-linux-tdep.c.
10521 * mips-linux-tdep.c: Include features/mips*-linux.c
10522 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10523 functions.
10524 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10525 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10526 (tdesc_mips64_dsp_linux): Declare.
10527
f12f6bad
TT
105282017-06-12 Tom Tromey <tom@tromey.com>
10529
10530 * valprint.h (val_print_type_code_int): Remove.
10531 * valprint.c (generic_val_print_int): Always call
10532 val_print_scalar_formatted.
10533 (val_print_type_code_int): Remove.
10534 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10535 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10536 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10537 * ada-valprint.c (ada_val_print_num): Use
10538 val_print_scalar_formatted.
10539
d9109c80
TT
105402017-06-12 Tom Tromey <tom@tromey.com>
10541
10542 * printcmd.c (print_scalar_formatted): Unify the two switches.
10543 Don't convert scalars to LONGEST.
10544
4ac0cb1c
TT
105452017-06-12 Tom Tromey <tom@tromey.com>
10546
10547 PR exp/16225:
10548 * valprint.h (print_decimal_chars): Update.
10549 * valprint.c (maybe_negate_by_bytes): New function.
10550 (print_decimal_chars): Add "is_signed" argument.
10551 * printcmd.c (print_scalar_formatted): Update.
10552
30a25466
TT
105532017-06-12 Tom Tromey <tom@tromey.com>
10554
10555 PR exp/16225:
10556 * valprint.h (print_binary_chars, print_hex_chars): Update.
10557 * valprint.c (val_print_type_code_int): Update.
10558 (print_binary_chars): Add "zero_pad" argument.
10559 (emit_octal_digit): New function.
10560 (print_octal_chars): Don't zero-pad.
10561 (print_decimal_chars): Likewise.
10562 (print_hex_chars): Add "zero_pad" argument.
10563 * sh64-tdep.c (sh64_do_fp_register): Update.
10564 * regcache.c (regcache::dump): Update.
10565 * printcmd.c (print_scalar_formatted): Update.
10566 * infcmd.c (default_print_one_register_info): Update.
10567
b3464d03
PA
105682017-06-12 Pedro Alves <palves@redhat.com>
10569 Alan Hayward <alan.hayward@arm.com>
10570
10571 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10572 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10573 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10574 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10575 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10576
4b76cda9
PA
105772017-06-12 Pedro Alves <palves@redhat.com>
10578
10579 * dwarf2read.c (mapped_symtab::data): Now a vector of
10580 symtab_index_entry instead of vector of
10581 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10582 whether an element's name is NULL instead of checking whether the
10583 element itself is NULL.
10584 (find_slot): Change return type. Adjust.
10585 (hash_expand, , add_index_entry, uniquify_cu_indices)
10586 (write_hash_table): Adjust.
10587
e8f8bcb3
PA
105882017-06-12 Pedro Alves <palves@redhat.com>
10589
10590 * dwarf2read.c (recursively_count_psymbols): New function.
10591 (write_psymtabs_to_index): Call it to compute number of psyms and
10592 pass estimate size of psyms_seen to unordered_set's ctor.
10593
70a1152b
PA
105942017-06-12 Pedro Alves <palves@redhat.com>
10595
10596 * dwarf2read.c (write_hash_table): Check if key already exists
10597 before emplacing.
10598
c2f134ac
PA
105992017-06-12 Pedro Alves <palves@redhat.com>
10600
10601 * dwarf2read.c (data_buf::append_space): Rename to...
10602 (data_buf::grow): ... this, and make private. Adjust all callers.
10603 (data_buf::append_uint): New method.
10604 (add_address_entry, write_one_signatured_type)
10605 (write_psymtabs_to_index): Use it.
10606
a81e6d4d
PA
106072017-06-12 Pedro Alves <palves@redhat.com>
10608
10609 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10610 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10611 (data_buf::file_write): Call ::fwrite directly.
10612
6fd931f2
PA
106132017-06-12 Pedro Alves <palves@redhat.com>
10614
10615 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10616 std::vector::erase.
10617
bc8f2430
JK
106182017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 Code cleanup: C++ify .gdb_index producer.
10621 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10622 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10623 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10624 (create_strtab, add_string): Remove.
10625 (file_write, data_buf): New.
10626 (struct symtab_index_entry): Use std::vector for cu_indices.
10627 (struct mapped_symtab): Use std::vector for data.
10628 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10629 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10630 Remove.
10631 (find_slot): Change return type. Update it to the new data structures.
10632 (hash_expand, add_index_entry): Update it to the new data structures.
10633 (offset_type_compare): Remove.
10634 (uniquify_cu_indices): Update it to the new data structures.
10635 (c_str_view, c_str_view_hasher, vector_hasher): New.
10636 (add_indices_to_cpool): Remove.
10637 (write_hash_table): Update it to the new data structures.
10638 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10639 (eq_psymtab_cu_index): Remove.
10640 (psym_index_map): New typedef.
10641 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10642 reference and std::unordered_map for cu_index_htab.
10643 (add_address_entry, add_address_entry_worker, write_address_map)
10644 (write_psymbols): Update it to the new data structures.
10645 (write_obstack): Remove.
10646 (struct signatured_type_index_data): Change types_list to a data_buf
10647 reference and psyms_seen to a std::unordered_set reference.
10648 (write_one_signatured_type, recursively_write_psymbols)
10649 (write_psymtabs_to_index): Update it to the new data structures.
10650
c4dcb155
SM
106512017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10652
10653 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10654 separate-debug-file commands.
10655 * symfile.h (separate_debug_file_debug): New global.
10656 * symfile.c (separate_debug_file_debug): New global.
10657 (separate_debug_file_exists, find_separate_debug_file): Add
10658 debug output.
10659 (_initialize_symfile): Add "set debug separate-debug-file"
10660 command.
10661 * build-id.c (build_id_to_debug_bfd,
10662 find_separate_debug_file_by_buildid): Add debug output.
10663
6d45d4b4
SM
106642017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10665
10666 * gdbarch.sh (displaced_step_free_closure): Remove.
10667 * gdbarch.h, gdbarch.c: Re-generate.
10668 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10669 displaced_step_free_closure.
10670 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10671 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10672 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10673 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10674 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10675 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10676 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10677 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10678 * infrun.c (displaced_step_clear): Call xfree instead of
10679 gdbarch_displaced_step_free_closure.
10680
2f91880f
SDJ
106812017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10682
10683 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10684 NULL".
10685
b8b6e72f
AH
106862017-06-08 Alan Hayward <alan.hayward@arm.com>
10687
10688 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10689 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10690 (mn10300_push_dummy_call): Likewise.
10691
5369082e
AH
106922017-06-08 Alan Hayward <alan.hayward@arm.com>
10693
10694 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10695
ff4ca5ac
AH
106962017-06-08 Alan Hayward <alan.hayward@arm.com>
10697
10698 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10699
aefd8b33
SDJ
107002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10701
10702 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10703 able to start inferiors using a shell.
10704 (New remote packets): Announce new packet "QStartupWithShell".
10705 * remote.c: Add PACKET_QStartupWithShell.
10706 (extended_remote_create_inferior): Handle new
10707 PACKET_QStartupWithShell.
10708 (remote_protocol_features) <QStartupWithShell>: New entry for
10709 PACKET_QStartupWithShell.
10710 (_initialize_remote): Call "add_packet_config_cmd" for
10711 QStartupShell.
10712
2090129c
SDJ
107132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10714 Pedro Alves <palves@redhat.com>
10715
10716 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10717 and "nat/fork-inferior.h".
10718 * common/common-inferior.h: New file, with contents from
10719 "gdb/inferior.h".
10720 * commom/common-utils.c: Include "common-utils.h".
10721 (stringify_argv): New function.
10722 * common/common-utils.h (stringify_argv): New prototype.
10723 * configure.nat: Add "fork-inferior.o" as a dependency for
10724 "*linux*", "fbsd*" and "nbsd*" hosts.
10725 * corefile.c (get_exec_file): Update comment.
10726 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10727 instead of "startup_inferior".
10728 (darwin_create_inferior): Call "add_thread_silent" after
10729 "fork_inferior".
10730 * fork-child.c: Cleanup unnecessary includes.
10731 (SHELL_FILE): Move to "common/common-fork-child.c".
10732 (environ): Likewise.
10733 (exec_wrapper): Initialize.
10734 (get_exec_wrapper): New function.
10735 (breakup_args): Move to "common/common-fork-child.c"; rename to
10736 "breakup_args_for_exec".
10737 (escape_bang_in_quoted_argument): Move to
10738 "common/common-fork-child.c".
10739 (saved_ui): New variable.
10740 (prefork_hook): New function.
10741 (postfork_hook): Likewise.
10742 (postfork_child_hook): Likewise.
10743 (gdb_startup_inferior): Likewise.
10744 (fork_inferior): Move to "common/common-fork-child.c". Update
10745 function to support gdbserver.
10746 (startup_inferior): Likewise.
10747 * gdbcore.h (get_exec_file): Remove declaration.
10748 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10749 instead of "startup_inferior". Call "add_thread_silent" after
10750 "fork_inferior".
10751 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10752 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10753 instead of "startup_inferior". Call "add_thread_silent" after
10754 "fork_inferior".
10755 * inferior.h: Include "common-inferior.h".
10756 (trace_start_error): Move to "common/common-utils.h".
10757 (trace_start_error_with_name): Likewise.
10758 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10759 (startup_inferior): Likewise.
10760 (gdb_startup_inferior): New prototype.
10761 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10762 * nat/fork-inferior.h: New file.
10763 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10764 instead of "startup_inferior". Call "add_thread_silent" after
10765 "fork_inferior".
10766 * target.h (target_terminal_init): Move prototype to
10767 "target/target.h".
10768 (target_terminal_inferior): Likewise.
10769 (target_terminal_ours): Likewise.
10770 * target/target.h (target_terminal_init): New prototype, moved
10771 from "target.h".
10772 (target_terminal_inferior): Likewise.
10773 (target_terminal_ours): Likewise.
10774 * utils.c (gdb_flush_out_err): New function.
10775
043a4934
SDJ
107762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10777
10778 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10779 * common/common-gdbthread.h: New file, with parts from
10780 "gdb/gdbthread.h".
10781 * gdbthread.h: Include "common-gdbthread.h".
10782 (switch_to_thread): Moved to "common/common-gdbthread.h".
10783
15652511
SDJ
107842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10785
10786 * Makefile.in (SFILES): Add "common/job-control.c".
10787 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10788 (COMMON_OBS): Add "job-control.o".
10789 * common/job-control.c: New file, with contents from
10790 "gdb/inflow.c".
10791 * common/job-control.h: New file, with contents from "terminal.h".
10792 * fork-child.c: Include "job-control.h".
10793 * inflow.c: Include "job-control.h".
10794 (gdb_setpgid): Move to "common/common-inflow.c".
10795 (_initialize_inflow): Move setting of "job_control" to
10796 "handle_job_control".
10797 * terminal.h (job_control): Moved to "common/common-terminal.h".
10798 (gdb_setpgid): Likewise.
10799 * top.c: Include "job_control.h".
10800 * utils.c: Likewise.
10801 (job_control): Moved to "job-control.c".
10802
2d7cc5c7
PA
108032017-06-07 Pedro Alves <palves@redhat.com>
10804
10805 * Makefile.in (SFILES): Add gdb_regex.c.
10806 (COMMON_OBS): Add gdb_regex.o.
10807 * ada-lang.c (ada_add_standard_exceptions)
10808 (ada_add_exceptions_from_frame, name_matches_regex)
10809 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10810 parameter type to compiled_regex. Adjust.
10811 (ada_exceptions_list): Use compiled_regex.
10812 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10813 std::unique_ptr<compiled_regex>.
10814 (exception_catchpoint::~exception_catchpoint): Remove regfree
10815 call.
10816 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10817 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10818 * breakpoint.c (solib_catchpoint::compiled): Now a
10819 std::unique_ptr<compiled_regex>.
10820 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10821 (check_status_catch_solib): Adjust to use compiled_regex.
10822 (add_solib_catchpoint): Adjust to use compiled_regex.
10823 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10824 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10825 compiled_regex reference. Adjust to use it.
10826 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10827 declaration. Include "gdb_regex.h".
10828 (apropos_cmd): Change regex parameter to compiled_regex reference.
10829 * gdb_regex.c: New file.
10830 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10831 declarations.
10832 (class compiled_regex): New.
10833 * linux-tdep.c: Include "common/gdb_optional.h".
10834 (struct mapping_regexes): New, factored out from
10835 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10836 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10837 gdb::optional and remove cleanups. Adjust to compiled_regex.
10838 * probe.c: Include "common/gdb_optional.h".
10839 (collect_probes): Use compiled_regex and gdb::optional and remove
10840 cleanups.
10841 * skip.c: Include "common/gdb_optional.h".
10842 (skiplist_entry::compiled_function_regexp): Now a
10843 gdb::optional<compiled_regex>.
10844 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10845 (free_skiplist_entry): Remove regfree call.
10846 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10847 compiled_regex and gdb::optional.
10848 * symtab.c: Include "common/gdb_optional.h".
10849 (search_symbols): Use compiled_regex and gdb::optional.
10850 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10851 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10852 to gdb_regex.c.
10853
50d6adef
AH
108542017-06-07 Alan Hayward <alan.hayward@arm.com>
10855
10856 * regcache.c (regcache::save): Avoid buffer use.
10857 (regcache::dump): Likewise.
10858
4a8a33c8
AH
108592017-06-07 Alan Hayward <alan.hayward@arm.com>
10860
10861 * sh-tdep.c (sh_pseudo_register_read): Remove
10862 MAX_REGISTER_SIZE.
10863 (sh_pseudo_register_write): Likewise.
10864 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10865 (sh64_pseudo_register_write): Likewise
10866
d1be909e
AH
108672017-06-07 Alan Hayward <alan.hayward@arm.com>
10868
10869 * aarch64-tdep.c (aarch64_store_return_value): Use
10870 V_REGISTER_SIZE.
10871 (aarch64_pseudo_read_value): Likewise.
10872 (aarch64_pseudo_write): Likewise.
10873
f4a65042
YQ
108742017-06-06 Yao Qi <yao.qi@linaro.org>
10875
10876 * regformats/regdef.h (set_register_cache): Remove the
10877 declaration.
10878
9f7fb0aa
AH
108792017-06-06 Alan Hayward <alan.hayward@arm.com>
10880
10881 * frame.c (frame_unwind_register_signed): Use
10882 frame_unwind_register_value.
10883
e1e01040
PA
108842017-06-06 Pedro Alves <palves@redhat.com>
10885
10886 PR breakpoints/21553
10887 * breakpoint.c (create_breakpoints_sal_default)
10888 (init_breakpoint_sal, create_breakpoint_sal): Use
10889 gdb::unique_xmalloc_ptr for string parameters.
10890 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10891 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10892 (base_breakpoint_create_breakpoints_sal)
10893 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10894 (strace_marker_create_breakpoints_sal)
10895 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10896 string parameters.
10897 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10898 gdb::unique_xmalloc_ptr for string parameters.
10899 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10900 parameters.
10901
fbe654c8
AH
109022017-06-06 Alan Hayward <alan.hayward@arm.com>
10903
10904 * alpha-tdep.c (alpha_register_to_value): Use
10905 get_frame_register_value.
10906 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10907
ae0d01d6
AH
109082017-06-06 Alan Hayward <alan.hayward@arm.com>
10909
10910 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10911 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10912 (ia64_value_to_register): Likewise.
10913 (ia64_extract_return_value): Likewise.
10914 (ia64_store_return_value): Likewise.
10915 (ia64_push_dummy_call): Likewise.
10916
49cf576c
JB
109172017-06-04 Joel Brobecker <brobecker@adacore.com>
10918
10919 GDB 8.0 released.
10920
26b6a6ab
SM
109212017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10922
10923 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10924
22827c51
SM
109252017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10926
10927 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10928 parameter.
10929 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10930
0e05cf3a
SM
109312017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10932
10933 * event-loop.c (poll_timers): Unallocate timer using delete
10934 instead of xfree.
10935
c1fc2657
SM
109362017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10937
10938 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10939 (struct breakpoint) <~breakpoint>: New.
10940 (struct watchpoint): Inherit from breakpoint.
10941 <~watchpoint>: New.
10942 <base>: Remove.
10943 (struct tracepoint): Inherit from breakpoint.
10944 <base>: Remove.
10945 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10946 (struct longjmp_breakpoint): Inherit from breakpoint.
10947 <~longjmp_breakpoint>: New.
10948 <base>: Remove.
10949 (new_breakpoint_from_type): Remove casts.
10950 (watchpoint_in_thread_scope): Remove reference to base field.
10951 (watchpoint_del_at_next_stop): Likewise.
10952 (update_watchpoint): Likewise.
10953 (watchpoint_check): Likewise.
10954 (bpstat_check_watchpoint): Likewise.
10955 (set_longjmp_breakpoint): Likewise.
10956 (struct fork_catchpoint): Inherit from breakpoint.
10957 <base>: Remove.
10958 (struct solib_catchpoint): Inherit from breakpoint.
10959 <~solib_catchpoint>: New.
10960 <base>: Remove.
10961 (dtor_catch_solib): Change to ...
10962 (solib_catchpoint::~solib_catchpoint): ... this.
10963 (breakpoint_hit_catch_solib): Remove reference to base field.
10964 (add_solib_catchpoint): Likewise.
10965 (create_fork_vfork_event_catchpoint): Likewise.
10966 (struct exec_catchpoint): Inherit from breakpoint.
10967 <~exec_catchpoint>: New.
10968 <base>: Remove.
10969 (dtor_catch_exec): Change to ...
10970 (exec_catchpoint::~exec_catchpoint): ... this.
10971 (dtor_watchpoint): Change to ...
10972 (watchpoint::~watchpoint): ... this.
10973 (watch_command_1): Remove reference to base field.
10974 (catch_exec_command_1): Likewise.
10975 (base_breakpoint_dtor): Change to ...
10976 (breakpoint::~breakpoint): ... this.
10977 (base_breakpoint_ops): Remove dtor field value.
10978 (longjmp_bkpt_dtor): Change to ...
10979 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10980 (strace_marker_create_breakpoints_sal): Remove reference to base
10981 field.
10982 (delete_breakpoint): Don't manually call breakpoint destructor.
10983 (create_tracepoint_from_upload): Remove reference to base field.
10984 (trace_pass_set_count): Likewise.
10985 (initialize_breakpoint_ops): Don't initialize
10986 momentary_breakpoint_ops, don't set dtors.
10987 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10988 <~ada_catchpoint>: New.
10989 <base>: Remove.
10990 (create_excep_cond_exprs): Remove reference to base field.
10991 (dtor_exception): Change to ...
10992 (ada_catchpoint::~ada_catchpoint): ... this.
10993 (dtor_catch_exception): Remove.
10994 (dtor_catch_exception_unhandled): Remove.
10995 (dtor_catch_assert): Remove.
10996 (create_ada_exception_catchpoint): Remove reference to base
10997 field.
10998 (initialize_ada_catchpoint_ops): Don't set dtors.
10999 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11000 breakpoint.
11001 <~signal_catchpoint>: New.
11002 <base>: Remove.
11003 (signal_catchpoint_dtor): Change to ...
11004 (signal_catchpoint::~signal_catchpoint): ... this.
11005 (create_signal_catchpoint): Remove reference to base field.
11006 (initialize_signal_catchpoint_ops): Don't set dtor.
11007 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11008 from breakpoint.
11009 <~syscall_catchpoint>: New.
11010 <base>: Remove.
11011 (dtor_catch_syscall): Change to ...
11012 (syscall_catchpoint::~syscall_catchpoint): ... this.
11013 (create_syscall_event_catchpoint): Remove reference to base
11014 field.
11015 (initialize_syscall_catchpoint_ops): Don't set dtor.
11016 * break-catch-throw.c (struct exception_catchpoint): Inherit
11017 from breakpoint.
11018 <~exception_catchpoint>: New.
11019 <base>: Remove.
11020 (dtor_exception_catchpoint): Change to ...
11021 (exception_catchpoint::~exception_catchpoint): ... this.
11022 (handle_gnu_v3_exceptions): Remove reference to base field.
11023 (initialize_throw_catchpoint_ops): Don't set dtor.
11024 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11025 field.
11026 * remote.c (remote_get_tracepoint_status): Likewise.
11027 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11028 * tracefile.c (tracefile_fetch_registers): Likewise.
11029 * tracepoint.c (actions_command): Likewise.
11030 (validate_actionline): Likewise.
11031 (tfind_1): Likewise.
11032 (get_traceframe_location): Likewise.
11033 (find_matching_tracepoint_location): Likewise.
11034 (parse_tracepoint_status): Likewise.
11035 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11036
3b0871f4
SM
110372017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11038
11039 * breakpoint.c (struct longjmp_breakpoint): New struct.
11040 (is_tracepoint_type): Change return type to bool.
11041 (is_longjmp_type): New function.
11042 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11043 (set_raw_breakpoint_without_location): Use
11044 new_breakpoint_from_type.
11045 (set_raw_breakpoint): Likewise.
11046
a5e364af
SM
110472017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11048
11049 * breakpoint.c (new_breakpoint_from_type): New function.
11050 (create_breakpoint_sal): Use new_breakpoint_from_type and
11051 unique_ptr.
11052 (create_breakpoint): Likewise.
11053
ae3b3f34
SM
110542017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11055
11056 * memattr.c (mem_info_command): Rename to ...
11057 (info_mem_command): ... this.
11058 (mem_enable_command): Rename to ...
11059 (enable_mem_command): ... this.
11060 (mem_disable_command): Rename to ...
11061 (disable_mem_command): ... this.
11062 (mem_delete_command): Rename to ...
11063 (delete_mem_command): ... this.
11064 (_initialize_mem): Adjust function names.
11065
13ace077
MM
110662017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11067
11068 * btrace.c (handle_pt_insn_events): New.
11069 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11070 STATUS. Split into this and ...
11071 (handle_pt_insn_event_flags): ... this.
11072
c56ccc05
MM
110732017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11074
11075 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11076 and struct pt_insn.resynced.
11077 * configure: Regenerated.
11078 * config.in: Regenerated.
11079
08c3f6d2
TW
110802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11081
11082 * btrace.c (ftrace_find_call_by_number): New function.
11083 (ftrace_new_function): Store objects, not pointers.
11084 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11085 ftrace_new_gap, ftrace_update_function,
11086 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11087 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11088 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11089 btrace_ends_with_single_insn, btrace_call_get): Account for
11090 btrace_thread_info::functions now storing objects.
11091 * btrace.h (struct btrace_thread_info): Add constructor.
11092 (struct btrace_thread_info) <functions>: Make std::vector.
11093 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11094 Initialize with default values.
11095 * record-btrace.c (record_btrace_frame_sniffer): Account for
11096 btrace_thread_info::functions now storing objects.
11097
8ffd39f2
TW
110982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11099
11100 * btrace.c: Remove typedef bfun_s.
11101 (ftrace_new_gap): Directly add gaps to the list of gaps.
11102 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11103 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11104 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11105 instead of gdb VEC.
11106
4aeb0dfc
TW
111072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11108
11109 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11110 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11111 with btrace_thread_info::next_segment and
11112 btrace_thread_info::prev_segment.
11113 * btrace.h: Remove struct btrace_func_link.
11114 (struct btrace_function): Replace pair of function segment pointers
11115 with pair of indices.
11116 * python/py-record-btrace.c (btpy_call_prev_sibling,
11117 btpy_call_next_sibling): Replace references to
11118 btrace_thread_info::segment with btrace_thread_info::next_segment and
11119 btrace_thread_info::prev_segment.
11120 * record-btrace.c (record_btrace_frame_this_id): Use
11121 btrace_find_call_by_number.
11122
eb8f2b9c
TW
111232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11124
11125 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11126 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11127 btrace_insn_next, btrace_insn_prev): Remove references to
11128 btrace_thread_info::flow.
11129 * btrace.h (struct btrace_function): Remove FLOW.
11130
42bfe59e
TW
111312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11132
11133 * btrace.c (ftrace_find_call_by_number): New function.
11134 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11135 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11136 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11137 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11138 index.
11139 * btrace.h (struct btrace_function): Turn UP into an index.
11140 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11141 as an index.
11142 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11143 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11144 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11145
b54b03bd
TW
111462017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11147
11148 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11149 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11150 ftrace_update_function, ftrace_compute_global_level_offset,
11151 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11152 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11153 btrace_insn_end, btrace_is_empty): Remove references to
11154 btrace_thread_info::begin and btrace_thread_info::end.
11155 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11156 (struct btrace_thread_info) <functions>: Adjust comment.
11157 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11158 btrace_thread_info::begin.
11159
8286623c
TW
111602017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11161
11162 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11163 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11164 ftrace_update_function): Remove arguments that implicitly were always
11165 BTINFO->END.
11166 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11167 Don't pass BTINFO->END.
11168
a0f1b963
TW
111692017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11170
11171 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11172 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11173 btrace_find_insn_by_number): Replace function segment pointer with
11174 index.
11175 (btrace_insn_cmp): Simplify.
11176 * btrace.h: (struct btrace_insn_iterator) Rename index to
11177 insn_index. Replace function segment pointer with index into function
11178 segment vector.
11179 * record-btrace.c (record_btrace_call_history): Replace function
11180 segment pointer use with index.
11181 (record_btrace_frame_sniffer): Retrieve function call segment through
11182 vector.
11183 (record_btrace_set_replay): Remove defunc't safety check.
11184
f158f208
TW
111852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11186
11187 * btrace.c (btrace_ends_with_single_insn): New function.
11188 (btrace_call_get, btrace_call_number, btrace_call_begin,
11189 btrace_call_end, btrace_call_next, btrace_call_prev,
11190 btrace_find_call_by_number): Use index into call segment vector
11191 instead of pointer.
11192 (btrace_call_cmp): Simplify.
11193 * btrace.h (struct btrace_call_iterator): Replace function call segment
11194 pointer with index into vector.
11195 * record-btrace.c (record_btrace_call_history): Use index instead of
11196 pointer.
11197
521103fd
TW
111982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11199
11200 * btrace.c (btrace_insn_begin, btrace_insn_end,
11201 btrace_find_insn_by_number): Add btinfo to iterator.
11202 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11203
17b89b34
TW
112042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11205
11206 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11207 and save pointers directly.
11208 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11209 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11210 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11211 changed signature of functions.
11212 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11213 (btrace_fetch): Remove code that adds btrace_function pointers to
11214 vector of btrace_functions.
11215 (btrace_clear): Simplify freeing vector of btrace_functions.
11216
2b51eddc
TW
112172017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11218
11219 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11220 Replace VEC_* with std::vector functions.
11221 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11222 (struct btrace_thread_info)<functions>: Change type to std::vector.
11223
db6be0d5
SM
112242017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11225
11226 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11227 "Removed targets and native configurations" up. Merge duplicate
11228 "New commands" sub-sections. Add "New options" sub-sections.
11229
b057297a
AH
112302017-05-26 Alan Hayward <alan.hayward@arm.com>
11231
11232 * defs.h (copy_integer_to_size): New declaration.
11233 * findvar.c (copy_integer_to_size): New function.
11234 (do_cint_test): New selftest function.
11235 (copy_integer_to_size_test): Likewise.
11236 (_initialize_findvar): Likewise.
11237 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11238 (mips_fbsd_collect_reg): Use raw_collect_integer.
11239 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11240 (mips64_fill_gregset): Use raw_collect_integer
11241 (mips64_fill_fpregset): Use raw_supply_integer.
11242 * regcache.c (regcache::raw_supply_integer): New function.
11243 (regcache::raw_collect_integer): Likewise.
11244 * regcache.h: (regcache::raw_supply_integer): New declaration.
11245 (regcache::raw_collect_integer): Likewise.
11246
b77b02a5
YQ
112472017-05-24 Yao Qi <yao.qi@linaro.org>
11248
11249 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11250 (COMMON_OBS): Add gdbarch-selftests.o.
11251 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11252 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11253 * gdbarch-selftests.c: New file.
11254 * regcache.h (regcache) <~regcache>: Mark it virtual if
11255 GDB_SELF_TEST.
11256 <raw_write>: Likewise.
11257
e521e87e
YQ
112582017-05-24 Yao Qi <yao.qi@linaro.org>
11259
11260 * regcache.c (current_regcache): Change it to
11261 regcache::current_regcache.
11262 (regcache_observer_target_changed): Update.
11263 (regcache_thread_ptid_changed): Make it a regcache static
11264 method.
11265 (regcache_thread_ptid_changed): Update.
11266 (class regcache_access): New.
11267 (current_regcache_test): Update.
11268 (_initialize_regcache): Update.
11269 * regcache.h: Include forward_list.
11270 (regcache): Declare regcache_thread_ptid_changed and declare
11271 registers_changed_ptid as friend.
11272
d8e07dda
YQ
112732017-05-24 Yao Qi <yao.qi@linaro.org>
11274
11275 * i387-tdep.c (i387_register_to_value): Use register_size
11276 instead of TYPE_LENGTH.
11277 * m68k-tdep.c (m68k_register_to_value): Likewise.
11278
8c8f9122
YQ
112792017-05-24 Yao Qi <yao.qi@linaro.org>
11280
11281 * i387-tdep.c (i387_convert_register_p): Return false if type
11282 code isn't TYPE_CODE_FLT.
11283
68fce50f
YQ
112842017-05-24 Yao Qi <yao.qi@linaro.org>
11285
11286 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11287 length is 4.
11288 (alpha_register_to_value): Remove type length check.
11289 (alpha_value_to_register): Likewise.
11290
88954b49
YQ
112912017-05-24 Yao Qi <yao.qi@linaro.org>
11292
11293 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11294 TYPE_CODE_FLT.
11295
e3ec9b69
YQ
112962017-05-24 Yao Qi <yao.qi@linaro.org>
11297
11298 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11299 TYPE_CODE_FLT or not.
11300
cdd238da
YQ
113012017-05-24 Yao Qi <yao.qi@linaro.org>
11302
11303 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11304 * avr-tdep.c (avr_gdbarch_init): Likewise.
11305 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11306 * cris-tdep.c (cris_gdbarch_init): Likewise.
11307 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11308 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11309 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11310 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11311 * mep-tdep.c (mep_gdbarch_init): Likewise.
11312 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11313 * mips-tdep.c (mips_gdbarch_init): Likewise.
11314 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11315 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11316 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11317 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11318 * v850-tdep.c (v850_gdbarch_init): Likewise.
11319
7a3929c4
YQ
113202017-05-24 Yao Qi <yao.qi@linaro.org>
11321
11322 * selftest-arch.c (tests_with_arch): Call registers_changed
11323 and reinit_frame_cache.
11324 * selftest.c (run_self_tests): Likewise.
11325
f4985dba
YQ
113262017-05-24 Yao Qi <yao.qi@linaro.org>
11327
11328 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11329 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11330
ab20fa4a
YQ
113312017-05-24 Yao Qi <yao.qi@linaro.org>
11332
11333 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11334 set_gdbarch_print_insn.
11335
f532ab94
YQ
113362017-05-24 Yao Qi <yao.qi@linaro.org>
11337
11338 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11339 set_gdbarch_print_insn.
11340
39503f82
YQ
113412017-05-24 Yao Qi <yao.qi@linaro.org>
11342
11343 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11344 set_gdbarch_print_insn.
11345 * arc-tdep.c (arc_gdbarch_init): Likewise.
11346 * arch-utils.c: include dis-asm.h.
11347 (default_print_insn): New function.
11348 * arch-utils.h (default_print_insn): Declare.
11349 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11350 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11351 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11352 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11353 * frv-tdep.c (frv_gdbarch_init): Likewise.
11354 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11355 * gdbarch.sh (print_insn): Use default_print_insn.
11356 * gdbarch.c: Regenerated.
11357 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11358 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11359 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11360 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11361 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11362 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11363 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11364 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11365 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11366 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11367 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11368 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11369 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11370 * mt-tdep.c (mt_gdbarch_init): Likewise.
11371 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11372 * nios2-tdep.c (nios2_print_insn): Remove.
11373 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11374 * rx-tdep.c (rx_gdbarch_init): Likewise.
11375 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11376 * score-tdep.c (score_print_insn): Remove.
11377 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11378 * sh-tdep.c (sh_gdbarch_init): Likewise.
11379 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11380 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11381 * tic6x-tdep.c (tic6x_print_insn): Remove.
11382 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11383 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11384 * v850-tdep.c (v850_gdbarch_init): Likewise.
11385 * vax-tdep.c (vax_gdbarch_init): Likewise.
11386 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11387 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11388
f7241d4f
JB
113892017-05-23 John Baldwin <jhb@FreeBSD.org>
11390
11391 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11392 (MIPS_FP0_REGNUM): Remove.
11393 (MIPS_FSR_REGNUM): Remove.
11394 (mips_fbsd_supply_fpregs): Use mips_regnum.
11395 (mips_fbsd_supply_gregs): Likewise.
11396 (mips_fbsd_collect_fpregs): Likewise.
11397 (mips_fbsd_collect_gregs): Likewise.
11398
d489d81d
JB
113992017-05-23 John Baldwin <jhb@FreeBSD.org>
11400
11401 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11402 (getpfpregs_supplies): New function.
11403 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11404 getfpregs_supplies.
11405 (mips_fbsd_store_inferior_registers): Likewise.
11406
e11b3cdc
PA
114072017-05-22 Pedro Alves <palves@redhat.com>
11408
11409 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11410 maintainer.
11411
0f068fb5
AH
114122017-05-22 Alan Hayward <alan.hayward@arm.com>
11413
11414 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11415 (store_register): Likewise.
11416 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11417 (get_decimal_float_return_value): Likewise.
11418 (do_ppc_sysv_return_value): Likewise.
11419 (ppc64_sysv_abi_push_integer): Likewise.
11420 (ppc64_sysv_abi_push_freg): Likewise.
11421 (ppc64_sysv_abi_return_value_base): Likewise.
11422 (ppc64_sysv_abi_return_value): Likewise.
11423 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11424 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11425 * rs6000-nat.c: Likewise.
11426 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11427 (rs6000_value_to_register): Likewise.
11428 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11429
e6cf65f2
TT
114302017-05-21 Tom Tromey <tom@tromey.com>
11431
11432 PR rust/21466:
11433 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11434 arrays as "[T]", not "[T; ]".
11435
43cc5389
TT
114362017-05-19 Tom Tromey <tom@tromey.com>
11437
11438 PR rust/21484:
11439 * rust-lang.c (exp_descriptor_rust): New function.
11440 (rust_language_defn): Use it.
11441 * p-lang.c (pascal_language_defn): Update.
11442 * opencl-lang.c (opencl_language_defn): Update.
11443 * objc-lang.c (objc_language_defn): Update.
11444 * m2-lang.c (m2_language_defn): Update.
11445 * language.h (struct language_defn)
11446 <la_watch_location_expression>: New member.
11447 * language.c (unknown_language_defn, auto_language_defn)
11448 (local_language_defn): Update.
11449 * go-lang.c (go_language_defn): Update.
11450 * f-lang.c (f_language_defn): Update.
11451 * d-lang.c (d_language_defn): Update.
11452 * c-lang.h (c_watch_location_expression): Declare.
11453 * c-lang.c (c_watch_location_expression): New function.
11454 (c_language_defn, cplus_language_defn, asm_language_defn)
11455 (minimal_language_defn): Use it.
11456 * breakpoint.c (watch_command_1): Call
11457 la_watch_location_expression.
11458 * ada-lang.c (ada_language_defn): Update.
11459
7a6e7fcc
RO
114602017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11461
6e7e1744
RO
11462 PR tui/21482
11463 * gdb_curses.h (NOMACROS): Define.
11464 (NCURSES_NOMACROS): Define.
11465
114662017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11467
11468 PR tui/21482
7a6e7fcc
RO
11469 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11470 arg to char *.
11471 * tui/tui-wingeneral.c (box_win): Likewise.
11472 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11473 (tui_show_source_line): Likewise.
11474 (tui_show_exec_info_content): Likewise.
11475
1933fd8e
VM
114762017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11477
11478 * sparc-tdep.c (sparc_structure_return_p)
11479 (sparc_arg_on_registers_p): New functions.
11480 (sparc32_store_arguments): Use them.
11481 * sparc64-tdep.c (sparc64_16_byte_align_p)
11482 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11483 Handle TYPE_CODE_ARRAY.
11484
21873064
YQ
114852017-05-17 Yao Qi <yao.qi@linaro.org>
11486
11487 * cli/cli-decode.c (add_alias_cmd): New function.
11488 * command.h (add_alias_cmd): Declare.
11489 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11490 instead call add_alias_cmd.
11491
2b351b19
PA
114922017-05-17 Pedro Alves <palves@redhat.com>
11493
11494 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11495 (nat_makefile_frag): ... this. All references updated.
11496 * configure.ac: Likewise.
11497 * configure.nat: Likewise. Enhance comments.
11498 * configure: Regenerate.
11499
5f2ad7a3
RO
115002017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11501
11502 * procfs.c (procfs_create_inferior): Change prototype to match
11503 definition.
11504
adf3dde5
EZ
115052017-05-13 Eli Zaretskii <eliz@gnu.org>
11506
11507 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11508 C++ compiler warning.
11509
6830f270
TT
115102017-05-12 Tom Tromey <tom@tromey.com>
11511
11512 PR rust/21483:
11513 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11514 recurse, just call value_struct_elt directly.
11515
68f2f2e3
TT
115162017-05-12 Tom Tromey <tom@tromey.com>
11517
11518 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11519 OP_RUST_ARRAY>: Fix.
11520
256afbc2
TT
115212017-05-12 Tom Tromey <tom@tromey.com>
11522
11523 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11524
94bb8dfe
YQ
115252017-05-09 Yao Qi <yao.qi@linaro.org>
11526
11527 * regcache.c: Include <forward_list>.
11528 (struct regcache_list): Remove.
11529 (current_regcache): Update.
11530 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11531 (regcache_thread_ptid_changed): Likewise.
11532 (registers_changed_ptid): Likewise.
11533 (current_regcache_size): Likewise.
11534
8248946c
YQ
115352017-05-09 Yao Qi <yao.qi@linaro.org>
11536
11537 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11538 (current_regcache_size): New function.
11539 (current_regcache_test): New function.
11540 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11541
313c5961
AH
115422017-05-08 Alan Hayward <alan.hayward@arm.com>
11543
11544 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11545 (print_gp_register_row): Use get_frame_register_value.
11546
27bfc1d1
AH
115472017-05-08 Alan Hayward <alan.hayward@arm.com>
11548
11549 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11550 (mips_supply_fpregset): Likewise.
11551 (mips64_supply_gregset): Likewise.
11552
146e6c5c
AH
115532017-05-08 Alan Hayward <alan.hayward@arm.com>
11554
11555 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11556 regcache->raw_supply_zeroed.
11557
e50f25ec
SDJ
115582017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11559
11560 * configure.nat: Rearrange 'case' statements to match
11561 host before cpu.
11562
21ea5acd
SDJ
115632017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11564
11565 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11566 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11567 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11568 "@nat_extra_makefile_frag@".
11569 (Makefile): Remove dependency on "@frags@".
11570 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11571 (data-directory/Makefile): Likewise.
11572 * config/aarch64/linux.mh: Deleted; moved contents to
11573 "gdb/configure.nat".
11574 * config/alpha/alpha-linux.mh: Likewise.
11575 * config/alpha/nbsd.mh: Likewise.
11576 * config/arm/linux.mh: Likewise.
11577 * config/arm/nbsdelf.mh: Likewise.
11578 * config/i386/cygwin.mh: Likewise.
11579 * config/i386/cygwin64.mh: Likewise.
11580 * config/i386/darwin.mh: Likewise.
11581 * config/i386/fbsd.mh: Likewise.
11582 * config/i386/fbsd64.mh: Likewise.
11583 * config/i386/go32.mh: Likewise.
11584 * config/i386/i386gnu.mh: Likewise.
11585 * config/i386/i386sol2.mh: Likewise.
11586 * config/i386/linux.mh: Likewise.
11587 * config/i386/linux64.mh: Likewise.
11588 * config/i386/mingw.mh: Likewise.
11589 * config/i386/mingw64.mh: Likewise.
11590 * config/i386/nbsd64.mh: Likewise.
11591 * config/i386/nbsdelf.mh: Likewise.
11592 * config/i386/nto.mh: Likewise.
11593 * config/i386/obsd.mh: Likewise.
11594 * config/i386/obsd64.mh: Likewise.
11595 * config/i386/sol2-64.mh: Likewise.
11596 * config/ia64/linux.mh: Likewise.
11597 * config/m32r/linux.mh: Likewise.
11598 * config/m68k/linux.mh: Likewise.
11599 * config/m68k/nbsdelf.mh: Likewise.
11600 * config/m68k/obsd.mh: Likewise.
11601 * config/m88k/obsd.mh: Likewise.
11602 * config/mips/fbsd.mh: Likewise.
11603 * config/mips/linux.mh: Likewise.
11604 * config/mips/nbsd.mh: Likewise.
11605 * config/mips/obsd64.mh: Likewise.
11606 * config/pa/linux.mh: Likewise.
11607 * config/pa/nbsd.mh: Likewise.
11608 * config/pa/obsd.mh: Likewise.
11609 * config/powerpc/aix.mh: Likewise.
11610 * config/powerpc/fbsd.mh: Likewise.
11611 * config/powerpc/linux.mh: Likewise.
11612 * config/powerpc/nbsd.mh: Likewise.
11613 * config/powerpc/obsd.mh: Likewise.
11614 * config/powerpc/ppc64-linux.mh: Likewise.
11615 * config/powerpc/spu-linux.mh: Likewise.
11616 * config/s390/linux.mh: Likewise.
11617 * config/sh/nbsd.mh: Likewise.
11618 * config/sparc/fbsd.mh: Likewise.
11619 * config/sparc/linux.mh: Likewise.
11620 * config/sparc/linux64.mh: Likewise.
11621 * config/sparc/nbsd64.mh: Likewise.
11622 * config/sparc/nbsdelf.mh: Likewise.
11623 * config/sparc/obsd64.mh: Likewise.
11624 * config/sparc/sol2.mh: Likewise.
11625 * config/tilegx/linux.mh: Likewise.
11626 * config/vax/nbsdelf.mh: Likewise.
11627 * config/vax/obsd.mh: Likewise.
11628 * config/xtensa/linux.mh: Likewise.
11629 * config/i386/i386gnu.mn: New file, with excerpts from
11630 "config/i386/i386gnu.mh".
11631 * configure: Regenerate.
11632 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11633 *.mh files under "gdb/config".
11634 * configure.nat: New file, with contents from the
11635 "gdb/config/*/*.mh" files.
11636
7ed1acaf
TW
116372017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11638
11639 * btrace.c (btrace_clear): Free insn vector.
11640
e13cb306
PA
116412017-05-05 Pedro Alves <palves@redhat.com>
11642
11643 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11644 * configure: Regenerate.
11645
5ed8105e
PA
116462017-05-04 Pedro Alves <palves@redhat.com>
11647
11648 * Makefile.in (SFILES): Add progspace-and-thread.c.
11649 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11650 (COMMON_OBS): Add progspace-and-thread.o.
11651 * breakpoint.c: Include "progspace-and-thread.h".
11652 (update_inserted_breakpoint_locations)
11653 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11654 Use scoped_restore_current_pspace_and_thread.
11655 (create_std_terminate_master_breakpoint): Use
11656 scoped_restore_current_program_space.
11657 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11658 (print_breakpoint_location): Use
11659 scoped_restore_current_program_space.
11660 (bp_loc_is_permanent): Use
11661 scoped_restore_current_pspace_and_thread.
11662 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11663 (download_tracepoint_locations): Use
11664 scoped_restore_current_pspace_and_thread.
11665 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11666 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11667 (enum step_over_calls_kind): Moved from inferior.h.
11668 (class scoped_restore_current_thread): New class.
11669 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11670 declaration.
11671 (scoped_restore_current_thread): New class.
11672 * infcmd.c: Include "common/gdb_optional.h".
11673 (continue_1, proceed_after_attach): Use
11674 scoped_restore_current_thread.
11675 (notice_new_inferior): Use scoped_restore_current_thread.
11676 * inferior.c: Include "progspace-and-thread.h".
11677 (restore_inferior, save_current_inferior): Delete.
11678 (add_inferior_command, clone_inferior_command): Use
11679 scoped_restore_current_pspace_and_thread.
11680 * inferior.h (scoped_restore_current_inferior): New class.
11681 * infrun.c: Include "progspace-and-thread.h" and
11682 "common/gdb_optional.h".
11683 (follow_fork_inferior): Use
11684 scoped_restore_current_pspace_and_thread.
11685 (scoped_restore_exited_inferior): New class.
11686 (handle_vfork_child_exec_or_exit): Use
11687 scoped_restore_exited_inferior,
11688 scoped_restore_current_pspace_and_thread,
11689 scoped_restore_current_thread and scoped_restore.
11690 (fetch_inferior_event): Use scoped_restore_current_thread.
11691 * linespec.c (decode_line_full, decode_line_1): Use
11692 scoped_restore_current_program_space.
11693 * mi/mi-main.c: Include "progspace-and-thread.h".
11694 (exec_continue): Use scoped_restore_current_thread.
11695 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11696 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11697 * proc-service.c (ps_pglobal_lookup): Use
11698 scoped_restore_current_program_space.
11699 * progspace-and-thread.c: New file.
11700 * progspace-and-thread.h: New file.
11701 * progspace.c (release_program_space, clone_program_space): Use
11702 scoped_restore_current_program_space.
11703 (restore_program_space, save_current_program_space)
11704 (save_current_space_and_thread): Delete.
11705 (switch_to_program_space_and_thread): Moved to
11706 progspace-and-thread.c.
11707 * progspace.h (save_current_program_space)
11708 (save_current_space_and_thread): Delete declarations.
11709 (scoped_restore_current_program_space): New class.
11710 * remote.c (remote_btrace_maybe_reopen): Use
11711 scoped_restore_current_thread.
11712 * symtab.c: Include "progspace-and-thread.h".
11713 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11714 * thread.c (print_thread_info_1): Use
11715 scoped_restore_current_thread.
11716 (struct current_thread_cleanup): Delete.
11717 (do_restore_current_thread_cleanup)
11718 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11719 (scoped_restore_current_thread::~scoped_restore_current_thread):
11720 ... this new dtor.
11721 (make_cleanup_restore_current_thread): Rename/convert to ...
11722 (scoped_restore_current_thread::scoped_restore_current_thread):
11723 ... this new ctor.
11724 (thread_apply_all_command): Use scoped_restore_current_thread.
11725 (thread_apply_command): Use scoped_restore_current_thread.
11726 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11727 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11728
f6223dbb
PA
117292017-05-04 Pedro Alves <palves@redhat.com>
11730
11731 * thread.c (make_cleanup_restore_current_thread): Move
11732 find_thread_ptid call before the is_stopped call. Assert that the
11733 thread is found. Replace is_stopped call by checking the thread's
11734 state directly. Remove unnecessary NULL-thread check.
11735
3c3ae77e
PA
117362017-05-04 Pedro Alves <palves@redhat.com>
11737
11738 * corelow.c (thread_section_name): New class.
11739 (get_core_register_section, get_core_siginfo): Use it.
11740
45eba0ab
AA
117412017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11742
11743 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11744 (get_core_register_section): Remove xfree of NULL pointer.
11745
f81fdd35
AH
117462017-05-03 Alan Hayward <alan.hayward@arm.com>
11747
11748 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11749 * regcache.c (regcache::raw_supply_zeroed): New function.
11750 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11751
35837774
SM
117522017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11753
11754 * gdbarch.sh: Remove commented out definition of
11755 TARGET_CHAR_BIT.
11756 * gdbarch.h: Re-generate.
11757
c94fee56
SDJ
117582017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11759
11760 * configure: Regenerate.
11761
d17f7b36
SM
117622017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11763
11764 * solib-target.c (solib_target_relocate_section_addresses):
11765 Remove num_section_bases, num_bases, segment_bases variables.
11766
b560ebd6
SM
117672017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11768
11769 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11770
f2f46dfc
SM
117712017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11772
11773 * solib-target.c: Include <vector>
11774 (struct lm_info_target) <~lm_info_target>: Remove.
11775 <segment_bases, section_bases>: Change type to
11776 std::vector<CORE_ADDR>.
11777 (library_list_start_segment, library_list_start_section,
11778 library_list_end_library,
11779 solib_target_relocate_section_addresses): Adjust.
11780
a0ff9e1a
SM
117812017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11782
11783 * gdbarch.sh (software_single_step): Change return type to
11784 std::vector<CORE_ADDR>.
11785 * gdbarch.c, gdbarch.h: Re-generate.
11786 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11787 Adjust.
11788 (arm_deal_with_atomic_sequence_raw): Adjust.
11789 (thumb_get_next_pcs_raw): Adjust.
11790 (arm_get_next_pcs_raw): Adjust.
11791 (arm_get_next_pcs): Adjust.
11792 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11793 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11794 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11795 (alpha_software_single_step): Adjust.
11796 * alpha-tdep.h (alpha_software_single_step): Adjust.
11797 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11798 * arm-tdep.c (arm_software_single_step): Adjust.
11799 (arm_breakpoint_kind_from_current_state): Adjust.
11800 * arm-tdep.h (arm_software_single_step): Adjust.
11801 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11802 * cris-tdep.c (cris_software_single_step): Adjust.
11803 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11804 (micromips_deal_with_atomic_sequence): Adjust.
11805 (deal_with_atomic_sequence): Adjust.
11806 (mips_software_single_step): Adjust.
11807 * mips-tdep.h (mips_software_single_step): Adjust.
11808 * moxie-tdep.c (moxie_software_single_step): Adjust.
11809 * nios2-tdep.c (nios2_software_single_step): Adjust.
11810 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11811 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11812 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11813 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11814 * sparc-tdep.c (sparc_software_single_step): Adjust.
11815 * spu-tdep.c (spu_software_single_step): Adjust.
11816 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11817
ea480a30
SM
118182017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11819
11820 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11821 * gdbarch.h: Re-generate.
11822
d050f7d7
TW
118232017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11824
11825 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11826 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11827 * python/py-instruction.c, python/py-instruction.h: New file.
11828 * python/py-record.c: Add py-instruction.h include.
11829 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11830 gdb.RecordInstruction.
11831 * python/python-internal.h: Add gdbpy_initialize_instruction
11832 declaration.
11833 * python/python.c (do_start_initialization): Add
11834 gdbpy_initialize_instruction.
11835
14f819c8
TW
118362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11837
11838 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11839 Remove.
11840 (btrace_func_from_recpy_func): New function.
11841 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11842 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11843 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11844 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11845 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11846 Also, use new helper functions.
11847 (btpy_list_item): Use new helper functions.
11848 (recpy_bt_function_call_history): Use new type name.
11849 (btpy_call_getset): Remove.
11850 (gdbpy_initialize_btrace): Remove code to initialize
11851 gdb.BtraceFunctionCall.
11852 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11853 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11854 recpy_bt_func_prev, recpy_bt_func_next): New export.
11855 * python/py-record.c (recpy_func_type): New static object.
11856 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11857 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11858 recpy_func_next): New function.
11859 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11860 (recpy_func_getset): New static object.
11861 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11862 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11863
0ed5da75
TW
118642017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11865
11866 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11867 (btpy_object, btpy_insn_type, btpy_new): Remove.
11868 (btpy_list_object): Use gdb.RecordInstruction type instead of
11869 gdb.BtraceInstruction type.
11870 (btrace_insn_from_recpy_insn): New function.
11871 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11872 btpy_new.
11873 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11874 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11875 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11876 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11877 instead of btpy_object.
11878 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11879 btpy_insn_data, btpy_insn_decode): Rename to ...
11880 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11881 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11882 recpy_bt_insn_decode): This. Also, use new helper functions.
11883 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11884 recpy_insn_type.
11885 (btpy_insn_getset): Remove.
11886 (gdbpy_initialize_btrace): Remove code to initialize
11887 gdb.BtraceInstruction. Use recpy_element_object.
11888 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11889 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11890 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11891 * python/py-record.c (recpy_insn_type): New static object.
11892 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11893 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11894 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11895 New function.
11896 (recpy_insn_getset): New static object.
11897 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11898 * python/py-record.h (recpy_element_object): New typedef.
11899 (recpy_insn_type, recpy_insn_new): New export.
11900
913aeadd
TW
119012017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11902
11903 * py-record-btrace.c (btpy_insn_new): Removed.
11904 (btpy_insn_or_gap_new): New function.
11905 (btpy_insn_error): Removed.
11906 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11907 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11908 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11909 btpy_insn_or_gap_new instead of btpy_insn_new.
11910 (btpy_insn_getset): Remove btpy_insn_error.
11911 * py-record.c (recpy_gap_type): New static object.
11912 (recpy_gap_object): New typedef.
11913 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11914 recpy_gap_reason_string): New function.
11915 (recpy_gap_getset): New static object.
11916 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11917 * py-record.h (recpy_gap_new): New export.
11918
a3be24ad
TW
119192017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11920
11921 * python/py-record.c (recpy_ptid): Remove.
11922 (recpy_record_getset): Remove recpy_ptid.
11923
ae20e79a
TW
119242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11925
11926 * btrace.c (btrace_fetch): Set inferior_ptid.
11927 * python/py-record-btrace.c: Add "py-record.h" include.
11928 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11929 recpy_bt_end, recpy_bt_instruction_history,
11930 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11931 in gdb.Record object instead of current ptid.
11932 * python/py-record.c: Include new "py-record.h" file.
11933 (recpy_record_object): Moved to py-record.h.
11934 * python/py-record.h: New file.
11935
8d0050ea
TW
119362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11937
11938 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11939 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11940 indentation.
11941
3f380b50
JB
119422017-05-01 Joel Brobecker <brobecker@adacore.com>
11943
11944 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11945 the past maintainers section.
11946
07495424
YQ
119472017-04-28 Yao Qi <yao.qi@linaro.org>
11948
11949 * infcmd.c (get_return_value): Use regcache ctor, and remove
11950 cleanup.
11951
deb1fa3e
YQ
119522017-04-28 Yao Qi <yao.qi@linaro.org>
11953 Pedro Alves <palves@redhat.com>
11954
11955 * regcache.c (regcache::regcache): New tag dispatch ctor.
11956 (do_cooked_read): Moved above.
11957 (regcache_dup): Use the tag dispatch ctor..
11958 * regcache.h (regcache): Declare ctor, delete copy ctor and
11959 assignment operator, remove friend regcache_dup.
11960
b421c83c
YQ
119612017-04-28 Yao Qi <yao.qi@linaro.org>
11962
11963 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11964 call method save instead of regcache_cpy.
11965 * regcache.h (struct regcache): Make regcache_dup a friend.
11966
ef79d9a3
YQ
119672017-04-28 Yao Qi <yao.qi@linaro.org>
11968
11969 * regcache.c (struct regcache): Move to regcache.h
11970 (regcache::arch): New method.
11971 (regcache_get_ptid): Update.
11972 (get_regcache_arch): Call arch method.
11973 (get_regcache_aspace): Call method aspace.
11974 (register_buffer): Change it to method.
11975 (regcache_save): Change it to regcache::save.
11976 (regcache_restore): Likewise.
11977 (regcache_cpy_no_passthrough): Remove the declaration.
11978 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11979 (regcache_cpy_no_passthrough): Change it to method
11980 cpy_no_passthrough.
11981 (regcache_register_status): Change it to method
11982 get_register_status.
11983 (regcache_invalidate): Change it to method invalidate.
11984 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11985 (regcache_raw_update): Change it to method raw_update.
11986 (regcache_raw_read): Likewise.
11987 (regcache_raw_read_signed): Likewise.
11988 (regcache_raw_read_unsigned): Likewise.
11989 (regcache_raw_write_signed): Likewise.
11990 (regcache_raw_write_unsigned): Likewise.
11991 (regcache_cooked_read): Likewise.
11992 (regcache_cooked_read_value): Likewise.
11993 (regcache_cooked_read_signed): Likewise.
11994 (regcache_cooked_read_unsigned): Likewise.
11995 (regcache_cooked_write_signed): Likewise.
11996 (regcache_cooked_write_unsigned): Likewise.
11997 (regcache_raw_set_cached_value): Likewise.
11998 (regcache_raw_write): Likewise.
11999 (regcache_cooked_write): Likewise.
12000 (regcache_xfer_part): Likewise.
12001 (regcache_raw_read_part): Likewise.
12002 (regcache_raw_write_part): Likewise.
12003 (regcache_cooked_read_part): Likewise.
12004 (regcache_cooked_write_part): Likewise.
12005 (regcache_raw_supply): Likewise.
12006 (regcache_raw_collect): Likewise.
12007 (regcache_transfer_regset): Likewise.
12008 (regcache_supply_regset): Likewise.
12009 (regcache_collect_regset): Likewise.
12010 (regcache_debug_print_register): Likewise.
12011 (enum regcache_dump_what): Move it to regcache.h.
12012 (regcache_dump): Change it to method dump.
12013 * regcache.h (enum regcache_dump_what): New.
12014 (class regcache): New.
12015 * target.c (target_fetch_registers): Call method
12016 debug_print_register.
12017 (target_store_registers): Likewise.
12018
f8fdb78e
SM
120192017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12020
12021 * windows-nat.c (struct lm_info_windows): Initialize field.
12022 (windows_make_so): Allocate lm_info_windows with new.
12023 (windows_free_so): Free lm_info_windows with delete.
12024
9ccbfd7b
SM
120252017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12026
12027 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12028 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12029 cleanup.
12030 (darwin_free_so): Free lm_info_darwin with delete.
12031
76e75227
SM
120322017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12033
12034 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12035 <l_addr_p>: Change type to bool.
12036 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12037 (svr4_free_so): Free lm_info_svr4 with delete.
12038 (svr4_copy_library_list): Replace memcpy with call to copy
12039 constructor.
12040 (library_list_start_library, svr4_default_sos): Allocate
12041 lm_info_svr4 with new.
12042
51046d9e
SM
120432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12044
12045 * solib-target.c (struct lm_info_target): Add destructor,
12046 initialize fields.
12047 <name>: Change type to std::string.
12048 (library_list_start_library): Allocate lm_info_target with new.
12049 (solib_target_free_library_list): Free lm_info_target with
12050 delete.
12051 (solib_target_current_sos): Adapt to std::string.
12052 (solib_target_free_so): Free lm_info_target with delete.
12053
4023ae76
SM
120542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12055
12056 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12057 fields.
12058 (frv_current_sos): Allocate lm_info_frv with new.
12059 (frv_relocate_main_executable): Free lm_info_frv with delete,
12060 allocate with new.
12061 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12062
af43057b
SM
120632017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12064
12065 * solib-frv.c (struct lm_info_frv): Fix indentation.
12066
b0911207
SM
120672017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12068
12069 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12070 map field.
12071 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12072 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12073 and allocate with new.
12074 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12075
6c401f72
SM
120762017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12077
12078 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12079 <filename, member_name>: Change type to std::string.
12080 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12081 (library_list_start_library): Allocate lm_info_aix with new.
12082 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12083 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12084 with copy constructor.
12085
d0e449a1
SM
120862017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12087
12088 * solist.h (struct lm_info): Remove.
12089 (struct lm_info_base): New class.
12090 (struct so_list) <lm_info>: Change type to lm_info_base *.
12091 * nto-tdep.c (struct lm_info): Remove.
12092 (lm_addr): Adjust.
12093 * solib-aix.c (struct lm_info): Rename to ...
12094 (struct lm_info_aix): ... this. Extend lm_info_base.
12095 (lm_info_p): Rename to ...
12096 (lm_info_aix_p): ... this, and adjust.
12097 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12098 solib_aix_parse_libraries, library_list_start_library,
12099 solib_aix_free_library_list, solib_aix_parse_libraries,
12100 solib_aix_get_library_list,
12101 solib_aix_relocate_section_addresses, solib_aix_free_so,
12102 solib_aix_get_section_offsets,
12103 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12104 Adjust.
12105 (struct solib_aix_inferior_data) <library_list>: Adjust.
12106 * solib-darwin.c (struct lm_info): Rename to ...
12107 (struct lm_info_darwin): ... this. Extend lm_info_base.
12108 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12109 * solib-dsbt.c (struct lm_info): Rename to ...
12110 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12111 (struct dsbt_info) <main_executable_lm_info): Adjust.
12112 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12113 dsbt_relocate_section_addresses): Adjust.
12114 * solib-frv.c (struct lm_info): Rename to ...
12115 (struct lm_info_frv): ... this. Extend lm_info_base.
12116 (main_executable_lm_info): Adjust.
12117 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12118 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12119 find_canonical_descriptor_in_load_object,
12120 frv_fdpic_find_canonical_descriptor): Adjust.
12121 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12122 to lm_info_svr4.
12123 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12124 svr4_clear_so, svr4_copy_library_list,
12125 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12126 svr4_current_sos, svr4_fetch_objfile_link_map,
12127 solist_update_incremental): Adjust.
12128 * solib-svr4.h (struct lm_info_svr4): Move here from
12129 solib-svr4.c.
12130 * solib-target.c (struct lm_info): Rename to ...
12131 (struct lm_info_target): ... this. Extend lm_info_base.
12132 (lm_info_p): Rename to ...
12133 (lm_info_target_p): ... this.
12134 (solib_target_parse_libraries, library_list_start_segment,
12135 library_list_start_section, library_list_start_library,
12136 library_list_end_library, solib_target_free_library_list,
12137 solib_target_current_sos, solib_target_free_so,
12138 solib_target_relocate_section_addresses): Adjust.
12139 * windows-nat.c (struct lm_info): Rename to ...
12140 (struct lm_info_windows): ... this. Extend lm_info_base.
12141 (windows_make_so, handle_load_dll, handle_unload_dll,
12142 windows_xfer_shared_libraries): Adjust.
12143
434a4023
SM
121442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12145
12146 * solib-darwin.c (struct darwin_so_list): Remove.
12147 (darwin_current_sos): Allocate an so_list object instead of a
12148 darwin_so_list, separately allocate an lm_info object.
12149 (darwin_free_so): Free lm_info.
12150
428544e8
JB
121512017-04-28 John Baldwin <jhb@FreeBSD.org>
12152
12153 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12154 with fprintf_filtered.
12155
4621115f
YQ
121562017-04-28 Yao Qi <yao.qi@linaro.org>
12157
12158 * regcache.c (regcache::regcache): New function.
12159 (regcache::~regcache): New function.
12160 (regcache_xmalloc_1): Remove.
12161 (regcache_xmalloc): Call new regcache.
12162 (regcache_xfree): Call delete regcache.
12163 (get_thread_arch_aspace_regcache): Call new regcache.
12164
339053c2
YQ
121652017-04-28 Yao Qi <yao.qi@linaro.org>
12166
12167 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12168 lwp instead of ptid_get_lwp.
12169
7974a605
YQ
121702017-04-28 Yao Qi <yao.qi@linaro.org>
12171
12172 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12173 lwp_info instead of getting from inferior_ptid.
12174
e15c3eb4
KS
121752017-04-27 Keith Seitz <keiths@redhat.com>
12176
12177 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12178 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12179 (CV_CONVERSION_BADNESS): Define.
12180 (rank_one_type): Remove overly restrictive rvalue reference
12181 rank checks.
12182 Add cv-qualifier checks and subranks for type equality.
12183 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12184 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12185 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12186
72bc1d24
SM
121872017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12188
12189 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12190 count when creating the object.
12191
55bcecda
UW
121922017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12193 Ulrich Weigand <uweigand@de.ibm.com>
12194
12195 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12196 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12197 is used in AIX.
12198 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12199 (process_xcoff_symbol): Likewise.
12200 (scan_xcoff_symtab): Likewise.
12201
5c99fcf8
AH
122022017-04-26 Alan Hayward <alan.hayward@arm.com>
12203
12204 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12205 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12206 (ia64_access_reg): Use get_frame_register_unsigned.
12207 (ia64_access_rse_reg): Likewise.
12208 (ia64_libunwind_frame_prev_register): Likewise.
12209
b41c5a85
JW
122102017-04-26 Jiong Wang <jiong.wang@arm.com>
12211
12212 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12213 * gdbarch.c: Regenerated.
12214 * gdbarch.h: Regenerated.
12215 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12216 visibility external.
12217 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12218 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12219 (enum cfa_how_kind): Move to ...
12220 (struct dwarf2_frame_state_reg_info): Likewise.
12221 (struct dwarf2_frame_state): Likewise.
12222 * dwarf2-frame.h: ... here.
12223 (dwarf2_frame_state_alloc_regs): New declaration.
12224 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12225 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12226
c185f580
AH
122272017-04-26 Alan Hayward <alan.hayward@arm.com>
12228
12229 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12230 regcache_raw_read_unsigned.
12231 (xtensa_pseudo_register_write): Likewise.
12232
19c45594
AH
122332017-04-26 Alan Hayward <alan.hayward@arm.com>
12234
12235 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12236 (nds32_pseudo_register_write): Likewise.
12237
4658f12e
YQ
122382017-04-25 Yao Qi <yao.qi@linaro.org>
12239
12240 * regcache.c (struct regcache) <readonly_p>: Change its type
12241 to bool.
12242 (regcache_xmalloc_1): Update parameter type and callers update.
12243
d581dda8
YQ
122442017-04-25 Yao Qi <yao.qi@linaro.org>
12245
12246 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12247 set_gdbarch_wchar_bit.
12248 * arm-tdep.c (arm_gdbarch_init): Likewise.
12249
debed3db
PA
122502017-04-25 Pedro Alves <palves@redhat.com>
12251
12252 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12253 (BothAreRelocatable, memcopy, memmove): Don't define.
12254 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12255 macros.
12256
b0b92aeb
PA
122572017-04-25 Pedro Alves <palves@redhat.com>
12258
12259 * common/common-defs.h: Include "common/poison.h".
12260 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12261 and adjust.
12262 * common/poison.h: New file.
12263 * common/traits.h: Include <type_traits>.
12264 (Not, Or, Requires): New, moved from common/function-view.h.
12265
16c4d54a
PA
122662017-04-25 Pedro Alves <palves@redhat.com>
12267
12268 * breakpoint.h (struct breakpoint): In-class initialize all
12269 fields. Make boolean fields "bool".
12270 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12271 memset call and initializations no longer necessary.
12272
b5c36682
PA
122732017-04-25 Pedro Alves <palves@redhat.com>
12274
12275 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12276 reference.
12277 (pt_btrace_insn): New function.
12278 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12279
5625a286
PA
122802017-04-25 Pedro Alves <palves@redhat.com>
12281
12282 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12283 "base" field and inherit from "bp_location" instead. Add
12284 non-default ctor.
12285 (allocate_location_exception): Use new non-default ctor.
12286 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12287 (init_bp_location): Convert to ...
12288 (bp_location::bp_location): ... this new ctor, and remove memset
12289 call.
12290 (base_breakpoint_allocate_location): Use the new non-default ctor.
12291 * breakpoint.h (bp_location): Now a class. Declare default and
12292 non-default ctors. In-class initialize all members.
12293 (init_bp_location): Remove declaration.
12294
23bcc18f
PA
122952017-04-25 Pedro Alves <palves@redhat.com>
12296
12297 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12298 assignment operator.
12299
e1ba3053
YQ
123002017-04-24 Yao Qi <yao.qi@linaro.org>
12301
12302 * doublest.c (convert_doublest_to_floatformat): Call
12303 floatformat_totalsize_bytes.
12304
10f489e5
TT
123052017-04-22 Tom Tromey <tom@tromey.com>
12306
12307 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12308 ui_out_emit_list.
12309 * stack.c (print_frame): Use ui_out_emit_list.
12310 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12311 ui_out_emit_list.
12312 * mi/mi-main.c (print_one_inferior)
12313 (mi_cmd_data_list_register_names)
12314 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12315 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12316 ui_out_emit_list.
12317 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12318 (mi_output_solib_attribs): Use ui_out_emit_list,
12319 ui_out_emit_tuple.
12320 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12321 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12322 (mi_cmd_stack_list_args, list_args_or_locals): Use
12323 ui_out_emit_list.
12324 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12325 * breakpoint.c (print_solib_event, output_thread_groups): Use
12326 ui_out_emit_list.
12327
0092b74d
TT
123282017-04-22 Tom Tromey <tom@tromey.com>
12329
12330 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12331 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12332 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12333
a14a62dd
TT
123342017-04-22 Tom Tromey <tom@tromey.com>
12335
12336 * tracepoint.c (tvariables_info_1)
12337 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12338
46b9c129
TT
123392017-04-22 Tom Tromey <tom@tromey.com>
12340
12341 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12342 annotate_arg_emitter.
12343 * breakpoint.c (print_mention_watchpoint)
12344 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12345 * annotate.h (struct annotate_arg_emitter): New.
12346
2e783024
TT
123472017-04-22 Tom Tromey <tom@tromey.com>
12348
12349 * record-btrace.c (record_btrace_insn_history)
12350 (record_btrace_insn_history_range, record_btrace_call_history)
12351 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12352 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12353 ui_out_emit_tuple.
12354 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12355 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12356 * skip.c (skip_info): Use ui_out_emit_tuple.
12357 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12358 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12359 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12360 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12361 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12362 ui_out_emit_tuple.
12363 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12364 (output_register, mi_cmd_data_read_memory)
12365 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12366 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12367 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12368 Use ui_out_emit_tuple.
12369 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12370 ui_out_emit_tuple.
12371 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12372 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12373 * linux-thread-db.c (info_auto_load_libthread_db): Use
12374 ui_out_emit_tuple.
12375 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12376 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12377 * disasm.c (do_mixed_source_and_assembly_deprecated)
12378 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12379 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12380 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12381 * breakpoint.c (print_one_breakpoint_location)
12382 (print_one_breakpoint): Use ui_out_emit_tuple.
12383 * auto-load.c (print_script, info_auto_load_cmd): Use
12384 ui_out_emit_tuple.
12385 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12386
9be21bb4
SM
123872017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12388
12389 * thread.c (print_thread_info_1): Remove dead code.
12390
0d4c07af
JK
123912017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12392
12393 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12394 GDB_SELF_TEST.
12395 * arm-tdep.c (selftests::arm_record_test): Likewise.
12396
4daf993d
YQ
123972017-04-21 Yao Qi <yao.qi@linaro.org>
12398
12399 * regcache.c (regcache_restore): Remove argument 2. Replace
12400 argument 3 with regcache. Get register status from
12401 src->register_status and get register contents from
12402 register_buffer (src, regnum).
12403 (regcache_cpy): Update.
12404
a6c21d4a
PA
124052017-04-19 Pedro Alves <palves@redhat.com>
12406
12407 * gdbthread.h (thread): Add missing closing parenthesis in
12408 comment.
12409
3a3fd0fd
PA
124102017-04-19 Pedro Alves <palves@redhat.com>
12411
12412 * common/refcounted-object.h: New file.
12413 * gdbthread.h: Include "common/refcounted-object.h".
12414 (thread_info): Inherit from refcounted_object and add comments.
12415 (thread_info::incref, thread_info::decref)
12416 (thread_info::m_refcount): Delete.
12417 (thread_info::deletable): Use the refcounted_object::refcount()
12418 method.
12419 * inferior.c (current_inferior_): Add comment.
12420 (set_current_inferior): Increment/decrement refcounts.
12421 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12422 not-deletable instead of comparing with the current inferior.
12423 (initialize_inferiors): Increment the initial inferior's refcount.
12424 * inferior.h (struct inferior): Forward declare.
12425 Include "common/refcounted-object.h".
12426 (current_inferior, set_current_inferior): Move declaration to
12427 before struct inferior's definition, and fix comment.
12428 (inferior): Inherit from refcounted_object. Add comments.
12429 * thread.c (switch_to_thread_no_regs): Reference the thread's
12430 inferior pointer directly instead of doing a ptid lookup.
12431 (switch_to_no_thread): New function.
12432 (switch_to_thread(thread_info *)): New function, factored out
12433 from ...
12434 (switch_to_thread(ptid_t)): ... this.
12435 (restore_current_thread): Delete.
12436 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12437 fields, and add 'inf' field.
12438 (do_restore_current_thread_cleanup): Check whether old->inf is
12439 alive instead of looking up an inferior by ptid. Use
12440 switch_to_thread and switch_to_no_thread.
12441 (restore_current_thread_cleanup_dtor): Use old->inf directly
12442 instead of lookup up an inferior by id. Decref the inferior.
12443 Don't restore 'removable'.
12444 (make_cleanup_restore_current_thread): Same the inferior pointer
12445 in old, instead of the inferior number. Incref the inferior.
12446 Don't save/clear 'removable'.
12447
9bcb1f16
PA
124482017-04-19 Pedro Alves <palves@redhat.com>
12449
12450 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12451 unittests/scoped_restore-selftests.c.
12452 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12453 * common/scoped_restore.h (scoped_restore_base): Make "class".
12454 (scoped_restore_base::release): New public method.
12455 (scoped_restore_base::scoped_restore_base): New protected ctor.
12456 (scoped_restore_base::m_saved_var): New protected field.
12457 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12458 scoped_restore_base base class instead of m_saved_var directly.
12459 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12460 (scoped_restore_tmpl::scoped_restore_tmpl(const
12461 scoped_restore_tmpl<T>&)): Likewise.
12462 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12463 method.
12464 (scoped_restore_tmpl::saved_var): New method.
12465 (scoped_restore_tmpl::m_saved_var): Delete.
12466 * inferior.h (inferior::detaching): Now a bool.
12467 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12468 cleanup.
12469 * unittests/scoped_restore-selftests.c: New file.
12470
26fcd539
PA
124712017-04-19 Pedro Alves <palves@redhat.com>
12472
12473 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12474 Re-sort in alphabetic order.
12475
fdd243b0
PA
124762017-04-18 Pedro Alves <palves@redhat.com>
12477
12478 * xml-support.c (obstack_xml_printf): Delete.
12479 * xml-support.h (obstack_xml_printf): Delete.
12480
4895cde2
PA
124812017-04-18 Pedro Alves <palves@redhat.com>
12482
12483 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12484 vdebug, verror, body_text, start_element, end_element, name,
12485 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12486 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12487 is_xinclude>: Make private and add m_ prefix.
12488 (gdb_xml_parser::body_text): New method, based on ...
12489 (gdb_xml_body_text): ... this. Adjust.
12490 (gdb_xml_parser::vdebug): New method, based on ...
12491 (gdb_xml_debug): ... this. Adjust.
12492 (gdb_xml_parser::verror): New method, based on ...
12493 (gdb_xml_error): ... this. Adjust.
12494 (gdb_xml_parser::start_element): New method, based on ...
12495 (gdb_xml_start_element): ... this. Adjust.
12496 (gdb_xml_start_element_wrapper): Defer to
12497 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12498 (gdb_xml_parser::end_element): New method, based on ...
12499 (gdb_xml_end_element_wrapper): ... this. Adjust.
12500 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12501 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12502 (gdb_xml_parser::use_dtd): New method, based on ...
12503 (gdb_xml_use_dtd): ... this. Adjust.
12504 (gdb_xml_parser::parse): New method, based on ...
12505 (gdb_xml_parse): ... this. Adjust.
12506 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12507 (xinclude_start_include): Adjust to call the parser's name method.
12508 (xml_xinclude_default, xml_xinclude_start_doctype)
12509 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12510 method.
12511 (xml_process_xincludes): Adjust to call parser methods.
12512 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12513 declarations.
12514
bd8a901f
PA
125152017-04-18 Pedro Alves <palves@redhat.com>
12516
12517 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12518 gdb::optional<std::string>.
12519 * xml-support.c: Include <string>.
12520 (scope_level::scope_level(scope_level &&))
12521 (scope_level::~scope_level): Delete.
12522 (scope_level::body): Now a std::string.
12523 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12524 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12525 parameter.
12526 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12527 (xinclude_parsing_data::output): Now a std::string reference.
12528 (xinclude_start_include): Adjust.
12529 (xml_xinclude_default): Adjust.
12530 (xml_process_xincludes): Add 'output' parameter, and return bool.
12531 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12532 and return bool.
12533 * xml-tdesc.c: Include <unordered_map> and <string>.
12534 (tdesc_xml_cache): Delete.
12535 (tdesc_xml_cache_s): Delete.
12536 (xml_cache): Now an std::unordered_map.
12537 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12538 (target_fetch_description_xml): Change return type to
12539 gdb::optional<std::string>, and adjust.
12540 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12541 (target_fetch_description_xml): Change return type to
12542 gdb::optional<std::string>.
12543
d35d1958
PA
125442017-04-18 Pedro Alves <palves@redhat.com>
12545
12546 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12547 unittests/optional-selftests.c.
12548 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12549 * unittests/optional-selftests.c: New file.
12550 * unittests/optional/assignment/1.cc: New file.
12551 * unittests/optional/assignment/2.cc: New file.
12552 * unittests/optional/assignment/3.cc: New file.
12553 * unittests/optional/assignment/4.cc: New file.
12554 * unittests/optional/assignment/5.cc: New file.
12555 * unittests/optional/assignment/6.cc: New file.
12556 * unittests/optional/assignment/7.cc: New file.
12557 * unittests/optional/cons/copy.cc: New file.
12558 * unittests/optional/cons/default.cc: New file.
12559 * unittests/optional/cons/move.cc: New file.
12560 * unittests/optional/cons/value.cc: New file.
12561 * unittests/optional/in_place.cc: New file.
12562 * unittests/optional/observers/1.cc: New file.
12563 * unittests/optional/observers/2.cc: New file.
12564
22796e97
PA
125652017-04-18 Pedro Alves <palves@redhat.com>
12566
12567 * common/gdb_optional.h: Include common/traits.h.
12568 (in_place_t): New type.
12569 (in_place): New constexpr variable.
12570 (optional::optional): Remove member initialization of
12571 m_instantiated.
12572 (optional::optional(in_place_t...)): New constructor.
12573 (optional::~optional): Use reset.
12574 (optional::optional(const optional&)): New.
12575 (optional::optional(const optional&&)): New.
12576 (optional::optional(T &)): New.
12577 (optional::optional(T &&)): New.
12578 (operator::operator=(const optional &)): New.
12579 (operator::operator=(optional &&)): New.
12580 (operator::operator= (const T &))
12581 (operator::operator= (T &&))
12582 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12583 (operator::reset): New.
12584 (operator::m_instantiated):: Add in-class initializer.
12585 * common/traits.h: Include <type_traits>.
12586 (struct And): New types.
12587
a7fc9b61
PA
125882017-04-18 Pedro Alves <palves@redhat.com>
12589
12590 * xml-support.c: Include <vector>.
12591 (scope_level::scope_level(const gdb_xml_element *))
12592 (scope_level::scope_level(scope_level&&)): New.
12593 (scope_level::~scope_level): New.
12594 (scope_level_s): Delete.
12595 (gdb_xml_parser::scopes): Now a std::vector.
12596 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12597 Use std::vector.
12598 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12599 scope cleanup code.
12600 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12601 of the scopes member. Use std::vector::emplace_back.
12602
010151c9
PA
126032017-04-18 Pedro Alves <palves@redhat.com>
12604
12605 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12606 a bool.
12607 (gdb_xml_end_element): Change type of first parameter.
12608 (gdb_xml_cleanup): Rename to ...
12609 (gdb_xml_parser::~gdb_xml_parser): ... this.
12610 (gdb_xml_create_parser_and_cleanup): Delete with ...
12611 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12612 to this new ctor.
12613 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12614 using gdb_xml_create_parser_and_cleanup.
12615 (xinclude_parsing_data): Add ctor/dtor.
12616 (xml_xinclude_cleanup): Delete.
12617 (xml_process_xincludes): Create a local xinclude_parsing_data
12618 instead of heap-allocating one. Create a local gdb_xml_parser
12619 instead of heap-allocating one with
12620 gdb_xml_create_parser_and_cleanup.
12621
d56060f0
JB
126222017-04-18 John Baldwin <jhb@FreeBSD.org>
12623
12624 PR threads/20743
12625 * fbsd-nat.c (resume_one_thread_cb): Remove.
12626 (resume_all_threads_cb): Remove.
12627 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12628 iterate_over_threads.
12629
305d16a9
JB
126302017-04-17 Joel Brobecker <brobecker@adacore.com>
12631
12632 * NEWS: Create a new section for the next release branch.
12633 Rename the section of the current branch, now that it has
12634 been cut.
12635
8bb57231
JB
126362017-04-17 Joel Brobecker <brobecker@adacore.com>
12637
12638 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12639 * version.in: Bump version to 8.0.50.DATE-git.
12640
096c92dd
SDJ
126412017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12642
12643 PR gdb/21385
12644 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12645 independently of the host, and fix build breakage on Cygwin.
12646
0550c955
PA
126472017-04-13 Pedro Alves <palves@redhat.com>
12648
12649 * inferior.c (free_inferior): Convert to ...
12650 (inferior::~inferior): ... this dtor.
12651 (inferior::inferior): New ctor, factored out from ...
12652 (add_inferior_silent): ... here. Allocate the inferior with a new
12653 expression.
12654 (delete_inferior): Call delete instead of free_inferior.
12655 * inferior.h (gdb_environ, continuation): Forward declare.
12656 (inferior): Now a class. Add in-class initialization to all
12657 members. Make boolean fields bool, except 'detaching'.
12658 (inferior::inferior): New explicit ctor.
12659 (inferior::~inferior): New.
12660
e3d60dfc
PA
126612017-04-13 Pedro Alves <palves@redhat.com>
12662
12663 * inferior.c (init_inferior_list): Delete.
12664 * inferior.h (init_inferior_list): Delete.
12665
5fd69d0a
PA
126662017-04-13 Pedro Alves <palves@redhat.com>
12667
12668 PR threads/13217
12669 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12670 (top level): Call it twice, with different thread sets.
12671
c6609450
PA
126722017-04-13 Pedro Alves <palves@redhat.com>
12673
12674 * thread.c: Include <algorithm>.
12675 (thread_array_cleanup): Delete.
12676 (scoped_inc_dec_ref): New class.
12677 (live_threads_count): New function.
12678 (set_thread_refcount): Delete.
12679 (tp_array_compar_ascending): Now a bool.
12680 (tp_array_compar): Convert to a std::sort comparison function.
12681 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12682 and live_threads_count.
12683
2a00d7ce
PA
126842017-04-13 Pedro Alves <palves@redhat.com>
12685
12686 * infrun.c (follow_fork_inferior): Also switch the current
12687 inferior.
12688
441d7c93
PA
126892017-04-13 Pedro Alves <palves@redhat.com>
12690
12691 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12692 before calling create_internal_breakpoint.
12693
808480f6
PA
126942017-04-13 Pedro Alves <palves@redhat.com>
12695
12696 * fork-child.c (execv_argv): New class.
12697 (breakup_args): Refactored as ...
12698 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12699 Copy arguments to storage and replace separators with NULL
12700 terminators in place.
12701 (escape_bang_in_quoted_argument): Adjust to return bool.
12702 (execv_argv::execv_argv): New ctor.
12703 (execv_argv::init_for_shell): New method, factored out from
12704 fork_inferior. Don't strdup strings into the vector.
12705 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12706 Remove free_vector_argv call.
12707
ad3d022a
YQ
127082017-04-13 Yao Qi <yao.qi@linaro.org>
12709
12710 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12711 tdep->rx_psw_type.
12712
e6ddc3bf
YQ
127132017-04-13 Yao Qi <yao.qi@linaro.org>
12714
12715 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12716 * rx-tdep.c (rx_gdbarch_init): Likewise.
12717
bfb8cf90
PA
127182017-04-13 Pedro Alves <palves@redhat.com>
12719
12720 * breakpoint.h (struct breakpoint): Reindent.
12721
f5336ca5
PA
127222017-04-13 Pedro Alves <palves@redhat.com>
12723
12724 * breakpoint.c (bp_location): Rename to ...
12725 (bp_locations): ... this. All references updated.
12726 (bp_location_count): Rename to ...
12727 (bp_locations_count): ... this. All references updated.
12728 (bp_location_placed_address_before_address_max): Rename to ...
12729 (bp_locations_placed_address_before_address_max): ... this. All
12730 references updated.
12731 (bp_location_shadow_len_after_address_max): Rename to ...
12732 (bp_locations_shadow_len_after_address_max): ... this. All
12733 references updated.
12734 (bp_location_compare_addrs): Rename to ...
12735 (bp_locations_compare_addrs): ... this. All references updated.
12736 (bp_location_compare):Rename to ...
12737 (bp_locations_compare): ... this. All references updated.
12738 (bp_location_target_extensions_update): Rename to ...
12739 (bp_locations_target_extensions_update): ... this. All references
12740 updated.
12741
be628ab8
SDJ
127422017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12743
12744 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12745 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12746 'sgtty.h'.
12747 * common/gdb_termios.h: New file, with parts of "terminal.h".
12748 * inflow.c: Include "gdb_termios.h".
12749 * ser-unix.c: Include "gdb_termios.h".
12750 * terminal.h: Move terminal-related defines to
12751 "common/gdb_termios.h".
12752
8e9e35b1
TT
127532017-04-12 Tom Tromey <tom@tromey.com>
12754
12755 * probe.c (parse_probes): Update.
12756 * location.h (delete_event_location): Don't declare.
12757 (event_location_deleter::operator()): Update.
12758 * location.c (event_location_deleter::operator()): Rename from
12759 delete_event_location.
12760 * linespec.h (linespec_result) <location>: Change type to
12761 event_location_up.
12762 * linespec.c (canonicalize_linespec, event_location_to_sals)
12763 (decode_objc): Update.
12764 (linespec_result): Don't call delete_event_location.
12765 * breakpoint.c (create_breakpoints_sal)
12766 (bkpt_probe_create_sals_from_location)
12767 (strace_marker_create_sals_from_location): Update.
12768
16e802b9
TT
127692017-04-12 Tom Tromey <tom@tromey.com>
12770
12771 * linespec.h (struct linespec_result): Add constructor and
12772 destructor.
12773 (init_linespec_result, destroy_linespec_result)
12774 (make_cleanup_destroy_linespec_result): Don't declare.
12775 * linespec.c (init_linespec_result): Remove.
12776 (linespec_result::~linespec_result): Rename from
12777 destroy_linespec_result. Update.
12778 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12779 Remove.
12780 * breakpoint.c (create_breakpoint, break_range_command)
12781 (decode_location_default): Update.
12782 * ax-gdb.c (agent_command_1): Update.
12783
d28cd78a
TT
127842017-04-12 Tom Tromey <tom@tromey.com>
12785
12786 * remote.c (remote_download_tracepoint): Update.
12787 * python/py-breakpoint.c (bppy_get_location): Update.
12788 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12789 (gdbscm_breakpoint_location): Update.
12790 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12791 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12792 Change type to event_location_up.
12793 * breakpoint.c (create_overlay_event_breakpoint)
12794 (create_longjmp_master_breakpoint)
12795 (create_std_terminate_master_breakpoint)
12796 (create_exception_master_breakpoint)
12797 (breakpoint_event_location_empty_p, print_breakpoint_location)
12798 (print_one_breakpoint_location, create_thread_event_breakpoint)
12799 (init_breakpoint_sal, create_breakpoint)
12800 (print_recreate_ranged_breakpoint, break_range_command)
12801 (init_ada_exception_breakpoint, say_where): Update.
12802 (base_breakpoint_dtor): Don't call delete_event_location.
12803 (bkpt_print_recreate, tracepoint_print_recreate)
12804 (dprintf_print_recreate, update_static_tracepoint)
12805 (breakpoint_re_set_default): Update.
12806
711799d5
TT
128072017-04-12 Tom Tromey <tom@tromey.com>
12808
12809 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12810 type of "to_do". Update.
12811 (compute_stack_depth): Use std::vector.
12812
52d214d3
TT
128132017-04-12 Tom Tromey <tom@tromey.com>
12814
12815 * printcmd.c (find_instruction_backward): Use std::vector.
12816
4c404b8b
TT
128172017-04-12 Tom Tromey <tom@tromey.com>
12818
12819 * symfile.c (objfilep): Remove typedef.
12820 (reread_symbols): Use a std::vector.
12821
156d9eab
TT
128222017-04-12 Tom Tromey <tom@tromey.com>
12823
12824 * mi/mi-main.c (exec_direction_forward): Remove.
12825 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12826 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12827 scoped_restore.
12828 * guile/guile.c (guile_repl_command, guile_command)
12829 (gdbscm_execute_gdb_command): Use scoped_restore.
12830 * go-exp.y (go_parse): Use scoped_restore.
12831 * d-exp.y (d_parse): Use scoped_restore.
12832 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12833 * c-exp.y (c_parse): Use scoped_restore.
12834
4d89769a
TT
128352017-04-12 Tom Tromey <tom@tromey.com>
12836
12837 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12838 (mi_parse): Update return type.
12839 (mi_parse_free): Remove.
12840 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12841 (mi_parse::~mi_parse): Rename from mi_parse_free.
12842 (mi_parse_cleanup): Remove.
12843 (mi_parse): Return a unique_ptr. Use new.
12844 * mi/mi-main.c (mi_execute_command): Update.
12845
4b217cc7
TT
128462017-04-12 Tom Tromey <tom@tromey.com>
12847
12848 * location.c (explicit_location_lex_one): Return a
12849 unique_xmalloc_ptr.
12850 (string_to_explicit_location): Update. Remove cleanups.
12851
59d3651b
TT
128522017-04-12 Tom Tromey <tom@tromey.com>
12853
12854 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12855 (compare_value_and_voffset): Change type. Update.
12856 (compute_vtable_size): Change type of "offset_vec".
12857 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12858 (gnuv3_get_typeid): Remove extraneous declaration.
12859
b24b0d6c
TT
128602017-04-12 Tom Tromey <tom@tromey.com>
12861
12862 * charset.h (wchar_iterator): Fix comment.
12863
80a3b8c5
TT
128642017-04-12 Tom Tromey <tom@tromey.com>
12865
12866 * charset.c (iconv_wrapper): New class.
12867 (cleanup_iconv): Remove.
12868 (convert_between_encodings): Use it.
12869
c83dd867
TT
128702017-04-12 Tom Tromey <tom@tromey.com>
12871
12872 * symfile.h (increment_reading_symtab): Update type.
12873 * symfile.c (decrement_reading_symtab): Remove.
12874 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12875 * psymtab.c (psymtab_to_symtab): Update.
12876 * dwarf2read.c (dw2_instantiate_symtab): Update.
12877
0e8621a0
TT
128782017-04-12 Tom Tromey <tom@tromey.com>
12879
12880 * jit.c (struct jit_reader): Declare separately. Add constructor
12881 and destructor. Change type of "handle".
12882 (loaded_jit_reader): Define separately.
12883 (jit_reader_load): Update. New "new".
12884 (jit_reader_unload_command): Use "delete".
12885 * gdb-dlfcn.h (struct dlclose_deleter): New.
12886 (gdb_dlhandle_up): New typedef.
12887 (gdb_dlopen, gdb_dlsym): Update types.
12888 (gdb_dlclose): Remove.
12889 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12890 (gdb_dlsym): Change type of "handle".
12891 (make_cleanup_dlclose): Remove.
12892 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12893 * compile/compile-c-support.c (load_libcc): Update.
12894
67d89901
TT
128952017-04-12 Tom Tromey <tom@tromey.com>
12896
12897 * symtab.h (find_pcs_for_symtab_line): Change return type.
12898 * symtab.c (find_pcs_for_symtab_line): Change return type.
12899 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12900 type of "vec". Update.
12901 (ltpy_get_pcs_for_line): Update.
12902 * linespec.c (decode_digits_ordinary): Update.
12903
93921405
TT
129042017-04-12 Tom Tromey <tom@tromey.com>
12905
12906 * tracepoint.c (actions_command): Update.
12907 * python/python.c (python_command, python_interactive_command):
12908 Update.
12909 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12910 * guile/guile.c (guile_command): Update.
12911 * defs.h (read_command_lines, read_command_lines_1): Return
12912 command_line_up.
12913 (command_lines_deleter): New struct.
12914 (command_line_up): New typedef.
12915 * compile/compile.c (compile_code_command)
12916 (compile_print_command): Update.
12917 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12918 command_line_up.
12919 (make_cleanup_free_command_lines): Remove.
12920 * cli/cli-script.c (get_command_line, read_command_lines_1)
12921 (copy_command_lines): Return command_line_up.
12922 (while_command, if_command, read_command_lines, define_command)
12923 (document_command): Update.
12924 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12925 Remove.
12926 * breakpoint.h (breakpoint_set_commands): Change type of
12927 "commands".
12928 * breakpoint.c (breakpoint_set_commands): Change type of
12929 "commands". Update.
12930 (do_map_commands_command, update_dprintf_command_list)
12931 (create_tracepoint_from_upload): Update.
12932
ffc2605c
TT
129332017-04-12 Tom Tromey <tom@tromey.com>
12934
12935 * tracepoint.c (scope_info): Update.
12936 * spu-tdep.c (spu_catch_start): Update.
12937 * python/python.c (gdbpy_decode_line): Update.
12938 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12939 * python/py-breakpoint.c (bppy_init): Update.
12940 * probe.c (parse_probes): Update.
12941 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12942 * location.h (event_location_deleter): New struct.
12943 (event_location_up): New typedef.
12944 (new_linespec_location, new_address_location, new_probe_location)
12945 (new_explicit_location, copy_event_location)
12946 (string_to_event_location, string_to_event_location_basic)
12947 (string_to_explicit_location): Update return type.
12948 (make_cleanup_delete_event_location): Remove.
12949 * location.c (new_linespec_location, new_address_location)
12950 (new_probe_location, new_explicit_location, copy_event_location):
12951 Return event_location_up.
12952 (delete_event_location_cleanup)
12953 (make_cleanup_delete_event_location): Remove.
12954 (string_to_explicit_location, string_to_event_location_basic)
12955 (string_to_event_location): Return event_location_up.
12956 * linespec.c (canonicalize_linespec, event_location_to_sals)
12957 (decode_line_with_current_source)
12958 (decode_line_with_last_displayed, decode_objc): Update.
12959 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12960 * completer.c (location_completer): Update.
12961 * cli/cli-cmds.c (edit_command, list_command): Update.
12962 * breakpoint.c (create_overlay_event_breakpoint)
12963 (create_longjmp_master_breakpoint)
12964 (create_std_terminate_master_breakpoint)
12965 (create_exception_master_breakpoint)
12966 (create_thread_event_breakpoint): Update.
12967 (init_breakpoint_sal): Update. Remove some dead code.
12968 (create_breakpoint_sal): Change type of "location". Update.
12969 (create_breakpoints_sal, create_breakpoint, break_command_1)
12970 (dprintf_command, break_range_command, until_break_command)
12971 (init_ada_exception_breakpoint)
12972 (strace_marker_create_sals_from_location)
12973 (update_static_tracepoint, trace_command, ftrace_command)
12974 (strace_command, create_tracepoint_from_upload): Update.
12975 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12976 * ax-gdb.c (agent_command_1): Update.
12977
8f10c932
PA
129782017-04-12 Pedro Alves <palves@redhat.com>
12979
12980 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12981 * configure.tgt: Handle i[34567]86-*-go32* and
12982 i[34567]86-*-msdosdjgpp*.
12983 * i386-tdep.c (i386_svr4_reg_to_regnum):
12984 Make extern.
12985 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12986 i386-go32-tdep.c.
12987 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12988 * i386-go32-tdep.c: New file.
12989 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12990 declarations.
12991
0a31ccfb
SM
129922017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12993
12994 * aix-thread.c (pd_status2str): Change return type to const char *.
12995
e9bb3fbb
PA
129962017-04-12 Pedro Alves <palves@redhat.com>
12997
12998 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12999 calls to set_gdbarch_gnu_triplet_regexp.
13000
53375380
PA
130012017-04-12 Pedro Alves <palves@redhat.com>
13002
13003 PR gdb/21323
13004 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13005 New enum value.
13006 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13007 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13008 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13009 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13010 * gdbarch.h, gdbarch.c: Regenerate.
13011 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13012 gdbarch_wchar_bit and gdbarch_wchar_signed.
13013 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13014 * arm-tdep.c (arm_gdbarch_init): Likewise.
13015 * avr-tdep.c (avr_gdbarch_init): Likewise.
13016 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13017 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13018 * i386-tdep.c (i386_go32_init_abi): Likewise.
13019 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13020 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13021 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13022 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13023 * sh-tdep.c (sh_gdbarch_init): Likewise.
13024 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13025 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13026 * windows-tdep.c (windows_init_abi): Likewise.
13027 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13028
53e710ac
PA
130292017-04-12 Pedro Alves <palves@redhat.com>
13030
13031 PR c++/21323
13032 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13033 cplus_primitive_type_char32_t>: New enum values.
13034 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13035 and cplus_primitive_type_char32_t.
13036 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13037 32, use the archtecture's built-in type for char16_t and char32_t,
13038 respectively. Otherwise, fallback to init_integer_type as before,
13039 but make the type unsigned, and issue a complaint.
13040 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13041
ab0538b8
AH
130422017-04-12 Alan Hayward <alan.hayward@arm.com>
13043
5e0e0422 13044 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13045 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13046
5430098f
SDJ
130472017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13048
13049 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13050 'const char *'.
13051
7c5ded6a
SDJ
130522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13053
13054 * common/common-utils.c (free_vector_argv): New function.
13055 * common/common-utils.h: Include <vector>.
13056 (free_vector_argv): New prototype.
13057 * darwin-nat.c (darwin_create_inferior): Rewrite function
13058 prototype in order to constify "exec_file" and accept a
13059 "std::string" for "allargs".
13060 * fork-child.c: Include <vector>.
13061 (breakup_args): Rewrite function, using C++.
13062 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13063 and accept "std::string" for "allargs". Update the code to
13064 calculate "argv" based on "allargs". Update calls to "exec_fun"
13065 and "execvp".
13066 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13067 order to constify "exec_file" and accept a "std::string" for
13068 "allargs".
13069 * go32-nat.c (go32_create_inferior): Likewise.
13070 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13071 * infcmd.c (run_command_1): Constify "exec_file". Use
13072 "std::string" for inferior arguments.
13073 * inferior.h (fork_inferior): Update prototype.
13074 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13075 prototype in order to constify "exec_file" and accept a
13076 "std::string" for "allargs".
13077 * nto-procfs.c (procfs_create_inferior): Likewise.
13078 * procfs.c (procfs_create_inferior): Likewise.
13079 * remote-sim.c (gdbsim_create_inferior): Likewise.
13080 * remote.c (extended_remote_run): Update code to accept
13081 "std::string" as argument.
13082 (extended_remote_create_inferior): Rewrite function prototype in
13083 order to constify "exec_file" and accept a "std::string" for
13084 "allargs".
13085 * rs6000-nat.c (super_create_inferior): Likewise.
13086 (rs6000_create_inferior): Likewise.
13087 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13088 * windows-nat.c (windows_create_inferior): Likewise.
13089
ae0eee42
PA
130902017-04-11 Pedro Alves <palves@redhat.com>
13091
13092 * thread.c: Fix whitespace throughout.
13093
a6acac06
PR
130942017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13095
13096 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13097
64403bd1
AH
130982017-04-11 Alan Hayward <alan.hayward@arm.com>
13099
13100 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13101
a5bef50f
SDJ
131022017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13103
13104 PR gdb/21364
13105 * osdata.c (info_osdata): Check if 'type' is an empty string
13106 instead of NULL.
13107
9295a5a9
PA
131082017-04-10 Pedro Alves <palves@redhat.com>
13109
13110 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13111 (ptid_to_global_thread_id, in_thread_list)
13112 (do_captured_list_thread_ids, set_resumed, set_running)
13113 (set_executing, set_stop_requested, finish_thread_state)
13114 (validate_registers_access, can_access_registers_ptid)
13115 (print_thread_info_1, switch_to_thread)
13116 (do_restore_current_thread_cleanup)
13117 (make_cleanup_restore_current_thread, thread_command)
13118 (thread_name_command): Use operator== instead of ptid_equal.
13119
996812e3
PA
131202017-04-10 Pedro Alves <palves@redhat.com>
13121
13122 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13123 (current_thread_cleanup_chain): Delete.
13124 (restore_current_thread_cleanup_dtor)
13125 (make_cleanup_restore_current_thread): Remove references to
13126 current_thread_cleanup_chain.
13127
845b344f
AH
131282017-04-10 Alan Hayward <alan.hayward@arm.com>
13129
13130 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13131 REG_UNKNOWN.
13132
803bdfe4
YQ
131332017-04-10 Yao Qi <yao.qi@linaro.org>
13134
13135 PR gdb/19942
13136 * gdbthread.h (thread_info::deletable): New method.
13137 (thread_info::incref): New method.
13138 (thread_info::decref): New method.
13139 (thread_info::refcount): Move it to private.
13140 * infrun.c (save_stop_context): Call inc_refcount.
13141 (release_stop_context_cleanup): Likewise.
13142 * thread.c (set_thread_exited): New function.
13143 (init_thread_list): Delete "tp" only it is deletable, otherwise
13144 call set_thread_exited.
13145 (delete_thread_1): Call set_thread_exited.
13146 (current_thread_cleanup) <inferior_pid>: Remove.
13147 <thread>: New field.
13148 (restore_current_thread_ptid_changed): Removed.
13149 (do_restore_current_thread_cleanup): Adjust.
13150 (restore_current_thread_cleanup_dtor): Don't call
13151 find_thread_ptid.
13152 (set_thread_refcount): Use dec_refcount.
13153 (make_cleanup_restore_current_thread): Adjust.
13154 (thread_apply_all_command): Call inc_refcount.
13155 (_initialize_thread): Don't call
13156 observer_attach_thread_ptid_changed.
13157
8c25b497
YQ
131582017-04-10 Yao Qi <yao.qi@linaro.org>
13159
13160 * thread.c (delete_thread_1): Hoist code on marking thread as
13161 exited.
13162
8473b447
SM
131632017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13164
13165 * windows-nat.c (windows_detach): Initialize ptid with
13166 minus_one_ptid.
13167
6670ec13
SM
131682017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13169
13170 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13171
ba2f91bb
AH
131722017-04-07 Alan Hayward <alan.hayward@arm.com>
13173
13174 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13175 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13176 (bfin_pseudo_register_write): Likewise
13177
436252de
SM
131782017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13179
13180 * common/ptid.h (struct ptid): Change to...
13181 (class ptid_t): ... this.
13182 <ptid_t>: New constructors.
13183 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13184 matches>: New methods.
13185 <make_null, make_minus_one>: New static methods.
13186 <pid>: Rename to...
13187 <m_pid>: ...this.
13188 <lwp>: Rename to...
13189 <m_lwp>: ...this.
13190 <tid>: Rename to...
13191 <m_tid>: ...this.
13192 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13193 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13194 as references, move comment to class ptid_t.
13195 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13196 ptid_t static methods.
13197 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13198 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13199 Take ptid arguments as references, implement using ptid_t methods.
13200 * unittests/ptid-selftests.c: New file.
13201 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13202 unittests/ptid-selftests.c.
13203 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13204
0dedf377
TP
132052017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13206
13207 * python/python.c (python_run_simple_file): Cast mode literal to
13208 non-const char pointer as expected by PyFile_FromString.
13209
4e9868d4
SM
132102017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13211
13212 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13213 minus_one_ptid and null_ptid.
13214
9bf2a700
PA
132152017-04-05 Pedro Alves <palves@redhat.com>
13216
13217 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13218 * configure: Regenerate.
13219
a121b7c1
PA
132202017-04-05 Pedro Alves <palves@redhat.com>
13221
13222 * ada-exp.y (yyerror): Constify.
13223 * ada-lang.c (bound_name, get_selections)
13224 (ada_variant_discrim_type)
13225 (ada_variant_discrim_name, ada_value_struct_elt)
13226 (ada_lookup_struct_elt_type, is_unchecked_variant)
13227 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13228 (catch_ada_exception_command_split)
13229 (catch_ada_assert_command_split, catch_assert_command)
13230 (ada_op_name): Constify.
13231 * ada-lang.h (ada_yyerror, get_selections)
13232 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13233 * arc-tdep.c (arc_print_frame_cache): Constify.
13234 * arm-tdep.c (arm_skip_stub): Constify.
13235 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13236 (gen_aggregate_elt_ref): Constify.
13237 * bcache.c (print_bcache_statistics): Constify.
13238 * bcache.h (print_bcache_statistics): Constify.
13239 * break-catch-throw.c (catch_exception_command_1):
13240 * breakpoint.c (struct ep_type_description::description):
13241 Constify.
13242 (add_solib_catchpoint): Constify.
13243 (catch_fork_command_1): Add cast.
13244 (add_catch_command): Constify.
13245 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13246 Constify.
13247 * bsd-uthread.c (bsd_uthread_state): Constify.
13248 * buildsym.c (patch_subfile_names): Constify.
13249 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13250 Constify.
13251 * c-exp.y (yyerror): Constify.
13252 (token::oper): Constify.
13253 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13254 * c-varobj.c (cplus_describe_child): Constify.
13255 * charset.c (find_charset_names): Add cast.
13256 (find_charset_names): Constify array and add const_cast.
13257 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13258 (edit_command): Constify.
13259 * cli/cli-decode.c (lookup_cmd): Constify.
13260 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13261 Constify.
13262 (struct dump_context): Constify.
13263 (add_dump_command, restore_command): Constify.
13264 * cli/cli-script.c (get_command_line): Constify.
13265 * cli/cli-script.h (get_command_line): Constify.
13266 * cli/cli-utils.c (check_for_argument): Constify.
13267 * cli/cli-utils.h (check_for_argument): Constify.
13268 * coff-pe-read.c (struct read_pe_section_data): Constify.
13269 * command.h (lookup_cmd): Constify.
13270 * common/print-utils.c (decimal2str): Constify.
13271 * completer.c (gdb_print_filename): Constify.
13272 * corefile.c (set_gnutarget): Constify.
13273 * cp-name-parser.y (yyerror): Constify.
13274 * cp-valprint.c (cp_print_class_member): Constify.
13275 * cris-tdep.c (cris_register_name, crisv32_register_name):
13276 Constify.
13277 * d-exp.y (yyerror): Constify.
13278 (struct token::oper): Constify.
13279 * d-lang.h (d_yyerror): Constify.
13280 * dbxread.c (struct header_file_location::name): Constify.
13281 (add_old_header_file, add_new_header_file, last_function_name)
13282 (dbx_next_symbol_text, add_bincl_to_list)
13283 (find_corresponding_bincl_psymtab, set_namestring)
13284 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13285 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13286 * defs.h (command_line_input, print_address_symbolic)
13287 (deprecated_readline_begin_hook): Constify.
13288 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13289 Constify.
13290 * event-top.c (handle_line_of_input): Constify and add cast.
13291 * exceptions.c (catch_errors): Constify.
13292 * exceptions.h (catch_errors): Constify.
13293 * expprint.c (print_subexp_standard, op_string, op_name)
13294 (op_name_standard, dump_raw_expression, dump_raw_expression):
13295 * expression.h (op_name, op_string, dump_raw_expression):
13296 Constify.
13297 * f-exp.y (yyerror): Constify.
13298 (struct token::oper): Constify.
13299 (struct f77_boolean_val::name): Constify.
13300 * f-lang.c (f_word_break_characters): Constify.
13301 * f-lang.h (f_yyerror): Constify.
13302 * fork-child.c (fork_inferior): Add cast.
13303 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13304 (new_variant): Constify.
13305 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13306 * gdbarch.c: Regenerate.
13307 * gdbcore.h (set_gnutarget): Constify.
13308 * go-exp.y (yyerror): Constify.
13309 (token::oper): Constify.
13310 * go-lang.h (go_yyerror): Constify.
13311 * go32-nat.c (go32_sysinfo): Constify.
13312 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13313 * guile/scm-cmd.c (cmdscm_function): Constify.
13314 * guile/scm-param.c (pascm_param_value): Constify.
13315 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13316 (h8300sx_register_name): Constify.
13317 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13318 Constify.
13319 * ia64-tdep.c (ia64_register_names): Constify.
13320 * infcmd.c (construct_inferior_arguments): Constify.
13321 (path_command, attach_post_wait): Constify.
13322 * language.c (show_range_command, show_case_command)
13323 (unk_lang_error): Constify.
13324 * language.h (language_defn::la_error)
13325 (language_defn::la_name_of_this): Constify.
13326 * linespec.c (decode_line_2): Constify.
13327 * linux-thread-db.c (thread_db_err_str): Constify.
13328 * lm32-tdep.c (lm32_register_name): Constify.
13329 * m2-exp.y (yyerror): Constify.
13330 * m2-lang.h (m2_yyerror): Constify.
13331 * m32r-tdep.c (m32r_register_names): Constify and make static.
13332 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13333 * m88k-tdep.c (m88k_register_name): Constify.
13334 * macroexp.c (appendmem): Constify.
13335 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13336 (upgrade_type, parse_external, parse_partial_symbols)
13337 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13338 (new_symbol): Constify.
13339 * memattr.c (mem_info_command): Constify.
13340 * mep-tdep.c (register_name_from_keyword): Constify.
13341 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13342 Constify.
13343 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13344 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13345 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13346 cast.
13347 (mi_execute_async_cli_command): Constify.
13348 * mips-tdep.c (mips_register_name): Constify.
13349 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13350 (am33_register_name, am33_2_register_name)
13351 * moxie-tdep.c (moxie_register_names): Constify.
13352 * nat/linux-osdata.c (osdata_type): Constify fields.
13353 * nto-tdep.c (nto_parse_redirection): Constify.
13354 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13355 (lookup_child_selector): Constify.
13356 (objc_methcall::name): Constify.
13357 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13358 (lookup_struct_typedef): Constify.
13359 * objfiles.c (pc_in_section): Constify.
13360 * objfiles.h (pc_in_section): Constify.
13361 * p-exp.y (struct token::oper): Constify.
13362 (yyerror): Constify.
13363 * p-lang.h (pascal_yyerror): Constify.
13364 * parser-defs.h (op_name_standard): Constify.
13365 (op_print::string): Constify.
13366 (exp_descriptor::op_name): Constify.
13367 * printcmd.c (print_address_symbolic): Constify.
13368 * psymtab.c (print_partial_symbols): Constify.
13369 * python/py-breakpoint.c (stop_func): Constify.
13370 (bppy_get_expression): Constify.
13371 * python/py-cmd.c (cmdpy_completer::name): Constify.
13372 (cmdpy_function): Constify.
13373 * python/py-event.c (evpy_add_attribute)
13374 (gdbpy_initialize_event_generic): Constify.
13375 * python/py-event.h (evpy_add_attribute)
13376 (gdbpy_initialize_event_generic): Constify.
13377 * python/py-evts.c (add_new_registry): Constify.
13378 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13379 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13380 * python/py-inferior.c (get_buffer): Add cast.
13381 * python/py-param.c (parm_constant::name): Constify.
13382 * python/py-unwind.c (fprint_frame_id): Constify.
13383 * python/python.c (gdbpy_parameter_value): Constify.
13384 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13385 * remote.c (memory_packet_config::name): Constify.
13386 (show_packet_config_cmd, remote_write_bytes)
13387 (remote_buffer_add_string):
13388 * reverse.c (exec_reverse_once): Constify.
13389 * rs6000-tdep.c (variant::name, variant::description): Constify.
13390 * rust-exp.y (rustyyerror): Constify.
13391 * rust-lang.c (rust_op_name): Constify.
13392 * rust-lang.h (rustyyerror): Constify.
13393 * serial.h (serial_ops::name): Constify.
13394 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13395 (sh_sh3e_register_name, sh_sh2e_register_name)
13396 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13397 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13398 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13399 (sh_sh4al_dsp_register_name): Constify.
13400 * sh64-tdep.c (sh64_register_name): Constify.
13401 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13402 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13403 * stabsread.c (patch_block_stabs, read_type_number)
13404 (ref_map::stabs, ref_add, process_reference)
13405 (symbol_reference_defined, define_symbol, define_symbol)
13406 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13407 (read_one_struct_field, read_struct_fields, read_baseclasses)
13408 (read_tilde_fields, read_struct_type, read_array_type)
13409 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13410 (read_huge_number, read_range_type, read_args, common_block_start)
13411 (find_name_end): Constify.
13412 * stabsread.h (common_block_start, define_symbol)
13413 (process_one_symbol, symbol_reference_defined, ref_add):
13414 * symfile.c (get_section_index, add_symbol_file_command):
13415 * symfile.h (get_section_index): Constify.
13416 * target-descriptions.c (tdesc_type::name): Constify.
13417 (tdesc_free_type): Add cast.
13418 * target.c (find_default_run_target):
13419 (add_deprecated_target_alias, find_default_run_target)
13420 (target_announce_detach): Constify.
13421 (do_option): Constify.
13422 * target.h (add_deprecated_target_alias): Constify.
13423 * thread.c (print_thread_info_1): Constify.
13424 * top.c (deprecated_readline_begin_hook, command_line_input):
13425 Constify.
13426 (init_main): Add casts.
13427 * top.h (handle_line_of_input): Constify.
13428 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13429 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13430 (tfind_command): Rename to ...
13431 (tfind_command_1): ... this and constify.
13432 (tfind_command): New function.
13433 (tfind_end_command, tfind_start_command): Adjust.
13434 (encode_source_string): Constify.
13435 * tracepoint.h (encode_source_string): Constify.
13436 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13437 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13438 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13439 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13440 * tui/tui-win.c (parse_scrolling_args): Constify.
13441 * tui/tui-windata.c (tui_erase_data_content): Constify.
13442 * tui/tui-windata.h (tui_erase_data_content): Constify.
13443 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13444 * tui/tui.c (tui_enable): Add cast.
13445 * utils.c (defaulted_query): Constify.
13446 (init_page_info): Add cast.
13447 (puts_debug, subset_compare): Constify.
13448 * utils.h (subset_compare): Constify.
13449 * varobj.c (varobj_format_string): Constify.
13450 * varobj.h (varobj_format_string): Constify.
13451 * vax-tdep.c (vax_register_name): Constify.
13452 * windows-nat.c (windows_detach): Constify.
13453 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13454 * xml-support.c (gdb_xml_end_element): Constify.
13455 * xml-tdesc.c (tdesc_start_reg): Constify.
13456 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13457 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13458 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13459
995816ba
PA
134602017-04-05 Pedro Alves <palves@redhat.com>
13461
13462 * proc-api.c (struct trans): Constify.
13463 (procfs_note): Constify.
13464 * proc-events.c (struct trans, syscall_table):
13465 * proc-flags.c (struct trans): Constify.
13466 * proc-utils.h (procfs_note): Constify.
13467 * proc-why.c (struct trans): Constify.
13468 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13469 (procfs_detach): Constify.
13470 * sol-thread.c (struct string_map): Constify.
13471 (td_err_string, td_state_string): Constify.
13472
3e83a920
PA
134732017-04-05 Pedro Alves <palves@redhat.com>
13474
13475 * proc-api.c (procfs_filename): Don't initialize
13476 procfs_filename.
13477 (prepare_to_trace): Assume procfs_filename is non-NULL.
13478 (_initialize_proc_api): Give procfs_filename a default value here.
13479
63160a43
PA
134802017-04-05 Pedro Alves <palves@redhat.com>
13481
13482 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13483 'cond_string' parameter.
13484 (extract_exception_regexp): Constify 'string' parameter.
13485 (catch_exception_command_1): Constify.
13486 * breakpoint.c (init_catchpoint)
13487 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13488 parameter.
13489 (ep_parse_optional_if_clause, catch_fork_command_1)
13490 (catch_exec_command_1): Constify.
13491 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13492 parameter.
13493 (ep_parse_optional_if_clause): Constify.
13494 * cli/cli-utils.c (remove_trailing_whitespace)
13495 (check_for_argument): Constify.
13496 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13497 non-const overload.
13498 (check_for_argument): Likewise.
13499
9b2eba3d
PA
135002017-04-05 Pedro Alves <palves@redhat.com>
13501
13502 * event-top.c (command_line_handler): Add cast to execute_command
13503 call.
13504 * record-btrace.c (cmd_record_btrace_bts_start)
13505 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13506 (cmd_record_btrace_start): Add cast to execute_command call.
13507 * record-full.c (record_full_goto_insn):
13508 * record.c (record_start, record_stop): Add cast to
13509 execute_command_to_string calls.
13510 (cmd_record_start): Add cast to execute_command calls.
13511
2adadf51
PA
135122017-04-05 Pedro Alves <palves@redhat.com>
13513
13514 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13515 static inline function.
13516 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13517 array and use gdb_PyArg_ParseTupleAndKeywords.
13518 * python/py-cmd.c (cmdpy_init): Likewise.
13519 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13520 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13521 (infpy_search_memory): Likewise.
13522 * python/py-objfile.c (objfpy_add_separate_debug_file)
13523 (gdbpy_lookup_objfile): Likewise.
13524 * python/py-symbol.c (gdbpy_lookup_symbol)
13525 (gdbpy_lookup_global_symbol): Likewise.
13526 * python/py-type.c (gdbpy_lookup_type): Likewise.
13527 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13528 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13529 Likewise.
13530
0d1f4ceb
PA
135312017-04-05 Pedro Alves <palves@redhat.com>
13532
13533 * python/python-internal.h (gdb_PyGetSetDef): New type.
13534 * python/py-block.c (block_object_getset)
13535 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13536 * python/py-event.c (event_object_getset)
13537 (finish_breakpoint_object_getset): Likewise.
13538 * python/py-inferior.c (inferior_object_getset): Likewise.
13539 * python/py-infthread.c (thread_object_getset): Likewise.
13540 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13541 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13542 * python/py-objfile.c (objfile_getset): Likewise.
13543 * python/py-progspace.c (pspace_getset): Likewise.
13544 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13545 Likewise.
13546 * python/py-record.c (recpy_record_getset): Likewise.
13547 * python/py-symbol.c (symbol_object_getset): Likewise.
13548 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13549 Likewise.
13550 * python/py-type.c (type_object_getset, field_object_getset):
13551 Likewise.
13552 * python/py-value.c (value_object_getset): Likewise.
13553
4d759979
PA
135542017-04-05 Pedro Alves <palves@redhat.com>
13555
13556 * python/python-internal.h (gdb_PyObject_CallMethod)
13557 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13558 New functions.
13559 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13560 (PySys_GetObject, PySys_SetPath): New macros.
13561
fdf9e36f
PA
135622017-04-05 Pedro Alves <palves@redhat.com>
13563
13564 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13565 info_osdata_command.
13566 * osdata.c (info_osdata_command): Rename to ...
13567 (info_osdata): ... this. Constify 'type' parameter, and remove
13568 the 'from_tty' parameter. Accept NULL TYPE.
13569 (info_osdata_command): New function.
13570 * osdata.h (info_osdata_command): Remove declaration.
13571 (info_osdata): New declaration.
13572
9f33b8b7
PA
135732017-04-05 Pedro Alves <palves@redhat.com>
13574
13575 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13576 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13577 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13578 parameter.
13579 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13580 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13581 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13582 parameter.
13583 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13584 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13585 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13586 (mi_cmd_file_list_exec_source_files)
13587 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13588 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13589 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13590 parameter.
13591 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13592 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13593 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13594 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13595 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13596 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13597 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13598 'command' parameter.
13599 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13600 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13601 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13602 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13603 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13604 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13605 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13606 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13607 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13608 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13609 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13610 parameter.
13611 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13612 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13613 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13614 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13615 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13616 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13617 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13618 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13619 (mi_cmd_data_list_changed_registers)
13620 (mi_cmd_data_write_register_values)
13621 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13622 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13623 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13624 (mi_cmd_list_features, mi_cmd_list_target_features)
13625 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13626 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13627 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13628 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13629 (mi_cmd_trace_frame_collected): Constify 'command'
13630 parameter.
13631 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13632 'command' parameter.
13633
67cb5b2d
PA
136342017-04-05 Pedro Alves <palves@redhat.com>
13635
13636 * ada-lang.c (ada_completer_word_break_characters): Now a const
13637 array.
13638 (ada_get_gdb_completer_word_break_characters): Constify.
13639 * completer.c (gdb_completer_command_word_break_characters)
13640 (gdb_completer_file_name_break_characters)
13641 (gdb_completer_quote_characters): Now const arrays.
13642 (get_gdb_completer_quote_characters): Constify.
13643 (set_rl_completer_word_break_characters): New function.
13644 (set_gdb_completion_word_break_characters)
13645 (complete_line_internal): Use it.
13646 * completer.h (get_gdb_completer_quote_characters): Constify.
13647 (set_rl_completer_word_break_characters): Declare.
13648 * f-lang.c (f_word_break_characters): Constify.
13649 * language.c (default_word_break_characters): Constify.
13650 * language.h (language_defn::la_word_break_characters): Constify.
13651 (default_word_break_characters): Constify.
13652 * top.c (init_main): Use set_rl_completer_word_break_characters.
13653
7a114964
PA
136542017-04-05 Pedro Alves <palves@redhat.com>
13655
13656 * aix-thread.c (aix_thread_pid_to_str)
13657 (aix_thread_extra_thread_info): Constify.
13658 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13659 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13660 (bsd_uthread_pid_to_str): Constify.
13661 * corelow.c (core_pid_to_str): Constify.
13662 * darwin-nat.c (darwin_pid_to_str): Constify.
13663 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13664 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13665 Constify.
13666 * gnu-nat.c (gnu_pid_to_str): Constify.
13667 * go32-nat.c (go32_pid_to_str): Constify.
13668 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13669 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13670 * inferior.c (inferior_pid_to_str): Constify.
13671 * linux-nat.c (linux_nat_pid_to_str): Constify.
13672 * linux-tdep.c (linux_core_pid_to_str): Constify.
13673 * linux-thread-db.c (thread_db_pid_to_str)
13674 (thread_db_extra_thread_info): Constify.
13675 * nto-tdep.c (nto_extra_thread_info): Constify.
13676 * nto-tdep.h (nto_extra_thread_info): Constify.
13677 * obsd-nat.c (obsd_pid_to_str): Constify.
13678 * procfs.c (procfs_pid_to_str): Constify.
13679 * ravenscar-thread.c (ravenscar_extra_thread_info)
13680 (ravenscar_pid_to_str): Constify.
13681 * remote-sim.c (gdbsim_pid_to_str): Constify.
13682 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13683 Constify.
13684 * sol-thread.c (solaris_pid_to_str): Constify.
13685 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13686 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13687 * target.c (default_pid_to_str, target_pid_to_str)
13688 (normal_pid_to_str, default_pid_to_str): Constify.
13689 * target.h (target_ops::to_pid_to_str)
13690 (target_ops::to_extra_thread_info): Constify.
13691 (target_pid_to_str, normal_pid_to_str): Constify.
13692 * windows-nat.c (windows_pid_to_str): Constify.
13693 * gdbarch.sh (core_pid_to_str): Constify.
13694 * target-delegates.c: Regenerate.
13695 * gdbarch.h, gdbarch.c: Regenerate.
13696
69bbf465
PA
136972017-04-05 Pedro Alves <palves@redhat.com>
13698
13699 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13700 the memory of the temporary warning_pre_print override.
13701 * utils.c (warning_pre_print): Constify.
13702 * utils.h (warning_pre_print): Constify.
13703
be47f9e8
PA
137042017-04-05 Pedro Alves <palves@redhat.com>
13705
13706 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13707 (shell_command): New function.
13708 (make_command): Use std::string.
13709 (init_cli_cmds): Register shell_command instead of shell_escape.
13710
bde6261a
PA
137112017-04-05 Pedro Alves <palves@redhat.com>
13712
13713 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13714 * tracepoint.c (default_collect): Don't initialize.
13715
b38ef47f
PA
137162017-04-05 Pedro Alves <palves@redhat.com>
13717
13718 * macroexp.c (macro_buffer::shared): Now a bool.
13719 (init_buffer): Update.
13720 (init_shared_buffer): Constify 'addr' parameter.
13721 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13722 casts.
13723
f995bbe8
PA
137242017-04-05 Pedro Alves <palves@redhat.com>
13725
13726 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13727 * disasm.c (set_disassembler_options): Constify local.
13728 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13729
4a596fe2
SDJ
137302017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13731
13732 PR gdb/21352
13733 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13734 option.
13735
2cad08ea
YQ
137362017-04-05 Yao Qi <yao.qi@linaro.org>
13737
13738 * frame.c (frame_unwind_register_unsigned): Call
13739 frame_unwind_register_value.
13740
55a98976
YQ
137412017-04-05 Yao Qi <yao.qi@linaro.org>
13742
13743 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13744 Use gdb_test_multiple, and don't match anchor.
13745
4ac40124
PA
137462017-04-05 Pedro Alves <palves@redhat.com>
13747
13748 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13749 (Write After Approval): Remove Simon Marchi.
13750
c053b654
PA
137512017-04-05 Pedro Alves <palves@redhat.com>
13752
13753 * common/gdb_optional.h (optional::optional): Make constexpr and
13754 initialize m_dummy.
13755
4c7bf4f9
JB
137562017-04-04 John Baldwin <jhb@FreeBSD.org>
13757
13758 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13759 (amd64fbsd_jmp_buf_reg_offset): Remove.
13760 (amd64fbsd_supply_uthread): Remove function.
13761 (amd64fbsd_collect_uthread): Remove function.
13762 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13763 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13764 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13765 (fbsd-nat.c): Update comment.
13766 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13767 (i386fbsd_jmp_buf_reg_offset): Remove.
13768 (i386fbsd_supply_uthread): Remove function.
13769 (i386fbsd_collect_uthread): Remove function.
13770 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13771
1e1a8bef
JB
137722017-04-04 John Baldwin <jhb@FreeBSD.org>
13773
13774 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13775 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13776 * NEWS: Mention that support for FreeBSD/alpha was removed.
13777 * alpha-fbsd-tdep.c: Delete file.
13778 * config/alpha/fbsd.mh: Delete file.
13779 * configure.host: Delete alpha*-*-freebsd* and
13780 alpha*-*-kfreebsd*-gnu.
13781 * configure.tgt: Delete alpha*-*-freebsd* and
13782 alpha*-*-kfreebsd*-gnu.
13783
49907934
JB
137842017-04-04 John Baldwin <jhb@FreeBSD.org>
13785
13786 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13787 amd64bsd_store_inferior_registers): Use ptid from regcache.
13788
6f77053d
PA
137892017-04-04 Pedro Alves <palves@redhat.com>
13790
13791 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13792 data fields, make them private and add "m_" prefixes.
13793 (lnp_state_machine::lnp_state_machine): New ctor.
13794 (record_line, check_line_address, handle_set_discriminator)
13795 (handle_set_address, handle_advance_pc, handle_special_opcode)
13796 (handle_advance_line, handle_set_file, handle_negate_stmt)
13797 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13798 (end_sequence, advance_line): New methods.
13799 (m_gdbarch, m_record_lines_p): New fields.
13800 (lnp_reader_state): Delete.
13801 (dwarf_record_line): Rename to ...
13802 (lnp_state_machine::record_line): ... adjust.
13803 (init_lnp_state_machine): Delete.
13804 (lnp_state_machine::lnp_state_machine): New.
13805 (check_line_address): Rename to ...
13806 (lnp_state_machine::check_line_address): This.
13807 (dwarf_decode_lines_1): Remove reference to "reader_state".
13808 Adjust lnp_state_machine having a non-default ctor. Use bool.
13809 State machine internal state manipulation moved to
13810 lnp_state_machine methods.
13811
9c541725
PA
138122017-04-04 Pedro Alves <palves@redhat.com>
13813
13814 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13815 unittests/offset-type-selftests.c.
13816 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13817 * common/offset-type.h: New file.
13818 * common/preprocessor.h: New file.
13819 * common/traits.h: New file.
13820 * common/valid-expr.h: New file.
13821 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13822 sect_offset and cu_offset strong typedefs throughout.
13823 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13824 typedefs throughout.
13825 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13826 sect_offset and cu_offset strong typedefs throughout.
13827 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13828 typedefs throughout.
13829 * gdbtypes.h: Include "common/offset-type.h".
13830 (cu_offset): Now an offset type (strong typedef) instead of a
13831 struct.
13832 (sect_offset): Likewise.
13833 (union call_site_parameter_u): Rename "param_offset" field to
13834 "param_cu_off".
13835 * unittests/offset-type-selftests.c: New file.
13836
ecfb656c
PA
138372017-04-04 Pedro Alves <palves@redhat.com>
13838
13839 * common/underlying.h: New file.
13840 * dwarf2read.c: Include "common/gdb_optional.h" and
13841 "common/underlying.h".
13842 (dir_index, file_name_index): New types.
13843 (file_entry): Use them.
13844 (file_entry::include): Use to_underlying.
13845 (line_header::add_file_name): Use dir_index.
13846 (read_formatted_entries): Use gdb::optional. Read form before
13847 writting to file_entry.
13848 (dwarf_decode_line_header): Use dir_index.
13849 (lnp_state_machine::current_file): Use to_underlying.
13850 (lnp_state_machine::file): Change type to file_name_index.
13851 (dwarf_record_line): Use to_underlying.
13852 (init_lnp_state_machine): Use file_name_index.
13853 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13854
d194f1fe
PA
138552017-04-04 Pedro Alves <palves@redhat.com>
13856
13857 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13858 operator bool, has_value and get methods.
13859
fff8551c
PA
138602017-04-04 Pedro Alves <palves@redhat.com>
13861
13862 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13863 fields.
13864 (line_header): Initialize all data fields. Change type of
13865 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13866 Change type of include_dirs to std::vector<const char *>. Remove
13867 num_include_dirs, include_dirs_size. Change type of file_names to
13868 std::vector<file_entry>. Remove num_file_names, file_names_size.
13869 (line_header::line_header): New.
13870 (line_header::add_include_dir, line_header::add_file_name): New
13871 methods.
13872 (line_header::include_dir_at): Remove NULL check.
13873 (line_header::file_name_at): Add const overload.
13874 (line_header_up): New unique_ptr typedef.
13875 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13876 std::vector. Remove free_line_header call.
13877 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13878 free_line_header call.
13879 (free_cu_line_header): Delete.
13880 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13881 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13882 Adjust to use std::vector.
13883 (free_line_header): Delete.
13884 (free_line_header_voidp): Use delete.
13885 (add_include_dir): Replace with ...
13886 (line_header::add_include_dir): ... this method. Use std::vector.
13887 (add_file_name): Replace with ...
13888 (line_header::add_file_name): ... this method. Use std::vector.
13889 (add_include_dir_stub): Delete.
13890 (read_formatted_entries): Remove memset.
13891 (dwarf_decode_line_header): Return a line_header_up instead of a
13892 raw pointer. Remove cleanup handling. Pass lambdas to
13893 read_formatted_entries. Adjust to use line_header methods.
13894 (dwarf_decode_lines_1): Adjust to use line_header methods.
13895 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13896 use std::vector.
13897
d62a8ae2
SM
138982017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13899
13900 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13901 instead of struct ptid.
13902
db3a1dc7
AH
139032017-05-04 Alan Hayward <alan.hayward@arm.com>
13904
13905 * frame.c (get_frame_register_bytes): Unwind using value.
13906 (put_frame_register_bytes): Likewise.
13907
b1b45502
IB
139082017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13909
13910 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13911 aggregate-like.
13912
ec13808e
JK
139132017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13914
13915 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13916
12316564
YQ
139172017-03-29 Yao Qi <yao.qi@linaro.org>
13918
13919 * gdbthread.h (struct thread_info): Declare constructor and
13920 destructor. Add some in-class member initializers.
13921 * thread.c (free_thread): Remove.
13922 (init_thread_list): Call delete instead of free_thread.
13923 (new_thread): Call thread_info constructor.
13924 (thread_info::thread_info): New function.
13925 (thread_info::~thread_info): New function.
13926 (delete_thread_1): Call delete instead of free_thread.
13927 (make_cleanup_restore_current_thread): Move tp and frame to
13928 inner block.
13929
fe5f7374
AK
139302017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13931
13932 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13933 (arc_skip_prologue): Likewise.
13934 (arc_make_frame_cache): Likewise.
13935 (arc_pv_get_operand): New function.
13936 (arc_is_in_prologue): Likewise.
13937 (arc_analyze_prologue): Likewise.
13938 (arc_print_frame_cache): Likewise.
13939 (MAX_PROLOGUE_LENGTH): New constant.
13940
eea78757
AK
139412017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13942
13943 * configure.tgt: Add arc-insn.o.
13944 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13945 (dump_arc_instruction_command): New function.
13946 (arc_fprintf_disasm): Likewise.
13947 (arc_disassemble_info): Likewise.
13948 (arc_insn_get_operand_value): Likewise.
13949 (arc_insn_get_operand_value_signed): Likewise.
13950 (arc_insn_get_memory_base_reg): Likewise.
13951 (arc_insn_get_memory_offset): Likewise.
13952 (arc_insn_get_branch_target): Likewise.
13953 (arc_insn_dump): Likewise.
13954 (arc_insn_get_linear_next_pc): Likewise.
13955 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13956 (arc_disassemble_info): Likewise.
13957 (arc_insn_get_branch_target): Likewise.
13958 (arc_insn_get_linear_next_pc): Likewise.
13959 * NEWS: Mention new "maint print arc arc-instruction".
13960
3be78afd
AK
139612017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13962
13963 * arc-tdep (maintenance_print_arc_list): New variable.
13964 (maintenance_print_arc_command): New function.
13965
296ec4fa
AK
139662017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13967
13968 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13969 Add "limm" and "reserved".
13970 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13971 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13972 * arc-tdep.h (arc_regnum): Likewise.
13973
f74f865e
MF
139742017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13975
13976 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13977 for THREADPTR register.
13978 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13979 register.
13980 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13981 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13982 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13983
0d0bf81a
MF
139842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13985
13986 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13987 registers above gdbarch_num_regs (gdbarch) as privileged in
13988 call0 ABI.
13989
0ce4291e
MF
139902017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13991
13992 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13993 for a single specified register or for all registers in
13994 a0_base..a0_base + C0_NREGS range.
13995 (supply_gregset_reg): Call regcache_raw_supply for a single
13996 specified register or for all registers in a0_base..a0_base +
13997 C0_NREGS range.
13998
c56054f9
MF
139992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14000
14001 * arch/xtensa.h (C0_NREGS): Add definition.
14002 * xtensa-tdep.c (C0_NREGS): Remove definition.
14003
a4398628
MF
140042017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14005
14006 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14007 Drop xtensa_default_isa initialization.
14008 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14009
8c43009f
PA
140102017-03-27 Pedro Alves <palves@redhat.com>
14011
14012 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14013 (file_entry::include_dir): New method.
14014 (line_header::include_dir_at, line_header::file_name_at): New
14015 methods.
14016 (setup_type_unit_groups, setup_type_unit_groups)
14017 (psymtab_include_file_name): Simplify using the new methods.
14018 (lnp_state_machine) <the_line_header>: New field.
14019 <file>: Add comment.
14020 (lnp_state_machine::current_file): New method.
14021 (dwarf_record_line): Simplify using the new methods.
14022 (init_lnp_state_machine): Initialize the "the_line_header" field.
14023 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14024 Simplify using the new methods.
14025
a7e80b9e
PA
140262017-03-27 Pedro Alves <palves@redhat.com>
14027
14028 * cp-name-parser.y (make_empty): Delete.
14029 (demangler_special, nested_name, ptr_operator, array_indicator)
14030 (direct_declarator, declarator_1): Use fill_comp instead of
14031 make_empty.
14032
21047726
PA
140332017-03-27 Pedro Alves <palves@redhat.com>
14034
14035 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14036 to ATTRIBUTE_PRINTF.
14037 * solib-target.c (library_list_start_list): Print "string" not
14038 "version".
14039 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14040 gdb_xml_error call.
14041
d721ba37
PA
140422017-03-27 Pedro Alves <palves@redhat.com>
14043
14044 * dwarf2read.c (struct file_and_directory): New.
14045 (dwarf2_get_dwz_file): Adjust to use std::string.
14046 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14047 (find_file_and_directory): Adjust to return a file_and_directory
14048 object.
14049 (read_file_scope): Adjust to use file_and_directory. Remove
14050 make_cleanup/do_cleanups calls.
14051 (open_and_init_dwp_file): Adjust to use std::string. Remove
14052 make_cleanup/do_cleanups calls.
14053 * python/python.c (do_start_initialization): Adjust to ldirname
14054 returning a std::string.
14055 * utils.c (ldirname): Now returns a std::string.
14056 * utils.h (ldirname): Change return type to std::string.
14057 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14058 returning a std::string.
14059 * xml-tdesc.c (file_read_description_xml): Likewise.
14060
ed771251
AH
140612017-03-24 Alan Hayward <alan.hayward@arm.com>
14062
14063 * regcache.c (regcache_debug_print_register): New function.
14064 * regcache.h (regcache_debug_print_register): New declaration.
14065 * target.c (debug_print_register): Remove.
14066 (target_fetch_registers): Call regcache_debug_print_register.
14067 (target_store_registers): Likewise.
14068
568c1b9f
PB
140692017-03-24 Pádraig Brady <pbrady@fb.com>
14070
14071 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14072 reference beyond the 'lh->include_dirs' array before accessing to
14073 it.
14074 (psymtab_include_file_name): Likewise.
14075 (dwarf_decode_lines_1): Likewise.
14076 (dwarf_decode_lines): Likewise.
14077 (file_file_name): Likewise.
14078
3e00d44f
SM
140792017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14080
14081 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14082 inferior_ptid.
14083 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14084 ps_lsetfpregs): Likewise.
14085 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14086 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14087 ps_lsetfpregs): Likewise.
14088 * target.c (target_fetch_registers, target_store_registers):
14089 Remove asserts.
14090
077ae656
AH
140912017-03-23 Alan Hayward <alan.hayward@arm.com>
14092
14093 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14094
1e2b521d
YQ
140952017-03-23 Yao Qi <yao.qi@linaro.org>
14096
14097 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14098 (_initialize_aarch64_tdep): Register it.
14099 (aarch64_record_load_store): Handle PRFM instruction.
14100 (aarch64_process_record_test): New function.
14101
33877125
YQ
141022017-03-23 Yao Qi <yao.qi@linaro.org>
14103
14104 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14105 indentation.
14106
a0eef940
YQ
141072017-03-23 Yao Qi <yao.qi@linaro.org>
14108
14109 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14110
3f2a3564
PR
141112017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14112
14113 python/python.c (do_start_initialization): Fix memory leak.
14114
b67aeab0
SM
141152017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14116
14117 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14118 using get_ptrace_pid.
14119 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14120 inferior_ptid.
14121 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14122 inferior_ptid instead of pid.
14123
ffdbe864
YQ
141242017-03-22 Yao Qi <yao.qi@linaro.org>
14125
14126 * aarch64-tdep.c: Wrap locally used classes in anonymous
14127 namespace.
14128 * arm-tdep.c: Likewise.
14129 * linespec.c: Likewise.
14130 * ui-out.c: Likewise.
14131
9d736fbf
JG
141322017-03-22 Jonah Graham <jonah@kichwacoders.com>
14133
14134 PR gdb/19637
14135 * python/lib/gdb/printer/bound_registers.py: Import sys.
14136
3de88e9a
SM
141372017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14138
14139 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14140 windows_thread_info parameter and use it instead of
14141 current_thread.
14142 (windows_fetch_inferior_registers): Don't set current_thread,
14143 pass the thread to do_windows_fetch_inferior_registers. Use
14144 ptid from regcache instead of inferior_ptid.
14145 (do_windows_store_inferior_registers): Add windows_thread_info
14146 parameter and use it instead of current_thread.
14147 (windows_store_inferior_registers): Don't set current_thread,
14148 pass the thread to do_windows_store_inferior_registers. Use
14149 ptid from regcache instead of inferior_ptid.
14150
0e7b8f61
SM
141512017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14152
14153 * ser-mingw.c (ser_windows_raw): Remove reference to
14154 struct serial::current_timeout.
14155
5badf10a
IR
141562017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14157
14158 PR tdep/20928
14159 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14160 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14161 (sparc64_fsr_type): Fix %fsr decoding.
14162
cee59b3f
TW
141632017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14164
14165 * python/py-record-btrace.c (btpy_insn_data): Change return type
14166 for Python 2.
14167
639a9038
SM
141682017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14169
14170 * spu-linux-nat.c (spu_fetch_inferior_registers,
14171 spu_store_inferior_registers): Use ptid from regcache, set and
14172 restore inferior_ptid.
14173 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14174 Likewise.
14175
bcc0c096
SM
141762017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14177
14178 * i386-linux-nat.c (fetch_register, store_register,
14179 i386_linux_fetch_inferior_registers,
14180 i386_linux_store_inferior_registers): Use ptid from regcache.
14181 * ia64-linux-nat.c (ia64_linux_fetch_register,
14182 ia64_linux_store_register): Likewise.
14183 * inf-ptrace.c (inf_ptrace_fetch_register,
14184 inf_ptrace_store_register): Likewise.
14185 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14186 m32r_linux_store_inferior_registers): Likewise.
14187 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14188 m68kbsd_store_inferior_registers): Likewise.
14189 * m68k-linux-nat.c (fetch_register, store_register,
14190 m68k_linux_fetch_inferior_registers,
14191 m68k_linux_store_inferior_registers): Likewise.
14192 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14193 m88kbsd_store_inferior_registers): Likewise.
14194 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14195 mips_fbsd_store_inferior_registers): Likewise.
14196 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14197 mips64_linux_regsets_store_registers): Likewise.
14198 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14199 mipsnbsd_store_inferior_registers): Likewise.
14200 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14201 mips64obsd_store_inferior_registers): Likewise.
14202 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14203 Likewise.
14204 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14205 ppcfbsd_store_inferior_registers): Likewise.
14206 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14207 ppc_linux_store_inferior_registers): Likewise.
14208 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14209 ppcnbsd_store_inferior_registers): Likewise.
14210 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14211 ppcobsd_store_registers): Likewise.
14212 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14213 Likewise.
14214 * ravenscar-thread.c (ravenscar_fetch_registers,
14215 ravenscar_store_registers, ravenscar_prepare_to_store):
14216 Likewise.
14217 * record-btrace.c (record_btrace_fetch_registers,
14218 record_btrace_store_registers, record_btrace_prepare_to_store):
14219 Likewise.
14220 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14221 Lookup inferior using ptid from regcache, instead of
14222 current_inferior.
14223 * remote.c (remote_fetch_registers, remote_store_registers): Use
14224 ptid from regcache.
14225 * rs6000-nat.c (fetch_register, store_register): Likewise.
14226 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14227 s390_linux_store_inferior_registers): Likewise.
14228 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14229 shnbsd_store_inferior_registers): Likewise.
14230 * sol-thread.c (sol_thread_fetch_registers,
14231 sol_thread_store_registers): Likewise.
14232 * sparc-nat.c (sparc_fetch_inferior_registers,
14233 sparc_store_inferior_registers): Likewise.
14234 * tilegx-linux-nat.c (fetch_inferior_registers,
14235 store_inferior_registers): Likewise.
14236 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14237 vaxbsd_store_inferior_registers): Likewise.
14238 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14239 store_xtregs): Likewise.
14240
c0f55cc6
AV
142412017-03-20 Artemiy Volkov <artemiyv@acm.org>
14242
14243 PR gdb/14441
14244 * NEWS: Mention support for rvalue references in GDB and python.
14245 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14246 supports both lvalue and rvalue references.
14247
15c0a2a9
AV
142482017-03-20 Artemiy Volkov <artemiyv@acm.org>
14249
14250 PR gdb/14441
14251 * gdbtypes.c (rank_one_type): Implement overloading
14252 resolution rules regarding rvalue references.
14253
aa006118
AV
142542017-03-20 Artemiy Volkov <artemiyv@acm.org>
14255
14256 PR gdb/14441
14257 * aarch64-tdep.c (aarch64_type_align)
14258 (aarch64_extract_return_value, aarch64_store_return_value): Change
14259 lvalue reference type checks to general reference type checks.
14260 * amd64-tdep.c (amd64_classify): Likewise.
14261 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14262 Likewise.
14263 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14264 (arm_store_return_value): Likewise.
14265 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14266 * c-typeprint.c (c_print_type): Likewise.
14267 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14268 (cplus_number_of_children, cplus_describe_child): Likewise.
14269 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14270 * completer.c (expression_completer): Likewise.
14271 * cp-support.c (make_symbol_overload_list_adl_namespace):
14272 Likewise.
14273 * darwin-nat-info.c (info_mach_region_command): Likewise.
14274 * dwarf2loc.c (entry_data_value_coerce_ref)
14275 (value_of_dwarf_reg_entry): Likewise.
14276 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14277 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14278 Likewise.
14279 * findvar.c (extract_typed_address, store_typed_address):
14280 Likewise.
14281 * gdbtypes.c (rank_one_type): Likewise.
14282 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14283 * infcall.c (value_arg_coerce): Likewise.
14284 * language.c (pointer_type): Likewise.
14285 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14286 Likewise.
14287 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14288 * mn10300-tdep.c (mn10300_type_align): Likewise.
14289 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14290 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14291 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14292 Likewise.
14293 * printcmd.c (print_formatted, x_command): Likewise.
14294 * python/py-type.c (typy_get_composite, typy_template_argument):
14295 Likewise.
14296 * python/py-value.c (valpy_referenced_value)
14297 (valpy_get_dynamic_type, value_has_field): Likewise.
14298 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14299 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14300 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14301 * spu-tdep.c (spu_scalar_value_p): Likewise.
14302 * symtab.c (lookup_symbol_aux): Likewise.
14303 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14304 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14305 Likewise.
14306 * valops.c (value_cast_pointers, value_cast)
14307 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14308 (value_struct_elt, value_struct_elt_bitpos)
14309 (value_find_oload_method_list, find_overload_match)
14310 (value_rtti_indirect_type): Likewise.
14311 * valprint.c (val_print_scalar_type_p, generic_val_print):
14312 Likewise.
14313 * value.c (value_actual_type, value_as_address, unpack_long)
14314 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14315 (coerce_ref): Likewise.
14316 * varobj.c (varobj_get_value_type): Likewise.
14317
3fcf899d
AV
143182017-03-20 Artemiy Volkov <artemiyv@acm.org>
14319
14320 PR gdb/14441
14321 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14322 table of constants.
14323 * python/lib/gdb/command/explore.py: Support exploring values
14324 of rvalue reference types.
14325 * python/lib/gdb/types.py: Implement get_basic_type() for
14326 rvalue reference types.
14327 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14328 constant.
14329 * python/py-value.c (valpy_getitem): Add an rvalue reference
14330 check.
14331 (valpy_reference_value): Add new parameter "refcode".
14332 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14333 New wrappers for valpy_reference_value().
14334 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14335 (gdbpy_invoke_xmethod): Likewise.
14336
4297a3f0
AV
143372017-03-20 Artemiy Volkov <artemiyv@acm.org>
14338
14339 PR gdb/14441
14340 * dwarf2read.c (process_die, read_type_die_1): Handle the
14341 DW_TAG_rvalue_reference_type DIE.
14342 (read_tag_reference_type): Add new parameter "refcode".
14343
e1cb3213
AV
143442017-03-20 Artemiy Volkov <artemiyv@acm.org>
14345
14346 PR gdb/14441
14347 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14348 (c_type_print_modifier, c_type_print_varspec_suffix)
14349 (c_type_print_base): Support printing rvalue reference types.
14350 * c-valprint.c (c_val_print, c_value_print): Support printing
14351 rvalue reference values.
14352
e4347c89
AV
143532017-03-20 Artemiy Volkov <artemiyv@acm.org>
14354
14355 PR gdb/14441
14356 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14357 typename.
14358 * cp-support.c (replace_typedefs): Handle
14359 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14360 * python/py-type.c (typy_lookup_type): Likewise.
14361
53cc15f5
AV
143622017-03-20 Artemiy Volkov <artemiyv@acm.org>
14363
14364 PR gdb/14441
14365 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14366 * parse.c (insert_type): Change assert statement.
14367 (follow_types): Handle rvalue reference types.
14368 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14369 constant.
14370
a65cfae5
AV
143712017-03-20 Artemiy Volkov <artemiyv@acm.org>
14372
14373 PR gdb/14441
14374 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14375 value_ref() interface.
14376 * c-valprint.c (c_value_print): Likewise.
14377 * infcall.c (value_arg_coerce): Likewise.
14378 * python/py-value.c (valpy_reference_value): Likewise.
14379 * valops.c (value_cast, value_reinterpret_cast)
14380 (value_dynamic_cast, typecmp): Likewise.
14381 (value_ref): Parameterize by kind of return value reference type.
14382 * value.h (value_ref): Add new parameter "refcode".
14383
3b224330
AV
143842017-03-20 Artemiy Volkov <artemiyv@acm.org>
14385
14386 PR gdb/14441
14387 * dwarf2read.c (read_tag_reference_type): Use
14388 lookup_lvalue_reference_type() instead of lookup_reference_type().
14389 * eval.c (evaluate_subexp_standard): Likewise.
14390 * f-exp.y: Likewise.
14391 * gdbtypes.c (make_reference_type, lookup_reference_type):
14392 Generalize with rvalue reference types.
14393 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14394 convenience wrappers for lookup_reference_type().
14395 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14396 reference kind parameter.
14397 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14398 wrappers for lookup_reference_type().
14399 * guile/scm-type.c (gdbscm_type_reference): Use
14400 lookup_lvalue_reference_type() instead of lookup_reference_type().
14401 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14402 * parse.c (follow_types): Likewise.
14403 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14404 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14405 Likewise.
14406 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14407 (gdbpy_invoke_xmethod): Likewise.
14408 * stabsread.c: Provide extra argument to make_reference_type()
14409 call.
14410 * valops.c (value_ref, value_rtti_indirect_type): Use
14411 lookup_lvalue_reference_type() instead of lookup_reference_type().
14412
f9aeb8d4
AV
144132017-03-20 Artemiy Volkov <artemiyv@acm.org>
14414
14415 PR gdb/14441
14416 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14417 (TYPE_IS_REFERENCE): New macro.
14418 (struct type): Add rvalue_reference_type field.
14419 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14420
51457a05
MAL
144212017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14422
14423 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14424 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14425 New function definition.
14426 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14427 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14428 New function declaration.
14429 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14430 * mi/mi-interp.h: New file.
14431 * solib.c (info_sharedlibrary_command): Replace for loop with
14432 ALL_SO_LIBS macro
14433 * solib.h (update_solib_list): New function declaration.
14434 (so_list_head): Move macro.
14435 * solist.h (ALL_SO_LIBS): New macro.
14436
e696b3ad
MAL
144372017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14438
14439 * infcmd.c (post_create_inferior): Remove unused argument in
14440 call to solib_add.
14441 * remote.c (remote_start_remote): Likewise.
14442 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14443 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14444 (enable_break): Likewise.
14445 * solib.c (update_solib_list): Remove unused target argument
14446 and its documentation.
14447 (solib_add): Remove unused target argument. Remove unused
14448 argument in call to update_solib_list.
14449 (info_sharedlibrary_command): Remove unused argument in call
14450 to update_solib_list.
14451 (sharedlibrary_command): Remove unused argument in call to
14452 solib_add.
14453 (handle_solib_event): Likewise.
14454 (reload_shared_libraries): Likewise.
14455 * solib.h (solib_add): Remove unused target argument.
14456
dcb84eda
AA
144572017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14458
14459 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14460 (s390_displaced_step_fixup): Cover relative branches with the
14461 default fixup handling. This fixes lack of support for some
14462 relative branch instructions.
14463
d9cb6cdc
SM
144642017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14465
14466 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14467 ptid from regcache.
14468
1afaf9f4
SM
144692017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14470
14471 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14472 i386_darwin_store_inferior_registers): Use ptid from regcache.
14473
aac12e24
SM
144742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14475
14476 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14477 i386bsd_store_inferior_registers): Use ptid from regcache.
14478
bbe1eef1
SM
144792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14480
14481 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14482 hppaobsd_store_registers): Use ptid from regcache.
14483
10799020
SM
144842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14485
14486 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14487 hppanbsd_store_registers): Use ptid from regcache.
14488
00204cf7
SM
144892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14490
14491 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14492 from regcache. Use get_ptrace_pid.
14493
11a33714
SM
144942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14495
14496 * corelow.c (get_core_register_section): Use ptid from regcache,
14497 update doc.
14498
317cd492
SM
144992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14500
14501 * bsd-uthread.c (bsd_uthread_fetch_registers,
14502 bsd_uthread_store_registers): Use ptid from regcache, set and
14503 restore inferior_ptid.
14504
9ac8a7c2
SM
145052017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14506
14507 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14508 fetch_fp_regs, store_register, store_regs, store_fp_register,
14509 store_fp_regs): Use ptid from regcache.
14510
4ac4bb6a
SM
145112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14512
14513 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14514 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14515 store_vfp_regs): Use ptid from regcache.
14516
9bcbdca8
PA
145172017-03-17 Pedro Alves <palves@redhat.com>
14518
14519 PR remote/21188
14520 * ser-base.c (ser_base_wait_for): Add comment.
14521 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14522 version.
14523 * ser-unix.c (hardwire_raw): Remove reference to
14524 scb->current_timeout.
14525 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14526 (hardwire_ops): Install ser_base_readchar instead of
14527 hardwire_readchar.
14528 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14529 Remove fields.
14530
7503099f
JG
145312017-03-17 Jonah Graham <jonah@kichwacoders.com>
14532
14533 PR gdb/19637
14534 * python/lib/gdb/printer/bound_registers.py: Add support for
14535 Python 3.
14536
7942e96e
AA
145372017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14538
14539 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14540 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14541 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14542 byte_offset to subobj_byte_offset. Fix the handling of
14543 DWARF_VALUE_STACK on big-endian targets when coming via an
14544 implicit pointer.
14545 (dwarf2_evaluate_loc_desc): Adjust call to
14546 dwarf2_evaluate_loc_desc_full.
14547 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14548 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14549
ba14f379
YQ
145502017-03-16 Yao Qi <yao.qi@linaro.org>
14551
14552 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14553 and REVSH instructions.
14554
b121eeb9
YQ
145552017-03-16 Yao Qi <yao.qi@linaro.org>
14556
14557 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14558 (arm_record_test): Declare.
14559 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14560 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14561 align with the manual.
14562 (thumb_record_misc): Adjust the code order to align with the
14563 manual.
14564 (thumb2_record_decode_insn_handler): Fix instruction matching.
14565 (instruction_reader_thumb): New class.
14566 (arm_record_test): New function.
14567
728a7913
YQ
145682017-03-16 Yao Qi <yao.qi@linaro.org>
14569
14570 * arm-tdep.c (abstract_memory_reader): New class.
14571 (instruction_reader): New class.
14572 (extract_arm_insn): Add argument 'reader'. Callers updated.
14573 (decode_insn): Likewise.
14574
34b43320
DE
145752017-03-16 Doug Evans <dje@google.com>
14576
a7c0469f
DE
14577 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14578 member. Change type of TYPE member to SCM. All uses updated.
14579 (lsscm_make_lazy_string_smob): Add assert.
14580 (lsscm_make_lazy_string): Flag bad length values.
14581 (lsscm_elt_type): New function.
14582 (gdbscm_lazy_string_to_value): Rewrite to use
14583 lsscm_safe_lazy_string_to_value.
14584 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14585 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14586 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14587 in incoming type.
14588 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14589 * guile/scm-type.c (tyscm_scm_to_type): New function.
14590
145912017-03-15 Doug Evans <dje@google.com>
14592
34b43320
DE
14593 PR python/17728, python/18439, python/18779
14594 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14595 member. Change type of TYPE member to PyObject *. All uses updated.
14596 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14597 (gdbpy_create_lazy_string_object): Flag bad length values.
14598 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14599 Handle typedefs in incoming type.
14600 (stpy_lazy_string_elt_type): New function.
14601 (gdbpy_extract_lazy_string): Call it.
14602 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14603 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14604 typedefs in incoming type.
14605
a3a5fecc
DE
146062017-03-16 Doug Evans <dje@google.com>
14607
14608 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14609 * guile/scm-type.c (tyscm_scm_to_type): New function.
14610
28f1c605
JW
146112017-03-16 Jiong Wang <jiong.wang@arm.com>
14612
14613 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14614 "ULONGEST" for "skip".
14615
87c336f6
AA
146162017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14617
14618 PR gdb/21220
14619 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14620 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14621 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14622 over ptrace peek/poke until end of buffer or error.
14623
cf81cf60
SM
146242017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14625
14626 * parse.c (length_of_subexp): Make static.
14627 * parser-defs.h (length_of_subexp): Remove.
14628
a379284a
AA
146292017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14630
14631 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14632 as well.
14633
8a6200ba
PA
146342017-03-14 Pedro Alves <palves@redhat.com>
14635
14636 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14637 (main): Use std::unique_ptr. Remove calls to
14638 cp_demangled_name_parse_free.
14639
f79ec206
SM
146402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14641
14642 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14643 alphabsd_store_inferior_registers): Use regcache->ptid instead
14644 of inferior_ptid.
14645
edb5fb00
SM
146462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14647
14648 * aix-thread.c (aix_thread_fetch_registers,
14649 aix_thread_store_registers): Use regcache->ptid instead of
14650 inferior_ptid.
14651
55119686
SM
146522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14653
14654 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14655 store_gregs_to_thread, fetch_fpregs_from_thread,
14656 store_fpregs_to_thread): Use regcache->ptid instead of
14657 inferior_ptid.
14658
6a06fbb7
SM
146592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14660
14661 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14662 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14663 instead of inferior_ptid.
14664
c6386875
SM
146652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14666
14667 * target.c (target_fetch_registers, target_store_registers): Add
14668 assert.
14669
ddaaf0fb
SM
146702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14671
14672 * regcache.h (regcache_get_ptid): New function.
14673 * regcache.c (regcache_get_ptid): New function.
14674
b9da89d1 146752017-03-13 Mark Wielaard <mark@klomp.org>
14676
14677 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14678
5f4d1085
KS
146792017-03-10 Keith Seitz <keiths@redhat.com>
14680
14681 PR c++/8218
14682 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14683
c65d6b55
PA
146842017-03-08 Pedro Alves <palves@redhat.com>
14685
14686 PR gdb/18360
14687 * infrun.c (start_step_over, do_target_resume, resume)
14688 (restart_threads): Assert we're not resuming a thread that is
14689 meant to be stopped.
14690 (infrun_thread_stop_requested_callback): Delete.
14691 (infrun_thread_stop_requested): If the thread is internally
14692 stopped, queue a pending stop event and clear the thread's
14693 inline-frame state.
14694 (handle_stop_requested): New function.
14695 (handle_syscall_event, handle_inferior_event_1): Use
14696 handle_stop_requested.
14697 (handle_stop_requested): New function.
14698 (handle_signal_stop): Set the thread's stop_signal here instead of
14699 at caller.
14700 (finish_step_over): Clear step over info unconditionally.
14701 (handle_signal_stop): If the user had interrupted the event
14702 thread, consider the stop a random signal.
14703 (handle_signal_stop) <signal arrived while stepping over
14704 breakpoint>: Don't restart threads here.
14705 (stop_waiting): Don't clear step-over info here.
14706
15c22686
PA
147072017-03-08 Pedro Alves <palves@redhat.com>
14708
14709 PR 21206
14710 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14711 goes to argument 2, not 1.
14712
6e5d74e7
PA
147132017-03-08 Pedro Alves <palves@redhat.com>
14714
14715 PR cli/21218
14716 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14717 display_gdb_prompt.
14718 (command_line_input): Add comment.
14719
9753a2f6
PA
147202017-03-08 Pedro Alves <palves@redhat.com>
14721
14722 PR tui/21216
14723 * tui/tui-file.c (tui_file::write): New.
14724 * tui/tui-file.h (tui_file): Override "write".
14725 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14726 factored out from ...
14727 (tui_puts): ... here.
14728 (tui_putc): Use them.
14729 (tui_write): New function.
14730 * tui/tui-io.h (tui_write): Declare.
14731
1672e0d9
SDJ
147322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14733
14734 * Makefile.in (SFILES): Replace "environ.c" with
14735 "common/environ.c".
14736 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14737 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14738 to...
14739 * common/environ.c: ... here.
14740 * environ.h: Moved to...
14741 * common/environ.h: ... here.
14742
f7bb4e3a
PB
147432017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14744
14745 * gdbarch.sh (pstring_ptr): New static function.
14746 (gdbarch_disassembler_options): Use it.
14747 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14748 not valid_disassembler_option->name.
14749 * gdbarch.c: Regenerate.
14750
e45ced6c
PB
147512017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14752
14753 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14754
5f6fd321
PA
147552017-03-07 Pedro Alves <palves@redhat.com>
14756
14757 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14758
6dbb839a 147592017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14760
14761 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14762 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14763 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14764 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14765
d274ecf4
SM
147662017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14767
14768 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14769
df97be55
SM
147702017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14771
14772 * remote.c (remote_add_target_side_commands): Use range-based
14773 for loop.
14774
7d45f3df
YQ
147752017-03-03 Yao Qi <yao.qi@linaro.org>
14776
14777 PR gdb/21165
14778 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14779 value is lazy.
14780 * valprint.c (common_val_print): Likewise.
14781
65b48a81
PB
147822017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14783
14784 * NEWS: Mention new set/show disassembler-options commands.
14785 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14786 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14787 (prospective_options): New static variable.
14788 (gdb_disassembler::gdb_disassembler): Initialize
14789 m_di.disassembler_options.
14790 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14791 (get_disassembler_options): New function.
14792 (set_disassembler_options): Likewise.
14793 (set_disassembler_options_sfunc): Likewise.
14794 (show_disassembler_options_sfunc): Likewise.
14795 (disassembler_options_completer): Likewise.
14796 (_initialize_disasm): Likewise.
14797 * disasm.h (get_disassembler_options): New prototype.
14798 (set_disassembler_options): Likewise.
14799 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14800 (gdbarch_verify_disassembler_options): Likewise.
14801 * gdbarch.c: Regenerate.
14802 * gdbarch.h: Likewise.
14803 * arm-tdep.c (num_disassembly_options): Delete.
14804 (set_disassembly_style): Likewise.
14805 (arm_disassembler_options): New static variable.
14806 (set_disassembly_style_sfunc): Convert short style name into long
14807 option name. Call set_disassembler_options.
14808 (show_disassembly_style_sfunc): New function.
14809 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14810 set_gdbarch_verify_disassembler_options.
14811 (_initialize_arm_tdep): Delete regnames variable and update callers.
14812 (arm_disassembler_options): Initialize.
14813 (disasm_options): New variable.
14814 (num_disassembly_options): Rename from this...
14815 (num_disassembly_styles): ...to this. Compute by scanning through
14816 disasm_options.
14817 (valid_disassembly_styles): Initialize using disasm_options.
14818 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14819 set_arm_regname_option.
14820 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14821 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14822 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14823 set_gdbarch_verify_disassembler_options.
14824 * s390-tdep.c (s390_disassembler_options): New static variable.
14825 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14826 set_gdbarch_verify_disassembler_options.
14827
d538e36d
SM
148282017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14829
14830 * remote.c (remote_add_target_side_condition): Remove "struct"
14831 keyword from range-based for loop.
14832
83621223
SM
148332017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14834
14835 * remote.c (remote_add_target_side_condition): Use range-based
14836 for loop. Update comment.
14837
2123df0e
YQ
148382017-02-27 Yao Qi <yao.qi@linaro.org>
14839
14840 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14841
8e368124
AH
148422017-02-26 Alan Hayward <alan.hayward@arm.com>
14843
14844 * regcache.c (regcache_raw_update): New function.
14845 (regcache_raw_read): Move code to regcache_raw_update.
14846 * regcache.h (regcache_raw_update): New declaration.
14847 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14848
a49dd8dd
JK
148492017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14850
14851 * dwarf2read.c (create_debug_type_hash_table): Initialize
14852 header.signature and header.type_offset_in_tu.
14853
34e4bae9
PA
148542017-02-24 Pedro Alves <palves@redhat.com>
14855
14856 * symtab.c (make_file_symbol_completion_list_1): Use
14857 add_symtab_completions.
14858
b0e4b369
AH
148592017-02-24 Alan Hayward <alan.hayward@arm.com>
14860
14861 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14862
975c21ab
AH
148632017-02-24 Alan Hayward <alan.hayward@arm.com>
14864
14865 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14866 I386_MAX_REGISTER_SIZE.
14867 (i386_pseudo_register_write): Likewise.
14868 (i386_process_record): Likewise.
14869 * i387-tdep.c (i387_supply_xsave): Likewise.
14870 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14871 (store_register): Likewise.
14872
14bc53a8
PA
148732017-02-23 Pedro Alves <palves@redhat.com>
14874
14875 * ada-lang.c: Include "common/function-view.h".
14876 (ada_iterate_over_symbols): Adjust to use function_view as
14877 callback type.
14878 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14879 (ada_make_symbol_completion_list): Use a lambda.
14880 (ada_exc_search_name_matches): Delete.
14881 (name_matches_regex): New.
14882 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14883 * compile/compile-c-support.c: Include "common/function-view.h".
14884 (print_one_macro): Change prototype to accept a ui_file pointer.
14885 (write_macro_definitions): Use a lambda.
14886 * dwarf2read.c: Include "common/function-view.h".
14887 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14888 (dw2_expand_symtabs_matching): Adjust to use function_view as
14889 callback type.
14890 * language.h: Include "common/function-view.h".
14891 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14892 function_view as callback type.
14893 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14894 * linespec.c: Include "common/function-view.h".
14895 (collect_info::add_symbol): New method.
14896 (struct symbol_and_data_callback, iterate_inline_only, struct
14897 symbol_matcher_data, iterate_name_matcher): Delete.
14898 (iterate_over_all_matching_symtabs): Adjust to use function_view
14899 as callback type and lambdas.
14900 (iterate_over_file_blocks): Adjust to use function_view as
14901 callback type.
14902 (decode_compound_collector): Now a class with private fields.
14903 (decode_compound_collector::release_symbols): New method.
14904 (collect_one_symbol): Rename to...
14905 (decode_compound_collector::operator()): ... this and adjust.
14906 (lookup_prefix_sym): decode_compound_collector construction bits
14907 move to decode_compound_collector ctor. Pass the
14908 decode_compound_collector object directly as callback. Remove
14909 cleanups and use decode_compound_collector::release_symbols
14910 instead.
14911 (symtab_collector): Now a class with private fields.
14912 (symtab_collector::release_symtabs): New method.
14913 (add_symtabs_to_list): Rename to...
14914 (symtab_collector::operator()): ... this and adjust.
14915 (collect_symtabs_from_filename): symtab_collector construction
14916 bits move to symtab_collector ctor. Pass the symtab_collector
14917 object directly as callback. Remove cleanups and use
14918 symtab_collector::release_symtabs instead.
14919 (collect_symbols): Delete.
14920 (add_matching_symbols_to_info): Use lambdas.
14921 * macrocmd.c (print_macro_callback): Delete.
14922 (info_macro_command): Use a lambda.
14923 (info_macros_command): Pass print_macro_definition as callable
14924 directly.
14925 (print_one_macro): Remove 'ignore' parameter.
14926 (macro_list_command): Adjust.
14927 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14928 (macro_for_each_data::user_data): Delete field.
14929 (foreach_macro): Adjust to call the function_view.
14930 (macro_for_each): Adjust to use function_view as callback type.
14931 (foreach_macro_in_scope): Adjust to call the function_view.
14932 (macro_for_each_in_scope): Adjust to use function_view as callback
14933 type.
14934 * macrotab.h: Include "common/function-view.h".
14935 (macro_callback_fn): Declare a prototype instead of a pointer.
14936 Remove "user_data" parameter.
14937 (macro_for_each, macro_for_each_in_scope): Adjust to use
14938 function_view as callback type.
14939 * psymtab.c (partial_map_expand_apply)
14940 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14941 Adjust to use function_view as callback type and to return bool.
14942 (psym_expand_symtabs_matching): Adjust to use function_view as
14943 callback types.
14944 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14945 to use function_view as callback type and to return bool.
14946 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14947 callback types.
14948 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14949 as callback types.
14950 * symfile.h: Include "common/function-view.h".
14951 (expand_symtabs_file_matcher_ftype)
14952 (expand_symtabs_symbol_matcher_ftype)
14953 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14954 return bool.
14955 (quick_symbol_functions::map_symtabs_matching_filename)
14956 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14957 function_view as callback type and return bool.
14958 (expand_symtabs_matching): Adjust to use function_view as callback
14959 type.
14960 (maintenance_expand_name_matcher)
14961 (maintenance_expand_file_matcher): Delete.
14962 (maintenance_expand_symtabs): Use lambdas.
14963 * symtab.c (iterate_over_some_symtabs): Adjust to use
14964 function_view as callback types and return bool.
14965 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14966 of a cleanup.
14967 (lookup_symtab_callback): Delete.
14968 (lookup_symtab): Use a lambda.
14969 (iterate_over_symbols): Adjust to use function_view as callback
14970 type.
14971 (struct search_symbols_data, search_symbols_file_matches)
14972 (search_symbols_name_matches): Delete.
14973 (search_symbols): Use a pair of lambdas.
14974 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14975 (symtab_expansion_callback): Delete.
14976 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14977 * symtab.h: Include "common/function-view.h".
14978 (iterate_over_some_symtabs): Adjust to use function_view as
14979 callback type and return bool.
14980 (iterate_over_symtabs): Adjust to use function_view as callback
14981 type.
14982 (symbol_found_callback_ftype): Remove 'data' parameter and return
14983 bool.
14984 (iterate_over_symbols): Adjust to use function_view as callback
14985 type.
14986
07e253aa
PA
149872017-02-23 Pedro Alves <palves@redhat.com>
14988
14989 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14990 (%.o) <unittests/%.c>: New pattern.
14991 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14992 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14993 * common/function-view.h: New file.
14994 * unittests/function-view-selftests.c: New file.
14995 * configure: Regenerate.
14996
8eaf5320
SM
149972017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14998
14999 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15000 inferior_ptid.
15001 * go32-nat.c (go32_thread_alive): Likewise.
15002
38768751
YQ
150032017-02-23 Yao Qi <yao.qi@linaro.org>
15004
15005 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15006 delete.
15007
0a8beaba
YQ
150082017-02-23 Yao Qi <yao.qi@linaro.org>
15009
15010 * varobj.c (varobj_clear_saved_item): Use delete instead of
15011 xfree.
15012 (update_dynamic_varobj_children): Likewise.
15013
58fdfd2c
JK
150142017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15015
15016 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15017
1b90b139
SM
150182017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15019
15020 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15021 m_enum_value to 0 in default constructor.
15022
2039d74e
EBM
150232017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15024
15025 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15026 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15027 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15028 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15029 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15030 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15031 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15032 IS_STORE_CONDITIONAL_INSN.
15033
7814882a
JK
150342017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15035
15036 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15037
0ae60b63
JK
150382017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15039
15040 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15041
0224619f
JK
150422017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15043
15044 * dwarf2read.c (skip_one_die, read_attribute_value)
15045 (dwarf2_const_value_attr, dump_die_shallow)
15046 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15047 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15048
0af92d60
JK
150492017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15050
15051 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15052 (dwarf_parse_macro_header): Accept DWARF version 5.
15053 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15054
216f72a1
JK
150552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15056
15057 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15058 DW_AT_GNU_*.
15059 * common/common-exceptions.h (enum errors): Likewise.
15060 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15061 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15062 (dwarf_expr_context::execute_stack_op): Likewise.
15063 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15064 Likewise.
15065 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15066 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15067 (show_entry_values_debug, call_site_to_target_addr)
15068 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15069 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15070 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15071 (value_of_dwarf_block_entry, indirect_pieced_value)
15072 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15073 (disassemble_dwarf_expression): Likewise.
15074 * dwarf2read.c (process_die, inherit_abstract_dies)
15075 (read_call_site_scope): Likewise.
15076 * gdbtypes.h (struct func_type, struct call_site_parameter)
15077 (struct call_site): Likewise.
15078 * stack.c (read_frame_arg): Likewise.
15079 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15080
43988095
JK
150812017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15082
15083 * defs.h (read_unsigned_leb128): New declaration.
15084 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15085 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15086 (dwarf2_find_location_expression): Call also
15087 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15088 * dwarf2loc.h (dwarf2_version): New declaration.
15089 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15090 rnglists.
15091 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15092 .debug_rnglists.
15093 (struct dwop_section_names): Add loclists_dwo.
15094 (dwop_section_names): Add .debug_loclists.dwo.
15095 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15096 (struct dwarf2_per_cu_data): Add dwarf_version.
15097 (struct dwo_sections): Add loclists.
15098 (struct attr_abbrev): Add implicit_const.
15099 (read_indirect_line_string): New declaration.
15100 (read_unsigned_leb128): Delete declaration.
15101 (rcuh_kind): New definition.
15102 (read_and_check_comp_unit_head): Change parameter
15103 is_debug_types_section to section_kind.
15104 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15105 (read_comp_unit_head): Change parameter abfd to section, add parameter
15106 section_kind. Handle DWARF-5.
15107 (error_check_comp_unit_head): Accept also DWARF version 5.
15108 (read_and_check_comp_unit_head): Change parameter
15109 is_debug_types_section to section_kind.
15110 (read_and_check_type_unit_head): Delete function.
15111 (read_abbrev_offset): Handle DWARF-5.
15112 (create_debug_type_hash_table): Add parameter section_kind. Process
15113 only DW_UT_type. Use signature and type_offset_in_tu from struct
15114 comp_unit_head.
15115 (create_debug_types_hash_table): Update create_debug_type_hash_table
15116 caller.
15117 (create_all_type_units): Call create_debug_type_hash_table.
15118 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15119 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15120 caller.
15121 (skip_one_die): Handle DW_FORM_implicit_const.
15122 (dwarf2_rnglists_process): New function.
15123 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15124 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15125 (read_attribute_value): Handle DW_FORM_implicit_const,
15126 DW_FORM_line_strp.
15127 (read_attribute): Handle DW_FORM_implicit_const.
15128 (read_indirect_string_at_offset_from): New function from
15129 read_indirect_string_at_offset.
15130 (read_indirect_string_at_offset): Call
15131 read_indirect_string_at_offset_from.
15132 (read_indirect_line_string_at_offset): New function.
15133 (read_indirect_string): New function comment.
15134 (read_indirect_line_string): New function.
15135 (read_unsigned_leb128): Make it global.
15136 (dwarf2_string_attr): Handle DWARF-5.
15137 (add_include_dir_stub, read_formatted_entries): New functions.
15138 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15139 Handle DWARF-5.
15140 (per_cu_header_read_in): Update read_comp_unit_head caller.
15141 (dwarf2_version): New function.
15142 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15143 rnglists.
15144 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15145 fields.
15146
22d2f3ab
JK
151472017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15148
15149 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15150
5f46c5a5
JK
151512017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15152
15153 * dwarf2read.c (dwarf2_ranges_process): New function from
15154 dwarf2_ranges_read.
15155 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15156 dwarf2_ranges_process.
15157
78d4d2c5
JK
151582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15159
15160 * dwarf2read.c (create_debug_type_hash_table): New function from
15161 create_debug_types_hash_table.
15162 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15163 (create_all_type_units, open_and_init_dwo_file): Update
15164 create_debug_types_hash_table callers.
15165
1b076f25
SDJ
151662017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15167
15168 PR gdb/16188
15169 * fork-child.c (trace_start_error): Fix thinko. va_end should
15170 refer to 'ap', not 'args'.
15171
0db8980c
SDJ
151722017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15173 Pedro Alves <palves@redhat.com>
15174
15175 PR gdb/16188
15176 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15177 calls succeeded.
15178 * fork-child.c (trace_start_error): New function.
15179 (trace_start_error_with_name): Likewise.
15180 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15181 * inf-ptrace.c (inf_ptrace_me): Likewise.
15182 * inferior.h (trace_start_error): New prototype.
15183 (trace_start_error_with_name): Likewise.
15184
99e8a4f9
SDJ
151852017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15186
15187 PR gdb/21164
15188 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15189 NULL before using it.
15190 * symmisc.c (maintenance_print_symbols): Likewise.
15191 (maintenance_print_msymbols): Likewise.
15192
4e746bb6
TW
151932017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15194
15195 * NEWS: Add record Python bindings entry.
15196
151972017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15198
15199 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15200 py-record-full.o.
15201 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15202 * python/py-record-btrace.c, python/py-record-btrace.h,
15203 python/py-record-full.c, python/py-record-full.h: New file.
15204 * python/py-record.c: Add include for py-record-btrace.h and
15205 py-record-full.h.
15206 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15207 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15208 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15209 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15210 New definition.
15211 (gdbpy_initialize_btrace): New export.
15212 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15213
152142017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15215
15216 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15217 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15218 * python/py-record.c: New file.
15219 * python/python-internal.h (gdbpy_start_recording,
15220 gdbpy_current_recording, gdpy_stop_recording,
15221 gdbpy_initialize_record): New export.
15222 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15223 (python_GdbMethods): Add gdbpy_start_recording,
15224 gdbpy_current_recording and gdbpy_stop_recording.
15225
152262017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15227
15228 * record-btrace.c (record_btrace_record_method): New function.
15229 (init_record_btrace_ops): Initialize to_record_method.
15230 * record-full.c (record_full_record_method): New function.
15231 (init_record_full_ops, init_record_full_core_ops): Add
15232 record_full_record_method.
15233 * record.h (enum record_method): New enum.
15234 * target-debug.h (target_debug_print_enum_record_method: New define.
15235 * target-delegates.c: Regenerate.
15236 * target.c (target_record_method): New function.
15237 * target.h: Include record.h.
15238 (struct target_ops) <to_record_method>: New field.
15239 (target_record_method): New export.
15240
152412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15242
15243 * record.h (record_start, record_stop): New export.
15244 * record.c (record_start, record_stop): New function.
15245
152462017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15247
15248 * btrace.c (btrace_fetch): Copy function call segments pointer
15249 into a vector.
15250 (btrace_clear): Clear the vector.
15251 (btrace_find_insn_by_number): Use binary search to find the correct
15252 function call segment.
15253 * btrace.h (brace_fun_p): New typedef.
15254 (struct btrace_thread_info) <functions>: New field.
15255
152562017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15257
15258 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15259 * btrace.c (btrace_decode_error): ... here. New function.
15260 * btrace.h (btrace_decode_error): New export.
15261
152622017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15263
15264 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15265 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15266 btrace_find_insn_by_number): Remove special case for gaps.
15267 * btrace.h (btrace_insn_get_error): New export.
15268 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15269 * record-btrace.c (btrace_insn_history): Print number for gaps.
15270 (record_btrace_info, record_btrace_goto): Handle gaps.
15271
3f77c769
TT
152722017-02-14 Tom Tromey <tom@tromey.com>
15273
15274 PR python/13598:
15275 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15276 event.
15277 * python/py-evts.c (gdbpy_initialize_py_events): Add
15278 before_prompt registry.
15279 * python/py-events.h (events_object) <before_prompt>: New field.
15280
4c2c7ac6
MM
152812017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15282
15283 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15284
5cf30ebf
LM
152852017-02-13 Luis Machado <lgustavo@codesourcery.com>
15286
15287 * symfile (_initialize_symfile): Add usage text to the load command's
15288 help text.
15289
26a06916
SM
152902017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15291
15292 * utils.c (defaulted_query): Don't query on secondary UIs.
15293
0b145e37
TT
152942017-02-10 Tom Tromey <tom@tromey.com>
15295
15296 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15297
2d8365c4
TT
152982017-02-10 Tom Tromey <tom@tromey.com>
15299
15300 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15301 "cleanup" local.
15302 * python/py-type.c (typy_legacy_template_argument): Remove
15303 unnecessary "cleanup" local.
15304
2bb8f231
TT
153052017-02-10 Tom Tromey <tom@tromey.com>
15306
15307 * python/python.c (do_start_initialization): New function, from
15308 _initialize_python.
15309 (_initialize_python): Call do_start_initialization.
15310 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15311 goto.
15312
1bdfaf42
TT
153132017-02-10 Tom Tromey <tom@tromey.com>
15314
15315 * python/py-prettyprint.c (pretty_print_one_value): Use
15316 gdbpy_ref.
15317
88b6faea
TT
153182017-02-10 Tom Tromey <tom@tromey.com>
15319
15320 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15321 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15322 gdbpy_ref.
15323 * python/py-type.c (field_new): Use gdbpy_ref.
15324 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15325 gdbpy_ref.
15326 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15327 (py_free_pspace): Likewise.
15328 (pspace_to_pspace_object): Likewise.
15329 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15330 (py_free_objfile): Likewise.
15331 (objfile_to_objfile_object): Likewise.
15332 * python/py-inferior.c (delete_thread_object): Use
15333 gdbpy_ref.
15334 (infpy_read_memory): Likewise.
15335 (py_free_inferior): Likewise.
15336 * python/py-evtregistry.c (create_eventregistry_object): Use
15337 gdbpy_ref.
15338 * python/py-event.c (create_event_object): Use gdbpy_ref.
15339
7780f186
TT
153402017-02-10 Tom Tromey <tom@tromey.com>
15341
15342 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15343 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15344 used.
15345 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15346 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15347 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15348 python/py-framefilter.c, python/py-function.c,
15349 python/py-inferior.c, python/py-infevents.c,
15350 python/py-linetable.c, python/py-newobjfileevent.c,
15351 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15352 python/py-signalevent.c, python/py-stopevent.c,
15353 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15354 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15355 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15356 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15357
d4b0bb18
TT
153582017-02-10 Tom Tromey <tom@tromey.com>
15359
15360 * ui-out.h (ui_out_emit_type): New class.
15361 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15362 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15363 and ui_out_emit_tuple.
15364 (enumerate_locals): Likewise.
15365 (py_mi_print_variables, py_print_locals, py_print_args): Use
15366 ui_out_emit_list.
15367 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15368 ui_out_emit_list.
15369 * common/gdb_optional.h: New file.
15370
f67f945c
MG
153712017-02-10 Martin Galvan <martingalvan@sourceware.org>
15372
15373 * MAINTAINERS (Write After Approval): Update my e-mail address.
15374
18da0c51
MG
153752017-02-10 Martin Galvan <martingalvan@sourceware.org>
15376
15377 PR gdb/21122
15378 * breakpoint.c (_initialize_breakpoint): Update the help description
15379 of the 'commands' command to indicate that it takes a list argument.
15380
62c14536
SM
153812017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15382
15383 * interps.c (current_interp_set_logging): Remove "return".
15384
ff6fa247
GB
153852017-02-09 Gary Benson <gbenson@redhat.com>
15386
15387 * symtab.c (add_symtab_completions): Prevent NULL pointer
15388 dereference.
15389
a474bd8e
PA
153902017-02-08 Pedro Alves <palves@redhat.com>
15391
15392 * interps.c (interp::interp): Remove reference to quiet_p.
15393 (interp_set): Make static. Remove dead "Switching to" output
15394 code.
15395 (interp_quiet_p, interp_set_quiet): Delete.
15396 (interpreter_exec_cmd): Don't set the interpreter quiet.
15397 * interps.h (interp_quiet_p): Make static.
15398 (class interp) <quiet_p>: Remove field
15399
3d7b173c
JG
154002017-02-08 Jerome Guitton <guitton@adacore.com>
15401
604c4576
JG
15402 * cli/cli-decode.c (find_command_name_length): Make it extern.
15403 * cli/cli-decode.h (find_command_name_length): Declare.
15404 * cli/cli-script.c (command_name_equals, line_first_arg):
15405 New functions.
15406 (process_next_line): Use cli-decode to parse command names.
15407 (build_command_line): Make args a constant pointer.
15408
154092017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15410
3d7b173c
JG
15411 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15412 Remove case-insensitive search.
15413
1291063d
JM
154142017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15415
15416 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15417 at the end of the line. Avoids an ARI warning.
15418
20b477a7
LM
154192017-02-06 Luis Machado <lgustavo@codesourcery.com>
15420
15421 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15422 rdseed instructions.
15423 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15424
3f7b46f2
IR
154252017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15426
15427 PR tdep/20936
15428 Provide and use sparc32 and sparc64 target description XML files.
15429 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15430 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15431 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15432 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15433 * features/sparc/sparc32-solaris.xml: New file.
15434 * features/sparc/sparc64-solaris.xml: New file.
15435 * features/sparc/sparc32-solaris.c: Generated.
15436 * features/sparc/sparc64-solaris.c: Generated.
15437 * sparc-tdep.h: Account for differences in target descriptions.
15438 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15439 (sparc32_register_type): Use target provided registers.
15440 (validate_tdesc_registers): New function.
15441 (sparc32_gdbarch_init): Use tdesc_has_registers.
15442 Set pseudoregister functions.
15443 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15444 (sparc64_register_type): Use target provided registers.
15445 (sparc64_init_abi): Set pseudoregister functions.
15446
f0fd41c1
TT
154472017-02-03 Tom Tromey <tom@tromey.com>
15448
15449 PR rust/21097:
15450 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15451 with a single member.
15452
d6f9b0fb
PA
154532017-02-03 Pedro Alves <palves@redhat.com>
15454
15455 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15456 (cli_interp_base::~cli_interp_base): New.
15457 (cli_interp): New struct.
15458 (as_cli_interp): Cast the interp itself to cli_interp.
15459 (cli_interpreter_pre_command_loop): Rename to ...
15460 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15461 parameter.
15462 (cli_interpreter_init): Rename to ...
15463 (cli_interp::init): ... this. Remove 'self' parameter. Use
15464 boolean. Make extern.
15465 (cli_interpreter_resume): Rename to ...
15466 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15467 extern.
15468 (cli_interpreter_suspend): Rename to ...
15469 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15470 extern.
15471 (cli_interpreter_exec): Rename to ...
15472 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15473 extern.
15474 (cli_interpreter_supports_command_editing): Rename to ...
15475 (cli_interp_base::supports_command_editing): ... this. Remove
15476 'interp' parameter. Make extern.
15477 (cli_ui_out): Rename to ...
15478 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15479 Make extern.
15480 (cli_set_logging): Rename to ...
15481 (cli_interp_base::set_logging): ... this. Remove 'interp'
15482 parameter. Make extern.
15483 (cli_interp_procs): Delete.
15484 (cli_interp_factory): Adjust to use "new".
15485 * cli/cli-interp.h: Include "interps.h".
15486 (struct cli_interp_base): New struct.
15487 * interps.c (struct interp): Delete. Fields moved to interps.h.
15488 (interp_new): Delete.
15489 (interp::interp, interp::~interp): New.
15490 (interp_set): Use bool, and return void. Assume the interpreter
15491 has suspend, init and resume methods, and that the all return
15492 void.
15493 (set_top_level_interpreter): interp_set returns void.
15494 (interp_ui_out): Adapt.
15495 (current_interp_set_logging): Adapt.
15496 (interp_data): Delete.
15497 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15498 (interp_exec): Adapt.
15499 (top_level_interpreter_data): Delete.
15500 * interps.h (interp_init_ftype, interp_resume_ftype)
15501 (interp_suspend_ftype, interp_exec_ftype)
15502 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15503 (class interp): New.
15504 (interp_new): Delete.
15505 (interp_set): Now returns void. Use bool.
15506 (interp_data, top_level_interpreter_data): Delete.
15507 * mi/mi-common.h: Include interps.h.
15508 (class mi_interp): Inherit from interp. Define a ctor. Declare
15509 init, resume, suspect, exec, interp_ui_out, set_logging and
15510 pre_command_loop methods.
15511 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15512 (mi_interpreter_init): Rename to ...
15513 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15514 bool, return void and make extern. Adjust.
15515 (mi_interpreter_resume): ... Rename to ...
15516 (mi_interp::resume): ... this. Remove the 'data' parameter,
15517 return void and make extern. Adjust.
15518 (mi_interpreter_suspend): ... Rename to ...
15519 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15520 return void and make extern. Adjust.
15521 (mi_interpreter_exec): ... Rename to ...
15522 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15523 extern. Adjust.
15524 (mi_interpreter_pre_command_loop): ... Rename to ...
15525 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15526 parameter and make extern.
15527 (mi_on_normal_stop_1): Adjust.
15528 (mi_ui_out): Rename to ...
15529 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15530 parameter and make extern. Adjust.
15531 (mi_set_logging): Rename to ...
15532 (mi_interp::set_logging): ... this. Remove the 'interp'
15533 parameter and make extern. Adjust.
15534 (mi_interp_procs): Delete.
15535 (mi_interp_factory): Adjust to use 'new'.
15536 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15537 (mi_print_exception, mi_execute_command, mi_load_progress):
15538 Adjust.
15539 * tui/tui-interp.c (tui_interp): New class.
15540 (as_tui_interp): Return a tui_interp pointer.
15541 (tui_on_normal_stop, tui_on_signal_received)
15542 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15543 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15544 to use interp::interp_ui_out.
15545 (tui_init): Rename to ...
15546 (tui_interp::init): ... this. Remove the 'self' parameter, use
15547 bool, return void and make extern. Adjust.
15548 (tui_resume): Rename to ...
15549 (tui_interp::resume): ... this. Remove the 'data' parameter,
15550 return void and make extern. Adjust.
15551 (tui_suspend): Rename to ...
15552 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15553 return void and make extern. Adjust.
15554 (tui_ui_out): Rename to ...
15555 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15556 parameter, and make extern. Adjust.
15557 (tui_exec): Rename to ...
15558 (tui_interp::exec): ... this. Remove the 'data' parameter and
15559 make extern.
15560 (tui_interp_procs): Delete.
15561 (tui_interp_factory): Use "new".
15562
65c40c95
TT
155632017-02-02 Tom Tromey <tom@tromey.com>
15564
15565 * rust-exp.y (ends_raw_string, space_then_number)
15566 (rust_identifier_start_p): Return bool.
15567 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15568 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15569 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15570 (rust_chartype_p): Return bool.
15571 (val_print_struct, rust_print_struct_def, rust_print_type):
15572 Update.
15573 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15574 Return bool.
15575
b50f188d
TT
155762017-02-02 Tom Tromey <tom@tromey.com>
15577
15578 * rust-lang.c: Reindent.
15579
03c85b11
TT
155802017-02-02 Tom Tromey <tom@tromey.com>
15581
15582 * rust-lang.h (rust_crate_for_block): Update.
15583 * rust-lang.c (rust_crate_for_block): Return std::string.
15584 (rust_get_disr_info): Use std:;string, not
15585 gdb::unique_xmalloc_ptr.
15586 * rust-exp.y (crate_name): Update.
15587
9b6da501
PA
155882017-02-02 Pedro Alves <palves@redhat.com>
15589
15590 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15591 field out of gdb_disassembler_test and make it static.
15592
ec4cb20b
PA
155932017-02-02 Pedro Alves <palves@redhat.com>
15594
15595 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15596 mi1_interp and mi_interp fields.
15597
5be5dbf0
PA
155982017-02-02 Pedro Alves <palves@redhat.com>
15599
616268b6
PA
15600 * cli/cli-interp.c (struct saved_output_files, saved_output):
15601 Moved from cli/cli-logging.c.
15602 (cli_set_logging): New function.
15603 (cli_interp_procs): Install cli_set_logging.
15604 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15605 Declare.
15606 * cli/cli-logging.c (struct saved_output_files, saved_output):
15607 Moved to cli/cli-interp.c.
15608 (pop_output_files): Don't save outputs here.
15609 (make_logging_output): New function.
15610 (handle_redirections): Don't build tee nor save previous outputs
15611 here.
15612 * interps.c (current_interp_set_logging): Change prototype.
15613 Assume there's always a set_logging_proc method installed.
15614 * interps.h (interp_set_logging_ftype): Change prototype.
15615 (current_interp_set_logging): Change prototype and adjust comment.
15616 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15617 use make_logging_output.
15618 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
156192017-02-02 Pedro Alves <palves@redhat.com>
15620
5be5dbf0
PA
15621 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15622 from ...
15623 (set_logging_overwrite): ... here.
15624 (logging_no_redirect_file): Delete.
15625 (set_logging_redirect): Don't handle redirection on the fly.
15626 Instead warn that "logging off" / "logging on" is necessary.
15627 (pop_output_files): Delete references to logging_no_redirect_file.
15628 (show_logging_command): Always speak in terms of what will happen
15629 once logging is reenabled.
15630
c99cc448
PA
156312017-02-02 Pedro Alves <palves@redhat.com>
15632
15633 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15634
8b172ce7
PA
156352017-02-02 Pedro Alves <palves@redhat.com>
15636
15637 * disasm.c (gdb_pretty_print_insn): Rename to ...
15638 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15639 Remove gdbarch parameter. Adapt to clear the object's buffers
15640 instead of allocating new buffers, and to print using the object's
15641 gdb_disassembler instead of calling gdb_print_insn.
15642 (dump_insns): Use gdb_pretty_print_disassembler.
15643 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15644 (gdb_pretty_print_disassembler): New class.
15645 * record-btrace.c (btrace_insn_history): Use
15646 gdb_pretty_print_disassembler.
15647
d7e74731
PA
156482017-02-02 Pedro Alves <palves@redhat.com>
15649
15650 * ada-lang.c (type_as_string): Use string_file.
15651 * ada-valprint.c (ada_print_floating): Use string_file.
15652 * ada-varobj.c (ada_varobj_scalar_image)
15653 (ada_varobj_get_value_image): Use string_file.
15654 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15655 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15656 * breakpoint.c (update_inserted_breakpoint_locations)
15657 (insert_breakpoint_locations, reattach_breakpoints)
15658 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15659 (print_it_watchpoint): Use string_file.
15660 (save_breakpoints): Use stdio_file.
15661 * c-exp.y (oper): Use string_file.
15662 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15663 tee_file.
15664 (pop_output_files): Use delete.
15665 (handle_redirections): Use stdio_file and tee_file.
15666 * cli/cli-setshow.c (do_show_command): Use string_file.
15667 * compile/compile-c-support.c (c_compute_program): Use
15668 string_file.
15669 * compile/compile-c-symbols.c (generate_vla_size): Take a
15670 'string_file &' instead of a 'ui_file *'.
15671 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15672 of a 'ui_file *'. Use string_file.
15673 (generate_c_for_variable_locations): Take a 'string_file &'
15674 instead of a 'ui_file *'.
15675 * compile/compile-internal.h (generate_c_for_for_one_variable):
15676 Take a 'string_file &' instead of a 'ui_file *'.
15677 * compile/compile-loc2c.c (push, pushf, unary, binary)
15678 (print_label, pushf_register_address, pushf_register)
15679 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15680 'ui_file *'. Adjust.
15681 * compile/compile.c (compile_to_object): Use string_file.
15682 * compile/compile.h (compile_dwarf_expr_to_c)
15683 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15684 'ui_file *'.
15685 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15686 (replace_typedefs_qualified_name): Use string_file and
15687 obstack_copy0.
15688 * disasm.c (gdb_pretty_print_insn): Use string_file.
15689 (gdb_disassembly): Adjust reference the null_stream global.
15690 (do_ui_file_delete): Delete.
15691 (gdb_insn_length): Use null_stream.
15692 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15693 * dwarf2loc.c (dwarf2_compile_property_to_c)
15694 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15695 'string_file &' instead of a 'ui_file *'.
15696 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15697 * dwarf2read.c (do_ui_file_peek_last): Delete.
15698 (dwarf2_compute_name): Use string_file.
15699 * event-top.c (gdb_setup_readline): Use stdio_file.
15700 * gdbarch.sh (verify_gdbarch): Use string_file.
15701 * gdbtypes.c (safe_parse_type): Use null_stream.
15702 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15703 string_file.
15704 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15705 'string_file *' instead of a 'ui_file *'.
15706 (gdbscm_arch_disassemble): Use string_file.
15707 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15708 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15709 inherits from ui_file.
15710 (ioscm_file_port_delete, ioscm_file_port_rewind)
15711 (ioscm_file_port_put): Delete.
15712 (ioscm_file_port_write): Rename to ...
15713 (ioscm_file_port::write): ... this. Remove file_port_magic
15714 checks.
15715 (ioscm_file_port_new): Delete.
15716 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15717 ui_file_up.
15718 * guile/scm-type.c (tyscm_type_name): Use string_file.
15719 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15720 Use string_file.
15721 * infcmd.c (print_return_value_1): Use string_file.
15722 * infrun.c (print_target_wait_results): Use string_file.
15723 * language.c (add_language): Use string_file.
15724 * location.c (explicit_to_string_internal): Use string_file.
15725 * main.c (captured_main_1): Use null_file.
15726 * maint.c (maintenance_print_architecture): Use stdio_file.
15727 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15728 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15729 event_channel>: Change type to mi_console_file pointer.
15730 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15731 (mi_console_file_delete): Delete.
15732 (struct mi_console_file): Delete.
15733 (mi_console_file_magic): Delete.
15734 (mi_console_file_new): Delete.
15735 (mi_console_file::mi_console_file): New.
15736 (mi_console_file_delete): Delete.
15737 (mi_console_file_fputs): Delete.
15738 (mi_console_file::write): New.
15739 (mi_console_raw_packet): Delete.
15740 (mi_console_file::flush): New.
15741 (mi_console_file_flush): Delete.
15742 (mi_console_set_raw): Rename to ...
15743 (mi_console_file::set_raw): ... this.
15744 * mi/mi-console.h (class mi_console_file): New class.
15745 (mi_console_file_new, mi_console_set_raw): Delete.
15746 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15747 (mi_set_logging): Use delete and tee_file. Adjust.
15748 * mi/mi-main.c (output_register): Use string_file.
15749 (mi_cmd_data_evaluate_expression): Use string_file.
15750 (mi_cmd_data_read_memory): Use string_file.
15751 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15752 * mi/mi-out.c (mi_ui_out::main_stream): New.
15753 (mi_ui_out::rewind): Use main_stream and
15754 string_file.
15755 (mi_ui_out::put): Use main_stream and string_file.
15756 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15757 Allocate a 'string_file' instead.
15758 (mi_out_new): Don't allocate a mem_fileopen stream here.
15759 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15760 (mi_ui_out::main_stream): Declare method.
15761 * printcmd.c (eval_command): Use string_file.
15762 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15763 * python/py-arch.c (archpy_disassemble): Use string_file.
15764 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15765 * python/py-frame.c (frapy_str): Use string_file.
15766 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15767 Use string_file.
15768 * python/py-type.c (typy_str): Use string_file.
15769 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15770 * python/py-value.c (valpy_str): Use string_file.
15771 * record-btrace.c (btrace_insn_history): Use string_file.
15772 * regcache.c (regcache_print): Use stdio_file.
15773 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15774 * remote.c (escape_buffer): Use string_file.
15775 * rust-lang.c (rust_get_disr_info): Use string_file.
15776 * serial.c (serial_open_ops_1): Use stdio_file.
15777 (do_serial_close): Use delete.
15778 * stack.c (print_frame_arg): Use string_file.
15779 (print_frame_args): Remove local mem_fileopen stream, not used.
15780 (print_frame): Use string_file.
15781 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15782 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15783 Take a 'string_file *' instead of a 'ui_file *'.
15784 * top.c (new_ui): Use stdio_file and stderr_file.
15785 (free_ui): Use delete.
15786 (execute_command_to_string): Use string_file.
15787 (quit_confirm): Use string_file.
15788 * tracepoint.c (collection_list::append_exp): Use string_file.
15789 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15790 * tui/tui-file.c: Don't include "ui-file.h".
15791 (enum streamtype, struct tui_stream): Delete.
15792 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15793 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15794 (tui_file::tui_file): New method.
15795 (tui_file_fputs): Delete.
15796 (tui_file_get_strbuf): Delete.
15797 (tui_file::puts): New method.
15798 (tui_file_adjust_strbuf): Delete.
15799 (tui_file_flush): Delete.
15800 (tui_file::flush): New method.
15801 * tui/tui-file.h: Tweak intro comment.
15802 Include ui-file.h.
15803 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15804 (tui_file_adjust_strbuf): Delete declarations.
15805 (class tui_file): New class.
15806 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15807 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15808 (tui_register_format): Use string_stream.
15809 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15810 (tui_get_function_from_frame): Use string_file.
15811 * typeprint.c (type_to_string): Use string_file.
15812 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15813 (null_stream): New global.
15814 (ui_file_delete): Delete.
15815 (ui_file::ui_file): New.
15816 (null_file_isatty): Delete.
15817 (ui_file::~ui_file): New.
15818 (null_file_rewind): Delete.
15819 (ui_file::printf): New.
15820 (null_file_put): Delete.
15821 (null_file_flush): Delete.
15822 (ui_file::putstr): New.
15823 (null_file_write): Delete.
15824 (ui_file::putstrn): New.
15825 (null_file_read): Delete.
15826 (ui_file::putc): New.
15827 (null_file_fputs): Delete.
15828 (null_file_write_async_safe): Delete.
15829 (ui_file::vprintf): New.
15830 (null_file_delete): Delete.
15831 (null_file::write): New.
15832 (null_file_fseek): Delete.
15833 (null_file::puts): New.
15834 (ui_file_data): Delete.
15835 (null_file::write_async_safe): New.
15836 (gdb_flush, ui_file_isatty): Adjust.
15837 (ui_file_put, ui_file_rewind): Delete.
15838 (ui_file_write): Adjust.
15839 (ui_file_write_for_put): Delete.
15840 (ui_file_write_async_safe, ui_file_read): Adjust.
15841 (ui_file_fseek): Delete.
15842 (fputs_unfiltered): Adjust.
15843 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15844 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15845 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15846 (set_ui_file_data): Delete.
15847 (string_file::~string_file, string_file::write)
15848 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15849 (do_ui_file_as_string, ui_file_as_string): Delete.
15850 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15851 (struct mem_file): Delete.
15852 (mem_file_new): Delete.
15853 (stdio_file::stdio_file): New.
15854 (mem_file_delete): Delete.
15855 (stdio_file::stdio_file): New.
15856 (mem_fileopen): Delete.
15857 (stdio_file::~stdio_file): New.
15858 (mem_file_rewind): Delete.
15859 (stdio_file::set_stream): New.
15860 (mem_file_put): Delete.
15861 (stdio_file::open): New.
15862 (mem_file_write): Delete.
15863 (stdio_file_magic, struct stdio_file): Delete.
15864 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15865 (stdio_file::flush): New.
15866 (stdio_file_read): Rename to ...
15867 (stdio_file::read): ... this. Adjust.
15868 (stdio_file_write): Rename to ...
15869 (stdio_file::write): ... this. Adjust.
15870 (stdio_file_write_async_safe): Rename to ...
15871 (stdio_file::write_async_safe) ... this. Adjust.
15872 (stdio_file_fputs): Rename to ...
15873 (stdio_file::puts) ... this. Adjust.
15874 (stdio_file_isatty): Delete.
15875 (stdio_file_fseek): Delete.
15876 (stdio_file::isatty): New.
15877 (stderr_file_write): Rename to ...
15878 (stderr_file::write) ... this. Adjust.
15879 (stderr_file_fputs): Rename to ...
15880 (stderr_file::puts) ... this. Adjust.
15881 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15882 (stderr_file::stderr_file): New.
15883 (tee_file_magic): Delete.
15884 (struct tee_file): Delete.
15885 (tee_file::tee_file): New.
15886 (tee_file_new): Delete.
15887 (tee_file::~tee_file): New.
15888 (tee_file_delete): Delete.
15889 (tee_file_flush): Rename to ...
15890 (tee_file::flush): ... this. Adjust.
15891 (tee_file_write): Rename to ...
15892 (tee_file::write): ... this. Adjust.
15893 (tee_file::write_async_safe): New.
15894 (tee_file_fputs): Rename to ...
15895 (tee_file::puts): ... this. Adjust.
15896 (tee_file_isatty): Rename to ...
15897 (tee_file::isatty): ... this. Adjust.
15898 * ui-file.h (struct obstack, struct ui_file): Don't
15899 forward-declare.
15900 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15901 (ui_file_write_ftype)
15902 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15903 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15904 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15905 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15906 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15907 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15908 (set_ui_file_fseek): Delete.
15909 (ui_file_data, ui_file_delete, ui_file_rewind)
15910 (struct ui_file): New.
15911 (ui_file_up): New.
15912 (class null_file): New.
15913 (null_stream): Declare.
15914 (ui_file_write_for_put, ui_file_put): Delete.
15915 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15916 Delete.
15917 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15918 (gdb_fopen, tee_file_new): Delete.
15919 (struct string_file): New.
15920 (struct stdio_file): New.
15921 (stdio_file_up): New.
15922 (struct stderr_file): New.
15923 (class tee_file): New.
15924 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15925 of a 'ui_file *'. Adjust.
15926 * ui-out.h (class ui_out) <field_stream>: Likewise.
15927 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15928 (null_stream): Delete.
15929 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15930 Adjust.
15931 * utils.h (struct ui_file): Delete forward declaration..
15932 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15933 (error_stream): Take a 'string_file &' instead of a
15934 'ui_file *'.
15935 * varobj.c (varobj_value_get_print_value): Use string_file.
15936 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15937 * gdbarch.c: Regenerate.
15938
187808b0
PA
159392017-02-02 Pedro Alves <palves@redhat.com>
15940
15941 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15942 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15943 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15944 Adjust to call gdb_print_insn instead of
15945 gdb_disassembler::print_insn.
15946 (dump_insns, do_mixed_source_and_assembly_deprecated)
15947 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15948 'gdbarch' parameter. Remove gdb_disassembler parameter.
15949 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15950 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15951 declaration.
15952 (gdb_pretty_print_insn): Re-add declaration.
15953 * record-btrace.c (btrace_insn_history): Don't allocate a
15954 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15955
7a8eb317
SM
159562017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15957
15958 * disasm.h (gdb_disassembly): Remove file_string parameter.
15959 * disasm.c (gdb_disassembly): Likewise.
15960 * cli/cli-cmds.c (print_disassembly): Adapt.
15961 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15962 * stack.c (do_gdb_disassembly): Likewise.
15963
7346ef59
AA
159642017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15965
15966 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15967 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15968 targets. And if the implicit value is longer than needed, extract
15969 the first bytes instead of the "least significant" ones.
15970
cd4007e4
MM
159712017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15972
15973 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15974 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15975 (btrace_fetch): Assert can_access_registers_ptid.
15976 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15977 validate_registers_access.
15978
cf77c34e
MM
159792017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15980
15981 * gdbthread.h (can_access_registers_ptid): New.
15982 * thread.c (can_access_registers_ptid): New.
15983
be85ce7d
PA
159842017-02-01 Pedro Alves <palves@redhat.com>
15985
15986 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15987
29b0b251
PA
159882017-01-31 Pedro Alves <palves@redhat.com>
15989
15990 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15991 Fix typos.
15992
289b5b24
PA
159932017-01-31 Pedro Alves <palves@redhat.com>
15994
15995 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15996 not used.
15997
b47413b4
PA
159982017-01-31 Pedro Alves <palves@redhat.com>
15999
16000 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16001
60adb36c
PA
160022017-01-31 Pedro Alves <palves@redhat.com>
16003
16004 * common/scoped_restore.h
16005 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16006 change the value's parameter type to T2.
16007 (make_scoped_restore): Likewise.
16008
2735833d
WT
160092017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16010 Richard Henderson <rth@redhat.com>
16011
16012 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16013 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16014 GS_BASE for older kernels.
16015 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16016 GS_BASE for older kernels.
16017 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16018 and GS_BASE to the offset table.
16019 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16020 system register group.
16021 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16022 for older kernels.
16023 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16024 amd64 ABI.
16025 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16026 AMD64_GSBASE_REGNUM.
16027 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16028 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16029 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16030 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16031 i386/64bit-segments.xml in those rules.
16032 * features/i386/64bit-segments.xml: New file.
16033 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16034 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16035 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16036 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16037 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16038 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16039 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16040 * features/i386/amd64-avx-linux.c: Regenerated.
16041 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16042 * features/i386/amd64-avx-mpx.c: Regenerated.
16043 * features/i386/amd64-avx512-linux.c: Regenerated.
16044 * features/i386/amd64-linux.c: Regenerated.
16045 * features/i386/amd64-mpx-linux.c: Regenerated.
16046 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16047 * features/i386/i386-avx-mpx.c: Regenerated.
16048 * features/i386/x32-avx-linux.c: Regenerated.
16049 * features/i386/x32-avx512-linux.c: Regenerated.
16050 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16051 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16052 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16053 * regformats/i386/amd64-linux.dat: Regenerated.
16054 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16055 * regformats/i386/x32-avx-linux.dat: Regenerated.
16056 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16057 * regformats/i386/x32-linux.dat: Regenerated.
16058
8884e97e
WT
160592017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16060
16061 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16062 Set to AMD64_NUM_REGS.
16063
7005d26a
WT
160642017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16065
16066 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16067 that checks validity of a register number.
16068
4bd2e1b2
KC
160692017-01-27 Kees Cook <keescook@google.com>
16070
16071 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16072 fetch_fpregs if target has fpa registers.
16073 (arm_linux_store_inferior_registers): Call store_fpregs if target
16074 has fpa registers.
16075
7cf1de6c
AA
160762017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16077
16078 * cris-tdep.c (cris_gdbarch_init): Remove check for
16079 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16080
874a1c8c
AT
160812017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16082
16083 * corelow.c (get_core_register_section): Check for regset
16084 existence before checking for REGSET_VARIABLE_SIZE.
16085
d8b49cf0
YQ
160862017-01-26 Yao Qi <yao.qi@linaro.org>
16087 Pedro Alves <palves@redhat.com>
16088
16089 PR gdb/20939
16090 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16091 call memory_error, save memaddr instead.
16092 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16093 negative, cal memory_error.
16094 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16095
658ca58c
YQ
160962017-01-26 Yao Qi <yao.qi@linaro.org>
16097
16098 * disasm-selftests.c (memory_error_test): New function.
16099 (_initialize_disasm_selftests): Register memory_error_test.
16100
79843d45
YQ
161012017-01-26 Yao Qi <yao.qi@linaro.org>
16102
16103 * Makefile.in (SFILES): Add disasm-selftests.c and
16104 selftest-arch.c.
16105 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16106 * disasm-selftests.c: New file.
16107 * selftest-arch.c: New file.
16108 * selftest-arch.h: New file.
16109
8cafda32
YQ
161102017-01-26 Yao Qi <yao.qi@linaro.org>
16111
16112 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16113 to bfd_arch_mep. Don't return 0 if section is not
16114 found. Call print_insn_mep.
16115
e47ad6c0
YQ
161162017-01-26 Pedro Alves <palves@redhat.com>
16117 Yao Qi <yao.qi@linaro.org>
16118
16119 * arm-tdep.c: Include "disasm.h".
16120 (gdb_print_insn_arm): Update code to get gdbarch.
16121 * disasm.c (dis_asm_read_memory): Change it to
16122 gdb_disassembler::dis_asm_read_memory.
16123 (dis_asm_memory_error): Likewise.
16124 (dis_asm_print_address): Likewise.
16125 (gdb_pretty_print_insn): Change it to
16126 gdb_disassembler::pretty_print_insn.
16127 (dump_insns): Add one argument gdb_disassemlber. All
16128 callers updated.
16129 (do_mixed_source_and_assembly_deprecated): Likewise.
16130 (do_mixed_source_and_assembly): Likewise.
16131 (do_assembly_only): Likewise.
16132 (gdb_disassembler::gdb_disassembler): New.
16133 (gdb_disassembler::print_insn): New.
16134 * disasm.h (class gdb_disassembler): New.
16135 (gdb_pretty_print_insn): Remove declaration.
16136 (gdb_disassemble_info): Likewise.
16137 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16138 (gdbscm_disasm_read_memory_worker): Update.
16139 (gdbscm_disasm_read_memory): Update.
16140 (gdbscm_disasm_memory_error): Remove.
16141 (gdbscm_disasm_print_address): Remove.
16142 (gdbscm_disassembler::gdbscm_disassembler): New.
16143 (gdbscm_print_insn_from_port): Update.
16144 * mips-tdep.c: Include disasm.h.
16145 (gdb_print_insn_mips): Update code to get gdbarch.
16146 * record-btrace.c (btrace_insn_history): Update.
16147 * spu-tdep.c: Include disasm.h.
16148 (struct spu_dis_asm_data): Remove.
16149 (struct spu_dis_asm_info): New.
16150 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16151 SPU id.
16152 (gdb_print_insn_spu): Cast disassemble_info to
16153 spu_dis_asm_info.
16154
80d75874
YQ
161552017-01-26 Yao Qi <yao.qi@linaro.org>
16156
16157 * disasm.c (do_ui_file_delete): Delete.
16158 (gdb_insn_length): Move code creating stream to ...
16159 * utils.c (null_stream): ... here. New function.
16160 * utils.h (null_stream): Declare.
16161
60685cd0
SM
161622017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16163
16164 * python/py-inferior.c (find_thread_object): Return directly
16165 from the loop. Remove "found" variable.
16166
eb1cdb62
JB
161672017-01-21 Joel Brobecker <brobecker@adacore.com>
16168
16169 GDB 7.12.1 released.
16170
b1ce6568
SM
161712017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16172
16173 * python/py-function.c (fnpy_call): Reorder declarations to have
16174 the gdbpy_enter object declared first.
16175 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16176
6f8b0407
SM
161772017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16178
fec93fb1 16179 PR python/21068
6f8b0407
SM
16180 * python/python-internal.h (PyMem_RawMalloc): Define for
16181 Python < 3.4.
16182 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16183 PyMem_RawMalloc instead of PyMem_Malloc.
16184
78cbbba8
LM
161852017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16186 Luis Machado <lgustavo@codesourcery.com>
16187
16188 * NEWS (New commands): Mention flash-erase.
16189 (New MI commands): Mention target-flash-erase.
16190 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16191 command.
16192 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16193 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16194 * target.c (flash_erase_command): New function.
16195 (initialize_targets): Add new flash-erase command.
16196 * target.h (flash_erase_command): New declaration.
16197
2132fe85
JB
161982017-01-20 Joel Brobecker <brobecker@adacore.com>
16199
16200 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16201 HAVE_SYS_PROCFS_H is defined.
16202
d1dff226
AH
162032017-01-18 Alan Hayward <alan.hayward@arm.com>
16204
16205 * remote.c (struct cached_reg): Change data into a pointer.
16206 * (stop_reply_dtr): Free data pointers before deleting vector.
16207 (process_stop_reply): Likewise.
16208 (remote_parse_stop_reply): Allocate space for data
16209
9890e433
AH
162102017-01-18 Alan Hayward <alan.hayward@arm.com>
16211
16212 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16213 MAX_REGISTER_SIZE.
16214 (amd64_pseudo_register_read_value): Likewise.
16215 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16216 (store_register_using_P): Likewise.
16217 * regcache.c (regcache_xfer_part): Likewise.
16218
7a36499a
IR
162192017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16220
16221 Split real and pseudo registers.
16222 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16223 (sparc32_pseudo_regnum): New enum.
16224 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16225 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16226 (SPARC32_CP0_REGISTERS): New macro.
16227 (sparc32_pseudo_register_name): New function.
16228 (sparc32_register_name): Use sparc32_pseudo_register_name.
16229 (sparc32_pseudo_register_type): New function.
16230 (sparc32_register_type): Use sparc32_pseudo_register_type.
16231 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16232 pseudo register numbers.
16233 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16234 (SPARC64_CP0_REGISTERS): New macro.
16235 (sparc64_pseudo_register_name): New function.
16236 (sparc64_register_name): Use sparc64_pseudo_register_name.
16237 (sparc64_pseudo_register_type): New function.
16238 (sparc64_register_type): Use sparc64_pseudo_register_type.
16239 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16240 pseudo register numbers.
16241 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16242 sparc64_store_arguments): Handle pseudo register numbers.
16243
6f8976bf
YQ
162442017-01-13 Yao Qi <yao.qi@linaro.org>
16245
16246 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16247 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16248 output.
16249 (getpkt_or_notif_sane_1): Likewise.
16250
e4241ace
YQ
162512017-01-13 Yao Qi <yao.qi@linaro.org>
16252
16253 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16254 of CC. Pass "-x c++-header" instead of "-x c".
16255
3015c064
SM
162562017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16257
16258 * remote.c (remote_can_async_p): Update comment.
16259
fde1b17d
SM
162602017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16261
16262 * linux-nat.c (linux_nat_can_async_p): Update comment.
16263
ca1ca08b
SM
162642017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16265
16266 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16267
4ad2da73
SM
162682017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16269
16270 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16271
c8b23b3f
TT
162722017-01-10 Tom Tromey <tom@tromey.com>
16273
16274 * python/py-type.c (typy_legacy_template_argument): Update.
16275 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16276 ~demangle_parse_info): Declare new members.
16277 (cp_demangled_name_to_comp): Return unique_ptr.
16278 (cp_demangled_name_parse_free)
16279 (make_cleanup_cp_demangled_name_parse_free)
16280 (cp_new_demangle_parse_info): Remove.
16281 * cp-support.c (do_demangled_name_parse_free_cleanup)
16282 (make_cleanup_cp_demangled_name_parse_free): Remove.
16283 (inspect_type, cp_canonicalize_string_full)
16284 (cp_canonicalize_string): Update.
16285 (mangled_name_to_comp): Change return type.
16286 (cp_class_name_from_physname, method_name_from_physname)
16287 (cp_func_name, cp_remove_params): Update.
16288 * cp-name-parser.y (demangle_parse_info): New constructor, from
16289 cp_new_demangle_parse_info.
16290 (~demangle_parse_info): New destructor, from
16291 cp_demangled_name_parse_free.
16292 (cp_merge_demangle_parse_infos): Update.
16293 (cp_demangled_name_to_comp): Change return type.
16294
1ac32117
TT
162952017-01-10 Tom Tromey <tom@tromey.com>
16296
16297 * top.c (prevent_dont_repeat): Change return type.
16298 * python/python.c (execute_gdb_command): Use std::string.
16299 Update.
16300 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16301 * command.h (prevent_dont_repeat): Change return type.
16302 * breakpoint.c (bpstat_do_actions_1): Update.
16303
0cf08227
TT
163042017-01-10 Tom Tromey <tom@tromey.com>
16305
16306 * value.h (scoped_value_mark::~scoped_value_mark): Call
16307 free_to_mark.
16308 (scoped_value_mark::free_to_mark): New method.
16309 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16310 scoped_value_mark.
16311
eb115069
TT
163122017-01-10 Tom Tromey <tom@tromey.com>
16313
16314 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16315 (valpy_reference_value, valpy_const_value, valpy_get_address)
16316 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16317 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16318 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16319 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16320 scoped_value_mark.
16321 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16322 * value.h (scoped_value_mark): New class.
16323
906768f9
TT
163242017-01-10 Tom Tromey <tom@tromey.com>
16325
16326 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16327 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16328 * psymtab.c (discard_psymtabs_upto): Remove.
16329 (make_cleanup_discard_psymtabs): Remove.
16330 (struct psymtab_state): Remove.
16331
bef155c3
TT
163322017-01-10 Tom Tromey <tom@tromey.com>
16333
16334 * record-full.c (record_full_save_cleanups): Remove.
16335 (record_full_save): Use gdb::unlinker.
16336 * gcore.c (do_bfd_delete_cleanup): Remove.
16337 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16338 cleanups.
16339 * dwarf2read.c (unlink_if_set): Remove.
16340 (write_psymtabs_to_index): Use gdb::unlinker.
16341 * common/gdb_unlinker.h: New file.
16342
192b62ce
TT
163432017-01-10 Tom Tromey <tom@tromey.com>
16344
16345 * windows-tdep.c (windows_xfer_shared_library): Update.
16346 * windows-nat.c (windows_make_so): Update.
16347 * utils.h (make_cleanup_bfd_unref): Remove.
16348 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16349 * symfile.h (symfile_bfd_open)
16350 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16351 * symfile.c (read_symbols, symbol_file_add)
16352 (separate_debug_file_exists): Update.
16353 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16354 (generic_load, reread_symbols): Update.
16355 * symfile-mem.c (symbol_file_add_from_memory): Update.
16356 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16357 (spu_symbol_file_add_from_memory): Update.
16358 * solist.h (struct target_so_ops) <bfd_open>: Return
16359 gdb_bfd_ref_ptr.
16360 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16361 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16362 gdb_bfd_ref_ptr.
16363 (solib_map_sections, reload_shared_libraries_1): Update.
16364 * solib-svr4.c (enable_break): Update.
16365 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16366 * solib-frv.c (enable_break2): Update.
16367 * solib-dsbt.c (enable_break): Update.
16368 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16369 gdb_bfd_ref_ptr.
16370 (darwin_solib_get_all_image_info_addr_at_init): Update.
16371 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16372 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16373 * record-full.c (record_full_save): Update.
16374 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16375 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16376 * minidebug.c (find_separate_debug_file_in_section): Return
16377 gdb_bfd_ref_ptr.
16378 * machoread.c (macho_add_oso_symfile): Change abfd to
16379 gdb_bfd_ref_ptr.
16380 (macho_symfile_read_all_oso): Update.
16381 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16382 (macho_symfile_read): Update.
16383 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16384 (jit_bfd_try_read_symtab): Update.
16385 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16386 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16387 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16388 gdb_bfd_ref_ptr.
16389 (gdb_bfd_ref_policy): New struct.
16390 (gdb_bfd_ref_ptr): New typedef.
16391 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16392 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16393 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16394 gdb_bfd_ref_ptr.
16395 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16396 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16397 (gcore_command): Update.
16398 * exec.c (exec_file_attach): Update.
16399 * elfread.c (elf_symfile_read): Update.
16400 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16401 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16402 (open_and_init_dwo_file): Update.
16403 (open_dwp_file): Return gdb_bfd_ref_ptr.
16404 (open_and_init_dwp_file): Update.
16405 * corelow.c (core_open): Update.
16406 * compile/compile-object-load.c (compile_object_load): Update.
16407 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16408 * coffread.c (coff_symfile_read): Update.
16409 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16410 gdb_bfd_ref_ptr. Rename.
16411 (dump_bfd_file, restore_command): Update.
16412 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16413 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16414 (find_separate_debug_file_by_buildid): Update.
16415
50315b21
TT
164162017-01-10 Tom Tromey <tom@tromey.com>
16417
16418 * common/gdb_ref_ptr.h: New file.
16419 * python/py-ref.h (struct gdbpy_ref_policy): New.
16420 (gdbpy_ref): Now a typedef.
16421
fc4007c9
TT
164222017-01-10 Tom Tromey <tom@tromey.com>
16423
16424 * utils.h (make_cleanup_htab_delete): Don't declare.
16425 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16426 Remove.
16427 * linespec.c (decode_compound_collector): Add constructor,
16428 destructor.
16429 (lookup_prefix_sym): Remove cleanup.
16430 (symtab_collector): Add constructor, destructor.
16431 (collect_symtabs_from_filename): Remove cleanup.
16432 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16433 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16434 Use htab_up.
16435 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16436 * dwarf2read.c (dw2_expand_symtabs_matching)
16437 (dw2_map_symbol_filenames, dwarf_decode_macros)
16438 (write_psymtabs_to_index): Use htab_up.
16439 * dwarf2loc.c (func_verify_no_selftailcall)
16440 (call_site_find_chain_1, func_verify_no_selftailcall)
16441 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16442 std::vector, gdb::unique_xmalloc_ptr.
16443 (call_sitep): Remove typedef.
16444 (dwarf2_locexpr_baton_eval): Remove unused variable.
16445
8dbcee67
TT
164462017-01-10 Tom Tromey <tom@tromey.com>
16447
16448 * python/python-internal.h (make_cleanup_py_decref)
16449 (make_cleanup_py_xdecref): Don't declare.
16450 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16451 (py_xdecref, make_cleanup_py_xdecref): Remove.
16452
13df46cc
TT
164532017-01-10 Tom Tromey <tom@tromey.com>
16454
16455 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16456 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16457
06fc9bf7
TT
164582017-01-10 Tom Tromey <tom@tromey.com>
16459
16460 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16461
830a4934
TT
164622017-01-10 Tom Tromey <tom@tromey.com>
16463
16464 * python/py-utils.c (unicode_to_encoded_string)
16465 (python_string_to_target_string)
16466 (python_string_to_target_python_string)
16467 (python_string_to_host_string, gdbpy_obj_to_string)
16468 (get_addr_from_python): Use gdbpy_ref.
16469
4586d543
TT
164702017-01-10 Tom Tromey <tom@tromey.com>
16471
16472 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16473 gdbpy_ref.
16474
59876f8f
TT
164752017-01-10 Tom Tromey <tom@tromey.com>
16476
16477 * python/python.c (eval_python_command, gdbpy_decode_line)
16478 (gdbpy_run_events, gdbpy_start_type_printers)
16479 (gdbpy_apply_type_printers): Use gdbpy_ref.
16480
97d83487
TT
164812017-01-10 Tom Tromey <tom@tromey.com>
16482
16483 * python/py-param.c (get_doc_string, compute_enum_values): Use
16484 gdbpy_ref.
16485
9205649a
TT
164862017-01-10 Tom Tromey <tom@tromey.com>
16487
16488 * python/py-inferior.c (find_thread_object, build_inferior_list):
16489 Use gdbpy_ref.
16490
74c49d45
TT
164912017-01-10 Tom Tromey <tom@tromey.com>
16492
16493 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16494
16361ffb
TT
164952017-01-10 Tom Tromey <tom@tromey.com>
16496
16497 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16498 gdbpy_ref.
16499
905f2cca
TT
165002017-01-10 Tom Tromey <tom@tromey.com>
16501
16502 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16503 extra incref.
16504 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16505 Use gdbpy_ref.
16506
64081434
TT
165072017-01-10 Tom Tromey <tom@tromey.com>
16508
16509 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16510 gdbpy_ref.
16511
59e9e831
TT
165122017-01-10 Tom Tromey <tom@tromey.com>
16513
16514 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16515 decref results of PyArg_ParseTupleAndKeywords.
16516
9de10f6d
TT
165172017-01-10 Tom Tromey <tom@tromey.com>
16518
16519 * python/python.c (python_run_simple_file): Use
16520 unique_xmalloc_ptr, gdbpy_ref.
16521
2bd5759d
TT
165222017-01-10 Tom Tromey <tom@tromey.com>
16523
16524 * python/py-prettyprint.c (print_stack_unless_memory_error)
16525 (print_string_repr, print_children): Use gdbpy_ref.
16526 (dummy_python_frame): New class.
16527 (dummy_python_frame::dummy_python_frame): Rename from
16528 push_dummy_python_frame.
16529 (py_restore_tstate): Remove.
16530
3b4e0e01
TT
165312017-01-10 Tom Tromey <tom@tromey.com>
16532
16533 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16534
17a22718
TT
165352017-01-10 Tom Tromey <tom@tromey.com>
16536
16537 * python/python.c (ensure_python_env, restore_python_env):
16538 Remove.
16539 * python/python-internal.h (ensure_python_env): Don't declare.
16540 * varobj.h (varobj_ensure_python_env): Don't declare.
16541 * varobj.c (varobj_ensure_python_env): Remove.
16542
68cdc557
TT
165432017-01-10 Tom Tromey <tom@tromey.com>
16544
16545 * varobj.c (varobj_value_get_print_value): Use
16546 gdbpy_enter_varobj.
16547
1eba6383
TT
165482017-01-10 Tom Tromey <tom@tromey.com>
16549
16550 * python/py-prettyprint.c (print_string_repr, print_children):
16551 Update.
16552 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16553 of "encoding".
16554 * varobj.c (varobj_value_get_print_value): Update.
16555 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16556
bde7b3e3
TT
165572017-01-10 Tom Tromey <tom@tromey.com>
16558
16559 * varobj.c (varobj_get_display_hint)
16560 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16561 (varobj_set_visualizer, free_variable): Use
16562 gdbpy_enter_varobj.
16563
a7785f8c
TT
165642017-01-10 Tom Tromey <tom@tromey.com>
16565
16566 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16567 (do_finish_initialization): New function. Use gdbpy_ref.
16568 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16569 do_finish_initialization.
16570
2865bfce
TT
165712017-01-10 Tom Tromey <tom@tromey.com>
16572
16573 * python/py-param.c (get_set_value, get_show_value): Use
16574 gdbpy_enter, gdbpy_ref.
16575
0e9dcc75
TT
165762017-01-10 Tom Tromey <tom@tromey.com>
16577
16578 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16579
12a5cedd
TT
165802017-01-10 Tom Tromey <tom@tromey.com>
16581
16582 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16583
788f2586
TT
165842017-01-10 Tom Tromey <tom@tromey.com>
16585
16586 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16587 Use gdbpy_enter_varobj.
16588
6cd67bea
TT
165892017-01-10 Tom Tromey <tom@tromey.com>
16590
16591 * varobj.c (gdbpy_enter_varobj): New constructor.
16592 * python/python-internal.h (gdbpy_enter_varobj): New class.
16593 * python/py-varobj.c (py_varobj_get_iterator): Use
16594 gdbpy_enter_varobj.
16595
14b122bf
TT
165962017-01-10 Tom Tromey <tom@tromey.com>
16597
16598 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16599 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16600 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16601 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16602 unique_xmalloc_ptr.
16603 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16604
bf1ca3b9
TT
166052017-01-10 Tom Tromey <tom@tromey.com>
16606
16607 * python/py-xmethods.c (invoke_match_method): Use
16608 gdbpy_ref.
16609
572a5524
TT
166102017-01-10 Tom Tromey <tom@tromey.com>
16611
16612 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16613 gdbpy_enter, gdbpy_ref.
16614
396a78b6
TT
166152017-01-10 Tom Tromey <tom@tromey.com>
16616
16617 * python/python.c (python_interactive_command): Use gdbpy_enter.
16618
a88b13c7
TT
166192017-01-10 Tom Tromey <tom@tromey.com>
16620
16621 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16622 gdbpy_ref.
16623
e9f0c363
TT
166242017-01-10 Tom Tromey <tom@tromey.com>
16625
16626 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16627 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16628
6349f452
TT
166292017-01-10 Tom Tromey <tom@tromey.com>
16630
16631 * utils.h (htab_deleter): New struct.
16632 (htab_up): New typedef.
16633 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16634 gdbpy_enter, gdbpy_ref, htab_up.
16635
c0171de6
TT
166362017-01-10 Tom Tromey <tom@tromey.com>
16637
16638 * python/py-unwind.c (pending_frame_invalidate): Remove.
16639 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16640
f18e226f
TT
166412017-01-10 Tom Tromey <tom@tromey.com>
16642
16643 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16644 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16645
c57af3f1
TT
166462017-01-10 Tom Tromey <tom@tromey.com>
16647
16648 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16649
60e600ec
TT
166502017-01-10 Tom Tromey <tom@tromey.com>
16651
16652 * python/python.c (gdbpy_eval_from_control_command)
16653 (gdbpy_source_script, gdbpy_run_events)
16654 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16655 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16656 gdbpy_enter.
16657
bf7da5b0
TT
166582017-01-10 Tom Tromey <tom@tromey.com>
16659
16660 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16661
2d38bced
TT
166622017-01-10 Tom Tromey <tom@tromey.com>
16663
16664 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16665
07bc7329
TT
166662017-01-10 Tom Tromey <tom@tromey.com>
16667
16668 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16669 (python_on_inferior_call_pre, python_on_inferior_call_post)
16670 (python_on_memory_change, python_on_register_change)
16671 (python_inferior_exit, python_new_objfile, add_thread_object)
16672 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16673
6e7c365e
TT
166742017-01-10 Tom Tromey <tom@tromey.com>
16675
16676 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16677 (bpfinishpy_handle_exit): Use gdbpy_enter.
16678
6ba0cd40
TT
166792017-01-10 Tom Tromey <tom@tromey.com>
16680
16681 * python/py-cmd.c (cmdpy_destroyer)
16682 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16683 gdbpy_enter.
16684
de2dc875
TT
166852017-01-10 Tom Tromey <tom@tromey.com>
16686
16687 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16688 gdbpy_enter.
16689 (gdbpy_breakpoint_has_cond): Likewise.
16690
4ecee2c4
TT
166912017-01-10 Tom Tromey <tom@tromey.com>
16692
16693 * python/python.c (gdbpy_enter): New constructor.
16694 (~gdbpy_enter): New destructor.
16695 (restore_python_env, ensure_python_env): Rewrite.
16696 * python/python-internal.h (gdbpy_enter): New class.
16697
37fce74f
TT
166982017-01-10 Tom Tromey <tom@tromey.com>
16699
16700 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16701
53a0cca3
TT
167022017-01-10 Tom Tromey <tom@tromey.com>
16703
16704 * python/py-value.c (value_has_field, get_field_flag)
16705 (get_field_type, valpy_getitem, convert_value_from_python): Use
16706 gdbpy_ref.
16707
ff3724f5
TT
167082017-01-10 Tom Tromey <tom@tromey.com>
16709
16710 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16711 gdbpy_ref.
16712
0700aea5
TT
167132017-01-10 Tom Tromey <tom@tromey.com>
16714
16715 * python/py-prettyprint.c (search_pp_list)
16716 (find_pretty_printer_from_objfiles)
16717 (find_pretty_printer_from_progspace)
16718 (find_pretty_printer_from_gdb, find_pretty_printer)
16719 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16720 gdbpy_ref.
16721
1bb44c9f
TT
167222017-01-10 Tom Tromey <tom@tromey.com>
16723
16724 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16725
87ce03fd
TT
167262017-01-10 Tom Tromey <tom@tromey.com>
16727
16728 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16729 (ltpy_get_all_source_lines): Use gdbpy_ref.
16730
ee0a3fb8
TT
167312017-01-10 Tom Tromey <tom@tromey.com>
16732
16733 * python/py-framefilter.c (extract_sym, extract_value)
16734 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16735 gdbpy_ref.
16736
bf2a52fa
TT
167372017-01-10 Tom Tromey <tom@tromey.com>
16738
16739 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16740
f59fe7f8
TT
167412017-01-10 Tom Tromey <tom@tromey.com>
16742
16743 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16744
80bd970a
TT
167452017-01-10 Tom Tromey <tom@tromey.com>
16746
16747 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16748 gdbpy_ref.
16749
d1b3de2e
TT
167502017-01-10 Tom Tromey <tom@tromey.com>
16751
16752 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16753
3bb43384
TT
167542017-01-10 Tom Tromey <tom@tromey.com>
16755
16756 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16757 (typy_range): Use gdbpy_ref.
16758
abf5651e
TT
167592017-01-10 Tom Tromey <tom@tromey.com>
16760
16761 * python/py-threadevent.c (create_thread_event_object): Use
16762 gdbpy_ref.
16763 * python/py-stopevent.c (create_stop_event_object): Simplify.
16764 (emit_stop_event): Use gdbpy_ref.
16765 * python/py-signalevent.c (create_signal_event_object): Use
16766 gdbpy_ref.
16767 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16768 (emit_new_objfile_event, create_clear_objfiles_event_object)
16769 (emit_clear_objfiles_event): Use gdbpy_ref.
16770 * python/py-infevents.c (create_inferior_call_event_object)
16771 (create_register_changed_event_object)
16772 (create_memory_changed_event_object, emit_inferior_call_event)
16773 (emit_memory_changed_event, emit_register_changed_event): Use
16774 gdbpy_ref.
16775 * python/py-exitedevent.c (create_exited_event_object)
16776 (emit_exited_event): Use gdbpy_ref.
16777 * python/py-event.h (evpy_emit_event): Remove
16778 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16779 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16780 * python/py-continueevent.c (emit_continue_event): Use
16781 gdbpy_ref.
16782 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16783 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16784 gdbpy_ref.
16785 * python/py-bpevent.c (create_breakpoint_event_object): Use
16786 gdbpy_ref.
16787
a68ff33e
TT
167882017-01-10 Tom Tromey <tom@tromey.com>
16789
16790 * python/py-ref.h: New file.
16791
7becfd03
SM
167922017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16793
16794 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16795 void.
16796 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16797 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16798 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16799 * ui-out.c (ui_out::redirect): Likewise.
16800 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16801 * cli/cli-logging.c (set_logging_redirect): Update call site of
16802 ui_out::redirect.
16803 (handle_redirections): Likewise.
16804 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16805 * top.c (execute_command_to_string): Likewise.
16806 * utils.c (do_ui_out_redirect_pop): Likewise.
16807
df294654
SM
168082017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16809
16810 * stack.c (_initialize_stack): Update "frame" command help message.
16811
f5e6296e
IB
168122017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16813
16814 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16815
0e2d6fa6
YQ
168162017-01-06 Yao Qi <yao.qi@linaro.org>
16817
16818 * x86-linux-nat.h: Include gdb_proc_service.h.
16819
44d6d3f9
YQ
168202017-01-06 Yao Qi <yao.qi@linaro.org>
16821
16822 * ser-base.h: Include serial.h.
16823
656731fe
YQ
168242017-01-06 Yao Qi <yao.qi@linaro.org>
16825
16826 * ppc-linux-tdep.h: Include ppc-tdep.h.
16827
1ca8f924
YQ
168282017-01-06 Yao Qi <yao.qi@linaro.org>
16829
16830 * nat/amd64-linux-siginfo.h: Include signal.h.
16831
bc3008c4
YQ
168322017-01-06 Yao Qi <yao.qi@linaro.org>
16833
16834 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16835
66c80d03
YQ
168362017-01-06 Yao Qi <yao.qi@linaro.org>
16837
16838 * mi/mi-parse.h: Include mi-cmds.h.
16839
051d2dda
YQ
168402017-01-06 Yao Qi <yao.qi@linaro.org>
16841
16842 * inf-loop.c: Don't include "target.h".
16843 * inf-loop.h: Include it here.
16844
8018d34f
YQ
168452017-01-06 Yao Qi <yao.qi@linaro.org>
16846
16847 * dfp.h: Include "dboulest.h" and "expression.h".
16848
c0b8369c
YQ
168492017-01-06 Yao Qi <yao.qi@linaro.org>
16850
16851 * ax-gdb.h: Include "ax.h".
16852
ad5cba2a
YQ
168532017-01-06 Yao Qi <yao.qi@linaro.org>
16854
16855 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16856 with nat/gdb_ptrace.h.
16857
1c33cd7f
YQ
168582017-01-05 Yao Qi <yao.qi@linaro.org>
16859
16860 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16861 new line.
16862 (mips64_fbsd_sigframe_init): Likewise.
16863
c988ac1d
JB
168642017-01-04 John Baldwin <jhb@FreeBSD.org>
16865
16866 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16867 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16868
b268007c
JB
168692017-01-04 John Baldwin <jhb@FreeBSD.org>
16870
16871 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16872 * NEWS: Mention new FreeBSD/mips native configuration.
16873 * config/mips/fbsd.mh: New file.
16874 * configure.host: Add mips*-*-freebsd*.
16875 * mips-fbsd-nat.c: New file.
16876
387360da
JB
168772017-01-04 John Baldwin <jhb@FreeBSD.org>
16878
16879 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16880 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16881 * NEWS: Mention new FreeBSD/mips target.
16882 * configure.tgt: Add mips*-*-freebsd*.
16883 * mips-fbsd-tdep.c: New file.
16884 * mips-fbsd-tdep.h: New file.
16885
2aaaf250
YQ
168862017-01-04 Yao Qi <yao.qi@linaro.org>
16887
16888 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16889 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16890
61baf725
JB
168912017-01-01 Joel Brobecker <brobecker@adacore.com>
16892
6dbb839a 16893 Update copyright year range in all GDB files.
61baf725 16894
c113e7ff 168952017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16896
c113e7ff 16897 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16898
c113e7ff 16899For older changes see ChangeLog-2016.
c906108c
SS
16900\f
16901Local Variables:
16902mode: change-log
16903left-margin: 8
16904fill-column: 74
16905version-control: never
57da7796 16906coding: utf-8
c906108c 16907End:
This page took 2.801164 seconds and 4 git commands to generate.