Adding ChangeLog entry for the last commit.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 PR gdb/22491
4 * stap-probe.c (relocate_address): New function.
5 (stap_probe::get_relocated_address): Use 'relocate_address'.
6 (stap_probe::set_semaphore): Use 'relocate_address' and pass
7 'm_sem_addr'.
8 (stap_probe::clear_semaphore): Likewise.
9
10 2017-11-25 Pedro Alves <palves@redhat.com>
11
12 * dictionary.c: Include "safe-ctype.h".
13 * minsyms.c: Include "safe-ctype.h".
14 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
15
16 2017-11-25 Pedro Alves <palves@redhat.com>
17
18 * completer.c (complete_line_internal_1): Skip spaces until the
19 start of the command.
20
21 2017-11-24 Pedro Alves <palves@redhat.com>
22
23 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
24 cp_fq_symbol_name_matches. Pass language_cplus to
25 strncmp_with_mode.
26 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
27 (selftests::test_cp_symbol_name_cmp): New.
28 (_initialize_cp_support): Register "cp_symbol_name_matches"
29 selftests.
30 * language.c (default_symbol_name_matcher): Pass language_minimal
31 to strncmp_iw_with_mode.
32 * utils.c: Include "cp-support.h" and <algorithm>.
33 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
34 (cp_is_operator): New functions.
35 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
36 skip whitespace in the symbol name when the lookup name doesn't
37 have spaces, and vice versa.
38 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
39 * utils.h (strncmp_iw_with_mode): Add language parameter.
40
41 2017-11-24 Joel Brobecker <brobecker@adacore.com>
42
43 * ada-lang.c (ada_exception_message_1, ada_exception_message):
44 New functions.
45 (print_it_exception): If available, display the exception
46 message as well.
47 * NEWS: Document new feature.
48
49 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
50
51 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
52
53 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
54
55 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
56 (dtrace_probe::is_enabled, dtrace_probe::enable)
57 (dtrace_probe::disable): Remove keyword 'struct' at for-range
58 variable
59 * probe.c (gen_ui_out_table_header_info)
60 (print_ui_out_not_applicables): Remove keyword 'struct' at
61 for-range variable
62
63 2017-11-24 Alan Hayward <alan.hayward@arm.com>
64
65 * configure.tgt: Add arch/aarch64.o
66
67 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
68
69 * common/common-utils.h: Include poison.h.
70 (xfree): Remove declaration, add definition with static_assert.
71 * common/common-utils.c (xfree): Remove.
72 * common/poison.h (IsMallocatable): Define.
73 (IsFreeable): Define.
74 (free): Delete for non-freeable types.
75 (xnew): New.
76 (XNEW): Undef and redefine.
77 (xcnew): New.
78 (XCNEW): Undef and redefine.
79 (xdelete): New.
80 (XDELETE): Undef and redefine.
81 (xnewvec): New.
82 (XNEWVEC): Undef and redefine.
83 (xcnewvec): New.
84 (XCNEWVEC): Undef and redefine.
85 (xresizevec): New.
86 (XRESIZEVEC): Undef and redefine.
87 (xdeletevec): New.
88 (XDELETEVEC): Undef and redefine.
89 (xnewvar): New.
90 (XNEWVAR): Undef and redefine.
91 (xcnewvar): New.
92 (XCNEWVAR): Undef and redefine.
93 (xresizevar): New.
94 (XRESIZEVAR): Undef and redefine.
95
96 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
97
98 * gdbthread.h (private_thread_info): Define structure type, add
99 virtual pure destructor.
100 (thread_info) <priv>: Change type to unique_ptr.
101 <private_dtor>: Remove.
102 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
103 (private_thread_info::~private_thread_info): Provide default
104 implementation.
105 (thread_info::~thread_info): Don't call private_dtor nor
106 manually free priv.
107 * aix-thread.c (private_thread_info): Rename to ...
108 (aix_thread_info): ... this.
109 (get_aix_thread_info): New.
110 (sync_threadlists): Adjust.
111 (iter_tid): Adjust.
112 (aix_thread_resume): Adjust.
113 (aix_thread_fetch_registers): Adjust.
114 (aix_thread_store_registers): Adjust.
115 (aix_thread_extra_thread_info): Adjust.
116 * darwin-nat.h (private_thread_info): Rename to ...
117 (darwin_thread_info): ... this.
118 (get_darwin_thread_info): New.
119 * darwin-nat.c (darwin_init_thread_list): Adjust.
120 (darwin_check_new_threads): Adjust.
121 (thread_info_from_private_thread_info): Adjust.
122 * linux-thread-db.c (private_thread_info): Rename to ...
123 (thread_db_thread_info): ... this, initialize fields.
124 (get_thread_db_thread_info): New.
125 <dying>: Change type to bool.
126 (update_thread_state): Adjust to type rename.
127 (record_thread): Adjust to type rename an use of unique_ptr.
128 (thread_db_pid_to_str): Likewise.
129 (thread_db_extra_thread_info): Likewise.
130 (thread_db_thread_handle_to_thread_info): Likewise.
131 (thread_db_get_thread_local_address): Likewise.
132 * nto-tdep.h (private_thread_info): Rename to ...
133 (nto_thread_info): ... this, initialize fields.
134 (get_nto_thread_info): New.
135 <name>: Change type to std::string.
136 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
137 use of unique_ptr.
138 * nto-procfs.c (update_thread_private_data_name): Adjust to
139 std::string change, allocate nto_private_thread_info with new.
140 (update_thread_private_data): Adjust to unique_ptr.
141 * remote.c (private_thread_info): Rename to ...
142 (remote_thread_info): ... this, initialize data members with
143 default values.
144 <extra, name>: Change type to std::string.
145 <thread_handle>: Change type to non-pointer.
146 (free_private_thread_info): Remove.
147 (get_private_info_thread): Rename to...
148 (get_remote_thread_info): ... this, change return type, adjust to
149 use of unique_ptr, use remote_thread_info constructor.
150 (remote_add_thread): Adjust.
151 (get_private_info_ptid): Rename to...
152 (get_remote_thread_info): ...this, change return type.
153 (remote_thread_name): Use get_remote_thread_info, adjust to
154 change to std::string.
155 (struct thread_item) <~thread_item>: Remove.
156 <thread_handle>: Make non pointer.
157 (start_thread): Adjust to thread_item::thread_handle type
158 change.
159 (remote_update_thread_list): Adjust to type name change, move
160 strings from temporary to long-lived object instead of
161 duplicating.
162 (remote_threads_extra_info): Use get_remote_thread_info.
163 (process_initial_stop_replies): Likewise.
164 (resume_clear_thread_private_info): Likewise.
165 (remote_resume): Adjust to type name change.
166 (remote_commit_resume): Use get_remote_thread_info.
167 (process_stop_reply): Adjust to type name change.
168 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
169 (remote_stopped_by_hw_breakpoint): Likewise.
170 (remote_stopped_by_watchpoint): Likewise.
171 (remote_stopped_data_address): Likewise.
172 (remote_core_of_thread): Likewise.
173 (remote_thread_handle_to_thread_info): Use
174 get_private_info_thread, adjust to thread_handle field type
175 change.
176
177 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * remote.c (struct thread_item): Add constructor, disable copy
180 construction and copy assignment, define default move
181 construction and move assignment.
182 <extra, name>: Change type to std::string.
183 <core>: Initialize.
184 <thread_handle>: Make non-pointer.
185 (thread_item_t): Remove typedef.
186 (DEF_VEC_O(thread_item_t)): Remove.
187 (threads_listing_context) <contains_thread>: New method.
188 <remove_thread>: New method.
189 <items>: Change type to std::vector.
190 (clear_threads_listing_context): Remove.
191 (threads_listing_context_remove): Remove.
192 (remote_newthread_step): Use thread_item constructor, adjust to
193 change to std::vector.
194 (start_thread): Use thread_item constructor, adjust to change to
195 std::vector.
196 (end_thread): Adjust to change to std::vector and std::string.
197 (remote_get_threads_with_qthreadinfo): Use thread_item
198 constructor, adjust to std::vector.
199 (remote_update_thread_list): Adjust to change to std::vector and
200 std::string, use threads_listing_context methods.
201 (remove_child_of_pending_fork): Adjust.
202 (remove_new_fork_children): Adjust.
203 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
204 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
205 * unittests/rsp-low-selftests.c: New file.
206 * common/rsp-low.h: Include common/byte-vector.h.
207 (hex2bin): New overload.
208 * common/rsp-low.c (hex2bin): New overload.
209
210 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
211
212 * inferior.h (private_inferior): Define structure type, add
213 virtual pure destructor.
214 (inferior) <priv>: Change type to unique_ptr.
215 * inferior.c (private_inferior::~private_inferior): Provide
216 default implementation.
217 (inferior::~inferior): Don't free priv field.
218 (exit_inferior_1): Likewise.
219 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
220 (darwin_exception_info): Remove typedef.
221 (DEF_VEC_O (darwin_thread_t)); Remove.
222 (private_inferior): Rename to ...
223 (darwin_private_inferior): ... this, extend private_inferior.
224 (get_darwin_inferior): New.
225 <threads>: Change type to std::vector of darwin_thread_t pointers.
226 * darwin-nat.c (darwin_check_new_threads): Adjust.
227 (find_inferior_task_it): Adjust.
228 (darwin_find_thread); Adjust.
229 (darwin_suspend_inferior): Adjust.
230 (darwin_resume_inferior): Adjust.
231 (darwin_find_new_inferior): Adjust.
232 (darwin_decode_notify_message): Adjust.
233 (darwin_send_reply): Adjust.
234 (darwin_resume_inferior_threads): Adjust.
235 (darwin_suspend_inferior_threads): Adjust.
236 (darwin_decode_message): Adjust.
237 (darwin_wait): Adjust.
238 (darwin_interrupt): Adjust.
239 (darwin_deallocate_threads): Adjust.
240 (darwin_mourn_inferior): Adjust, don't free private data.
241 (darwin_reply_to_all_pending_messages): Adjust.
242 (darwin_stop_inferior): Adjust.
243 (darwin_setup_exceptions): Adjust.
244 (darwin_kill_inferior): Adjust.
245 (darwin_setup_request_notification): Adjust.
246 (darwin_attach_pid): Adjust.
247 (darwin_init_thread_list): Adjust.
248 (darwin_setup_fake_stop_event): Adjust.
249 (darwin_attach): Adjust.
250 (darwin_detach): Adjust.
251 (darwin_xfer_partial): Adjust.
252 (set_enable_mach_exceptions): Adjust.
253 (darwin_pid_to_exec_file): Adjust.
254 (darwin_get_ada_task_ptid): Adjust.
255 * darwin-nat-info.c (get_task_from_args): Adjust.
256 (info_mach_ports_command): Adjust.
257 (info_mach_region_command): Adjust.
258 (info_mach_exceptions_command): Adjust.
259 * remote.c (private_inferior): Rename to ...
260 (remote_private_inferior): ... this, initialize fields.
261 (get_remote_inferior); New.
262 (remote_commit_resume): Use get_remote_inferior.
263 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
264
265 2017-11-24 Pedro Alves <palves@redhat.com>
266
267 * NEWS: Mention linespecs and explicit locations, and completion
268 improvements.
269
270 2017-11-24 Yao Qi <yao.qi@linaro.org>
271
272 * regcache.c (regcache::dump): Remove footnote_register_size.
273
274 2017-11-24 Yao Qi <yao.qi@linaro.org>
275
276 * regcache.c (cooked_read_test): Add more test for readonly
277 regcache.
278
279 2017-11-24 Yao Qi <yao.qi@linaro.org>
280
281 * gdbarch-selftests.c (test_target_has_registers): Move it to
282 target.c.
283 (test_target_has_stack): Likewise.
284 (test_target_has_memory): Likewise.
285 (test_target_prepare_to_store): Likewise.
286 (test_target_store_registers): Likewise.
287 (test_target_ops): Likewise.
288 * regcache.c: Include selftest-arch.h and gdbthread.h.
289 (target_ops_no_register): New class.
290 (test_target_fetch_registers): New.
291 (test_target_store_registers): New.
292 (test_target_xfer_partial): New.
293 (readwrite_regcache): New.
294 (cooked_read_test): New.
295 (_initialize_regcache): Register the test.
296 * target.c: (test_target_has_registers): Moved from
297 gdbarch-selftests.c.
298 (test_target_has_stack): Likewise.
299 (test_target_has_memory): Likewise.
300 (test_target_prepare_to_store): Likewise.
301 (test_target_store_registers): Likewise.
302 * target.h (test_target_ops): New class.
303
304 2017-11-24 Alan Hayward <alan.hayward@arm.com>
305
306 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
307 selftest.
308
309 2017-11-24 Alan Hayward <alan.hayward@arm.com>
310
311 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
312 * arch/aarch64.c (aarch64_create_target_description): Create
313 new target description.
314 * features/Makefile: Add new files.
315 * features/aarch64.c: Remove file.
316 * features/aarch64-core.c: New autogenerated file.
317 * features/aarch64-fpu.c: New autogenerated file.
318 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
319
320 2017-11-24 Alan Hayward <alan.hayward@arm.com>
321
322 * Makefile.in: Add new files.
323 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
324 aarch64_read_description.
325 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
326 Call aarch64_read_description.
327 * aarch64-tdep.c (aarch64_read_description): New function.
328 (aarch64_gdbarch_init): Call aarch64_read_description.
329 * aarch64-tdep.h (aarch64_read_description): New function.
330 * arch/aarch64.c: New file.
331 * configure.tgt: Add new files.
332
333 2017-11-24 Yao Qi <yao.qi@linaro.org>
334
335 * mi/mi-main.c (register_changed_p): Update.
336 * value.c (value_contents_bits_eq): Change return type.
337 (value_contents_eq): Likewise.
338 * value.h: Update comments.
339
340 2017-11-24 Yao Qi <yao.qi@linaro.org>
341
342 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
343 local 'changed'. Remove error.
344 (register_changed_p): Change return type to bool.
345
346 2017-11-24 Yao Qi <yao.qi@linaro.org>
347
348 * arch/tic6x.c: New file.
349 * arch/tic6x.h: New file.
350 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
351 tic6x-core.xml and tic6x-gp.xml.
352 * features/tic6x-c6xp.c: Generated.
353 * features/tic6x-core.c: Generated.
354 * features/tic6x-gp.c: Generated.
355 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
356 "tic6x-".
357
358 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
359
360 * mi/mi-main.c (list_available_thread_groups): Change map value
361 type to std::vector.
362
363 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
364
365 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
366
367 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
368
369 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
370 back to...
371 <children_requested>: ... this.
372 (varobj_get_num_children, varobj_update): Adjust.
373
374 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
375
376 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
377 (ada_value_has_mutated): Likewise.
378 * c-varobj.c (varobj_is_anonymous_child): Likewise.
379 (c_is_path_expr_parent): Likewise.
380 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
381 (mi_cmd_var_set_frozen): Likewise.
382 (mi_cmd_var_update_iter): Likewise.
383 (mi_cmd_var_update): Likewise.
384 * varobj.c (pretty_printing): Likewise.
385 (varobj_enable_pretty_printing): Likewise.
386 (struct varobj_root) <floating, is_valid>: Likewise.
387 (struct varobj_dynamic) <children_requested>: Likewise.
388 (delete_variable): Likewise.
389 (delete_variable_1): Likewise.
390 (install_variable): Likewise.
391 (update_type_if_necessary): Likewise.
392 (install_new_value): Likewise.
393 (value_of_root): Likewise.
394 (is_root_p): Likewise.
395 (varobj_create): Likewise.
396 (varobj_delete): Likewise.
397 (varobj_has_more): Likewise.
398 (varobj_set_frozen): Likewise.
399 (varobj_get_frozen): Likewise.
400 (install_dynamic_child): Likewise.
401 (dynamic_varobj_has_child_method): Likewise.
402 (update_dynamic_varobj_children): Likewise.
403 (varobj_get_num_children): Likewise.
404 (varobj_list_children): Likewise.
405 (is_path_expr_parent): Likewise.
406 (varobj_default_is_path_expr_parent): Likewise.
407 (varobj_is_dynamic_p): Likewise.
408 (varobj_set_value): Likewise.
409 (varobj_value_has_mutated): Likewise.
410 (varobj_update): Likewise.
411 (check_scope): Likewise.
412 (value_of_root_1): Likewise.
413 (varobj_value_get_print_value): Likewise.
414 (varobj_editable_p): Likewise.
415 (varobj_value_is_changeable_p): Likewise.
416 (varobj_floating_p): Likewise.
417 (varobj_default_value_is_changeable_p): Likewise.
418 (varobj_invalidate_iter): Likewise.
419 * varobj.h (struct varobj_update_result) <type_changed,
420 children_changed, changed, value_installed>: Likewise.
421 (struct varobj) <updated, frozen, not_fetched>: Likewise.
422 (struct lang_varobj_ops) <value_is_changeable_p,
423 value_has_mutated, is_path_expr_parent>: Likewise.
424 (varobj_delete): Likewise.
425 (varobj_set_frozen): Likewise.
426 (varobj_get_frozen): Likewise.
427 (varobj_set_value): Likewise.
428 (varobj_update): Likewise.
429 (varobj_editable_p): Likewise.
430 (varobj_floating_p): Likewise.
431 (varobj_has_more): Likewise.
432 (varobj_is_dynamic_p): Likewise.
433 (varobj_default_value_is_changeable_p): Likewise.
434 (varobj_value_is_changeable_p): Likewise.
435 (varobj_is_anonymous_child): Likewise.
436 (varobj_default_is_path_expr_parent): Likewise.
437
438 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
439
440 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
441 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
442 <type_str>: Convert to 'std::string'.
443 <expr>: Convert to 'expression_up'.
444 (dtrace_probe_arg_s): Delete type and VEC.
445 (dtrace_probe_enabler_s): Likewise.
446 (struct dtrace_probe): Replace by...
447 (class dtrace_static_probe_ops): ...this and...
448 (class dtrace_probe): ...this.
449 (dtrace_probe_is_linespec): Rename to...
450 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
451 to reflect change.
452 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
453 Adjust code. Create new instance of 'dtrace_probe'.
454 (dtrace_build_arg_exprs): Rename to...
455 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
456 reflect change.
457 (dtrace_get_probes): Rename to...
458 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
459 to reflect change.
460 (dtrace_get_arg): Rename to...
461 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
462 reflect change.
463 (dtrace_probe_is_enabled): Rename to...
464 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
465 change.
466 (dtrace_get_probe_address): Rename to...
467 (dtrace_probe::get_relocated_address): ...this. Adjust code
468 to reflect change.
469 (dtrace_get_probe_argument_count): Rename to...
470 (dtrace_probe::get_argument_count): ...this. Adjust code to
471 reflect change.
472 (dtrace_can_evaluate_probe_arguments): Rename to...
473 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
474 to reflect change.
475 (dtrace_evaluate_probe_argument): Rename to...
476 (dtrace_probe::evaluate_argument): ...this. Adjust code to
477 reflect change.
478 (dtrace_compile_to_ax): Rename to...
479 (dtrace_probe::compile_to_ax): ...this. Adjust code to
480 reflect change.
481 (dtrace_probe_destroy): Delete.
482 (dtrace_type_name): Rename to...
483 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
484 reflect change.
485 (dtrace_probe::get_static_ops): New method.
486 (dtrace_gen_info_probes_table_header): Rename to...
487 (dtrace_static_probe_ops::gen_info_probes_table_header):
488 ...this. Adjust code to reflect change.
489 (dtrace_gen_info_probes_table_values): Rename to...
490 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
491 code to reflect change.
492 (dtrace_enable_probe): Rename to...
493 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
494 change.
495 (dtrace_disable_probe): Rename to...
496 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
497 change.
498 (struct probe_ops dtrace_probe_ops): Delete.
499 (info_probes_dtrace_command): Call 'info_probes_for_spops'
500 instead of 'info_probes_for_ops'.
501 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
502 of 'all_probe_ops'.
503
504 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
505 Simon Marchi <simark@simark.ca>
506
507 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
508 variable.
509 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
510 <aexpr>: Change type to 'expression_up'.
511 (stap_probe_arg_s): Delete type and VEC.
512 (struct stap_probe): Delete. Replace by...
513 (class stap_static_probe_ops): ...this and...
514 (class stap_probe): ...this. Rename variables to add 'm_'
515 prefix. Do not use 'union' for arguments anymore.
516 (stap_get_expected_argument_type): Receive probe name instead
517 of 'struct stap_probe'. Adjust code.
518 (stap_parse_probe_arguments): Rename to...
519 (stap_probe::parse_arguments): ...this. Adjust code to
520 reflect change.
521 (stap_get_probe_address): Rename to...
522 (stap_probe::get_relocated_address): ...this. Adjust code
523 to reflect change.
524 (stap_get_probe_argument_count): Rename to...
525 (stap_probe::get_argument_count): ...this. Adjust code
526 to reflect change.
527 (stap_get_arg): Rename to...
528 (stap_probe::get_arg_by_number'): ...this. Adjust code to
529 reflect change.
530 (can_evaluate_probe_arguments): Rename to...
531 (stap_probe::can_evaluate_arguments): ...this. Adjust code
532 to reflect change.
533 (stap_evaluate_probe_argument): Rename to...
534 (stap_probe::evaluate_argument): ...this. Adjust code
535 to reflect change.
536 (stap_compile_to_ax): Rename to...
537 (stap_probe::compile_to_ax): ...this. Adjust code to
538 reflect change.
539 (stap_probe_destroy): Delete.
540 (stap_modify_semaphore): Adjust comment.
541 (stap_set_semaphore): Rename to...
542 (stap_probe::set_semaphore): ...this. Adjust code to reflect
543 change.
544 (stap_clear_semaphore): Rename to...
545 (stap_probe::clear_semaphore): ...this. Adjust code to
546 reflect change.
547 (stap_probe::get_static_ops): New method.
548 (handle_stap_probe): Adjust code to create instance of
549 'stap_probe'.
550 (stap_get_probes): Rename to...
551 (stap_static_probe_ops::get_probes): ...this. Adjust code to
552 reflect change.
553 (stap_probe_is_linespec): Rename to...
554 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
555 reflect change.
556 (stap_type_name): Rename to...
557 (stap_static_probe_ops::type_name): ...this. Adjust code to
558 reflect change.
559 (stap_gen_info_probes_table_header): Rename to...
560 (stap_static_probe_ops::gen_info_probes_table_header):
561 ...this. Adjust code to reflect change.
562 (stap_gen_info_probes_table_values): Rename to...
563 (stap_probe::gen_info_probes_table_values): ...this. Adjust
564 code to reflect change.
565 (struct probe_ops stap_probe_ops): Delete.
566 (info_probes_stap_command): Use 'info_probes_for_spops'
567 instead of 'info_probes_for_ops'.
568 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
569 of 'all_probe_ops'.
570
571 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
572
573 * break-catch-throw.c (fetch_probe_arguments): Use
574 'probe.prob' instead of 'probe.probe'.
575 * breakpoint.c (create_longjmp_master_breakpoint): Call
576 'can_evaluate_arguments' and 'get_relocated_address' methods
577 from probe.
578 (create_exception_master_breakpoint): Likewise.
579 (add_location_to_breakpoint): Use 'sal->prob' instead of
580 'sal->probe'.
581 (bkpt_probe_insert_location): Call 'set_semaphore' method from
582 probe.
583 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
584 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
585 of 'probe_ops'.
586 (probe_key_free): Call 'delete' on probe.
587 (check_exception_resume): Use 'probe.prob' instead of
588 'probe.probe'.
589 * location.c (string_to_event_location_basic): Call
590 'probe_linespec_to_static_ops'.
591 * probe.c (class any_static_probe_ops): New class.
592 (any_static_probe_ops any_static_probe_ops): New variable.
593 (parse_probes_in_pspace): Receive 'static_probe_ops' as
594 argument. Adjust code to reflect change.
595 (parse_probes): Use 'static_probe_ops' instead of
596 'probe_ops'. Adjust code to reflect change.
597 (find_probes_in_objfile): Call methods to get name and
598 provider from probe.
599 (find_probe_by_pc): Use 'result.prob' instead of
600 'result.probe'. Call 'get_relocated_address' method from
601 probe.
602 (collect_probes): Adjust comment and argument list to receive
603 'static_probe_ops' instead of 'probe_ops'. Adjust code to
604 reflect change. Call necessary methods from probe.
605 (compare_probes): Call methods to get name and provider from
606 probes.
607 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
608 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
609 adjust code accordingly.
610 (print_ui_out_not_applicables): Likewise.
611 (info_probes_for_ops): Rename to...
612 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
613 as argument instead of 'probe_ops'. Adjust code. Call
614 necessary methods from probe.
615 (info_probes_command): Use 'info_probes_for_spops'.
616 (enable_probes_command): Pass correct argument to
617 'collect_probes'. Call methods from probe.
618 (disable_probes_command): Likewise.
619 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
620 (get_probe_argument_count): Move to
621 'any_static_probe_ops::get_argument_count'.
622 (can_evaluate_probe_arguments): Move to
623 'any_static_probe_ops::can_evaluate_arguments'.
624 (evaluate_probe_argument): Move to
625 'any_static_probe_ops::evaluate_argument'.
626 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
627 'probe.probe'.
628 (probe_linespec_to_ops): Rename to...
629 (probe_linespec_to_static_ops): ...this. Adjust code.
630 (probe_any_is_linespec): Rename to...
631 (any_static_probe_ops::is_linespec): ...this.
632 (probe_any_get_probes): Rename to...
633 (any_static_probe_ops::get_probes): ...this.
634 (any_static_probe_ops::type_name): New method.
635 (any_static_probe_ops::gen_info_probes_table_header): New
636 method.
637 (compute_probe_arg): Use 'pc_probe.prob' instead of
638 'pc_probe.probe'. Call methods from probe.
639 (compile_probe_arg): Likewise.
640 (std::vector<const probe_ops *> all_probe_ops): Delete.
641 (std::vector<const static_probe_ops *> all_static_probe_ops):
642 New variable.
643 (_initialize_probe): Use 'all_static_probe_ops' instead of
644 'all_probe_ops'.
645 * probe.h (struct info_probe_column) <field_name>: Delete
646 extraneous newline
647 (info_probe_column_s): Delete type and VEC.
648 (struct probe_ops): Delete. Replace with...
649 (class static_probe_ops): ...this and...
650 (clas probe): ...this.
651 (struct bound_probe) <bound_probe>: Delete extraneous
652 newline. Adjust constructor to receive 'probe' instead of
653 'struct probe'.
654 <probe>: Rename to...
655 <prob>: ...this. Delete extraneous newline.
656 <objfile>: Delete extraneous newline.
657 (register_probe_ops): Delete unused prototype.
658 (info_probes_for_ops): Rename to...
659 (info_probes_for_spops): ...this. Adjust comment.
660 (get_probe_address): Move to 'probe::get_address'.
661 (get_probe_argument_count): Move to
662 'probe::get_argument_count'.
663 (can_evaluate_probe_arguments): Move to
664 'probe::can_evaluate_arguments'.
665 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
666 * solib-svr4.c (struct svr4_info): Adjust comment.
667 (struct probe_and_action) <probe>: Rename to...
668 <prob>: ...this.
669 (register_solib_event_probe): Receive 'probe' instead of
670 'struct probe' as argument. Use 'prob' instead of 'probe'
671 when applicable.
672 (solib_event_probe_action): Call 'get_argument_count' method
673 from probe. Adjust comment.
674 (svr4_handle_solib_event): Adjust comment. Call
675 'evaluate_argument' method from probe.
676 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
677 from probe.
678 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
679 'struct probe'. Call 'can_evaluate_arguments' from probe.
680 * symfile.h: Forward declare 'class probe' instead of 'struct
681 probe'.
682 * symtab.h: Likewise.
683 (struct symtab_and_line) <probe>: Rename to...
684 <prob>: ...this.
685 * tracepoint.c (start_tracing): Use 'prob' when applicable.
686 Call probe methods.
687 (stop_tracing): Likewise.
688
689 2017-11-22 Joel Brobecker <brobecker@adacore.com>
690
691 * ravenscar-thread.c (ravenscar_inferior_created): Remove
692 trailing newline at end of string in call to warning.
693
694 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * osdata.h: Include vector isntead of vec.h.
697 (osdata_column_s): Remove typedef.
698 (struct osdata_column): Add constructor.
699 <name, value>: Change type to std::string.
700 (DEF_VEC_O (osdata_column_s)): Remove.
701 (osdata_item_s): Remove typedef.
702 (struct osdata_item) <columns>: Change type to std::vector.
703 (DEF_VEC_O (osdata_item_s)): Remove.
704 (struct osdata): Add constructor.
705 <type>: Change type to std::string.
706 <items>: Change type to std::vector.
707 (osdata_p): Remove typedef.
708 (DEF_VEC_P (osdata_p)): Remove.
709 (osdata_parse): Return a unique_ptr.
710 (osdata_free): Remove.
711 (make_cleanup_osdata_free): Remove.
712 (get_osdata): Return a unique_ptr.
713 (get_osdata_column): Return pointer to std::string, take a
714 reference to osdata_item as parameter.
715 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
716 unique_ptr.
717 <property_name>: Change type to std::string.
718 (osdata_start_osdata): Allocate osdata with new and adjust.
719 (osdata_start_item): Adjust.
720 (osdata_start_column): Adjust.
721 (osdata_end_column): Adjust.
722 (clear_parsing_data): Remove.
723 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
724 (osdata_item_clear): Remove.
725 (get_osdata): return a unique_ptr and adjust.
726 (get_osdata_column): Return a pointer to std::string and adjust.
727 (info_osdata): Adjust.
728 * mi/mi-main.c: Include <map>.
729 (free_vector_of_osdata_items): Remove.
730 (list_available_thread_groups): Adjust, use std::map instead of
731 splay tree.
732
733 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
734
735 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
736 case in switch.
737
738 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
739
740 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
741
742 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * varobj.h (struct varobj_update_result): Add constructor, add
745 move constructor, disable copy and assign, initialize fields.
746 <newobj>: Change type to std::vector.
747 (varobj_update): Return std::vector.
748 * varobj.c (install_dynamic_child): Change VEC parameters to
749 std::vector and adjust.
750 (update_dynamic_varobj_children): Likewise.
751 (varobj_update): Return std::vector and adjust.
752 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
753
754 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * varobj.h (struct varobj) <parent>: Remove const.
757 <children>: Change type to std::vector.
758 (varobj_list_children): Return std::vector const reference.
759 (varobj_restrict_range): Change parameter type to std::vector
760 const reference.
761 * varobj.c (varobj_has_more): Adjust.
762 (varobj_restrict_range): Change parameter type to std::vector
763 const reference and adjust.
764 (install_dynamic_child): Adjust.
765 (update_dynamic_varobj_children): Adjust.
766 (varobj_list_children): Return std::vector const reference and
767 adjust.
768 (varobj_add_child): Adjust.
769 (update_type_if_necessary): Adjust.
770 (varobj_update): Adjust.
771 (delete_variable_1): Adjust.
772 * ada-varobj.c (ada_value_has_mutated): Adjust.
773 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
774
775 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
776
777 * varobj.h (struct varobj): Add constructor and destructor,
778 initialize fields.
779 * varobj.c (struct varobj_root): Initialize fields.
780 (struct varobj_dynamic): Initialize fields.
781 (varobj_create): Use unique_ptr instead of cleanup. Create
782 varobj with new instead of new_root_variable.
783 (delete_variable_1): Free variable with delete instead of
784 free_variable.
785 (create_child_with_value): Create variable with new instead of
786 new_variable.
787 (varobj::varobj): New.
788 (varobj::~varobj): New (body mostly coming from free_variable).
789 (new_variable): Remove.
790 (free_variable): Remove.
791 (do_free_variable_cleanup): Remove.
792 (make_cleanup_free_variable): Remove.
793
794 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
795
796 * core-regset.c: Remove file.
797 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
798
799 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
800
801 * NEWS: Document use of GNU MPFR.
802 * README: Likewise.
803
804 * Makefile.in (LIBMPFR): Add define.
805 (CLIBS): Add $(LIBMPFR).
806 * configure.ac: Add --with-mpfr configure option.
807 * configure: Regenerate.
808 * config.in: Regenerate.
809
810 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
811 (class mpfr_float_ops): New type.
812 (mpfr_float_ops::from_target): Two new overloaded functions.
813 (mpfr_float_ops::to_target): Likewise.
814 (mpfr_float_ops::to_string): New function.
815 (mpfr_float_ops::from_string): Likewise.
816 (mpfr_float_ops::to_longest): Likewise.
817 (mpfr_float_ops::from_longest): Likewise.
818 (mpfr_float_ops::from_ulongest): Likewise.
819 (mpfr_float_ops::to_host_double): Likewise.
820 (mpfr_float_ops::from_host_double): Likewise.
821 (mpfr_float_ops::convert): Likewise.
822 (mpfr_float_ops::binop): Likewise.
823 (mpfr_float_ops::compare): Likewise.
824 (get_target_float_ops): Use mpfr_float_ops if available.
825
826 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
827
828 * target-float.c: Do not include <math.h>.
829 Include <cmath> and <limits>.
830 (DOUBLEST): Do not define.
831 (class target_float_ops): New type.
832 (class host_float_ops): New templated type.
833 (class decimal_float_ops): New type.
834
835 (floatformat_to_doublest): Rename to ...
836 (host_float_ops<T>::from_target): ... this. Use template type T
837 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
838 (host_float_ops<T>::from_target): New overload using a type argument.
839 (floatformat_from_doublest): Rename to ...
840 (host_float_ops<T>::to_target): ... this. Use template type T
841 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
842 (host_float_ops<T>::to_target): New overload using a type argument.
843 (floatformat_printf_format): New function.
844 (struct printf_length_modifier): New templated type.
845 (floatformat_to_string): Rename to ...
846 (host_float_ops<T>::to_string): ... this. Use type instead of
847 floatformat argument. Use floatformat_printf_format and
848 printf_length_modifier. Remove special handling of invalid numbers,
849 infinities and NaN (moved to target_float_to_string).
850 (struct scanf_length_modifier): New templated type.
851 (floatformat_from_string): Rename to ...
852 (host_float_ops<T>::from_string): ... this. Use type instead of
853 floatformat argument. Use scanf_length_modifier.
854 (floatformat_to_longest): Rename to ...
855 (host_float_ops<T>::to_longest): ... this. Use type instead of
856 floatformat argument. Handle out-of-range values deterministically.
857 (floatformat_from_longest): Rename to ...
858 (host_float_ops<T>::from_longest): ... this. Use type instead of
859 floatformat argument.
860 (floatformat_from_ulongest): Rename to ...
861 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
862 floatformat argument.
863 (floatformat_to_host_double): Rename to ...
864 (host_float_ops<T>::to_host_double): ... this. Use type instead of
865 floatformat argument.
866 (floatformat_from_host_double): Rename to ...
867 (host_float_ops<T>::from_host_double): ... this. Use type instead of
868 floatformat argument.
869 (floatformat_convert): Rename to ...
870 (host_float_ops<T>::convert): ... this. Use type instead of
871 floatformat arguments. Remove handling of no-op conversions.
872 (floatformat_binop): Rename to ...
873 (host_float_ops<T>::binop): ... this. Use type instead of
874 floatformat arguments.
875 (floatformat_compare): Rename to ...
876 (host_float_ops<T>::compare): ... this. Use type instead of
877 floatformat arguments.
878
879 (match_endianness): Use type instead of length/byte_order arguments.
880 (set_decnumber_context): Likewise.
881 (decimal_from_number): Likewise. Update calls.
882 (decimal_to_number): Likewise.
883 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
884 (decimal_float_ops::to_host_double): New dummy function.
885 (decimal_float_ops::from_host_double): Likewise.
886 (decimal_to_string): Rename to ...
887 (decimal_float_ops::to_string): ... this. Use type instead of
888 length/byte_order arguments. Update calls.
889 (decimal_from_string): Rename to ...
890 (decimal_float_ops::from_string): ... this. Use type instead of
891 length/byte_order arguments. Update calls.
892 (decimal_from_longest): Rename to ...
893 (decimal_float_ops::from_longest): ... this. Use type instead of
894 length/byte_order arguments. Update calls.
895 (decimal_from_ulongest): Rename to ...
896 (decimal_float_ops::from_ulongest): ... this. Use type instead of
897 length/byte_order arguments. Update calls.
898 (decimal_to_longest): Rename to ...
899 (decimal_float_ops::to_longest): ... this. Use type instead of
900 length/byte_order arguments. Update calls.
901 (decimal_binop): Rename to ...
902 (decimal_float_ops::binop): ... this. Use type instead of
903 length/byte_order arguments. Update calls.
904 (decimal_compare): Rename to ...
905 (decimal_float_ops::compare): ... this. Use type instead of
906 length/byte_order arguments. Update calls.
907 (decimal_convert): Rename to ...
908 (decimal_float_ops::convert): ... this. Use type instead of
909 length/byte_order arguments. Update calls.
910
911 (target_float_same_category_p): New function.
912 (target_float_same_format_p): Likewise.
913 (target_float_format_length): Likewise.
914 (enum target_float_ops_kind): New type.
915 (get_target_float_ops_kind): New function.
916 (get_target_float_ops): Three new overloaded functions.
917
918 (target_float_is_zero): Update call.
919 (target_float_to_string): Add special handling of invalid numbers,
920 infinities and NaN (moved from floatformat_to_string). Use
921 target_float_ops callback.
922 (target_float_from_string): Use target_float_ops callback.
923 (target_float_to_longest): Likewise.
924 (target_float_from_longest): Likewise.
925 (target_float_from_ulongest): Likewise.
926 (target_float_to_host_double): Likewise.
927 (target_float_from_host_double): Likewise.
928 (target_float_convert): Add special case for no-op conversions.
929 Use target_float_ops callback.
930 (target_float_binop): Use target_float_ops callback.
931 (target_float_compare): Likewise.
932
933 2017-11-22 Yao Qi <yao.qi@linaro.org>
934
935 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
936
937 2017-11-22 Yao Qi <yao.qi@linaro.org>
938
939 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
940 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
941
942 2017-11-21 Jerome Guitton <guitton@adacore.com>
943
944 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
945 with event ptid from the lower layer before doing the
946 ravenscar-specific update.
947
948 2017-11-21 Joel Brobecker <brobecker@adacore.com>
949
950 * ravenscar-thread.c (is_ravenscar_task): Also verify that
951 the ptid's TID is nonzero.
952
953 2017-11-21 Joel Brobecker <brobecker@adacore.com>
954
955 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
956 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
957 Make non-static. Change return type to char *. Adjust code
958 accordingly. Rewrite the function's documentation.
959 (read_atcb): Adjust call to get_tcb_types_info accordingly.
960 * ravenscar-thread.c (ravenscar_inferior_created): Check that
961 we have enough debugging information in the runtime to support
962 Ada task debugging before we enable the ravenscar-thread layer.
963
964 2017-11-21 Joel Brobecker <brobecker@adacore.com>
965
966 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
967 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
968 * ravenscar-thread.c: Add into comment.
969 (base_magic_null_ptid): Delete.
970 (base_ptid): Change documentation.
971 (ravenscar_active_task): Renames ravenscar_running_thread.
972 All callers updated throughout.
973 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
974 (ravenscar_task_is_currently_active): Likewise.
975 (get_base_thread_from_ravenscar_task): Ditto.
976 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
977 (ravenscar_runtime_initialized): Likewise.
978 (get_running_thread_id): Add new parameter "cpu". Adjust
979 implementation to handle this new parameter.
980 (ravenscar_fetch_registers): Small adjustment to use
981 is_ravenscar_task and ravenscar_task_is_currently_active in
982 order to decide whether to use the target beneath or this
983 module's arch_ops.
984 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
985 (ravenscar_stopped_by_sw_breakpoint): Use
986 get_base_thread_from_ravenscar_task to get the underlying
987 thread, rather than using base_ptid.
988 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
989 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
990 Likewise.
991 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
992
993 2017-11-21 Joel Brobecker <brobecker@adacore.com>
994
995 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
996 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
997 (get_tcb_types_info): Set fieldnos.base_cpu.
998 (read_atcb): Set task_info->base_cpu.
999 (info_task): Print "Base CPU" info if set by runtime.
1000
1001 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1002
1003 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1004 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1005 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1006 New functions.
1007 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1008 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1009 to_stopped_data_address and to_core_of_thread fields of
1010 ravenscar_ops.
1011
1012 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1013
1014 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1015 (struct gdbarch_tdep): New member long_double_abi.
1016 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1017 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1018 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1019 format depending on long_double_abi tdep member.
1020 (ppc_floatformat_for_type): Handle __ibm128 type.
1021
1022 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1023
1024 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1025
1026 2017-11-21 Pedro Alves <palves@redhat.com>
1027
1028 * dwarf2read.c (mapped_index::find_name_components_bounds)
1029 <completion mode, upper bound>: Use std::lower_bound instead of
1030 std::upper_bound.
1031 (test_mapped_index_find_name_component_bounds): Remove incorrect
1032 "t1_fund" from expected symbols.
1033
1034 2017-11-21 Pedro Alves <palves@redhat.com>
1035
1036 * dwarf2read.c (mapped_index::name_components_casing): New field.
1037 (mapped_index) <build_name_components,
1038 find_name_components_bounds): Declare new methods.
1039 (mapped_index::find_name_components_bounds)
1040 (mapped_index::build_name_components): New methods, factored out
1041 from dw2_expand_symtabs_matching_symbol.
1042 (check_find_bounds_finds)
1043 (test_mapped_index_find_name_component_bounds): New.
1044 (run_test): Rename to ...
1045 (test_dw2_expand_symtabs_matching_symbol): ... this.
1046 (run_test): Reimplement.
1047
1048 2017-11-21 Pedro Alves <palves@redhat.com>
1049
1050 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1051 (symbol_end): Use cp_ident_is_alnum.
1052 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1053 * dwarf2read.c (make_sort_after_prefix_name): New function.
1054 (dw2_expand_symtabs_matching_symbol): Use it.
1055 (test_symbols): Add more symbols.
1056 (run_test): Add tests.
1057
1058 2017-11-17 Tom Tromey <tom@tromey.com>
1059
1060 * symtab.h (enum symbol_subclass_kind): New.
1061 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1062 Remove.
1063 <subclass>: New member.
1064 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1065 * rust-lang.c (rust_get_trait_object_pointer): Update.
1066 * dwarf2read.c (read_func_scope): Update.
1067 (read_variable): Update.
1068
1069 2017-11-17 Tom Tromey <tom@tromey.com>
1070
1071 * dwarf2read.c (read_func_scope): Update.
1072 * symtab.h (struct template_symbol): Derive from symbol.
1073 <base>: Remove.
1074
1075 2017-11-17 Tom Tromey <tom@tromey.com>
1076
1077 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1078 (struct rust_vtable_symbol): New.
1079 (find_symbol_at_address): Declare.
1080 * symtab.c (find_symbol_at_address): New function.
1081 * symfile.h (struct quick_symbol_functions)
1082 <find_compunit_symtab_by_address>: New member.
1083 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1084 function.
1085 (debug_sym_quick_functions): Link to
1086 debug_qf_find_compunit_symtab_by_address.
1087 * rust-lang.c (rust_get_trait_object_pointer): New function.
1088 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1089 rust_get_trait_object_pointer.
1090 * psymtab.c (psym_relocate): Clear psymbol_map.
1091 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1092 functions.
1093 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1094 * objfiles.h (struct objfile) <psymbol_map>: New member.
1095 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1096 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1097 (rust_containing_type, read_variable): New functions.
1098
1099 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1100
1101 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1102
1103 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1104
1105 * common/filestuff.c: Include <algorithm>.
1106 (open_fds): Change type to std::vector<int>.
1107 (do_mark_open_fd): Adjust.
1108 (unmark_fd_no_cloexec): Adjust.
1109 (do_close): Adjust.
1110
1111 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1112
1113 * breakpoint.c (output_thread_groups): Take an std::vector.
1114 (print_one_breakpoint_location): Adjust.
1115
1116 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1117
1118 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1119 (ada_evaluate_subexp_for_cast): New function.
1120 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1121 ada_evaluate_subexp_for_cast.
1122 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1123 eval_skip_value.
1124 * eval.c (evaluate_var_value): Make non-static.
1125 (evaluate_var_msym_value, eval_skip_value): Likewise.
1126 * value.h (evaluate_var_value, evaluate_var_msym_value)
1127 (eval_skip_value): Declare.
1128
1129 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1130
1131 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1132 Update all callers.
1133
1134 2017-11-16 Pedro Alves <palves@redhat.com>
1135
1136 * python/py-unwind.c (pyuw_sniffer): Translate
1137 PyExc_KeyboardInterrupt to a GDB Quit exception.
1138
1139 2017-11-16 Pedro Alves <palves@redhat.com>
1140
1141 * infrun.c (resume_cleanups): Delete.
1142 (resume): No longer install a resume_cleanups cleanup nor call
1143 QUIT.
1144 (proceed): Pass the terminal to the inferior.
1145 (keep_going_pass_signal): No longer install a resume_cleanups
1146 cleanup.
1147
1148 2017-11-16 Pedro Alves <palves@redhat.com>
1149
1150 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1151 if the prompt is blocked.
1152
1153 2017-11-16 Pedro Alves <palves@redhat.com>
1154
1155 * breakpoint.c (insert_bp_location): Replace bp_err and
1156 bp_err_message locals by a gdb_exception local.
1157
1158 2017-11-16 Pedro Alves <palves@redhat.com>
1159
1160 * inflow.c (scoped_ignore_sigttou): New class.
1161 (child_terminal_ours_1, new_tty): Use it.
1162
1163 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1164
1165 * target-float.c (decimal_from_number): Add byte_order argument and
1166 call match_endianness. Error if unknown floating-point type.
1167 (decimal_to_number): Add byte_order argument and call match_endianness.
1168 (decimal_from_longest): Update call. Do not call match_endianness.
1169 (decimal_from_ulongest): Likewise.
1170 (decimal_binop): Likewise.
1171 (decimal_is_zero): Likewise.
1172 (decimal_compare): Likewise.
1173 (decimal_convert): Likewise.
1174
1175 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1176
1177 * python/python.c (gdbpy_rbreak): New function.
1178 * NEWS: Document Python rbreak feature.
1179
1180 2017-11-16 Yao Qi <yao.qi@linaro.org>
1181
1182 * features/tic6x-c62x.xml: Remove.
1183 * features/tic6x-c64x.xml: Remove.
1184 * features/tic6x-c64xp.xml: Remove.
1185
1186 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1187
1188 * symtab.h: Include <array>.
1189
1190 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1191
1192 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1193 (bsd_kvm_proc_cmd): Likewise.
1194
1195 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1196
1197 * tui/tui-win.c (window_name_completer): Replace VEC with
1198 std::vector.
1199
1200 2017-11-15 Andrew Cagney <cagney@gnu.org>
1201
1202 * MAINTAINERS: Remove no-longer applicable entries.
1203
1204 2017-11-15 Andrew Cagney <cagney@gnu.org>
1205
1206 * MAINTAINERS: Move self to Past Maintainers.
1207
1208 2017-11-15 Yao Qi <yao.qi@linaro.org>
1209
1210 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1211 * features/nios2-linux.c: Remove.
1212 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1213 initialize_tdesc_nios2_linux.
1214
1215 2017-11-15 Yao Qi <yao.qi@linaro.org>
1216
1217 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1218 M68HC11_LAST_HARD_REG + 1.
1219
1220 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1221
1222 PR gdb/22388
1223 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1224 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1225 Return TARGET_XFER_EOF if size of returned data is 0.
1226
1227 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1228
1229 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1230 memory-map-selftests.c.
1231 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1232 * memory-map.c (memory_map_start_memory): Fix computation of hi
1233 address.
1234 * unittests/memory-map-selftests.c: New file.
1235
1236 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1237
1238 * ada-lang.c: Fix some typos in the general command documenting
1239 how Ada expressions are being evaluated and how their result
1240 is printed.
1241
1242 2017-11-09 Tom Tromey <tom@tromey.com>
1243
1244 * psymtab.c (psymbol_hash): Do not hash string contents.
1245 (psymbol_compare): Add comment.
1246
1247 2017-11-09 Tom Tromey <tom@tromey.com>
1248
1249 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1250
1251 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1252
1253 * ada-exp.y (write_var_from_sym): Remove parameter
1254 "orig_left_context". Update all callers.
1255
1256 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1257
1258 * tracepoint.h (class collection_list) <stringify>: Return
1259 std::vector<std::string>.
1260 (encode_actions_rsp): Change parameters to
1261 std::vector<std::string> *.
1262 * tracepoint.c (collection_list::stringify): Return
1263 std::vector<std::string> and adjust accordingly.
1264 (encode_actions_rsp): Changee parameters to
1265 std::vector<std::string> and adjust accordingly.
1266 * remote.c (free_actions_list),
1267 free_actions_list_cleanup_wrapper): Remove.
1268 (remote_download_tracepoint): Adjust to std::vector.
1269
1270 2017-11-08 Tom Tromey <tom@tromey.com>
1271
1272 * dwarf2read.c (symbolp): Remove typedef.
1273 (read_func_scope): Use std::vector.
1274 (process_structure_scope): Use std::vector.
1275
1276 2017-11-08 Pedro Alves <palves@redhat.com>
1277
1278 * ada-lang.c (ada_make_symbol_completion_list): Use
1279 completion_skip_symbol.
1280 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1281 (symbol_is_function_or_method(symbol*)): New.
1282 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1283 completion_skip_symbol.
1284 (default_collect_symbol_completion_matches_break_on): Use
1285 completion_skip_symbol. Pass down mode.
1286 (collect_file_symbol_completion_matches): Pass down mode.
1287 * symtab.h (symbol_is_function_or_method): New declarations.
1288 (completion_skip_symbol): New template function.
1289
1290 2017-11-08 Pedro Alves <palves@redhat.com>
1291
1292 * linespec.c (iterate_over_all_matching_symtabs): Add
1293 search_domain parameter. Pass it down to expand_symtabs_matching.
1294 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1295 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1296 search_domain.
1297 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1298 Pass it down.
1299 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1300 symbols.
1301 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1302 it down.
1303
1304 2017-11-08 Pedro Alves <palves@redhat.com>
1305
1306 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1307 text_len locals and don't pass them down.
1308 * symtab.c (completion_list_add_name): Remove
1309 sym_text/sym_text_len parameters and adjust.
1310 (completion_list_add_symbol, completion_list_add_msymbol)
1311 (completion_list_objc_symbol, completion_list_add_fields)
1312 (add_symtab_completions): Likewise.
1313 (default_collect_symbol_completion_matches_break_on)
1314 (collect_file_symbol_completion_matches): Remove sym_text_len
1315 local and don't pass it down.
1316 * symtab.h (completion_list_add_name): Remove
1317 sym_text/sym_text_len parameters.
1318
1319 2017-11-08 Pedro Alves <palves@redhat.com>
1320
1321 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1322 unittests/lookup_name_info-selftests.c.
1323 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1324 * cp-support.c: Include "selftest.h".
1325 (cp_remove_params_1): Rename from cp_remove_params. Add
1326 'require_param' parameter, and handle it.
1327 (cp_remove_params): Reimplement.
1328 (cp_remove_params_if_any): New.
1329 (selftests::quote): New.
1330 (selftests::check_remove_params): New.
1331 (selftests::test_cp_remove_params): New.
1332 (_initialize_cp_support): Install
1333 selftests::test_cp_remove_params.
1334 * cp-support.h (cp_remove_params_if_any): Declare.
1335 * dwarf2read.c :Include "selftest.h".
1336 (dw2_expand_symtabs_matching_symbol): Use
1337 lookup_name_info::make_ignore_params.
1338 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1339 (selftests::dw2_expand_symtabs_matching::string_or_null)
1340 (selftests::dw2_expand_symtabs_matching::check_match)
1341 (selftests::dw2_expand_symtabs_matching::test_symbols)
1342 (selftests::dw2_expand_symtabs_matching::run_test): New.
1343 (_initialize_dwarf2_read): Register
1344 selftests::dw2_expand_symtabs_matching::run_test.
1345 * psymtab.c (psym_expand_symtabs_matching): Use
1346 lookup_name_info::make_ignore_params.
1347 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1348 If the lookup name wants to ignore parameters, strip them.
1349 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1350 code handling '('.
1351 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1352 (default_collect_symbol_completion_matches_break_on): Don't try to
1353 strip parameters.
1354 * symtab.h (lookup_name_info::lookup_name_info): Add
1355 'ignore_parameters' parameter.
1356 (lookup_name_info::ignore_parameters)
1357 (lookup_name_info::make_ignore_params): New methods.
1358 (lookup_name_info::m_ignore_parameters): New field.
1359 * unittests/lookup_name_info-selftests.c: New file.
1360
1361 2017-11-08 Pedro Alves <palves@redhat.com>
1362
1363 * dwarf2read.c (dw2_expand_marked_cus)
1364 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1365 (dw2_expand_symtabs_matching): Move further below.
1366 (dw2_expand_marked_cus): Reindent.
1367
1368 2017-11-08 Pedro Alves <palves@redhat.com>
1369
1370 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1371 (struct name_component): New.
1372 (mapped_index::name_components): New field.
1373 (mapped_index::symbol_name_at): New method.
1374 (dwarf2_read_index): Call mapped_index ctor.
1375 (dw2_map_matching_symbols): Add comment about name_components
1376 table.
1377 (dw2_expand_symtabs_matching): Factor part to...
1378 (dw2_expand_symtabs_matching_symbol): ... this new function.
1379 Build name components table, and lookup symbols in it before
1380 calling the name matcher.
1381 (dw2_expand_marked_cus): New, factored out from
1382 dw2_expand_symtabs_matching.
1383 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1384
1385 2017-11-08 Pedro Alves <palves@redhat.com>
1386
1387 * ada-lang.c (ada_encode): Rename to ..
1388 (ada_encode_1): ... this. Add throw_errors parameter and handle
1389 it.
1390 (ada_encode): Reimplement.
1391 (match_name): Delete, folded into full_name.
1392 (resolve_subexp): No longer pass the encoded name to
1393 ada_lookup_symbol_list.
1394 (should_use_wild_match): Delete.
1395 (name_match_type_from_name): New.
1396 (ada_lookup_simple_minsym): Use lookup_name_info and the
1397 language's symbol_name_matcher_ftype.
1398 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1399 (ada_add_block_renamings): Adjust to use lookup_name_info.
1400 (ada_lookup_name): New.
1401 (add_nonlocal_symbols, ada_add_all_symbols)
1402 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1403 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1404 (ada_name_for_lookup): Delete.
1405 (ada_lookup_encoded_symbol): Construct a verbatim name.
1406 (wild_match): Reverse sense of return type. Use bool.
1407 (full_match): Reverse sense of return type. Inline bits of old
1408 match_name here.
1409 (ada_add_block_symbols): Adjust to use lookup_name_info.
1410 (symbol_completion_match): Delete, folded into...
1411 (ada_lookup_name_info::matches): ... .this new method.
1412 (symbol_completion_add): Delete.
1413 (ada_collect_symbol_completion_matches): Add name_match_type
1414 parameter. Adjust to use lookup_name_info and
1415 completion_list_add_name.
1416 (get_var_value, ada_add_global_exceptions): Adjust to use
1417 lookup_name_info.
1418 (ada_get_symbol_name_cmp): Delete.
1419 (do_wild_match, do_full_match): New functions.
1420 (ada_lookup_name_info::ada_lookup_name_info): New method.
1421 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1422 functions.
1423 (ada_language_defn): Install ada_get_symbol_name_matcher.
1424 * ada-lex.l (processId): If name starts with '<', copy it
1425 verbatim.
1426 * block.c (block_iter_match_step, block_iter_match_first)
1427 (block_iter_match_next, block_lookup_symbol)
1428 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1429 lookup_name_info.
1430 * block.h (block_iter_match_first, block_iter_match_next)
1431 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1432 * c-lang.c (c_language_defn, cplus_language_defn)
1433 (asm_language_defn, minimal_language_defn): Adjust comments to
1434 refer to la_get_symbol_name_matcher.
1435 * completer.c (complete_files_symbols)
1436 (collect_explicit_location_matches, symbol_completer): Pass a
1437 symbol_name_match_type down.
1438 * completer.h (class completion_match, completion_match_result):
1439 New classes.
1440 (completion_tracker::reset_completion_match_result): New method.
1441 (completion_tracker::m_completion_match_result): New field.
1442 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1443 lookup_name_info.
1444 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1445 functions.
1446 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1447 * d-lang.c: Adjust comments to refer to
1448 la_get_symbol_name_matcher.
1449 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1450 Adjust to use lookup_name_info.
1451 (dict_iter_match_first, dict_iter_match_next)
1452 (iter_match_first_hashed, iter_match_next_hashed)
1453 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1454 with a lookup_name_info.
1455 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1456 Likewise.
1457 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1458 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1459 (gdb_index_symbol_name_matcher): New class.
1460 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1461 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1462 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1463 with a symbol_name_match_type.
1464 (f_language_defn): Adjust comments to refer to
1465 la_get_symbol_name_matcher.
1466 * go-lang.c (go_language_defn): Adjust comments to refer to
1467 la_get_symbol_name_matcher.
1468 * language.c (default_symbol_name_matcher)
1469 (language_get_symbol_name_matcher): New functions.
1470 (unknown_language_defn, auto_language_defn): Adjust comments to
1471 refer to la_get_symbol_name_matcher.
1472 * language.h (symbol_name_cmp_ftype): Delete.
1473 (language_defn) <la_collect_symbol_completion_matches>: Add match
1474 type parameter.
1475 <la_get_symbol_name_cmp>: Delete field.
1476 <la_get_symbol_name_matcher>: New field.
1477 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1478 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1479 Declare.
1480 * linespec.c (iterate_over_all_matching_symtabs)
1481 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1482 (find_methods): Add language parameter, and use lookup_name_info
1483 and the language's symbol_name_matcher_ftype.
1484 (linespec_complete_function): Adjust.
1485 (lookup_prefix_sym): Use lookup_name_info.
1486 (add_all_symbol_names_from_pspace): Adjust.
1487 (find_superclass_methods): Add language parameter and pass it
1488 down.
1489 (find_method): Pass symbol language down.
1490 (find_linespec_symbols): Don't demangle or Ada encode here.
1491 (search_minsyms_for_name): Add lookup_name_info parameter.
1492 (add_matching_symbols_to_info): Add name_match_type parameter.
1493 Use lookup_name_info.
1494 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1495 la_get_symbol_name_matcher.
1496 * minsyms.c: Include <algorithm>.
1497 (add_minsym_to_demangled_hash_table): Remove table parameter and
1498 add objfile parameter. Use search_name_hash, and add language to
1499 demangled languages vector.
1500 (struct found_minimal_symbols): New struct.
1501 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1502 New functions.
1503 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1504 input names here. Use lookup_name_info instead. Lookup up
1505 demangled names once for each language in the demangled names
1506 vector.
1507 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1508 demangled names once for each language in the demangled names
1509 vector.
1510 (build_minimal_symbol_hash_tables): Adjust.
1511 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1512 lookup_name_info.
1513 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1514 la_get_symbol_name_matcher.
1515 * objfiles.h: Include <vector>.
1516 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1517 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1518 la_get_symbol_name_matcher.
1519 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1520 la_get_symbol_name_matcher.
1521 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1522 (match_partial_symbol): Use symbol_name_match_type,
1523 lookup_name_info and psymbol_name_matches.
1524 (lookup_partial_symbol): Use lookup_name_info.
1525 (map_block): Use symbol_name_match_type and lookup_name_info.
1526 (psym_map_matching_symbols): Use symbol_name_match_type.
1527 (psymbol_name_matches): New.
1528 (recursively_search_psymtabs): Use lookup_name_info and
1529 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1530 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1531 'kind' parameter to 'domain'.
1532 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1533 la_get_symbol_name_matcher.
1534 * symfile-debug.c (debug_qf_map_matching_symbols)
1535 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1536 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1537 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1538 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1539 Adjust to use symbol_name_match_type.
1540 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1541 (expand_symtabs_matching): Adjust to use lookup_name_info.
1542 * symmisc.c (maintenance_expand_symtabs): Use
1543 lookup_name_info::match_any ().
1544 * symtab.c (symbol_matches_search_name): New.
1545 (eq_symbol_entry): Adjust to use lookup_name_info and the
1546 language's matcher.
1547 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1548 (lookup_name_info::match_any): New.
1549 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1550 (compare_symbol_name): Add language, lookup_name_info and
1551 completion_match_result parameters, and use them.
1552 (completion_list_add_name): Make extern. Add language and
1553 lookup_name_info parameters. Use them.
1554 (completion_list_add_symbol, completion_list_add_msymbol)
1555 (completion_list_objc_symbol): Add lookup_name_info parameters and
1556 adjust. Pass down language.
1557 (completion_list_add_fields): Add lookup_name_info parameters and
1558 adjust. Pass down language.
1559 (add_symtab_completions): Add lookup_name_info parameters and
1560 adjust.
1561 (default_collect_symbol_completion_matches_break_on): Add
1562 name_match_type parameter, and use it. Use lookup_name_info.
1563 (default_collect_symbol_completion_matches)
1564 (collect_symbol_completion_matches): Add name_match_type
1565 parameter, and pass it down.
1566 (collect_symbol_completion_matches_type): Adjust.
1567 (collect_file_symbol_completion_matches): Add name_match_type
1568 parameter, and use lookup_name_info.
1569 * symtab.h: Include <string> and "common/gdb_optional.h".
1570 (enum class symbol_name_match_type): New.
1571 (class ada_lookup_name_info): New.
1572 (struct demangle_for_lookup_info): New.
1573 (class lookup_name_info): New.
1574 (symbol_name_matcher_ftype): New.
1575 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1576 (symbol_matches_search_name): Declare.
1577 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1578 (default_collect_symbol_completion_matches)
1579 (collect_symbol_completion_matches)
1580 (collect_file_symbol_completion_matches): Add name_match_type
1581 parameter.
1582 (iterate_over_symbols): Use lookup_name_info.
1583 (completion_list_add_name): Declare.
1584 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1585 (strncmp_iw_with_mode): Now extern.
1586 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1587 (strncmp_iw_with_mode): Declare.
1588
1589 2017-11-08 Keith Seitz <keiths@redhat.com>
1590 Pedro Alves <palves@redhat.com>
1591
1592 * ada-lang.c (ada_language_defn): Install
1593 default_search_name_hash.
1594 * buildsym.c (struct buildsym_compunit): <language>: New field.
1595 (finish_block_internal): Pass language when creating dictionaries.
1596 (start_buildsym_compunit, start_symtab): New language parameters.
1597 Use them.
1598 (restart_symtab): Pass down compilation unit's language.
1599 * buildsym.h (enum language): Forward declare.
1600 (start_symtab): New 'language' parameter.
1601 * c-lang.c (c_language_defn, cplus_language_defn)
1602 (asm_language_defn, minimal_language_defn): Install
1603 default_search_name_hash.
1604 * coffread.c (coff_start_symtab): Adjust.
1605 * d-lang.c (d_language_defn): Install default_search_name_hash.
1606 * dbxread.c (struct symloc): Add 'pst_language' field.
1607 (PST_LANGUAGE): Define.
1608 (start_psymtab, read_ofile_symtab): Use it.
1609 (process_one_symbol): New 'language' parameter. Pass it down.
1610 * dictionary.c (struct dictionary) <language>: New field.
1611 (DICT_LANGUAGE): Define.
1612 (dict_create_hashed, dict_create_hashed_expandable)
1613 (dict_create_linear, dict_create_linear_expandable): New parameter
1614 'language'. Set the dictionary's language.
1615 (iter_match_first_hashed): Adjust to rename.
1616 (insert_symbol_hashed): Assert we don't see mismatching
1617 languages. Adjust to rename.
1618 (dict_hash): Rename to ...
1619 (default_search_name_hash): ... this and make extern.
1620 * dictionary.h (struct language_defn): Forward declare.
1621 (dict_create_hashed): New parameter 'language'.
1622 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1623 * f-lang.c (f_language_defn): Install default_search_name_hash.
1624 * go-lang.c (go_language_defn): Install default_search_name_hash.
1625 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1626 creation.
1627 * language.c (unknown_language_defn, auto_language_defn):
1628 * language.h (language_defn::la_search_name_hash): New field.
1629 (default_search_name_hash): Declare.
1630 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1631 * mdebugread.c (new_block): New parameter 'language'.
1632 * mdebugread.c (parse_symbol): Pass symbol language to block
1633 allocation.
1634 (psymtab_to_symtab_1): Pass down language.
1635 (new_symtab): Pass compunit's language to block allocation.
1636 * objc-lang.c (objc_language_defn): Install
1637 default_search_name_hash.
1638 * opencl-lang.c (opencl_language_defn):
1639 * p-lang.c (pascal_language_defn): Install
1640 default_search_name_hash.
1641 * rust-lang.c (rust_language_defn): Install
1642 default_search_name_hash.
1643 * stabsread.h (enum language): Forward declare.
1644 (process_one_symbol): Add 'language' parameter.
1645 * symtab.c (search_name_hash): New function.
1646 * symtab.h (search_name_hash): Declare.
1647 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1648
1649 2017-11-08 Pedro Alves <palves@redhat.com>
1650
1651 * cp-name-parser.y (main): Don't initialize extra_chars.
1652
1653 2017-11-07 Tom Tromey <tom@tromey.com>
1654
1655 * event-top.h (command_handler): Constify.
1656 * record-full.c (cmd_record_full_start): Update.
1657 * thread.c (thread_apply_all_command): Update.
1658 * printcmd.c (eval_command): Update.
1659 * mi/mi-main.c (mi_execute_cli_command): Update.
1660 (mi_execute_async_cli_command): Update.
1661 * tui/tui-stack.c (tui_update_command): Update.
1662 * cli/cli-interp.c (safe_execute_command): Constify.
1663 * record.c (record_start): Update.
1664 (record_start, record_stop, cmd_record_start): Update.
1665 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1666 (cmd_record_btrace_pt_start): Update.
1667 (cmd_record_btrace_start): Update.
1668 (cmd_record_btrace_start): Update.
1669 * reverse.c (exec_reverse_once): Update.
1670 * python/python.c (execute_gdb_command): Don't copy the command.
1671 * event-top.c (command_line_handler): Update.
1672 (command_handler): Constify.
1673 * defs.h (deprecated_call_command_hook): Constify.
1674 * cli/cli-script.h (execute_user_command): Constify.
1675 * cli/cli-script.c (execute_user_command): Constify.
1676 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1677 (enum command_control_type): Update.
1678 * main.c (catch_command_errors): Remove non-const overload.
1679 (catch_command_errors_ftype): Remove.
1680 * python/py-cmd.c (cmdpy_function): Constify.
1681 * guile/scm-cmd.c (cmdscm_function): Constify.
1682 * cli/cli-dump.c (call_dump_func): Constify.
1683 * cli/cli-decode.c (do_const_cfunc): Constify.
1684 (do_sfunc): Constify.
1685 (cmd_func): Constify.
1686 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1687 * top.h (execute_command): Constify.
1688 * top.c (execute_command): Constify.
1689 (execute_command_to_string): Constify.
1690 (deprecated_call_command_hook): Constify.
1691 * command.h (cmd_func): Constify.
1692 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1693
1694 2017-11-07 Tom Tromey <tom@tromey.com>
1695
1696 * ada-lang.c (catch_ada_exception_command): Constify.
1697 (catch_assert_command): Constify.
1698 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1699 (catch_rethrow_command): Constify.
1700 (catch_exception_command_1): Constify.
1701 * breakpoint.h (add_catch_command): Constify.
1702 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1703 (catch_syscall_split_args): Constify.
1704 * break-catch-sig.c (catch_signal_command): Constify.
1705 (catch_signal_split_args): Constify.
1706 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1707 cmd_const_sfunc_ftype.
1708 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1709 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1710 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1711 (add_setshow_string_cmd, struct cmd_list_element)
1712 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1713 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1714 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1715 Constify.
1716 (set_cmd_sfunc): Constify.
1717 (empty_sfunc): Constify.
1718 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1719 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1720 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1721 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1722 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1723 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1724 Constify.
1725 (set_cmd_sfunc): Constify.
1726 (cmd_sfunc_ftype): Remove.
1727 * compile/compile.c (set_compile_args): Constify.
1728 * infrun.c (set_disable_randomization): Constify.
1729 * infcmd.c (set_args_command, set_cwd_command): Constify.
1730 * breakpoint.c (set_condition_evaluation_mode): Constify.
1731 (add_catch_command): Constify.
1732 (catch_fork_command_1, catch_exec_command_1)
1733 (catch_load_command_1, catch_unload_command_1): Constify.
1734 (catch_load_or_unload): Constify.
1735 * guile/scm-param.c (pascm_set_func): Constify.
1736 (add_setshow_generic): Constify.
1737 * python/py-param.c (get_set_value): Constify.
1738 * top.h (set_verbose): Constify.
1739 * tui/tui-win.c (tui_set_var_cmd): Constify.
1740 * mi/mi-main.c (set_mi_async_command): Constify.
1741 * cli/cli-logging.c (set_logging_overwrite)
1742 (set_logging_redirect): Constify.
1743 * value.c (set_max_value_size): Constify.
1744 * valprint.c (set_input_radix, set_output_radix): Constify.
1745 * utils.c (set_width_command, set_height_command): Constify.
1746 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1747 * tracepoint.c (set_disconnected_tracing)
1748 (set_circular_trace_buffer, set_trace_buffer_size)
1749 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1750 * top.c (set_history_size_command, set_verbose, set_editing)
1751 (set_gdb_datadir, set_history_filename): Constify.
1752 * target.c (set_targetdebug, maint_set_target_async_command)
1753 (maint_set_target_non_stop_command, set_target_permissions)
1754 (set_write_memory_permission): Constify.
1755 (open_target): Constify.
1756 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1757 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1758 * symtab.c (set_symbol_cache_size_handler): Constify.
1759 * symfile.c (set_ext_lang_command): Constify.
1760 * symfile-debug.c (set_debug_symfile): Constify.
1761 * source.c (set_directories_command): Constify.
1762 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1763 * serial.c (set_parity): Constify.
1764 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1765 * remote.c (set_remote_exec_file, set_remotebreak)
1766 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1767 * record.c (set_record_insn_history_size)
1768 (set_record_call_history_size): Constify.
1769 * record-full.c (set_record_full_insn_max_num): Constify.
1770 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1771 * osabi.c (set_osabi): Constify.
1772 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1773 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1774 * maint.c (maintenance_set_profile_cmd): Constify.
1775 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1776 * language.c (set_language_command, set_range_command)
1777 (set_case_command): Constify.
1778 * infrun.c (set_non_stop, set_observer_mode)
1779 (set_stop_on_solib_events, set_schedlock_func)
1780 (set_exec_direction_func): Constify.
1781 * infcmd.c (set_inferior_tty_command): Constify.
1782 * disasm.c (set_disassembler_options_sfunc): Constify.
1783 * demangle.c (set_demangling_command): Constify.
1784 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1785 * cris-tdep.c (set_cris_version, set_cris_mode)
1786 (set_cris_dwarf2_cfi): Constify.
1787 * corefile.c (set_gnutarget_command): Constify.
1788 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1789 (set_target_wide_charset_sfunc): Constify.
1790 * breakpoint.c (update_dprintf_commands): Constify.
1791 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1792 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1793 (set_disassembly_style_sfunc): Constify.
1794 * arch-utils.c (set_endian, set_architecture): Constify.
1795 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1796 * agent.c (set_can_use_agent): Constify.
1797
1798 2017-11-07 Tom Tromey <tom@tromey.com>
1799
1800 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1801 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1802 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1803 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1804 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1805 (parse_int_arg, show_thread_default_detach_sc_cmd)
1806 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1807 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1808 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1809 (show_task_pause_cmd, set_task_detach_sc_cmd)
1810 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1811 (set_noninvasive_cmd, set_thread_pause_cmd)
1812 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1813 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1814 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1815 * windows-nat.c (display_selectors): Constify.
1816 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1817 non-const "cfunc".
1818 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1819 (cmd_cfunc_eq): Likewise.
1820 (struct cmd_list_element): Likewise.
1821 (do_cfunc): Remove.
1822 (cli_user_command_p): Update.
1823 * command.h (add_cmd): Remove non-const overload.
1824 (cmd_cfunc_ftype): Remove typedef.
1825 (cmd_cfunc_eq): Remove non-const overload.
1826 * value.c (show_values): Constify.
1827 * thread.c (thread_apply_all_command): Constify.
1828 * symfile.c (load_command): Constify.
1829 * source.c (directory_command): Constify.
1830 * maint.c (maintenance_internal_error)
1831 (maintenance_demangler_warning, maintenance_space_display)
1832 (maintenance_print_architecture, maintenance_translate_address)
1833 (maintenance_info_selftests, maintenance_internal_warning):
1834 Constify.
1835 * breakpoint.c (disable_trace_command, enable_trace_command):
1836 Constify.
1837 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1838 Constify.
1839 (add_auto_load_safe_path): Constify.
1840 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1841 * top.h (show_commands): Constify.
1842 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1843 * sparc64-tdep.c (adi_examine_command): Constify.
1844 (adi_assign_command): Constify.
1845
1846 2017-11-07 Tom Tromey <tom@tromey.com>
1847
1848 * frame.h (info_locals_command, info_args_command): Constify.
1849 * auto-load.h (auto_load_info_scripts): Constify.
1850 * inferior.h (registers_info): Constify.
1851 * copying.c: Rebuild.
1852 * copying.awk: Constify generated commands.
1853 * auto-load.c (auto_load_info_scripts)
1854 (info_auto_load_gdb_scripts): Constify.
1855 * cli/cli-decode.c (struct cmd_list_element): Take a
1856 cmd_const_cfunc_ftype.
1857 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1858 * tui/tui-win.c (tui_all_windows_info): Constify.
1859 * python/py-auto-load.c (info_auto_load_python_scripts):
1860 Constify.
1861 * cli/cli-cmds.c (show_command): Remove non-const overload.
1862 * tracepoint.c (info_tvariables_command, info_scope_command):
1863 Constify.
1864 (info_static_tracepoint_markers_command): Constify.
1865 * thread.c (info_threads_command): Constify.
1866 (print_thread_info_1): Constify.
1867 * target.c (info_target_command): Constify.
1868 * symtab.c (info_sources_command, info_functions_command)
1869 (info_types_command): Constify.
1870 (info_variables_command): Remove non-const overload.
1871 * symfile.c (info_ext_lang_command): Constify.
1872 * stack.c (info_frame_command, info_locals_command)
1873 (info_args_command): Constify.
1874 (backtrace_command): Remove non-const overload.
1875 * source.c (info_source_command, info_line_command): Constify.
1876 * solib.c (info_sharedlibrary_command): Constify.
1877 * skip.c (info_skip_command): Constify.
1878 * ser-go32.c (info_serial_command): Constify.
1879 * reverse.c (info_bookmarks_command): Constify.
1880 * printcmd.c (info_symbol_command, info_address_command)
1881 (info_display_command): Constify.
1882 * osdata.c (info_osdata_command): Constify.
1883 * objc-lang.c (info_selectors_command, info_classes_command):
1884 Constify.
1885 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1886 * memattr.c (info_mem_command): Constify.
1887 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1888 * linux-fork.c (info_checkpoints_command): Constify.
1889 * infrun.c (info_signals_command): Constify.
1890 * inflow.c (info_terminal_command): Constify.
1891 * inferior.c (info_inferiors_command): Constify.
1892 (print_inferior): Constify.
1893 * infcmd.c (info_program_command, info_all_registers_command)
1894 (info_registers_command, info_vector_command)
1895 (info_float_command): Constify.
1896 (registers_info): Constify.
1897 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1898 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1899 Constify.
1900 * f-valprint.c (info_common_command): Constify.
1901 * dcache.c (info_dcache_command): Constify.
1902 (dcache_info_1): Constify.
1903 * darwin-nat-info.c (info_mach_tasks_command)
1904 (info_mach_task_command, info_mach_ports_command)
1905 (info_mach_port_command, info_mach_threads_command)
1906 (info_mach_thread_command, info_mach_regions_command)
1907 (info_mach_regions_recurse_command, info_mach_region_command)
1908 (info_mach_exceptions_command): Constify.
1909 (get_task_from_args): Constify.
1910 * cp-support.c (info_vtbl_command): Constify.
1911 * breakpoint.c (info_watchpoints_command)
1912 (info_tracepoints_command): Constify.
1913 (info_breakpoints_command): Remove non-const overload.
1914 * avr-tdep.c (avr_io_reg_read_command): Constify.
1915 * auxv.c (info_auxv_command): Constify.
1916 * ada-tasks.c (info_tasks_command): Constify.
1917 (info_task): Constify.
1918 * ada-lang.c (info_exceptions_command): Constify.
1919
1920 2017-11-07 Tom Tromey <tom@tromey.com>
1921
1922 * solib.h (no_shared_libraries): Constify.
1923 * frame.h (return_command): Constify.
1924 * cli/cli-cmds.h (quit_command): Constify.
1925 * top.h (quit_command, execute_command): Constify.
1926 * target.h (flash_erase_command): Constify.
1927 * inferior.h (set_inferior_args, attach_command): Constify.
1928 * tracepoint.h (start_tracing, stop_tracing): Constify.
1929 * breakpoint.h (break_command, tbreak_command)
1930 (hbreak_command_wrapper, thbreak_command_wrapper)
1931 (rbreak_command_wrapper, watch_command_wrapper)
1932 (awatch_command_wrapper, rwatch_command_wrapper)
1933 (get_tracepoint_by_number): Constify.
1934 * symtab.c (info_variables_command, rbreak_command)
1935 (symtab_symbol_info): Constify.
1936 (info_variables_command): Add non-const overload.
1937 * top.c (dont_repeat_command): Constify.
1938 * breakpoint.c (ignore_command, commands_command)
1939 (condition_command, tbreak_command, hbreak_command)
1940 (thbreak_command, clear_command, break_command)
1941 (info_breakpoints_command, watch_command, rwatch_command)
1942 (awatch_command, trace_command, ftrace_command, strace_command)
1943 (trace_pass_command, break_range_command, dprintf_command)
1944 (agent_printf_command, get_tracepoint_by_number)
1945 (watch_maybe_just_location, trace_pass_command): Constify.
1946 (info_breakpoints_command): Add non-const overload.
1947 * tracefile.c (tsave_command): Constify.
1948 * infcmd.c (attach_command, disconnect_command, signal_command)
1949 (queue_signal_command, stepi_command, nexti_command)
1950 (finish_command, next_command, step_command, until_command)
1951 (advance_command, jump_command, continue_command, run_command)
1952 (start_command, starti_command, interrupt_command)
1953 (run_command_1, set_inferior_args, step_1): Constify.
1954 * inferior.c (add_inferior_command, remove_inferior_command)
1955 (clone_inferior_command): Constify.
1956 * linux-fork.c (checkpoint_command, restart_command): Constify.
1957 * windows-nat.c (signal_event_command): Constify.
1958 * guile/guile.c (guile_repl_command, guile_command): Constify.
1959 * printcmd.c (x_command, display_command, printf_command)
1960 (output_command, set_command, call_command, print_command)
1961 (eval_command): Constify.
1962 (non_const_set_command): Remove.
1963 (_initialize_printcmd): Update.
1964 * source.c (forward_search_command, reverse_search_command):
1965 Constify.
1966 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1967 Constify.
1968 * infrun.c (handle_command): Constify.
1969 * memattr.c (mem_command): Constify.
1970 * stack.c (return_command, up_command, up_silently_command)
1971 (down_command, down_silently_command, frame_command)
1972 (backtrace_command, func_command, backtrace_command_1): Constify.
1973 (backtrace_command): Add non-const overload.
1974 * remote-sim.c (simulator_command): Constify.
1975 * exec.c (set_section_command): Constify.
1976 * tracepoint.c (tdump_command, trace_variable_command)
1977 (tstatus_command, tstop_command, tstart_command)
1978 (end_actions_pseudocommand, while_stepping_pseudocommand)
1979 (collect_pseudocommand, teval_pseudocommand, actions_command)
1980 (start_tracing, stop_tracing): Constify.
1981 * value.c (init_if_undefined_command): Constify.
1982 * tui/tui-stack.c (tui_update_command): Constify.
1983 * tui/tui-win.c (tui_refresh_all_command)
1984 (tui_set_tab_width_command, tui_set_win_height_command)
1985 (tui_set_focus_command, tui_scroll_forward_command)
1986 (tui_scroll_backward_command, tui_scroll_left_command)
1987 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1988 (tui_set_win_height): Constify.
1989 * tui/tui-layout.c (tui_layout_command): Constify.
1990 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1991 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1992 (proc_untrace_sysexit_cmd): Constify.
1993 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1994 (threadset_test_cmd, threadlist_update_test_cmd)
1995 (threadalive_test): Constify.
1996 * objc-lang.c (print_object_command): Constify.
1997 * command.h (add_com): Constify.
1998 * cli/cli-dump.c (restore_command): Constify.
1999 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2000 (help_command, complete_command, shell_command, edit_command)
2001 (list_command, disassemble_command, make_command)
2002 (apropos_command, alias_command): Constify.
2003 * cli/cli-script.c (document_command, define_command)
2004 (while_command, if_command, validate_comname): Constify.
2005 * cli/cli-decode.c (struct cmd_list_element): Change type of
2006 "fun".
2007 * target.c (do_monitor_command, flash_erase_command): Constify.
2008 * regcache.c (reg_flush_command): Constify.
2009 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2010 (reverse_nexti, reverse_continue, reverse_finish)
2011 (save_bookmark_command, goto_bookmark_command)
2012 (exec_reverse_once): Constify.
2013 * python/python.c (python_interactive_command, python_command):
2014 Constify.
2015 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2016 Constify.
2017 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2018 * gcore.c (gcore_command): Constify.
2019
2020 2017-11-07 Tom Tromey <tom@tromey.com>
2021
2022 * printcmd.c (x_command): Call set_repeat_arguments.
2023 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2024 * top.c (repeat_arguments): New global.
2025 (set_repeat_arguments): New function.
2026 (execute_command): Handle repeat_arguments.
2027 (show_commands): Calls set_repeat_arguments.
2028 * command.h (set_repeat_arguments): Declare.
2029
2030 2017-11-07 Tom Tromey <tom@tromey.com>
2031
2032 * stack.c (backtrace_command): Use std::string.
2033 (backtrace_command_1): Make "count_exp" const.
2034
2035 2017-11-07 Tom Tromey <tom@tromey.com>
2036
2037 * source.c (directory_switch, mod_path, add_path): Constify.
2038 * defs.h (add_path, mod_path, directory_switch): Constify.
2039 * mi/mi-cmd-env.c (env_mod_path): Constify.
2040
2041 2017-11-07 Tom Tromey <tom@tromey.com>
2042
2043 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2044 (run_command_1, continue_command, step_1, jump_command)
2045 (signal_command, until_command, advance_command, finish_command)
2046 (attach_command): Update.
2047
2048 2017-11-07 Tom Tromey <tom@tromey.com>
2049
2050 * command.h (set_cmd_cfunc): Don't declare.
2051 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2052
2053 2017-11-07 Tom Tromey <tom@tromey.com>
2054
2055 * stack.c (select_frame_command): Constify.
2056 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2057 * command.h (add_com_suppress_notification): Constify.
2058
2059 2017-11-07 Tom Tromey <tom@tromey.com>
2060
2061 * breakpoint.c (stop_command): Constify.
2062 * cli/cli-decode.c (struct cmd_list_element): Constify.
2063 * command.h (add_abbrev_prefix_cmd): Constify.
2064
2065 2017-11-07 Pedro Alves <palves@redhat.com>
2066
2067 * breakpoint.c (extract_bp_kind): New enum.
2068 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2069 factored out from ...
2070 (extract_bp_number_and_location): ... here.
2071 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2072
2073 2017-11-07 Pedro Alves <palves@redhat.com>
2074
2075 * breakpoint.c (extract_bp_number_and_location): Change return
2076 type to void. Throw error instead of warning.
2077 (enable_disable_command): Adjust.
2078
2079 2017-11-07 Xavier Roirand <roirand@adacore.com>
2080 Pedro Alves <palves@redhat.com>
2081
2082 * breakpoint.c (map_breakpoint_number_range): New, factored out
2083 from ...
2084 (map_breakpoint_numbers): ... here.
2085 (find_location_by_number): Change parameters from string to
2086 breakpoint number and location.
2087 (extract_bp_number_and_location): New function.
2088 (enable_disable_bp_num_loc)
2089 (enable_disable_breakpoint_location_range)
2090 (enable_disable_command): New functions, factored out ...
2091 (enable_command, disable_command): ... these functions, and
2092 adjusted to support ranges.
2093 * NEWS: Document enable/disable breakpoint location range feature.
2094
2095 2017-11-06 Luis Machado <luis.machado@linaro.org>
2096
2097 * MAINTAINERS (Write After Approval): Update my e-mail address.
2098
2099 2017-11-06 Pedro Alves <palves@redhat.com>
2100
2101 * gnu-nat.c (gnu_terminal_init): Delete.
2102 (gnu_target): Don't install gnu_terminal_init.
2103 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2104 (child_terminal_init): ... this function.
2105
2106 2017-11-06 Pedro Alves <palves@redhat.com>
2107
2108 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2109 sgtty.h.
2110 * config.in, configure: Regenerate.
2111
2112 2017-11-06 Pedro Alves <palves@redhat.com>
2113
2114 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2115 (async_init_signals): Adjust.
2116 (handle_stop_sig): Rename to ...
2117 (handle_sigtstp): ... this.
2118 (async_stop_sig): Rename to ...
2119 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2120 SIGTSTP path.
2121 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2122 instead of STOP_SIGNAL thoughout.
2123 (handle_stop_sig): Rename to ...
2124 (handle_sigtstp): ... this.
2125 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2126
2127 2017-11-06 Pedro Alves <palves@redhat.com>
2128
2129 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2130 longer set flags twice in row.
2131
2132 2017-11-06 Pedro Alves <palves@redhat.com>
2133
2134 * Makefile.in (SER_HARDWIRE): Update comment.
2135 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2136 * common/gdb_termios.h: Delete file.
2137 * common/job-control.c: Include termios.h and unistd.h instead of
2138 gdb_termios.h.
2139 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2140 check.
2141 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2142 Remove sgtty code.
2143 * configure.ac: No longer check for termio.h and sgtty.h.
2144 * configure: Regenerate.
2145 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2146 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2147 Replace PROCESS_GROUP_TYPE references with pid_t references
2148 throughout.
2149 (gdb_getpgrp): Delete.
2150 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2151 (child_terminal_inferior): Remove comment. Remove sgtty code.
2152 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2153 gdb_getpgrp. Use serial_set_tty_state instead aof
2154 serial_noflush_set_tty_state. Remove sgtty code.
2155 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2156 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2157 (inferior_process_group): Now returns pid_t.
2158 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2159 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2160 * ser-event.c (serial_event_ops): Update.
2161 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2162 (dos_ops): Update.
2163 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2164 * ser-pipe.c (pipe_ops): Update.
2165 * ser-tcp.c (tcp_ops): Update.
2166 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2167 HAVE_TERMIOS checks.
2168 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2169 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2170 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2171 assume termios.
2172 (hardwire_noflush_set_tty_state): Delete.
2173 (hardwire_print_tty_state, hardwire_drain_output)
2174 (hardwire_flush_output, hardwire_flush_input)
2175 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2176 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2177 code, and assume termios.
2178 (hardwire_ops): Update.
2179 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2180 * serial.c (serial_noflush_set_tty_state): Delete.
2181 * serial.h (serial_noflush_set_tty_state): Delete.
2182 (serial_ops::noflush_set_tty_state): Delete.
2183
2184 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2185
2186 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2187 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2188 (COMMON_OBS): Remove doublest.o and dfp.o.
2189 Do not build target-float.c (instead of doublest.c)
2190 with -Wformat-nonliteral.
2191
2192 * doublest.c: Remove file.
2193 * doublest.h: Remove file.
2194 * dfp.c: Remove file.
2195 * dfp.h: Remove file.
2196
2197 * target-float.c: Do not include "doublest.h" and "dfp.h".
2198 (DOUBLEST): Move here from doublest.h.
2199 (enum float_kind): Likewise.
2200 (FLOATFORMAT_CHAR_BIT): Likewise.
2201 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2202 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2203 (floatformat_precision): Likewise.
2204 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2205 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2206 Likewise.
2207 (host_float_format, host_double_format, host_long_double_format):
2208 Likewise.
2209 (floatformat_to_string, floatformat_from_string): Likewise.
2210 (floatformat_to_doublest): Likewise. Also, inline the original
2211 convert_floatformat_to_doublest.
2212 (floatformat_from_doublest): Likewise. Also, inline the original
2213 convert_floatformat_from_doublest.
2214
2215 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2216 (MAX_DECIMAL_STRING): Move here from dfp.c.
2217 (match_endianness): Likewise.
2218 (set_decnumber_context, decimal_check_errors): Likewise.
2219 (decimal_from_number, decimal_to_number): Likewise.
2220 (decimal_to_string, decimal_from_string): Likewise. Make static.
2221 (decimal_from_longest, decimal_from_ulongest): Likewise.
2222 (decimal_to_longest): Likewise.
2223 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2224 (decimal_convert): Likewise.
2225
2226 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2227
2228 * doublest.c: Do not include "gdbtypes.h".
2229 (extract_typed_floating): Remove.
2230 (store_typed_floating): Remove.
2231 (convert_typed_floating): Remove.
2232 * doublest.h (struct type): Remove.
2233 (DOUBLEST_PRINT_FORMAT): Remove.
2234 (DOUBLEST_SCAN_FORMAT): Remove.
2235 (extract_typed_floating): Remove.
2236 (store_typed_floating): Remove.
2237 (convert_typed_floating): Remove.
2238
2239 * dfp.c (decimal_from_doublest): Remove.
2240 (decimal_to_doublest): Remove.
2241 * dfp.h: Do not include "doublest.h".
2242 (decimal_from_doublest): Remove.
2243 (decimal_to_doublest): Remove.
2244
2245 * value.c: Do not include "doublest.h" and "dfp.h".
2246 (value_as_double): Remove.
2247 (unpack_double): Remove.
2248 (value_from_double): Remove.
2249 (value_from_decfloat): Remove.
2250 * value.h: Do not include "doublest.h".
2251 (value_as_double): Remove.
2252 (unpack_double): Remove.
2253 (value_from_double): Remove.
2254 (value_from_decfloat): Remove.
2255
2256 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2257
2258 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2259 (i386_extract_return_value): Use target_float_convert.
2260 (i386_store_return_value): Likewise.
2261 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2262 (i387_value_to_register): Likewise.
2263 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2264 (ia64_register_to_value): Use target_float_convert.
2265 (ia64_value_to_register): Likewise.
2266 (ia64_extract_return_value): Likewise.
2267 (ia64_store_return_value): Likewise.
2268 (ia64_push_dummy_call): Likewise.
2269 * m68k-tdep.c: Include "target-float.h".
2270 (m68k_register_to_value): Use target_float_convert.
2271 (m68k_value_to_register): Likewise.
2272 (m68k_svr4_extract_return_value): Likewise.
2273 (m68k_svr4_store_return_value): Likewise.
2274 * ppc-sysv-tdep.c: Include "target-float.h".
2275 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2276 (do_ppc_sysv_return_value): Likewise.
2277 (ppc64_sysv_abi_push_freg): Likewise.
2278 (ppc64_sysv_abi_return_value_base): Likewise.
2279 * rs6000-aix-tdep.c: Include "target-float.h".
2280 (rs6000_push_dummy_call): Use target_float_convert.
2281 (rs6000_return_value): Likewise.
2282 * rs6000-lynx178-tdep.c: Include "target-float.h".
2283 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2284 (rs6000_lynx178_return_value): Likewise.
2285 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2286 (rs6000_register_to_value): Use target_float_convert.
2287 (rs6000_value_to_register): Likewise.
2288 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2289 (arm_extract_return_value): Use target_float_convert.
2290 (arm_store_return_value): Likewise.
2291 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2292 (sh_register_convert_to_virtual): Use target_float_convert.
2293 (sh_register_convert_to_raw): Likewise.
2294 * sh64-tdep.c: Include "target-float.h".
2295 (sh64_extract_return_value): Use target_float_convert.
2296 (sh64_register_convert_to_virtual): Likewise.
2297 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2298
2299 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2300
2301 * target-float.c (floatformat_to_host_double): New function.
2302 (floatformat_from_host_double): Likewise.
2303 (target_float_to_host_double): Likewise.
2304 (target_float_from_host_double): Likewise.
2305 * target-float.h (target_float_to_host_double): Add prototype.
2306 (target_float_from_host_double): Likewise.
2307
2308 * guile/scm-value.c: Include "target-float.h".
2309 (gdbscm_value_to_real): Use target_float_to_host_double.
2310 Handle integer source values via value_as_long.
2311 * guile/scm-math.c: Include "target-float.h". Do not include
2312 "doublest.h", "dfp.h", and "expression.h".
2313 (vlscm_convert_typed_number): Use target_float_from_host_double.
2314 (vlscm_convert_number): Likewise.
2315
2316 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2317 (convert_value_from_python): Use target_float_from_host_double.
2318
2319 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2320
2321 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2322 (cast_from_fixed): Likewise.
2323 (ada_scaling_type): New function.
2324 (ada_delta): Return value instead of DOUBLEST. Perform target
2325 arithmetic instead of host arithmetic.
2326 (scaling_factor): Rename to ...
2327 (ada_scaling_factor) ... this. Make non-static. Return value instead
2328 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2329 (ada_fixed_to_float): Remove.
2330 (ada_float_to_fixed): Remove.
2331 * ada-lang.h (ada_fixed_to_float): Remove.
2332 (ada_float_to_fixed): Remove.
2333 (ada_delta): Return value instead of DOUBLEST.
2334 (ada_scaling_factor): Add prototype.
2335
2336 * ada-typeprint.c: Include "target-float.h".
2337 (print_fixed_point_type): Perform target arithmetic instead of
2338 host arithmetic.
2339 * ada-valprint.c: Include "target-float.h".
2340 (ada_val_print_num): Perform target arithmetic instead of
2341 host arithmetic for fixed-point types.
2342
2343 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2344
2345 * target-float.c: Include <math.h>.
2346 (floatformat_binop): New function.
2347 (floatformat_compare): Likewise.
2348 (target_float_binop): Likewise.
2349 (target_float_compare): Likewise.
2350 * target-float.h: Include "expression.h".
2351 (target_float_binop): Add prototype.
2352 (target_float_compare): Likewise.
2353
2354 * valarith.c: Do not include "doublest.h" and "dfp.h".
2355 Include "common/byte-vector.h".
2356 (value_args_as_decimal): Remove, replace by ...
2357 (value_args_as_target_float): ... this function. Handle both
2358 binary and decimal target floating-point formats.
2359 (scalar_binop): Handle both binary and decimal FP using
2360 value_args_as_target_float and target_float_binop.
2361 (value_equal): Handle both binary and decimal FP using
2362 value_args_as_target_float and target_float_compare.
2363 (value_less): Likewise.
2364 (value_pos): Handle all scalar types as simple copy.
2365 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2366 * dfp.c (decimal_binop): Throw error instead of internal_error
2367 when called with an unsupported operation code.
2368
2369 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2370
2371 * target-float.c (target_float_to_string): New function.
2372 (target_float_from_string): New function.
2373 * target-float.h (target_float_to_string): Add prototype.
2374 (target_float_from_string): Add prototype.
2375
2376 * valprint.c: Include "target-float.h". Do not include
2377 "doublest.h" and "dfp.h".
2378 (print_floating): Use target_float_to_string.
2379 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2380 (printf_floating): Use target_float_to_string.
2381 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2382 (print_i387_value): Use target_float_to_string.
2383 * mips-tdep.c: Include "target-float.h".
2384 (mips_print_fp_register): Use target_float_to_string.
2385 * sh64-tdep.c: Include "target-float.h".
2386 (sh64_do_fp_register): Use target_float_to_string.
2387
2388 * parse.c: Include "target-float.h". Do not include
2389 "doublest.h" and "dfp.h".
2390 (parse_float): Use target_float_from_string.
2391 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2392 (define_symbol): Use target_float_from_string.
2393 * gdbarch-selftests.c: Include "target-float.h".
2394 (register_to_value_test): Use target_float_from_string.
2395
2396 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2397
2398 * Makefile.c (SFILES): Add target-float.c.
2399 (HFILES_NO_SRCDIR): Add target-float.h.
2400 (COMMON_OBS): Add target-float.o.
2401 * target-float.h: New file.
2402 * target-float.c: New file.
2403
2404 * doublest.c (floatformat_classify): Fix detection of float_zero.
2405
2406 * gdbtypes.c (is_floating_type): New function.
2407 * gdbtypes.h (is_floating_type): Add prototype.
2408
2409 * value.c: Do not include "floatformat.h".
2410 (unpack_double): Use target_float_is_valid.
2411 (is_floating_value): New function.
2412 * value.h (is_floating_value): Add prototype-
2413
2414 * valarith.c: Include "target-float.h".
2415 (value_logical_not): Use target_float_is_zero.
2416
2417 * python/py-value.c: Include "target-float.h".
2418 (valpy_nonzero): Use target_float_is_zero.
2419
2420 2017-11-04 Tom Tromey <tom@tromey.com>
2421
2422 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2423
2424 2017-11-04 Tom Tromey <tom@tromey.com>
2425
2426 * breakpoint.c (set_momentary_breakpoint): Return
2427 breakpoint_up.
2428 (until_break_command): Update.
2429 (new_until_break_fsm): Change argument types to
2430 breakpoint_up.
2431 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2432 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2433 Remove.
2434 * infcmd.c (finish_forward): Update.
2435 * breakpoint.h (set_momentary_breakpoint)
2436 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2437 (make_cleanup_delete_breakpoint): Remove.
2438 (struct breakpoint_deleter): New.
2439 (breakpoint_up): New typedef.
2440 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2441 (insert_exception_resume_breakpoint): Update.
2442 (insert_exception_resume_from_probe): Update.
2443 (insert_longjmp_resume_breakpoint): Update.
2444 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2445 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2446 * infcall.c (call_function_by_hand_dummy): Update
2447
2448 2017-11-04 Tom Tromey <tom@tromey.com>
2449
2450 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2451
2452 2017-11-04 Tom Tromey <tom@tromey.com>
2453
2454 * linux-tdep.c (linux_core_info_proc_mappings): Use
2455 gdb::def_vector.
2456 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2457 "size" argument.
2458 (linux_corefile_thread): Update.
2459 (linux_make_corefile_notes): Remove unused variable.
2460
2461 2017-11-04 Tom Tromey <tom@tromey.com>
2462
2463 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2464 gdb::byte_vector.
2465
2466 2017-11-04 Tom Tromey <tom@tromey.com>
2467
2468 * objfiles.c (do_free_objfile_cleanup): Remove.
2469 * compile/compile-object-load.c (compile_object_load): Update.
2470 * objfiles.h (make_cleanup_free_objfile): Remove.
2471
2472 2017-11-04 Tom Tromey <tom@tromey.com>
2473
2474 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2475 (adi_read_versions): Change "tags" to "gdb_byte *".
2476 (adi_print_versions): Likewise.
2477
2478 2017-11-04 Tom Tromey <tom@tromey.com>
2479
2480 * breakpoint.c
2481 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2482 from start_rbreak_breakpoints.
2483 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2484 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2485 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2486 * symtab.c (do_end_rbreak_breakpoints): Remove.
2487 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2488
2489 2017-11-04 Tom Tromey <tom@tromey.com>
2490
2491 * cp-namespace.c (reset_directive_searched): Remove.
2492 (cp_lookup_symbol_via_imports): Use scoped_restore.
2493 * cp-support.c (reset_directive_searched): Remove.
2494 (make_symbol_overload_list_using): Use scoped_restore.
2495 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2496 (reset_directive_searched): Remove.
2497
2498 2017-11-04 Tom Tromey <tom@tromey.com>
2499
2500 * symfile.c (find_separate_debug_file_by_debuglink): Use
2501 unique_xmalloc_ptr.
2502
2503 2017-11-04 Tom Tromey <tom@tromey.com>
2504
2505 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2506 type of "info".
2507 (compute_stack_depth): Likewise.
2508 (do_compile_dwarf_expr_to_c): Use std::vector.
2509
2510 2017-11-04 Tom Tromey <tom@tromey.com>
2511
2512 * compile/compile-object-load.c (link_callbacks_einfo): Use
2513 std::string.
2514
2515 2017-11-04 Tom Tromey <tom@tromey.com>
2516
2517 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2518 Use scoped_free_pendings.
2519 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2520 scoped_free_pendings.
2521 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2522 (xcoff_initial_scan): Likewise.
2523 * buildsym.c (reset_symtab_globals): Update comment.
2524 (scoped_free_pendings): Rename from really_free_pendings.
2525 (prepare_for_building): Update comment.
2526 (buildsym_init): Likewise.
2527 * buildsym.h (class scoped_free_pendings): New class.
2528 (really_free_pendings): Don't declare.
2529
2530 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2531
2532 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2533 output when converting a zero value to a special byteorder format.
2534
2535 2017-11-02 Yao Qi <yao.qi@linaro.org>
2536
2537 * frame.c (do_frame_register_read): Remove aspace.
2538 * jit.c (jit_frame_sniffer): Likwise.
2539 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2540 * regcache.c (regcache::regcache): Pass nullptr.
2541 (regcache_print): Caller updated.
2542 * regcache.h (regcache::regcache): Remove one constructor
2543 parameter aspace.
2544
2545 2017-11-02 Yao Qi <yao.qi@linaro.org>
2546
2547 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2548
2549 2017-11-02 Yao Qi <yao.qi@linaro.org>
2550
2551 * breakpoint.c (insert_single_step_breakpoints): Update.
2552 * frame.c (struct frame_info) <aspace>: Add const.
2553 (frame_save_as_regcache): Add const.
2554 (get_frame_address_space): Return const address_space *.
2555 * frame.h (get_frame_address_space): Update declaration.
2556 * infrun.c (struct step_over_info) <aspace>: Add const.
2557 (set_step_over_info): Make aspace const.
2558 (displaced_step_prepare_throw): Change variable const.
2559 (resume): Likewise.
2560 (proceed): Likewise.
2561 (adjust_pc_after_break): Likewise.
2562 (save_waitstatus): Likewise.
2563 (handle_signal_stop): Likewise.
2564 (keep_going_pass_signal): Likewise.
2565 * jit.c (jit_frame_sniffer): Add const.
2566 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2567 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2568 * record-full.c (record_full_wait_1): Likewise.
2569 * regcache.c (regcache::regcache): Change parameter to const.
2570 * regcache.h (regcache::regcache): Likewise.
2571 (regcache::aspace): Return const address_space *.
2572 (regcache) <m_aspace>: Add const.
2573
2574 2017-11-02 Yao Qi <yao.qi@linaro.org>
2575
2576 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2577 * frame.c (create_sentinel_frame): Likewise.
2578 * infrun.c (displaced_step_prepare_throw): Likewise.
2579 (resume): Likewise.
2580 (thread_still_needs_step_over_bp): Likewise.
2581 (proceed): Likewise.
2582 (do_target_wait): Likewise.
2583 (adjust_pc_after_break): Likewise.
2584 (handle_syscall_event): Likewise.
2585 (save_waitstatus): Likewise.
2586 (handle_inferior_event_1): Likewise.
2587 (handle_signal_stop): Likewise.
2588 (keep_going_pass_signal): Likewise.
2589 * linux-nat.c (status_callback): Likewise.
2590 (save_stop_reason): Likewise.
2591 (resume_stopped_resumed_lwps): Likewise.
2592 * record-full.c (record_full_exec_insn): Likewise.
2593 (record_full_wait_1): Likewise.
2594 * regcache.c (get_regcache_aspace): Remove.
2595 * regcache.h (get_regcache_aspace): Remove.
2596
2597 2017-11-02 Yao Qi <yao.qi@linaro.org>
2598
2599 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2600 (init_regcache_descr): Use gdbarch_num_regs.
2601 (regcache::regcache): Likewise.
2602 (regcache::get_register_status): Likewise.
2603 (regcache::assert_raw_regnum): Likewise.
2604 (regcache::cooked_read): Likewise.
2605 (regcache::cooked_read_value): Likewise.
2606 (regcache::cooked_write): Likewise.
2607 (regcache::dump): Likewise.
2608 (regcache::num_raw_registers): New method.
2609 * regcache.h (class regcache) <num_raw_registers>: New.
2610
2611 2017-11-02 Yao Qi <yao.qi@linaro.org>
2612
2613 * regcache.c (regcache::assert_regnum): New method.
2614 (regcache::invalidate): Call assert_regnum.
2615 (regcache::raw_update): Likewise.
2616 (regcache::raw_write): Likewise.
2617 (regcache::raw_read_part): Likewise.
2618 (regcache::raw_write_part): Likewise.
2619 (regcache::raw_supply): Likewise.
2620 (regcache::raw_supply_integer): Likewise.
2621 (regcache::raw_supply_zeroed): Likewise.
2622 (regcache::raw_collect): Likewise.
2623 (regcache::raw_collect_integer): Likewise.
2624 * regcache.h (regcache::assert_regnum): Declare.
2625
2626 2017-11-02 Yao Qi <yao.qi@linaro.org>
2627
2628 * regcache.c (regcache::dump): Remove code.
2629
2630 2017-11-02 Yao Qi <yao.qi@linaro.org>
2631
2632 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2633 Remove.
2634 <sizeof_cooked_register_status>: Remove.
2635 (init_regcache_descr): Update.
2636 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2637 (regcache::save): Likewise.
2638 (regcache::dump): Likewise.
2639
2640 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2641
2642 * ft32-tdep.c (ft32_fetch_instruction): New function.
2643 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2644
2645 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2646
2647 * cli/cli-script.c (execute_control_command): Rename to ...
2648 (execute_control_command_1): ... this.
2649 (execute_control_command): New function.
2650
2651 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2652
2653 * tracepoint.c (tfind_command): Remove const_cast.
2654
2655 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2656
2657 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2658
2659 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * common/common-utils.h (in_inclusive_range): New function.
2662 * arm-tdep.c (arm_record_extension_space): Use
2663 in_inclusive_range.
2664 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2665 * cris-tdep.c (cris_spec_reg_applicable): Use
2666 in_inclusive_range.
2667
2668 2017-10-30 Pedro Alves <palves@redhat.com>
2669 Simon Marchi <simon.marchi@ericsson.com>
2670
2671 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2672 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2673
2674 2017-10-30 Pedro Alves <palves@redhat.com>
2675
2676 * common/common-utils.c (string_appendf, string_vappendf): New
2677 functions.
2678 * common/common-utils.h (string_appendf, string_vappendf): New
2679 declarations.
2680 * unittests/common-utils-selftests.c (string_appendf_func)
2681 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2682 (string_vappendf_tests): New functions.
2683 (_initialize_common_utils_selftests): Register "string_appendf" and
2684 "string_vappendf tests".
2685
2686 2017-10-30 Pedro Alves <palves@redhat.com>
2687
2688 * unittests/common-utils-selftests.c (format_func): New typedef.
2689 (string_printf_tests, string_vprintf_tests): Tests factored out
2690 and merged to ...
2691 (test_format_func): ... this new function.
2692 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2693 test_format_func.
2694
2695 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2696
2697 * darwin-nat.c: Remove include of gdb.h.
2698
2699 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2700
2701 * xtensa-xtregs.c: Fix formatting issues.
2702
2703 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2706
2707 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2708
2709 PR python/21213
2710 * python/py-infthread.c (thpy_get_inferior): Increment reference
2711 of inferior before returning it.
2712
2713 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2714
2715 * unittests/common-utils-selftests.c (format): Add
2716 ATTRIBUTE_PRINTF.
2717
2718 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2719
2720 * xml-syscall.c (struct syscall_desc): Add constructor.
2721 <name>: Change type to std::string.
2722 (syscall_desc_up): New typedef.
2723 (syscall_desc_p): Remove typeder.
2724 (DEF_VEC_P(syscall_desc_p)): Remove.
2725 (struct syscall_group_desc): Add constructor.
2726 <name>: Change type to std::string.
2727 <syscalls>: Change type to std::vector.
2728 (syscall_group_desc_up): New typedef.
2729 (syscall_group_desc_p): Remove typedef.
2730 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2731 (struct syscalls_info) <syscalls>: Change type to std::vector of
2732 unique_ptr.
2733 <groups>: Likewise.
2734 <my_gdb_datadir>: Change type to std::string.
2735 (syscalls_info_up): New typedef.
2736 (allocate_syscalls_info): Remove.
2737 (syscalls_info_free_syscalls_desc): Remove.
2738 (syscalls_info_free_syscall_group_desc): Remove.
2739 (free_syscalls_info): Remove.
2740 (make_cleanup_free_syscalls_info): Remove.
2741 (syscall_group_create_syscall_group_desc): Adjust.
2742 (syscall_group_add_syscall): Adjust.
2743 (syscall_create_syscall_desc): Adjust.
2744 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2745 (init_syscalls_info): Adjust.
2746 (syscall_group_get_group_by_name): Adjust.
2747 (xml_get_syscall_number): Adjust.
2748 (xml_get_syscall_name): Adjust.
2749 (xml_list_of_syscalls): Adjust.
2750 (xml_list_syscalls_by_group): Adjust.
2751 (xml_list_of_groups): Adjust.
2752
2753 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2754
2755 * probe.h: Don't include gdb_vecs.h.
2756 (DEF_VEC_P (probe_p)): Remove.
2757 (find_probes_in_objfile): Return an std::vector.
2758 * probe.c (find_probes_in_objfile): Likewise.
2759 * breakpoint.c (breakpoint_objfile_data)
2760 <longjmp_probes>: Change type to std::vector.
2761 <exception_probes>: Likewise.
2762 (free_breakpoint_probes): Don't manually free vectors.
2763 (create_longjmp_master_breakpoint): Adjust.
2764 (create_exception_master_breakpoint): Adjust.
2765 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2766 parameter type, adjust.
2767 (svr4_create_solib_event_breakpoints): Adjust.
2768
2769 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2770
2771 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2772 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2773 with new.
2774 (free_breakpoint_probes): Rename to ...
2775 (free_breakpoint_objfile_data): ... this, and call delete on
2776 bp_objfile_data..
2777
2778 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2779
2780 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2781 (loaded_script_ptr): Remove typedef.
2782 (DEF_VEC_P (loaded_script_ptr)): Remove.
2783 (struct collect_matching_scripts_data): Add constructor.
2784 <scripts_p>: Change type to (pointer to) std::vector.
2785 (collect_matching_scripts_data): Adjust.
2786 (sort_scripts_by_name): Make suitable for std::sort.
2787 (print_scripts): Don't sort vector, adjust to std::vector.
2788 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2789
2790 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2791
2792 * symfile.c (filename_language): Make struct, not typedef. Add
2793 constructor.
2794 <ext>: Change type to std::string.
2795 (DEF_VEC_O (filename_language)): Remove.
2796 (filename_language_table): Change type to std::vector.
2797 (add_filename_language): Adjust.
2798 (set_ext_lang_command): Adjust.
2799 (info_ext_lang_command): Adjust.
2800 (deduce_language_from_filename): Adjust.
2801 (class scoped_restore_filename_language_table): Remove.
2802 (test_filename_language): Use scoped_restore.
2803 (test_set_ext_lang_command): Use scoped_restore, adjust to
2804 std::vector change.
2805
2806 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2807
2808 * symfile.c: Include selftest.h.
2809 (class scoped_restore_filename_language_table): New.
2810 (test_filename_language): New test.
2811 (test_set_ext_lang_command): New test.
2812 (_initialize_symfile): Register tests.
2813
2814 2017-10-27 Keith Seitz <keiths@redhat.com>
2815
2816 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2817 in the bp_location, falling back to find_pc_sect_function when
2818 needed.
2819 (add_location_to_breakpoint): Save sal->symbol.
2820 * breakpoint.h (struct bp_location) <symbol>: New field.
2821 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2822 * symtab.h (struct symtab_and_line) <symbol>: New field.
2823
2824 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2825
2826 PR gdb/13669
2827 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2828 to rewind obstack.
2829
2830 2017-10-26 Pedro Alves <palves@redhat.com>
2831
2832 * remote.c (remote_async_terminal_ours_p): Delete.
2833 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2834 Remove references to 'remote_async_terminal_ours_p'.
2835
2836 2017-10-26 Yao Qi <yao.qi@linaro.org>
2837
2838 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2839
2840 2017-10-26 Yao Qi <yao.qi@linaro.org>
2841
2842 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2843 aspace const.
2844 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2845 Likewise.
2846 * breakpoint.c (bpstat_check_location): Remove cast.
2847 (breakpoint_hit_catch_fork): Make aspce const.
2848 (breakpoint_hit_catch_solib): Likewise.
2849 (breakpoint_hit_catch_exec): Likewise.
2850 (breakpoint_hit_ranged_breakpoint): Likewise.
2851 (breakpoint_hit_watchpoint): Likewise.
2852 (base_breakpoint_breakpoint_hit): Likewise.
2853 (bkpt_breakpoint_hit): Likewise.
2854 (dprintf_breakpoint_hit): Likewise.
2855 (tracepoint_breakpoint_hit): Likewise.
2856 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2857
2858 2017-10-26 Yao Qi <yao.qi@linaro.org>
2859
2860 * breakpoint.c (breakpoint_location_address_match): Change
2861 "struct address_space *" to "const address_space".
2862 (breakpoint_location_address_range_overlap): Likewise.
2863 (breakpoint_here_p): Likewise.
2864 (breakpoint_in_range_p): Likewise.
2865 (moribund_breakpoint_here_p): Likewise.
2866 (bp_location_inserted_here_p): Likewise.
2867 (software_breakpoint_inserted_here_p): Likewise.
2868 (hardware_breakpoint_inserted_here_p): Likewise.
2869 (hardware_watchpoint_inserted_in_range): Likewise.
2870 (bpstat_check_location): Likewise.
2871 (bpstat_stop_status): Likewise.
2872 (breakpoint_address_match): Likewise.
2873 (breakpoint_address_match_range): Likewise.
2874 (breakpoint_location_address_match): Likewise.
2875 (breakpoint_location_address_range_overlap): Likewise.
2876 (insert_single_step_breakpoint): Likewise.
2877 (breakpoint_has_location_inserted_here): Likewise.
2878 (single_step_breakpoint_inserted_here_p): Likewise.
2879 (pc_at_non_inline_function): Likewise.
2880 * breakpoint.h (bpstat_stop_status): Update declaration.
2881 (breakpoint_here_p): Likewise.
2882 (breakpoint_in_range_p): Likewise.
2883 (moribund_breakpoint_here_p): Likewise.
2884 (breakpoint_inserted_here_p): Likewise.
2885 (software_breakpoint_inserted_here_p): Likewise.
2886 (hardware_breakpoint_inserted_here_p): Likewise.
2887 (breakpoint_has_location_inserted_here): Likewise.
2888 (single_step_breakpoint_inserted_here_p): Likewise.
2889 (hardware_watchpoint_inserted_in_range): Likewise.
2890 (breakpoint_address_match): Likewise.
2891 (insert_single_step_breakpoint): Likewise.
2892 (pc_at_non_inline_function): Likewise.
2893 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2894 * record.c (record_check_stopped_by_breakpoint): Likewise.
2895 * record.h (record_check_stopped_by_breakpoint): Likewise.
2896 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2897
2898 2017-10-25 Yao Qi <yao.qi@linaro.org>
2899
2900 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2901 regcache->arch () instead get_regcache_arch.
2902 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2903 Likewise.
2904 (aarch64_fbsd_store_inferior_registers): Likewise.
2905 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2906 (store_gregs_to_thread): Likewise.
2907 (fetch_fpregs_from_thread): Likewise.
2908 (store_fpregs_to_thread): Likewise.
2909 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2910 (aarch64_store_return_value): Likewise.
2911 (aarch64_software_single_step): Likewise.
2912 * aix-thread.c (aix_thread_wait): Likewise.
2913 (supply_reg32): Likewise.
2914 (supply_sprs64): Likewise.
2915 (supply_sprs32): Likewise.
2916 (fill_gprs64): Likewise.
2917 (fill_gprs32): Likewise.
2918 (fill_sprs64): Likewise.
2919 (fill_sprs32): Likewise.
2920 (store_regs_user_thread): Likewise.
2921 (store_regs_kernel_thread): Likewise.
2922 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2923 (alphabsd_store_inferior_registers): Likewise.
2924 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2925 (alpha_store_return_value): Likewise.
2926 (alpha_deal_with_atomic_sequence): Likewise.
2927 (alpha_next_pc): Likewise.
2928 (alpha_software_single_step): Likewise.
2929 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2930 (amd64bsd_store_inferior_registers): Likewise.
2931 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2932 Likewise.
2933 (amd64_linux_store_inferior_registers): Likewise.
2934 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2935 (amd64_collect_native_gregset): Likewise.
2936 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2937 (amd64obsd_collect_uthread): Likewise.
2938 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2939 (amd64_collect_fpregset): Likewise.
2940 (amd64_supply_fxsave): Likewise.
2941 (amd64_supply_xsave): Likewise.
2942 (amd64_collect_fxsave): Likewise.
2943 (amd64_collect_xsave): Likewise.
2944 * arc-tdep.c (arc_write_pc): Likewise.
2945 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2946 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2947 (arm_fbsd_store_inferior_registers): Likewise.
2948 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2949 (store_vfp_regs): Likewise.
2950 (arm_linux_fetch_inferior_registers): Likewise.
2951 (arm_linux_store_inferior_registers): Likewise.
2952 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2953 (arm_linux_sigreturn_next_pc): Likewise.
2954 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2955 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2956 (fetch_register): Likewise.
2957 (store_register): Likewise.
2958 * arm-tdep.c (arm_is_thumb): Likewise.
2959 (displaced_in_arm_mode): Likewise.
2960 (bx_write_pc): Likewise.
2961 (arm_get_next_pcs_addr_bits_remove): Likewise.
2962 (arm_software_single_step): Likewise.
2963 (arm_extract_return_value): Likewise.
2964 (arm_store_return_value): Likewise.
2965 (arm_write_pc): Likewise.
2966 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2967 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2968 (bsd_uthread_store_registers): Likewise.
2969 * core-regset.c (fetch_core_registers): Likewise.
2970 * corelow.c (get_core_registers): Likewise.
2971 * cris-tdep.c (cris_store_return_value): Likewise.
2972 (cris_extract_return_value): Likewise.
2973 (find_step_target): Likewise.
2974 (find_step_target): Likewise.
2975 (cris_software_single_step): Likewise.
2976 * ctf.c (ctf_fetch_registers): Likewise.
2977 * darwin-nat.c (cancel_breakpoint): Likewise.
2978 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2979 * frv-tdep.c (frv_extract_return_value): Likewise.
2980 * ft32-tdep.c (ft32_store_return_value): Likewise.
2981 (ft32_extract_return_value): Likewise.
2982 * go32-nat.c (fetch_register): Likewise.
2983 (go32_fetch_registers): Likewise.
2984 (go32_store_registers): Likewise.
2985 (store_register): Likewise.
2986 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2987 (h8300_store_return_value): Likewise.
2988 * hppa-linux-nat.c (fetch_register): Likewise.
2989 (store_register): Likewise.
2990 (hppa_linux_fetch_inferior_registers): Likewise.
2991 (hppa_linux_store_inferior_registers): Likewise.
2992 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2993 (i386_darwin_store_inferior_registers): Likewise.
2994 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2995 (gnu_store_registers): Likewise.
2996 * i386-linux-nat.c (fetch_register): Likewise.
2997 (store_register): Likewise.
2998 (supply_gregset): Likewise.
2999 (fill_gregset): Likewise.
3000 (i386_linux_fetch_inferior_registers): Likewise.
3001 (i386_linux_store_inferior_registers): Likewise.
3002 (i386_linux_resume): Likewise.
3003 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3004 Likewise.
3005 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3006 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3007 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3008 (i386obsd_collect_uthread): Likewise.
3009 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3010 (i386_supply_gregset): Likewise.
3011 (i386_collect_gregset): Likewise.
3012 (i386_supply_fpregset): Likewise.
3013 (i386_collect_fpregset): Likewise.
3014 (i386_mpx_bd_base): Likewise.
3015 * i386-v4-nat.c (supply_fpregset): Likewise.
3016 (fill_fpregset): Likewise.
3017 * i387-tdep.c (i387_supply_fsave): Likewise.
3018 (i387_collect_fsave): Likewise.
3019 (i387_supply_fxsave): Likewise.
3020 (i387_collect_fxsave): Likewise.
3021 (i387_supply_xsave): Likewise.
3022 (i387_collect_xsave): Likewise.
3023 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3024 (ia64_linux_store_registers): Likewise.
3025 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3026 (ia64_extract_return_value): Likewise.
3027 (ia64_store_return_value): Likewise.
3028 (find_func_descr): Likewise.
3029 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3030 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3031 (inf_ptrace_store_registers): Likewise.
3032 * infrun.c (use_displaced_stepping): Likewise.
3033 (displaced_step_prepare_throw): Likewise.
3034 (resume): Likewise.
3035 (proceed): Likewise.
3036 (do_target_wait): Likewise.
3037 (adjust_pc_after_break): Likewise.
3038 (handle_inferior_event_1): Likewise.
3039 (handle_signal_stop): Likewise.
3040 (save_infcall_suspend_state): Likewise.
3041 (restore_infcall_suspend_state): Likewise.
3042 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3043 * jit.c (jit_frame_prev_register): Likewise.
3044 * linux-nat.c (save_stop_reason): Likewise.
3045 (linux_nat_wait_1): Likewise.
3046 (resume_stopped_resumed_lwps): Likewise.
3047 * linux-record.c (record_linux_sockaddr): Likewise.
3048 (record_linux_msghdr): Likewise.
3049 (record_linux_system_call): Likewise.
3050 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3051 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3052 (lm32_store_return_value): Likewise.
3053 * m32c-tdep.c (m32c_read_flg): Likewise.
3054 (m32c_pseudo_register_read): Likewise.
3055 (m32c_pseudo_register_write): Likewise.
3056 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3057 (m32r_linux_collect_gregset): Likewise.
3058 * m32r-tdep.c (m32r_store_return_value): Likewise.
3059 (m32r_extract_return_value): Likewise.
3060 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3061 (m68kbsd_collect_fpregset): Likewise.
3062 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3063 * m68k-linux-nat.c (fetch_register): Likewise.
3064 (old_fetch_inferior_registers): Likewise.
3065 (old_store_inferior_registers): Likewise.
3066 (store_regs): Likewise.
3067 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3068 (m68k_svr4_store_return_value): Likewise.
3069 * m88k-tdep.c (m88k_store_arguments): Likewise.
3070 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3071 (mi_cmd_data_write_register_values): Likewise.
3072 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3073 (mips_fbsd_store_inferior_registers): Likewise.
3074 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3075 (mips_fbsd_supply_gregs): Likewise.
3076 (mips_fbsd_collect_fpregs): Likewise.
3077 (mips_fbsd_collect_gregs): Likewise.
3078 (mips_fbsd_supply_fpregset): Likewise.
3079 (mips_fbsd_collect_fpregset): Likewise.
3080 (mips_fbsd_supply_gregset): Likewise.
3081 (mips_fbsd_collect_gregset): Likewise.
3082 * mips-linux-nat.c (supply_gregset): Likewise.
3083 (fill_gregset): Likewise.
3084 (supply_fpregset): Likewise.
3085 (fill_fpregset): Likewise.
3086 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3087 (mips_fill_gregset): Likewise.
3088 (mips_supply_fpregset): Likewise.
3089 (mips_fill_fpregset): Likewise.
3090 (mips64_supply_gregset): Likewise.
3091 (micromips_linux_sigframe_validate): Likewise.
3092 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3093 (mipsnbsd_fetch_inferior_registers): Likewise.
3094 (mipsnbsd_store_inferior_registers): Likewise.
3095 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3096 (mipsnbsd_supply_gregset): Likewise.
3097 (mipsnbsd_iterate_over_regset_sections): Likewise.
3098 (mipsnbsd_supply_reg): Likewise.
3099 (mipsnbsd_supply_fpreg): Likewise.
3100 * mips-tdep.c (mips_in_frame_stub): Likewise.
3101 (mips_dummy_id): Likewise.
3102 (is_octeon_bbit_op): Likewise.
3103 (micromips_bc1_pc): Likewise.
3104 (extended_mips16_next_pc): Likewise.
3105 (mips16_next_pc): Likewise.
3106 (deal_with_atomic_sequence): Likewise.
3107 * moxie-tdep.c (moxie_process_readu): Likewise.
3108 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3109 * nto-procfs.c (procfs_store_registers): Likewise.
3110 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3111 (ppcfbsd_store_inferior_registers): Likewise.
3112 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3113 (fetch_altivec_register): Likewise.
3114 (get_spe_registers): Likewise.
3115 (fetch_spe_register): Likewise.
3116 (fetch_altivec_registers): Likewise.
3117 (fetch_all_gp_regs): Likewise.
3118 (fetch_all_fp_regs): Likewise.
3119 (store_vsx_register): Likewise.
3120 (store_altivec_register): Likewise.
3121 (set_spe_registers): Likewise.
3122 (store_spe_register): Likewise.
3123 (store_altivec_registers): Likewise.
3124 (store_all_gp_regs): Likewise.
3125 (store_all_fp_regs): Likewise.
3126 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3127 (ppc_linux_collect_gregset): Likewise.
3128 (ppc_canonicalize_syscall): Likewise.
3129 (ppc_linux_record_signal): Likewise.
3130 (ppu2spu_prev_register): Likewise.
3131 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3132 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3133 (ppcobsd_store_registers): Likewise.
3134 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3135 Likewise.
3136 (ppc_ravenscar_generic_store_registers): Likewise.
3137 * procfs.c (procfs_fetch_registers): Likewise.
3138 (procfs_store_registers): Likewise.
3139 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3140 (ravenscar_store_registers): Likewise.
3141 (ravenscar_prepare_to_store): Likewise.
3142 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3143 * record-full.c (record_full_wait_1): Likewise.
3144 (record_full_registers_change): Likewise.
3145 (record_full_store_registers): Likewise.
3146 (record_full_core_fetch_registers): Likewise.
3147 (record_full_save): Likewise.
3148 (record_full_goto_insn): Likewise.
3149 * regcache.c (regcache_register_size): Likewise.
3150 (get_regcache_arch): Remove.
3151 (regcache_read_pc): Likewise.
3152 * regcache.h (get_regcache_arch): Remove.
3153 * remote-sim.c (gdbsim_fetch_register): Likewise.
3154 (gdbsim_store_register): Likewise.
3155 * remote.c (fetch_register_using_p): Likewise.
3156 (send_g_packet): Likewise.
3157 (remote_prepare_to_store): Likewise.
3158 (store_registers_using_G): Likewise.
3159 * reverse.c (save_bookmark_command): Likewise.
3160 (goto_bookmark_command): Likewise.
3161 * rs6000-aix-tdep.c (branch_dest): Likewise.
3162 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3163 (fetch_register): Likewise.
3164 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3165 (ppc_collect_reg): Likewise.
3166 (ppc_collect_gregset): Likewise.
3167 (ppc_collect_fpregset): Likewise.
3168 (ppc_collect_vsxregset): Likewise.
3169 (ppc_collect_vrregset): Likewise.
3170 (ppc_displaced_step_hw_singlestep): Likewise.
3171 (rs6000_pseudo_register_read): Likewise.
3172 (rs6000_pseudo_register_write): Likewise.
3173 * s390-linux-nat.c (supply_gregset): Likewise.
3174 (fill_gregset): Likewise.
3175 (s390_linux_fetch_inferior_registers): Likewise.
3176 * s390-linux-tdep.c (s390_write_pc): Likewise.
3177 (s390_software_single_step): Likewise.
3178 (s390_all_but_pc_registers_record): Likewise.
3179 (s390_linux_syscall_record): Likewise.
3180 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3181 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3182 (shnbsd_store_inferior_registers): Likewise.
3183 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3184 (sh_extract_return_value_fpu): Likewise.
3185 (sh_store_return_value_nofpu): Likewise.
3186 (sh_corefile_supply_regset): Likewise.
3187 (sh_corefile_collect_regset): Likewise.
3188 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3189 (sh64_store_return_value): Likewise.
3190 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3191 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3192 (sparc_store_inferior_registers): Likewise.
3193 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3194 (sparc_ravenscar_prepare_to_store): Likewise.
3195 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3196 (sparc_analyze_control_transfer): Likewise.
3197 (sparc_step_trap): Likewise.
3198 (sparc_software_single_step): Likewise.
3199 (sparc32_gdbarch_init): Likewise.
3200 (sparc_supply_rwindow): Likewise.
3201 (sparc_collect_rwindow): Likewise.
3202 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3203 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3204 (sparc64nbsd_collect_gregset): Likewise.
3205 (sparc64nbsd_supply_fpregset): Likewise.
3206 (sparc64nbsd_collect_fpregset): Likewise.
3207 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3208 (sparc64_supply_gregset): Likewise.
3209 (sparc64_collect_gregset): Likewise.
3210 (sparc64_supply_fpregset): Likewise.
3211 (sparc64_collect_fpregset): Likewise.
3212 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3213 * spu-tdep.c (spu_unwind_sp): Likewise.
3214 (spu2ppu_prev_register): Likewise.
3215 (spu_memory_remove_breakpoint): Likewise.
3216 * stack.c (return_command): Likewise.
3217 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3218 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3219 * tracefile.c (trace_save_ctf): Likewise.
3220 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3221 (do_windows_store_inferior_registers): Likewise.
3222 (windows_resume): Likewise.
3223 * xtensa-linux-nat.c (fill_gregset): Likewise.
3224 (supply_gregset_reg): Likewise.
3225 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3226 (xtensa_register_read_masked): Likewise.
3227 (xtensa_supply_gregset): Likewise.
3228 (xtensa_extract_return_value): Likewise.
3229 (xtensa_store_return_value): Likewise.
3230
3231 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3232
3233 * doublest.c (floatformat_from_string): New function.
3234 * doublest.h (floatformat_from_string): Add prototype.
3235
3236 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3237 (OP_FLOAT): ... this.
3238 * expression.h: Do not include "doublest.h".
3239 (union exp_element): Replace doubleconst and decfloatconst by
3240 new element floatconst.
3241 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3242 (ada_evaluate_subexp): Likewise.
3243 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3244 OP_DOUBLE and OP_DECFLOAT.
3245 * expprint.c (print_subexp_standard): Likewise.
3246 (dump_subexp_body_standard): Likewise.
3247 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3248
3249 * parse.c: Include "dfp.h".
3250 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3251 (write_exp_elt_floatcst): New function.
3252 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3253 and OP_DECFLOAT.
3254 (operator_check_standard): Likewise.
3255 (parse_float): Do not accept suffix. Take type as input. Return bool.
3256 Return target format buffer instead of host DOUBLEST.
3257 Use floatformat_from_string and decimal_from_string to parse
3258 either binary or decimal floating-point types.
3259 (parse_c_float): Remove.
3260 * parser-defs.h: Do not include "doublest.h".
3261 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3262 (write_exp_elt_floatcst): Add prototype.
3263 (parse_float): Update prototype.
3264 (parse_c_float): Remove.
3265
3266 * c-exp.y: Do not include "dfp.h".
3267 (typed_val_float): Use byte buffer instead of DOUBLEST.
3268 (typed_val_decfloat): Remove.
3269 (DECFLOAT): Remove.
3270 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3271 (parse_number): Update to new parse_float interface.
3272 Parse suffixes and determine type before calling parse_float.
3273 Handle decimal and binary FP types the same way.
3274
3275 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3276 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3277 (parse_number): Update to new parse_float interface.
3278 Parse suffixes and determine type before calling parse_float.
3279
3280 * f-exp.y: Replace dval by typed_val_float.
3281 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3282 (parse_number): Use parse_float instead of atof.
3283
3284 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3285 (parse_go_float): Remove.
3286 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3287 (parse_number): Call parse_float instead of parse_go_float.
3288 Parse suffixes and determine type before calling parse_float.
3289
3290 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3291 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3292 (parse_number): Update to new parse_float interface.
3293 Parse suffixes and determine type before calling parse_float.
3294
3295 * m2-exp.y: Replace dval by byte buffer val.
3296 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3297 (parse_number): Call parse_float instead of atof.
3298
3299 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3300 (lex_number): Call parse_float instead of strtod.
3301 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3302 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3303 Use write_exp_elt_floatcst.
3304 (unit_testing): Remove static variable.
3305 (rust_type): Do not check unit_testing.
3306 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3307
3308 * ada-exp.y (type_float, type_double): Remove.
3309 (typed_val_float): Use byte buffer instead of DOUBLEST.
3310 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3311 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3312
3313 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3314
3315 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3316 * arch/aarch64.h: New file.
3317
3318 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3319
3320 * dfp.h (decimal_from_string): Use const reference for argument.
3321 * dfp.c (decimal_from_string): Likewise.
3322
3323 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3324
3325 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3326 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3327 * mips-tdep.c (mips_print_fp_register): Likewise.
3328
3329 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3330
3331 * common/format.h (enum argclass): Replace decfloat_arg by
3332 dec32float_arg, dec64float_arg, and dec128float_arg.
3333 * common/format.c (parse_format_string): Update to return
3334 new decimal float argument classes.
3335
3336 * printcmd.c (printf_decfloat): Rename to ...
3337 (printf_floating): ... this. Add argclass argument, and use it
3338 instead of parsing the format string again. Add support for
3339 binary floating-point values, using floatformat_to_string.
3340 Convert value to the target format if it doesn't already match.
3341 (ui_printf): Call printf_floating instead of printf_decfloat,
3342 also for double_arg / long_double_arg. Pass argclass.
3343
3344 * dfp.c (decimal_to_string): Add format string argument.
3345 * dfp.h (decimal_to_string): Likewise.
3346
3347 * doublest.c (floatformat_to_string): Add format string argument.
3348 * doublest.h (floatformat_to_string): Likewise.
3349
3350 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3351
3352 * doublest.c (floatformat_precision): New routine.
3353 (floatformat_to_string): Likewise.
3354 * doublest.c (floatformat_to_string): Add prototype.
3355
3356 * printcmd.c (print_scalar_formatted): Only call print_floating
3357 on floating-point types.
3358 * valprint.c: Do not include "floatformat.h".
3359 (generic_val_print_decfloat): Remove.
3360 (generic_val_print): Call generic_val_print_float for both
3361 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3362 (print_floating): Use floatformat_to_string. Handle decimal float.
3363 (print_decimal_floating): Remove, merge into floatformat_to_string.
3364 * value.h (print_decimal_floating): Remove.
3365
3366 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3367
3368 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3369
3370 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3371
3372 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3373
3374 * memattr.h: Don't include vec.h.
3375 (struct mem_attrib): Initialize fields.
3376 <unknown>: New static method.
3377 (struct mem_region): Add constructors, operator<, initialize
3378 fields.
3379 * memattr.c: Include algorithm.
3380 (default_mem_attrib, unknown_mem_attrib): Remove.
3381 (user_mem_region_list): New global.
3382 (target_mem_region_list, mem_region_list): Change type to
3383 std::vector<mem_region>.
3384 (mem_use_target): Now a function.
3385 (target_mem_regions_valid): Change type to bool.
3386 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3387 (require_user_regions): Adjust.
3388 (require_target_regions): Adjust.
3389 (create_mem_region): Adjust.
3390 (lookup_mem_region): Adjust.
3391 (invalidate_target_mem_regions): Adjust.
3392 (mem_clear): Rename to...
3393 (user_mem_clear): ... this, and adjust.
3394 (mem_command): Adjust.
3395 (info_mem_command): Adjust.
3396 (mem_enable, enable_mem_command, mem_disable,
3397 disable_mem_command): Adjust.
3398 (mem_delete): Adjust.
3399 (delete_mem_command): Adjust.
3400 * memory-map.h (parse_memory_map): Return an std::vector.
3401 * memory-map.c (parse_memory_map): Likewise.
3402 (struct memory_map_parsing_data): Add constructor.
3403 <memory_map>: Point to std::vector.
3404 (memory_map_start_memory): Adjust.
3405 (memory_map_end_memory): Adjust.
3406 (memory_map_end_property): Adjust.
3407 (clear_result): Remove.
3408 * remote.c (remote_memory_map): Return an std::vector.
3409 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3410 Remove.
3411 (target_debug_print_mem_region_vector): New.
3412 * target-delegates.c: Regenerate.
3413 * target.h (mem_region_vector): New typedef.
3414 (to_memory_map): Return mem_region_vector.
3415 (target_memory_map): Return an std::vector.
3416 * target.c (target_memory_map): Return an std::vector.
3417 (flash_erase_command): Adjust.
3418
3419 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3422 Change type to std::string.
3423 (memory_map_start_property): Adjust.
3424 (memory_map_end_property): Adjust.
3425
3426 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3427
3428 * infrun.h: Include common/byte-vector.h.
3429 (struct displaced_step_closure): New struct.
3430 (struct buf_displaced_step_closure): New struct.
3431 * infrun.c (displaced_step_closure::~displaced_step_closure):
3432 Provide default implementation.
3433 (displaced_step_clear): Deallocate step closure with delete.
3434 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3435 (aarch64_displaced_step_closure): ... this, extend
3436 displaced_step_closure.
3437 (aarch64_displaced_step_data) <dsc>: Change type to
3438 aarch64_displaced_step_closure.
3439 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3440 unique_ptr.
3441 (aarch64_displaced_step_fixup): Add cast for displaced step
3442 closure.
3443 * amd64-tdep.c (displaced_step_closure): Rename to ...
3444 (amd64_displaced_step_closure): ... this, extend
3445 displaced_step_closure.
3446 <insn_buf>: Change type to std::vector<gdb_byte>.
3447 <max_len>: Remove.
3448 (fixup_riprel): Change type of DSC parameter, adjust to type
3449 change of insn_buf.
3450 (fixup_displaced_copy): Change type of DSC parameter.
3451 (amd64_displaced_step_copy_insn): Instantiate
3452 amd64_displaced_step_closure.
3453 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3454 to type change of insn_buf.
3455 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3456 parameter DSC.
3457 (arm_linux_copy_svc): Likewise.
3458 (cleanup_kernel_helper_return): Likewise.
3459 (arm_catch_kernel_helper_return): Likewise.
3460 (arm_linux_displaced_step_copy_insn): Instantiate
3461 arm_displaced_step_closure.
3462 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3463 (displaced_read_reg): Change type of parameter DSC.
3464 (branch_write_pc): Likewise.
3465 (load_write_pc): Likewise.
3466 (alu_write_pc): Likewise.
3467 (displaced_write_reg): Likewise.
3468 (arm_copy_unmodified): Likewise.
3469 (thumb_copy_unmodified_32bit): Likewise.
3470 (thumb_copy_unmodified_16bit): Likewise.
3471 (cleanup_preload): Likewise.
3472 (install_preload): Likewise.
3473 (arm_copy_preload): Likewise.
3474 (thumb2_copy_preload): Likewise.
3475 (install_preload_reg): Likewise.
3476 (arm_copy_preload_reg): Likewise.
3477 (cleanup_copro_load_store): Likewise.
3478 (install_copro_load_store): Likewise.
3479 (arm_copy_copro_load_store) Likewise.
3480 (thumb2_copy_copro_load_store): Likewise.
3481 (cleanup_branch): Likewise.
3482 (install_b_bl_blx): Likewise.
3483 (arm_copy_b_bl_blx): Likewise.
3484 (thumb2_copy_b_bl_blx): Likewise.
3485 (thumb_copy_b): Likewise.
3486 (install_bx_blx_reg): Likewise.
3487 (arm_copy_bx_blx_reg): Likewise.
3488 (thumb_copy_bx_blx_reg): Likewise.
3489 (cleanup_alu_imm): Likewise.
3490 (arm_copy_alu_imm): Likewise.
3491 (thumb2_copy_alu_imm): Likewise.
3492 (cleanup_alu_reg): Likewise.
3493 (install_alu_reg): Likewise.
3494 (arm_copy_alu_reg): Likewise.
3495 (thumb_copy_alu_reg): Likewise.
3496 (cleanup_alu_shifted_reg): Likewise.
3497 (install_alu_shifted_reg): Likewise.
3498 (arm_copy_alu_shifted_reg): Likewise.
3499 (cleanup_load): Likewise.
3500 (cleanup_store): Likewise.
3501 (arm_copy_extra_ld_st): Likewise.
3502 (install_load_store): Likewise.
3503 (thumb2_copy_load_literal): Likewise.
3504 (thumb2_copy_load_reg_imm): Likewise.
3505 (arm_copy_ldr_str_ldrb_strb): Likewise.
3506 (cleanup_block_load_all): Likewise.
3507 (cleanup_block_store_pc): Likewise.
3508 (cleanup_block_load_pc): Likewise.
3509 (arm_copy_block_xfer): Likewise.
3510 (thumb2_copy_block_xfer): Likewise.
3511 (cleanup_svc): Likewise.
3512 (install_svc): Likewise.
3513 (arm_copy_svc): Likewise.
3514 (thumb_copy_svc): Likewise.
3515 (arm_copy_undef): Likewise.
3516 (thumb_32bit_copy_undef): Likewise.
3517 (arm_copy_unpred): Likewise.
3518 (arm_decode_misc_memhint_neon): Likewise.
3519 (arm_decode_unconditional): Likewise.
3520 (arm_decode_miscellaneous): Likewise.
3521 (arm_decode_dp_misc): Likewise.
3522 (arm_decode_ld_st_word_ubyte): Likewise.
3523 (arm_decode_media): Likewise.
3524 (arm_decode_b_bl_ldmstm): Likewise.
3525 (arm_decode_ext_reg_ld_st): Likewise.
3526 (thumb2_decode_dp_shift_reg): Likewise.
3527 (thumb2_decode_ext_reg_ld_st): Likewise.
3528 (arm_decode_svc_copro): Likewise.
3529 (thumb2_decode_svc_copro): Likewise.
3530 (install_pc_relative): Likewise.
3531 (thumb_copy_pc_relative_16bit): Likewise.
3532 (thumb_decode_pc_relative_16bit): Likewise.
3533 (thumb_copy_pc_relative_32bit): Likewise.
3534 (thumb_copy_16bit_ldr_literal): Likewise.
3535 (thumb_copy_cbnz_cbz): Likewise.
3536 (thumb2_copy_table_branch): Likewise.
3537 (cleanup_pop_pc_16bit_all): Likewise.
3538 (thumb_copy_pop_pc_16bit): Likewise.
3539 (thumb_process_displaced_16bit_insn): Likewise.
3540 (decode_thumb_32bit_ld_mem_hints): Likewise.
3541 (thumb_process_displaced_32bit_insn): Likewise.
3542 (thumb_process_displaced_insn): Likewise.
3543 (arm_process_displaced_insn): Likewise.
3544 (arm_displaced_init_closure): Likewise.
3545 (arm_displaced_step_fixup): Add cast for closure.
3546 * arm-tdep.h: Include infrun.h.
3547 (displaced_step_closure): Rename to ...
3548 (arm_displaced_step_closure): ... this, extend
3549 displaced_step_closure.
3550 <u::svc::copy_svc_os>: Change type of parameter DSC.
3551 <cleanup>: Likewise.
3552 (arm_process_displaced_insn): Likewise.
3553 (arm_displaced_init_closure): Likewise.
3554 (displaced_read_reg): Likewise.
3555 (displaced_write_reg): Likewise.
3556 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3557 Adjust.
3558 * i386-tdep.h: Include infrun.h.
3559 (i386_displaced_step_closure): New typedef.
3560 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3561 i386_displaced_step_closure.
3562 (i386_displaced_step_fixup): Adjust.
3563 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3564 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3565 and unique_ptr.
3566 (ppc_displaced_step_fixup): Adjust.
3567 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3568 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3569 and unique_ptr.
3570 (s390_displaced_step_fixup): Adjust.
3571
3572 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3573
3574 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3575 Remove declarations.
3576
3577 2017-10-20 Tom Tromey <tom@tromey.com>
3578
3579 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3580 std::vector.
3581 (gdb_bfd_record_inclusion): Update.
3582 (bfdp): Remove typedef.
3583
3584 2017-10-20 Tom Tromey <tom@tromey.com>
3585
3586 * gdb_bfd.c (gdb_bfd_ref): Use new.
3587 (struct gdb_bfd_data): Add constructor, destructor, and member
3588 initializers.
3589 (gdb_bfd_unref): Use delete.
3590
3591 2017-10-20 Tom Tromey <tom@tromey.com>
3592
3593 * exec.c (exec_file_attach): Use new_bfd_ref.
3594 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3595 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3596 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3597 new_bfd_ref.
3598 * gdb_bfd.h (new_bfd_ref): New function.
3599
3600 2017-10-20 Pedro Alves <palves@redhat.com>
3601
3602 * main.c (captured_command_loop): Add attribute noinline.
3603
3604 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3605
3606 * interps.c (struct interp_factory): Add constructor.
3607 (interp_factory_p): Remove typedef.
3608 (DEF_VEC_P(interp_factory_p)): Remove.
3609 (interpreter_factories): Change type to std::vector.
3610 (interp_factory_register): Adjust.
3611 (interp_lookup): Adjust.
3612 (interpreter_completer): Adjust.
3613
3614 2017-10-19 Tom Tromey <tom@tromey.com>
3615
3616 * break-catch-syscall.c (catch_syscall_completer): Use
3617 std::string, gdb::unique_xmalloc_ptr.
3618
3619 2017-10-19 Tom Tromey <tom@tromey.com>
3620
3621 * infcall.c (call_function_by_hand_dummy): Use std::string.
3622
3623 2017-10-19 Tom Tromey <tom@tromey.com>
3624
3625 * mi/mi-main.c (mi_cmd_execute): Update.
3626 * top.h (prepare_execute_command): Return scoped_value_mark.
3627 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3628 Add move constructor.
3629 * top.c (prepare_execute_command): Return scoped_value_mark.
3630 (execute_command): Update.
3631
3632 2017-10-19 Pedro Alves <palves@redhat.com>
3633
3634 * xml-support.c (xml_fetch_content_from_file): Check fread's
3635 return.
3636
3637 2017-10-19 Pedro Alves <palves@redhat.com>
3638
3639 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3640 async.
3641 (handle_error_fd): New function.
3642 (ser_base_async): Add/delete an event loop file handler for
3643 error_fd.
3644
3645 2017-10-19 Pedro Alves <palves@redhat.com>
3646
3647 * xml-support.c (xml_fetch_content_from_file): Don't read in
3648 chunks. Instead use fseek to determine the file's size, and read
3649 it in one go.
3650
3651 2017-11-18 Keith Seitz <keiths@redhat.com>
3652
3653 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3654 types.
3655 Add whitespace to front of type name.
3656
3657 2017-10-18 Keith Seitz <keiths@redhat.com>
3658
3659 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3660 DW_AT_accessibility.
3661
3662 2017-10-18 Yao Qi <yao.qi@linaro.org>
3663
3664 * features/tic6x-c62x-linux.c: Remove.
3665
3666 2017-10-17 Tom Tromey <tom@tromey.com>
3667
3668 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3669 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3670 (do_mixed_source_and_assembly): Likewise.
3671
3672 2017-10-17 Tom Tromey <tom@tromey.com>
3673
3674 * regcache.c (regcache::xfer_part): Remove assertion.
3675
3676 2017-10-17 Pedro Alves <palves@redhat.com>
3677
3678 * xml-support.c (xml_fetch_content_from_file): Call
3679 unique_ptr::release() instead unique_ptr::get() when passing
3680 through xrealloc.
3681
3682 2017-10-17 Yao Qi <yao.qi@linaro.org>
3683
3684 * regcache.c (regcache::xfer_part): Remove parameters read and
3685 write, add parameter is_raw. All callers are updated.
3686
3687 2017-10-16 Keith Seitz <keiths@redhat.com>
3688
3689 * c-typeprint.c (enum access_specifier): Moved here from
3690 c_type_print_base.
3691 (output_access_specifier): New function.
3692 (c_type_print_base): Consider typedefs when assessing
3693 whether access labels are needed.
3694 Use output_access_specifier as needed.
3695 Output access specifier for typedefs, if needed.
3696 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3697 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3698 fields.
3699 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3700 accessor macros.
3701
3702 2017-10-16 Tom Tromey <tom@tromey.com>
3703
3704 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3705 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3706 * target.c (target_fileio_read_stralloc): Update.
3707 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3708 * target.h (target_fileio_read_stralloc): Return
3709 unique_xmalloc_ptr.
3710
3711 2017-10-16 Tom Tromey <tom@tromey.com>
3712
3713 * xml-syscall.c (xml_init_syscalls_info): Update.
3714 * xml-support.c (xinclude_start_include): Update.
3715 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3716 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3717 (xml_fetch_content_from_file): Likewise.
3718 * osdata.c (get_osdata): Update.
3719 * target.h (target_read_stralloc, target_get_osdata): Return
3720 unique_xmalloc_ptr.
3721 * solib-aix.c (solib_aix_get_library_list): Update.
3722 * solib-target.c (solib_target_current_sos): Update.
3723 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3724 * xml-tdesc.c (fetch_available_features_from_target): Update.
3725 (target_fetch_description_xml): Update.
3726 (file_read_description_xml): Update.
3727 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3728 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3729 (remote_pid_to_exec_file): Update.
3730 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3731 (target_get_osdata): Likewise.
3732
3733 2017-10-16 Tom Tromey <tom@tromey.com>
3734
3735 * remote.c (remote_register_number_and_offset): Use std::vector.
3736 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3737 (putpkt_binary): Use gdb::def_vector.
3738 (compare_sections_command): Use gdb::byte_vector.
3739
3740 2017-10-16 Tom Tromey <tom@tromey.com>
3741
3742 * ppc-linux-nat.c (hwdebug_insert_point): Use
3743 gdb::unique_xmalloc_ptr, XDUP.
3744
3745 2017-10-16 Tom Tromey <tom@tromey.com>
3746
3747 * probe.c (parse_probes): Use std::string.
3748 (info_probes_for_ops, enable_probes_command)
3749 (disable_probes_command): Remove cleanups.
3750
3751 2017-10-16 Tom Tromey <tom@tromey.com>
3752
3753 * buildsym.c (block_compar): Remove.
3754 (end_symtab_get_static_block): Use std::vector.
3755
3756 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3757
3758 * memrange.h (struct mem_range): Define operator< and operator==.
3759 (mem_range_s): Remove.
3760 (DEF_VEC_O (mem_range_s)): Remove.
3761 (normalize_mem_ranges): Change parameter type to std::vector.
3762 * memrange.c (compare_mem_ranges): Remove.
3763 (normalize_mem_ranges): Change parameter type to std::vector,
3764 adjust to vector change.
3765 * exec.c (section_table_available_memory): Return vector, remove
3766 parameter.
3767 (section_table_read_available_memory): Adjust to std::vector
3768 change.
3769 * remote.c (remote_read_bytes): Adjust to std::vector
3770 change.
3771 * tracepoint.h (traceframe_available_memory): Change parameter
3772 type to std::vector.
3773 * tracepoint.c (traceframe_available_memory): Change parameter
3774 type to std::vector, adjust.
3775 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3776 std::vector change.
3777 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3778 unittests/memrange-selftests.c.
3779 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3780 * gdb/unittests/memrange-selftests.c: New file.
3781
3782 2017-10-16 Pedro Alves <palves@redhat.com>
3783
3784 * elfread.c (probe_key_free): Rename range-for variable.
3785 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3786 (find_probe_by_pc, collect_probes): Rename range-for variable.
3787
3788 2017-10-16 Yao Qi <yao.qi@linaro.org>
3789
3790 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3791 * features/tic6x-c62x.c: Remove.
3792 * features/tic6x-c64x-linux.c: Remove.
3793 * features/tic6x-c64x.c: Remove.
3794 * features/tic6x-c64xp-linux.c: Remove.
3795 * features/tic6x-c64xp.c: Remove.
3796 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3797 initialize_tdesc_tic6x_*_linux functions.
3798 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3799 initialize_tdesc_tic6x_* functions.
3800
3801 2017-10-16 Yao Qi <yao.qi@linaro.org>
3802
3803 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3804 tic6x-c62x.
3805 * regformats/tic6x-c62x.dat: Remove.
3806 * regformats/tic6x-c64x.dat: Remove.
3807 * regformats/tic6x-c64xp.dat: Remove.
3808
3809 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3810
3811 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3812 (the !HAVE_LIBEXPAT version).
3813
3814 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3815
3816 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3817 const.
3818
3819 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * target.h: Include tracepoint.h.
3822 (enum trace_find_type): Move to tracepoint.h.
3823 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3824 * tracepoint.h: Don't include target.h
3825 (enum trace_find_type): Move from target.h.
3826 (parse_traceframe_info): Return a unique ptr.
3827 * tracepoint.c (current_traceframe_info): Change type to unique
3828 ptr.
3829 (free_traceframe_info): Remove.
3830 (clear_traceframe_info): Don't manually free
3831 current_traceframe_info.
3832 (free_result): Remove.
3833 (parse_traceframe_info): Return a unique ptr.
3834 (get_traceframe_info): Adjust to unique ptr.
3835 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3836 * remote.c (remote_traceframe_info): Return a unique ptr.
3837 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3838 ptr.
3839 * target-debug.h (target_debug_print_traceframe_info_up): New
3840 macro.
3841 * target-delegates.c: Regenerate.
3842
3843 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3844
3845 * memrange.h (struct mem_range): Add constructors.
3846 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3847 std::vector<mem_range>.
3848 * tracepoint.c (free_traceframe_info): Don't manually free
3849 vector.
3850 (traceframe_info_start_memory): Adjust to vector change.
3851 (traceframe_available_memory): Likewise.
3852 * tracefile-tfile.c (build_traceframe_info): Likewise.
3853 * ctf.c (ctf_traceframe_info): Likewise.
3854
3855 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3856
3857 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3858 std::vector<int>.
3859 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3860 (traceframe_info_start_tvar): Adjust to vector change.
3861 (parse_traceframe_info): Allocate with new.
3862 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3863 vector change.
3864 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3865 change.
3866 tfile_traceframe_info): Allocate with new.
3867 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3868 change.
3869
3870 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3871
3872 * tracepoint.c (traceframe_info): Rename to...
3873 (current_traceframe_info): ...this.
3874 (clear_traceframe_info): Adjust.
3875 (get_traceframe_info): Adjust.
3876
3877 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3878
3879 * nat/linux-osdata.c: Include algorithm.
3880 (compare_processes): Remove.
3881 (struct pid_pgid_entry): New struct.
3882 (linux_xfer_osdata_processgroups): Use std::vector instead of
3883 XNEWVEC.
3884
3885 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3886
3887 * objfiles.h: Don't include symfile.h.
3888 (struct partial_symbol): Remove forward-declaration.
3889 (struct objfile) <global_psymbols, static_psymbols>: Change type
3890 to std::vector<partial_symbol *>.
3891 * objfiles.c (objfile::objfile): Don't memset those fields.
3892 (objfile::~objfile): Don't free those fields.
3893 * psympriv.h (struct psymbol_allocation_list): Remove
3894 forward-declaration.
3895 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3896 to std::vector.
3897 (start_psymtab_common): Change parameters to std::vector.
3898 * psymtab.c: Include algorithm.
3899 (require_partial_symbols): Call shrink_to_fit.
3900 (find_pc_sect_psymbol): Adjust to vector change.
3901 (match_partial_symbol): Likewise.
3902 (lookup_partial_symbol): Likewise.
3903 (psym_relocate): Likewise.
3904 (dump_psymtab): Likewise.
3905 (recursively_search_psymtabs): Likewise.
3906 (compare_psymbols): Remove.
3907 (sort_pst_symbols): Adjust to vector change.
3908 (start_psymtab_common): Likewise.
3909 (end_psymtab_common): Likewise.
3910 (psymbol_bcache_full): De-constify return value.
3911 (add_psymbol_to_bcache): Likewise.
3912 (extend_psymbol_list): Remove.
3913 (append_psymbol_to_list): Adjust to vector change.
3914 (add_psymbol_to_list): Likewise.
3915 (init_psymbol_list): Likewise.
3916 (maintenance_info_psymtabs): Likewise.
3917 (maintenance_check_psymtabs): Likewise.
3918 * symfile.h (struct psymbol_allocation_list): Remove.
3919 * symfile.c (reread_symbols): Adjust to vector change.
3920 * dbxread.c (start_psymtab): Change type of parameters.
3921 (dbx_symfile_read): Adjust to vector change.
3922 (read_dbx_symtab): Likewise.
3923 (start_psymtab): Change type of parameters.
3924 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3925 (create_partial_symtab): Likewise.
3926 (add_partial_symbol): Likewise.
3927 (write_one_signatured_type): Likewise.
3928 (recursively_write_psymbols): Likewise.
3929 * mdebugread.c (parse_partial_symbols): Likewise.
3930 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3931 (scan_xcoff_symtab): Adjust to vector change.
3932 (xcoff_initial_scan): Likewise.
3933
3934 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3935
3936 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3937
3938 2017-10-13 Yao Qi <yao.qi@linaro.org>
3939
3940 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3941 Remove s390x-*-expedite, add s390x-expedite.
3942
3943 2017-10-13 Yao Qi <yao.qi@linaro.org>
3944
3945 * features/s390-gs-linux64.c: Regenerated.
3946 * features/s390x-gs-linux64.c: Regenerated.
3947
3948 2017-10-13 Tom Tromey <tom@tromey.com>
3949
3950 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3951 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3952 delete.
3953 * symfile.c (symbol_file_add_with_addrs): Use new.
3954 (symbol_file_add_separate): Update comment.
3955 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3956 * jit.c (jit_object_close_impl): Use new.
3957 (jit_unregister_code): Use delete.
3958 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3959 (~objfile): Rename from free_objfile.
3960 (free_objfile_separate_debug, do_free_objfile_cleanup)
3961 (free_all_objfiles, objfile_purge_solibs): Use delete.
3962 * objfiles.h (struct objfile): Add constructor and destructor.
3963 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3964 (allocate_objfile, free_objfile): Don't declare.
3965 (struct objstats): Add initializers.
3966
3967 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3970 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3971 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3972 * gdbarch.h: Regenerate.
3973 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3974 Adjust comment.
3975 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3976 (i386_displaced_step_fixup): Adjust comment.
3977 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3978
3979 2017-10-12 Tom Tromey <tom@tromey.com>
3980
3981 * prologue-value.h (pv_area::store_would_trash): Return bool.
3982 (pv_area::find_reg): Likewise.
3983 * prologue-value.c (pv_area::store_would_trash): Return bool.
3984 (pv_area::find_reg): Likewise.
3985
3986 2017-10-12 Tom Tromey <tom@tromey.com>
3987
3988 * s390-linux-tdep.c (s390_store, s390_load)
3989 (s390_check_for_saved, s390_analyze_prologue): Update.
3990 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3991 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3992 * prologue-value.h (class pv_area): Move from prologue-value.c.
3993 Change names of members. Add constructor, destructor, member
3994 functions.
3995 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3996 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3997 (pv_area_fetch, pv_area_scan): Don't declare.
3998 * prologue-value.c (struct pv_area::area_entry): Now member of
3999 pv_area.
4000 (struct pv_area): Move to prologue-value.h.
4001 (pv_area::pv_area): Rename from make_pv_area.
4002 (pv_area::~pv_area): Rename from free_pv_area.
4003 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4004 (clear_entries, find_entry, overlaps, store_would_trash, store)
4005 (fetch, find_reg, scan): Now member of pv_area.
4006 Remove "area" argument. Update.
4007 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4008 Update.
4009 * mn10300-tdep.c (push_reg, check_for_saved)
4010 (mn10300_analyze_prologue): Update.
4011 * mep-tdep.c (is_arg_spill, check_for_saved)
4012 (mep_analyze_prologue): Update.
4013 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4014 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4015 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4016 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4017 Update.
4018 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4019 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4020
4021 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4022
4023 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4024 * linux-nat.c (linux_nat_delete_thread): New variable.
4025 (lwp_free): Invoke linux_nat_delete_thread if set.
4026 (linux_nat_set_delete_thread): New function.
4027 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4028 thread delete callback.
4029 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4030 (_initialize_arm_linux_nat): Assign thread delete callback.
4031 * s390-linux-nat.c (s390_delete_thread): New function.
4032 (_initialize_s390_nat): Assign thread delete callback.
4033 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4034 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4035 function.
4036 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4037 declaration.
4038 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4039 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4040
4041 2017-10-09 Tom Tromey <tom@tromey.com>
4042
4043 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4044 std::string.
4045 * tui/tui-layout.c (enum tui_status): Use std::string.
4046
4047 2017-10-11 Tom Tromey <tom@tromey.com>
4048
4049 * gdbthread.h (thread_command): Constify.
4050 * inferior.h (detach_command): Constify.
4051 * top.h (set_history, show_history): Constify.
4052 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4053 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4054 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4055 * printcmd.c (set_command): Constify.
4056 (non_const_set_command): New function.
4057 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4058 * breakpoint.c (enable_command, disable_command, delete_command)
4059 (catch_command, tcatch_command, set_breakpoint_cmd)
4060 (show_breakpoint_cmd): Constify.
4061 * macrocmd.c (macro_command): Constify.
4062 * infcmd.c (unset_command, kill_command, detach_command)
4063 (info_proc_cmd): Constify.
4064 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4065 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4066 (info_auto_load_cmd): Constify.
4067 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4068 (unset_tdesc_cmd): Constify.
4069 * ada-lang.c (set_ada_command, show_ada_command)
4070 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4071 * guile/guile.c (set_guile_command, show_guile_command)
4072 (info_guile_command): Constify.
4073 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4074 Constify.
4075 * skip.c (skip_command): Constify.
4076 * compile/compile.c (_initialize_compile): Constify.
4077 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4078 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4079 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4080 (maint_btrace_pt_show_cmd): Constify.
4081 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4082 Constify.
4083 * python/python.c (user_show_python, user_set_python): Constify.
4084 * mips-tdep.c (set_mips_command, show_mips_command)
4085 (set_mipsfpu_command): Constify.
4086 * record-btrace.c (cmd_record_btrace_start)
4087 (cmd_set_record_btrace, cmd_show_record_btrace)
4088 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4089 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4090 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4091 Constify.
4092 * symfile.c (overlay_command): Constify.
4093 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4094 * cli/cli-logging.c (set_logging_command, show_logging_command):
4095 Constify.
4096 * cli/cli-dump.c (dump_command, append_command)
4097 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4098 (tekhex_dump_command, binary_dump_command)
4099 (binary_append_command): Constify.
4100 * cli/cli-decode.c (struct cmd_list_element): Change type of
4101 "fun".
4102 * cli/cli-cmds.c (info_command, show_command, set_debug)
4103 (show_debug): Constify.
4104 (show_command): Add non-const overload.
4105 * top.c (set_history, show_history): Constify.
4106 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4107 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4108 * target.c (target_command): Constify.
4109 * sparc64-tdep.c (info_adi_command): Constify.
4110 * record-full.c (cmd_record_full_start): Constify.
4111 (set_record_full_command): Constify. Fix typo.
4112 (show_record_full_command): Constify.
4113 * thread.c (thread_command, thread_apply_command): Constify.
4114 * memattr.c (dummy_cmd): Constify.
4115 * value.c (function_command): Constify.
4116 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4117 * probe.c (info_probes_command): Constify.
4118 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4119 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4120 (show_thread_cmd, set_thread_default_cmd)
4121 (show_thread_default_cmd): Constify.
4122 (check_empty): Constify.
4123 * tracepoint.c (tfind_command): Constify.
4124 * cp-support.c (maint_cplus_command): Constify.
4125 * windows-tdep.c (info_w32_command): Constify.
4126 * record.c (cmd_record_start, set_record_command)
4127 (show_record_command, info_record_command, cmd_record_goto):
4128 Constify.
4129 * ravenscar-thread.c (set_ravenscar_command)
4130 (show_ravenscar_command): Constify.
4131 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4132 Constify.
4133 (add_internal_problem_command): Remove casts.
4134 * arc-tdep.c (maintenance_print_arc_command): Constify.
4135 * valprint.c (set_print, show_print, set_print_raw)
4136 (show_print_raw): Constify.
4137 * maint.c (maintenance_command, maintenance_info_command)
4138 (maintenance_print_command, maintenance_set_cmd)
4139 (maintenance_show_cmd, set_per_command_cmd)
4140 (show_per_command_cmd, maintenance_check_command): Constify.
4141 * language.c (set_check, show_check): Constify.
4142 * typeprint.c (show_print_type, set_print_type): Constify.
4143 * go32-nat.c (go32_info_dos_command): Constify.
4144
4145 2017-10-11 Tom Tromey <tom@tromey.com>
4146
4147 * breakpoint.c (prepare_re_set_context): Remove.
4148 (breakpoint_re_set_one): Update. Don't use cleanups.
4149 (breakpoint_re_set): Use scoped_restore, std::string, and
4150 scoped_restore_current_language.
4151
4152 2017-10-11 Tom Tromey <tom@tromey.com>
4153
4154 * breakpoint.c (commands_command_1): Use std::string.
4155 (cleanup_executing_breakpoints): Remove.
4156 (bpstat_do_actions_1): Use scoped_restore.
4157 (bpstat_check_watchpoint): Use std::string.
4158 (decode_static_tracepoint_spec): Likewise.
4159 (break_range_command): Likewise.
4160 (watch_command_1): Likewise.
4161 (compare_breakpoints): Change argument types.
4162 (clear_command): Use std::vector.
4163 (cleanup_executing_breakpoints): Remove.
4164 (update_global_location_list): Use unique_xmalloc_ptr.
4165 (strace_command): Remove unused declaration.
4166
4167 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4168
4169 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4170 * NEWS: Mention new FreeBSD/arm native configuration.
4171 * configure.host: Add arm*-*-freebsd*.
4172 * configure.nat: Likewise.
4173 * arm-fbsd-nat.c: New file.
4174
4175 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4176
4177 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4178 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4179 * NEWS: Mention new FreeBSD/arm target.
4180 * configure.tgt: Add arm*-*-freebsd*.
4181 * arm-fbsd-tdep.c: New file.
4182 * arm-fbsd-tdep.h: New file.
4183
4184 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4185
4186 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4187 `gdbarch_elfcore_write_linux_prpsinfo'.
4188 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4189 method.
4190 (elf_internal_linux_prpsinfo): Remove declaration.
4191 * gdbarch.h: Regenerate.
4192 * gdbarch.c: Regenerate.
4193
4194 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4195
4196 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4197 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4198
4199 2017-10-11 Pedro Alves <palves@redhat.com>
4200
4201 * breakpoint.c (reattach_breakpoints): Delete.
4202 * breakpoint.h (reattach_breakpoints): Delete.
4203
4204 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4205
4206 * symfile.c (registered_sym_fns): Make struct, not typedef.
4207 (DEF_VEC_O (registered_sym_fns)): Remove.
4208 (symtab_fns): Change type to std::vector.
4209 (add_symtab_fns): Adjust.
4210 (find_sym_fns): Adjust.
4211
4212 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4213
4214 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4215 * arc-tdep.h (arc_arch_is_em): New function.
4216 (arc_arch_is_hs): Likewise.
4217
4218 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4219
4220 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4221 parentheses in the declaration.
4222 (macro_lookup_inclusion): Likewise.
4223 (macro_lookup_definition): Likewise.
4224 * p-lang.h (pascal_builtin_types): Likewise.
4225 * tui/tui-data.c (tui_win_list): Likewise.
4226 * tui/tui-data.h (tui_win_list): Likewise.
4227 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4228
4229 2017-10-11 Mark Rages <markrages@gmail.com>
4230
4231 * target-memory.c (block_boundaries): Fix for block address not
4232 aligned on block size.
4233
4234 2017-10-10 Pedro Alves <palves@redhat.com>
4235 Tom Tromey <tom@tromey.com>
4236
4237 * breakpoint.c (struct captured_breakpoint_query_args)
4238 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4239 (print_breakpoint): New.
4240 * breakpoint.h (print_breakpoint): Declare.
4241 * common/common-exceptions.h (enum return_reason): Remove
4242 references to catch_exceptions.
4243 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4244 Delete.
4245 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4246 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4247 * gdb.h: Delete.
4248 * gdbthread.h (thread_select): Declare.
4249 * mi/mi-cmd-break.c: Don't include gdb.h.
4250 (breakpoint_notify): Use print_breakpoint.
4251 * mi/mi-cmd-catch.c: Don't include gdb.h.
4252 * mi/mi-interp.c: Don't include gdb.h.
4253 (mi_print_breakpoint_for_event): New.
4254 (mi_breakpoint_created, mi_breakpoint_modified): Use
4255 mi_print_breakpoint_for_event.
4256 * mi/mi-main.c: Don't include gdb.h.
4257 (mi_cmd_thread_select): Parse the global thread ID here. Use
4258 thread_select instead of gdb_thread_select.
4259 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4260 of using gdb_list_thread_ids.
4261 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4262 FILEIO_ENOSYS here.
4263 (remote_fileio_request): Use TRY/CATCH instead of
4264 catch_exceptions.
4265 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4266 (symbol_file_add_from_memory_wrapper): Delete.
4267 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4268 * thread.c: Don't include gdb.h.
4269 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4270 (thread_alive): Use thread_select.
4271 (do_captured_thread_select): Delete, parts salvaged as ...
4272 (thread_select): ... this new function.
4273 (gdb_thread_select): Delete.
4274
4275 2017-10-10 Pedro Alves <palves@redhat.com>
4276 Tom Tromey <tom@tromey.com>
4277
4278 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4279 and reverse logic.
4280 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4281 No longer macros. Instead ...
4282 (enum wp_check_result): They're now values of this new
4283 enumeration.
4284 (watchpoint_check): Change return type to wp_check_result and
4285 parameter type to bpstat.
4286 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4287 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4288 catch_errors. Reverse logic of watchpoint_check call.
4289 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4290 pointer as parameter.
4291 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4292 * common/common-exceptions.c (throw_exception_sjlj): Update
4293 comments to avoid mentioning catch_errors.
4294 * exceptions.c (catch_errors): Delete.
4295 * exceptions.h: Update comments to avoid mentioning catch_errors.
4296 (catch_errors_ftype, catch_errors): Delete.
4297 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4298 (hook_stop_stub): Delete.
4299 (restore_selected_frame): Change return type to void, and
4300 parameter type to const frame_id &.
4301 (restore_infcall_control_state): Use TRY/CATCH instead of
4302 catch_errors.
4303 * main.c (captured_command_loop): Return void and remove
4304 parameter. Remove references to catch_errors.
4305 (captured_main): Use TRY/CATCH instead of catch_errors.
4306 * objc-lang.c (objc_submethod_helper_data)
4307 (find_objc_msgcall_submethod_helper): Delete.
4308 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4309 catch_errors.
4310 * record-full.c (record_full_message): Return void.
4311 (record_full_message_args, record_full_message_wrapper): Delete.
4312 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4313 instead of catch_errors.
4314 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4315 parameter type to int.
4316 * solib-darwin.c (open_symbol_file_object): Ditto.
4317 * solib-dsbt.c (open_symbol_file_object): Ditto.
4318 * solib-frv.c (open_symbol_file_object): Ditto.
4319 * solib-svr4.c (open_symbol_file_object): Ditto.
4320 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4321 * solib.c (update_solib_list): Use TRY/CATCH instead of
4322 catch_errors.
4323 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4324 Change type.
4325 * symmisc.c (struct print_symbol_args): Remove.
4326 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4327 (print_symbol): Change type.
4328 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4329 and remove parameters.
4330 (catch_errors): New.
4331 (get_windows_debug_event): Adjust.
4332
4333 2017-10-09 Tom Tromey <tom@tromey.com>
4334
4335 * mi/mi-main.c (free_splay_tree): Remove.
4336 (list_available_thread_groups): Use splay_tree_up.
4337 * common/gdb_splay_tree.h: New file.
4338
4339 2017-10-09 Tom Tromey <tom@tromey.com>
4340
4341 * mi/mi-main.c (do_nothing): Remove.
4342 (list_available_thread_groups): Update.
4343
4344 2017-10-09 Pedro Alves <palves@redhat.com>
4345
4346 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4347 reading registers when switching context.
4348
4349 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4350
4351 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4352 (fbsd_convert_siginfo): Likewise.
4353 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4354
4355 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4356
4357 * configure.ac (try_guile_versions): Remove guile-2.2.
4358 * configure: Regenerate.
4359
4360 2017-10-09 Tom Tromey <tom@tromey.com>
4361
4362 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4363 (COMPILE.pre): Use $(CXX).
4364
4365 2017-10-09 Pedro Alves <palves@redhat.com>
4366
4367 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4368 Use bool.
4369 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4370 * cp-support.h (cp_remove_params): Now returns a
4371 gdb::unique_xmalloc_ptr.
4372 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4373 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4374 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4375 returning a gdb::unique_xmalloc_ptr.
4376 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4377 * stack.c (find_frame_funname): Adjust to cp_remove_params
4378 returning a gdb::unique_xmalloc_ptr.
4379
4380 2017-10-08 Tom Tromey <tom@tromey.com>
4381
4382 * dwarf2read.c (dwarf2_get_dwz_file): Use
4383 gdb::unique_xmalloc_ptr.
4384 (find_slot_in_mapped_hash): Likewise.
4385 (dwarf2_physname): Likewise.
4386 (create_dwo_unit_in_dwp_v1): Use std::string.
4387 (create_dwo_unit_in_dwp_v2): Likewise.
4388 (lookup_dwo_cutu): Likewise.
4389 (inherit_abstract_dies): Use std::vector.
4390 (read_array_type): Likewise.
4391 (dwarf_decode_macros): Remove unused declaration.
4392 (unsigned_int_compar): Remove.
4393 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4394 (psymtabs_addrmap_cleanup): Remove.
4395
4396 2017-10-08 Tom Tromey <tom@tromey.com>
4397
4398 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4399 * frame.h (frame_cleanup_after_sniffer): Declare.
4400 (frame_prepare_for_sniffer): Return void.
4401 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4402 type of argument.
4403 (frame_prepare_for_sniffer): Return void.
4404
4405 2017-10-08 Tom Tromey <tom@tromey.com>
4406
4407 * utils.h (make_cleanup_value_free): Remove.
4408 * utils.c (do_value_free, struct cleanup): Remove.
4409 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4410 Use gdb_value_up.
4411 * value.h (struct value_deleter): New.
4412 (gdb_value_up): New typedef.
4413
4414 2017-10-08 Tom Tromey <tom@tromey.com>
4415
4416 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4417 (make_cleanup_free_search_symbols): Remove.
4418 (search_symbols): Return std::vector.
4419 (symbol_search::compare_search_syms): Now member of
4420 symbol_search. Change arguments.
4421 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4422 (symtab_symbol_info, rbreak_command): Update.
4423 * symtab.h (struct symbol_search) <next>: Remove.
4424 Add constructors.
4425 (symbol_search::operator<): New function.
4426 (symbol_search::operator==): New function.
4427 (search_symbols): Remove std::vector.
4428 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4429 (symbol_search::compare_search_syms): Declare.
4430
4431 2017-10-06 Yao Qi <yao.qi@linaro.org>
4432
4433 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4434 arch/aarch64-insn.o.
4435 Remove one rule.
4436 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4437
4438 2017-10-06 Yao Qi <yao.qi@linaro.org>
4439
4440 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4441 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4442 arch/arm-linux.o respectively.
4443 * configure.tgt: Likewise.
4444
4445 2017-10-06 Yao Qi <yao.qi@linaro.org>
4446
4447 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4448 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4449
4450 2017-10-06 Pedro Alves <palves@redhat.com>
4451
4452 * windows-nat.c: Include <algorithm>.
4453
4454 2017-10-06 Yao Qi <yao.qi@linaro.org>
4455
4456 * configure.tgt (i386_tobjs): New variable.
4457 (amd64_tobjs): New variable.
4458 Set $cpu_obs and $os_obs.
4459
4460 2017-10-06 Yao Qi <yao.qi@linaro.org>
4461
4462 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4463 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4464 (clean): Remove object files and dependency files.
4465 (distclean): Remove the directory.
4466 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4467 * configure: Re-generated.
4468 * configure.tgt: Replace amd64.o with arch/amd64.o.
4469
4470 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4471
4472 PR build/22188
4473 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4474 and SETEND.
4475
4476 2017-10-05 Pedro Alves <palves@redhat.com>
4477
4478 * linux-nat.c (linux_child_follow_fork): When following the parent
4479 and detaching the child, consult the parent thread's architecture
4480 instead of the child's.
4481
4482 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4483
4484 * ax.h: Do not include "doublest.h".
4485 (union agent_val): Remove.
4486
4487 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4488
4489 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4490 (decimal_to_string): Return std::string object.
4491 (decimal_from_string): Accept std::string object. Return bool.
4492 (decimal_from_integral, decimal_from_doublest): Remove.
4493 (decimal_from_longest): Add prototype.
4494 (decimal_from_ulongest): Likewise.
4495 (decimal_to_longest): Likewise.
4496 (decimal_from_doublest): Likewise.
4497 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4498 (MAX_DECIMAL_STRING): Move here.
4499 (decimal_to_string): Return std::string object.
4500 (decimal_from_string): Accept std::string object. Return bool.
4501 (decimal_from_integral): Remove, replace by ...
4502 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4503 (decimal_to_longest): New function.
4504 (decimal_from_floating): Remove, replace by ...
4505 (decimal_from_doublest): ... this new function.
4506 (decimal_to_doublest): Update to new decimal_to_string interface.
4507
4508 * value.c (unpack_long): Use decimal_to_longest.
4509 * valops.c (value_cast): Use decimal_from_doublest instead of
4510 decimal_from_floating. Use decimal_from_[u]longest isntead of
4511 decimal_from_integral.
4512 * valarith.c (value_args_as_decimal): Likewise.
4513 * valprint.c (print_decimal_floating): Update to new
4514 decimal_to_string interface.
4515 * printcmd.c (printf_decfloat): Likewise.
4516 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4517
4518 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4519
4520 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4521 * gdbtypes.c: Include "floatformat.h".
4522 * value.c: Likewise.
4523 * m68k-tdep.c: Likewise.
4524
4525 * findvar.c: Do not include "floatformat.h".
4526 * amd64-darwin-tdep.c: Likewise.
4527 * arm-linux-tdep.c: Likewise.
4528 * i386-darwin-tdep.c: Likewise.
4529 * i387-tdep.c: Likewise.
4530 * m68k-linux-tdep.c: Likewise.
4531 * mep-tdep.c: Likewise.
4532 * mips-tdep.c: Likewise.
4533 * nios2-tdep.c: Likewise.
4534 * s390-linux-tdep.c: Likewise.
4535 * sparc-obsd-tdep.c: Likewise.
4536 * sparc-tdep.c: Likewise.
4537 * sparc64-tdep.c: Likewise.
4538 * spu-tdep.c: Likewise.
4539 * tic6x-tdep.c: Likewise.
4540 * tilegx-tdep.c: Likewise.
4541 * vax-tdep.c: Likewise.
4542 * xstormy16-tdep.c: Likewise.
4543 * xtensa-tdep.c: Likewise.
4544
4545 * top.c: Do not include "doublest.h".
4546 * aarch64-tdep.c: Likewise.
4547 * alpha-tdep.c: Likewise.
4548 * arm-linux-tdep.c: Likewise.
4549 * m68k-linux-tdep.c: Likewise.
4550 * tilegx-tdep.c: Likewise.
4551 * xstormy16-tdep.c: Likewise.
4552
4553 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4554
4555 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4556 (mipsn32_fbsd_sigframe): Define.
4557 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4558 for FreeBSD/mipsn32.
4559
4560 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4561
4562 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4563 AT_HWCAP.
4564
4565 2017-10-05 Tristan Gingold <tgingold@free.fr>
4566
4567 * MAINTAINERS (Misc): Update my email address.
4568
4569 2017-10-04 Pedro Alves <palves@redhat.com>
4570
4571 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4572 it instead of target_gdbarch.
4573 (get_remote_state, get_remote_packet_size): Adjust
4574 get_remote_arch_state calls, passing down target_gdbarch
4575 explicitly.
4576 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4577 'gdbarch' and use it instead of target_gdbarch.
4578 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4579 passing down target_gdbarch explicitly.
4580 (struct stop_reply) <arch>: New field.
4581 (remote_parse_stop_reply): Use the stopped thread's architecture,
4582 not the current inferior's. Save the architecture in the
4583 stop_reply.
4584 (process_stop_reply): Use the stop reply's architecture.
4585 (process_g_packet, remote_fetch_registers)
4586 (remote_prepare_to_store, store_registers_using_G)
4587 (remote_store_registers): Adjust get_remote_arch_state calls,
4588 using the regcache's architecture.
4589 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4590 passing down target_gdbarch explicitly.
4591 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4592 beneath instead of calling target_gdbarch.
4593 * target.c (default_thread_architecture): Use the specified
4594 inferior's architecture, instead of the current inferior's
4595 architecture (via target_gdbarch).
4596
4597 2017-10-04 Pedro Alves <palves@redhat.com>
4598
4599 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4600 case.
4601 (regcache_print): Handle !target_has_registers here instead.
4602
4603 2017-10-04 Pedro Alves <palves@redhat.com>
4604
4605 * frame.c (create_test_frame): Delete.
4606 * frame.h (create_test_frame): Delete.
4607 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4608 (class regcache_test): Delete.
4609 (test_target_has_registers, test_target_has_stack)
4610 (test_target_has_memory, test_target_prepare_to_store)
4611 (test_target_store_registers): New functions.
4612 (test_target_ops): New class.
4613 (register_to_value_test): Error out if there's already a
4614 process_stratum (or higher) target pushed. Create a fuller mock
4615 environment, with mock target_ops, inferior, address space, thread
4616 and inferior_ptid.
4617 * progspace.c (struct address_space): Move to ...
4618 * progspace.h (struct address_space): ... here.
4619 * regcache.h (regcache::~regcache, regcache::raw_write)
4620 [GDB_SELF_TEST]: No longer virtual.
4621
4622 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4623
4624 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4625
4626 2017-10-04 Pedro Alves <palves@redhat.com>
4627
4628 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4629 out of 'between TRY and CATCH'.
4630
4631 2017-10-04 Pedro Alves <palves@redhat.com>
4632
4633 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4634 * common/common-exceptions.h (TRY): Open an outermost scope.
4635 Expand intro comment.
4636 (CATCH): Reindent.
4637 (END_CATCH): Close the outermost scope.
4638 * completer.c (complete_line_internal): Add missing END_CATCH.
4639
4640 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4641
4642 * NEWS (Changes since GDB 8.0): Add entry about new
4643 'set-cwd-on-gdbserver' feature.
4644 (New remote packets): Add entry for QSetWorkingDir.
4645 * common/common-inferior.h (set_inferior_cwd): New prototype.
4646 * infcmd.c (set_inferior_cwd): Remove "static".
4647 (show_cwd_command): Expand text to include remote debugging.
4648 * remote.c: Add PACKET_QSetWorkingDir.
4649 (remote_protocol_features) <QSetWorkingDir>: New entry for
4650 PACKET_QSetWorkingDir.
4651 (extended_remote_set_inferior_cwd): New function.
4652 (extended_remote_create_inferior): Call
4653 "extended_remote_set_inferior_cwd".
4654 (_initialize_remote): Call "add_packet_config_cmd" for
4655 QSetWorkingDir.
4656
4657 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4658
4659 * NEWS (New commands): Mention "set/show cwd".
4660 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4661 "cd" command's help text.
4662 * common/common-inferior.h (get_inferior_cwd): New prototype.
4663 * infcmd.c (inferior_cwd_scratch): New global variable.
4664 (set_inferior_cwd): New function.
4665 (get_inferior_cwd): Likewise.
4666 (set_cwd_command): Likewise.
4667 (show_cwd_command): Likewise.
4668 (_initialize_infcmd): Add "set/show cwd" commands.
4669 * inferior.h (class inferior) <cwd>: New field.
4670 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4671 (fork_inferior): Change inferior's cwd before its execution.
4672 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4673 to CreateProcess.
4674
4675 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4676
4677 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4678 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4679 (COMMON_OBS): Add gdb_tilde_expand.o.
4680 * common/gdb_tilde_expand.c: New file.
4681 * common/gdb_tilde_expand.h: Likewise.
4682
4683 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4684
4685 * gdbarch.sh (objfile): Remove duplicate declaration.
4686 * gdbarch.h: Regenerate.
4687
4688 2017-10-03 Tom Tromey <tom@tromey.com>
4689
4690 * utils.c (internal_vproblem): Use string_vprintf.
4691
4692 2017-10-03 Tom Tromey <tom@tromey.com>
4693
4694 * printcmd.c (info_symbol_command): Use std::string.
4695
4696 2017-10-03 Tom Tromey <tom@tromey.com>
4697
4698 * top.c (gdb_safe_append_history): Use std::string.
4699
4700 2017-10-03 Tom Tromey <tom@tromey.com>
4701
4702 * event-top.c (stdin_event_handler): Update.
4703 * main.c (captured_main_1): Update.
4704 * top.h (make_delete_ui_cleanup): Remove.
4705 (struct ui): Add constructor and destructor.
4706 (new_ui, delete_ui): Remove.
4707 * top.c (make_delete_ui_cleanup): Remove.
4708 (new_ui_command): Use std::unique_ptr.
4709 (delete_ui_cleanup): Remove.
4710 (ui::ui): Rename from new_ui. Update.
4711 (free_ui): Remove.
4712 (ui::~ui): Rename from delete_ui. Update.
4713
4714 2017-10-03 Tom Tromey <tom@tromey.com>
4715
4716 * symfile.c (load_progress): Use gdb::byte_vector.
4717
4718 2017-10-03 Tom Tromey <tom@tromey.com>
4719
4720 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4721 declaration.
4722 * printcmd.c (x_command): Remove unused declaration.
4723 * symfile.c (symbol_file_command): Remove unused declaration.
4724
4725 2017-10-03 Tom Tromey <tom@tromey.com>
4726
4727 * utils.c (internal_vproblem): Use std::string.
4728 (defaulted_query): Likewise.
4729
4730 2017-10-03 Tom Tromey <tom@tromey.com>
4731
4732 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4733 * top.c (execute_command_to_string): Update.
4734 * utils.c (make_cleanup_restore_page_info): Remove.
4735 (do_restore_page_info_cleanup): Remove.
4736 (set_batch_flag_and_restore_page_info):
4737 New.
4738 (make_cleanup_restore_page_info): Remove.
4739 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4740 (~set_batch_flag_and_restore_page_info): New
4741 (make_cleanup_restore_uinteger): Remove.
4742 (make_cleanup_restore_integer): Remove.
4743 (struct restore_integer_closure): Remove.
4744 (restore_integer): Remove.
4745 * utils.h (struct set_batch_flag_and_restore_page_info): New
4746 class.
4747 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4748 (make_cleanup_restore_page_info): Remove.
4749 (make_cleanup_restore_uinteger) Remove.
4750 (make_cleanup_restore_integer) Remove.
4751
4752 2017-10-03 Tom Tromey <tom@tromey.com>
4753
4754 * record-full.h (record_full_gdb_operation_disable_set): Return
4755 scoped_restore_tmpl<int>.
4756 * infrun.c (adjust_pc_after_break): Update.
4757 (handle_signal_stop): Update.
4758 * record-full.c (record_full_gdb_operation_disable_set): Return
4759 scoped_restore_tmpl<int>.
4760 (record_full_wait_1, record_full_insert_breakpoint)
4761 (record_full_remove_breakpoint, record_full_save)
4762 (record_full_goto_insn): Update.
4763
4764 2017-10-02 Tom Tromey <tom@tromey.com>
4765
4766 PR rust/22236:
4767 * rust-lang.c (rust_val_print_str): New function.
4768 (val_print_struct): Call it.
4769 (rust_subscript): Preserve name of slice type.
4770
4771 2017-10-02 Tom Tromey <tom@tromey.com>
4772
4773 * rust-lang.c (rust_subscript): Handle slices in
4774 EVAL_AVOID_SIDE_EFFECTS case.
4775
4776 2017-10-02 Tom Tromey <tom@tromey.com>
4777
4778 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4779
4780 2017-10-02 Tom Tromey <tom@tromey.com>
4781
4782 * rust-lang.h (rust_slice_type): Add "extern".
4783
4784 2017-10-02 Tom Tromey <tom@tromey.com>
4785 Pedro Alves <palves@redhat.com>
4786
4787 * ada-lang.h (ada_exc_info::operator<): Make const.
4788 (ada_exc_info::operator==): Make const.
4789 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4790 Make const.
4791
4792 2017-09-29 Tom Tromey <tom@tromey.com>
4793
4794 * target.c (read_whatever_is_readable): Change type of "result".
4795 Update.
4796 (free_memory_read_result_vector): Remove.
4797 (read_memory_robust): Change return type. Update.
4798 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4799 bin2hex, std::string.
4800 * target.h (memory_read_result_s): Remove typedef.
4801 (free_memory_read_result_vector): Remove.
4802 (read_memory_robust): Return std::vector.
4803
4804 2017-09-29 Tom Tromey <tom@tromey.com>
4805
4806 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4807
4808 2017-09-29 Tom Tromey <tom@tromey.com>
4809
4810 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4811 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4812 operator< and operator==.
4813 (ada_exceptions_list): Return a std::vector.
4814 * ada-lang.c (ada_exc_info::operator<): Rename from
4815 compare_ada_exception_info.
4816 (ada_exc_info::operator==): New.
4817 (sort_remove_dups_ada_exceptions_list): Change type of
4818 "exceptions".
4819 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4820 (ada_add_global_exceptions): Likewise.
4821 (ada_exceptions_list_1): Return a std::vector.
4822 (ada_exceptions_list): Likewise.
4823
4824 2017-09-29 Tom Tromey <tom@tromey.com>
4825
4826 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4827 'std::set *'.
4828 (print_one_inferior): Update.
4829 (free_vector_of_ints): Remove.
4830 (list_available_thread_groups): Change "ids" to std::set.
4831 (mi_cmd_list_thread_groups): Update.
4832 (struct collect_cores_data) <core>: Now a std::set.
4833 (collect_cores): Update.
4834 (unique): Remove.
4835 (print_one_inferior): Update.
4836
4837 2017-09-29 Tom Tromey <tom@tromey.com>
4838
4839 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4840 (mi_execute_async_cli_command): Likewise.
4841 (mi_cmd_trace_frame_collected): Use field_fmt.
4842
4843 2017-09-29 Tom Tromey <tom@tromey.com>
4844
4845 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4846 gdb::byte_vector.
4847
4848 2017-09-29 Tom Tromey <tom@tromey.com>
4849
4850 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4851
4852 2017-09-29 Tom Tromey <tom@tromey.com>
4853
4854 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4855
4856 2017-09-29 Tom Tromey <tom@tromey.com>
4857
4858 * varobj.h (varobj_gen_name): Return std::string.
4859 * varobj.c (varobj_gen_name): Return std::string.
4860 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4861 (mi_cmd_var_delete): Don't copy "name".
4862
4863 2017-09-29 Tom Tromey <tom@tromey.com>
4864
4865 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4866 (mi_cmd_break_insert_1): Update.
4867
4868 2017-09-29 Tom Tromey <tom@tromey.com>
4869
4870 * target.h (make_scoped_defer_target_commit_resume): Update.
4871 * target.c (make_scoped_defer_target_commit_resume): Rename from
4872 make_cleanup_defer_target_commit_resume. Return a
4873 scoped_restore.
4874 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4875
4876 2017-09-29 Tom Tromey <tom@tromey.com>
4877
4878 * main.c (captured_main_1): Remove unused declaration.
4879 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4880
4881 2017-09-29 Tom Tromey <tom@tromey.com>
4882
4883 * symtab.c (search_symbols): Remove unused outer cleanup.
4884 (make_source_files_completion_list): Remove unused declaration.
4885
4886 2017-09-29 Tom Tromey <tom@tromey.com>
4887
4888 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4889
4890 2017-09-29 Tom Tromey <tom@tromey.com>
4891
4892 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4893 gdb::byte_vector.
4894
4895 2017-09-29 Tom Tromey <tom@tromey.com>
4896
4897 * complaints.c (vcomplaint): Use std::string.
4898
4899 2017-09-29 Tom Tromey <tom@tromey.com>
4900
4901 * tracepoint.c (trace_variable_command): Use std::string.
4902 (encode_actions_1): Remove unused declarations.
4903 (create_tsv_from_upload): Use std::string.
4904
4905 2017-09-29 Tom Tromey <tom@tromey.com>
4906
4907 * cp-support.c (gdb_demangle): Use std::string.
4908
4909 2017-09-29 Tom Tromey <tom@tromey.com>
4910
4911 * stack.c (parse_frame_specification): Use std::string
4912 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4913
4914 2017-09-29 Tom Tromey <tom@tromey.com>
4915
4916 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4917
4918 2017-09-29 Tom Tromey <tom@tromey.com>
4919
4920 * utils.c (vfprintf_maybe_filtered): Use std::string.
4921 (vfprintf_unfiltered): Likewise.
4922
4923 2017-09-29 Tom Tromey <tom@tromey.com>
4924
4925 * event-top.c (top_level_prompt): Return std::string.
4926 (display_gdb_prompt): Update.
4927
4928 2017-09-29 Tom Tromey <tom@tromey.com>
4929
4930 * unittests/common-utils-selftests.c (format): New function.
4931 (string_vprintf_tests): New function.
4932 (_initialize_common_utils_selftests): Register new tests.
4933 * common/common-utils.c (string_vprintf): New function.
4934 * common/common-utils.h (string_vprintf): Declare.
4935
4936 2017-09-29 Pedro Alves <palves@redhat.com>
4937
4938 * common/rsp-low.c (unpack_varlen_hex): Constify.
4939 * common/rsp-low.h (unpack_varlen_hex): Constify.
4940 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4941 Constify.
4942 * remote.c (remote_set_permissions, read_ptid)
4943 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4944 (remote_static_tracepoint_marker_at)
4945 (remote_static_tracepoint_markers_by_strid)
4946 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4947 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4948 (parse_tracepoint_definition, parse_tsv_definition)
4949 (parse_static_tracepoint_marker_definition): Constify.
4950 * tracepoint.h (parse_static_tracepoint_marker_definition)
4951 (parse_trace_status, parse_tracepoint_status)
4952 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4953
4954 2017-09-29 Pedro Alves <palves@redhat.com>
4955
4956 * remote.c (target_buf, target_buf_size): Delete.
4957 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4958 Use the connection's packet buffer instead.
4959 All callers adjusted.
4960 (_initialize_remote): Remove references to target_buf and
4961 target_buf_size.
4962
4963 2017-09-28 Pedro Alves <palves@redhat.com>
4964
4965 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4966 unittests/common-utils-selftests.c.
4967 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4968 (COMMON_OBS): Remove utils-selftests.o.
4969 * utils-selftests.c: Move to ...
4970 * unittests/common-utils-selftests.c: ... here and rename self
4971 test to "string_printf".
4972
4973 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4974
4975 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4976 having NULL cus or tus.
4977
4978 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4979
4980 * arm-tdep.c: (convert_from_extended): Remove.
4981 (convert_to_extended): Likewise.
4982 (arm_extract_return_value): Use convert_typed_floating.
4983 (arm_store_return_value): Likewise.
4984
4985 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4986 * sh-tdep.c: Do not include "floatformat.h".
4987 (sh_littlebyte_bigword_type): New function.
4988 (sh_register_convert_to_virtual): Use convert_typed_floating.
4989 (sh_register_convert_to_raw): Likewise.
4990 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4991 (sh64_littlebyte_bigword_type): New function.
4992 (sh64_extract_return_value): Use convert_typed_floating.
4993 (sh64_register_convert_to_virtual): Likewise.
4994 (sh64_register_convert_to_raw): Likewise.
4995
4996 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4997
4998 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4999 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5000
5001 * gdbtypes.h (union type_specific): Make field floatformat hold
5002 just a single struct floatformat, not an array.
5003 (floatformat_from_type): Move here.
5004 * gdbtypes.c (floatformat_from_type): Move here. Update to
5005 changed TYPE_FLOATFORMAT definition.
5006 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5007 (recursive_dump_type): Likewise.
5008 (init_float_type): Install correct floatformat for byte order.
5009 (arch_float_type): Likewise.
5010
5011 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5012
5013 * gdbtypes.c (init_type): Change incoming argument from
5014 length-in-bytes to length-in-bits. Assert length is a
5015 multiple of TARGET_CHAR_BITS.
5016 (arch_type, arch_flags_type): Likewise.
5017 (init_integer_type): Update call to init_type.
5018 (init_character_type): Likewise.
5019 (init_boolean_type): Likewise.
5020 (init_float_type): Likewise.
5021 (init_decfloat_type): Likewise.
5022 (init_complex_type): Likewise.
5023 (init_pointer_type): Likewise.
5024 (objfile_type): Likewise.
5025 (arch_integer_type): Update call to arch_type.
5026 (arch_character_type): Likewise.
5027 (arch_boolean_type): Likewise.
5028 (arch_float_type): Likewise.
5029 (arch_decfloat_type): Likewise.
5030 (arch_complex_type): Likewise.
5031 (arch_pointer_type): Likewise.
5032 (gdbtypes_post_init): Likewise.
5033
5034 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5035 (read_base_type): Likewise.
5036 * mdebugread.c (basic_type): Likewise.
5037 * stabsread.c (dbx_init_float_type): Likewise.
5038 (rs6000_builtin_type): Likewise.
5039 (read_range_type): Likewise. Also, fix call to init_integer_type
5040 with erroneous length argument.
5041
5042 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5043 * d-lang.c (build_d_types): Likewise.
5044 * f-lang.c (build_fortran_types): Likewise.
5045 * go-lang.c (build_go_types): Likewise.
5046 * opencl-lang.c (build_opencl_types): Likewise.
5047 * jit.c (finalize_symtab): Likewise.
5048 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5049 (build_std_type_info_type): Likewise.
5050 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5051 update call to arch_flags_type.
5052
5053 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5054 arch_type.
5055 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5056 * windows-tdep.c (windows_get_tlb_type): Likewise.
5057
5058 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5059 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5060 * m32c-tdep.c (make_types): Likewise.
5061 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5062 (rl78_psw_type): Update call to arch_flags_type.
5063 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5064 * rx-tdep.c (rx_psw_type): Likewise.
5065 (rx_fpsw_type): Likewise.
5066 * sparc-tdep.c (sparc_psr_type): Likewise.
5067 (sparc_fsr_type): Likewise.
5068 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5069 (sparc64_ccr_type): Likewise.
5070 (sparc64_fsr_type): Likewise.
5071 (sparc64_fprs_type): Likewise.
5072
5073 2017-09-27 Tom Tromey <tom@tromey.com>
5074
5075 * findcmd.c (find_command): Constify.
5076
5077 2017-09-27 Tom Tromey <tom@tromey.com>
5078
5079 * ada-tasks.c (task_command_1, task_command): Constify.
5080
5081 2017-09-27 Tom Tromey <tom@tromey.com>
5082
5083 * symtab.c (maintenance_print_symbol_cache)
5084 (maintenance_flush_symbol_cache)
5085 (maintenance_print_symbol_cache_statistics): Constify.
5086
5087 2017-09-27 Tom Tromey <tom@tromey.com>
5088
5089 * inferior.c (detach_inferior_command, kill_inferior_command)
5090 (inferior_command): Constify.
5091
5092 2017-09-27 Tom Tromey <tom@tromey.com>
5093
5094 * regcache.c (regcache_print, maintenance_print_registers)
5095 (maintenance_print_raw_registers)
5096 (maintenance_print_cooked_registers)
5097 (maintenance_print_register_groups)
5098 (maintenance_print_remote_registers): Constify.
5099
5100 2017-09-27 Tom Tromey <tom@tromey.com>
5101
5102 * printcmd.c (map_display_numbers, undisplay_command)
5103 (enable_disable_display_command, enable_display_command)
5104 (disable_display_command): Constify.
5105
5106 2017-09-27 Tom Tromey <tom@tromey.com>
5107
5108 * breakpoint.h (delete_command): Don't declare.
5109 * breakpoint.c (delete_command, enable_once_command)
5110 (enable_count_command, enable_delete_command, breakpoint_1)
5111 (maintenance_info_breakpoints, stopin_command, stopat_command)
5112 (delete_command, delete_trace_command, save_breakpoints)
5113 (save_breakpoints_command, save_tracepoints_command): Constify.
5114
5115 2017-09-27 Tom Tromey <tom@tromey.com>
5116
5117 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5118 (skip_ws, extract_identifier, macro_define_command)
5119 (macro_undef_command, macro_list_command): Constify.
5120
5121 2017-09-27 Tom Tromey <tom@tromey.com>
5122
5123 * infcmd.c (environment_info, set_environment_command)
5124 (unset_environment_command, path_info, info_proc_cmd_1)
5125 (info_proc_cmd_mappings, info_proc_cmd_stat)
5126 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5127 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5128
5129 2017-09-27 Tom Tromey <tom@tromey.com>
5130
5131 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5132 Constify.
5133
5134 2017-09-27 Tom Tromey <tom@tromey.com>
5135
5136 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5137
5138 2017-09-27 Tom Tromey <tom@tromey.com>
5139
5140 * demangle.c (demangle_command): Constify.
5141
5142 2017-09-27 Tom Tromey <tom@tromey.com>
5143
5144 * progspace.c (maintenance_info_program_spaces_command):
5145 Constify.
5146
5147 2017-09-27 Tom Tromey <tom@tromey.com>
5148
5149 * compile/compile.c (check_raw_argument, compile_file_command)
5150 (compile_code_command, compile_print_command): Constify.
5151
5152 2017-09-27 Tom Tromey <tom@tromey.com>
5153
5154 * reggroups.c (maintenance_print_reggroups): Constify.
5155
5156 2017-09-27 Tom Tromey <tom@tromey.com>
5157
5158 * dwarf2read.c (save_gdb_index_command): Constify.
5159
5160 2017-09-27 Tom Tromey <tom@tromey.com>
5161
5162 * stap-probe.c (info_probes_stap_command): Constify.
5163
5164 2017-09-27 Tom Tromey <tom@tromey.com>
5165
5166 * fork-child.c (unset_exec_wrapper_command): Constify.
5167
5168 2017-09-27 Tom Tromey <tom@tromey.com>
5169
5170 * btrace.c (get_uint, get_context_size, no_chunk)
5171 (maint_btrace_packet_history_cmd)
5172 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5173 (maint_info_btrace_cmd): Constify.
5174
5175 2017-09-27 Tom Tromey <tom@tromey.com>
5176
5177 * reverse.c (delete_bookmark_command): Constify.
5178
5179 2017-09-27 Tom Tromey <tom@tromey.com>
5180
5181 * remote.c (set_memory_packet_size)
5182 (set_memory_write_packet_size, show_memory_write_packet_size)
5183 (set_memory_read_packet_size, show_memory_read_packet_size)
5184 (compare_sections_command, packet_command, remote_put_command)
5185 (remote_get_command, remote_delete_command): Constify.
5186
5187 2017-09-27 Tom Tromey <tom@tromey.com>
5188
5189 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5190 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5191 (set_mipsfpu_auto_command): Constify.
5192
5193 2017-09-27 Tom Tromey <tom@tromey.com>
5194
5195 * cli/cli-cmds.h (cd_command): Constify.
5196 * cli/cli-cmds.c (cd_command): Constify.
5197
5198 2017-09-27 Tom Tromey <tom@tromey.com>
5199
5200 * thread.c (thread_name_command, thread_find_command): Constify.
5201
5202 2017-09-27 Tom Tromey <tom@tromey.com>
5203
5204 * probe.c (enable_probes_command, disable_probes_command):
5205 Constify.
5206
5207 2017-09-27 Tom Tromey <tom@tromey.com>
5208
5209 * symfile.c (symbol_file_command): Constify.
5210 * gdbcore.h (deprecated_file_changed_hook): Constify.
5211 * exec.c (deprecated_file_changed_hook, exec_file_command)
5212 (file_command): Constify.
5213 * defs.h (symbol_file_command): Constify.
5214
5215 2017-09-27 Tom Tromey <tom@tromey.com>
5216
5217 * remote-fileio.c (set_system_call_allowed)
5218 (show_system_call_allowed): Constify.
5219
5220 2017-09-27 Tom Tromey <tom@tromey.com>
5221
5222 * tracepoint.c (delete_trace_variable_command)
5223 (tfind_end_command, tfind_start_command, tfind_pc_command)
5224 (tfind_tracepoint_command, tfind_line_command)
5225 (tfind_range_command, tfind_outside_command): Constify.
5226
5227 2017-09-27 Tom Tromey <tom@tromey.com>
5228
5229 * ax-gdb.c (maint_agent_printf_command, agent_command)
5230 (agent_eval_command): Constify.
5231
5232 2017-09-27 Tom Tromey <tom@tromey.com>
5233
5234 * tracepoint.c (info_scope_command): Constify.
5235 * python/python.c (gdbpy_decode_line): Constify.
5236 * python/py-breakpoint.c (bppy_init): Constify.
5237 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5238 * location.h: (new_linespec_location)
5239 (string_to_event_location_basic, string_to_event_location):
5240 Constify.
5241 * location.c (new_linespec_location)
5242 (string_to_event_location_basic, string_to_event_location):
5243 Constify.
5244 * linespec.h (decode_line_with_current_source)
5245 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5246 * linespec.c (linespec_lex_to_end)
5247 (decode_line_with_current_source)
5248 (decode_line_with_last_displayed): Constify.
5249 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5250 Constify.
5251 * cli/cli-cmds.c (edit_command, list_command): Constify.
5252 * breakpoint.h (until_break_command, watch_command_wrapper)
5253 (awatch_command_wrapper, rwatch_command_wrapper)
5254 (init_ada_exception_breakpoint): Constify.
5255 * breakpoint.c (break_command_1, dprintf_command)
5256 (break_range_command, watch_command_wrapper)
5257 (rwatch_command_wrapper, awatch_command_wrapper)
5258 (until_break_command, init_ada_exception_breakpoint)
5259 (strace_marker_create_sals_from_location, trace_command)
5260 (ftrace_command, strace_command, struct tracepoint): Constify.
5261 * ax-gdb.c (agent_command_1): Constify.
5262 * ada-lang.c (ada_exception_sal): Constify.
5263
5264 2017-09-27 Tom Tromey <tom@tromey.com>
5265
5266 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5267 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5268 (get_context_size, no_chunk, get_insn_history_modifiers)
5269 (cmd_record_insn_history, get_call_history_modifiers)
5270 (cmd_record_call_history): Constify.
5271
5272 2017-09-27 Tom Tromey <tom@tromey.com>
5273
5274 * source.c (show_substitute_path_command)
5275 (unset_substitute_path_command, set_substitute_path_command):
5276 Constify.
5277
5278 2017-09-27 Tom Tromey <tom@tromey.com>
5279
5280 * typeprint.c (maintenance_print_type): Constify.
5281 * maint.c (maintenance_dump_me, maintenance_demangle)
5282 (maintenance_time_display, maintenance_info_sections)
5283 (maintenance_print_statistics, maintenance_deprecate)
5284 (maintenance_undeprecate): Constify.
5285 (maintenance_do_deprecate): Constify. Use std::string.
5286 (maintenance_selftest): Constify.
5287 * gdbtypes.h (maintenance_print_type): Constify.
5288
5289 2017-09-27 Tom Tromey <tom@tromey.com>
5290
5291 * hppa-tdep.c (unwind_command): Constify.
5292
5293 2017-09-27 Tom Tromey <tom@tromey.com>
5294
5295 * target-descriptions.c (unset_tdesc_filename_cmd)
5296 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5297 Constify.
5298
5299 2017-09-27 Tom Tromey <tom@tromey.com>
5300
5301 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5302
5303 2017-09-27 Tom Tromey <tom@tromey.com>
5304
5305 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5306
5307 2017-09-27 Tom Tromey <tom@tromey.com>
5308
5309 * tui/tui-regs.c (tui_reg_command): Constify.
5310
5311 2017-09-27 Tom Tromey <tom@tromey.com>
5312
5313 * skip.c (skip_file_command, skip_function_command)
5314 (skip_enable_command, skip_disable_command, skip_delete_command):
5315 Constify.
5316
5317 2017-09-27 Tom Tromey <tom@tromey.com>
5318
5319 * record-btrace.c (cmd_record_btrace_bts_start)
5320 (cmd_record_btrace_pt_start): Constify.
5321
5322 2017-09-27 Tom Tromey <tom@tromey.com>
5323
5324 * symmisc.c (maintenance_print_symbols)
5325 (maintenance_print_msymbols, maintenance_print_objfiles)
5326 (maintenance_info_symtabs, maintenance_check_symtabs)
5327 (maintenance_expand_symtabs, maintenance_info_line_tables):
5328 Constify.
5329
5330 2017-09-27 Tom Tromey <tom@tromey.com>
5331
5332 * top.c (new_ui_command): Constify.
5333
5334 2017-09-27 Tom Tromey <tom@tromey.com>
5335
5336 * symfile.c (add_symbol_file_command)
5337 (remove_symbol_file_command, list_overlays_command)
5338 (map_overlay_command, unmap_overlay_command)
5339 (overlay_auto_command, overlay_manual_command)
5340 (overlay_off_command, overlay_load_command): Constify.
5341
5342 2017-09-27 Tom Tromey <tom@tromey.com>
5343
5344 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5345 (info_spu_mailbox_command, info_spu_dma_command)
5346 (info_spu_proxydma_command): Constify.
5347
5348 2017-09-27 Tom Tromey <tom@tromey.com>
5349
5350 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5351
5352 2017-09-27 Tom Tromey <tom@tromey.com>
5353
5354 * cli/cli-script.c (user_defined_command): Constify.
5355
5356 2017-09-27 Tom Tromey <tom@tromey.com>
5357
5358 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5359 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5360 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5361 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5362 (dump_binary_value, append_binary_memory, append_binary_value):
5363 Constify.
5364 (struct dump_context) <func>: Constify.
5365 (add_dump_command): Update.
5366
5367 2017-09-27 Tom Tromey <tom@tromey.com>
5368
5369 * cli/cli-cmds.c (show_version, show_configuration)
5370 (source_command, show_user): Constify.
5371
5372 2017-09-27 Tom Tromey <tom@tromey.com>
5373
5374 * target.c (maintenance_print_target_stack): Constify.
5375
5376 2017-09-27 Tom Tromey <tom@tromey.com>
5377
5378 * interps.c (interpreter_exec_cmd): Constify.
5379
5380 2017-09-27 Tom Tromey <tom@tromey.com>
5381
5382 * record-full.c (cmd_record_full_restore): Constify.
5383
5384 2017-09-27 Tom Tromey <tom@tromey.com>
5385
5386 * memattr.c (enable_mem_command, disable_mem_command)
5387 (delete_mem_command): Constify.
5388
5389 2017-09-27 Tom Tromey <tom@tromey.com>
5390
5391 * value.c (show_convenience): Constify.
5392
5393 2017-09-27 Tom Tromey <tom@tromey.com>
5394
5395 * gdbcore.h (core_file_command): Update.
5396 * corefile.c (core_file_command): Constify.
5397
5398 2017-09-27 Tom Tromey <tom@tromey.com>
5399
5400 * user-regs.c (maintenance_print_user_registers): Constify.
5401
5402 2017-09-27 Tom Tromey <tom@tromey.com>
5403
5404 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5405
5406 2017-09-27 Tom Tromey <tom@tromey.com>
5407
5408 * cp-support.c (first_component_command): Constify.
5409
5410 2017-09-27 Tom Tromey <tom@tromey.com>
5411
5412 * psymtab.c (maintenance_print_psymbols)
5413 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5414 Constify.
5415
5416 2017-09-27 Tom Tromey <tom@tromey.com>
5417
5418 * windows-tdep.c (display_tib): Constify.
5419
5420 2017-09-27 Tom Tromey <tom@tromey.com>
5421
5422 * linux-fork.c (delete_checkpoint_command)
5423 (detach_checkpoint_command): Constify.
5424
5425 2017-09-27 Tom Tromey <tom@tromey.com>
5426
5427 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5428
5429 2017-09-27 Tom Tromey <tom@tromey.com>
5430
5431 * arc-tdep.c (dump_arc_instruction_command): Constify.
5432
5433 2017-09-27 Tom Tromey <tom@tromey.com>
5434
5435 * valprint.c (set_radix, show_radix): Constify.
5436
5437 2017-09-27 Tom Tromey <tom@tromey.com>
5438
5439 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5440
5441 2017-09-27 Tom Tromey <tom@tromey.com>
5442
5443 * command.h (not_just_help_class_command): Update.
5444 * cli/cli-decode.h (not_just_help_class_command): Update.
5445 * cli/cli-decode.c (not_just_help_class_command): Constify.
5446
5447 2017-09-27 Tom Tromey <tom@tromey.com>
5448
5449 * gdb_bfd.c (maintenance_info_bfds): Constify.
5450
5451 2017-09-27 Tom Tromey <tom@tromey.com>
5452
5453 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5454 overloads.
5455 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5456 (do_const_cfunc): New function.
5457 (cmd_cfunc_eq): New overload.
5458 (cli_user_command_p): Check do_const_cfunc.
5459 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5460 const_cfunc.
5461 * command.h (add_cmd): Add const overload and no-function
5462 overload.
5463 (set_cmd_cfunc): Add const overload.
5464 (cmd_const_cfunc_ftype): Declare.
5465 (cmd_cfunc_eq): Add const overload.
5466 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5467 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5468 overload.
5469
5470 2017-09-27 Tom Tromey <tom@tromey.com>
5471
5472 * macroexp.c (get_next_token_for_substitution): New function.
5473 (substitute_args): Call it. Check for __VA_OPT__.
5474
5475 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5476 Pedro Alves <palves@redhat.com>
5477
5478 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5479 producer_is_icc_lt_14.
5480 (producer_is_icc_lt_14): New function.
5481 (check_producer): Add code for checking version of ICC.
5482 (producer_is_icc): Move to producer.c.
5483 (read_structure_type): Restrict ICC workaround to ICC<14.
5484 * producer.c: Include selftest.h.
5485 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5486 New functions.
5487 * producer.h (producer_is_icc): New declaration.
5488
5489 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5490
5491 * Makefile.in (SFILES): Add producer.c.
5492 (COMMON_OBS): Add producer.o
5493 * amd64-tdep.c (producer.h): Add new include.
5494 * dwarf2read.c (producer.h): Add new include.
5495 * producer.c: New file.
5496 * producer.h: New file.
5497 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5498 producer.c.
5499 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5500 producer.h.
5501
5502 2017-09-26 Matthias Klose <doko@ubuntu.com>
5503
5504 * configure.ac: Search ncursesw before ncurses.
5505 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5506 * gdb_curses.h: Include <ncursesw/ncurses.h>
5507 * config.in, configure: Regenerate.
5508
5509 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5510
5511 PR gdb/22185
5512 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5513 obsolete.
5514 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5515 Remove i386sol2 support.
5516 * configure.nat <i386sol2>: Remove.
5517 <sol2-64>: Fold into ...
5518 <sol2>: ... this.
5519 Move common settings to default section.
5520 Add sol-thread.o.
5521 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5522 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5523 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5524 <i[34567]86-*-solaris*>: Remove.
5525 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5526
5527 * configure.ac: Remove wctype in libw check.
5528 (_MSE_INT_H): Don't define on Solaris 7-9.
5529 <solaris*>: Remove libthread_db.so.1 check.
5530 * configure: Regenerate.
5531 * config.in: Regenerate.
5532
5533 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5534 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5535 (gdb_ps_size_t): Remove.
5536 Use base types in users.
5537 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5538
5539 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5540
5541 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5542
5543 PR build/22206
5544 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5545 (adi_is_addr_mapped): Likewise.
5546 (PSR_ICC): Don't redefine.
5547 (PSR_IMPL): Likewise.
5548
5549 2017-09-25 Tom Tromey <tom@tromey.com>
5550
5551 * regcache.c (regcache::dump): Use string_printf.
5552
5553 2017-09-25 Tom Tromey <tom@tromey.com>
5554
5555 * regcache.c (class regcache_invalidator): New.
5556 (struct register_to_invalidate): Remove.
5557 (make_cleanup_regcache_invalidate): Remove.
5558 (regcache::raw_write): Use regcache_invalidator.
5559
5560 2017-09-25 Tom Tromey <tom@tromey.com>
5561
5562 * spu-tdep.c (spu2ppu_sniffer): Update.
5563 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5564 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5565 Remove.
5566 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5567 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5568 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5569 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5570 (frame_pop): Update.
5571
5572 2017-09-25 Tom Tromey <tom@tromey.com>
5573
5574 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5575 * regcache.h (regcache_xfree): Don't declare.
5576 * regcache.c (regcache_xfree): Remove.
5577 (do_regcache_xfree): Use delete.
5578 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5579 * linux-fork.c (free_fork): Use delete.
5580 (fork_save_infrun_state): Likewise.
5581 * jit.c (jit_dealloc_cache): Use delete.
5582 * infrun.c (discard_infcall_suspend_state): Use delete.
5583
5584 2017-09-25 Tom Tromey <tom@tromey.com>
5585
5586 * regcache.h (regcache_xmalloc): Don't declare.
5587 (regcache_raw_set_cached_value): Update comment.
5588 * regcache.c (regcache_xmalloc): Remove.
5589 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5590 * jit.c (jit_frame_sniffer): Use new.
5591 * frame.c (frame_save_as_regcache): Use new.
5592
5593 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5594
5595 * NEWS: Advertise support for guarded-storage registers on IBM z.
5596
5597 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5598
5599 * s390-linux-nat.c (have_regset_gs): New static variable.
5600 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5601 control block and guarded-storage broadcast control regsets.
5602 (s390_read_description): Detect whether the target has
5603 guarded-storage support, return appropriate tdesc.
5604 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5605 (features/s390x-gs-linux64.c): Likewise.
5606 (struct gdbarch_tdep) <have_gs>: New field.
5607 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5608 (s390_gsbc_regset): New variables.
5609 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5610 and s390_gsbc_regset, if applicable.
5611 (s390_core_read_description): Check whether core file was from a
5612 target with guarded-storage support; include appropriate regsets.
5613 (s390_gdbarch_init): Add registers for guarded-storage support.
5614 (_initialize_s390_tdep): Initialize new target descriptions that
5615 include registers for guarded-storage support.
5616 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5617 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5618 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5619 (S390_NUM_REGS): Adjust macro definition.
5620 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5621 (tdesc_s390x_gs_linux64): New declarations.
5622
5623 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5624
5625 * features/s390-gs-linux64.xml: New file.
5626 * features/s390-gs.xml: New file.
5627 * features/s390-gsbc.xml: New file.
5628 * features/s390x-gs-linux64.xml: New file.
5629 * features/Makefile (WHICH): Add s390-gs-linux64 and
5630 s390x-gs-linux64.
5631 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5632 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5633 * features/s390-gs-linux64.c: New generated file.
5634 * features/s390x-gs-linux64.c: New file.
5635 * regformats/s390-gs-linux64.dat: New file.
5636 * regformats/s390x-gs-linux64.dat: New file.
5637
5638 2017-09-23 Tom Tromey <tom@tromey.com>
5639
5640 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5641
5642 2017-09-22 Tom Tromey <tom@tromey.com>
5643
5644 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5645 type to scoped_restore_tmpl.
5646 <scoped_input_handler>: Initialize m_quit_handler directly.
5647
5648 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5649
5650 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5651 (cd_command): Likewise. Free "current_directory" before
5652 assigning to it.
5653 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5654 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5655 * top.c (gdb_dirbuf): Remove global declaration.
5656 * top.h (gdb_dirbuf): Likewise.
5657
5658 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5659
5660 * gnulib/aclocal.m4: Regenerate.
5661 * gnulib/config.in: Regenerate.
5662 * gnulib/configure: Regenerate.
5663 * gnulib/import/Makefile.am: Regenerate.
5664 * gnulib/import/Makefile.in: Regenerate.
5665 * gnulib/import/assure.h: New file.
5666 * gnulib/import/at-func.c: Likewise
5667 * gnulib/import/chdir-long.c: New file.
5668 * gnulib/import/chdir-long.h: New file.
5669 * gnulib/import/cloexec.c: New file.
5670 * gnulib/import/cloexec.h: New file.
5671 * gnulib/import/close.c: New file.
5672 * gnulib/import/closedir.c: New file.
5673 * gnulib/import/dirent-private.h: New file.
5674 * gnulib/import/dup-safer.c: New file.
5675 * gnulib/import/dup.c: New file.
5676 * gnulib/import/dup2.c: New file.
5677 * gnulib/import/error.c: New file.
5678 * gnulib/import/error.h: New file.
5679 * gnulib/import/exitfail.c: New file.
5680 * gnulib/import/exitfail.h: New file.
5681 * gnulib/import/fchdir.c: New file.
5682 * gnulib/import/fcntl.c: New file.
5683 * gnulib/import/fcntl.in.h: New file.
5684 * gnulib/import/fd-hook.c: New file.
5685 * gnulib/import/fd-hook.h: New file.
5686 * gnulib/import/fd-safer.c: New file.
5687 * gnulib/import/fdopendir.c: New file.
5688 * gnulib/import/filename.h: New file.
5689 * gnulib/import/filenamecat-lgpl.c: New file.
5690 * gnulib/import/filenamecat.h: New file.
5691 * gnulib/import/fstat.c: New file.
5692 * gnulib/import/fstatat.c: New file.
5693 * gnulib/import/getcwd-lgpl.c: New file.
5694 * gnulib/import/getcwd.c: New file.
5695 * gnulib/import/getdtablesize.c: New file.
5696 * gnulib/import/getlogin_r.c: New file.
5697 * gnulib/import/getprogname.c: New file.
5698 * gnulib/import/getprogname.h: New file.
5699 * gnulib/import/gettext.h: New file.
5700 * gnulib/import/glob-libc.h: New file.
5701 * gnulib/import/glob.c: New file.
5702 * gnulib/import/glob.in.h: New file.
5703 * gnulib/import/intprops.h: New file.
5704 * gnulib/import/m4/chdir-long.m4: New file.
5705 * gnulib/import/m4/close.m4: New file.
5706 * gnulib/import/m4/closedir.m4: New file.
5707 * gnulib/import/m4/d-ino.m4: New file.
5708 * gnulib/import/m4/d-type.m4: New file.
5709 * gnulib/import/m4/dup.m4: New file.
5710 * gnulib/import/m4/dup2.m4: New file.
5711 * gnulib/import/m4/error.m4: New file.
5712 * gnulib/import/m4/fchdir.m4: New file.
5713 * gnulib/import/m4/fcntl.m4: New file.
5714 * gnulib/import/m4/fcntl_h.m4: New file.
5715 * gnulib/import/m4/fdopendir.m4: New file.
5716 * gnulib/import/m4/filenamecat.m4: New file.
5717 * gnulib/import/m4/fstat.m4: New file.
5718 * gnulib/import/m4/fstatat.m4: New file.
5719 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5720 * gnulib/import/m4/getcwd-path-max.m4: New file.
5721 * gnulib/import/m4/getcwd.m4: New file.
5722 * gnulib/import/m4/getdtablesize.m4: New file.
5723 * gnulib/import/m4/getlogin_r.m4: New file.
5724 * gnulib/import/m4/getprogname.m4: New file.
5725 * gnulib/import/m4/glob.m4: New file.
5726 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5727 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5728 * gnulib/import/m4/mempcpy.m4: New file.
5729 * gnulib/import/m4/memrchr.m4: New file.
5730 * gnulib/import/m4/mode_t.m4: New file.
5731 * gnulib/import/m4/msvc-inval.m4: New file.
5732 * gnulib/import/m4/msvc-nothrow.m4: New file.
5733 * gnulib/import/m4/open.m4: New file.
5734 * gnulib/import/m4/openat.m4: New file.
5735 * gnulib/import/m4/opendir.m4: New file.
5736 * gnulib/import/m4/readdir.m4: New file.
5737 * gnulib/import/m4/realloc.m4: New file.
5738 * gnulib/import/m4/rewinddir.m4: New file.
5739 * gnulib/import/m4/save-cwd.m4: New file.
5740 * gnulib/import/m4/strdup.m4: New file.
5741 * gnulib/import/m4/strerror.m4: New file.
5742 * gnulib/import/m4/unistd-safer.m4: New file.
5743 * gnulib/import/mempcpy.c: New file.
5744 * gnulib/import/memrchr.c: New file.
5745 * gnulib/import/msvc-inval.c: New file.
5746 * gnulib/import/msvc-inval.h: New file.
5747 * gnulib/import/msvc-nothrow.c: New file.
5748 * gnulib/import/msvc-nothrow.h: New file.
5749 * gnulib/import/open.c: New file.
5750 * gnulib/import/openat-die.c: New file.
5751 * gnulib/import/openat-priv.h: New file.
5752 * gnulib/import/openat-proc.c: New file.
5753 * gnulib/import/openat.c: New file.
5754 * gnulib/import/openat.h: New file.
5755 * gnulib/import/opendir.c: New file.
5756 * gnulib/import/pipe-safer.c: New file.
5757 * gnulib/import/readdir.c: New file.
5758 * gnulib/import/realloc.c: New file.
5759 * gnulib/import/rewinddir.c: New file.
5760 * gnulib/import/save-cwd.c: New file.
5761 * gnulib/import/save-cwd.h: New file.
5762 * gnulib/import/strdup.c: New file.
5763 * gnulib/import/strerror-override.c: New file.
5764 * gnulib/import/strerror-override.h: New file.
5765 * gnulib/import/strerror.c: New file.
5766 * gnulib/import/unistd--.h: New file.
5767 * gnulib/import/unistd-safer.h: New file.
5768 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5769 "getcwd" and "glob".
5770 * ser-tcp.c: Undefine "close" before redefining it.
5771
5772 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5773
5774 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5775 get rid of res_val.
5776
5777 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5778
5779 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5780 <sol2,sparc>: Likewise.
5781 <sol2-64,i386>: Likewise.
5782
5783 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5784 -Wdeprecated-declarations on *-*-solaris*.
5785 * configure: Regenerate.
5786
5787 * procfs.c: Include "nat/inferior.h".
5788 (procfs_info_proc): Fix typo.
5789
5790 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5791
5792 * remote.c (vector): Include.
5793 (struct private_thread_info): Add field, thread_handle.
5794 (free_private_thread_info): Deallocate storage associated with
5795 thread handle.
5796 (get_private_info_thread): Initialize `thread_handle' field.
5797 (struct thread_item): Add field, thread_handle.
5798 (clear_threads_listing_context): Deallocate storage associated
5799 with thread handle.
5800 (start_thread): Add support for "handle" attribute.
5801 (thread_attributes): Add "handle".
5802 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5803 field.
5804 (remote_update_thread_list): Update thread_handle.
5805 (remote_thread_handle_to_thread_info): New function.
5806 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5807
5808 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5809
5810 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5811 function.
5812 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5813 * python/python-internal.h (thread_object_type): Declare.
5814
5815 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5816
5817 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5818 (target_thread_handle_to_thread_info): Declare.
5819 * target.c (target_thread_handle_to_thread_info): New function.
5820 * target-delegates.c: Regenerate.
5821 * gdbthread.h (find_thread_by_handle): Declare.
5822 * thread.c (find_thread_by_handle): New function.
5823 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5824 function.
5825 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5826
5827 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5828
5829 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5830
5831 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5832
5833 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5834
5835 2017-09-21 Yao Qi <yao.qi@linaro.org>
5836
5837 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5838 to gdb_target_obs.
5839
5840 2017-09-20 Tom Tromey <tom@tromey.com>
5841
5842 * breakpoint.c (struct counted_command_line): Remove.
5843 (breakpoint_commands): Update.
5844 (alloc_counted_command_line, incref_counted_command_line)
5845 (decref_counted_command_line, do_cleanup_counted_command_line)
5846 (make_cleanup_decref_counted_command_line): Remove.
5847 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5848 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5849 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5850 (save_breakpoints): Update.
5851 * breakpoint.h (counted_command_line): Now a typedef to
5852 shared_ptr.
5853 (struct breakpoint) <commands>: Now a counted_command_line.
5854 (struct bpstats) <command>: Likewise.
5855
5856 2017-09-20 Tom Tromey <tom@tromey.com>
5857
5858 * breakpoint.c (struct commands_info, do_map_commands_command):
5859 Remove.
5860 (commands_command_1): Update.
5861 (iterate_over_related_breakpoints): Take a function_view.
5862 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5863 (delete_command): Update.
5864 (map_breakpoint_numbers): Take a function_view.
5865 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5866 (disable_command): Update.
5867 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5868 (enable_command): Update.
5869 (struct disp_data, do_enable_breakpoint_disp)
5870 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5871 (do_map_enable_delete_breakpoint): Remove.
5872 (enable_once_command, enable_count_command, enable_delete_command)
5873 (delete_trace_variable_command): Update.
5874
5875 2017-09-20 Tom Tromey <tom@tromey.com>
5876
5877 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5878 (bpstat_clear): Use delete.
5879 (bpstats): New constructors.
5880 (bpstat_copy, bpstat_stop_status): Use new.
5881 (dprintf_after_condition_true): Update.
5882 * breakpoint.h (bpstats::bpstats): Add constructors.
5883 (bpstats::~bpstats): Add destructor.
5884
5885 2017-09-20 Pedro Alves <palves@redhat.com>
5886
5887 * eval.c (make_params): Delete, refactored as ...
5888 (class fake_method): ... this new type's ctor.
5889 (fake_method::~fake_method): New.
5890 (evaluate_subexp_standard): Use 'fake_method'.
5891
5892 2017-09-20 Tom Tromey <tom@tromey.com>
5893
5894 * windows-nat.c (get_windows_debug_event, windows_wait)
5895 (do_initial_windows_stuff, windows_attach): Update.
5896 * utils.c (vwarning, internal_vproblem): Update.
5897 (ui_unregister_input_event_handler_cleanup)
5898 (prepare_to_handle_input): Remove.
5899 (class scoped_input_handler): New.
5900 (defaulted_query, prompt_for_continue): Update.
5901 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5902 Update.
5903 * top.c (undo_terminal_modifications_before_exit): Update.
5904 * target/target.h (target_terminal_init, target_terminal_inferior)
5905 (target_terminal_ours): Don't declare.
5906 (class target_terminal): New.
5907 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5908 (target_terminal_ours_for_output)
5909 (make_cleanup_restore_target_terminal): Don't declare.
5910 (target_terminal_info): Remove.
5911 * target.c (enum terminal_state, terminal_state): Remove.
5912 (target_terminal::terminal_state): Define.
5913 (target_terminal::init): Rename from target_terminal_init.
5914 (target_terminal::inferior): Rename from
5915 target_terminal_inferior.
5916 (target_terminal::ours): Rename from target_terminal_ours.
5917 (target_terminal::ours_for_output): Rename from
5918 target_terminal_ours_for_output.
5919 (target_terminal::info): New method.
5920 (cleanup_restore_target_terminal)
5921 (make_cleanup_restore_target_terminal): Remove.
5922 * solib.c (handle_solib_event): Update.
5923 * remote.c (remote_serial_quit_handler): Update.
5924 (remote_terminal_inferior, remote_wait_as): Update.
5925 * record-full.c (record_full_wait_1): Update.
5926 * nto-procfs.c (procfs_create_inferior): Update.
5927 * nat/fork-inferior.c (startup_inferior): Update.
5928 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5929 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5930 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5931 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5932 (mi_breakpoint_created, mi_breakpoint_deleted)
5933 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5934 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5935 (mi_user_selected_context_changed, report_initial_inferior):
5936 Update.
5937 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5938 (linux_nat_terminal_inferior): Update.
5939 * infrun.c (follow_fork_inferior)
5940 (handle_vfork_child_exec_or_exit, do_target_resume)
5941 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5942 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5943 Update.
5944 * inflow.c (child_terminal_init, info_terminal_command): Update.
5945 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5946 (attach_command): Update.
5947 * infcall.c (call_thread_fsm_should_stop): Update.
5948 * gnu-nat.c (gnu_attach): Update.
5949 * extension.c (struct active_ext_lang_state)
5950 (restore_active_ext_lang): Update.
5951 * exceptions.c (print_flush): Update.
5952 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5953 (struct quit_handler_cleanup_data, restore_quit_handler)
5954 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5955 Remove.
5956 * cp-support.c (gdb_demangle): Update.
5957 * breakpoint.c (update_inserted_breakpoint_locations)
5958 (insert_breakpoint_locations, handle_jit_event)
5959 (disable_breakpoints_in_unloaded_shlib): Update.
5960 * annotate.c (annotate_breakpoints_invalid)
5961 (annotate_frames_invalid): Update.
5962
5963 2017-09-20 Tom Tromey <tom@tromey.com>
5964
5965 * main.c (catch_command_errors): Rename from
5966 catch_command_errors_const.
5967 (captured_main_1): Update.
5968
5969 2017-09-20 Pedro Alves <palves@redhat.com>
5970
5971 * cli/cli-cmds.c (list_command): Use print_sal_location.
5972 (print_sal_location): New function.
5973 (ambiguous_line_spec): Use print_sal_location.
5974 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5975 * symtab.c (find_function_start_sal): Likewise.
5976 * symtab.h (symtab_and_line::symbol): New field.
5977
5978 2017-09-20 Pedro Alves <palves@redhat.com>
5979
5980 * linespec.c (minsym_found): Handle non-text minsyms.
5981 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5982
5983 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5984
5985 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5986 backslash.
5987
5988 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5989
5990 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5991 vmovups instead vmovaps.
5992 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5993
5994 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5995
5996 * NEWS (Changes since GDB 8.0): Add starti.
5997 * infcmd.c (enum run_break): New.
5998 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5999 case.
6000 (run_command): Use enum run_how.
6001 (start_command): Likewise.
6002 (starti_command): New function.
6003 (RUN_ARGS_HELP): New macro.
6004 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6005 commands. Add starti command.
6006
6007 2017-09-19 Yao Qi <yao.qi@linaro.org>
6008
6009 * Makefile.in (monitor.o): Remove the rule.
6010
6011 2017-09-19 Yao Qi <yao.qi@linaro.org>
6012
6013 * annotate.h (struct annotate_arg_emitter): Use
6014 DISABLE_COPY_AND_ASSIGN.
6015 * common/refcounted-object.h (refcounted_object): Likewise.
6016 * completer.h (struct completion_result): Likewise.
6017 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6018 * filename-seen-cache.h (filename_seen_cache): Likewise.
6019 * gdbcore.h (thread_section_name): Likewise.
6020 * gdb_regex.h (compiled_regex): Likewise.
6021 * gdbthread.h (scoped_restore_current_thread): Likewise.
6022 * inferior.h (scoped_restore_current_inferior): Likewise.
6023 * jit.c (jit_reader): Likewise.
6024 * linespec.h (struct linespec_result): Likewise.
6025 * mi/mi-parse.h (struct mi_parse): Likewise.
6026 * nat/fork-inferior.c (execv_argv): Likewise.
6027 * progspace.h (scoped_restore_current_program_space): Likewise.
6028 * python/python-internal.h (class gdbpy_enter): Likewise.
6029 * regcache.h (regcache): Likewise.
6030 * target-descriptions.c (struct tdesc_reg): Likewise.
6031 (struct tdesc_type): Likewise.
6032 (struct tdesc_feature): Likewise.
6033 * ui-out.h (ui_out_emit_type): Likewise.
6034
6035 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6036
6037 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6038 label abort_expression.
6039
6040 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6041
6042 * common/buffer.c (buffer_xml_printf): Adjust.
6043 * common/xml-utils.c (xml_escape_text): Change return type to
6044 std::string, update code accordingly.
6045 * common/xml-utils.h (xml_escape_text): Change return type to
6046 std::string.
6047 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6048 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6049 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6050 Adjust.
6051
6052 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6053
6054 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6055 (SUBDIR_UNITTESTS_OBS): Add new object file.
6056 * unittests/xml-utils-selftests.c: New file.
6057
6058 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6059
6060 * common/selftest.h (selftest): New struct/interface.
6061 (register_test): Add name parameter, add new overload.
6062 (run_tests): Add filter parameter.
6063 (for_each_selftest_ftype): New typedef.
6064 (for_each_selftest): New declaration.
6065 * common/selftest.c (tests): Change type to
6066 map<string, unique_ptr<selftest>>.
6067 (simple_selftest): New struct.
6068 (register_test): New function.
6069 (register_test): Add name parameter and use it.
6070 (run_tests): Add filter parameter and use it. Add prints.
6071 Adjust to vector -> map change.
6072 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6073 registering selftests.
6074 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6075 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6076 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6077 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6078 * findvar.c (_initialize_findvar): Likewise.
6079 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6080 * maint.c (maintenance_selftest): Update call to run_tests.
6081 (maintenance_info_selftests): New function.
6082 (_initialize_maint_cmds): Register "maintenance info selftests"
6083 command. Update "maintenance selftest" doc.
6084 * regcache.c (_initialize_regcache): Add names when registering
6085 selftests.
6086 * rust-exp.y (_initialize_rust_exp): Likewise.
6087 * selftest-arch.c (gdbarch_selftest): New struct.
6088 (gdbarch_tests): Remove.
6089 (register_test_foreach_arch): Add name parameter. Call
6090 register_test.
6091 (tests_with_arch): Remove, move most content to
6092 gdbarch_selftest::operator().
6093 (_initialize_selftests_foreach_arch): Remove.
6094 * selftest-arch.h (register_test_foreach_arch): Add name
6095 parameter.
6096 (run_tests_with_arch): New declaration.
6097 * utils-selftests.c (_initialize_utils_selftests): Add names
6098 when registering selftests.
6099 * utils.c (_initialize_utils): Likewise.
6100 * unittests/array-view-selftests.c
6101 (_initialize_array_view_selftests): Likewise.
6102 * unittests/environ-selftests.c (_initialize_environ_selftests):
6103 Likewise.
6104 * unittests/function-view-selftests.c
6105 (_initialize_function_view_selftests): Likewise.
6106 * unittests/offset-type-selftests.c
6107 (_initialize_offset_type_selftests): Likewise.
6108 * unittests/optional-selftests.c
6109 (_initialize_optional_selftests): Likewise.
6110 * unittests/scoped_restore-selftests.c
6111 (_initialize_scoped_restore_selftests): Likewise.
6112 * NEWS: Document "maintenance selftest" and "maint info
6113 selftests".
6114
6115 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6116
6117 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6118 scoped_restore.
6119
6120 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6121
6122 * mi/mi-main.c (mi_load_progress): Make uiout variable
6123 a unique_ptr.
6124
6125 2017-09-15 Pedro Alves <palves@redhat.com>
6126
6127 * compile/compile-c-types.c (convert_enum, convert_int)
6128 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6129
6130 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6131
6132 * dwarf2read.c (copy_string): Remove.
6133 (parse_macro_definition): Replace copy_string with savestring.
6134
6135 2017-09-15 Yao Qi <yao.qi@linaro.org>
6136
6137 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6138 gdb_target_obs.
6139 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6140 Likewise.
6141 (i[34567]86-*-linux*): Likewise.
6142
6143 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6144
6145 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6146 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6147 <stack>: Change type to std::vector.
6148 <stack_len, stack_allocated>: Remove.
6149 <grow_stack>: Remove.
6150 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6151 (dwarf_expr_context::~dwarf_expr_context): Remove.
6152 (dwarf_expr_context::grow_stack): Remove.
6153 (dwarf_expr_context::push): Adjust.
6154 (dwarf_expr_context::pop): Adjust.
6155 (dwarf_expr_context::fetch): Adjust.
6156 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6157 (dwarf_expr_context::stack_empty_p): Adjust.
6158 (dwarf_expr_context::execute_stack_op): Adjust.
6159
6160 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6161
6162 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6163 return type to bool.
6164 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6165
6166 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6167
6168 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6169 Change type to bool.
6170 (dwarf_stack_value) <in_stack_memory>: Likewise.
6171 (dwarf_expr_context) <push_address>: Change parameter type to
6172 bool.
6173 <fetch_in_stack_memory>: Change return type to bool.
6174 <push>: Change parameter type to bool.
6175 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6176 to bool.
6177 (dwarf_expr_context::push_address): Likewise.
6178 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6179 to bool.
6180 (dwarf_expr_context::execute_stack_op): Adjust.
6181 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6182
6183 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6184
6185 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6186 (struct dwarf_expr_context) <n_pieces>: Remove.
6187 <pieces>: Change type to std::vector.
6188 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6189 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6190 pieces.
6191 (dwarf_expr_context::add_piece): Adjust.
6192 * dwarf2loc.c (struct piece_closure): Initialize fields.
6193 <n_pieces>: Remove.
6194 <pieces>: Change type to std::vector.
6195 (allocate_piece_closure): Adjust, change parameter to
6196 std::vector rvalue and std::move it to piece_closure.
6197 (rw_pieced_value): Adjust.
6198 (check_pieced_synthetic_pointer): Adjust.
6199 (indirect_synthetic_pointer): Adjust.
6200 (coerce_pieced_ref): Adjust.
6201 (free_pieced_value_closure): Adjust. Use delete to free
6202 piece_closure.
6203 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6204 to allocate_piece_closure.
6205 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6206
6207 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6208
6209 * probe.h (probe_ops_cp): Remove typedef.
6210 (DEF_VEC_P (probe_ops_cp)): Remove.
6211 (all_probe_ops): Change type to std::vector.
6212 * probe.c (info_probes_for_ops): Adjust to vector change.
6213 (probe_linespec_to_ops): Likewise.
6214 (all_probe_ops): Change type to std::vector.
6215 (_initialize_probe): Adjust to vector change.
6216 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6217 * elfread.c (elf_get_probes): Likewise.
6218 * stap-probe.c (_initialize_stap_probe): Likewise.
6219
6220 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6221
6222 * probe.h (struct bound_probe): Define constructors.
6223 * probe.c (bound_probe_s): Remove typedef.
6224 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6225 (collect_probes): Change return type to std::vector, remove
6226 cleanup.
6227 (compare_probes): Return bool, change parameter type. Change
6228 semantic to "less than".
6229 (gen_ui_out_table_header_info): Change parameter to std::vector
6230 and update.
6231 (exists_probe_with_pops): Likewise.
6232 (info_probes_for_ops): Update to std::vector change.
6233 (enable_probes_command): Likewise.
6234 (disable_probes_command): Likewise.
6235
6236 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6237
6238 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6239 vec to std::vector.
6240 * probe.c (parse_probes_in_pspace): Update.
6241 (find_probes_in_objfile): Update.
6242 (find_probe_by_pc): Update.
6243 (collect_probes): Update.
6244 (probe_any_get_probes): Update.
6245 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6246 return type to reference to std::vector.
6247 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6248 std::vector and update.
6249 (dtrace_process_dof): Likewise.
6250 (dtrace_get_probes): Likewise.
6251 * elfread.c (elf_get_probes): Change return type to std::vector,
6252 store an std::vector in bfd_data.
6253 (probe_key_free): Update to std::vector.
6254 * stap-probe.c (handle_stap_probe): Change parameter to
6255 std::vector and update.
6256 (stap_get_probes): Likewise.
6257 * symfile-debug.c (debug_sym_get_probes): Change return type to
6258 std::vector and update.
6259
6260 2017-09-11 Tom Tromey <tom@tromey.com>
6261
6262 * breakpoint.c (program_breakpoint_here_p): Update.
6263 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6264 from make_show_memory_breakpoints_cleanup. Return a
6265 scoped_restore_tmpl<int>.
6266 (restore_show_memory_breakpoints): Remove.
6267 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6268 * mem-break.c (memory_validate_breakpoint): Update.
6269 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6270 (ia64_memory_remove_breakpoint): Update.
6271 (ia64_breakpoint_from_pc): Update.
6272 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6273 from make_show_memory_breakpoints_cleanup.
6274
6275 2017-09-11 Tom Tromey <tom@tromey.com>
6276
6277 * d-namespace.c (d_lookup_symbol): Use std::string.
6278 (find_symbol_in_baseclass): Likewise.
6279
6280 2017-09-11 Tom Tromey <tom@tromey.com>
6281
6282 * ctf.c (ctf_start): Use std::string.
6283
6284 2017-09-11 Tom Tromey <tom@tromey.com>
6285
6286 * ada-lang.c (is_known_support_routine): Update.
6287 (ada_unhandled_exception_name_addr_from_raise): Update.
6288 * guile/scm-frame.c (gdbscm_frame_name): Update.
6289 * python/py-frame.c (frapy_name): Update.
6290 (frapy_function): Update.
6291 * stack.h (find_frame_funname): Update.
6292 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6293 (print_frame): Update.
6294
6295 2017-09-11 Tom Tromey <tom@tromey.com>
6296
6297 * findcmd.c (put_bits): Take a gdb::byte_vector.
6298 (parse_find_args): Return gdb::byte_vector. "args" now const.
6299 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6300 cleanups.
6301 (find_command): Update.
6302
6303 2017-09-11 Tom Tromey <tom@tromey.com>
6304
6305 * cli/cli-script.c (class scoped_restore_hook_in): New.
6306 (clear_hook_in_cleanup): Remove.
6307 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6308 scoped_restore_hook_in.
6309
6310 2017-09-11 Tom Tromey <tom@tromey.com>
6311
6312 * cli/cli-script.c (restore_interp): Remove.
6313 (read_command_lines): Use scoped_restore_interp.
6314 * interps.c (scoped_restore_interp::set_temp): Rename from
6315 interp_set_temp.
6316 * interps.h (class scoped_restore_interp): New.
6317 (interp_set_temp): Remove.
6318
6319 2017-09-11 Tom Tromey <tom@tromey.com>
6320
6321 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6322 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6323 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6324 scoped_restore.
6325 (mi_cmd_break_insert_1): Update.
6326 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6327 scoped_restore.
6328
6329 2017-09-11 Tom Tromey <tom@tromey.com>
6330
6331 * demangle.c (demangle_command): Update.
6332 * breakpoint.c (disable_command): Update.
6333 (enable_command): Update.
6334 (find_location_by_number): Make "number" const. Use
6335 get_number_trailer.
6336 * cli/cli-utils.c (extract_arg): Return std::string.
6337 * probe.c (parse_probe_linespec): Update. Change types.
6338 (collect_probes): Take string arguments.
6339 (parse_probe_linespec): Likewise.
6340 (info_probes_for_ops): Update.
6341 (enable_probes_command): Update.
6342 (disable_probes_command): Update.
6343 * break-catch-sig.c (catch_signal_split_args): Update.
6344 * mi/mi-parse.c (mi_parse): Update.
6345
6346 2017-09-11 Tom Tromey <tom@tromey.com>
6347
6348 * language.h (language_enum): Make argument const.
6349 * language.c (language_enum): Make argument const.
6350
6351 2017-09-11 Tom Tromey <tom@tromey.com>
6352
6353 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6354 as function.
6355 (skip_to_space): Rename from skip_to_space_const.
6356 * common/common-utils.c (skip_to_space): New function.
6357 (skip_to_space): Rename from skip_to_space_const.
6358 * cli/cli-utils.h (get_number): Rename from get_number_const.
6359 (extract_arg): Rename from extract_arg_const.
6360 * cli/cli-utils.c (get_number): Rename from get_number_const.
6361 (extract_arg): Rename from extract_arg_const.
6362 (number_or_range_parser::get_number): Use ::get_number.
6363 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6364 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6365 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6366 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6367 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6368 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6369 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6370 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6371
6372 2017-09-11 Tom Tromey <tom@tromey.com>
6373
6374 * python/python.c (do_start_initialization): Use
6375 py-event-types.def to initialize types.
6376 Define all object type structures.
6377 * python/python-internal.h: Don't declare event initialization
6378 functions.
6379 * python/py-threadevent.c (thread_event_object_type): Don't
6380 define.
6381 * python/py-stopevent.c (stop_event_object_type): Don't define.
6382 * python/py-signalevent.c (signal_event_object_type): Don't
6383 declare or define.
6384 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6385 (clear_objfiles_event_object_type): Don't declare or define.
6386 * python/py-infevents.c (inferior_call_pre_event_object_type)
6387 (inferior_call_post_event_object_type)
6388 (register_changed_event_object_type)
6389 (memory_changed_event_object_type): Don't declare or define.
6390 * python/py-inferior.c (new_thread_event_object_type)
6391 (new_inferior_event_object_type)
6392 (inferior_deleted_event_object_type): Don't declare or define.
6393 * python/py-exitedevent.c (exited_event_object_type): Don't
6394 declare or define.
6395 * python/py-evts.c (gdbpy_initialize_py_events): Use
6396 py-all-events.def.
6397 * python/py-events.h (thread_event_object_type): Don't declare.
6398 (events_object): Use py-all-events.def.
6399 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6400 py-event-types.def.
6401 * python/py-event-types.def: New file.
6402 * python/py-continueevent.c (create_continue_event_object): Don't
6403 declare or define.
6404 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6405 declare or define.
6406 * python/py-all-events.def: New file.
6407
6408 2017-09-11 Tom Tromey <tom@tromey.com>
6409
6410 * python/py-threadevent.c (create_thread_event_object): Return
6411 gdbpy_ref.
6412 * python/py-stopevent.h (create_stop_event_object)
6413 (create_breakpoint_event_object, create_signal_event_object):
6414 Update.
6415 * python/py-stopevent.c (create_stop_event_object): Return
6416 gdbpy_ref.
6417 (emit_stop_event): Update.
6418 * python/py-signalevent.c (create_signal_event_object): Return
6419 gdbpy_ref.
6420 * python/py-infevents.c (create_inferior_call_event_object):
6421 Update.
6422 * python/py-event.h (create_event_object)
6423 (create_thread_event_object): Update.
6424 * python/py-event.c (create_event_object): Return gdbpy_ref.
6425 * python/py-continueevent.c: Return gdbpy_ref.
6426 * python/py-bpevent.c (create_breakpoint_event_object): Return
6427 gdbpy_ref.
6428
6429 2017-09-11 Tom Tromey <tom@tromey.com>
6430
6431 PR python/15622:
6432 * NEWS: Add entry.
6433 * python/python.c (do_start_initialization): Initialize new event
6434 types.
6435 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6436 (gdbpy_initialize_inferior_deleted_event)
6437 (gdbpy_initialize_new_thread_event): Declare.
6438 * python/py-threadevent.c (create_thread_event_object): Add option
6439 "thread" parameter.
6440 * python/py-inferior.c (new_thread_event_object_type)
6441 (new_inferior_event_object_type)
6442 (inferior_deleted_event_object_type): Declare.
6443 (python_new_inferior, python_inferior_deleted): New functions.
6444 (add_thread_object): Emit new_thread event.
6445 (gdbpy_initialize_inferior): Attach new functions to corresponding
6446 observers.
6447 (new_thread, new_inferior, inferior_deleted): Define new event
6448 types.
6449 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6450 registries.
6451 * python/py-events.h (events_object) <new_inferior,
6452 inferior_deleted, new_thread>: New fields.
6453 * python/py-event.h (create_thread_event_breakpoint): Add optional
6454 "thread" parameter.
6455
6456 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6457
6458 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6459 check current_ui instead.
6460 (internal_vproblem): Likewise.
6461
6462 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6463
6464 * thread.c (print_thread_info_1): Remove unnecessary calls to
6465 uiout->is_mi_like_p.
6466
6467 2017-09-09 Tom Tromey <tom@tromey.com>
6468
6469 * namespace.h (add_using_directive): Update.
6470 * namespace.c (add_using_directive): Change type of excludes to
6471 std::vector.
6472 * dwarf2read.c (read_import_statement): Use std::vector.
6473 (read_namespace): Update.
6474 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6475
6476 2017-09-09 Tom Tromey <tom@tromey.com>
6477
6478 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6479
6480 2017-09-09 Tom Tromey <tom@tromey.com>
6481
6482 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6483
6484 2017-09-09 Tom Tromey <tom@tromey.com>
6485
6486 * stack.c (func_command): Use gdb::def_vector.
6487
6488 2017-09-09 Tom Tromey <tom@tromey.com>
6489
6490 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6491 ui_out_emit_list, ui_out_emit_tuple.
6492 (mi_cmd_var_update): Likewise.
6493
6494 2017-09-09 Tom Tromey <tom@tromey.com>
6495
6496 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6497 ui_out_redirect_pop.
6498 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6499 ui_out_redirect_pop.
6500 * utils.c (do_ui_out_redirect_pop)
6501 (make_cleanup_ui_out_redirect_pop): Remove.
6502 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6503 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6504 * ui-out.h (ui_out_redirect_pop): New class.
6505
6506 2017-09-09 Tom Tromey <tom@tromey.com>
6507
6508 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6509 (list_available_thread_groups, mi_cmd_list_thread_groups)
6510 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6511 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6512 Likewise.
6513
6514 2017-09-09 Tom Tromey <tom@tromey.com>
6515
6516 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6517 ui_out_emit_tuple.
6518
6519 2017-09-09 Tom Tromey <tom@tromey.com>
6520
6521 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6522 * stack.c (print_frame): Use ui_out_emit_tuple.
6523 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6524 (info_spu_mailbox_command, info_spu_dma_command)
6525 (info_spu_proxydma_command): Likewise.
6526 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6527 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6528 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6529 ui_out_emit_tuple.
6530 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6531
6532 2017-09-09 Tom Tromey <tom@tromey.com>
6533
6534 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6535 (class ui_out_emit_table): Update comment.
6536 * ui-out.c (do_cleanup_table_end)
6537 (make_cleanup_ui_out_table_begin_end): Remove.
6538 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6539 (info_spu_dma_cmdlist): Likewise.
6540 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6541 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6542 ui_out_emit_table.
6543
6544 2017-09-09 Tom Tromey <tom@tromey.com>
6545
6546 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6547 ui_out_emit_list, gdb::optional.
6548
6549 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6550
6551 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6552 prototype.
6553 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6554 prototype.
6555 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6556 prototype.
6557 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6558 * ada-exp.y: Remove _initialize_ada_exp prototype.
6559 * ada-lang.c: Remove _initialize_ada_language prototype.
6560 * ada-tasks.c: Remove _initialize_tasks prototype.
6561 * addrmap.c: Remove _initialize_addrmap prototype.
6562 * agent.c: Remove _initialize_agent prototype.
6563 * aix-thread.c: Remove _initialize_aix_thread prototype.
6564 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6565 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6566 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6567 prototype.
6568 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6569 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6570 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6571 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6572 prototype.
6573 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6574 prototype.
6575 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6576 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6577 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6578 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6579 prototype.
6580 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6581 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6582 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6583 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6584 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6585 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6586 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6587 prototype.
6588 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6589 prototype.
6590 * annotate.c: Remove _initialize_annotate prototype.
6591 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6592 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6593 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6594 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6595 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6596 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6597 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6598 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6599 prototype.
6600 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6601 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6602 * auto-load.c: Remove _initialize_auto_load prototype.
6603 * auxv.c: Remove _initialize_auxv prototype.
6604 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6605 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6606 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6607 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6608 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6609 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6610 prototype.
6611 * break-catch-throw.c: Remove _initialize_break_catch_throw
6612 prototype.
6613 * breakpoint.c: Remove _initialize_breakpoint prototype.
6614 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6615 * btrace.c: Remove _initialize_btrace prototype.
6616 * charset.c: Remove _initialize_charset prototype.
6617 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6618 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6619 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6620 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6621 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6622 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6623 * coffread.c: Remove _initialize_coffread prototype.
6624 * compile/compile.c: Remove _initialize_compile prototype.
6625 * complaints.c: Remove _initialize_complaints prototype.
6626 * completer.c: Remove _initialize_completer prototype.
6627 * copying.awk: Remove _initialize_copying prototype.
6628 * copying.c: Regenerate.
6629 * core-regset.c: Remove _initialize_core_regset prototype.
6630 * corefile.c: Remove _initialize_core prototype.
6631 * corelow.c: Remove _initialize_corelow prototype.
6632 * cp-abi.c: Remove _initialize_cp_abi prototype.
6633 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6634 * cp-support.c: Remove _initialize_cp_support prototype.
6635 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6636 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6637 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6638 * ctf.c: Remove _initialize_ctf prototype.
6639 * d-lang.c: Remove _initialize_d_language prototype.
6640 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6641 prototype.
6642 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6643 * dbxread.c: Remove _initialize_dbxread prototype.
6644 * dcache.c: Remove _initialize_dcache prototype.
6645 * demangle.c: Remove _initialize_demangler prototype.
6646 * disasm-selftests.c: Remove _initialize_disasm_selftests
6647 prototype.
6648 * disasm.c: Remove _initialize_disasm prototype.
6649 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6650 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6651 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6652 prototype.
6653 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6654 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6655 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6656 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6657 * elfread.c: Remove _initialize_elfread prototype.
6658 * exec.c: Remove _initialize_exec prototype.
6659 * extension.c: Remove _initialize_extension prototype.
6660 * f-lang.c: Remove _initialize_f_language prototype.
6661 * f-valprint.c: Remove _initialize_f_valprint prototype.
6662 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6663 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6664 * filesystem.c: Remove _initialize_filesystem prototype.
6665 * findcmd.c: Remove _initialize_mem_search prototype.
6666 * fork-child.c: Remove _initialize_fork_child prototype.
6667 * frame-base.c: Remove _initialize_frame_base prototype.
6668 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6669 * frame.c: Remove _initialize_frame prototype.
6670 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6671 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6672 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6673 * gcore.c: Remove _initialize_gcore prototype.
6674 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6675 * gdbarch.c: Regenerate.
6676 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6677 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6678 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6679 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6680 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6681 * go-lang.c: Remove _initialize_go_language prototype.
6682 * go32-nat.c: Remove _initialize_go32_nat prototype.
6683 * guile/guile.c: Remove _initialize_guile prototype.
6684 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6685 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6686 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6687 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6688 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6689 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6690 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6691 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6692 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6693 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6694 prototype.
6695 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6696 prototype.
6697 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6698 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6699 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6700 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6701 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6702 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6703 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6704 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6705 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6706 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6707 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6708 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6709 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6710 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6711 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6712 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6713 prototype.
6714 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6715 prototype.
6716 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6717 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6718 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6719 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6720 * infcall.c: Remove _initialize_infcall prototype.
6721 * infcmd.c: Remove _initialize_infcmd prototype.
6722 * inferior.c: Remove _initialize_inferiors prototype.
6723 * inflow.c: Remove _initialize_inflow prototype.
6724 * infrun.c: Remove _initialize_infrun prototype.
6725 * interps.c: Remove _initialize_interpreter prototype.
6726 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6727 * jit.c: Remove _initialize_jit prototype.
6728 * language.c: Remove _initialize_language prototype.
6729 * linux-fork.c: Remove _initialize_linux_fork prototype.
6730 * linux-nat.c: Remove _initialize_linux_nat prototype.
6731 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6732 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6733 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6734 * m2-lang.c: Remove _initialize_m2_language prototype.
6735 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6736 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6737 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6738 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6739 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6740 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6741 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6742 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6743 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6744 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6745 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6746 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6747 * machoread.c: Remove _initialize_machoread prototype.
6748 * macrocmd.c: Remove _initialize_macrocmd prototype.
6749 * macroscope.c: Remove _initialize_macroscope prototype.
6750 * maint.c: Remove _initialize_maint_cmds prototype.
6751 * mdebugread.c: Remove _initialize_mdebugread prototype.
6752 * memattr.c: Remove _initialize_mem prototype.
6753 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6754 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6755 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6756 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6757 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6758 * microblaze-linux-tdep.c: Remove
6759 _initialize_microblaze_linux_tdep prototype.
6760 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6761 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6762 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6763 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6764 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6765 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6766 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6767 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6768 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6769 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6770 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6771 prototype.
6772 * mipsread.c: Remove _initialize_mipsread prototype.
6773 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6774 prototype.
6775 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6776 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6777 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6778 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6779 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6780 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6781 prototype.
6782 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6783 * nto-procfs.c: Remove _initialize_procfs prototype.
6784 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6785 * objc-lang.c: Remove _initialize_objc_language prototype.
6786 * objfiles.c: Remove _initialize_objfiles prototype.
6787 * observer.c: Remove observer_test_first_notification_function,
6788 observer_test_second_notification_function,
6789 observer_test_third_notification_function, and
6790 _initialize_observer prototypes.
6791 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6792 * osabi.c: Remove _initialize_gdb_osabi prototype.
6793 * osdata.c: Remove _initialize_osdata prototype.
6794 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6795 * parse.c: Remove _initialize_parse prototype.
6796 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6797 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6798 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6799 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6800 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6801 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6802 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6803 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6804 * printcmd.c: Remove _initialize_printcmd prototype.
6805 * probe.c: Remove _initialize_probe prototype.
6806 * proc-api.c: Remove _initialize_proc_api prototype.
6807 * proc-events.c: Remove _initialize_proc_events prototype.
6808 * proc-service.c: Remove _initialize_proc_service prototype.
6809 * procfs.c: Remove _initialize_procfs prototype.
6810 * psymtab.c: Remove _initialize_psymtab prototype.
6811 * python/python.c: Remove _initialize_python prototype.
6812 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6813 * record-btrace.c: Remove _initialize_record_btrace prototype.
6814 * record-full.c: Remove _initialize_record_full prototype.
6815 * record.c: Remove _initialize_record prototype.
6816 * regcache.c: Remove _initialize_regcache prototype.
6817 * reggroups.c: Remove _initialize_reggroup prototype.
6818 * remote-notif.c: Remove _initialize_notif prototype.
6819 * remote-sim.c: Remove _initialize_remote_sim prototype.
6820 * remote.c: Remove _initialize_remote prototype.
6821 * reverse.c: Remove _initialize_reverse prototype.
6822 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6823 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6824 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6825 prototype.
6826 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6827 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6828 * rust-exp.y: Remove _initialize_rust_exp prototype.
6829 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6830 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6831 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6832 * score-tdep.c: Remove _initialize_score_tdep prototype.
6833 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6834 prototype.
6835 * ser-go32.c: Remove _initialize_ser_dos prototype.
6836 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6837 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6838 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6839 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6840 * serial.c: Remove _initialize_serial prototype.
6841 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6842 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6843 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6844 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6845 * skip.c: Remove _initialize_step_skip prototype.
6846 * sol-thread.c: Remove _initialize_sol_thread prototype.
6847 * solib-aix.c: Remove _initialize_solib_aix prototype.
6848 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6849 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6850 * solib-frv.c: Remove _initialize_frv_solib prototype.
6851 * solib-spu.c: Remove _initialize_spu_solib prototype.
6852 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6853 * solib-target.c: Remove _initialize_solib_target prototype.
6854 * solib.c: Remove _initialize_solib prototype.
6855 * source.c: Remove _initialize_source prototype.
6856 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6857 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6858 prototype.
6859 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6860 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6861 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6862 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6863 prototype.
6864 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6865 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6866 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6867 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6868 prototype.
6869 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6870 prototype.
6871 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6872 prototype.
6873 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6874 prototype.
6875 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6876 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6877 prototype.
6878 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6879 prototype.
6880 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6881 prototype.
6882 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6883 prototype.
6884 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6885 prototype.
6886 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6887 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6888 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6889 * stabsread.c: Remove _initialize_stabsread prototype.
6890 * stack.c: Remove _initialize_stack prototype.
6891 * stap-probe.c: Remove _initialize_stap_probe prototype.
6892 * std-regs.c: Remove _initialize_frame_reg prototype.
6893 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6894 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6895 * symfile.c: Remove _initialize_symfile prototype.
6896 * symmisc.c: Remove _initialize_symmisc prototype.
6897 * symtab.c: Remove _initialize_symtab prototype.
6898 * target-dcache.c: Remove _initialize_target_dcache prototype.
6899 * target-descriptions.c: Remove _initialize_target_descriptions
6900 prototype.
6901 * thread.c: Remove _initialize_thread prototype.
6902 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6903 prototype.
6904 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6905 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6906 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6907 prototype.
6908 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6909 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6910 * tracefile.c: Remove _initialize_tracefile prototype.
6911 * tracepoint.c: Remove _initialize_tracepoint prototype.
6912 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6913 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6914 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6915 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6916 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6917 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6918 * tui/tui.c: Remove _initialize_tui prototype.
6919 * typeprint.c: Remove _initialize_typeprint prototype.
6920 * user-regs.c: Remove _initialize_user_regs prototype.
6921 * utils.c: Remove _initialize_utils prototype.
6922 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6923 * valarith.c: Remove _initialize_valarith prototype.
6924 * valops.c: Remove _initialize_valops prototype.
6925 * valprint.c: Remove _initialize_valprint prototype.
6926 * value.c: Remove _initialize_values prototype.
6927 * varobj.c: Remove _initialize_varobj prototype.
6928 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6929 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6930 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6931 * windows-nat.c: Remove _initialize_windows_nat,
6932 _initialize_check_for_gdb_ini, and _initialize_loadable
6933 prototypes.
6934 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6935 * xcoffread.c: Remove _initialize_xcoffread prototype.
6936 * xml-support.c: Remove _initialize_xml_support prototype.
6937 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6938 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6939 prototype.
6940 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6941 prototype.
6942 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6943
6944 2017-09-08 Keith Seitz <keiths@redhat.com>
6945
6946 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6947 field.
6948
6949 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6950
6951 * f-valprint.c (f_val_print): Remove check for one byte
6952 sized integers. Remove printing of character type.
6953
6954 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6955 Christoph Weinmann <christoph.t.weinmann@intel.com>
6956 Bernhard Heckel <bernhard.heckel@intel.com>
6957
6958 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6959 to maintain proper indentation when printing pointers/refs.
6960
6961 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6962
6963 GDB 8.0.1 released.
6964
6965 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6966
6967 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6968
6969 2017-09-05 Tom Tromey <tom@tromey.com>
6970
6971 * parse.c (funcall_chain): Now a std::vector.
6972 (start_arglist, end_arglist): Simplify.
6973 (free_funcalls): Remove.
6974 (parse_exp_in_context_1): Remove cleanup.
6975
6976 2017-09-05 Tom Tromey <tom@tromey.com>
6977
6978 * go-exp.y (go_parse): Don't create a cleanup.
6979
6980 2017-09-05 Tom Tromey <tom@tromey.com>
6981
6982 * d-exp.y (PrimaryExpression): Use std::string.
6983 (d_parse): Don't create a cleanup.
6984
6985 2017-09-05 Tom Tromey <tom@tromey.com>
6986
6987 * utils.c (do_clear_parser_state): Remove.
6988 (make_cleanup_clear_parser_state): Remove.
6989 * p-exp.y (pascal_parse): Use scoped_restore.
6990 * m2-exp.y (m2_parse): Use scoped_restore.
6991 * f-exp.y (f_parse): Use scoped_restore.
6992 * d-exp.y (d_parse): Use scoped_restore.
6993 * c-exp.y (c_parse): Use scoped_restore.
6994 * ada-exp.y (ada_parse): Use scoped_restore.
6995 * utils.h (make_cleanup_clear_parser_state): Remove.
6996
6997 2017-09-06 Keith Seitz <keiths@redhat.com>
6998
6999 * dwarf2read.c (dw2_linkage_name_attr): New function.
7000 (dw2_linkage_name): New function.
7001 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7002 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7003 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7004
7005 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7006
7007 * config/djgpp/djconfig.sh: Correct shell portability issue.
7008
7009 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7010
7011 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7012
7013 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7014
7015 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7016 * NEWS: Mention new FreeBSD/mips native configuration.
7017 * configure.host: Add aarch64*-*-freebsd*.
7018 * configure.nat: Likewise.
7019 * aarch64-fbsd-nat.c: New file.
7020
7021 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7022
7023 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7024 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7025 * NEWS: Mention new FreeBSD/aarch64 target.
7026 * configure.tgt: Add aarch64*-*-freebsd*.
7027 * aarch64-fbsd-tdep.c: New file.
7028 * aarch64-fbsd-tdep.h: New file.
7029
7030 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7031
7032 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7033
7034 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7035
7036 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7037 of TLS symbols.
7038
7039 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7040
7041 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7042 call.
7043
7044 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7045
7046 * infrun.c (follow_exec): Call add_thread after
7047 target_find_description.
7048
7049 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7050
7051 * infrun.c (handle_inferior_event_1): When exec'ing, read
7052 stop_pc after follow_exec.
7053
7054 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7055
7056 * remote.c (process_g_packet): Update error message.
7057
7058 2017-09-05 Yao Qi <yao.qi@linaro.org>
7059
7060 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7061 targets.
7062
7063 2017-09-05 Pedro Alves <palves@redhat.com>
7064
7065 * eval.c (eval_call, evaluate_funcall): New functions, factored
7066 out from ...
7067 (evaluate_subexp_standard): ... this.
7068
7069 2017-09-05 Yao Qi <yao.qi@linaro.org>
7070
7071 * amd64-tdep.c (amd64_target_description): Create target
7072 descriptions.
7073 (_initialize_amd64_tdep): Don't call functions
7074 initialize_tdesc_amd64_*. Add self tests.
7075 * arch/amd64.c (amd64_create_target_description): Add parameter
7076 is_linux. Call set_tdesc_osabi if is_linux is true.
7077 * arch/amd64.h (amd64_create_target_description): Update the
7078 declaration.
7079 * arch/i386.c (i386_create_target_description): Add parameter
7080 is_linux. Call set_tdesc_osabi if is_linux is true.
7081 * arch/i386.h (i386_create_target_description): Update
7082 declaration.
7083 * configure.tgt: Add i386.o to gdb_target_obs.
7084 * features/Makefile (XMLTOC): Remove i386/*.xml.
7085 * features/i386/amd64-avx-avx512.c: Remove.
7086 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7087 * features/i386/amd64-avx-mpx.c: Remove.
7088 * features/i386/amd64-avx.c: Remove.
7089 * features/i386/amd64-mpx.c: Remove.
7090 * features/i386/amd64.c: Remove.
7091 * features/i386/i386-avx-avx512.c: Remove.
7092 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7093 * features/i386/i386-avx-mpx.c: Remove.
7094 * features/i386/i386-avx.c: Remove.
7095 * features/i386/i386-mmx.c: Remove.
7096 * features/i386/i386-mpx.c: Remove.
7097 * features/i386/i386.c: Remove.
7098 * i386-tdep.c: Don't include features/i386/i386*.c., include
7099 target-descriptions.h and arch/i386.h.
7100 (i386_target_description): Create target descriptions.
7101 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7102 functions. Do self tests.
7103
7104 2017-09-05 Yao Qi <yao.qi@linaro.org>
7105
7106 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7107 * features/i386/amd64-avx-avx512-linux.c: Removed.
7108 * features/i386/amd64-avx-linux.c: Removed.
7109 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7110 * features/i386/amd64-avx-mpx-linux.c: Removed.
7111 * features/i386/amd64-linux.c: Removed.
7112 * features/i386/amd64-mpx-linux.c: Removed.
7113 * features/i386/x32-avx-avx512-linux.c: Removed.
7114 * features/i386/x32-avx-linux.c: Removed.
7115 * features/i386/x32-linux.c: Removed.
7116
7117 2017-09-05 Yao Qi <yao.qi@linaro.org>
7118
7119 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7120 features/i386/*.c.
7121 (amd64_linux_read_description): Call
7122 amd64_create_target_description.
7123 * arch/amd64.c: New file.
7124 * arch/amd64.h: New file.
7125 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7126 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7127
7128 2017-09-05 Yao Qi <yao.qi@linaro.org>
7129
7130 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7131 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7132 (amd64_linux_read_description): Create target descriptions.
7133 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7134 functions. Add unit tests.
7135 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7136 x32-core.xml.
7137 * features/i386/64bit-avx.c: Generated.
7138 * features/i386/64bit-avx512.c: Generated.
7139 * features/i386/64bit-core.c: Generated.
7140 * features/i386/64bit-linux.c: Generated.
7141 * features/i386/64bit-mpx.c: Generated.
7142 * features/i386/64bit-pkeys.c: Generated.
7143 * features/i386/64bit-segments.c: Generated.
7144 * features/i386/64bit-sse.c: Generated.
7145 * features/i386/x32-core.c: Generated.
7146 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7147 c files for amd64-linux and x32-linux.
7148
7149 2017-09-05 Yao Qi <yao.qi@linaro.org>
7150
7151 * amd64-linux-tdep.c (amd64_linux_read_description): New
7152 function.
7153 (amd64_linux_core_read_description): Call
7154 amd64_linux_read_description.
7155 (amd64_linux_init_abi): Likewise.
7156 (amd64_x32_linux_init_abi): Likewise.
7157 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7158 * x86-linux-nat.c (x86_linux_read_description): Call
7159 amd64_linux_read_description.
7160
7161 2017-09-05 Yao Qi <yao.qi@linaro.org>
7162
7163 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7164 comments.
7165
7166 2017-09-05 Yao Qi <yao.qi@linaro.org>
7167
7168 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7169 * features/i386/i386-avx-avx512-linux.c: Remove.
7170 * features/i386/i386-avx-linux.c: Remove.
7171 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7172 * features/i386/i386-avx-mpx-linux.c: Remove.
7173 * features/i386/i386-linux.c: Remove.
7174 * features/i386/i386-mmx-linux.c: Remove.
7175 * features/i386/i386-mpx-linux.c: Remove.
7176
7177 2017-09-05 Yao Qi <yao.qi@linaro.org>
7178
7179 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7180 (SFILES): Add arch/i386.c.
7181 (HFILES_NO_SRCDIR): Add arch/i386.h.
7182 * arch/i386.c: New file.
7183 * arch/i386.h: New file.
7184 * arch/tdesc.h (allocate_target_description): Declare.
7185 (set_tdesc_architecture): Declare.
7186 (set_tdesc_osabi): Declare.
7187 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7188 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7189 include arch/i386.h.
7190 (i386_linux_read_description): Remove code and call
7191 i386_create_target_description.
7192 (set_tdesc_architecture): New function.
7193 (set_tdesc_osabi): New function.
7194 * target-descriptions.h (allocate_target_description): Remove.
7195
7196 2017-09-05 Yao Qi <yao.qi@linaro.org>
7197
7198 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7199 * target-descriptions.c (tdesc_create_feature): Likewise, and
7200 adjust code.
7201 * features/i386/32bit-avx.c: Re-generated.
7202 * features/i386/32bit-avx512.c: Re-generated.
7203 * features/i386/32bit-core.c: Re-generated.
7204 * features/i386/32bit-linux.c: Re-generated.
7205 * features/i386/32bit-mpx.c: Re-generated.
7206 * features/i386/32bit-pkeys.c: Re-generated.
7207 * features/i386/32bit-sse.c: Re-generated.
7208
7209 2017-09-05 Yao Qi <yao.qi@linaro.org>
7210
7211 * regformats/regdef.h (struct reg): Override operator == and !=.
7212
7213 2017-09-05 Yao Qi <yao.qi@linaro.org>
7214
7215 * arch/tdesc.h: New file.
7216 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7217 * target-descriptions.c: Update comments.
7218 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7219 declarations.
7220 * features/i386/32bit-avx.c: Re-generated.
7221 * features/i386/32bit-avx512.c: Re-generated.
7222 * features/i386/32bit-core.c: Re-generated.
7223 * features/i386/32bit-linux.c: Re-generated.
7224 * features/i386/32bit-mpx.c: Re-generated.
7225 * features/i386/32bit-pkeys.c: Re-generated.
7226 * features/i386/32bit-sse.c: Re-generated.
7227
7228 2017-09-05 Yao Qi <yao.qi@linaro.org>
7229
7230 * regformats/regdat.sh: Update generated code.
7231
7232 2017-09-05 Yao Qi <yao.qi@linaro.org>
7233
7234 * regformats/regdat.sh: Adjust code order.
7235
7236 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7237
7238 * expprint.c (dump_subexp_body_standard): Use constant format
7239 string in fprintf_filtered call.
7240
7241 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7242
7243 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7244 NetBSD/i386.
7245 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7246
7247 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7248
7249 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7250
7251 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7252
7253 * bsd-kvm.o: Define _KMEMUSER.
7254 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7255 * configure: Regenerate.
7256
7257 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7258
7259 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7260 * i386-fbsd-nat.c: Likewise.
7261
7262 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7263
7264 * unittests/array-view-selftests.c: Add include of <array>.
7265
7266 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7267
7268 * spu-tdep.c (flush_ea_cache): Add missing argument to
7269 call_function_by_hand.
7270
7271 2017-09-04 Pedro Alves <palves@redhat.com>
7272
7273 * NEWS (Safer support for debugging with no debug info): New.
7274
7275 2017-09-04 Pedro Alves <palves@redhat.com>
7276
7277 * c-exp.y (function_method, function_method_void): Add current
7278 instance flags to TYPE_INSTANCE.
7279 * dwarf2read.c (check_modifier): New.
7280 (compute_delayed_physnames): Assert that only C++ adds delayed
7281 physnames. Mark fn_fields as const/volatile depending on
7282 physname.
7283 * eval.c (make_params): New type_instance_flags parameter. Use
7284 it as the new type's instance flags.
7285 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7286 flags element and pass it to make_params.
7287 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7288 instance flags element.
7289 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7290 * gdbtypes.h: Include "enum-flags.h".
7291 (type_instance_flags): New enum-flags type.
7292 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7293 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7294 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7295 (follow_type_instance_flags): New function.
7296 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7297 * parser-defs.h (follow_type_instance_flags): Declare.
7298 * valops.c (value_struct_elt_for_reference): const/volatile must
7299 match too.
7300
7301 2017-09-04 Pedro Alves <palves@redhat.com>
7302
7303 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7304 function/method scopes; lookup the nested name as a function local
7305 static variable.
7306
7307 2017-09-04 Pedro Alves <palves@redhat.com>
7308
7309 (%type <voidval>): Add function_method.
7310 * c-exp.y (exp): New production for calls with no arguments.
7311 (function_method, function_method_void_or_typelist): New
7312 productions.
7313 (exp): New production for "method()::static_var".
7314 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7315 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7316 Handle OP_FUNC_STATIC_VAR.
7317 * parse.c (operator_length_standard):
7318 Handle OP_FUNC_STATIC_VAR.
7319
7320 2017-09-04 Pedro Alves <palves@redhat.com>
7321
7322 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7323 handling.
7324 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7325 Ditto.
7326 * parse.c (operator_length_standard, operator_check_standard):
7327 Ditto.
7328 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7329
7330 2017-09-04 Pedro Alves <palves@redhat.com>
7331
7332 * ax-gdb.c: Include "typeprint.h".
7333 (gen_expr_for_cast): New function.
7334 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7335 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7336 type is unknown.
7337 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7338 nodebug_data_symbol.
7339 * eval.c: Include "typeprint.h".
7340 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7341 Error out if symbol has unknown type.
7342 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7343 evaluate_subexp_for_cast.
7344 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7345 OP_VAR_MSYM_VALUE.
7346 (evaluate_subexp_for_cast): New function.
7347 * gdbtypes.c (init_nodebug_var_type): New function.
7348 (objfile_type): Use it to initialize types of variables with no
7349 debug info.
7350 * typeprint.c (error_unknown_type): New.
7351 * typeprint.h (error_unknown_type): New declaration.
7352 * compile/compile-c-types.c (convert_type_basic): Handle
7353 TYPE_CODE_ERROR; warn and fallback to int for variables with
7354 unknown type.
7355
7356 2017-09-04 Pedro Alves <palves@redhat.com>
7357
7358 * eval.c (evaluate_var_value): New function, factored out from ...
7359 (evaluate_subexp_standard): ... here.
7360
7361 2017-09-04 Pedro Alves <palves@redhat.com>
7362
7363 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7364 Remove useless assignments to 'op'.
7365
7366 2017-09-04 Pedro Alves <palves@redhat.com>
7367
7368 * eval.c (eval_skip_value): New function.
7369 (evaluate_subexp_standard): Use it.
7370
7371 2017-09-04 Pedro Alves <palves@redhat.com>
7372
7373 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7374 function name from symbol/minsym and pass it to
7375 error_call_unknown_return_type.
7376
7377 2017-09-04 Pedro Alves <palves@redhat.com>
7378
7379 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7380 * ax-gdb.c (gen_msym_var_ref): New function.
7381 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7382 * eval.c (evaluate_var_msym_value): New function.
7383 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7384 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7385 to call_function_by_hand.
7386 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7387 Handle OP_VAR_MSYM_VALUE.
7388 (union exp_element) <msymbol>: New field.
7389 * minsyms.h (struct type): Forward declare.
7390 (find_minsym_type_and_address): Declare.
7391 * parse.c (write_exp_elt_msym): New function.
7392 (write_exp_msymbol): Delete, refactored as ...
7393 (find_minsym_type_and_address): ... this new function.
7394 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7395 (operator_length_standard, operator_check_standard): Handle
7396 OP_VAR_MSYM_VALUE.
7397 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7398
7399 2017-09-04 Pedro Alves <palves@redhat.com>
7400
7401 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7402 TYPE_GNU_IFUNC specially here. Throw error if return type is
7403 unknown.
7404 * ada-typeprint.c (print_func_type): Handle functions with unknown
7405 return type.
7406 * c-typeprint.c (c_type_print_base): Handle functions and methods
7407 with unknown return type.
7408 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7409 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7410 * compile/compile-c-types.c: Include "objfiles.h".
7411 (convert_func): For functions with unknown return type, warn and
7412 default to int.
7413 * compile/compile-object-run.c (compile_object_run): Adjust call
7414 to call_function_by_hand_dummy.
7415 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7416 call_function_by_hand.
7417 * eval.c (evaluate_subexp_standard): Adjust calls to
7418 call_function_by_hand. Handle functions and methods with unknown
7419 return type. Pass expect_type to call_function_by_hand.
7420 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7421 return type.
7422 * gcore.c (call_target_sbrk): Adjust call to
7423 call_function_by_hand.
7424 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7425 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7426 an integer address type instead of nodebug.
7427 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7428 call_function_by_hand.
7429 * infcall.c (error_call_unknown_return_type): New function.
7430 (call_function_by_hand): New "default_return_type" parameter.
7431 Pass it down.
7432 (call_function_by_hand_dummy): New "default_return_type"
7433 parameter. Use it instead of defaulting to int. If there's no
7434 default and the return type is unknown, throw an error. If
7435 there's a default return type, and the called function has no
7436 debug info, then assume the function is prototyped.
7437 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7438 New "default_return_type" parameter.
7439 (error_call_unknown_return_type): New declaration.
7440 * linux-fork.c (call_lseek): Cast return type of lseek.
7441 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7442 call_function_by_hand.
7443 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7444 calls to call_function_by_hand.
7445 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7446 return type.
7447 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7448 (value_nsstring, print_object_command): Adjust calls to
7449 call_function_by_hand.
7450 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7451 functions with unknown return type.
7452 (pascal_type_print_func_varspec_suffix): New function.
7453 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7454 TYPE_CODE_METHOD>: Use it.
7455 * python/py-value.c (valpy_call): Adjust call to
7456 call_function_by_hand.
7457 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7458 call_function_by_hand.
7459 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7460 call_function_by_hand.
7461 * valops.c (value_allocate_space_in_inferior): Adjust call to
7462 call_function_by_hand.
7463 * typeprint.c (type_print_unknown_return_type): New function.
7464 * typeprint.h (type_print_unknown_return_type): New declaration.
7465
7466 2017-09-04 Pedro Alves <palves@redhat.com>
7467
7468 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7469 types with more than one parameter as prototyped.
7470
7471 2017-09-04 Pedro Alves <palves@redhat.com>
7472
7473 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7474 (disassemble_command): Use gdb_disassembly_flags instead of bare
7475 int.
7476 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7477 (dump_insns, do_mixed_source_and_assembly_deprecated)
7478 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7479 Use gdb_disassembly_flags instead of bare int.
7480 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7481 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7482 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7483 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7484 (enum gdb_disassembly_flag): ... values of this new enumeration.
7485 (gdb_disassembly_flags): Define.
7486 (gdb_disassembly)
7487 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7488 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7489 gdb_disassembly_flags instead of bare int.
7490 * record-btrace.c (btrace_insn_history)
7491 (record_btrace_insn_history, record_btrace_insn_history_range)
7492 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7493 instead of bare int.
7494 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7495 Use gdb_disassembly_flags instead of bare int.
7496 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7497 Define.
7498 * target-delegates.c: Regenerate.
7499 * target.c (target_insn_history, target_insn_history_from)
7500 (target_insn_history_range): Use gdb_disassembly_flags instead of
7501 bare int.
7502 * target.h: Include "disasm.h".
7503 (struct target_ops) <to_insn_history, to_insn_history_from,
7504 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7505 int.
7506 (target_insn_history, target_insn_history_from)
7507 (target_insn_history_range): Use gdb_disassembly_flags instead of
7508 bare int.
7509
7510 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7511
7512 * cli/cli-script.c (build_command_line): For if/while commands,
7513 check whether args is empty.
7514
7515 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7516
7517 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7518 (enum command_control_type): Likewise.
7519 (struct command_line): Likewise.
7520 (free_command_lines): Likewise.
7521 (struct command_lines_deleter): Likewise.
7522 (command_line_up): Likewise.
7523 (read_command_lines): Likewise.
7524 (read_command_lines_1): Likewise.
7525 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7526 (enum command_control_type): Likewise.
7527 (struct command_line): Likewise.
7528 (free_command_lines): Likewise.
7529 (struct command_lines_deleter): Likewise.
7530 (command_line_up): Likewise.
7531 (read_command_lines): Likewise.
7532 (read_command_lines_1): Likewise.
7533 * breakpoint.h: Include cli/cli-script.h.
7534 * extension-priv.h: Likewise.
7535 * gdbcmd.h: Likewise.
7536
7537 2017-09-04 Pedro Alves <palves@redhat.com>
7538
7539 * ada-lang.c (is_known_support_routine): Move sal declaration to
7540 where it is initialized.
7541 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7542 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7543 (clear_command, update_static_tracepoint): Remove init_sal
7544 references. Move declarations closer to initializations.
7545 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7546 initializations.
7547 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7548 references. Move sal declarations closer to initializations.
7549 * frame.c (find_frame_sal): Return a symtab_and_line via function
7550 return instead of output parameter. Remove init_sal references.
7551 * frame.h (find_frame_sal): Return a symtab_and_line via function
7552 return instead of output parameter.
7553 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7554 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7555 instead of memset.
7556 (gdbscm_find_pc_line): Remove init_sal reference.
7557 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7558 references. Move declarations closer to initializations.
7559 * infcmd.c (set_step_frame): Update. Move declarations closer to
7560 initializations.
7561 (finish_backward): Remove init_sal references. Move declarations
7562 closer to initializations.
7563 * infrun.c (process_event_stop_test, handle_step_into_function)
7564 (insert_hp_step_resume_breakpoint_at_frame)
7565 (insert_step_resume_breakpoint_at_caller): Likewise.
7566 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7567 (symbol_to_sal): Likewise.
7568 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7569 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7570 to its initialization.
7571 * reverse.c (save_bookmark_command): Use new/delete. Remove
7572 init_sal references. Move declarations closer to initializations.
7573 * source.c (get_current_source_symtab_and_line): Remove brace
7574 initialization.
7575 (set_current_source_symtab_and_line): Now takes the sal by const
7576 reference. Remove brace initialization.
7577 (line_info): Remove init_sal reference.
7578 * source.h (set_current_source_symtab_and_line): Now takes a
7579 symtab_and_line via const reference.
7580 * stack.c (set_current_sal_from_frame): Adjust.
7581 (print_frame_info): Adjust.
7582 (get_last_displayed_sal): Return the sal via function return
7583 instead of via output parameter. Simplify.
7584 (frame_info): Adjust.
7585 * stack.h (get_last_displayed_sal): Return the sal via function
7586 return instead of via output parameter.
7587 * symtab.c (init_sal): Delete.
7588 (find_pc_sect_line): Remove init_sal references. Move
7589 declarations closer to initializations.
7590 (find_function_start_sal): Remove init_sal references. Move
7591 declarations closer to initializations.
7592 * symtab.h (struct symtab_and_line): In-class initialize all
7593 fields.
7594 * tracepoint.c (set_traceframe_context)
7595 (print_one_static_tracepoint_marker): Remove init_sal references.
7596 Move declarations closer to initializations.
7597 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7598 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7599 declarations closer to initializations.
7600 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7601 init_sal references. Adjust.
7602
7603 2017-09-04 Pedro Alves <palves@redhat.com>
7604
7605 * ax-gdb.c (agent_command_1): Use range-for.
7606 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7607 * breakpoint.c: Include "common/array-view.h".
7608 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7609 parameter from struct symtabs_and_lines to
7610 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7611 (breakpoint_sals_to_pc): Change sals parameter from struct
7612 symtabs_and_lines to std::vector reference.
7613 (check_fast_tracepoint_sals): Change sals parameter from struct
7614 symtabs_and_lines to std::array_view. Use range-for.
7615 (decode_static_tracepoint_spec): Return a std::vector instead of
7616 symtabs_and_lines. Update.
7617 (create_breakpoint): Update.
7618 (break_range_command, until_break_command, clear_command): Update.
7619 (base_breakpoint_decode_location, bkpt_decode_location)
7620 (bkpt_probe_create_sals_from_location)
7621 (bkpt_probe_decode_location, tracepoint_decode_location)
7622 (tracepoint_probe_decode_location)
7623 (strace_marker_create_sals_from_location): Return a std::vector
7624 instead of symtabs_and_lines.
7625 (strace_marker_create_breakpoints_sal): Update.
7626 (strace_marker_decode_location): Return a std::vector instead of
7627 symtabs_and_lines. Update.
7628 (update_breakpoint_locations): Change struct symtabs_and_lines
7629 parameters to gdb::array_view. Adjust.
7630 (location_to_sals): Return a std::vector instead of
7631 symtabs_and_lines. Update.
7632 (breakpoint_re_set_default): Use std::vector instead of struct
7633 symtabs_and_lines.
7634 (decode_location_default): Return a std::vector instead of
7635 symtabs_and_lines. Update.
7636 * breakpoint.h: Include "common/array-view.h".
7637 (struct breakpoint_ops) <decode_location>: Now returns a
7638 std::vector instead of returning a symtabs_and_lines via output
7639 parameter.
7640 (update_breakpoint_locations): Change sals parameters to use
7641 gdb::array_view.
7642 * cli/cli-cmds.c (edit_command, list_command): Update to use
7643 std::vector and gdb::array_view.
7644 (ambiguous_line_spec): Adjust to use gdb::array_view and
7645 range-for.
7646 (compare_symtabs): Rename to ...
7647 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7648 const reference and adjust.
7649 (filter_sals): Rewrite using std::vector and standard algorithms.
7650 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7651 (jump_command): Update to use std::vector.
7652 * linespec.c (struct linespec_state) <canonical_names>: Update
7653 comment.
7654 (add_sal_to_sals_basic): Delete.
7655 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7656 (decode_line_2, create_sals_line_offset)
7657 (convert_address_location_to_sals, convert_linespec_to_sals)
7658 (convert_explicit_location_to_sals, parse_linespec)
7659 (event_location_to_sals, decode_line_full, decode_line_1)
7660 (decode_line_with_current_source)
7661 (decode_line_with_last_displayed, decode_objc)
7662 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7663 (linespec_result::~linespec_result): Adjust to use std::vector
7664 instead of symtabs_and_lines.
7665 * linespec.h (linespec_sals::sals): Now a std::vector.
7666 (struct linespec_result): Use std::vector, bool, and in-class
7667 initialization.
7668 (decode_line_1, decode_line_with_current_source)
7669 (decode_line_with_last_displayed): Return std::vector.
7670 * macrocmd.c (info_macros_command): Use std::vector.
7671 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7672 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7673 std::vector.
7674 * probe.h (parse_probes): Return a std::vector.
7675 * python/python.c (gdbpy_decode_line): Use std::vector and
7676 gdb::array_view.
7677 * source.c (select_source_symtab, line_info): Use std::vector.
7678 * stack.c (func_command): Use std::vector.
7679 * symtab.h (struct symtabs_and_lines): Delete.
7680 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7681
7682 2017-09-04 Pedro Alves <palves@redhat.com>
7683
7684 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7685 unittests/array-view-selftests.c.
7686 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7687 * common/array-view.h: New file.
7688 * unittests/array-view-selftests.c: New file.
7689
7690 2017-09-04 Pedro Alves <palves@redhat.com>
7691
7692 * cli/cli-cmds.c (edit_command): Pass message to
7693 ambiguous_line_spec.
7694 (list_command): Pass message to ambiguous_line_spec. Say
7695 "first"/"last" instead of "start" and "end" to be consistent with
7696 the manual.
7697 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7698 them to print formatted message.
7699
7700 2017-09-04 Pedro Alves <palves@redhat.com>
7701
7702 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7703 ftrace_update_insns by reference instead of pointer.
7704
7705 2017-09-04 Yao Qi <yao.qi@linaro.org>
7706
7707 * i386-go32-tdep.c: Include x86-xstate.h.
7708 (i386_go32_init_abi): Call i386_target_description.
7709 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7710 if xcr0 is X86_XSTATE_X87_MASK.
7711 * i386-tdep.h (tdesc_i386): Remove the declaration.
7712 (tdesc_i386_mmx): Likewise.
7713
7714 2017-09-04 Yao Qi <yao.qi@linaro.org>
7715
7716 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7717 X86_XSTATE_SSE_MASK instead of 0.
7718
7719 2017-09-04 Yao Qi <yao.qi@linaro.org>
7720
7721 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7722 i386_target_description.
7723 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7724 i386_target_description.
7725 * i386-tdep.c (i386_gdbarch_init): Likewise.
7726
7727 2017-09-04 Yao Qi <yao.qi@linaro.org>
7728
7729 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7730 (x86_darwin_init_abi_64): Call amd64_target_description.
7731 * amd64-dicos-tdep.c: Likewise.
7732 * amd64-fbsd-nat.c: Likewise.
7733 * amd64-fbsd-tdep.c: Likewise.
7734 * amd64-nbsd-tdep.c: Likewise.
7735 * amd64-obsd-tdep.c: Likewise.
7736 * amd64-sol2-tdep.c: Likewise.
7737 * amd64-windows-tdep.c: Likewise.
7738 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7739
7740 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7741
7742 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7743 (btrace_function) <insn>: Change type to use std::vector.
7744 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7745 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7746 ftrace_update_insns, ftrace_compute_global_level_offset,
7747 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7748 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7749 change to std::vector.
7750 (ftrace_update_insns): Adjust to change to std::vector, change
7751 type of INSN parameter.
7752 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7753 * record-btrace.c (btrace_call_history_insn_range,
7754 btrace_compute_src_line_range,
7755 record_btrace_frame_prev_register): Adjust to change to
7756 std::vector.
7757 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7758 to change to std::vector.
7759
7760 2017-09-03 Tom Tromey <tom@tromey.com>
7761
7762 * corefile.c (reopen_exec_file): Use std::string.
7763
7764 2017-09-03 Tom Tromey <tom@tromey.com>
7765
7766 * compile/compile.c (compile_register_name_mangled): Return
7767 std::string.
7768 * compile/compile-loc2c.c (pushf_register_address): Update.
7769 (pushf_register): Update.
7770 * compile/compile-c-types.c (convert_array): Update.
7771 * compile/compile-c-symbols.c (generate_vla_size): Update.
7772 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7773 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7774 (convert_one_symbol): Update.
7775 (generate_c_for_for_one_variable): Update.
7776 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7777 std::string.
7778 (generate_register_struct): Update.
7779 * compile/compile-internal.h (c_get_range_decl_name): Return a
7780 std::string.
7781 (compile_register_name_mangled): Return std::string.
7782
7783 2017-09-03 Tom Tromey <tom@tromey.com>
7784
7785 * utils.c (perror_string): Return a std::string.
7786 (throw_perror_with_name, perror_warning_with_name): Update.
7787
7788 2017-09-03 Tom Tromey <tom@tromey.com>
7789
7790 * demangle.c (demangle_command): Use std::string,
7791 unique_xmalloc_ptr.
7792
7793 2017-09-03 Tom Tromey <tom@tromey.com>
7794
7795 * cli/cli-setshow.c (do_set_command): Use std::string.
7796
7797 2017-09-03 Tom Tromey <tom@tromey.com>
7798
7799 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7800
7801 2017-09-03 Tom Tromey <tom@tromey.com>
7802
7803 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7804
7805 2017-09-03 Tom Tromey <tom@tromey.com>
7806
7807 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7808 gdb::unique_xmalloc_ptr.
7809
7810 2017-09-03 Tom Tromey <tom@tromey.com>
7811
7812 * thread.c (print_thread_info_1): Use string_printf.
7813 (thread_apply_command, thread_apply_all_command): Use
7814 std::string.
7815
7816 2017-09-03 Tom Tromey <tom@tromey.com>
7817
7818 * valprint.c (val_print_string): Update.
7819 * gdbcore.h (memory_error_message): Return std::string.
7820 * corefile.c (memory_error_message): Return std::string.
7821 (memory_error): Update.
7822 * breakpoint.c (insert_bp_location): Update.
7823
7824 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7825
7826 * target/waitstatus.h (target_waitstatus_to_string): Change
7827 return type to std::string.
7828 * target/waitstatus.c (target_waitstatus_to_string): Return
7829 std::string.
7830 * target.h (target_waitstatus_to_string): Remove declaration.
7831 * infrun.c (resume, clear_proceed_status_thread,
7832 print_target_wait_results, do_target_wait, save_waitstatus,
7833 stop_all_threads): Adjust.
7834 * record-btrace.c (record_btrace_wait): Adjust.
7835 * target-debug.h
7836 (target_debug_print_struct_target_waitstatus_p): Adjust.
7837
7838 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7839
7840 PR gdb/22046
7841 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7842 detection.
7843
7844 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7845
7846 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7847 for setting/unsetting environment variables on the remote target.
7848 (New remote packets): Add entries for QEnvironmentHexEncoded,
7849 QEnvironmentUnset and QEnvironmentReset.
7850 * common/environ.c (gdb_environ::operator=): Extend method to
7851 handle m_user_set_env_list and m_user_unset_env_list.
7852 (gdb_environ::clear): Likewise.
7853 (match_var_in_string): Change type of first parameter from 'char
7854 *' to 'const char *'.
7855 (gdb_environ::set): Extend method to handle
7856 m_user_set_env_list and m_user_unset_env_list.
7857 (gdb_environ::unset): Likewise.
7858 (gdb_environ::clear_user_set_env): New method.
7859 (gdb_environ::user_set_envp): Likewise.
7860 (gdb_environ::user_unset_envp): Likewise.
7861 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7862 m_user_unset_env_list on move constructor/assignment.
7863 (unset): Add new default parameter 'update_unset_list = true'.
7864 (clear_user_set_env): New method.
7865 (user_set_envp): Likewise.
7866 (user_unset_envp): Likewise.
7867 (m_user_set_env_list): New std::set.
7868 (m_user_unset_env_list): Likewise.
7869 * common/rsp-low.c (hex2str): New function.
7870 (bin2hex): New overload for bin2hex function.
7871 * common/rsp-low.c (hex2str): New prototype.
7872 (str2hex): New overload prototype.
7873 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7874 QEnvironmentUnset and QEnvironmentReset.
7875 (remote_protocol_features): Add QEnvironmentHexEncoded,
7876 QEnvironmentUnset and QEnvironmentReset packets.
7877 (send_environment_packet): New function.
7878 (extended_remote_environment_support): Likewise.
7879 (extended_remote_create_inferior): Call
7880 extended_remote_environment_support.
7881 (_initialize_remote): Add QEnvironmentHexEncoded,
7882 QEnvironmentUnset and QEnvironmentReset packet configs.
7883 * unittests/environ-selftests.c (gdb_selftest_env_var):
7884 New variable.
7885 (test_vector_initialization): New function.
7886 (test_init_from_host_environ): Likewise.
7887 (test_reinit_from_host_environ): Likewise.
7888 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7889 Likewise.
7890 (test_unset_set_empty_vector): Likewise.
7891 (test_vector_clear): Likewise.
7892 (test_std_move): Likewise.
7893 (test_move_constructor):
7894 (test_self_move): Likewise.
7895 (test_set_unset_reset): Likewise.
7896 (run_tests): Rewrite in terms of the functions above.
7897
7898 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7899
7900 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7901 (adi_available): Use a temp variable of type CORE_ADDR as argument
7902 3 when calling target_auxv_search.
7903 (adi_normalize_address): Use masks and xor operators to calculate
7904 normalized address.
7905 (adi_read_versions, adi_write_versions, adi_print_versions)
7906 (do_examine, do_assign): Use paddress.
7907
7908 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7909
7910 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7911 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7912 out of loop and add supply of FIR.
7913 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7914 add collect of FIR.
7915
7916 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7917
7918 PR gdb/21827
7919 * cli/cli-script.c (define_command): Don't convert command name
7920 to lower case.
7921
7922 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7923
7924 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7925 Update all callers accordingly. Remove all code blocks handling
7926 the case where DISPP is not NULL.
7927
7928 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7929
7930 PR symtab/22003
7931 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7932 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7933 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7934
7935 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7936
7937 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7938 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7939 (read_comp_units_from_section): New parameter abbrev_section, use
7940 read_and_check_comp_unit_head, allocate signatured_type if needed.
7941 (create_all_comp_units): Update read_comp_units_from_section caller.
7942
7943 2017-08-23 Pedro Alves <palves@redhat.com>
7944
7945 PR remote/21852
7946 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7947 to null_ptid and switch to thread without reading the registers
7948 after adding the inferior.
7949
7950 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7951
7952 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7953 compile-gcc.
7954 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7955 (compile_to_object): Implement compile_gcc.
7956 (_initialize_compile): Install "set compile-gcc". Initialize
7957 compile_gcc.
7958
7959 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7960
7961 * compile/compile.c (compile_to_object): Conditionally call
7962 set_verbose. Conditionally call compile or compile_v0.
7963
7964 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7965
7966 * sparc64-tdep.h: (adi_normalize_address): New export.
7967 * sparc-nat.h: (open_adi_tag_fd): New export.
7968 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7969 * sparc64-linux-tdep.c:
7970 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7971 (sparc64_linux_handle_segmentation_fault): New function.
7972 (sparc64_linux_init_abi): Register
7973 sparc64_linux_handle_segmentation_fault
7974 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7975 (sparc64_addr_bits_remove): New function.
7976 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7977 (MAX_PROC_NAME_SIZE): New macro.
7978 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7979 (sparc64adilist): New variable.
7980 (adi_proc_list): New variable.
7981 (find_adi_info): New function.
7982 (add_adi_info): New function.
7983 (get_adi_info_proc): New function.
7984 (get_adi_info): New function.
7985 (info_adi_command): New function.
7986 (read_maps_entry): New function.
7987 (adi_available): New function.
7988 (adi_normalize_address): New function.
7989 (adi_align_address): New function.
7990 (adi_convert_byte_count): New function.
7991 (adi_tag_fd): New function.
7992 (adi_is_addr_mapped): New function.
7993 (adi_read_versions): New function.
7994 (adi_write_versions): New function.
7995 (adi_print_versions): New function.
7996 (do_examine): New function.
7997 (do_assign): New function.
7998 (adi_examine_command): New function.
7999 (adi_assign_command): New function.
8000 (_initialize_sparc64_adi_tdep): New function.
8001
8002 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8003
8004 * breakpoint.c (breakpoints_info): Rename to ...
8005 (info_breakpoints_command): ... this.
8006 (watchpoints_info): Rename to ...
8007 (info_watchpoints_command): ... this.
8008 (tracepoints_info): Rename to ...
8009 (info_tracepoints_command): ... this.
8010 (_initialize_breakpoint): Adjust.
8011 * dcache.c (dcache_info): Rename to ...
8012 (info_display_command): ... this.
8013 (_initialize_dcache): Adjust.
8014 * frame.h (args_info): Rename to ...
8015 (info_args_command): ... this.
8016 (locals_info): Rename to ...
8017 (info_locals_command): ... this.
8018 * infcmd.c (nofp_registers_info): Rename to ...
8019 (info_registers_command): ... this.
8020 (float_info): Rename to ...
8021 (info_float_command): ... this.
8022 (program_info): Rename to ...
8023 (info_program_command): ... this.
8024 (all_registers_info): Rename to ...
8025 (info_all_registers_command): ... this.
8026 (vector_info): Rename to ...
8027 (info_vector_command): ... this.
8028 (float_info): Rename to ...
8029 (info_float_command): ... this.
8030 (_initialize_infcmd): Adjust.
8031 * inferior.h (term_info): Rename to ...
8032 (info_terminal_command): ... this.
8033 * inflow.c (term_info): Rename to ...
8034 (info_terminal_command): ... this.
8035 (_initialize_inflow): Adjust.
8036 * infrun.c (signals_info): Rename to ...
8037 (info_signals_command): ... this.
8038 (_initialize_infrun): Adjust.
8039 * objc-lang.c (classes_info): Rename to ...
8040 (info_classes_command): ... this.
8041 (selectors_info): Rename to ...
8042 (info_selectors_command): ... this.
8043 (_initialize_objc_language): Adjust.
8044 * printcmd.c (sym_info): Rename to ...
8045 (info_symbol_command): ... this.
8046 (address_info): Rename to ...
8047 (info_address_command): ... this.
8048 (display_info): Rename to ...
8049 (info_display_command): ... this.
8050 (_initialize_printcmd): Adjust.
8051 * reverse.c (bookmarks_info): Rename to ...
8052 (info_breakpoints_command): ... this.
8053 (_initialize_reverse): Adjust.
8054 * ser-go32.c (dos_info): Rename to ...
8055 (info_serial_command): ... this.
8056 (_initialize_ser_dos): Adjust.
8057 * skip.c (skip_info): Rename to ...
8058 (info_skip_command): ... this.
8059 (_initialize_step_skip): Adjust.
8060 * source.c (line_info): Rename to ...
8061 (info_line_command): ... this.
8062 (source_info): Rename to ...
8063 (info_source_command)
8064 * stack.c (frame_info): Rename to ...
8065 (info_frame_command): ... this.
8066 (locals_info): Rename to ...
8067 (info_locals_command): ... this.
8068 (args_info): Rename to ...
8069 (info_args_command): ... this.
8070 (_initialize_stack): Adjust.
8071 * symtab.c (sources_info): Rename to ...
8072 (info_sources_command): ... this.
8073 (variables_info): Rename to ...
8074 (info_variables_command): ... this.
8075 (functions_info): Rename to ...
8076 (info_functions_command): ... this.
8077 (types_info): Rename to ...
8078 (info_types_command): ... this.
8079 (_initialize_symtab): Adjust.
8080 * target.c (target_info): Rename to ...
8081 (info_target_command): ... this.
8082 (initialize_targets): Adjust.
8083 * tracepoint.c (tvariables_info): Rename to ...
8084 (info_tvariables_command): ... this.
8085 (scope_info): Rename to ...
8086 (info_scope_command): ... this.
8087 (trace_dump_actions): Adjust.
8088 (_initialize_tracepoint): Adjust.
8089
8090 2017-08-22 Tom Tromey <tom@tromey.com>
8091
8092 * breakpoint.h (install_breakpoint): Update.
8093 * breakpoint.c (add_solib_catchpoint): Update.
8094 (install_breakpoint): Change argument to a std::unique_ptr.
8095 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8096 (create_breakpoint_sal, create_breakpoint): Update.
8097 (watch_command_1, catch_exec_command_1)
8098 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8099 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8100 Return the breakpoint.
8101 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8102 (new_single_step_breakpoint): Update.
8103 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8104 std::unique_ptr.
8105 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8106 std::unique_ptr.
8107 * break-catch-sig.c (create_signal_catchpoint): Use
8108 std::unique_ptr.
8109 * ada-lang.c (create_ada_exception_catchpoint): Use
8110 std::unique_ptr.
8111
8112 2017-08-22 Tom Tromey <tom@tromey.com>
8113
8114 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8115
8116 2017-08-22 Tom Tromey <tom@tromey.com>
8117
8118 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8119 (lookup_partial_symbol): Update.
8120
8121 2017-08-22 Tom Tromey <tom@tromey.com>
8122
8123 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8124 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8125 (find_and_open_source, symtab_to_fullname): Update.
8126 * psymtab.c (psymtab_to_fullname): Update.
8127
8128 2017-08-22 Tom Tromey <tom@tromey.com>
8129
8130 * exec.c (exec_file_attach): Update.
8131 * linux-thread-db.c (try_thread_db_load): Update.
8132 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8133 * utils.c (gdb_realpath): Change return type.
8134 (gdb_realpath_keepfile): Update.
8135 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8136 (_initialize_utils): Register the new self test.
8137 * source.c (openp): Update.
8138 (find_and_open_source): Update.
8139 * nto-tdep.c (nto_find_and_open_solib): Update.
8140 * main.c (set_gdb_data_directory): Update.
8141 (captured_main_1): Update.
8142 * dwarf2read.c (dwarf2_get_dwz_file): Update
8143 (dw2_map_symbol_filenames): Update.
8144 * auto-load.c (auto_load_safe_path_vec_update): Update.
8145 (filename_is_in_auto_load_safe_path_vec): Change type of
8146 "filename_realp".
8147 (auto_load_objfile_script): Update.
8148 (file_is_auto_load_safe): Update. Use std::string.
8149 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8150
8151 2017-08-22 Tom Tromey <tom@tromey.com>
8152
8153 * utils.c (gdb_realpath_keepfile): Return a
8154 gdb::unique_xmalloc_ptr.
8155 * exec.c (exec_file_attach): Update.
8156 * utils.h (gdb_realpath_keepfile): Return a
8157 gdb::unique_xmalloc_ptr.
8158
8159 2017-08-22 Tom Tromey <tom@tromey.com>
8160
8161 * compile/compile.c (compile_file_command): Use
8162 gdb::unique_xmalloc_ptr, std::string.
8163 * utils.c (gdb_abspath): Change return type.
8164 * source.c (openp): Update.
8165 * objfiles.c (allocate_objfile): Update.
8166 * main.c (set_gdb_data_directory): Update.
8167 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8168
8169 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8170
8171 * cli-cmds.c (list_commands): List actual code around more than
8172 one location.
8173
8174 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8175
8176 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8177
8178 2017-08-21 Pedro Alves <palves@redhat.com>
8179
8180 PR gdb/19487
8181 * c-exp.y (variable production): Handle function aliases.
8182 * minsyms.c (msymbol_is_text): New function.
8183 * minsyms.h (msymbol_is_text): Declare.
8184 * symtab.c (find_function_alias_target): New function.
8185 * symtab.h (find_function_alias_target): Declare.
8186
8187 2017-08-21 Pedro Alves <palves@redhat.com>
8188
8189 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8190 typedefs.
8191 * typeprint.c (whatis_exp): If handling "whatis", and expression
8192 is OP_TYPE, strip one typedef level. Otherwise don't strip
8193 typedefs here.
8194 * valops.c (value_cast): Save "to" type before resolving
8195 stubs/typedefs. Use that type as resulting value's type.
8196
8197 2017-08-18 Tom Tromey <tom@tromey.com>
8198 Pedro Alves <palves@redhat.com>
8199
8200 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8201 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8202 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8203 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8204 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8205 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8206 (linux_get_siginfo_data): Add "thread" argument. Use
8207 scoped_restore.
8208 * linux-nat.c (linux_child_follow_fork)
8209 (check_stopped_by_watchpoint): Use scoped_restore.
8210 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8211 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8212 (restore_inferior_ptid, save_inferior_ptid): Remove.
8213 * btrace.c (btrace_fetch): Use scoped_restore.
8214 * bsd-uthread.c (bsd_uthread_fetch_registers)
8215 (bsd_uthread_store_registers): Use scoped_restore.
8216 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8217 scoped_restore.
8218 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8219 (aix_thread_xfer_partial): Use scoped_restore.
8220 * inferior.h (save_inferior_ptid): Remove.
8221
8222 2017-08-18 Yao Qi <yao.qi@linaro.org>
8223
8224 PR tdep/21818
8225 * arm-tdep.c (gdb_print_insn_arm): Mark
8226 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8227
8228 2017-08-18 Yao Qi <yao.qi@linaro.org>
8229
8230 * NEWS: Mention GDBserver's new option "--selftest".
8231 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8232 * selftest.c: Move it to common/selftest.c.
8233 * selftest.h: Move it to common/selftest.h.
8234 * selftest-arch.c (reset): New function.
8235 (tests_with_arch): Call reset.
8236
8237 2017-08-18 Yao Qi <yao.qi@linaro.org>
8238
8239 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8240 instead of exception_fprintf and printf_filtered.
8241
8242 2017-08-18 Yao Qi <yao.qi@linaro.org>
8243
8244 * selftest.c (register_self_test): Rename it to
8245 selftests::register_test.
8246 (run_self_tests): selftest::run_tests.
8247 * selftest.h: Update declarations.
8248 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8249 selftests::register_test_foreach_arch.
8250 * selftest-arch.h: Update declaration.
8251 * aarch64-tdep.c: Update.
8252 * arm-tdep.c: Likewise.
8253 * disasm-selftests.c: Likewise.
8254 * dwarf2loc.c: Likewise.
8255 * dwarf2-frame.c: Likewise.
8256 * findvar.c: Likewise.
8257 * gdbarch-selftests.c: Likewise.
8258 * maint.c (maintenance_selftest): Likewise.
8259 * regcache.c: Likewise.
8260 * rust-exp.y: Likewise.
8261 * selftest-arch.c: Likewise.
8262 * unittests/environ-selftests.c: Likewise.
8263 * unittests/function-view-selftests.c: Likewise.
8264 * unittests/offset-type-selftests.c: Likewise.
8265 * unittests/optional-selftests.c: Likewise.
8266 * unittests/scoped_restore-selftests.c: Likewise.
8267 * utils-selftests.c: Likewise.
8268
8269 2017-08-17 Pedro Alves <palves@redhat.com>
8270
8271 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8272 local.
8273
8274 2017-08-17 Pedro Alves <palves@redhat.com>
8275
8276 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8277 field.
8278 (reset_die_in_process): Delete, replaced by ...
8279 (process_die_scope): ... this new class. Make it responsible for
8280 freeing cu->line_header too.
8281 (process_die): Use process_die_scope.
8282 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8283 cu->line_header_die_owner. Don't release the line header if it's
8284 owned by the CU.
8285 (setup_type_unit_groups): Make the CU/DIE own the line header.
8286 Don't release the line header here.
8287
8288 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8289
8290 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8291
8292 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8293
8294 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8295 Single-Key mode
8296
8297 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8298
8299 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8300 mode command list.
8301
8302 2017-08-15 Stafford Horne <shorne@gmail.com>
8303
8304 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8305
8306 2017-08-15 Stafford Horne <shorne@gmail.com>
8307
8308 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8309
8310 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8311
8312 PR gdb/21954
8313 * infcmd.c (unset_environment_command): Use the 'clear' method on
8314 the environment instead of resetting it.
8315
8316 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8317
8318 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8319 platforms.
8320
8321 2017-08-14 Tom Tromey <tom@tromey.com>
8322
8323 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8324 (print_binary_chars): Likewise.
8325 (BITS_IN_BYTES): Remove.
8326
8327 2017-08-14 Tom Tromey <tom@tromey.com>
8328
8329 PR gdb/21675
8330 * valprint.c (LOW_ZERO): Change value to 034.
8331 (print_octal_chars): Add static_asserts for octal constants.
8332 * printcmd.c (print_scalar_formatted): Add 'd' case.
8333
8334 2017-08-11 Tom Tromey <tom@tromey.com>
8335
8336 * symfile.c (add_symbol_file_command): Use std::vector.
8337
8338 2017-08-14 Tom Tromey <tom@tromey.com>
8339
8340 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8341 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8342 std::move.
8343 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8344
8345 2017-08-11 Pedro Alves <palves@redhat.com>
8346
8347 * infrun.c (process_event_stop_test): Adjust
8348 function_name_is_marked_for_skip call.
8349 * skip.c: Include <list>.
8350 (skiplist_entry): Make it a class with private fields, and
8351 getters/setters.
8352 (skiplist_entry_chain): Delete.
8353 (skiplist_entries): New.
8354 (skiplist_entry_count): Delete.
8355 (highest_skiplist_entry_num): New.
8356 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8357 (add_skiplist_entry): Delete.
8358 (skiplist_entry::skiplist_entry): New.
8359 (skiplist_entry::add_entry): New.
8360 (skip_file_command, skip_function): Adjust.
8361 (compile_skip_regexp): Delete.
8362 (skip_command): Don't compile regexp here. Adjust to use
8363 skiplist_entry::add_entry.
8364 (skip_info): Adjust to use range-for and getters.
8365 (skip_enable_command, skip_disable_command): Adjust to use
8366 range-for and setters.
8367 (skip_delete_command): Adjust to use std::list.
8368 (add_skiplist_entry): Delete.
8369 (skip_file_p): Delete, refactored as ...
8370 (skiplist_entry::do_skip_file_p): ... this new method.
8371 (skip_gfile_p): Delete, refactored as ...
8372 (skiplist_entry::do_gskip_file_p): ... this new method.
8373 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8374 (skiplist_entry::skip_function_p): ... this new method.
8375 (function_name_is_marked_for_skip): Now returns bool, and takes
8376 the function sal by const reference. Adjust to use range-for and
8377 skiplist_entry methods.
8378 (_initialize_step_skip): Remove references to
8379 skiplist_entry_chain, skiplist_entry_count.
8380 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8381 takes the function sal by const reference.
8382
8383 2017-08-11 Yao Qi <yao.qi@linaro.org>
8384
8385 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8386 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8387 (dwarf2_frame_cache):
8388 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8389 RETURN_MASK_ALL and set *this_case to NULL.
8390 * frame-unwind.h: Update comments.
8391
8392 2017-08-11 Yao Qi <yao.qi@linaro.org>
8393
8394 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8395 (dwarf2_frame_state_copy_regs): Remove.
8396 (dwarf2_frame_state_free_regs): Remove.
8397 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8398 (dwarf2_restore_rule): Call method .alloc_regs instead of
8399 dwarf2_frame_state_alloc_regs.
8400 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8401 constructor. Call std::move.
8402 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8403 (dwarf2_frame_cache): Likewise.
8404
8405 [GDB_SELF_TEST]: Include selftest.h and
8406 selftest-arch.h.
8407 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8408 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8409 execute_cfa_program_test.
8410
8411 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8412 copy ctor, assignment operator, move assignment.
8413 <alloc_regs>: New method.
8414 <swap>: New method.
8415 (struct dwarf2_frame_state): Delete dtor.
8416 (dwarf2_frame_state_alloc_regs): Remove declaration.
8417 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8418 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8419
8420 2017-08-11 Yao Qi <yao.qi@linaro.org>
8421
8422 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8423 (dwarf2_frame_state::dwarf2_frame_state): New.
8424 (dwarf2_frame_state::~dwarf2_frame_state): New.
8425 (dwarf2_fetch_cfa_info): Update.
8426 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8427 rather than a pointer. Update code.
8428 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8429 dtor.
8430 <data_align, code_align, retaddr_column>: Change them to const.
8431 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8432 to bool.
8433
8434 2017-08-11 Yao Qi <yao.qi@linaro.org>
8435
8436 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8437 <loc.exp>: New field.
8438 * dwarf2-frame.c (execute_cfa_program): Update.
8439 (dwarf2_frame_prev_register): Update.
8440
8441 2017-08-10 Pedro Alves <palves@redhat.com>
8442
8443 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8444
8445 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8446
8447 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8448 (fbsd_pending_children): Use std::list.
8449 (fbsd_remember_child): Likewise.
8450 (fbsd_is_child_pending): Likewise.
8451 (fbsd_pending_vfork_done): Use std::forward_list.
8452 (fbsd_add_vfork_done): Likewise.
8453 (fbsd_is_vfork_done_pending): Likewise.
8454 (fbsd_next_vfork_done): Likewise.
8455
8456 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8457
8458 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8459 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8460 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8461 for `mapfilename'.
8462 (fbsd_xfer_partial): Use gdb::byte_vector.
8463 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8464
8465 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8466
8467 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8468 "filestuff.h".
8469 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8470
8471 2017-08-09 Tom Tromey <tom@tromey.com>
8472
8473 * skip.c (skiplist_entry): New constructor.
8474 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8475 (skiplist_entry::file_is_glob): Now bool.
8476 (skiplist_entry::file, skiplist_entry::function): Now
8477 std::string.
8478 (make_skip_entry): Return a unique_ptr. Use new.
8479 (free_skiplist_entry, free_skiplist_entry_cleanup)
8480 (make_free_skiplist_entry_cleanup): Remove.
8481 (skip_command, skip_disable_command, add_skiplist_entry)
8482 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8483 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8484 (function_name_is_marked_for_skip): Update.
8485 (skip_delete_command): Update. Use delete.
8486
8487 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8488
8489 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8490 (aarch64_linux_core_read_description): New function.
8491 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8492
8493 2017-08-09 Pedro Alves <palves@redhat.com>
8494
8495 * cp-name-parser.y (cp_comp_to_string): Return a
8496 gdb::unique_xmalloc_ptr<char>.
8497 * cp-support.c (replace_typedefs_qualified_name)
8498 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8499 (cp_canonicalize_string_full): Use op= instead of explicit
8500 convertion.
8501 (cp_class_name_from_physname, method_name_from_physname)
8502 (cp_func_name, cp_remove_params): Adjust to use
8503 gdb::unique_xmalloc_ptr<char>.
8504 * cp-support.h (cp_comp_to_string): Return a
8505 gdb::unique_xmalloc_ptr<char>.
8506 * python/py-type.c (typy_lookup_type): Adjust to use
8507 gdb::unique_xmalloc_ptr<char>.
8508
8509 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8510
8511 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8512
8513 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8514 Yao Qi <yao.qi@linaro.org>
8515
8516 * cp-support.c (cp_canonicalize_string_full): Use
8517 gdb::unique_xmalloc_ptr<char>.
8518 (cp_canonicalize_string): Likewise.
8519
8520 2017-08-09 Yao Qi <yao.qi@linaro.org>
8521
8522 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8523 * regformats/i386/amd64-avx-avx512.dat: Remove.
8524 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8525 * regformats/i386/amd64-avx-mpx.dat:Remove.
8526 * regformats/i386/amd64-avx.dat: Remove.
8527 * regformats/i386/amd64-mpx.dat: Remove.
8528 * regformats/i386/i386-avx-avx512.dat: Remove.
8529 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8530 * regformats/i386/i386-avx-mpx.dat: Remove.
8531 * regformats/i386/i386-mmx.dat: Remove.
8532 * regformats/i386/i386-mpx.dat: Remove.
8533
8534 2017-08-09 Yao Qi <yao.qi@linaro.org>
8535
8536 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8537 * amd64-tdep.c: Don't include features/i386/x32*.c.
8538 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8539 functions.
8540 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8541 and i386/x32-avx-avx512.
8542 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8543 and i386/x32.xml.
8544 * features/i386/x32-avx-avx512.c: Removed.
8545 * features/i386/x32-avx-avx512.xml: Removed.
8546 * features/i386/x32-avx.c: Removed.
8547 * features/i386/x32-avx.xml: Removed.
8548 * features/i386/x32.c: Removed.
8549 * features/i386/x32.xml: Removed.
8550 * regformats/i386/x32-avx-avx512.dat: Removed.
8551 * regformats/i386/x32-avx.dat: Removed.
8552 * regformats/i386/x32.dat: Removed.
8553
8554 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8555
8556 PR breakpoints/21886
8557 * mem-break.c (default_memory_insert_breakpoint): Use
8558 `->placed_address' rather than `->reqstd_address' for the
8559 breakpoint location.
8560
8561 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8562
8563 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8564 assertions.
8565
8566 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8567
8568 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8569 a union of `tdep_info', `tdesc_data' and `id'.
8570 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8571 rather than `info.tdep_info'.
8572 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8573 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8574 * i386-tdep.c (i386_gdbarch_init): Likewise.
8575 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8576 * mips-tdep.c (mips_gdbarch_init): Likewise.
8577 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8578 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8579 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8580 `info.tdep_info'.
8581 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8582 `info.tdep_info'.
8583 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8584 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8585 `info.tdep_info'.
8586 * spu-tdep.c (spu_gdbarch_init): Likewise.
8587 * gdbarch.h: Regenerate.
8588
8589 2017-08-07 Leszek Swirski <leszeks@google.com>
8590
8591 PR symtab/20899
8592 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8593
8594 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8595
8596 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8597 (gdbsim_open): Rename gdb_argv args object to argv.
8598
8599 2017-08-05 Tom Tromey <tom@tromey.com>
8600
8601 * compile/compile-object-load.c (compile_object_load): Use
8602 gdb::unique_xmalloc_ptr.
8603 * cli/cli-dump.c (scan_filename): Rename from
8604 scan_filename_with_cleanup. Change return type.
8605 (scan_expression): Rename from scan_expression_with_cleanup.
8606 Change return type.
8607 (dump_memory_to_file, dump_value_to_file, restore_command):
8608 Use gdb::unique_xmalloc_ptr. Update.
8609 * cli/cli-cmds.c (find_and_open_script): Use
8610 gdb::unique_xmalloc_ptr.
8611 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8612 * symmisc.c (maintenance_print_symbols)
8613 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8614 * symfile.c (symfile_bfd_open, generic_load)
8615 (add_symbol_file_command, remove_symbol_file_command): Use
8616 gdb::unique_xmalloc_ptr.
8617 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8618 * psymtab.c (maintenance_print_psymbols): Use
8619 gdb::unique_xmalloc_ptr.
8620 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8621 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8622 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8623 (reload_shared_libraries_1): Likewise.
8624
8625 2017-08-05 Tom Tromey <tom@tromey.com>
8626
8627 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8628 (rust_op_vector, rust_set_vector): New typedefs.
8629 (current_parser): New global.
8630 (work_obstack): Change to pointer type. Update all users.
8631 (rust_ast, pstate): Remove globals.
8632 (struct rust_parser): New.
8633 (%union) <params, field_inits>: Change type.
8634 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8635 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8636 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8637 (convert_params_to_types, convert_params_to_expression): Change
8638 type of "params".
8639 (ast_string): Change type of "fields".
8640 (rust_parse): Make a rust_parser. Remove cleanups.
8641 (rust_lex_tests): Make and install an auto_obstack.
8642
8643 2017-08-04 Yao Qi <yao.qi@linaro.org>
8644
8645 * configure.srv (ipa_x32_linux_regobj): New.
8646 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8647 instead of X86_TDESC_AVX512.
8648 (initialize_low_tracepoint): Call
8649 init_registers_x32_avx_avx512_linux.
8650
8651 2017-08-04 Yao Qi <yao.qi@linaro.org>
8652
8653 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8654
8655 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8656
8657 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8658
8659 2017-08-03 Tom Tromey <tom@tromey.com>
8660
8661 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8662 Remove.
8663 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8664
8665 2017-08-03 Tom Tromey <tom@tromey.com>
8666
8667 * python/py-param.c (compute_enum_values): Use gdb_argv.
8668
8669 2017-08-03 Tom Tromey <tom@tromey.com>
8670
8671 * utils.h (struct gdb_argv_deleter): New.
8672 (gdb_argv): New class.
8673 * utils.c (gdb_argv::reset): New method.
8674 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8675 * tracefile.c (tsave_command): Use gdb_argv.
8676 * top.c (new_ui_command): Use gdb_argv.
8677 * symmisc.c (maintenance_print_symbols)
8678 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8679 * symfile.c (symbol_file_command, generic_load)
8680 (remove_symbol_file_command): Use gdb_argv.
8681 * stack.c (backtrace_command): Use gdb_argv.
8682 * source.c (add_path, show_substitute_path_command)
8683 (unset_substitute_path_command, set_substitute_path_command):
8684 Use gdb_argv.
8685 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8686 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8687 * remote.c (extended_remote_run, remote_put_command)
8688 (remote_get_command, remote_delete_command): Use gdb_argv.
8689 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8690 (gdbsim_open): Use gdb_argv.
8691 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8692 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8693 * procfs.c (procfs_info_proc): Use gdb_argv.
8694 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8695 * infrun.c (handle_command): Use gdb_argv.
8696 * inferior.c (add_inferior_command, clone_inferior_command):
8697 Use gdb_argv.
8698 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8699 * exec.c (exec_file_command): Use gdb_argv.
8700 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8701 * compile/compile.c (build_argc_argv): Use gdb_argv.
8702
8703 2017-08-03 Tom Tromey <tom@tromey.com>
8704
8705 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8706
8707 2017-08-03 Tom Tromey <tom@tromey.com>
8708
8709 * python/python.c (compute_python_string): Return std::string.
8710 (gdbpy_eval_from_control_command): Update.
8711 (do_start_initialization): Use std::string.
8712 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8713 xstrprintf.
8714 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8715 xstrprintf.
8716
8717 2017-08-03 Tom Tromey <tom@tromey.com>
8718
8719 * top.h (do_restore_instream_cleanup): Remove.
8720 * top.c (do_restore_instream_cleanup): Remove.
8721 (read_command_file): Use scoped_restore.
8722 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8723
8724 2017-08-03 Tom Tromey <tom@tromey.com>
8725
8726 * cli/cli-script.c (execute_user_command)
8727 (execute_control_command): Use scoped_restore.
8728
8729 2017-08-03 Tom Tromey <tom@tromey.com>
8730
8731 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8732 (execute_user_command): Remove user_call_depth; use
8733 user_args_stack's size instead.
8734
8735 2017-08-03 Tom Tromey <tom@tromey.com>
8736
8737 * top.h (in_user_command): Remove.
8738 * top.c (in_user_command): Remove.
8739 * cli/cli-script.c (do_restore_user_call_depth)
8740 (execute_user_command): Update.
8741
8742 2017-08-03 Tom Tromey <tom@tromey.com>
8743
8744 * valops.c (search_struct_method): Use gdb::byte_vector.
8745 * valarith.c (value_concat): Use std::vector.
8746 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8747 (simple_search_memory): Likewise.
8748 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8749 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8750 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8751 * elfread.c (elf_rel_plt_read): Use std::string.
8752 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8753 * cli/cli-dump.c (restore_section_callback): Use
8754 gdb::byte_vector.
8755
8756 2017-08-03 Tom Tromey <tom@tromey.com>
8757
8758 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8759
8760 2017-08-03 Tom Tromey <tom@tromey.com>
8761
8762 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8763 (tui_register_format): Use scoped_restore.
8764
8765 2017-08-03 Tom Tromey <tom@tromey.com>
8766
8767 * reverse.c (exec_direction_default): Remove.
8768 (exec_reverse_once): Use scoped_restore.
8769 * remote.c (restore_remote_timeout): Remove.
8770 (remote_flash_erase, remote_flash_write, remote_flash_done)
8771 (readchar, remote_serial_write): Use scoped_restore.
8772 * cli/cli-script.c (struct source_cleanup_lines_args)
8773 (source_cleanup_lines): Remove.
8774 (script_from_file): Use scoped_restore.
8775 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8776 (source_command): Use scoped_restore.
8777
8778 2017-08-03 Tom Tromey <tom@tromey.com>
8779
8780 * utils.h (make_cleanup_free_so): Remove.
8781 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8782 * solist.h (struct so_deleter): New.
8783 (so_list_up): New typedef.
8784 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8785
8786 2017-08-03 Tom Tromey <tom@tromey.com>
8787
8788 * utils.h (make_cleanup_restore_current_language): Remove.
8789 * utils.c (do_restore_current_language)
8790 (make_cleanup_restore_current_language): Remove.
8791 * parse.c (parse_exp_in_context_1)
8792 (parse_expression_with_language): Use
8793 scoped_restore_current_language.
8794 * mi/mi-main.c (mi_cmd_execute): Use
8795 scoped_restore_current_language.
8796 * language.h (scoped_restore_current_language): New class.
8797
8798 2017-08-03 Tom Tromey <tom@tromey.com>
8799
8800 * compile/compile.c (cleanup_unlink_file): Remove.
8801 (compile_to_object): Use gdb::unlinker.
8802 (eval_compile_command): Likewise.
8803
8804 2017-08-03 Tom Tromey <tom@tromey.com>
8805
8806 * utils.h (make_cleanup_fclose): Remove.
8807 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8808
8809 2017-08-03 Tom Tromey <tom@tromey.com>
8810
8811 * top.c (open_terminal_stream): Return gdb_file_up.
8812 (new_ui_command): Update.
8813
8814 2017-08-03 Tom Tromey <tom@tromey.com>
8815
8816 * source.c (print_source_lines_base, forward_search_command)
8817 (reverse_search_command): Use gdb_file_up.
8818
8819 2017-08-03 Tom Tromey <tom@tromey.com>
8820
8821 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8822
8823 2017-08-03 Tom Tromey <tom@tromey.com>
8824
8825 * cli/cli-cmds.c (find_and_open_script): Change return type.
8826 Remove "streamp" and "full_path" parameters.
8827 (source_script_with_search): Update.
8828 * auto-load.c (source_script_file): Update.
8829 * cli/cli-cmds.h (find_and_open_script): Change type.
8830 (open_script): New struct.
8831
8832 2017-08-03 Tom Tromey <tom@tromey.com>
8833
8834 * xml-support.c (xml_fetch_content_from_file): Update.
8835 * ui-file.c (stdio_file::open): Update.
8836 * tracefile-tfile.c (tfile_start): Update.
8837 * remote.c (remote_file_put, remote_file_get): Update.
8838 * nat/linux-procfs.c (linux_proc_get_int)
8839 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8840 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8841 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8842 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8843 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8844 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8845 * linux-nat.c (linux_proc_pending_signals): Update.
8846 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8847 (file_closer): Remove.
8848 * compile/compile.c (compile_to_object): Update.
8849 * common/filestuff.h (struct gdb_file_deleter): New.
8850 (gdb_file_up): New typedef.
8851 (gdb_fopen_cloexec): Change return type.
8852 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8853 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8854 (dump_binary_file, restore_binary_file): Update.
8855 * auto-load.c (auto_load_objfile_script_1): Update.
8856
8857 2017-08-03 Tom Tromey <tom@tromey.com>
8858
8859 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8860 (info_static_tracepoint_markers_command): Likewise.
8861 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8862 * skip.c (skip_info): Use ui_out_emit_table.
8863 * progspace.c (print_program_space): Use ui_out_emit_table.
8864 * osdata.c (info_osdata): Use ui_out_emit_table.
8865 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8866 ui_out_emit_table.
8867 * linux-thread-db.c (info_auto_load_libthread_db): Use
8868 ui_out_emit_table.
8869 * inferior.c (print_inferior): Use ui_out_emit_table.
8870 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8871 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8872 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8873 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8874 * ui-out.h (class ui_out_emit_table): New.
8875
8876 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8877
8878 * mips-tdep.c (mips_fpu_type_str): New function.
8879 (mips_dump_tdep): Call it.
8880
8881 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8882
8883 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8884 `->mips_fpu_type'.
8885
8886 2017-07-31 Xavier Roirand <roirand@adacore.com>
8887
8888 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8889
8890 2017-07-27 Xavier Roirand <roirand@adacore.com>
8891
8892 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8893
8894 2017-07-26 Yao Qi <yao.qi@linaro.org>
8895
8896 * cli/cli-cmds.c (maintenancechecklist): New variable.
8897 * gdbcmd.h (maintenancechecklist): Declare it.
8898 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8899 Call i386_linux_read_description with different masks.
8900 * maint.c (maintenance_check_command): New function.
8901 (_initialize_maint_cmds): Call add_prefix_cmd.
8902 * target-descriptions.c (tdesc_reg): override operator != and ==.
8903 (tdesc_type): Likewise.
8904 (tdesc_feature): Likewise.
8905 (target_desc): Likewise.
8906 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8907 (maintenance_check_xml_descriptions): New function.
8908 (_initialize_target_descriptions) Add command "xml-descriptions".
8909 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8910
8911 2017-07-26 Yao Qi <yao.qi@linaro.org>
8912
8913 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8914 Include features/i386/32bit-*.c.
8915 (i386_linux_read_description): Generate target description if it
8916 doesn't exist.
8917 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8918 functions.
8919 * features/i386/32bit-linux.c: Re-generated.
8920 * features/i386/32bit-sse.c: Likewise.
8921 * target-descriptions.c (print_c_feature::visit): Print code to
8922 set register number if needed.
8923 (print_c_feature) <m_next_regnum>: New field.
8924
8925 2017-07-26 Yao Qi <yao.qi@linaro.org>
8926
8927 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8928 (FEATURE_XMLFILES): New.
8929 (FEATURE_CFILES): New.
8930 New rules.
8931 (clean-cfiles): Remove generated c files.
8932 * features/i386/32bit-avx.c: Generated.
8933 * features/i386/32bit-avx512.c: Generated.
8934 * features/i386/32bit-core.c: Generated.
8935 * features/i386/32bit-linux.c: Generated.
8936 * features/i386/32bit-mpx.c: Generated.
8937 * features/i386/32bit-pkeys.c: Generated.
8938 * features/i386/32bit-sse.c: Generated.
8939 * target-descriptions.c: Include algorithm.
8940 (tdesc_element_visitor): Add method visit_end.
8941 (print_c_tdesc): Implement visit_end.
8942 (print_c_tdesc:: m_filename_after_features): Move it to
8943 protected.
8944 (print_c_feature): New class.
8945 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8946 name starts with "i386/32bit-".
8947
8948 2017-07-26 Yao Qi <yao.qi@linaro.org>
8949
8950 * target-descriptions.c (tdesc_element_visitor): New class.
8951 (tdesc_element): New class.
8952 (tdesc_reg): Inherit from tdesc_element.
8953 (tdesc_reg::accept): New function.
8954 (tdesc_type): Inherit from tdesc_element.
8955 (tdesc_type::accept): New function.
8956 (tdesc_feature): Inherit from tdesc_element.
8957 (tdesc_feature::accept): New function.
8958 (target_desc): Inherit from tdesc_element.
8959 (target_desc::target_desc): New.
8960 (target_desc::~target_desc): New.
8961 (target_desc::accept): New.
8962 (allocate_target_description): Use new.
8963 (free_target_description): Use delete.
8964 (print_c_tdesc): New class.
8965 (maint_print_c_tdesc_cmd): Adjust.
8966
8967 * features/aarch64.c: Re-generated.
8968 * features/arc-arcompact.c: Re-generated.
8969 * features/arc-v2.c: Re-generated.
8970 * features/arm/arm-with-iwmmxt.c: Re-generated.
8971 * features/arm/arm-with-m.c: Re-generated.
8972 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8973 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8974 * features/arm/arm-with-neon.c: Re-generated.
8975 * features/arm/arm-with-vfpv2.c: Re-generated.
8976 * features/arm/arm-with-vfpv3.c: Re-generated.
8977 * features/i386/amd64-avx-avx512.c: Re-generated.
8978 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8979 * features/i386/amd64-avx.c: Re-generated.
8980 * features/i386/amd64-avx-linux.c: Re-generated.
8981 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8982 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8983 * features/i386/amd64-avx-mpx.c: Re-generated.
8984 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8985 * features/i386/amd64.c: Re-generated.
8986 * features/i386/amd64-linux.c: Re-generated.
8987 * features/i386/amd64-mpx.c: Re-generated.
8988 * features/i386/amd64-mpx-linux.c: Re-generated.
8989 * features/i386/i386-avx-avx512.c: Re-generated.
8990 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8991 * features/i386/i386-avx.c: Re-generated.
8992 * features/i386/i386-avx-linux.c: Re-generated.
8993 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8994 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8995 * features/i386/i386-avx-mpx.c: Re-generated.
8996 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8997 * features/i386/i386.c: Re-generated.
8998 * features/i386/i386-linux.c: Re-generated.
8999 * features/i386/i386-mmx.c: Re-generated.
9000 * features/i386/i386-mmx-linux.c: Re-generated.
9001 * features/i386/i386-mpx.c: Re-generated.
9002 * features/i386/i386-mpx-linux.c: Re-generated.
9003 * features/i386/x32-avx-avx512.c: Re-generated.
9004 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9005 * features/i386/x32-avx.c: Re-generated.
9006 * features/i386/x32-avx-linux.c: Re-generated.
9007 * features/i386/x32.c: Re-generated.
9008 * features/i386/x32-linux.c: Re-generated.
9009 * features/microblaze.c: Re-generated.
9010 * features/microblaze-with-stack-protect.c: Re-generated.
9011 * features/mips64-dsp-linux.c: Re-generated.
9012 * features/mips64-linux.c: Re-generated.
9013 * features/mips-dsp-linux.c: Re-generated.
9014 * features/mips-linux.c: Re-generated.
9015 * features/nds32.c: Re-generated.
9016 * features/nios2.c: Re-generated.
9017 * features/nios2-linux.c: Re-generated.
9018 * features/rs6000/powerpc-32.c: Re-generated.
9019 * features/rs6000/powerpc-32l.c: Re-generated.
9020 * features/rs6000/powerpc-403.c: Re-generated.
9021 * features/rs6000/powerpc-403gc.c : Re-generated.
9022 * features/rs6000/powerpc-405.c: Re-generated.
9023 * features/rs6000/powerpc-505.c: Re-generated.
9024 * features/rs6000/powerpc-601.c: Re-generated.
9025 * features/rs6000/powerpc-602.c: Re-generated.
9026 * features/rs6000/powerpc-603.c: Re-generated.
9027 * features/rs6000/powerpc-604.c: Re-generated.
9028 * features/rs6000/powerpc-64.c: Re-generated.
9029 * features/rs6000/powerpc-64l.c: Re-generated.
9030 * features/rs6000/powerpc-7400.c: Re-generated.
9031 * features/rs6000/powerpc-750.c: Re-generated.
9032 * features/rs6000/powerpc-860.c: Re-generated.
9033 * features/rs6000/powerpc-altivec32.c: Re-generated.
9034 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9035 * features/rs6000/powerpc-altivec64.c: Re-generated.
9036 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9037 * features/rs6000/powerpc-cell32l.c: Re-generated.
9038 * features/rs6000/powerpc-cell64l.c: Re-generated.
9039 * features/rs6000/powerpc-e500.c: Re-generated.
9040 * features/rs6000/powerpc-e500l.c: Re-generated.
9041 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9042 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9043 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9044 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9045 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9046 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9047 * features/rs6000/powerpc-vsx32.c: Re-generated.
9048 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9049 * features/rs6000/powerpc-vsx64.c: Re-generated.
9050 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9051 * features/rs6000/rs6000.c: Re-generated.
9052 * features/s390-linux32.c: Re-generated.
9053 * features/s390-linux32v1.c: Re-generated.
9054 * features/s390-linux32v2.c: Re-generated.
9055 * features/s390-linux64.c: Re-generated.
9056 * features/s390-linux64v1.c: Re-generated.
9057 * features/s390-linux64v2.c: Re-generated.
9058 * features/s390-te-linux64.c: Re-generated.
9059 * features/s390-tevx-linux64.c: Re-generated.
9060 * features/s390-vx-linux64.c: Re-generated.
9061 * features/s390x-linux64.c: Re-generated.
9062 * features/s390x-linux64v1.c: Re-generated.
9063 * features/s390x-linux64v2.c: Re-generated.
9064 * features/s390x-te-linux64.c: Re-generated.
9065 * features/s390x-tevx-linux64.c: Re-generated.
9066 * features/s390x-vx-linux64.c: Re-generated.
9067 * features/sparc/sparc32-solaris.c: Re-generated.
9068 * features/sparc/sparc64-solaris.c: Re-generated.
9069 * features/tic6x-c62x.c: Re-generated.
9070 * features/tic6x-c62x-linux.c: Re-generated.
9071 * features/tic6x-c64x.c: Re-generated.
9072 * features/tic6x-c64x-linux.c: Re-generated.
9073 * features/tic6x-c64xp.c: Re-generated.
9074 * features/tic6x-c64xp-linux.c: Re-generated.
9075
9076 2017-07-26 Yao Qi <yao.qi@linaro.org>
9077
9078 * i386-linux-tdep.c (i386_linux_read_description): New function.
9079 (i386_linux_core_read_description): Call
9080 i386_linux_read_description.
9081 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9082 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9083 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9084 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9085 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9086 * x86-linux-nat.c (x86_linux_read_description): Call
9087 i386_linux_read_description.
9088
9089 2017-07-26 Yao Qi <yao.qi@linaro.org>
9090
9091 * NEWS: Mention it.
9092 * features/Makefile (%.c: %.xml): Pass the xml file name to
9093 command "maint print c-tdesc".
9094 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9095 name from 'arg'.
9096
9097 2017-07-26 Yao Qi <yao.qi@linaro.org>
9098
9099 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9100 in-class initialization.
9101 (tdesc_create_feature): Call new instead of XCNEW.
9102 (free_target_description): Ue delete.
9103
9104 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9105
9106 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9107
9108 2017-07-25 Yao Qi <yao.qi@linaro.org>
9109
9110 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9111 constant.
9112 (amd64_x32_init_abi): Likewise.
9113 * amd64-tdep.h (amd64_init_abi): Update declaration.
9114 (amd64_x32_init_abi): Likewise.
9115
9116 2017-07-25 Yao Qi <yao.qi@linaro.org>
9117
9118 PR tdep/21717
9119 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9120 condition for FPSCR.
9121 (arm_linux_store_inferior_registers): Likewise.
9122
9123 2017-07-22 Tom Tromey <tom@tromey.com>
9124
9125 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9126 <syscalls_counts>: Now a std::vector.
9127 (get_catch_syscall_inferior_data): Use "new".
9128 (catch_syscall_inferior_data_cleanup): Use "delete".
9129 (insert_catch_syscall, remove_catch_syscall)
9130 (clear_syscall_counts): Update.
9131
9132 2017-07-22 Tom Tromey <tom@tromey.com>
9133
9134 * break-catch-syscall.c (syscall_catchpoint)
9135 <syscalls_to_be_caught>: Now a std::vector<int>
9136 (~syscall_catchpoint): Remove.
9137 (insert_catch_syscall, remove_catch_syscall)
9138 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9139 (print_mention_catch_syscall, print_recreate_catch_syscall):
9140 Update.
9141 (create_syscall_event_catchpoint): Change type of "filter"
9142 parameter.
9143 (catch_syscall_split_args): Return a std::vector.
9144 (catch_syscall_command_1, catching_syscall_number_1): Update.
9145
9146 2017-07-22 Tom Tromey <tom@tromey.com>
9147
9148 * break-catch-throw.c (struct exception_catchpoint)
9149 <exception_rx>: Now a std::string.
9150 (~exception_catchpoint): Remove.
9151 (print_one_detail_exception_catchpoint): Update.
9152 (handle_gnu_v3_exceptions): Change type of except_rx.
9153 (extract_exception_regexp): Return a std::string.
9154 (catch_exception_command_1): Update.
9155
9156 2017-07-22 Tom Tromey <tom@tromey.com>
9157
9158 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9159 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9160 std::vector.
9161 <catch_all>: Now a bool.
9162 (~signal_catchpoint): Remove.
9163 (signal_catchpoint_insert_location)
9164 (signal_catchpoint_remove_location)
9165 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9166 (signal_catchpoint_print_mention)
9167 (signal_catchpoint_print_recreate)
9168 (signal_catchpoint_explains_signal): Update.
9169 (create_signal_catchpoint): Change type of "filter" and
9170 "catch_all".
9171 (catch_signal_split_args): Return a std::vector. Change type of
9172 "catch_all".
9173 (catch_signal_command): Update.
9174
9175 2017-07-20 Pedro Alves <palves@redhat.com>
9176
9177 * ada-lang.c (ada_language_defn): Make extern.
9178 (_initialize_ada_language): Remove add_language call.
9179 * c-lang.c (c_language_defn, cplus_language_defn)
9180 (asm_language_defn, minimal_language_defn): Make extern.
9181 (_initialize_c_language): Delete.
9182 * completer.c (compare_cstrings): Delete, moved to utils.h.
9183 * d-lang.c (d_language_defn): Make extern.
9184 (_initialize_d_language): Remove add_language calls.
9185 * defs.h (enum language): Add comment.
9186 * f-lang.c (f_language_defn): Make extern.
9187 (_initialize_f_language): Remove add_language call.
9188 * go-lang.c (go_language_defn): Make extern.
9189 (_initialize_go_language): Remove add_language call.
9190 * language.c: Include <algorithm>.
9191 (languages): Redefine as const array.
9192 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9193 (set_language_command): Handle "local". Use for-range loop.
9194 (set_language): Remove loop.
9195 (language_enum): Rewrite.
9196 (language_def, language_str): Remove loops.
9197 (add_language): Delete.
9198 (add_set_language_command): New, based on add_languages.
9199 (skip_language_trampoline): Adjust.
9200 (local_language_defn): Delete.
9201 (language_gdbarch_post_init): Adjust.
9202 (_initialize_language): Remove add_language calls. Call
9203 add_set_language_command.
9204 * language.h (add_language): Delete.
9205 (auto_language_defn)
9206 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9207 (asm_language_defn, c_language_defn, cplus_language_defn)
9208 (d_language_defn, f_language_defn, go_language_defn)
9209 (m2_language_defn, objc_language_defn, opencl_language_defn)
9210 (pascal_language_defn, rust_language_defn): Declare.
9211 * m2-lang.c (m2_language_defn): Make extern.
9212 (_initialize_m2_language): Remove add_language call.
9213 * objc-lang.c (objc_language_defn): Make extern.
9214 (_initialize_objc_language): Remove add_language call.
9215 * opencl-lang.c (opencl_language_defn): Make extern.
9216 (_initialize_opencl_language): Remove add_language call.
9217 * p-lang.c (pascal_language_defn): Make extern.
9218 (_initialize_pascal_language): Delete.
9219 * rust-lang.c (rust_language_defn): Make extern.
9220 (_initialize_rust_language): Delete.
9221 * utils.h (compare_cstrings): New static inline function.
9222
9223 2017-07-20 Pedro Alves <palves@redhat.com>
9224
9225 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9226 (get_var_value): Constify parameters.
9227 (get_int_var_value): Change prototype.
9228 (to_fixed_range_type): Adjust.
9229 * ada-lang.h (get_int_var_value): Change prototype.
9230
9231 2017-07-20 Pedro Alves <palves@redhat.com>
9232
9233 * dwarf2read.c (dw2_lookup_symbol): Use
9234 SYMBOL_MATCHES_SEARCH_NAME.
9235 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9236
9237 2017-07-20 Pedro Alves <palves@redhat.com>
9238
9239 * block.c (block_iter_name_step, block_iter_name_first)
9240 (block_iter_name_next): Delete.
9241 (block_lookup_symbol_primary): Adjust to use
9242 dict_iter_match_first/dict_iter_match_next.
9243 * block.h (block_iter_name_first, block_iter_name_next): Delete
9244 declarations.
9245 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9246 dict_iter_match_first/dict_iter_match_next.
9247
9248 2017-07-20 Pedro Alves <palves@redhat.com>
9249
9250 * cp-support.c (cp_find_first_component_aux): Add missing case for
9251 end of string.
9252
9253 2017-07-18 David Blaikie <dblaikie@gmail.com>
9254
9255 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9256 of dwo_cu's dwo_file.
9257
9258 2017-07-18 Yao Qi <yao.qi@linaro.org>
9259
9260 * remote.c (store_registers_using_G): Remove one line comment.
9261
9262 2017-07-18 Yao Qi <yao.qi@linaro.org>
9263
9264 * regcache.c (regcache_cpy): Simplify it.
9265 (regcache::cpy_no_passthrough): Remove it.
9266 * regcache.h (cpy_no_passthrough): Remove it.
9267 (regcache_dup, regcache_cpy): Update comments.
9268
9269 2017-07-18 Pedro Alves <palves@redhat.com>
9270
9271 * remote-sim.c (sim_command_completer): Adjust to work with a
9272 completion_tracker instead of a VEC.
9273
9274 2017-07-17 Pedro Alves <palves@redhat.com>
9275
9276 * completer.c (complete_source_filenames): New function.
9277 (complete_address_and_linespec_locations): New function.
9278 (location_completer): Use complete_address_and_linespec_locations.
9279 (completion_tracker::build_completion_result): Honor the tracker's
9280 request to suppress append.
9281 * completer.h (completion_tracker::suppress_append_ws)
9282 (completion_tracker::set_suppress_append_ws): New methods.
9283 (completion_tracker::m_suppress_append_ws): New field.
9284 (complete_source_filenames): New declaration.
9285 * linespec.c (linespec_complete_what): New.
9286 (struct ls_parser) <complete_what, completion_word,
9287 completion_quote_char, completion_quote_end, completion_tracker>:
9288 New fields.
9289 (string_find_incomplete_keyword_at_end): New.
9290 (linespec_lexer_lex_string): Record quote char. If in completion
9291 mode, don't throw.
9292 (linespec_lexer_consume_token): Advance the completion word point.
9293 (linespec_lexer_peek_token): Save/restore completion info.
9294 (save_stream_and_consume_token): New.
9295 (set_completion_after_number): New.
9296 (linespec_parse_basic): Set what to complete next depending on
9297 token. Handle function and label completions specially.
9298 (parse_linespec): Disable objc shortcut in completion mode. Set
9299 what to complete next depending on token type. Skip keyword if in
9300 completion mode.
9301 (complete_linespec_component, linespec_complete): New.
9302 * linespec.h (linespec_complete): Declare.
9303
9304 2017-07-17 Pedro Alves <palves@redhat.com>
9305
9306 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9307 Handle 'operator<' / 'operator<<'.
9308
9309 2017-07-17 Pedro Alves <palves@redhat.com>
9310
9311 * completer.c (collect_explicit_location_matches): Handle
9312 MATCH_LABEL.
9313 (convert_explicit_location_to_linespec): New, factored out from
9314 ...
9315 (convert_explicit_location_to_sals): ... this.
9316 (complete_label): New.
9317 (linespec_complete_label, find_label_symbols_in_block): New.
9318 (find_label_symbols): Add completion_mode parameter and adjust to
9319 call find_label_symbols_in_block.
9320 * linespec.h (linespec_complete_label): Declare.
9321
9322 2017-07-17 Pedro Alves <palves@redhat.com>
9323
9324 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9325 complete_symbol_mode parameter.
9326 * cli/cli-cmds.c (complete_command): Get the completion result out
9327 of the handle_brkchars tracker if used a custom word point.
9328 * completer.c: Include "linespec.h".
9329 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9330 (advance_to_expression_complete_word_point): New.
9331 (completion_tracker::completes_to_completion_word): New.
9332 (complete_files_symbols): Pass down
9333 complete_symbol_mode::EXPRESSION.
9334 (explicit_options, probe_options): New.
9335 (collect_explicit_location_matches): Complete on the
9336 explictit_loc->foo instead of word. Use
9337 linespec_complete_function. Handle MATCH_LINE. Handle offering
9338 keyword and options completions.
9339 (backup_text_ptr): Delete.
9340 (skip_keyword): New.
9341 (complete_explicit_location): Remove 'word' parameter. Add
9342 language, quoted_arg_start and quoted_arg_end parameters.
9343 Rewrite, parsing left to right.
9344 (location_completer): Rewrite.
9345 (location_completer_handle_brkchars): New function.
9346 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9347 (enum complete_line_internal_reason): Adjust comments.
9348 (completion_tracker::discard_completions): New.
9349 (completer_handle_brkchars_func_for_completer): Handle
9350 location_completer.
9351 (gdb_custom_word_point_brkchars)
9352 (gdb_org_rl_basic_quote_characters): New.
9353 (gdb_completion_word_break_characters_throw)
9354 (completion_find_completion_word): Handle trackers that use a
9355 custom word point.
9356 (completion_tracker::advance_custom_word_point_by): New.
9357 (completion_tracker::build_completion_result): Don't rely on
9358 readline appending the quote char.
9359 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9360 use a custom word point.
9361 (gdb_rl_attempted_completion_function): Restore
9362 rl_basic_quote_characters.
9363 * completer.h (class completion_tracker): Extend intro comment.
9364 (completion_tracker::set_quote_char)
9365 (completion_tracker::quote_char)
9366 (completion_tracker::set_use_custom_word_point)
9367 (completion_tracker::use_custom_word_point)
9368 (completion_tracker::custom_word_point)
9369 (completion_tracker::set_custom_word_point)
9370 (completion_tracker::advance_custom_word_point_by)
9371 (completion_tracker::completes_to_completion_word)
9372 (completion_tracker::discard_completions): New methods.
9373 (completion_tracker::m_quote_char)
9374 (completion_tracker::m_use_custom_word_point)
9375 (completion_tracker::m_custom_word_point): New fields.
9376 (advance_to_expression_complete_word_point): Declare.
9377 * f-lang.c (f_collect_symbol_completion_matches): Add
9378 complete_symbol_mode parameter.
9379 * language.h (struct language_defn)
9380 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9381 parameter.
9382 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9383 (linespec_complete_function): New function.
9384 (linespec_lexer_lex_keyword): Adjust.
9385 * linespec.h (linespec_keywords, linespec_complete_function): New
9386 declarations.
9387 * location.c (find_end_quote): New function.
9388 (explicit_location_lex_one): Add explicit_completion_info
9389 parameter. Save quoting info. Don't throw if being called for
9390 completion. Don't handle Ada operators here.
9391 (is_cp_operator, skip_op_false_positives, first_of)
9392 (explicit_location_lex_one_function): New function.
9393 (string_to_explicit_location): Replace 'dont_throw' parameter with
9394 an explicit_completion_info pointer parameter. Handle it. Don't
9395 use explicit_location_lex_one to lex function names. Use
9396 explicit_location_lex_one_function instead.
9397 * location.h (struct explicit_completion_info): New.
9398 (string_to_explicit_location): Replace 'dont_throw' parameter with
9399 an explicit_completion_info pointer parameter.
9400 * symtab.c (default_collect_symbol_completion_matches_break_on):
9401 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9402 (default_collect_symbol_completion_matches)
9403 (collect_symbol_completion_matches): Add complete_symbol_mode
9404 parameter.
9405 (collect_symbol_completion_matches_type): Pass down
9406 complete_symbol_mode::EXPRESSION.
9407 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9408 parameter. Handle LINESPEC mode.
9409 * symtab.h (complete_symbol_mode): New.
9410 (default_collect_symbol_completion_matches_break_on)
9411 (default_collect_symbol_completion_matches)
9412 (collect_symbol_completion_matches)
9413 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9414 parameter.
9415
9416 2017-07-17 Pedro Alves <palves@redhat.com>
9417
9418 * utils.c (enum class strncmp_iw_mode): New.
9419 (strcmp_iw): Rename to ...
9420 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9421 parameters. Handle them.
9422 (strncmp_iw): New.
9423 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9424 * utils.h (strncmp_iw): Declare.
9425 (strcmp_iw): Move describing comments here.
9426
9427 2017-07-17 Pedro Alves <palves@redhat.com>
9428
9429 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9430 CP_OPERATOR_STR.
9431 * c-typeprint.c (is_type_conversion_operator): Use
9432 CP_OPERATOR_STR.
9433 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9434 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9435 CP_OPERATOR_LEN.
9436 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9437 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9438 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9439 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9440 CP_OPERATOR_STR.
9441 * location.c: Include "cp-support.h".
9442 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9443 CP_OPERATOR_STR.
9444 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9445 CP_OPERATOR_LEN.
9446
9447 2017-07-17 Pedro Alves <palves@redhat.com>
9448
9449 * cli/cli-cmds.c (complete_command): Use a completion tracker
9450 along with completion_find_completion_word for handle_brkchars
9451 phase.
9452 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9453 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9454 (struct gdb_rl_completion_word_info): New.
9455 (gdb_rl_find_completion_word): New.
9456 (completion_find_completion_word): New.
9457 * completer.h (completion_find_completion_word): Declare.
9458
9459 2017-07-17 Pedro Alves <palves@redhat.com>
9460
9461 * ada-lang.c (symbol_completion_match): Adjust comments.
9462 (symbol_completion_add): Replace vector parameter with
9463 completion_tracker parameter. Use it.
9464 (ada_make_symbol_completion_list): Rename to...
9465 (ada_collect_symbol_completion_matches): ... this. Add
9466 completion_tracker parameter and use it.
9467 (ada_language_defn): Adjust.
9468 * break-catch-syscall.c (catch_syscall_completer): Adjust
9469 prototype and work with completion_tracker instead of VEC.
9470 * breakpoint.c (condition_completer): Adjust prototype and work
9471 with completion_tracker instead of VEC.
9472 * c-lang.c (c_language_defn, cplus_language_defn)
9473 (asm_language_defn, minimal_language_defn): Adjust to renames.
9474 * cli/cli-cmds.c (complete_command): Rework using
9475 completion_tracker. Catch exceptions when completing.
9476 * cli/cli-decode.c (integer_unlimited_completer)
9477 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9478 with completion_tracker instead of VEC.
9479 * command.h (struct completion_tracker): Forward declare.
9480 (completer_ftype, completer_handle_brkchars_ftype): Change
9481 types.
9482 (complete_on_cmdlist, complete_on_enum): Adjust.
9483 * completer.c: Include <algorithm>.
9484 (struct gdb_completer_state): New.
9485 (current_completion): New global.
9486 (readline_line_completion_function): Delete.
9487 (noop_completer, filename_completer)
9488 (filename_completer_handle_brkchars, complete_files_symbols)
9489 (linespec_location_completer): Adjust to work with a
9490 completion_tracker instead of a VEC.
9491 (string_or_empty): New.
9492 (collect_explicit_location_matches): Adjust to work with a
9493 completion_tracker instead of a VEC.
9494 (explicit_location_completer): Rename to ...
9495 (complete_explicit_location): ... this and adjust to work with a
9496 completion_tracker instead of a VEC.
9497 (location_completer): Adjust to work with a completion_tracker
9498 instead of a VEC.
9499 (add_struct_fields): Adjust to work with a completion_list instead
9500 of VEC.
9501 (expression_completer): Rename to ...
9502 (complete_expression): ... this and adjust to work with a
9503 completion_tracker instead of a VEC. Use complete_files_symbols.
9504 (expression_completer): Reimplement on top of complete_expression.
9505 (symbol_completer): Adjust to work with a completion_tracker
9506 instead of a VEC.
9507 (enum complete_line_internal_reason): Add describing comments.
9508 (complete_line_internal_normal_command): Adjust to work with a
9509 completion_tracker instead of a VEC.
9510 (complete_line_internal): Rename to ...
9511 (complete_line_internal_1): ... this and adjust to work with a
9512 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9513 handle_brkchars phase.
9514 (new_completion_tracker): Delete.
9515 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9516 complete_line_internal_1.
9517 (free_completion_tracker): Delete.
9518 (INITIAL_COMPLETION_HTAB_SIZE): New.
9519 (completion_tracker::completion_tracker)
9520 (completion_tracker::~completion_tracker): New.
9521 (maybe_add_completion): Delete.
9522 (completion_tracker::maybe_add_completion)
9523 (completion_tracker::add_completion)
9524 (completion_tracker::add_completions): New.
9525 (throw_max_completions_reached_error): Delete.
9526 (complete_line): Adjust to work with a completion_tracker instead
9527 of a VEC. Don't create a completion_tracker_t or check for max
9528 completions here.
9529 (command_completer, command_completer_handle_brkchars)
9530 (signal_completer, reg_or_group_completer_1)
9531 (reg_or_group_completer, default_completer_handle_brkchars):
9532 Adjust to work with a completion_tracker.
9533 (gdb_completion_word_break_characters_throw): New.
9534 (gdb_completion_word_break_characters): Reimplement.
9535 (line_completion_function): Delete.
9536 (completion_tracker::recompute_lowest_common_denominator)
9537 (expand_preserving_ws)
9538 (completion_tracker::build_completion_result)
9539 (completion_result::completion_result)
9540 (completion_result::completion_result)
9541 (completion_result::~completion_result)
9542 (completion_result::completion_result)
9543 (completion_result::release_match_list, compare_cstrings)
9544 (completion_result::sort_match_list)
9545 (completion_result::reset_match_list)
9546 (gdb_rl_attempted_completion_function_throw)
9547 (gdb_rl_attempted_completion_function): New.
9548 * completer.h (completion_list, struct completion_result)
9549 (class completion_tracker): New.
9550 (complete_line): Add completion_tracker parameter.
9551 (readline_line_completion_function): Delete.
9552 (gdb_rl_attempted_completion_function): New.
9553 (noop_completer, filename_completer, expression_completer)
9554 (location_completer, symbol_completer, command_completer)
9555 (signal_completer, reg_or_group_completer): Update prototypes.
9556 (completion_tracker_t, new_completion_tracker)
9557 (make_cleanup_free_completion_tracker): Delete.
9558 (enum maybe_add_completion_enum): Delete.
9559 (maybe_add_completion): Delete.
9560 (throw_max_completions_reached_error): Delete.
9561 * corefile.c (complete_set_gnutarget): Adjust to work with a
9562 completion_tracker instead of a VEC.
9563 * cp-abi.c (cp_abi_completer): Adjust to work with a
9564 completion_tracker instead of a VEC.
9565 * d-lang.c (d_language_defn): Adjust.
9566 * disasm.c (disassembler_options_completer): Adjust to work with a
9567 completion_tracker instead of a VEC.
9568 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9569 (f_collect_symbol_completion_matches): ... this. Adjust to work
9570 with a completion_tracker instead of a VEC.
9571 (f_language_defn): Adjust.
9572 * go-lang.c (go_language_defn): Adjust.
9573 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9574 Adjust to work with a completion_tracker instead of a VEC.
9575 * infrun.c (handle_completer): Likewise.
9576 * interps.c (interpreter_completer): Likewise.
9577 * interps.h (interpreter_completer): Likewise.
9578 * language.c (unknown_language_defn, auto_language_defn)
9579 (local_language_defn): Adjust.
9580 * language.h (language_defn::la_make_symbol_completion_list):
9581 Rename to ...
9582 (language_defn::la_collect_symbol_completion_matches): ... this
9583 and adjust to work with a completion_tracker instead of a VEC.
9584 * m2-lang.c (m2_language_defn): Adjust.
9585 * objc-lang.c (objc_language_defn): Adjust.
9586 * opencl-lang.c (opencl_language_defn): Adjust.
9587 * p-lang.c (pascal_language_defn): Adjust.
9588 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9589 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9590 with a completion_tracker.
9591 * rust-lang.c (rust_language_defn): Adjust.
9592 * symtab.c (free_completion_list, do_free_completion_list)
9593 (return_val, completion_tracker): Delete.
9594 (completion_list_add_name, completion_list_add_symbol)
9595 (completion_list_add_msymbol, completion_list_objc_symbol)
9596 (completion_list_add_fields, add_symtab_completions): Add
9597 completion_tracker parameter and use it.
9598 (default_make_symbol_completion_list_break_on_1): Rename to...
9599 (default_collect_symbol_completion_matches_break_on): ... this.
9600 Add completion_tracker parameter and use it instead of allocating
9601 a completion tracker here.
9602 (default_make_symbol_completion_list_break_on): Delete old
9603 implementation.
9604 (default_make_symbol_completion_list): Delete.
9605 (default_collect_symbol_completion_matches): New.
9606 (make_symbol_completion_list): Delete.
9607 (collect_symbol_completion_matches): New.
9608 (make_symbol_completion_type): Rename to ...
9609 (collect_symbol_completion_matches_type): ... this. Add
9610 completion_tracker parameter and use it instead of VEC.
9611 (make_file_symbol_completion_list_1): Rename to...
9612 (collect_file_symbol_completion_matches): ... this. Add
9613 completion_tracker parameter and use it instead of VEC.
9614 (make_file_symbol_completion_list): Delete.
9615 (add_filename_to_list): Use completion_list instead of a VEC.
9616 (add_partial_filename_data::list): Now a completion_list.
9617 (make_source_files_completion_list): Work with a completion_list
9618 instead of a VEC.
9619 * symtab.h: Include "completer.h".
9620 (default_make_symbol_completion_list_break_on)
9621 (default_make_symbol_completion_list, make_symbol_completion_list)
9622 (make_symbol_completion_type, make_file_symbol_completion_list)
9623 (make_source_files_completion_list): Delete.
9624 (default_collect_symbol_completion_matches_break_on)
9625 (default_collect_symbol_completion_matches)
9626 (collect_symbol_completion_matches)
9627 (collect_symbol_completion_matches_type)
9628 (collect_file_symbol_completion_matches)
9629 (make_source_files_completion_list): New.
9630 * top.c (init_main): Don't install a rl_completion_entry_function
9631 hook. Install a rl_attempted_completion_function hook instead.
9632 * tui/tui-layout.c (layout_completer): Adjust to work with a
9633 completion_tracker.
9634 * tui/tui-regs.c (tui_reggroup_completer):
9635 * tui/tui-win.c (window_name_completer, focus_completer)
9636 (winheight_completer): Adjust to work with a completion_tracker.
9637 * value.c: Include "completer.h".
9638 (complete_internalvar): Adjust to work with a completion_tracker.
9639 * value.h (complete_internalvar): Likewise.
9640
9641 2017-07-17 Pedro Alves <palves@redhat.com>
9642
9643 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9644 renames.
9645 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9646 comments to completer_ftype's declaration.
9647 <completer_handle_brkchars>: Change type to
9648 completer_handle_brkchars_ftype.
9649 * command.h (completer_ftype): Add describing comment and give
9650 names to parameters.
9651 (completer_ftype_void): Rename to ...
9652 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9653 (set_cmd_completer_handle_brkchars): Adjust.
9654 * completer.c (filename_completer_handle_brkchars): New function.
9655 (complete_line_internal_normal_command): New function, factored
9656 out from ...
9657 (complete_line_internal): ... here.
9658 (command_completer_handle_brkchars)
9659 (default_completer_handle_brkchars)
9660 (completer_handle_brkchars_func_for_completer): New functions.
9661 * completer.h (set_gdb_completion_word_break_characters): Delete
9662 declaration.
9663 (completer_handle_brkchars_func_for_completer): New declaration.
9664 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9665 completer_handle_brkchars_func_for_completer.
9666
9667 2017-07-17 Pedro Alves <palves@redhat.com>
9668
9669 * completer.c (symbol_completer): New function, based on
9670 make_symbol_completion_list_fn.
9671 * completer.h (symbol_completer): New declaration.
9672 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9673 * python/py-cmd.c (completers): Adjust.
9674 * symtab.c (make_symbol_completion_list_fn): Delete.
9675 * symtab.h (make_symbol_completion_list_fn): Delete.
9676 * cli/cli-decode.c (add_cmd): Adjust.
9677
9678 2017-07-17 Pedro Alves <palves@redhat.com>
9679
9680 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9681 * dwarf2read.c: Include "filename-seen-cache.h".
9682 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9683 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9684 * filename-seen-cache.c: New file.
9685 * filename-seen-cache.h: New file.
9686 * symtab.c: Include "filename-seen-cache.h".
9687 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9688 (create_filename_seen_cache, clear_filename_seen_cache)
9689 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9690 to filename-seen-cache.h/filename-seen-cache.c.
9691 (output_source_filename, sources_info)
9692 (maybe_add_partial_symtab_filename)
9693 (make_source_files_completion_list): Adjust to use
9694 filename_seen_cache.
9695
9696 2017-07-17 Pedro Alves <palves@redhat.com>
9697
9698 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9699 fields.
9700 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9701 dwarf2_debug_sections*)): New.
9702 (dwarf2_per_objfile::dwarf2_per_objfile(const
9703 dwarf2_per_objfile&)): Declare as deleted.
9704 (dwarf2_per_objfile::operator=): Declare as deleted.
9705 (dwarf2_per_objfile::dwarf2_per_objfile)
9706 (dwarf2_per_objfile::~dwarf2_per_objfile)
9707 (dwarf2_per_objfile::free_cached_comp_units): New.
9708 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9709 ctor. Call dwarf2_per_objfile's ctor manually.
9710 (dwarf2_locate_sections): Deleted/refactored as ...
9711 (dwarf2_per_objfile::locate_sections): ... this new method.
9712 (free_cached_comp_units): Defer to
9713 dwarf2_per_objfile::free_cached_comp_units.
9714 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9715
9716 2017-07-14 Tom Tromey <tom@tromey.com>
9717
9718 PR rust/21764:
9719 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9720 parameter.
9721 <UNOP_SIZEOF>: Split into separate case.
9722 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9723
9724 2017-07-14 Tom Tromey <tom@tromey.com>
9725
9726 PR rust/21763:
9727 * symtab.c (symbol_matches_domain): Add language_rust to special
9728 case.
9729 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9730 treat LOC_TYPEDEF symbols as variables.
9731
9732 2017-07-14 Pedro Alves <palves@redhat.com>
9733
9734 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9735 symtabs matching all symtabs with SRCFILE as file name instead of
9736 only considering the first hit, with lookup_symtab.
9737
9738 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9739
9740 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9741 operator_name parameters.
9742 (gen_expr): Update function call.
9743
9744 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9745
9746 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9747 parameter.
9748 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9749 Likewise.
9750 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9751 parameter, use agent_expr::gdbarch instead, update function
9752 calls.
9753 (locexpr_tracepoint_var_ref): Likewise.
9754 (loclist_tracepoint_var_ref): Likewise.
9755 * ax-gdb.c (gen_trace_static_fields): Likewise.
9756 (gen_traced_pop): Likewise.
9757 (gen_frame_args_address): Likewise.
9758 (gen_frame_locals_address): Likewise.
9759 (gen_var_ref): Likewise.
9760 (gen_struct_ref_recursive): Likewise.
9761 (gen_static_field): Likewise.
9762 (gen_maybe_namespace_elt): Likewise.
9763 (gen_expr): Likewise.
9764 (gen_trace_for_var): Likewise.
9765 (gen_trace_for_expr): Likewise.
9766 (gen_trace_for_return_address): Likewise.
9767
9768 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9769
9770 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9771 parameter.
9772 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9773
9774 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9775
9776 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9777 from ax, update calls.
9778 (gen_usual_arithmetic): Likewise.
9779 (gen_integral_promotions): Likewise.
9780 (gen_bitfield_ref): Likewise.
9781 (gen_primitive_field): Likewise.
9782 (gen_struct_ref_recursive): Likewise.
9783 (gen_struct_ref): Likewise.
9784 (gen_maybe_namespace_elt): Likewise.
9785 (gen_struct_elt_for_reference): Likewise.
9786 (gen_namespace_elt): Likewise.
9787 (gen_aggregate_elt_ref): Likewise.
9788 (gen_expr): Get gdbarch from ax, update calls.
9789 (gen_expr_binop_rest): Likewise.
9790
9791 2017-07-13 Pedro Alves <palves@redhat.com>
9792
9793 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9794 as default tdesc.
9795 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9796 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9797 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9798 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9799 tdep.
9800 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9801 Get final tdesc from the tdep.
9802 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9803 default tdesc.
9804 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9805 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9806 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9807 Use it as default tdesc.
9808 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9809 down to amd_init_abi. No longer handle fallback tdesc here.
9810 * amd64-tdep.h (tdesc_x32): Declare.
9811 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9812 parameter.
9813 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9814 as default tdesc.
9815
9816 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9817
9818 * s390-linux-tdep.c (s390_process_record): Add support for
9819 instructions new in arch12.
9820
9821 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9822
9823 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9824 PT_GETFSBASE and PT_GETGSBASE.
9825 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9826 PT_SETGSBASE.
9827
9828 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9829
9830 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9831 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9832 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9833 those rules.
9834 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9835 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9836 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9837 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9838 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9839 * features/i386/amd64.xml: Add 64bit-segments.xml.
9840 * features/i386/amd64-avx-avx512.c: Regenerated.
9841 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9842 * features/i386/amd64-avx-mpx.c: Regenerated.
9843 * features/i386/amd64-avx.c: Regenerated.
9844 * features/i386/amd64-mpx.c: Regenerated.
9845 * features/i386/amd64.c: Regenerated.
9846 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9847 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9848 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9849 * regformats/i386/amd64-avx.dat: Regenerated.
9850 * regformats/i386/amd64-mpx.dat: Regenerated.
9851 * regformats/i386/amd64.dat: Regenerated.
9852
9853 2017-07-10 Yao Qi <yao.qi@linaro.org>
9854
9855 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9856 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9857
9858 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9859
9860 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9861 unsetenv.
9862 * gnulib/aclocal.m4: Regenerate.
9863 * gnulib/config.in: Regenerate.
9864 * gnulib/configure: Regenerate.
9865 * gnulib/import/Makefile.am: Regenerate.
9866 * gnulib/import/Makefile.in: Regenerate.
9867 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9868 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9869 * gnulib/import/m4/environ.m4: New file.
9870 * gnulib/import/m4/setenv.m4: New file.
9871 * gnulib/import/setenv.c: New file.
9872 * gnulib/import/unsetenv.c: New file.
9873
9874 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9875
9876 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9877 address when op is DW_OP_addr.
9878
9879 2017-07-09 Tom Tromey <tom@tromey.com>
9880
9881 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9882 check and apply to outer type.
9883
9884 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9885
9886 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9887 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9888 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9889 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9890
9891 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9892
9893 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9894
9895 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9896
9897 * corelow.c (get_core_siginfo): Remove.
9898 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9899 instead of get_core_siginfo.
9900 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9901 * gdbarch.h: Re-generate.
9902 * gdbarch.c: Re-generate.
9903 * linux-tdep.c (linux_core_xfer_siginfo): New.
9904 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9905
9906 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9907
9908 * corelow.c (thread_section_name): Move to ...
9909 * gdbcore.h (thread_section_name): ... here.
9910
9911 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9912
9913 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9914 (struct siginfo32): New.
9915 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9916 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9917 via ptrace(PT_LWPINFO).
9918
9919 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9920
9921 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9922 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9923 (fbsd_get_siginfo_type): New.
9924 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9925 (_initialize_fbsd_tdep): New.
9926
9927 2017-07-06 David Blaikie <dblaikie@gmail.com>
9928
9929 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9930 a singular dwo_unit*) to support multiple CUs in the same way that
9931 multiple TUs are supported.
9932 (create_cus_hash_table): Replace create_dwo_cu with a function for
9933 parsing multiple CUs from a DWO file.
9934 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9935 create_dwo_cu.
9936 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9937 htab_find, rather than comparing the signature to a singleton CU in
9938 the dwo_file.
9939
9940 2017-07-06 Pedro Alves <palves@redhat.com>
9941
9942 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9943
9944 2017-07-04 Pedro Alves <palves@redhat.com>
9945
9946 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9947 * gdbtypes.h (TYPE_STATIC): Delete.
9948 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9949 is_synchronized, is_native>: Delete.
9950 <dummy>: Bump.
9951 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9952 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9953 (TYPE_FN_FIELD_ABSTRACT): Delete.
9954
9955 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9956
9957 * buffer.h (buffer_finish): Fix spelling mistakes.
9958
9959 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9960
9961 * .dir-locals.el: Automatically switch to C-style comments in
9962 versions of Emacs that support the feature.
9963
9964 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9965 Pedro Alves <palves@redhat.com>
9966
9967 PR cli/21688
9968 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9969 (process_next_line): New variable 'inline_cmd'.
9970 Adjust 'if' clauses for "python", "compile" and "guile" to use
9971 'command_name_equals' and check for '!inline_cmd'.
9972
9973 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9974
9975 PR cli/21688
9976 * cli/cli-script.c (command_name_equals_not_inline): New function.
9977 (process_next_line): Adjust 'if' clauses for "python", "compile"
9978 and "guile" to use command_name_equals_not_inline.
9979
9980 2017-06-29 Pedro Alves <palves@redhat.com>
9981
9982 * completer.c (expression_completer): Call
9983 linespec_location_completer instead of location_completer.
9984
9985 2017-06-29 Pedro Alves <palves@redhat.com>
9986
9987 * completer.c (expression_completer): Remove code that recomputes
9988 'text' from 'word'.
9989
9990 2017-06-29 Yao Qi <yao.qi@linaro.org>
9991
9992 * regformats/regdat.sh: Generate code with
9993 "ifndef IN_PROCESS_AGENT".
9994
9995 2017-06-28 Pedro Alves <palves@redhat.com>
9996
9997 * command.h: Include "common/scoped_restore.h".
9998
9999 2017-06-28 Yao Qi <yao.qi@linaro.org>
10000
10001 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10002 instead of obstack_grow.
10003
10004 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10005
10006 PR gdb/21337
10007 * symfile.c (reread_symbols): Call objfiles_changed just before
10008 read_symbols.
10009
10010 2017-06-27 Pedro Alves <palves@redhat.com>
10011
10012 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10013 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10014 (completion_list_add_symbol, completion_list_add_msymbol):
10015 ... these new functions.
10016 (add_symtab_completions)
10017 (default_make_symbol_completion_list_break_on_1): Adjust.
10018
10019 2017-06-27 Pedro Alves <palves@redhat.com>
10020
10021 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10022 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10023 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10024 dtor.
10025 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10026 'storage_obstack' field an auto_obstack. In-class initialize all
10027 non-bitfield fields. Make minsyms_read bool.
10028 * symfile.c (read_symbols): Adjust.
10029
10030 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10031
10032 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10033 (gdbsim_store_register): Likewise.
10034
10035 2017-06-27 Pedro Alves <palves@redhat.com>
10036
10037 * c-exp.y (name_obstack): Now an auto_obstack.
10038 (yylex): Use auto_obstack::clear.
10039 (c_parse): Use auto_obstack::clear instead of reinitializing and
10040 freeing the obstack.
10041 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10042 * d-exp.y (name_obstack): Now an auto_obstack.
10043 (yylex): Use auto_obstack::clear.
10044 (d_parse): Use auto_obstack::clear instead of reinitializing and
10045 freeing the obstack.
10046 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10047 auto_obstack.
10048 * dwarf2read.c (create_addrmap_from_index)
10049 (dwarf2_build_psymtabs_hard)
10050 (update_enumeration_type_from_children): Likewise.
10051 * gdb_obstack.h (auto_obstack): New type.
10052 * go-exp.y (name_obstack): Now an auto_obstack.
10053 (build_packaged_name): Use auto_obstack::clear.
10054 (go_parse): Use auto_obstack::clear instead of reinitializing and
10055 freeing the obstack.
10056 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10057 auto_obstack.
10058 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10059 * rust-exp.y (work_obstack): Now an auto_obstack.
10060 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10061 reinitializing and freeing the obstack.
10062 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10063 (host_char_to_target): Use auto_obstack.
10064 * utils.h (make_cleanup_obstack_free): Delete declaration.
10065 * valprint.c (generic_emit_char, generic_printstr): Use
10066 auto_obstack.
10067
10068 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10069
10070 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10071 thread.
10072 (darwin_init_thread_list): Don't update dummy thread.
10073 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10074
10075 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10076
10077 * record-full.c (netorder16): Remove.
10078
10079 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10080
10081 * common/diagnostics.h: Define macros for GCC.
10082 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10083 * common/vec.h: Include diagnostics.h.
10084 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10085 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10086 warning.
10087
10088 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10089
10090 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10091 New macro.
10092 * ada-lex.l: Ignore deprecated register warnings.
10093
10094 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10095
10096 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10097 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10098
10099 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10100
10101 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10102 its own line.
10103
10104 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10105
10106 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10107
10108 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10109
10110 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10111 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10112 (xtensa_register_read_masked): Likewise.
10113
10114 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10115
10116 * common/environ.c (gdb_environ::unset): Update comment.
10117
10118 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10119
10120 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10121 registers.
10122
10123 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10124
10125 * record-full.c (record_full_exec_insn): Use byte_vector.
10126
10127 2017-06-22 Yao Qi <yao.qi@linaro.org>
10128
10129 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10130 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10131
10132 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10133
10134 * remote.c (cached_reg): Move from here...
10135 * regcache.h (cached_reg): ...to here.
10136 * python/py-unwind.c (struct reg_info): Remove.
10137 (cached_frame_info): Use cached_reg_t.
10138 (pyuw_prev_register): Likewise.
10139 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10140 (pyuw_dealloc_cache): Free all registers.
10141
10142 2017-06-22 Pedro Alves <palves@redhat.com>
10143 Simon Marchi <simon.marchi@ericsson.com>
10144
10145 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10146 warning.
10147 * common/diagnostics.h: New file.
10148
10149 2017-06-22 Pedro Alves <palves@redhat.com>
10150
10151 * common/agent.h: Add include guards.
10152
10153 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10154
10155 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10156 talk about addressable units instead of bytes.
10157
10158 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10159
10160 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10161 of '::const_iterator'.
10162
10163 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10164
10165 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10166 'unittests/environ-selftests.c'.
10167 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10168 * charset.c (find_charset_names): Declare object 'iconv_env'.
10169 Update code to use 'iconv_env' object. Remove call to
10170 'free_environ'.
10171 * common/environ.c: Include <utility>.
10172 (make_environ): Delete function.
10173 (free_environ): Delete function.
10174 (gdb_environ::clear): New function.
10175 (gdb_environ::operator=): New function.
10176 (gdb_environ::get): Likewise.
10177 (environ_vector): Delete function.
10178 (set_in_environ): Delete function.
10179 (gdb_environ::set): New function.
10180 (unset_in_environ): Delete function.
10181 (gdb_environ::unset): New function.
10182 (gdb_environ::envp): Likewise.
10183 * common/environ.h: Include <vector>.
10184 (struct gdb_environ): Delete; transform into...
10185 (class gdb_environ): ... this class.
10186 (free_environ): Delete prototype.
10187 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10188 environ_vector): Likewise.
10189 * infcmd.c (run_command_1): Update code to call
10190 'envp' from 'gdb_environ' class.
10191 (environment_info): Update code to call methods from 'gdb_environ'
10192 class.
10193 (unset_environment_command): Likewise.
10194 (path_info): Likewise.
10195 (path_command): Likewise.
10196 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10197 (inferior::inferior): Initialize 'environment' using the host's
10198 information.
10199 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10200 Include "environ.h".
10201 (class inferior) <environment>: Change type from 'struct
10202 gdb_environ' to 'gdb_environ'.
10203 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10204 methods from 'gdb_environ' class.
10205 * solib.c (solib_find_1): Likewise
10206 * unittests/environ-selftests.c: New file.
10207
10208 2017-06-20 Yao Qi <yao.qi@linaro.org>
10209
10210 * features/i386/i386-linux.xml: Exchange the order of including
10211 32bit-linux.xml and 32bit-sse.xml.
10212 * features/i386/i386-linux.c: Regenerated.
10213
10214 2017-06-20 Yao Qi <yao.qi@linaro.org>
10215
10216 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10217 Delete copy ctor and assignment operator.
10218 (tdesc_type): Likewise.
10219 (tdesc_feature): Likewise.
10220 (tdesc_free_reg): Remove.
10221 (tdesc_create_reg): Use new.
10222 (tdesc_free_type): Remove.
10223 (tdesc_create_vector): Use new.
10224 (tdesc_create_union): Likewise.
10225 (tdesc_create_flags): Likewise.
10226 (tdesc_create_enum): Likewise.
10227 (tdesc_free_feature): Delete.
10228 (free_target_description): Use delete.
10229
10230 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10231
10232 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10233 registers.
10234
10235 2017-06-19 Pedro Alves <palves@redhat.com>
10236
10237 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10238 after gdb::unlinker.
10239
10240 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10241
10242 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10243 gdb_environ to access an environment variable.
10244
10245 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10246
10247 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10248 gdb_byte*.
10249
10250 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10251
10252 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10253
10254 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10255
10256 * configure: Re-generate.
10257 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10258
10259 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10260
10261 * configure: Re-generate.
10262 * warning.m4: Pass -Werror to compiler when checking for
10263 supported warning flags.
10264
10265 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10266
10267 * Makefile.in (COMPILE.pre): Add "-x c++".
10268
10269 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10270 Pedro Alves <palves@redhat.com>
10271 Yao Qi <yao.qi@linaro.org>
10272
10273 * defs.h (RequireLongest): New.
10274 (extract_integer): Declare function template.
10275 (extract_signed_integer): Remove the declaration, but define it
10276 static inline.
10277 (extract_unsigned_integer): Likewise.
10278 (store_integer): Declare function template.
10279 (store_signed_integer): Remove the declaration, but define it
10280 static inline.
10281 (store_unsigned_integer): Likewise.
10282 * findvar.c (extract_integer): New function template.
10283 (extract_signed_integer): Remove.
10284 (extract_unsigned_integer): Remove.
10285 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10286 instantiations.
10287 (store_integer): New function template.
10288 (store_signed_integer): Remove.
10289 (store_unsigned_integer): Remove.
10290 (store_integer): Explicit instantiations.
10291 * regcache.c (regcache_raw_read_signed): Update.
10292 (regcache::raw_read): New function.
10293 (regcache::raw_read_signed): Remove.
10294 (regcache::raw_read_unsigned): Remove.
10295 (regcache_raw_read_unsigned): Update.
10296 (regcache_raw_write_unsigned): Update.
10297 (regcache::raw_write_signed): Remove.
10298 (regcache::raw_write): New function.
10299 (regcache_cooked_read_signed): Update.
10300 (regcache::raw_write_unsigned): Remove.
10301 (regcache::cooked_read_signed): Remove.
10302 (regcache_cooked_read_unsigned): Update.
10303 (regcache::cooked_read_unsigned): Remove.
10304 (regcache_cooked_write_signed): Update.
10305 (regcache_cooked_write_unsigned): Update.
10306 * regcache.h (regcache) <raw_read_signed>: Remove.
10307 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10308 <raw_read, raw_write>: New.
10309 <cooked_read_signed, cooked_write_signed>: Remove.
10310 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10311 <cooked_read, cooked_write>: New.
10312 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10313 (sh64_pseudo_register_write): Update.
10314
10315 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10316
10317 * arc-tdep.c (arc_disassembler_options): New variable.
10318 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10319 of default_print_insn.
10320 (arc_delayed_print_insn): Set info->section when needed,
10321 use default_print_insn to retrieve a disassembler.
10322
10323 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10324
10325 PR gdb/21574
10326 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10327 to mention $SHELL and startup-with-shell.
10328
10329 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10330
10331 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10332
10333 2017-06-14 Yao Qi <yao.qi@linaro.org>
10334
10335 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10336 default_print_insn instead of print_insn_aarch64.
10337 * arm-tdep.c (gdb_print_insn_arm): Call
10338 default_print_insn instead of print_insn_big_arm
10339 and print_insn_little_arm.
10340 * i386-tdep.c (i386_print_insn): Call default_print_insn
10341 instead of print_insn_i386.
10342 * ia64-tdep.c (ia64_print_insn): Call
10343 default_print_insn instead of print_insn_ia64.
10344 * mips-tdep.c (gdb_print_insn_mips): Call
10345 default_print_insn instead of print_insn_big_mips
10346 and print_insn_little_mips.
10347 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10348 instead of print_insn_spu.
10349
10350 2017-06-14 Pedro Alves <palves@redhat.com>
10351
10352 * ada-lang.c: Include "common/byte-vector.h".
10353 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10354 * charset.c (wchar_iterator::iterate): Resize the vector instead
10355 of reserving it.
10356 * common/byte-vector.h: Include "common/def-vector.h".
10357 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10358 * cli/cli-dump.c: Include "common/byte-vector.h".
10359 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10360 * common/byte-vector.h: New file.
10361 * common/def-vector.h: New file.
10362 * common/default-init-alloc.h: New file.
10363 * dwarf2loc.c: Include "common/byte-vector.h".
10364 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10365 instead of reserving it.
10366 * dwarf2read.c: Include "common/byte-vector.h".
10367 (data_buf::m_vec): Now a gdb::byte_vector.
10368 * gdb_regex.c: Include "common/def-vector.h".
10369 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10370 * mi/mi-main.c: Include "common/byte-vector.h".
10371 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10372 * printcmd.c: Include "common/byte-vector.h".
10373 (print_scalar_formatted): Use gdb::byte_vector.
10374 * valprint.c: Include "common/byte-vector.h".
10375 (maybe_negate_by_bytes, print_decimal_chars): Use
10376 gdb::byte_vector.
10377
10378 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10379
10380 * darwin-nat.c: Include "nat/fork-inferior.h".
10381
10382 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10383
10384 * configure.nat: Factor out Darwin bits that are not
10385 architecture-specific. Add fork-inferior.o.
10386
10387 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10388
10389 * configure.nat: Factor out AIX bits that are not
10390 architecture-specific. Add fork-inferior.o.
10391
10392 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10393
10394 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10395 (read_pieced_value, write_pieced_value): ...here. Reduce to
10396 wrappers that just call rw_pieced_value.
10397
10398 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10399
10400 * dwarf2loc.c (write_pieced_value): When writing the data for a
10401 memory piece, use write_memory_with_notification instead of
10402 write_memory.
10403
10404 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10405
10406 * valops.c (read_value_memory): Change embedded_offset to
10407 represent a bit offset instead of a byte offset.
10408 * value.h (read_value_memory): Adjust comment.
10409
10410 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10411
10412 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10413 dest_offset_bits and source_offset_bits.
10414 (write_pieced_value): Likewise.
10415
10416 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10417
10418 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10419 given by DW_OP_bit_piece.
10420 (write_pieced_value): Likewise.
10421
10422 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10423
10424 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10425 some other preparations to the places where sufficient information
10426 is available.
10427 (write_pieced_value): Likewise.
10428
10429 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10430
10431 * dwarf2loc.c (bits_to_bytes): New function.
10432 (read_pieced_value): Fix offset calculations for register pieces
10433 on big-endian targets.
10434 (write_pieced_value): Likewise.
10435
10436 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10437
10438 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10439 (write_pieced_value): Likewise.
10440
10441 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10442
10443 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10444 transfer the source value's least significant bits, instead of its
10445 lowest-addressed ones. Rename type_len to max_offset.
10446 (read_pieced_value): Mirror above changes to write_pieced_value as
10447 applicable.
10448
10449 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10450
10451 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10452 truncate full bytes from dest_offset_bits before using it as an
10453 offset into the buffer.
10454
10455 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10456
10457 * dwarf2loc.c (write_pieced_value): Include transfer size in
10458 byte-wise check.
10459
10460 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10461
10462 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10463 calculation of this_size.
10464
10465 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10466
10467 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10468 when targeting a bit-field.
10469 (write_pieced_value): Likewise.
10470
10471 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10472
10473 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10474 (allocate_piece_closure): Drop addr_size parameter.
10475 (dwarf2_evaluate_loc_desc_full): Adjust call to
10476 allocate_piece_closure.
10477
10478 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10479
10480 PR gdb/21226
10481 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10482 the LSB end, independent of endianness.
10483
10484 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10485
10486 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10487 size capping.
10488
10489 2017-06-13 Yao Qi <yao.qi@linaro.org>
10490
10491 * mips-linux-nat.c: Move include features/mips*-linux.c to
10492 mips-linux-tdep.c.
10493 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10494 to mips-linux-tdep.c.
10495 * mips-linux-tdep.c: Include features/mips*-linux.c
10496 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10497 functions.
10498 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10499 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10500 (tdesc_mips64_dsp_linux): Declare.
10501
10502 2017-06-12 Tom Tromey <tom@tromey.com>
10503
10504 * valprint.h (val_print_type_code_int): Remove.
10505 * valprint.c (generic_val_print_int): Always call
10506 val_print_scalar_formatted.
10507 (val_print_type_code_int): Remove.
10508 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10509 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10510 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10511 * ada-valprint.c (ada_val_print_num): Use
10512 val_print_scalar_formatted.
10513
10514 2017-06-12 Tom Tromey <tom@tromey.com>
10515
10516 * printcmd.c (print_scalar_formatted): Unify the two switches.
10517 Don't convert scalars to LONGEST.
10518
10519 2017-06-12 Tom Tromey <tom@tromey.com>
10520
10521 PR exp/16225:
10522 * valprint.h (print_decimal_chars): Update.
10523 * valprint.c (maybe_negate_by_bytes): New function.
10524 (print_decimal_chars): Add "is_signed" argument.
10525 * printcmd.c (print_scalar_formatted): Update.
10526
10527 2017-06-12 Tom Tromey <tom@tromey.com>
10528
10529 PR exp/16225:
10530 * valprint.h (print_binary_chars, print_hex_chars): Update.
10531 * valprint.c (val_print_type_code_int): Update.
10532 (print_binary_chars): Add "zero_pad" argument.
10533 (emit_octal_digit): New function.
10534 (print_octal_chars): Don't zero-pad.
10535 (print_decimal_chars): Likewise.
10536 (print_hex_chars): Add "zero_pad" argument.
10537 * sh64-tdep.c (sh64_do_fp_register): Update.
10538 * regcache.c (regcache::dump): Update.
10539 * printcmd.c (print_scalar_formatted): Update.
10540 * infcmd.c (default_print_one_register_info): Update.
10541
10542 2017-06-12 Pedro Alves <palves@redhat.com>
10543 Alan Hayward <alan.hayward@arm.com>
10544
10545 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10546 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10547 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10548 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10549 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10550
10551 2017-06-12 Pedro Alves <palves@redhat.com>
10552
10553 * dwarf2read.c (mapped_symtab::data): Now a vector of
10554 symtab_index_entry instead of vector of
10555 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10556 whether an element's name is NULL instead of checking whether the
10557 element itself is NULL.
10558 (find_slot): Change return type. Adjust.
10559 (hash_expand, , add_index_entry, uniquify_cu_indices)
10560 (write_hash_table): Adjust.
10561
10562 2017-06-12 Pedro Alves <palves@redhat.com>
10563
10564 * dwarf2read.c (recursively_count_psymbols): New function.
10565 (write_psymtabs_to_index): Call it to compute number of psyms and
10566 pass estimate size of psyms_seen to unordered_set's ctor.
10567
10568 2017-06-12 Pedro Alves <palves@redhat.com>
10569
10570 * dwarf2read.c (write_hash_table): Check if key already exists
10571 before emplacing.
10572
10573 2017-06-12 Pedro Alves <palves@redhat.com>
10574
10575 * dwarf2read.c (data_buf::append_space): Rename to...
10576 (data_buf::grow): ... this, and make private. Adjust all callers.
10577 (data_buf::append_uint): New method.
10578 (add_address_entry, write_one_signatured_type)
10579 (write_psymtabs_to_index): Use it.
10580
10581 2017-06-12 Pedro Alves <palves@redhat.com>
10582
10583 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10584 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10585 (data_buf::file_write): Call ::fwrite directly.
10586
10587 2017-06-12 Pedro Alves <palves@redhat.com>
10588
10589 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10590 std::vector::erase.
10591
10592 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10593
10594 Code cleanup: C++ify .gdb_index producer.
10595 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10596 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10597 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10598 (create_strtab, add_string): Remove.
10599 (file_write, data_buf): New.
10600 (struct symtab_index_entry): Use std::vector for cu_indices.
10601 (struct mapped_symtab): Use std::vector for data.
10602 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10603 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10604 Remove.
10605 (find_slot): Change return type. Update it to the new data structures.
10606 (hash_expand, add_index_entry): Update it to the new data structures.
10607 (offset_type_compare): Remove.
10608 (uniquify_cu_indices): Update it to the new data structures.
10609 (c_str_view, c_str_view_hasher, vector_hasher): New.
10610 (add_indices_to_cpool): Remove.
10611 (write_hash_table): Update it to the new data structures.
10612 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10613 (eq_psymtab_cu_index): Remove.
10614 (psym_index_map): New typedef.
10615 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10616 reference and std::unordered_map for cu_index_htab.
10617 (add_address_entry, add_address_entry_worker, write_address_map)
10618 (write_psymbols): Update it to the new data structures.
10619 (write_obstack): Remove.
10620 (struct signatured_type_index_data): Change types_list to a data_buf
10621 reference and psyms_seen to a std::unordered_set reference.
10622 (write_one_signatured_type, recursively_write_psymbols)
10623 (write_psymtabs_to_index): Update it to the new data structures.
10624
10625 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10626
10627 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10628 separate-debug-file commands.
10629 * symfile.h (separate_debug_file_debug): New global.
10630 * symfile.c (separate_debug_file_debug): New global.
10631 (separate_debug_file_exists, find_separate_debug_file): Add
10632 debug output.
10633 (_initialize_symfile): Add "set debug separate-debug-file"
10634 command.
10635 * build-id.c (build_id_to_debug_bfd,
10636 find_separate_debug_file_by_buildid): Add debug output.
10637
10638 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10639
10640 * gdbarch.sh (displaced_step_free_closure): Remove.
10641 * gdbarch.h, gdbarch.c: Re-generate.
10642 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10643 displaced_step_free_closure.
10644 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10645 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10646 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10647 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10648 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10649 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10650 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10651 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10652 * infrun.c (displaced_step_clear): Call xfree instead of
10653 gdbarch_displaced_step_free_closure.
10654
10655 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10656
10657 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10658 NULL".
10659
10660 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10661
10662 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10663 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10664 (mn10300_push_dummy_call): Likewise.
10665
10666 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10667
10668 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10669
10670 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10671
10672 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10673
10674 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10675
10676 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10677 able to start inferiors using a shell.
10678 (New remote packets): Announce new packet "QStartupWithShell".
10679 * remote.c: Add PACKET_QStartupWithShell.
10680 (extended_remote_create_inferior): Handle new
10681 PACKET_QStartupWithShell.
10682 (remote_protocol_features) <QStartupWithShell>: New entry for
10683 PACKET_QStartupWithShell.
10684 (_initialize_remote): Call "add_packet_config_cmd" for
10685 QStartupShell.
10686
10687 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10688 Pedro Alves <palves@redhat.com>
10689
10690 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10691 and "nat/fork-inferior.h".
10692 * common/common-inferior.h: New file, with contents from
10693 "gdb/inferior.h".
10694 * commom/common-utils.c: Include "common-utils.h".
10695 (stringify_argv): New function.
10696 * common/common-utils.h (stringify_argv): New prototype.
10697 * configure.nat: Add "fork-inferior.o" as a dependency for
10698 "*linux*", "fbsd*" and "nbsd*" hosts.
10699 * corefile.c (get_exec_file): Update comment.
10700 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10701 instead of "startup_inferior".
10702 (darwin_create_inferior): Call "add_thread_silent" after
10703 "fork_inferior".
10704 * fork-child.c: Cleanup unnecessary includes.
10705 (SHELL_FILE): Move to "common/common-fork-child.c".
10706 (environ): Likewise.
10707 (exec_wrapper): Initialize.
10708 (get_exec_wrapper): New function.
10709 (breakup_args): Move to "common/common-fork-child.c"; rename to
10710 "breakup_args_for_exec".
10711 (escape_bang_in_quoted_argument): Move to
10712 "common/common-fork-child.c".
10713 (saved_ui): New variable.
10714 (prefork_hook): New function.
10715 (postfork_hook): Likewise.
10716 (postfork_child_hook): Likewise.
10717 (gdb_startup_inferior): Likewise.
10718 (fork_inferior): Move to "common/common-fork-child.c". Update
10719 function to support gdbserver.
10720 (startup_inferior): Likewise.
10721 * gdbcore.h (get_exec_file): Remove declaration.
10722 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10723 instead of "startup_inferior". Call "add_thread_silent" after
10724 "fork_inferior".
10725 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10726 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10727 instead of "startup_inferior". Call "add_thread_silent" after
10728 "fork_inferior".
10729 * inferior.h: Include "common-inferior.h".
10730 (trace_start_error): Move to "common/common-utils.h".
10731 (trace_start_error_with_name): Likewise.
10732 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10733 (startup_inferior): Likewise.
10734 (gdb_startup_inferior): New prototype.
10735 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10736 * nat/fork-inferior.h: New file.
10737 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10738 instead of "startup_inferior". Call "add_thread_silent" after
10739 "fork_inferior".
10740 * target.h (target_terminal_init): Move prototype to
10741 "target/target.h".
10742 (target_terminal_inferior): Likewise.
10743 (target_terminal_ours): Likewise.
10744 * target/target.h (target_terminal_init): New prototype, moved
10745 from "target.h".
10746 (target_terminal_inferior): Likewise.
10747 (target_terminal_ours): Likewise.
10748 * utils.c (gdb_flush_out_err): New function.
10749
10750 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10751
10752 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10753 * common/common-gdbthread.h: New file, with parts from
10754 "gdb/gdbthread.h".
10755 * gdbthread.h: Include "common-gdbthread.h".
10756 (switch_to_thread): Moved to "common/common-gdbthread.h".
10757
10758 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10759
10760 * Makefile.in (SFILES): Add "common/job-control.c".
10761 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10762 (COMMON_OBS): Add "job-control.o".
10763 * common/job-control.c: New file, with contents from
10764 "gdb/inflow.c".
10765 * common/job-control.h: New file, with contents from "terminal.h".
10766 * fork-child.c: Include "job-control.h".
10767 * inflow.c: Include "job-control.h".
10768 (gdb_setpgid): Move to "common/common-inflow.c".
10769 (_initialize_inflow): Move setting of "job_control" to
10770 "handle_job_control".
10771 * terminal.h (job_control): Moved to "common/common-terminal.h".
10772 (gdb_setpgid): Likewise.
10773 * top.c: Include "job_control.h".
10774 * utils.c: Likewise.
10775 (job_control): Moved to "job-control.c".
10776
10777 2017-06-07 Pedro Alves <palves@redhat.com>
10778
10779 * Makefile.in (SFILES): Add gdb_regex.c.
10780 (COMMON_OBS): Add gdb_regex.o.
10781 * ada-lang.c (ada_add_standard_exceptions)
10782 (ada_add_exceptions_from_frame, name_matches_regex)
10783 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10784 parameter type to compiled_regex. Adjust.
10785 (ada_exceptions_list): Use compiled_regex.
10786 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10787 std::unique_ptr<compiled_regex>.
10788 (exception_catchpoint::~exception_catchpoint): Remove regfree
10789 call.
10790 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10791 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10792 * breakpoint.c (solib_catchpoint::compiled): Now a
10793 std::unique_ptr<compiled_regex>.
10794 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10795 (check_status_catch_solib): Adjust to use compiled_regex.
10796 (add_solib_catchpoint): Adjust to use compiled_regex.
10797 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10798 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10799 compiled_regex reference. Adjust to use it.
10800 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10801 declaration. Include "gdb_regex.h".
10802 (apropos_cmd): Change regex parameter to compiled_regex reference.
10803 * gdb_regex.c: New file.
10804 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10805 declarations.
10806 (class compiled_regex): New.
10807 * linux-tdep.c: Include "common/gdb_optional.h".
10808 (struct mapping_regexes): New, factored out from
10809 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10810 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10811 gdb::optional and remove cleanups. Adjust to compiled_regex.
10812 * probe.c: Include "common/gdb_optional.h".
10813 (collect_probes): Use compiled_regex and gdb::optional and remove
10814 cleanups.
10815 * skip.c: Include "common/gdb_optional.h".
10816 (skiplist_entry::compiled_function_regexp): Now a
10817 gdb::optional<compiled_regex>.
10818 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10819 (free_skiplist_entry): Remove regfree call.
10820 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10821 compiled_regex and gdb::optional.
10822 * symtab.c: Include "common/gdb_optional.h".
10823 (search_symbols): Use compiled_regex and gdb::optional.
10824 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10825 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10826 to gdb_regex.c.
10827
10828 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10829
10830 * regcache.c (regcache::save): Avoid buffer use.
10831 (regcache::dump): Likewise.
10832
10833 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10834
10835 * sh-tdep.c (sh_pseudo_register_read): Remove
10836 MAX_REGISTER_SIZE.
10837 (sh_pseudo_register_write): Likewise.
10838 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10839 (sh64_pseudo_register_write): Likewise
10840
10841 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10842
10843 * aarch64-tdep.c (aarch64_store_return_value): Use
10844 V_REGISTER_SIZE.
10845 (aarch64_pseudo_read_value): Likewise.
10846 (aarch64_pseudo_write): Likewise.
10847
10848 2017-06-06 Yao Qi <yao.qi@linaro.org>
10849
10850 * regformats/regdef.h (set_register_cache): Remove the
10851 declaration.
10852
10853 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10854
10855 * frame.c (frame_unwind_register_signed): Use
10856 frame_unwind_register_value.
10857
10858 2017-06-06 Pedro Alves <palves@redhat.com>
10859
10860 PR breakpoints/21553
10861 * breakpoint.c (create_breakpoints_sal_default)
10862 (init_breakpoint_sal, create_breakpoint_sal): Use
10863 gdb::unique_xmalloc_ptr for string parameters.
10864 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10865 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10866 (base_breakpoint_create_breakpoints_sal)
10867 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10868 (strace_marker_create_breakpoints_sal)
10869 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10870 string parameters.
10871 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10872 gdb::unique_xmalloc_ptr for string parameters.
10873 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10874 parameters.
10875
10876 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10877
10878 * alpha-tdep.c (alpha_register_to_value): Use
10879 get_frame_register_value.
10880 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10881
10882 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10883
10884 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10885 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10886 (ia64_value_to_register): Likewise.
10887 (ia64_extract_return_value): Likewise.
10888 (ia64_store_return_value): Likewise.
10889 (ia64_push_dummy_call): Likewise.
10890
10891 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10892
10893 GDB 8.0 released.
10894
10895 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10896
10897 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10898
10899 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10900
10901 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10902 parameter.
10903 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10904
10905 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10906
10907 * event-loop.c (poll_timers): Unallocate timer using delete
10908 instead of xfree.
10909
10910 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10911
10912 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10913 (struct breakpoint) <~breakpoint>: New.
10914 (struct watchpoint): Inherit from breakpoint.
10915 <~watchpoint>: New.
10916 <base>: Remove.
10917 (struct tracepoint): Inherit from breakpoint.
10918 <base>: Remove.
10919 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10920 (struct longjmp_breakpoint): Inherit from breakpoint.
10921 <~longjmp_breakpoint>: New.
10922 <base>: Remove.
10923 (new_breakpoint_from_type): Remove casts.
10924 (watchpoint_in_thread_scope): Remove reference to base field.
10925 (watchpoint_del_at_next_stop): Likewise.
10926 (update_watchpoint): Likewise.
10927 (watchpoint_check): Likewise.
10928 (bpstat_check_watchpoint): Likewise.
10929 (set_longjmp_breakpoint): Likewise.
10930 (struct fork_catchpoint): Inherit from breakpoint.
10931 <base>: Remove.
10932 (struct solib_catchpoint): Inherit from breakpoint.
10933 <~solib_catchpoint>: New.
10934 <base>: Remove.
10935 (dtor_catch_solib): Change to ...
10936 (solib_catchpoint::~solib_catchpoint): ... this.
10937 (breakpoint_hit_catch_solib): Remove reference to base field.
10938 (add_solib_catchpoint): Likewise.
10939 (create_fork_vfork_event_catchpoint): Likewise.
10940 (struct exec_catchpoint): Inherit from breakpoint.
10941 <~exec_catchpoint>: New.
10942 <base>: Remove.
10943 (dtor_catch_exec): Change to ...
10944 (exec_catchpoint::~exec_catchpoint): ... this.
10945 (dtor_watchpoint): Change to ...
10946 (watchpoint::~watchpoint): ... this.
10947 (watch_command_1): Remove reference to base field.
10948 (catch_exec_command_1): Likewise.
10949 (base_breakpoint_dtor): Change to ...
10950 (breakpoint::~breakpoint): ... this.
10951 (base_breakpoint_ops): Remove dtor field value.
10952 (longjmp_bkpt_dtor): Change to ...
10953 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10954 (strace_marker_create_breakpoints_sal): Remove reference to base
10955 field.
10956 (delete_breakpoint): Don't manually call breakpoint destructor.
10957 (create_tracepoint_from_upload): Remove reference to base field.
10958 (trace_pass_set_count): Likewise.
10959 (initialize_breakpoint_ops): Don't initialize
10960 momentary_breakpoint_ops, don't set dtors.
10961 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10962 <~ada_catchpoint>: New.
10963 <base>: Remove.
10964 (create_excep_cond_exprs): Remove reference to base field.
10965 (dtor_exception): Change to ...
10966 (ada_catchpoint::~ada_catchpoint): ... this.
10967 (dtor_catch_exception): Remove.
10968 (dtor_catch_exception_unhandled): Remove.
10969 (dtor_catch_assert): Remove.
10970 (create_ada_exception_catchpoint): Remove reference to base
10971 field.
10972 (initialize_ada_catchpoint_ops): Don't set dtors.
10973 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10974 breakpoint.
10975 <~signal_catchpoint>: New.
10976 <base>: Remove.
10977 (signal_catchpoint_dtor): Change to ...
10978 (signal_catchpoint::~signal_catchpoint): ... this.
10979 (create_signal_catchpoint): Remove reference to base field.
10980 (initialize_signal_catchpoint_ops): Don't set dtor.
10981 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10982 from breakpoint.
10983 <~syscall_catchpoint>: New.
10984 <base>: Remove.
10985 (dtor_catch_syscall): Change to ...
10986 (syscall_catchpoint::~syscall_catchpoint): ... this.
10987 (create_syscall_event_catchpoint): Remove reference to base
10988 field.
10989 (initialize_syscall_catchpoint_ops): Don't set dtor.
10990 * break-catch-throw.c (struct exception_catchpoint): Inherit
10991 from breakpoint.
10992 <~exception_catchpoint>: New.
10993 <base>: Remove.
10994 (dtor_exception_catchpoint): Change to ...
10995 (exception_catchpoint::~exception_catchpoint): ... this.
10996 (handle_gnu_v3_exceptions): Remove reference to base field.
10997 (initialize_throw_catchpoint_ops): Don't set dtor.
10998 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10999 field.
11000 * remote.c (remote_get_tracepoint_status): Likewise.
11001 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11002 * tracefile.c (tracefile_fetch_registers): Likewise.
11003 * tracepoint.c (actions_command): Likewise.
11004 (validate_actionline): Likewise.
11005 (tfind_1): Likewise.
11006 (get_traceframe_location): Likewise.
11007 (find_matching_tracepoint_location): Likewise.
11008 (parse_tracepoint_status): Likewise.
11009 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11010
11011 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11012
11013 * breakpoint.c (struct longjmp_breakpoint): New struct.
11014 (is_tracepoint_type): Change return type to bool.
11015 (is_longjmp_type): New function.
11016 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11017 (set_raw_breakpoint_without_location): Use
11018 new_breakpoint_from_type.
11019 (set_raw_breakpoint): Likewise.
11020
11021 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11022
11023 * breakpoint.c (new_breakpoint_from_type): New function.
11024 (create_breakpoint_sal): Use new_breakpoint_from_type and
11025 unique_ptr.
11026 (create_breakpoint): Likewise.
11027
11028 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11029
11030 * memattr.c (mem_info_command): Rename to ...
11031 (info_mem_command): ... this.
11032 (mem_enable_command): Rename to ...
11033 (enable_mem_command): ... this.
11034 (mem_disable_command): Rename to ...
11035 (disable_mem_command): ... this.
11036 (mem_delete_command): Rename to ...
11037 (delete_mem_command): ... this.
11038 (_initialize_mem): Adjust function names.
11039
11040 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11041
11042 * btrace.c (handle_pt_insn_events): New.
11043 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11044 STATUS. Split into this and ...
11045 (handle_pt_insn_event_flags): ... this.
11046
11047 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11048
11049 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11050 and struct pt_insn.resynced.
11051 * configure: Regenerated.
11052 * config.in: Regenerated.
11053
11054 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11055
11056 * btrace.c (ftrace_find_call_by_number): New function.
11057 (ftrace_new_function): Store objects, not pointers.
11058 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11059 ftrace_new_gap, ftrace_update_function,
11060 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11061 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11062 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11063 btrace_ends_with_single_insn, btrace_call_get): Account for
11064 btrace_thread_info::functions now storing objects.
11065 * btrace.h (struct btrace_thread_info): Add constructor.
11066 (struct btrace_thread_info) <functions>: Make std::vector.
11067 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11068 Initialize with default values.
11069 * record-btrace.c (record_btrace_frame_sniffer): Account for
11070 btrace_thread_info::functions now storing objects.
11071
11072 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11073
11074 * btrace.c: Remove typedef bfun_s.
11075 (ftrace_new_gap): Directly add gaps to the list of gaps.
11076 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11077 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11078 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11079 instead of gdb VEC.
11080
11081 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11082
11083 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11084 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11085 with btrace_thread_info::next_segment and
11086 btrace_thread_info::prev_segment.
11087 * btrace.h: Remove struct btrace_func_link.
11088 (struct btrace_function): Replace pair of function segment pointers
11089 with pair of indices.
11090 * python/py-record-btrace.c (btpy_call_prev_sibling,
11091 btpy_call_next_sibling): Replace references to
11092 btrace_thread_info::segment with btrace_thread_info::next_segment and
11093 btrace_thread_info::prev_segment.
11094 * record-btrace.c (record_btrace_frame_this_id): Use
11095 btrace_find_call_by_number.
11096
11097 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11098
11099 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11100 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11101 btrace_insn_next, btrace_insn_prev): Remove references to
11102 btrace_thread_info::flow.
11103 * btrace.h (struct btrace_function): Remove FLOW.
11104
11105 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11106
11107 * btrace.c (ftrace_find_call_by_number): New function.
11108 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11109 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11110 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11111 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11112 index.
11113 * btrace.h (struct btrace_function): Turn UP into an index.
11114 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11115 as an index.
11116 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11117 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11118 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11119
11120 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11121
11122 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11123 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11124 ftrace_update_function, ftrace_compute_global_level_offset,
11125 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11126 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11127 btrace_insn_end, btrace_is_empty): Remove references to
11128 btrace_thread_info::begin and btrace_thread_info::end.
11129 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11130 (struct btrace_thread_info) <functions>: Adjust comment.
11131 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11132 btrace_thread_info::begin.
11133
11134 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11135
11136 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11137 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11138 ftrace_update_function): Remove arguments that implicitly were always
11139 BTINFO->END.
11140 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11141 Don't pass BTINFO->END.
11142
11143 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11144
11145 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11146 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11147 btrace_find_insn_by_number): Replace function segment pointer with
11148 index.
11149 (btrace_insn_cmp): Simplify.
11150 * btrace.h: (struct btrace_insn_iterator) Rename index to
11151 insn_index. Replace function segment pointer with index into function
11152 segment vector.
11153 * record-btrace.c (record_btrace_call_history): Replace function
11154 segment pointer use with index.
11155 (record_btrace_frame_sniffer): Retrieve function call segment through
11156 vector.
11157 (record_btrace_set_replay): Remove defunc't safety check.
11158
11159 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11160
11161 * btrace.c (btrace_ends_with_single_insn): New function.
11162 (btrace_call_get, btrace_call_number, btrace_call_begin,
11163 btrace_call_end, btrace_call_next, btrace_call_prev,
11164 btrace_find_call_by_number): Use index into call segment vector
11165 instead of pointer.
11166 (btrace_call_cmp): Simplify.
11167 * btrace.h (struct btrace_call_iterator): Replace function call segment
11168 pointer with index into vector.
11169 * record-btrace.c (record_btrace_call_history): Use index instead of
11170 pointer.
11171
11172 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11173
11174 * btrace.c (btrace_insn_begin, btrace_insn_end,
11175 btrace_find_insn_by_number): Add btinfo to iterator.
11176 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11177
11178 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11179
11180 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11181 and save pointers directly.
11182 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11183 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11184 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11185 changed signature of functions.
11186 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11187 (btrace_fetch): Remove code that adds btrace_function pointers to
11188 vector of btrace_functions.
11189 (btrace_clear): Simplify freeing vector of btrace_functions.
11190
11191 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11192
11193 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11194 Replace VEC_* with std::vector functions.
11195 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11196 (struct btrace_thread_info)<functions>: Change type to std::vector.
11197
11198 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11199
11200 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11201 "Removed targets and native configurations" up. Merge duplicate
11202 "New commands" sub-sections. Add "New options" sub-sections.
11203
11204 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11205
11206 * defs.h (copy_integer_to_size): New declaration.
11207 * findvar.c (copy_integer_to_size): New function.
11208 (do_cint_test): New selftest function.
11209 (copy_integer_to_size_test): Likewise.
11210 (_initialize_findvar): Likewise.
11211 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11212 (mips_fbsd_collect_reg): Use raw_collect_integer.
11213 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11214 (mips64_fill_gregset): Use raw_collect_integer
11215 (mips64_fill_fpregset): Use raw_supply_integer.
11216 * regcache.c (regcache::raw_supply_integer): New function.
11217 (regcache::raw_collect_integer): Likewise.
11218 * regcache.h: (regcache::raw_supply_integer): New declaration.
11219 (regcache::raw_collect_integer): Likewise.
11220
11221 2017-05-24 Yao Qi <yao.qi@linaro.org>
11222
11223 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11224 (COMMON_OBS): Add gdbarch-selftests.o.
11225 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11226 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11227 * gdbarch-selftests.c: New file.
11228 * regcache.h (regcache) <~regcache>: Mark it virtual if
11229 GDB_SELF_TEST.
11230 <raw_write>: Likewise.
11231
11232 2017-05-24 Yao Qi <yao.qi@linaro.org>
11233
11234 * regcache.c (current_regcache): Change it to
11235 regcache::current_regcache.
11236 (regcache_observer_target_changed): Update.
11237 (regcache_thread_ptid_changed): Make it a regcache static
11238 method.
11239 (regcache_thread_ptid_changed): Update.
11240 (class regcache_access): New.
11241 (current_regcache_test): Update.
11242 (_initialize_regcache): Update.
11243 * regcache.h: Include forward_list.
11244 (regcache): Declare regcache_thread_ptid_changed and declare
11245 registers_changed_ptid as friend.
11246
11247 2017-05-24 Yao Qi <yao.qi@linaro.org>
11248
11249 * i387-tdep.c (i387_register_to_value): Use register_size
11250 instead of TYPE_LENGTH.
11251 * m68k-tdep.c (m68k_register_to_value): Likewise.
11252
11253 2017-05-24 Yao Qi <yao.qi@linaro.org>
11254
11255 * i387-tdep.c (i387_convert_register_p): Return false if type
11256 code isn't TYPE_CODE_FLT.
11257
11258 2017-05-24 Yao Qi <yao.qi@linaro.org>
11259
11260 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11261 length is 4.
11262 (alpha_register_to_value): Remove type length check.
11263 (alpha_value_to_register): Likewise.
11264
11265 2017-05-24 Yao Qi <yao.qi@linaro.org>
11266
11267 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11268 TYPE_CODE_FLT.
11269
11270 2017-05-24 Yao Qi <yao.qi@linaro.org>
11271
11272 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11273 TYPE_CODE_FLT or not.
11274
11275 2017-05-24 Yao Qi <yao.qi@linaro.org>
11276
11277 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11278 * avr-tdep.c (avr_gdbarch_init): Likewise.
11279 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11280 * cris-tdep.c (cris_gdbarch_init): Likewise.
11281 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11282 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11283 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11284 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11285 * mep-tdep.c (mep_gdbarch_init): Likewise.
11286 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11287 * mips-tdep.c (mips_gdbarch_init): Likewise.
11288 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11289 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11290 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11291 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11292 * v850-tdep.c (v850_gdbarch_init): Likewise.
11293
11294 2017-05-24 Yao Qi <yao.qi@linaro.org>
11295
11296 * selftest-arch.c (tests_with_arch): Call registers_changed
11297 and reinit_frame_cache.
11298 * selftest.c (run_self_tests): Likewise.
11299
11300 2017-05-24 Yao Qi <yao.qi@linaro.org>
11301
11302 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11303 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11304
11305 2017-05-24 Yao Qi <yao.qi@linaro.org>
11306
11307 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11308 set_gdbarch_print_insn.
11309
11310 2017-05-24 Yao Qi <yao.qi@linaro.org>
11311
11312 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11313 set_gdbarch_print_insn.
11314
11315 2017-05-24 Yao Qi <yao.qi@linaro.org>
11316
11317 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11318 set_gdbarch_print_insn.
11319 * arc-tdep.c (arc_gdbarch_init): Likewise.
11320 * arch-utils.c: include dis-asm.h.
11321 (default_print_insn): New function.
11322 * arch-utils.h (default_print_insn): Declare.
11323 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11324 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11325 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11326 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11327 * frv-tdep.c (frv_gdbarch_init): Likewise.
11328 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11329 * gdbarch.sh (print_insn): Use default_print_insn.
11330 * gdbarch.c: Regenerated.
11331 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11332 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11333 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11334 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11335 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11336 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11337 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11338 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11339 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11340 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11341 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11342 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11343 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11344 * mt-tdep.c (mt_gdbarch_init): Likewise.
11345 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11346 * nios2-tdep.c (nios2_print_insn): Remove.
11347 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11348 * rx-tdep.c (rx_gdbarch_init): Likewise.
11349 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11350 * score-tdep.c (score_print_insn): Remove.
11351 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11352 * sh-tdep.c (sh_gdbarch_init): Likewise.
11353 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11354 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11355 * tic6x-tdep.c (tic6x_print_insn): Remove.
11356 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11357 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11358 * v850-tdep.c (v850_gdbarch_init): Likewise.
11359 * vax-tdep.c (vax_gdbarch_init): Likewise.
11360 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11361 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11362
11363 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11364
11365 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11366 (MIPS_FP0_REGNUM): Remove.
11367 (MIPS_FSR_REGNUM): Remove.
11368 (mips_fbsd_supply_fpregs): Use mips_regnum.
11369 (mips_fbsd_supply_gregs): Likewise.
11370 (mips_fbsd_collect_fpregs): Likewise.
11371 (mips_fbsd_collect_gregs): Likewise.
11372
11373 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11374
11375 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11376 (getpfpregs_supplies): New function.
11377 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11378 getfpregs_supplies.
11379 (mips_fbsd_store_inferior_registers): Likewise.
11380
11381 2017-05-22 Pedro Alves <palves@redhat.com>
11382
11383 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11384 maintainer.
11385
11386 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11387
11388 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11389 (store_register): Likewise.
11390 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11391 (get_decimal_float_return_value): Likewise.
11392 (do_ppc_sysv_return_value): Likewise.
11393 (ppc64_sysv_abi_push_integer): Likewise.
11394 (ppc64_sysv_abi_push_freg): Likewise.
11395 (ppc64_sysv_abi_return_value_base): Likewise.
11396 (ppc64_sysv_abi_return_value): Likewise.
11397 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11398 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11399 * rs6000-nat.c: Likewise.
11400 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11401 (rs6000_value_to_register): Likewise.
11402 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11403
11404 2017-05-21 Tom Tromey <tom@tromey.com>
11405
11406 PR rust/21466:
11407 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11408 arrays as "[T]", not "[T; ]".
11409
11410 2017-05-19 Tom Tromey <tom@tromey.com>
11411
11412 PR rust/21484:
11413 * rust-lang.c (exp_descriptor_rust): New function.
11414 (rust_language_defn): Use it.
11415 * p-lang.c (pascal_language_defn): Update.
11416 * opencl-lang.c (opencl_language_defn): Update.
11417 * objc-lang.c (objc_language_defn): Update.
11418 * m2-lang.c (m2_language_defn): Update.
11419 * language.h (struct language_defn)
11420 <la_watch_location_expression>: New member.
11421 * language.c (unknown_language_defn, auto_language_defn)
11422 (local_language_defn): Update.
11423 * go-lang.c (go_language_defn): Update.
11424 * f-lang.c (f_language_defn): Update.
11425 * d-lang.c (d_language_defn): Update.
11426 * c-lang.h (c_watch_location_expression): Declare.
11427 * c-lang.c (c_watch_location_expression): New function.
11428 (c_language_defn, cplus_language_defn, asm_language_defn)
11429 (minimal_language_defn): Use it.
11430 * breakpoint.c (watch_command_1): Call
11431 la_watch_location_expression.
11432 * ada-lang.c (ada_language_defn): Update.
11433
11434 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11435
11436 PR tui/21482
11437 * gdb_curses.h (NOMACROS): Define.
11438 (NCURSES_NOMACROS): Define.
11439
11440 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11441
11442 PR tui/21482
11443 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11444 arg to char *.
11445 * tui/tui-wingeneral.c (box_win): Likewise.
11446 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11447 (tui_show_source_line): Likewise.
11448 (tui_show_exec_info_content): Likewise.
11449
11450 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11451
11452 * sparc-tdep.c (sparc_structure_return_p)
11453 (sparc_arg_on_registers_p): New functions.
11454 (sparc32_store_arguments): Use them.
11455 * sparc64-tdep.c (sparc64_16_byte_align_p)
11456 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11457 Handle TYPE_CODE_ARRAY.
11458
11459 2017-05-17 Yao Qi <yao.qi@linaro.org>
11460
11461 * cli/cli-decode.c (add_alias_cmd): New function.
11462 * command.h (add_alias_cmd): Declare.
11463 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11464 instead call add_alias_cmd.
11465
11466 2017-05-17 Pedro Alves <palves@redhat.com>
11467
11468 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11469 (nat_makefile_frag): ... this. All references updated.
11470 * configure.ac: Likewise.
11471 * configure.nat: Likewise. Enhance comments.
11472 * configure: Regenerate.
11473
11474 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11475
11476 * procfs.c (procfs_create_inferior): Change prototype to match
11477 definition.
11478
11479 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11480
11481 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11482 C++ compiler warning.
11483
11484 2017-05-12 Tom Tromey <tom@tromey.com>
11485
11486 PR rust/21483:
11487 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11488 recurse, just call value_struct_elt directly.
11489
11490 2017-05-12 Tom Tromey <tom@tromey.com>
11491
11492 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11493 OP_RUST_ARRAY>: Fix.
11494
11495 2017-05-12 Tom Tromey <tom@tromey.com>
11496
11497 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11498
11499 2017-05-09 Yao Qi <yao.qi@linaro.org>
11500
11501 * regcache.c: Include <forward_list>.
11502 (struct regcache_list): Remove.
11503 (current_regcache): Update.
11504 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11505 (regcache_thread_ptid_changed): Likewise.
11506 (registers_changed_ptid): Likewise.
11507 (current_regcache_size): Likewise.
11508
11509 2017-05-09 Yao Qi <yao.qi@linaro.org>
11510
11511 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11512 (current_regcache_size): New function.
11513 (current_regcache_test): New function.
11514 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11515
11516 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11517
11518 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11519 (print_gp_register_row): Use get_frame_register_value.
11520
11521 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11522
11523 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11524 (mips_supply_fpregset): Likewise.
11525 (mips64_supply_gregset): Likewise.
11526
11527 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11528
11529 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11530 regcache->raw_supply_zeroed.
11531
11532 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11533
11534 * configure.nat: Rearrange 'case' statements to match
11535 host before cpu.
11536
11537 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11538
11539 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11540 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11541 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11542 "@nat_extra_makefile_frag@".
11543 (Makefile): Remove dependency on "@frags@".
11544 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11545 (data-directory/Makefile): Likewise.
11546 * config/aarch64/linux.mh: Deleted; moved contents to
11547 "gdb/configure.nat".
11548 * config/alpha/alpha-linux.mh: Likewise.
11549 * config/alpha/nbsd.mh: Likewise.
11550 * config/arm/linux.mh: Likewise.
11551 * config/arm/nbsdelf.mh: Likewise.
11552 * config/i386/cygwin.mh: Likewise.
11553 * config/i386/cygwin64.mh: Likewise.
11554 * config/i386/darwin.mh: Likewise.
11555 * config/i386/fbsd.mh: Likewise.
11556 * config/i386/fbsd64.mh: Likewise.
11557 * config/i386/go32.mh: Likewise.
11558 * config/i386/i386gnu.mh: Likewise.
11559 * config/i386/i386sol2.mh: Likewise.
11560 * config/i386/linux.mh: Likewise.
11561 * config/i386/linux64.mh: Likewise.
11562 * config/i386/mingw.mh: Likewise.
11563 * config/i386/mingw64.mh: Likewise.
11564 * config/i386/nbsd64.mh: Likewise.
11565 * config/i386/nbsdelf.mh: Likewise.
11566 * config/i386/nto.mh: Likewise.
11567 * config/i386/obsd.mh: Likewise.
11568 * config/i386/obsd64.mh: Likewise.
11569 * config/i386/sol2-64.mh: Likewise.
11570 * config/ia64/linux.mh: Likewise.
11571 * config/m32r/linux.mh: Likewise.
11572 * config/m68k/linux.mh: Likewise.
11573 * config/m68k/nbsdelf.mh: Likewise.
11574 * config/m68k/obsd.mh: Likewise.
11575 * config/m88k/obsd.mh: Likewise.
11576 * config/mips/fbsd.mh: Likewise.
11577 * config/mips/linux.mh: Likewise.
11578 * config/mips/nbsd.mh: Likewise.
11579 * config/mips/obsd64.mh: Likewise.
11580 * config/pa/linux.mh: Likewise.
11581 * config/pa/nbsd.mh: Likewise.
11582 * config/pa/obsd.mh: Likewise.
11583 * config/powerpc/aix.mh: Likewise.
11584 * config/powerpc/fbsd.mh: Likewise.
11585 * config/powerpc/linux.mh: Likewise.
11586 * config/powerpc/nbsd.mh: Likewise.
11587 * config/powerpc/obsd.mh: Likewise.
11588 * config/powerpc/ppc64-linux.mh: Likewise.
11589 * config/powerpc/spu-linux.mh: Likewise.
11590 * config/s390/linux.mh: Likewise.
11591 * config/sh/nbsd.mh: Likewise.
11592 * config/sparc/fbsd.mh: Likewise.
11593 * config/sparc/linux.mh: Likewise.
11594 * config/sparc/linux64.mh: Likewise.
11595 * config/sparc/nbsd64.mh: Likewise.
11596 * config/sparc/nbsdelf.mh: Likewise.
11597 * config/sparc/obsd64.mh: Likewise.
11598 * config/sparc/sol2.mh: Likewise.
11599 * config/tilegx/linux.mh: Likewise.
11600 * config/vax/nbsdelf.mh: Likewise.
11601 * config/vax/obsd.mh: Likewise.
11602 * config/xtensa/linux.mh: Likewise.
11603 * config/i386/i386gnu.mn: New file, with excerpts from
11604 "config/i386/i386gnu.mh".
11605 * configure: Regenerate.
11606 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11607 *.mh files under "gdb/config".
11608 * configure.nat: New file, with contents from the
11609 "gdb/config/*/*.mh" files.
11610
11611 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11612
11613 * btrace.c (btrace_clear): Free insn vector.
11614
11615 2017-05-05 Pedro Alves <palves@redhat.com>
11616
11617 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11618 * configure: Regenerate.
11619
11620 2017-05-04 Pedro Alves <palves@redhat.com>
11621
11622 * Makefile.in (SFILES): Add progspace-and-thread.c.
11623 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11624 (COMMON_OBS): Add progspace-and-thread.o.
11625 * breakpoint.c: Include "progspace-and-thread.h".
11626 (update_inserted_breakpoint_locations)
11627 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11628 Use scoped_restore_current_pspace_and_thread.
11629 (create_std_terminate_master_breakpoint): Use
11630 scoped_restore_current_program_space.
11631 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11632 (print_breakpoint_location): Use
11633 scoped_restore_current_program_space.
11634 (bp_loc_is_permanent): Use
11635 scoped_restore_current_pspace_and_thread.
11636 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11637 (download_tracepoint_locations): Use
11638 scoped_restore_current_pspace_and_thread.
11639 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11640 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11641 (enum step_over_calls_kind): Moved from inferior.h.
11642 (class scoped_restore_current_thread): New class.
11643 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11644 declaration.
11645 (scoped_restore_current_thread): New class.
11646 * infcmd.c: Include "common/gdb_optional.h".
11647 (continue_1, proceed_after_attach): Use
11648 scoped_restore_current_thread.
11649 (notice_new_inferior): Use scoped_restore_current_thread.
11650 * inferior.c: Include "progspace-and-thread.h".
11651 (restore_inferior, save_current_inferior): Delete.
11652 (add_inferior_command, clone_inferior_command): Use
11653 scoped_restore_current_pspace_and_thread.
11654 * inferior.h (scoped_restore_current_inferior): New class.
11655 * infrun.c: Include "progspace-and-thread.h" and
11656 "common/gdb_optional.h".
11657 (follow_fork_inferior): Use
11658 scoped_restore_current_pspace_and_thread.
11659 (scoped_restore_exited_inferior): New class.
11660 (handle_vfork_child_exec_or_exit): Use
11661 scoped_restore_exited_inferior,
11662 scoped_restore_current_pspace_and_thread,
11663 scoped_restore_current_thread and scoped_restore.
11664 (fetch_inferior_event): Use scoped_restore_current_thread.
11665 * linespec.c (decode_line_full, decode_line_1): Use
11666 scoped_restore_current_program_space.
11667 * mi/mi-main.c: Include "progspace-and-thread.h".
11668 (exec_continue): Use scoped_restore_current_thread.
11669 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11670 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11671 * proc-service.c (ps_pglobal_lookup): Use
11672 scoped_restore_current_program_space.
11673 * progspace-and-thread.c: New file.
11674 * progspace-and-thread.h: New file.
11675 * progspace.c (release_program_space, clone_program_space): Use
11676 scoped_restore_current_program_space.
11677 (restore_program_space, save_current_program_space)
11678 (save_current_space_and_thread): Delete.
11679 (switch_to_program_space_and_thread): Moved to
11680 progspace-and-thread.c.
11681 * progspace.h (save_current_program_space)
11682 (save_current_space_and_thread): Delete declarations.
11683 (scoped_restore_current_program_space): New class.
11684 * remote.c (remote_btrace_maybe_reopen): Use
11685 scoped_restore_current_thread.
11686 * symtab.c: Include "progspace-and-thread.h".
11687 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11688 * thread.c (print_thread_info_1): Use
11689 scoped_restore_current_thread.
11690 (struct current_thread_cleanup): Delete.
11691 (do_restore_current_thread_cleanup)
11692 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11693 (scoped_restore_current_thread::~scoped_restore_current_thread):
11694 ... this new dtor.
11695 (make_cleanup_restore_current_thread): Rename/convert to ...
11696 (scoped_restore_current_thread::scoped_restore_current_thread):
11697 ... this new ctor.
11698 (thread_apply_all_command): Use scoped_restore_current_thread.
11699 (thread_apply_command): Use scoped_restore_current_thread.
11700 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11701 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11702
11703 2017-05-04 Pedro Alves <palves@redhat.com>
11704
11705 * thread.c (make_cleanup_restore_current_thread): Move
11706 find_thread_ptid call before the is_stopped call. Assert that the
11707 thread is found. Replace is_stopped call by checking the thread's
11708 state directly. Remove unnecessary NULL-thread check.
11709
11710 2017-05-04 Pedro Alves <palves@redhat.com>
11711
11712 * corelow.c (thread_section_name): New class.
11713 (get_core_register_section, get_core_siginfo): Use it.
11714
11715 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11716
11717 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11718 (get_core_register_section): Remove xfree of NULL pointer.
11719
11720 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11721
11722 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11723 * regcache.c (regcache::raw_supply_zeroed): New function.
11724 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11725
11726 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11727
11728 * gdbarch.sh: Remove commented out definition of
11729 TARGET_CHAR_BIT.
11730 * gdbarch.h: Re-generate.
11731
11732 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11733
11734 * configure: Regenerate.
11735
11736 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11737
11738 * solib-target.c (solib_target_relocate_section_addresses):
11739 Remove num_section_bases, num_bases, segment_bases variables.
11740
11741 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11742
11743 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11744
11745 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11746
11747 * solib-target.c: Include <vector>
11748 (struct lm_info_target) <~lm_info_target>: Remove.
11749 <segment_bases, section_bases>: Change type to
11750 std::vector<CORE_ADDR>.
11751 (library_list_start_segment, library_list_start_section,
11752 library_list_end_library,
11753 solib_target_relocate_section_addresses): Adjust.
11754
11755 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11756
11757 * gdbarch.sh (software_single_step): Change return type to
11758 std::vector<CORE_ADDR>.
11759 * gdbarch.c, gdbarch.h: Re-generate.
11760 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11761 Adjust.
11762 (arm_deal_with_atomic_sequence_raw): Adjust.
11763 (thumb_get_next_pcs_raw): Adjust.
11764 (arm_get_next_pcs_raw): Adjust.
11765 (arm_get_next_pcs): Adjust.
11766 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11767 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11768 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11769 (alpha_software_single_step): Adjust.
11770 * alpha-tdep.h (alpha_software_single_step): Adjust.
11771 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11772 * arm-tdep.c (arm_software_single_step): Adjust.
11773 (arm_breakpoint_kind_from_current_state): Adjust.
11774 * arm-tdep.h (arm_software_single_step): Adjust.
11775 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11776 * cris-tdep.c (cris_software_single_step): Adjust.
11777 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11778 (micromips_deal_with_atomic_sequence): Adjust.
11779 (deal_with_atomic_sequence): Adjust.
11780 (mips_software_single_step): Adjust.
11781 * mips-tdep.h (mips_software_single_step): Adjust.
11782 * moxie-tdep.c (moxie_software_single_step): Adjust.
11783 * nios2-tdep.c (nios2_software_single_step): Adjust.
11784 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11785 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11786 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11787 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11788 * sparc-tdep.c (sparc_software_single_step): Adjust.
11789 * spu-tdep.c (spu_software_single_step): Adjust.
11790 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11791
11792 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11793
11794 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11795 * gdbarch.h: Re-generate.
11796
11797 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11798
11799 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11800 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11801 * python/py-instruction.c, python/py-instruction.h: New file.
11802 * python/py-record.c: Add py-instruction.h include.
11803 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11804 gdb.RecordInstruction.
11805 * python/python-internal.h: Add gdbpy_initialize_instruction
11806 declaration.
11807 * python/python.c (do_start_initialization): Add
11808 gdbpy_initialize_instruction.
11809
11810 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11811
11812 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11813 Remove.
11814 (btrace_func_from_recpy_func): New function.
11815 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11816 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11817 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11818 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11819 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11820 Also, use new helper functions.
11821 (btpy_list_item): Use new helper functions.
11822 (recpy_bt_function_call_history): Use new type name.
11823 (btpy_call_getset): Remove.
11824 (gdbpy_initialize_btrace): Remove code to initialize
11825 gdb.BtraceFunctionCall.
11826 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11827 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11828 recpy_bt_func_prev, recpy_bt_func_next): New export.
11829 * python/py-record.c (recpy_func_type): New static object.
11830 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11831 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11832 recpy_func_next): New function.
11833 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11834 (recpy_func_getset): New static object.
11835 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11836 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11837
11838 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11839
11840 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11841 (btpy_object, btpy_insn_type, btpy_new): Remove.
11842 (btpy_list_object): Use gdb.RecordInstruction type instead of
11843 gdb.BtraceInstruction type.
11844 (btrace_insn_from_recpy_insn): New function.
11845 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11846 btpy_new.
11847 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11848 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11849 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11850 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11851 instead of btpy_object.
11852 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11853 btpy_insn_data, btpy_insn_decode): Rename to ...
11854 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11855 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11856 recpy_bt_insn_decode): This. Also, use new helper functions.
11857 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11858 recpy_insn_type.
11859 (btpy_insn_getset): Remove.
11860 (gdbpy_initialize_btrace): Remove code to initialize
11861 gdb.BtraceInstruction. Use recpy_element_object.
11862 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11863 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11864 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11865 * python/py-record.c (recpy_insn_type): New static object.
11866 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11867 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11868 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11869 New function.
11870 (recpy_insn_getset): New static object.
11871 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11872 * python/py-record.h (recpy_element_object): New typedef.
11873 (recpy_insn_type, recpy_insn_new): New export.
11874
11875 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11876
11877 * py-record-btrace.c (btpy_insn_new): Removed.
11878 (btpy_insn_or_gap_new): New function.
11879 (btpy_insn_error): Removed.
11880 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11881 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11882 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11883 btpy_insn_or_gap_new instead of btpy_insn_new.
11884 (btpy_insn_getset): Remove btpy_insn_error.
11885 * py-record.c (recpy_gap_type): New static object.
11886 (recpy_gap_object): New typedef.
11887 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11888 recpy_gap_reason_string): New function.
11889 (recpy_gap_getset): New static object.
11890 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11891 * py-record.h (recpy_gap_new): New export.
11892
11893 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11894
11895 * python/py-record.c (recpy_ptid): Remove.
11896 (recpy_record_getset): Remove recpy_ptid.
11897
11898 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11899
11900 * btrace.c (btrace_fetch): Set inferior_ptid.
11901 * python/py-record-btrace.c: Add "py-record.h" include.
11902 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11903 recpy_bt_end, recpy_bt_instruction_history,
11904 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11905 in gdb.Record object instead of current ptid.
11906 * python/py-record.c: Include new "py-record.h" file.
11907 (recpy_record_object): Moved to py-record.h.
11908 * python/py-record.h: New file.
11909
11910 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11911
11912 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11913 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11914 indentation.
11915
11916 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11917
11918 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11919 the past maintainers section.
11920
11921 2017-04-28 Yao Qi <yao.qi@linaro.org>
11922
11923 * infcmd.c (get_return_value): Use regcache ctor, and remove
11924 cleanup.
11925
11926 2017-04-28 Yao Qi <yao.qi@linaro.org>
11927 Pedro Alves <palves@redhat.com>
11928
11929 * regcache.c (regcache::regcache): New tag dispatch ctor.
11930 (do_cooked_read): Moved above.
11931 (regcache_dup): Use the tag dispatch ctor..
11932 * regcache.h (regcache): Declare ctor, delete copy ctor and
11933 assignment operator, remove friend regcache_dup.
11934
11935 2017-04-28 Yao Qi <yao.qi@linaro.org>
11936
11937 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11938 call method save instead of regcache_cpy.
11939 * regcache.h (struct regcache): Make regcache_dup a friend.
11940
11941 2017-04-28 Yao Qi <yao.qi@linaro.org>
11942
11943 * regcache.c (struct regcache): Move to regcache.h
11944 (regcache::arch): New method.
11945 (regcache_get_ptid): Update.
11946 (get_regcache_arch): Call arch method.
11947 (get_regcache_aspace): Call method aspace.
11948 (register_buffer): Change it to method.
11949 (regcache_save): Change it to regcache::save.
11950 (regcache_restore): Likewise.
11951 (regcache_cpy_no_passthrough): Remove the declaration.
11952 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11953 (regcache_cpy_no_passthrough): Change it to method
11954 cpy_no_passthrough.
11955 (regcache_register_status): Change it to method
11956 get_register_status.
11957 (regcache_invalidate): Change it to method invalidate.
11958 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11959 (regcache_raw_update): Change it to method raw_update.
11960 (regcache_raw_read): Likewise.
11961 (regcache_raw_read_signed): Likewise.
11962 (regcache_raw_read_unsigned): Likewise.
11963 (regcache_raw_write_signed): Likewise.
11964 (regcache_raw_write_unsigned): Likewise.
11965 (regcache_cooked_read): Likewise.
11966 (regcache_cooked_read_value): Likewise.
11967 (regcache_cooked_read_signed): Likewise.
11968 (regcache_cooked_read_unsigned): Likewise.
11969 (regcache_cooked_write_signed): Likewise.
11970 (regcache_cooked_write_unsigned): Likewise.
11971 (regcache_raw_set_cached_value): Likewise.
11972 (regcache_raw_write): Likewise.
11973 (regcache_cooked_write): Likewise.
11974 (regcache_xfer_part): Likewise.
11975 (regcache_raw_read_part): Likewise.
11976 (regcache_raw_write_part): Likewise.
11977 (regcache_cooked_read_part): Likewise.
11978 (regcache_cooked_write_part): Likewise.
11979 (regcache_raw_supply): Likewise.
11980 (regcache_raw_collect): Likewise.
11981 (regcache_transfer_regset): Likewise.
11982 (regcache_supply_regset): Likewise.
11983 (regcache_collect_regset): Likewise.
11984 (regcache_debug_print_register): Likewise.
11985 (enum regcache_dump_what): Move it to regcache.h.
11986 (regcache_dump): Change it to method dump.
11987 * regcache.h (enum regcache_dump_what): New.
11988 (class regcache): New.
11989 * target.c (target_fetch_registers): Call method
11990 debug_print_register.
11991 (target_store_registers): Likewise.
11992
11993 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11994
11995 * windows-nat.c (struct lm_info_windows): Initialize field.
11996 (windows_make_so): Allocate lm_info_windows with new.
11997 (windows_free_so): Free lm_info_windows with delete.
11998
11999 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12000
12001 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12002 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12003 cleanup.
12004 (darwin_free_so): Free lm_info_darwin with delete.
12005
12006 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12007
12008 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12009 <l_addr_p>: Change type to bool.
12010 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12011 (svr4_free_so): Free lm_info_svr4 with delete.
12012 (svr4_copy_library_list): Replace memcpy with call to copy
12013 constructor.
12014 (library_list_start_library, svr4_default_sos): Allocate
12015 lm_info_svr4 with new.
12016
12017 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12018
12019 * solib-target.c (struct lm_info_target): Add destructor,
12020 initialize fields.
12021 <name>: Change type to std::string.
12022 (library_list_start_library): Allocate lm_info_target with new.
12023 (solib_target_free_library_list): Free lm_info_target with
12024 delete.
12025 (solib_target_current_sos): Adapt to std::string.
12026 (solib_target_free_so): Free lm_info_target with delete.
12027
12028 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12029
12030 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12031 fields.
12032 (frv_current_sos): Allocate lm_info_frv with new.
12033 (frv_relocate_main_executable): Free lm_info_frv with delete,
12034 allocate with new.
12035 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12036
12037 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12038
12039 * solib-frv.c (struct lm_info_frv): Fix indentation.
12040
12041 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12042
12043 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12044 map field.
12045 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12046 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12047 and allocate with new.
12048 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12049
12050 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12051
12052 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12053 <filename, member_name>: Change type to std::string.
12054 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12055 (library_list_start_library): Allocate lm_info_aix with new.
12056 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12057 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12058 with copy constructor.
12059
12060 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12061
12062 * solist.h (struct lm_info): Remove.
12063 (struct lm_info_base): New class.
12064 (struct so_list) <lm_info>: Change type to lm_info_base *.
12065 * nto-tdep.c (struct lm_info): Remove.
12066 (lm_addr): Adjust.
12067 * solib-aix.c (struct lm_info): Rename to ...
12068 (struct lm_info_aix): ... this. Extend lm_info_base.
12069 (lm_info_p): Rename to ...
12070 (lm_info_aix_p): ... this, and adjust.
12071 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12072 solib_aix_parse_libraries, library_list_start_library,
12073 solib_aix_free_library_list, solib_aix_parse_libraries,
12074 solib_aix_get_library_list,
12075 solib_aix_relocate_section_addresses, solib_aix_free_so,
12076 solib_aix_get_section_offsets,
12077 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12078 Adjust.
12079 (struct solib_aix_inferior_data) <library_list>: Adjust.
12080 * solib-darwin.c (struct lm_info): Rename to ...
12081 (struct lm_info_darwin): ... this. Extend lm_info_base.
12082 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12083 * solib-dsbt.c (struct lm_info): Rename to ...
12084 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12085 (struct dsbt_info) <main_executable_lm_info): Adjust.
12086 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12087 dsbt_relocate_section_addresses): Adjust.
12088 * solib-frv.c (struct lm_info): Rename to ...
12089 (struct lm_info_frv): ... this. Extend lm_info_base.
12090 (main_executable_lm_info): Adjust.
12091 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12092 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12093 find_canonical_descriptor_in_load_object,
12094 frv_fdpic_find_canonical_descriptor): Adjust.
12095 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12096 to lm_info_svr4.
12097 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12098 svr4_clear_so, svr4_copy_library_list,
12099 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12100 svr4_current_sos, svr4_fetch_objfile_link_map,
12101 solist_update_incremental): Adjust.
12102 * solib-svr4.h (struct lm_info_svr4): Move here from
12103 solib-svr4.c.
12104 * solib-target.c (struct lm_info): Rename to ...
12105 (struct lm_info_target): ... this. Extend lm_info_base.
12106 (lm_info_p): Rename to ...
12107 (lm_info_target_p): ... this.
12108 (solib_target_parse_libraries, library_list_start_segment,
12109 library_list_start_section, library_list_start_library,
12110 library_list_end_library, solib_target_free_library_list,
12111 solib_target_current_sos, solib_target_free_so,
12112 solib_target_relocate_section_addresses): Adjust.
12113 * windows-nat.c (struct lm_info): Rename to ...
12114 (struct lm_info_windows): ... this. Extend lm_info_base.
12115 (windows_make_so, handle_load_dll, handle_unload_dll,
12116 windows_xfer_shared_libraries): Adjust.
12117
12118 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12119
12120 * solib-darwin.c (struct darwin_so_list): Remove.
12121 (darwin_current_sos): Allocate an so_list object instead of a
12122 darwin_so_list, separately allocate an lm_info object.
12123 (darwin_free_so): Free lm_info.
12124
12125 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12126
12127 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12128 with fprintf_filtered.
12129
12130 2017-04-28 Yao Qi <yao.qi@linaro.org>
12131
12132 * regcache.c (regcache::regcache): New function.
12133 (regcache::~regcache): New function.
12134 (regcache_xmalloc_1): Remove.
12135 (regcache_xmalloc): Call new regcache.
12136 (regcache_xfree): Call delete regcache.
12137 (get_thread_arch_aspace_regcache): Call new regcache.
12138
12139 2017-04-28 Yao Qi <yao.qi@linaro.org>
12140
12141 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12142 lwp instead of ptid_get_lwp.
12143
12144 2017-04-28 Yao Qi <yao.qi@linaro.org>
12145
12146 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12147 lwp_info instead of getting from inferior_ptid.
12148
12149 2017-04-27 Keith Seitz <keiths@redhat.com>
12150
12151 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12152 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12153 (CV_CONVERSION_BADNESS): Define.
12154 (rank_one_type): Remove overly restrictive rvalue reference
12155 rank checks.
12156 Add cv-qualifier checks and subranks for type equality.
12157 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12158 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12159 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12160
12161 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12162
12163 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12164 count when creating the object.
12165
12166 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12167 Ulrich Weigand <uweigand@de.ibm.com>
12168
12169 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12170 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12171 is used in AIX.
12172 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12173 (process_xcoff_symbol): Likewise.
12174 (scan_xcoff_symtab): Likewise.
12175
12176 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12177
12178 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12179 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12180 (ia64_access_reg): Use get_frame_register_unsigned.
12181 (ia64_access_rse_reg): Likewise.
12182 (ia64_libunwind_frame_prev_register): Likewise.
12183
12184 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12185
12186 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12187 * gdbarch.c: Regenerated.
12188 * gdbarch.h: Regenerated.
12189 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12190 visibility external.
12191 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12192 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12193 (enum cfa_how_kind): Move to ...
12194 (struct dwarf2_frame_state_reg_info): Likewise.
12195 (struct dwarf2_frame_state): Likewise.
12196 * dwarf2-frame.h: ... here.
12197 (dwarf2_frame_state_alloc_regs): New declaration.
12198 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12199 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12200
12201 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12202
12203 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12204 regcache_raw_read_unsigned.
12205 (xtensa_pseudo_register_write): Likewise.
12206
12207 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12208
12209 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12210 (nds32_pseudo_register_write): Likewise.
12211
12212 2017-04-25 Yao Qi <yao.qi@linaro.org>
12213
12214 * regcache.c (struct regcache) <readonly_p>: Change its type
12215 to bool.
12216 (regcache_xmalloc_1): Update parameter type and callers update.
12217
12218 2017-04-25 Yao Qi <yao.qi@linaro.org>
12219
12220 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12221 set_gdbarch_wchar_bit.
12222 * arm-tdep.c (arm_gdbarch_init): Likewise.
12223
12224 2017-04-25 Pedro Alves <palves@redhat.com>
12225
12226 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12227 (BothAreRelocatable, memcopy, memmove): Don't define.
12228 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12229 macros.
12230
12231 2017-04-25 Pedro Alves <palves@redhat.com>
12232
12233 * common/common-defs.h: Include "common/poison.h".
12234 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12235 and adjust.
12236 * common/poison.h: New file.
12237 * common/traits.h: Include <type_traits>.
12238 (Not, Or, Requires): New, moved from common/function-view.h.
12239
12240 2017-04-25 Pedro Alves <palves@redhat.com>
12241
12242 * breakpoint.h (struct breakpoint): In-class initialize all
12243 fields. Make boolean fields "bool".
12244 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12245 memset call and initializations no longer necessary.
12246
12247 2017-04-25 Pedro Alves <palves@redhat.com>
12248
12249 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12250 reference.
12251 (pt_btrace_insn): New function.
12252 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12253
12254 2017-04-25 Pedro Alves <palves@redhat.com>
12255
12256 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12257 "base" field and inherit from "bp_location" instead. Add
12258 non-default ctor.
12259 (allocate_location_exception): Use new non-default ctor.
12260 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12261 (init_bp_location): Convert to ...
12262 (bp_location::bp_location): ... this new ctor, and remove memset
12263 call.
12264 (base_breakpoint_allocate_location): Use the new non-default ctor.
12265 * breakpoint.h (bp_location): Now a class. Declare default and
12266 non-default ctors. In-class initialize all members.
12267 (init_bp_location): Remove declaration.
12268
12269 2017-04-25 Pedro Alves <palves@redhat.com>
12270
12271 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12272 assignment operator.
12273
12274 2017-04-24 Yao Qi <yao.qi@linaro.org>
12275
12276 * doublest.c (convert_doublest_to_floatformat): Call
12277 floatformat_totalsize_bytes.
12278
12279 2017-04-22 Tom Tromey <tom@tromey.com>
12280
12281 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12282 ui_out_emit_list.
12283 * stack.c (print_frame): Use ui_out_emit_list.
12284 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12285 ui_out_emit_list.
12286 * mi/mi-main.c (print_one_inferior)
12287 (mi_cmd_data_list_register_names)
12288 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12289 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12290 ui_out_emit_list.
12291 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12292 (mi_output_solib_attribs): Use ui_out_emit_list,
12293 ui_out_emit_tuple.
12294 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12295 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12296 (mi_cmd_stack_list_args, list_args_or_locals): Use
12297 ui_out_emit_list.
12298 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12299 * breakpoint.c (print_solib_event, output_thread_groups): Use
12300 ui_out_emit_list.
12301
12302 2017-04-22 Tom Tromey <tom@tromey.com>
12303
12304 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12305 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12306 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12307
12308 2017-04-22 Tom Tromey <tom@tromey.com>
12309
12310 * tracepoint.c (tvariables_info_1)
12311 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12312
12313 2017-04-22 Tom Tromey <tom@tromey.com>
12314
12315 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12316 annotate_arg_emitter.
12317 * breakpoint.c (print_mention_watchpoint)
12318 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12319 * annotate.h (struct annotate_arg_emitter): New.
12320
12321 2017-04-22 Tom Tromey <tom@tromey.com>
12322
12323 * record-btrace.c (record_btrace_insn_history)
12324 (record_btrace_insn_history_range, record_btrace_call_history)
12325 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12326 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12327 ui_out_emit_tuple.
12328 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12329 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12330 * skip.c (skip_info): Use ui_out_emit_tuple.
12331 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12332 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12333 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12334 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12335 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12336 ui_out_emit_tuple.
12337 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12338 (output_register, mi_cmd_data_read_memory)
12339 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12340 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12341 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12342 Use ui_out_emit_tuple.
12343 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12344 ui_out_emit_tuple.
12345 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12346 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12347 * linux-thread-db.c (info_auto_load_libthread_db): Use
12348 ui_out_emit_tuple.
12349 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12350 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12351 * disasm.c (do_mixed_source_and_assembly_deprecated)
12352 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12353 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12354 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12355 * breakpoint.c (print_one_breakpoint_location)
12356 (print_one_breakpoint): Use ui_out_emit_tuple.
12357 * auto-load.c (print_script, info_auto_load_cmd): Use
12358 ui_out_emit_tuple.
12359 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12360
12361 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12362
12363 * thread.c (print_thread_info_1): Remove dead code.
12364
12365 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12366
12367 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12368 GDB_SELF_TEST.
12369 * arm-tdep.c (selftests::arm_record_test): Likewise.
12370
12371 2017-04-21 Yao Qi <yao.qi@linaro.org>
12372
12373 * regcache.c (regcache_restore): Remove argument 2. Replace
12374 argument 3 with regcache. Get register status from
12375 src->register_status and get register contents from
12376 register_buffer (src, regnum).
12377 (regcache_cpy): Update.
12378
12379 2017-04-19 Pedro Alves <palves@redhat.com>
12380
12381 * gdbthread.h (thread): Add missing closing parenthesis in
12382 comment.
12383
12384 2017-04-19 Pedro Alves <palves@redhat.com>
12385
12386 * common/refcounted-object.h: New file.
12387 * gdbthread.h: Include "common/refcounted-object.h".
12388 (thread_info): Inherit from refcounted_object and add comments.
12389 (thread_info::incref, thread_info::decref)
12390 (thread_info::m_refcount): Delete.
12391 (thread_info::deletable): Use the refcounted_object::refcount()
12392 method.
12393 * inferior.c (current_inferior_): Add comment.
12394 (set_current_inferior): Increment/decrement refcounts.
12395 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12396 not-deletable instead of comparing with the current inferior.
12397 (initialize_inferiors): Increment the initial inferior's refcount.
12398 * inferior.h (struct inferior): Forward declare.
12399 Include "common/refcounted-object.h".
12400 (current_inferior, set_current_inferior): Move declaration to
12401 before struct inferior's definition, and fix comment.
12402 (inferior): Inherit from refcounted_object. Add comments.
12403 * thread.c (switch_to_thread_no_regs): Reference the thread's
12404 inferior pointer directly instead of doing a ptid lookup.
12405 (switch_to_no_thread): New function.
12406 (switch_to_thread(thread_info *)): New function, factored out
12407 from ...
12408 (switch_to_thread(ptid_t)): ... this.
12409 (restore_current_thread): Delete.
12410 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12411 fields, and add 'inf' field.
12412 (do_restore_current_thread_cleanup): Check whether old->inf is
12413 alive instead of looking up an inferior by ptid. Use
12414 switch_to_thread and switch_to_no_thread.
12415 (restore_current_thread_cleanup_dtor): Use old->inf directly
12416 instead of lookup up an inferior by id. Decref the inferior.
12417 Don't restore 'removable'.
12418 (make_cleanup_restore_current_thread): Same the inferior pointer
12419 in old, instead of the inferior number. Incref the inferior.
12420 Don't save/clear 'removable'.
12421
12422 2017-04-19 Pedro Alves <palves@redhat.com>
12423
12424 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12425 unittests/scoped_restore-selftests.c.
12426 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12427 * common/scoped_restore.h (scoped_restore_base): Make "class".
12428 (scoped_restore_base::release): New public method.
12429 (scoped_restore_base::scoped_restore_base): New protected ctor.
12430 (scoped_restore_base::m_saved_var): New protected field.
12431 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12432 scoped_restore_base base class instead of m_saved_var directly.
12433 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12434 (scoped_restore_tmpl::scoped_restore_tmpl(const
12435 scoped_restore_tmpl<T>&)): Likewise.
12436 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12437 method.
12438 (scoped_restore_tmpl::saved_var): New method.
12439 (scoped_restore_tmpl::m_saved_var): Delete.
12440 * inferior.h (inferior::detaching): Now a bool.
12441 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12442 cleanup.
12443 * unittests/scoped_restore-selftests.c: New file.
12444
12445 2017-04-19 Pedro Alves <palves@redhat.com>
12446
12447 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12448 Re-sort in alphabetic order.
12449
12450 2017-04-18 Pedro Alves <palves@redhat.com>
12451
12452 * xml-support.c (obstack_xml_printf): Delete.
12453 * xml-support.h (obstack_xml_printf): Delete.
12454
12455 2017-04-18 Pedro Alves <palves@redhat.com>
12456
12457 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12458 vdebug, verror, body_text, start_element, end_element, name,
12459 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12460 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12461 is_xinclude>: Make private and add m_ prefix.
12462 (gdb_xml_parser::body_text): New method, based on ...
12463 (gdb_xml_body_text): ... this. Adjust.
12464 (gdb_xml_parser::vdebug): New method, based on ...
12465 (gdb_xml_debug): ... this. Adjust.
12466 (gdb_xml_parser::verror): New method, based on ...
12467 (gdb_xml_error): ... this. Adjust.
12468 (gdb_xml_parser::start_element): New method, based on ...
12469 (gdb_xml_start_element): ... this. Adjust.
12470 (gdb_xml_start_element_wrapper): Defer to
12471 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12472 (gdb_xml_parser::end_element): New method, based on ...
12473 (gdb_xml_end_element_wrapper): ... this. Adjust.
12474 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12475 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12476 (gdb_xml_parser::use_dtd): New method, based on ...
12477 (gdb_xml_use_dtd): ... this. Adjust.
12478 (gdb_xml_parser::parse): New method, based on ...
12479 (gdb_xml_parse): ... this. Adjust.
12480 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12481 (xinclude_start_include): Adjust to call the parser's name method.
12482 (xml_xinclude_default, xml_xinclude_start_doctype)
12483 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12484 method.
12485 (xml_process_xincludes): Adjust to call parser methods.
12486 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12487 declarations.
12488
12489 2017-04-18 Pedro Alves <palves@redhat.com>
12490
12491 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12492 gdb::optional<std::string>.
12493 * xml-support.c: Include <string>.
12494 (scope_level::scope_level(scope_level &&))
12495 (scope_level::~scope_level): Delete.
12496 (scope_level::body): Now a std::string.
12497 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12498 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12499 parameter.
12500 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12501 (xinclude_parsing_data::output): Now a std::string reference.
12502 (xinclude_start_include): Adjust.
12503 (xml_xinclude_default): Adjust.
12504 (xml_process_xincludes): Add 'output' parameter, and return bool.
12505 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12506 and return bool.
12507 * xml-tdesc.c: Include <unordered_map> and <string>.
12508 (tdesc_xml_cache): Delete.
12509 (tdesc_xml_cache_s): Delete.
12510 (xml_cache): Now an std::unordered_map.
12511 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12512 (target_fetch_description_xml): Change return type to
12513 gdb::optional<std::string>, and adjust.
12514 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12515 (target_fetch_description_xml): Change return type to
12516 gdb::optional<std::string>.
12517
12518 2017-04-18 Pedro Alves <palves@redhat.com>
12519
12520 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12521 unittests/optional-selftests.c.
12522 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12523 * unittests/optional-selftests.c: New file.
12524 * unittests/optional/assignment/1.cc: New file.
12525 * unittests/optional/assignment/2.cc: New file.
12526 * unittests/optional/assignment/3.cc: New file.
12527 * unittests/optional/assignment/4.cc: New file.
12528 * unittests/optional/assignment/5.cc: New file.
12529 * unittests/optional/assignment/6.cc: New file.
12530 * unittests/optional/assignment/7.cc: New file.
12531 * unittests/optional/cons/copy.cc: New file.
12532 * unittests/optional/cons/default.cc: New file.
12533 * unittests/optional/cons/move.cc: New file.
12534 * unittests/optional/cons/value.cc: New file.
12535 * unittests/optional/in_place.cc: New file.
12536 * unittests/optional/observers/1.cc: New file.
12537 * unittests/optional/observers/2.cc: New file.
12538
12539 2017-04-18 Pedro Alves <palves@redhat.com>
12540
12541 * common/gdb_optional.h: Include common/traits.h.
12542 (in_place_t): New type.
12543 (in_place): New constexpr variable.
12544 (optional::optional): Remove member initialization of
12545 m_instantiated.
12546 (optional::optional(in_place_t...)): New constructor.
12547 (optional::~optional): Use reset.
12548 (optional::optional(const optional&)): New.
12549 (optional::optional(const optional&&)): New.
12550 (optional::optional(T &)): New.
12551 (optional::optional(T &&)): New.
12552 (operator::operator=(const optional &)): New.
12553 (operator::operator=(optional &&)): New.
12554 (operator::operator= (const T &))
12555 (operator::operator= (T &&))
12556 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12557 (operator::reset): New.
12558 (operator::m_instantiated):: Add in-class initializer.
12559 * common/traits.h: Include <type_traits>.
12560 (struct And): New types.
12561
12562 2017-04-18 Pedro Alves <palves@redhat.com>
12563
12564 * xml-support.c: Include <vector>.
12565 (scope_level::scope_level(const gdb_xml_element *))
12566 (scope_level::scope_level(scope_level&&)): New.
12567 (scope_level::~scope_level): New.
12568 (scope_level_s): Delete.
12569 (gdb_xml_parser::scopes): Now a std::vector.
12570 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12571 Use std::vector.
12572 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12573 scope cleanup code.
12574 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12575 of the scopes member. Use std::vector::emplace_back.
12576
12577 2017-04-18 Pedro Alves <palves@redhat.com>
12578
12579 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12580 a bool.
12581 (gdb_xml_end_element): Change type of first parameter.
12582 (gdb_xml_cleanup): Rename to ...
12583 (gdb_xml_parser::~gdb_xml_parser): ... this.
12584 (gdb_xml_create_parser_and_cleanup): Delete with ...
12585 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12586 to this new ctor.
12587 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12588 using gdb_xml_create_parser_and_cleanup.
12589 (xinclude_parsing_data): Add ctor/dtor.
12590 (xml_xinclude_cleanup): Delete.
12591 (xml_process_xincludes): Create a local xinclude_parsing_data
12592 instead of heap-allocating one. Create a local gdb_xml_parser
12593 instead of heap-allocating one with
12594 gdb_xml_create_parser_and_cleanup.
12595
12596 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12597
12598 PR threads/20743
12599 * fbsd-nat.c (resume_one_thread_cb): Remove.
12600 (resume_all_threads_cb): Remove.
12601 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12602 iterate_over_threads.
12603
12604 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12605
12606 * NEWS: Create a new section for the next release branch.
12607 Rename the section of the current branch, now that it has
12608 been cut.
12609
12610 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12611
12612 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12613 * version.in: Bump version to 8.0.50.DATE-git.
12614
12615 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12616
12617 PR gdb/21385
12618 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12619 independently of the host, and fix build breakage on Cygwin.
12620
12621 2017-04-13 Pedro Alves <palves@redhat.com>
12622
12623 * inferior.c (free_inferior): Convert to ...
12624 (inferior::~inferior): ... this dtor.
12625 (inferior::inferior): New ctor, factored out from ...
12626 (add_inferior_silent): ... here. Allocate the inferior with a new
12627 expression.
12628 (delete_inferior): Call delete instead of free_inferior.
12629 * inferior.h (gdb_environ, continuation): Forward declare.
12630 (inferior): Now a class. Add in-class initialization to all
12631 members. Make boolean fields bool, except 'detaching'.
12632 (inferior::inferior): New explicit ctor.
12633 (inferior::~inferior): New.
12634
12635 2017-04-13 Pedro Alves <palves@redhat.com>
12636
12637 * inferior.c (init_inferior_list): Delete.
12638 * inferior.h (init_inferior_list): Delete.
12639
12640 2017-04-13 Pedro Alves <palves@redhat.com>
12641
12642 PR threads/13217
12643 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12644 (top level): Call it twice, with different thread sets.
12645
12646 2017-04-13 Pedro Alves <palves@redhat.com>
12647
12648 * thread.c: Include <algorithm>.
12649 (thread_array_cleanup): Delete.
12650 (scoped_inc_dec_ref): New class.
12651 (live_threads_count): New function.
12652 (set_thread_refcount): Delete.
12653 (tp_array_compar_ascending): Now a bool.
12654 (tp_array_compar): Convert to a std::sort comparison function.
12655 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12656 and live_threads_count.
12657
12658 2017-04-13 Pedro Alves <palves@redhat.com>
12659
12660 * infrun.c (follow_fork_inferior): Also switch the current
12661 inferior.
12662
12663 2017-04-13 Pedro Alves <palves@redhat.com>
12664
12665 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12666 before calling create_internal_breakpoint.
12667
12668 2017-04-13 Pedro Alves <palves@redhat.com>
12669
12670 * fork-child.c (execv_argv): New class.
12671 (breakup_args): Refactored as ...
12672 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12673 Copy arguments to storage and replace separators with NULL
12674 terminators in place.
12675 (escape_bang_in_quoted_argument): Adjust to return bool.
12676 (execv_argv::execv_argv): New ctor.
12677 (execv_argv::init_for_shell): New method, factored out from
12678 fork_inferior. Don't strdup strings into the vector.
12679 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12680 Remove free_vector_argv call.
12681
12682 2017-04-13 Yao Qi <yao.qi@linaro.org>
12683
12684 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12685 tdep->rx_psw_type.
12686
12687 2017-04-13 Yao Qi <yao.qi@linaro.org>
12688
12689 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12690 * rx-tdep.c (rx_gdbarch_init): Likewise.
12691
12692 2017-04-13 Pedro Alves <palves@redhat.com>
12693
12694 * breakpoint.h (struct breakpoint): Reindent.
12695
12696 2017-04-13 Pedro Alves <palves@redhat.com>
12697
12698 * breakpoint.c (bp_location): Rename to ...
12699 (bp_locations): ... this. All references updated.
12700 (bp_location_count): Rename to ...
12701 (bp_locations_count): ... this. All references updated.
12702 (bp_location_placed_address_before_address_max): Rename to ...
12703 (bp_locations_placed_address_before_address_max): ... this. All
12704 references updated.
12705 (bp_location_shadow_len_after_address_max): Rename to ...
12706 (bp_locations_shadow_len_after_address_max): ... this. All
12707 references updated.
12708 (bp_location_compare_addrs): Rename to ...
12709 (bp_locations_compare_addrs): ... this. All references updated.
12710 (bp_location_compare):Rename to ...
12711 (bp_locations_compare): ... this. All references updated.
12712 (bp_location_target_extensions_update): Rename to ...
12713 (bp_locations_target_extensions_update): ... this. All references
12714 updated.
12715
12716 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12717
12718 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12719 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12720 'sgtty.h'.
12721 * common/gdb_termios.h: New file, with parts of "terminal.h".
12722 * inflow.c: Include "gdb_termios.h".
12723 * ser-unix.c: Include "gdb_termios.h".
12724 * terminal.h: Move terminal-related defines to
12725 "common/gdb_termios.h".
12726
12727 2017-04-12 Tom Tromey <tom@tromey.com>
12728
12729 * probe.c (parse_probes): Update.
12730 * location.h (delete_event_location): Don't declare.
12731 (event_location_deleter::operator()): Update.
12732 * location.c (event_location_deleter::operator()): Rename from
12733 delete_event_location.
12734 * linespec.h (linespec_result) <location>: Change type to
12735 event_location_up.
12736 * linespec.c (canonicalize_linespec, event_location_to_sals)
12737 (decode_objc): Update.
12738 (linespec_result): Don't call delete_event_location.
12739 * breakpoint.c (create_breakpoints_sal)
12740 (bkpt_probe_create_sals_from_location)
12741 (strace_marker_create_sals_from_location): Update.
12742
12743 2017-04-12 Tom Tromey <tom@tromey.com>
12744
12745 * linespec.h (struct linespec_result): Add constructor and
12746 destructor.
12747 (init_linespec_result, destroy_linespec_result)
12748 (make_cleanup_destroy_linespec_result): Don't declare.
12749 * linespec.c (init_linespec_result): Remove.
12750 (linespec_result::~linespec_result): Rename from
12751 destroy_linespec_result. Update.
12752 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12753 Remove.
12754 * breakpoint.c (create_breakpoint, break_range_command)
12755 (decode_location_default): Update.
12756 * ax-gdb.c (agent_command_1): Update.
12757
12758 2017-04-12 Tom Tromey <tom@tromey.com>
12759
12760 * remote.c (remote_download_tracepoint): Update.
12761 * python/py-breakpoint.c (bppy_get_location): Update.
12762 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12763 (gdbscm_breakpoint_location): Update.
12764 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12765 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12766 Change type to event_location_up.
12767 * breakpoint.c (create_overlay_event_breakpoint)
12768 (create_longjmp_master_breakpoint)
12769 (create_std_terminate_master_breakpoint)
12770 (create_exception_master_breakpoint)
12771 (breakpoint_event_location_empty_p, print_breakpoint_location)
12772 (print_one_breakpoint_location, create_thread_event_breakpoint)
12773 (init_breakpoint_sal, create_breakpoint)
12774 (print_recreate_ranged_breakpoint, break_range_command)
12775 (init_ada_exception_breakpoint, say_where): Update.
12776 (base_breakpoint_dtor): Don't call delete_event_location.
12777 (bkpt_print_recreate, tracepoint_print_recreate)
12778 (dprintf_print_recreate, update_static_tracepoint)
12779 (breakpoint_re_set_default): Update.
12780
12781 2017-04-12 Tom Tromey <tom@tromey.com>
12782
12783 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12784 type of "to_do". Update.
12785 (compute_stack_depth): Use std::vector.
12786
12787 2017-04-12 Tom Tromey <tom@tromey.com>
12788
12789 * printcmd.c (find_instruction_backward): Use std::vector.
12790
12791 2017-04-12 Tom Tromey <tom@tromey.com>
12792
12793 * symfile.c (objfilep): Remove typedef.
12794 (reread_symbols): Use a std::vector.
12795
12796 2017-04-12 Tom Tromey <tom@tromey.com>
12797
12798 * mi/mi-main.c (exec_direction_forward): Remove.
12799 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12800 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12801 scoped_restore.
12802 * guile/guile.c (guile_repl_command, guile_command)
12803 (gdbscm_execute_gdb_command): Use scoped_restore.
12804 * go-exp.y (go_parse): Use scoped_restore.
12805 * d-exp.y (d_parse): Use scoped_restore.
12806 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12807 * c-exp.y (c_parse): Use scoped_restore.
12808
12809 2017-04-12 Tom Tromey <tom@tromey.com>
12810
12811 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12812 (mi_parse): Update return type.
12813 (mi_parse_free): Remove.
12814 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12815 (mi_parse::~mi_parse): Rename from mi_parse_free.
12816 (mi_parse_cleanup): Remove.
12817 (mi_parse): Return a unique_ptr. Use new.
12818 * mi/mi-main.c (mi_execute_command): Update.
12819
12820 2017-04-12 Tom Tromey <tom@tromey.com>
12821
12822 * location.c (explicit_location_lex_one): Return a
12823 unique_xmalloc_ptr.
12824 (string_to_explicit_location): Update. Remove cleanups.
12825
12826 2017-04-12 Tom Tromey <tom@tromey.com>
12827
12828 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12829 (compare_value_and_voffset): Change type. Update.
12830 (compute_vtable_size): Change type of "offset_vec".
12831 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12832 (gnuv3_get_typeid): Remove extraneous declaration.
12833
12834 2017-04-12 Tom Tromey <tom@tromey.com>
12835
12836 * charset.h (wchar_iterator): Fix comment.
12837
12838 2017-04-12 Tom Tromey <tom@tromey.com>
12839
12840 * charset.c (iconv_wrapper): New class.
12841 (cleanup_iconv): Remove.
12842 (convert_between_encodings): Use it.
12843
12844 2017-04-12 Tom Tromey <tom@tromey.com>
12845
12846 * symfile.h (increment_reading_symtab): Update type.
12847 * symfile.c (decrement_reading_symtab): Remove.
12848 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12849 * psymtab.c (psymtab_to_symtab): Update.
12850 * dwarf2read.c (dw2_instantiate_symtab): Update.
12851
12852 2017-04-12 Tom Tromey <tom@tromey.com>
12853
12854 * jit.c (struct jit_reader): Declare separately. Add constructor
12855 and destructor. Change type of "handle".
12856 (loaded_jit_reader): Define separately.
12857 (jit_reader_load): Update. New "new".
12858 (jit_reader_unload_command): Use "delete".
12859 * gdb-dlfcn.h (struct dlclose_deleter): New.
12860 (gdb_dlhandle_up): New typedef.
12861 (gdb_dlopen, gdb_dlsym): Update types.
12862 (gdb_dlclose): Remove.
12863 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12864 (gdb_dlsym): Change type of "handle".
12865 (make_cleanup_dlclose): Remove.
12866 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12867 * compile/compile-c-support.c (load_libcc): Update.
12868
12869 2017-04-12 Tom Tromey <tom@tromey.com>
12870
12871 * symtab.h (find_pcs_for_symtab_line): Change return type.
12872 * symtab.c (find_pcs_for_symtab_line): Change return type.
12873 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12874 type of "vec". Update.
12875 (ltpy_get_pcs_for_line): Update.
12876 * linespec.c (decode_digits_ordinary): Update.
12877
12878 2017-04-12 Tom Tromey <tom@tromey.com>
12879
12880 * tracepoint.c (actions_command): Update.
12881 * python/python.c (python_command, python_interactive_command):
12882 Update.
12883 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12884 * guile/guile.c (guile_command): Update.
12885 * defs.h (read_command_lines, read_command_lines_1): Return
12886 command_line_up.
12887 (command_lines_deleter): New struct.
12888 (command_line_up): New typedef.
12889 * compile/compile.c (compile_code_command)
12890 (compile_print_command): Update.
12891 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12892 command_line_up.
12893 (make_cleanup_free_command_lines): Remove.
12894 * cli/cli-script.c (get_command_line, read_command_lines_1)
12895 (copy_command_lines): Return command_line_up.
12896 (while_command, if_command, read_command_lines, define_command)
12897 (document_command): Update.
12898 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12899 Remove.
12900 * breakpoint.h (breakpoint_set_commands): Change type of
12901 "commands".
12902 * breakpoint.c (breakpoint_set_commands): Change type of
12903 "commands". Update.
12904 (do_map_commands_command, update_dprintf_command_list)
12905 (create_tracepoint_from_upload): Update.
12906
12907 2017-04-12 Tom Tromey <tom@tromey.com>
12908
12909 * tracepoint.c (scope_info): Update.
12910 * spu-tdep.c (spu_catch_start): Update.
12911 * python/python.c (gdbpy_decode_line): Update.
12912 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12913 * python/py-breakpoint.c (bppy_init): Update.
12914 * probe.c (parse_probes): Update.
12915 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12916 * location.h (event_location_deleter): New struct.
12917 (event_location_up): New typedef.
12918 (new_linespec_location, new_address_location, new_probe_location)
12919 (new_explicit_location, copy_event_location)
12920 (string_to_event_location, string_to_event_location_basic)
12921 (string_to_explicit_location): Update return type.
12922 (make_cleanup_delete_event_location): Remove.
12923 * location.c (new_linespec_location, new_address_location)
12924 (new_probe_location, new_explicit_location, copy_event_location):
12925 Return event_location_up.
12926 (delete_event_location_cleanup)
12927 (make_cleanup_delete_event_location): Remove.
12928 (string_to_explicit_location, string_to_event_location_basic)
12929 (string_to_event_location): Return event_location_up.
12930 * linespec.c (canonicalize_linespec, event_location_to_sals)
12931 (decode_line_with_current_source)
12932 (decode_line_with_last_displayed, decode_objc): Update.
12933 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12934 * completer.c (location_completer): Update.
12935 * cli/cli-cmds.c (edit_command, list_command): Update.
12936 * breakpoint.c (create_overlay_event_breakpoint)
12937 (create_longjmp_master_breakpoint)
12938 (create_std_terminate_master_breakpoint)
12939 (create_exception_master_breakpoint)
12940 (create_thread_event_breakpoint): Update.
12941 (init_breakpoint_sal): Update. Remove some dead code.
12942 (create_breakpoint_sal): Change type of "location". Update.
12943 (create_breakpoints_sal, create_breakpoint, break_command_1)
12944 (dprintf_command, break_range_command, until_break_command)
12945 (init_ada_exception_breakpoint)
12946 (strace_marker_create_sals_from_location)
12947 (update_static_tracepoint, trace_command, ftrace_command)
12948 (strace_command, create_tracepoint_from_upload): Update.
12949 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12950 * ax-gdb.c (agent_command_1): Update.
12951
12952 2017-04-12 Pedro Alves <palves@redhat.com>
12953
12954 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12955 * configure.tgt: Handle i[34567]86-*-go32* and
12956 i[34567]86-*-msdosdjgpp*.
12957 * i386-tdep.c (i386_svr4_reg_to_regnum):
12958 Make extern.
12959 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12960 i386-go32-tdep.c.
12961 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12962 * i386-go32-tdep.c: New file.
12963 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12964 declarations.
12965
12966 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12967
12968 * aix-thread.c (pd_status2str): Change return type to const char *.
12969
12970 2017-04-12 Pedro Alves <palves@redhat.com>
12971
12972 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12973 calls to set_gdbarch_gnu_triplet_regexp.
12974
12975 2017-04-12 Pedro Alves <palves@redhat.com>
12976
12977 PR gdb/21323
12978 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12979 New enum value.
12980 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12981 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12982 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12983 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12984 * gdbarch.h, gdbarch.c: Regenerate.
12985 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12986 gdbarch_wchar_bit and gdbarch_wchar_signed.
12987 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12988 * arm-tdep.c (arm_gdbarch_init): Likewise.
12989 * avr-tdep.c (avr_gdbarch_init): Likewise.
12990 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12991 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12992 * i386-tdep.c (i386_go32_init_abi): Likewise.
12993 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12994 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12995 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12996 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12997 * sh-tdep.c (sh_gdbarch_init): Likewise.
12998 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12999 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13000 * windows-tdep.c (windows_init_abi): Likewise.
13001 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13002
13003 2017-04-12 Pedro Alves <palves@redhat.com>
13004
13005 PR c++/21323
13006 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13007 cplus_primitive_type_char32_t>: New enum values.
13008 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13009 and cplus_primitive_type_char32_t.
13010 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13011 32, use the archtecture's built-in type for char16_t and char32_t,
13012 respectively. Otherwise, fallback to init_integer_type as before,
13013 but make the type unsigned, and issue a complaint.
13014 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13015
13016 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13017
13018 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13019 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13020
13021 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13022
13023 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13024 'const char *'.
13025
13026 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13027
13028 * common/common-utils.c (free_vector_argv): New function.
13029 * common/common-utils.h: Include <vector>.
13030 (free_vector_argv): New prototype.
13031 * darwin-nat.c (darwin_create_inferior): Rewrite function
13032 prototype in order to constify "exec_file" and accept a
13033 "std::string" for "allargs".
13034 * fork-child.c: Include <vector>.
13035 (breakup_args): Rewrite function, using C++.
13036 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13037 and accept "std::string" for "allargs". Update the code to
13038 calculate "argv" based on "allargs". Update calls to "exec_fun"
13039 and "execvp".
13040 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13041 order to constify "exec_file" and accept a "std::string" for
13042 "allargs".
13043 * go32-nat.c (go32_create_inferior): Likewise.
13044 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13045 * infcmd.c (run_command_1): Constify "exec_file". Use
13046 "std::string" for inferior arguments.
13047 * inferior.h (fork_inferior): Update prototype.
13048 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13049 prototype in order to constify "exec_file" and accept a
13050 "std::string" for "allargs".
13051 * nto-procfs.c (procfs_create_inferior): Likewise.
13052 * procfs.c (procfs_create_inferior): Likewise.
13053 * remote-sim.c (gdbsim_create_inferior): Likewise.
13054 * remote.c (extended_remote_run): Update code to accept
13055 "std::string" as argument.
13056 (extended_remote_create_inferior): Rewrite function prototype in
13057 order to constify "exec_file" and accept a "std::string" for
13058 "allargs".
13059 * rs6000-nat.c (super_create_inferior): Likewise.
13060 (rs6000_create_inferior): Likewise.
13061 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13062 * windows-nat.c (windows_create_inferior): Likewise.
13063
13064 2017-04-11 Pedro Alves <palves@redhat.com>
13065
13066 * thread.c: Fix whitespace throughout.
13067
13068 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13069
13070 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13071
13072 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13073
13074 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13075
13076 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13077
13078 PR gdb/21364
13079 * osdata.c (info_osdata): Check if 'type' is an empty string
13080 instead of NULL.
13081
13082 2017-04-10 Pedro Alves <palves@redhat.com>
13083
13084 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13085 (ptid_to_global_thread_id, in_thread_list)
13086 (do_captured_list_thread_ids, set_resumed, set_running)
13087 (set_executing, set_stop_requested, finish_thread_state)
13088 (validate_registers_access, can_access_registers_ptid)
13089 (print_thread_info_1, switch_to_thread)
13090 (do_restore_current_thread_cleanup)
13091 (make_cleanup_restore_current_thread, thread_command)
13092 (thread_name_command): Use operator== instead of ptid_equal.
13093
13094 2017-04-10 Pedro Alves <palves@redhat.com>
13095
13096 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13097 (current_thread_cleanup_chain): Delete.
13098 (restore_current_thread_cleanup_dtor)
13099 (make_cleanup_restore_current_thread): Remove references to
13100 current_thread_cleanup_chain.
13101
13102 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13103
13104 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13105 REG_UNKNOWN.
13106
13107 2017-04-10 Yao Qi <yao.qi@linaro.org>
13108
13109 PR gdb/19942
13110 * gdbthread.h (thread_info::deletable): New method.
13111 (thread_info::incref): New method.
13112 (thread_info::decref): New method.
13113 (thread_info::refcount): Move it to private.
13114 * infrun.c (save_stop_context): Call inc_refcount.
13115 (release_stop_context_cleanup): Likewise.
13116 * thread.c (set_thread_exited): New function.
13117 (init_thread_list): Delete "tp" only it is deletable, otherwise
13118 call set_thread_exited.
13119 (delete_thread_1): Call set_thread_exited.
13120 (current_thread_cleanup) <inferior_pid>: Remove.
13121 <thread>: New field.
13122 (restore_current_thread_ptid_changed): Removed.
13123 (do_restore_current_thread_cleanup): Adjust.
13124 (restore_current_thread_cleanup_dtor): Don't call
13125 find_thread_ptid.
13126 (set_thread_refcount): Use dec_refcount.
13127 (make_cleanup_restore_current_thread): Adjust.
13128 (thread_apply_all_command): Call inc_refcount.
13129 (_initialize_thread): Don't call
13130 observer_attach_thread_ptid_changed.
13131
13132 2017-04-10 Yao Qi <yao.qi@linaro.org>
13133
13134 * thread.c (delete_thread_1): Hoist code on marking thread as
13135 exited.
13136
13137 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13138
13139 * windows-nat.c (windows_detach): Initialize ptid with
13140 minus_one_ptid.
13141
13142 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13143
13144 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13145
13146 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13147
13148 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13149 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13150 (bfin_pseudo_register_write): Likewise
13151
13152 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13153
13154 * common/ptid.h (struct ptid): Change to...
13155 (class ptid_t): ... this.
13156 <ptid_t>: New constructors.
13157 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13158 matches>: New methods.
13159 <make_null, make_minus_one>: New static methods.
13160 <pid>: Rename to...
13161 <m_pid>: ...this.
13162 <lwp>: Rename to...
13163 <m_lwp>: ...this.
13164 <tid>: Rename to...
13165 <m_tid>: ...this.
13166 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13167 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13168 as references, move comment to class ptid_t.
13169 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13170 ptid_t static methods.
13171 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13172 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13173 Take ptid arguments as references, implement using ptid_t methods.
13174 * unittests/ptid-selftests.c: New file.
13175 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13176 unittests/ptid-selftests.c.
13177 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13178
13179 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13180
13181 * python/python.c (python_run_simple_file): Cast mode literal to
13182 non-const char pointer as expected by PyFile_FromString.
13183
13184 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13185
13186 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13187 minus_one_ptid and null_ptid.
13188
13189 2017-04-05 Pedro Alves <palves@redhat.com>
13190
13191 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13192 * configure: Regenerate.
13193
13194 2017-04-05 Pedro Alves <palves@redhat.com>
13195
13196 * ada-exp.y (yyerror): Constify.
13197 * ada-lang.c (bound_name, get_selections)
13198 (ada_variant_discrim_type)
13199 (ada_variant_discrim_name, ada_value_struct_elt)
13200 (ada_lookup_struct_elt_type, is_unchecked_variant)
13201 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13202 (catch_ada_exception_command_split)
13203 (catch_ada_assert_command_split, catch_assert_command)
13204 (ada_op_name): Constify.
13205 * ada-lang.h (ada_yyerror, get_selections)
13206 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13207 * arc-tdep.c (arc_print_frame_cache): Constify.
13208 * arm-tdep.c (arm_skip_stub): Constify.
13209 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13210 (gen_aggregate_elt_ref): Constify.
13211 * bcache.c (print_bcache_statistics): Constify.
13212 * bcache.h (print_bcache_statistics): Constify.
13213 * break-catch-throw.c (catch_exception_command_1):
13214 * breakpoint.c (struct ep_type_description::description):
13215 Constify.
13216 (add_solib_catchpoint): Constify.
13217 (catch_fork_command_1): Add cast.
13218 (add_catch_command): Constify.
13219 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13220 Constify.
13221 * bsd-uthread.c (bsd_uthread_state): Constify.
13222 * buildsym.c (patch_subfile_names): Constify.
13223 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13224 Constify.
13225 * c-exp.y (yyerror): Constify.
13226 (token::oper): Constify.
13227 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13228 * c-varobj.c (cplus_describe_child): Constify.
13229 * charset.c (find_charset_names): Add cast.
13230 (find_charset_names): Constify array and add const_cast.
13231 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13232 (edit_command): Constify.
13233 * cli/cli-decode.c (lookup_cmd): Constify.
13234 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13235 Constify.
13236 (struct dump_context): Constify.
13237 (add_dump_command, restore_command): Constify.
13238 * cli/cli-script.c (get_command_line): Constify.
13239 * cli/cli-script.h (get_command_line): Constify.
13240 * cli/cli-utils.c (check_for_argument): Constify.
13241 * cli/cli-utils.h (check_for_argument): Constify.
13242 * coff-pe-read.c (struct read_pe_section_data): Constify.
13243 * command.h (lookup_cmd): Constify.
13244 * common/print-utils.c (decimal2str): Constify.
13245 * completer.c (gdb_print_filename): Constify.
13246 * corefile.c (set_gnutarget): Constify.
13247 * cp-name-parser.y (yyerror): Constify.
13248 * cp-valprint.c (cp_print_class_member): Constify.
13249 * cris-tdep.c (cris_register_name, crisv32_register_name):
13250 Constify.
13251 * d-exp.y (yyerror): Constify.
13252 (struct token::oper): Constify.
13253 * d-lang.h (d_yyerror): Constify.
13254 * dbxread.c (struct header_file_location::name): Constify.
13255 (add_old_header_file, add_new_header_file, last_function_name)
13256 (dbx_next_symbol_text, add_bincl_to_list)
13257 (find_corresponding_bincl_psymtab, set_namestring)
13258 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13259 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13260 * defs.h (command_line_input, print_address_symbolic)
13261 (deprecated_readline_begin_hook): Constify.
13262 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13263 Constify.
13264 * event-top.c (handle_line_of_input): Constify and add cast.
13265 * exceptions.c (catch_errors): Constify.
13266 * exceptions.h (catch_errors): Constify.
13267 * expprint.c (print_subexp_standard, op_string, op_name)
13268 (op_name_standard, dump_raw_expression, dump_raw_expression):
13269 * expression.h (op_name, op_string, dump_raw_expression):
13270 Constify.
13271 * f-exp.y (yyerror): Constify.
13272 (struct token::oper): Constify.
13273 (struct f77_boolean_val::name): Constify.
13274 * f-lang.c (f_word_break_characters): Constify.
13275 * f-lang.h (f_yyerror): Constify.
13276 * fork-child.c (fork_inferior): Add cast.
13277 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13278 (new_variant): Constify.
13279 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13280 * gdbarch.c: Regenerate.
13281 * gdbcore.h (set_gnutarget): Constify.
13282 * go-exp.y (yyerror): Constify.
13283 (token::oper): Constify.
13284 * go-lang.h (go_yyerror): Constify.
13285 * go32-nat.c (go32_sysinfo): Constify.
13286 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13287 * guile/scm-cmd.c (cmdscm_function): Constify.
13288 * guile/scm-param.c (pascm_param_value): Constify.
13289 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13290 (h8300sx_register_name): Constify.
13291 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13292 Constify.
13293 * ia64-tdep.c (ia64_register_names): Constify.
13294 * infcmd.c (construct_inferior_arguments): Constify.
13295 (path_command, attach_post_wait): Constify.
13296 * language.c (show_range_command, show_case_command)
13297 (unk_lang_error): Constify.
13298 * language.h (language_defn::la_error)
13299 (language_defn::la_name_of_this): Constify.
13300 * linespec.c (decode_line_2): Constify.
13301 * linux-thread-db.c (thread_db_err_str): Constify.
13302 * lm32-tdep.c (lm32_register_name): Constify.
13303 * m2-exp.y (yyerror): Constify.
13304 * m2-lang.h (m2_yyerror): Constify.
13305 * m32r-tdep.c (m32r_register_names): Constify and make static.
13306 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13307 * m88k-tdep.c (m88k_register_name): Constify.
13308 * macroexp.c (appendmem): Constify.
13309 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13310 (upgrade_type, parse_external, parse_partial_symbols)
13311 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13312 (new_symbol): Constify.
13313 * memattr.c (mem_info_command): Constify.
13314 * mep-tdep.c (register_name_from_keyword): Constify.
13315 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13316 Constify.
13317 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13318 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13319 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13320 cast.
13321 (mi_execute_async_cli_command): Constify.
13322 * mips-tdep.c (mips_register_name): Constify.
13323 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13324 (am33_register_name, am33_2_register_name)
13325 * moxie-tdep.c (moxie_register_names): Constify.
13326 * nat/linux-osdata.c (osdata_type): Constify fields.
13327 * nto-tdep.c (nto_parse_redirection): Constify.
13328 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13329 (lookup_child_selector): Constify.
13330 (objc_methcall::name): Constify.
13331 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13332 (lookup_struct_typedef): Constify.
13333 * objfiles.c (pc_in_section): Constify.
13334 * objfiles.h (pc_in_section): Constify.
13335 * p-exp.y (struct token::oper): Constify.
13336 (yyerror): Constify.
13337 * p-lang.h (pascal_yyerror): Constify.
13338 * parser-defs.h (op_name_standard): Constify.
13339 (op_print::string): Constify.
13340 (exp_descriptor::op_name): Constify.
13341 * printcmd.c (print_address_symbolic): Constify.
13342 * psymtab.c (print_partial_symbols): Constify.
13343 * python/py-breakpoint.c (stop_func): Constify.
13344 (bppy_get_expression): Constify.
13345 * python/py-cmd.c (cmdpy_completer::name): Constify.
13346 (cmdpy_function): Constify.
13347 * python/py-event.c (evpy_add_attribute)
13348 (gdbpy_initialize_event_generic): Constify.
13349 * python/py-event.h (evpy_add_attribute)
13350 (gdbpy_initialize_event_generic): Constify.
13351 * python/py-evts.c (add_new_registry): Constify.
13352 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13353 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13354 * python/py-inferior.c (get_buffer): Add cast.
13355 * python/py-param.c (parm_constant::name): Constify.
13356 * python/py-unwind.c (fprint_frame_id): Constify.
13357 * python/python.c (gdbpy_parameter_value): Constify.
13358 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13359 * remote.c (memory_packet_config::name): Constify.
13360 (show_packet_config_cmd, remote_write_bytes)
13361 (remote_buffer_add_string):
13362 * reverse.c (exec_reverse_once): Constify.
13363 * rs6000-tdep.c (variant::name, variant::description): Constify.
13364 * rust-exp.y (rustyyerror): Constify.
13365 * rust-lang.c (rust_op_name): Constify.
13366 * rust-lang.h (rustyyerror): Constify.
13367 * serial.h (serial_ops::name): Constify.
13368 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13369 (sh_sh3e_register_name, sh_sh2e_register_name)
13370 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13371 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13372 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13373 (sh_sh4al_dsp_register_name): Constify.
13374 * sh64-tdep.c (sh64_register_name): Constify.
13375 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13376 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13377 * stabsread.c (patch_block_stabs, read_type_number)
13378 (ref_map::stabs, ref_add, process_reference)
13379 (symbol_reference_defined, define_symbol, define_symbol)
13380 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13381 (read_one_struct_field, read_struct_fields, read_baseclasses)
13382 (read_tilde_fields, read_struct_type, read_array_type)
13383 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13384 (read_huge_number, read_range_type, read_args, common_block_start)
13385 (find_name_end): Constify.
13386 * stabsread.h (common_block_start, define_symbol)
13387 (process_one_symbol, symbol_reference_defined, ref_add):
13388 * symfile.c (get_section_index, add_symbol_file_command):
13389 * symfile.h (get_section_index): Constify.
13390 * target-descriptions.c (tdesc_type::name): Constify.
13391 (tdesc_free_type): Add cast.
13392 * target.c (find_default_run_target):
13393 (add_deprecated_target_alias, find_default_run_target)
13394 (target_announce_detach): Constify.
13395 (do_option): Constify.
13396 * target.h (add_deprecated_target_alias): Constify.
13397 * thread.c (print_thread_info_1): Constify.
13398 * top.c (deprecated_readline_begin_hook, command_line_input):
13399 Constify.
13400 (init_main): Add casts.
13401 * top.h (handle_line_of_input): Constify.
13402 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13403 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13404 (tfind_command): Rename to ...
13405 (tfind_command_1): ... this and constify.
13406 (tfind_command): New function.
13407 (tfind_end_command, tfind_start_command): Adjust.
13408 (encode_source_string): Constify.
13409 * tracepoint.h (encode_source_string): Constify.
13410 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13411 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13412 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13413 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13414 * tui/tui-win.c (parse_scrolling_args): Constify.
13415 * tui/tui-windata.c (tui_erase_data_content): Constify.
13416 * tui/tui-windata.h (tui_erase_data_content): Constify.
13417 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13418 * tui/tui.c (tui_enable): Add cast.
13419 * utils.c (defaulted_query): Constify.
13420 (init_page_info): Add cast.
13421 (puts_debug, subset_compare): Constify.
13422 * utils.h (subset_compare): Constify.
13423 * varobj.c (varobj_format_string): Constify.
13424 * varobj.h (varobj_format_string): Constify.
13425 * vax-tdep.c (vax_register_name): Constify.
13426 * windows-nat.c (windows_detach): Constify.
13427 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13428 * xml-support.c (gdb_xml_end_element): Constify.
13429 * xml-tdesc.c (tdesc_start_reg): Constify.
13430 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13431 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13432 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13433
13434 2017-04-05 Pedro Alves <palves@redhat.com>
13435
13436 * proc-api.c (struct trans): Constify.
13437 (procfs_note): Constify.
13438 * proc-events.c (struct trans, syscall_table):
13439 * proc-flags.c (struct trans): Constify.
13440 * proc-utils.h (procfs_note): Constify.
13441 * proc-why.c (struct trans): Constify.
13442 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13443 (procfs_detach): Constify.
13444 * sol-thread.c (struct string_map): Constify.
13445 (td_err_string, td_state_string): Constify.
13446
13447 2017-04-05 Pedro Alves <palves@redhat.com>
13448
13449 * proc-api.c (procfs_filename): Don't initialize
13450 procfs_filename.
13451 (prepare_to_trace): Assume procfs_filename is non-NULL.
13452 (_initialize_proc_api): Give procfs_filename a default value here.
13453
13454 2017-04-05 Pedro Alves <palves@redhat.com>
13455
13456 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13457 'cond_string' parameter.
13458 (extract_exception_regexp): Constify 'string' parameter.
13459 (catch_exception_command_1): Constify.
13460 * breakpoint.c (init_catchpoint)
13461 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13462 parameter.
13463 (ep_parse_optional_if_clause, catch_fork_command_1)
13464 (catch_exec_command_1): Constify.
13465 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13466 parameter.
13467 (ep_parse_optional_if_clause): Constify.
13468 * cli/cli-utils.c (remove_trailing_whitespace)
13469 (check_for_argument): Constify.
13470 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13471 non-const overload.
13472 (check_for_argument): Likewise.
13473
13474 2017-04-05 Pedro Alves <palves@redhat.com>
13475
13476 * event-top.c (command_line_handler): Add cast to execute_command
13477 call.
13478 * record-btrace.c (cmd_record_btrace_bts_start)
13479 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13480 (cmd_record_btrace_start): Add cast to execute_command call.
13481 * record-full.c (record_full_goto_insn):
13482 * record.c (record_start, record_stop): Add cast to
13483 execute_command_to_string calls.
13484 (cmd_record_start): Add cast to execute_command calls.
13485
13486 2017-04-05 Pedro Alves <palves@redhat.com>
13487
13488 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13489 static inline function.
13490 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13491 array and use gdb_PyArg_ParseTupleAndKeywords.
13492 * python/py-cmd.c (cmdpy_init): Likewise.
13493 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13494 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13495 (infpy_search_memory): Likewise.
13496 * python/py-objfile.c (objfpy_add_separate_debug_file)
13497 (gdbpy_lookup_objfile): Likewise.
13498 * python/py-symbol.c (gdbpy_lookup_symbol)
13499 (gdbpy_lookup_global_symbol): Likewise.
13500 * python/py-type.c (gdbpy_lookup_type): Likewise.
13501 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13502 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13503 Likewise.
13504
13505 2017-04-05 Pedro Alves <palves@redhat.com>
13506
13507 * python/python-internal.h (gdb_PyGetSetDef): New type.
13508 * python/py-block.c (block_object_getset)
13509 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13510 * python/py-event.c (event_object_getset)
13511 (finish_breakpoint_object_getset): Likewise.
13512 * python/py-inferior.c (inferior_object_getset): Likewise.
13513 * python/py-infthread.c (thread_object_getset): Likewise.
13514 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13515 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13516 * python/py-objfile.c (objfile_getset): Likewise.
13517 * python/py-progspace.c (pspace_getset): Likewise.
13518 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13519 Likewise.
13520 * python/py-record.c (recpy_record_getset): Likewise.
13521 * python/py-symbol.c (symbol_object_getset): Likewise.
13522 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13523 Likewise.
13524 * python/py-type.c (type_object_getset, field_object_getset):
13525 Likewise.
13526 * python/py-value.c (value_object_getset): Likewise.
13527
13528 2017-04-05 Pedro Alves <palves@redhat.com>
13529
13530 * python/python-internal.h (gdb_PyObject_CallMethod)
13531 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13532 New functions.
13533 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13534 (PySys_GetObject, PySys_SetPath): New macros.
13535
13536 2017-04-05 Pedro Alves <palves@redhat.com>
13537
13538 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13539 info_osdata_command.
13540 * osdata.c (info_osdata_command): Rename to ...
13541 (info_osdata): ... this. Constify 'type' parameter, and remove
13542 the 'from_tty' parameter. Accept NULL TYPE.
13543 (info_osdata_command): New function.
13544 * osdata.h (info_osdata_command): Remove declaration.
13545 (info_osdata): New declaration.
13546
13547 2017-04-05 Pedro Alves <palves@redhat.com>
13548
13549 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13550 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13551 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13552 parameter.
13553 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13554 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13555 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13556 parameter.
13557 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13558 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13559 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13560 (mi_cmd_file_list_exec_source_files)
13561 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13562 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13563 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13564 parameter.
13565 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13566 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13567 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13568 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13569 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13570 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13571 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13572 'command' parameter.
13573 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13574 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13575 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13576 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13577 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13578 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13579 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13580 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13581 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13582 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13583 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13584 parameter.
13585 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13586 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13587 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13588 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13589 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13590 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13591 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13592 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13593 (mi_cmd_data_list_changed_registers)
13594 (mi_cmd_data_write_register_values)
13595 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13596 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13597 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13598 (mi_cmd_list_features, mi_cmd_list_target_features)
13599 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13600 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13601 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13602 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13603 (mi_cmd_trace_frame_collected): Constify 'command'
13604 parameter.
13605 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13606 'command' parameter.
13607
13608 2017-04-05 Pedro Alves <palves@redhat.com>
13609
13610 * ada-lang.c (ada_completer_word_break_characters): Now a const
13611 array.
13612 (ada_get_gdb_completer_word_break_characters): Constify.
13613 * completer.c (gdb_completer_command_word_break_characters)
13614 (gdb_completer_file_name_break_characters)
13615 (gdb_completer_quote_characters): Now const arrays.
13616 (get_gdb_completer_quote_characters): Constify.
13617 (set_rl_completer_word_break_characters): New function.
13618 (set_gdb_completion_word_break_characters)
13619 (complete_line_internal): Use it.
13620 * completer.h (get_gdb_completer_quote_characters): Constify.
13621 (set_rl_completer_word_break_characters): Declare.
13622 * f-lang.c (f_word_break_characters): Constify.
13623 * language.c (default_word_break_characters): Constify.
13624 * language.h (language_defn::la_word_break_characters): Constify.
13625 (default_word_break_characters): Constify.
13626 * top.c (init_main): Use set_rl_completer_word_break_characters.
13627
13628 2017-04-05 Pedro Alves <palves@redhat.com>
13629
13630 * aix-thread.c (aix_thread_pid_to_str)
13631 (aix_thread_extra_thread_info): Constify.
13632 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13633 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13634 (bsd_uthread_pid_to_str): Constify.
13635 * corelow.c (core_pid_to_str): Constify.
13636 * darwin-nat.c (darwin_pid_to_str): Constify.
13637 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13638 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13639 Constify.
13640 * gnu-nat.c (gnu_pid_to_str): Constify.
13641 * go32-nat.c (go32_pid_to_str): Constify.
13642 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13643 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13644 * inferior.c (inferior_pid_to_str): Constify.
13645 * linux-nat.c (linux_nat_pid_to_str): Constify.
13646 * linux-tdep.c (linux_core_pid_to_str): Constify.
13647 * linux-thread-db.c (thread_db_pid_to_str)
13648 (thread_db_extra_thread_info): Constify.
13649 * nto-tdep.c (nto_extra_thread_info): Constify.
13650 * nto-tdep.h (nto_extra_thread_info): Constify.
13651 * obsd-nat.c (obsd_pid_to_str): Constify.
13652 * procfs.c (procfs_pid_to_str): Constify.
13653 * ravenscar-thread.c (ravenscar_extra_thread_info)
13654 (ravenscar_pid_to_str): Constify.
13655 * remote-sim.c (gdbsim_pid_to_str): Constify.
13656 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13657 Constify.
13658 * sol-thread.c (solaris_pid_to_str): Constify.
13659 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13660 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13661 * target.c (default_pid_to_str, target_pid_to_str)
13662 (normal_pid_to_str, default_pid_to_str): Constify.
13663 * target.h (target_ops::to_pid_to_str)
13664 (target_ops::to_extra_thread_info): Constify.
13665 (target_pid_to_str, normal_pid_to_str): Constify.
13666 * windows-nat.c (windows_pid_to_str): Constify.
13667 * gdbarch.sh (core_pid_to_str): Constify.
13668 * target-delegates.c: Regenerate.
13669 * gdbarch.h, gdbarch.c: Regenerate.
13670
13671 2017-04-05 Pedro Alves <palves@redhat.com>
13672
13673 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13674 the memory of the temporary warning_pre_print override.
13675 * utils.c (warning_pre_print): Constify.
13676 * utils.h (warning_pre_print): Constify.
13677
13678 2017-04-05 Pedro Alves <palves@redhat.com>
13679
13680 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13681 (shell_command): New function.
13682 (make_command): Use std::string.
13683 (init_cli_cmds): Register shell_command instead of shell_escape.
13684
13685 2017-04-05 Pedro Alves <palves@redhat.com>
13686
13687 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13688 * tracepoint.c (default_collect): Don't initialize.
13689
13690 2017-04-05 Pedro Alves <palves@redhat.com>
13691
13692 * macroexp.c (macro_buffer::shared): Now a bool.
13693 (init_buffer): Update.
13694 (init_shared_buffer): Constify 'addr' parameter.
13695 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13696 casts.
13697
13698 2017-04-05 Pedro Alves <palves@redhat.com>
13699
13700 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13701 * disasm.c (set_disassembler_options): Constify local.
13702 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13703
13704 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13705
13706 PR gdb/21352
13707 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13708 option.
13709
13710 2017-04-05 Yao Qi <yao.qi@linaro.org>
13711
13712 * frame.c (frame_unwind_register_unsigned): Call
13713 frame_unwind_register_value.
13714
13715 2017-04-05 Yao Qi <yao.qi@linaro.org>
13716
13717 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13718 Use gdb_test_multiple, and don't match anchor.
13719
13720 2017-04-05 Pedro Alves <palves@redhat.com>
13721
13722 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13723 (Write After Approval): Remove Simon Marchi.
13724
13725 2017-04-05 Pedro Alves <palves@redhat.com>
13726
13727 * common/gdb_optional.h (optional::optional): Make constexpr and
13728 initialize m_dummy.
13729
13730 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13731
13732 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13733 (amd64fbsd_jmp_buf_reg_offset): Remove.
13734 (amd64fbsd_supply_uthread): Remove function.
13735 (amd64fbsd_collect_uthread): Remove function.
13736 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13737 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13738 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13739 (fbsd-nat.c): Update comment.
13740 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13741 (i386fbsd_jmp_buf_reg_offset): Remove.
13742 (i386fbsd_supply_uthread): Remove function.
13743 (i386fbsd_collect_uthread): Remove function.
13744 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13745
13746 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13747
13748 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13749 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13750 * NEWS: Mention that support for FreeBSD/alpha was removed.
13751 * alpha-fbsd-tdep.c: Delete file.
13752 * config/alpha/fbsd.mh: Delete file.
13753 * configure.host: Delete alpha*-*-freebsd* and
13754 alpha*-*-kfreebsd*-gnu.
13755 * configure.tgt: Delete alpha*-*-freebsd* and
13756 alpha*-*-kfreebsd*-gnu.
13757
13758 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13759
13760 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13761 amd64bsd_store_inferior_registers): Use ptid from regcache.
13762
13763 2017-04-04 Pedro Alves <palves@redhat.com>
13764
13765 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13766 data fields, make them private and add "m_" prefixes.
13767 (lnp_state_machine::lnp_state_machine): New ctor.
13768 (record_line, check_line_address, handle_set_discriminator)
13769 (handle_set_address, handle_advance_pc, handle_special_opcode)
13770 (handle_advance_line, handle_set_file, handle_negate_stmt)
13771 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13772 (end_sequence, advance_line): New methods.
13773 (m_gdbarch, m_record_lines_p): New fields.
13774 (lnp_reader_state): Delete.
13775 (dwarf_record_line): Rename to ...
13776 (lnp_state_machine::record_line): ... adjust.
13777 (init_lnp_state_machine): Delete.
13778 (lnp_state_machine::lnp_state_machine): New.
13779 (check_line_address): Rename to ...
13780 (lnp_state_machine::check_line_address): This.
13781 (dwarf_decode_lines_1): Remove reference to "reader_state".
13782 Adjust lnp_state_machine having a non-default ctor. Use bool.
13783 State machine internal state manipulation moved to
13784 lnp_state_machine methods.
13785
13786 2017-04-04 Pedro Alves <palves@redhat.com>
13787
13788 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13789 unittests/offset-type-selftests.c.
13790 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13791 * common/offset-type.h: New file.
13792 * common/preprocessor.h: New file.
13793 * common/traits.h: New file.
13794 * common/valid-expr.h: New file.
13795 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13796 sect_offset and cu_offset strong typedefs throughout.
13797 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13798 typedefs throughout.
13799 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13800 sect_offset and cu_offset strong typedefs throughout.
13801 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13802 typedefs throughout.
13803 * gdbtypes.h: Include "common/offset-type.h".
13804 (cu_offset): Now an offset type (strong typedef) instead of a
13805 struct.
13806 (sect_offset): Likewise.
13807 (union call_site_parameter_u): Rename "param_offset" field to
13808 "param_cu_off".
13809 * unittests/offset-type-selftests.c: New file.
13810
13811 2017-04-04 Pedro Alves <palves@redhat.com>
13812
13813 * common/underlying.h: New file.
13814 * dwarf2read.c: Include "common/gdb_optional.h" and
13815 "common/underlying.h".
13816 (dir_index, file_name_index): New types.
13817 (file_entry): Use them.
13818 (file_entry::include): Use to_underlying.
13819 (line_header::add_file_name): Use dir_index.
13820 (read_formatted_entries): Use gdb::optional. Read form before
13821 writting to file_entry.
13822 (dwarf_decode_line_header): Use dir_index.
13823 (lnp_state_machine::current_file): Use to_underlying.
13824 (lnp_state_machine::file): Change type to file_name_index.
13825 (dwarf_record_line): Use to_underlying.
13826 (init_lnp_state_machine): Use file_name_index.
13827 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13828
13829 2017-04-04 Pedro Alves <palves@redhat.com>
13830
13831 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13832 operator bool, has_value and get methods.
13833
13834 2017-04-04 Pedro Alves <palves@redhat.com>
13835
13836 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13837 fields.
13838 (line_header): Initialize all data fields. Change type of
13839 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13840 Change type of include_dirs to std::vector<const char *>. Remove
13841 num_include_dirs, include_dirs_size. Change type of file_names to
13842 std::vector<file_entry>. Remove num_file_names, file_names_size.
13843 (line_header::line_header): New.
13844 (line_header::add_include_dir, line_header::add_file_name): New
13845 methods.
13846 (line_header::include_dir_at): Remove NULL check.
13847 (line_header::file_name_at): Add const overload.
13848 (line_header_up): New unique_ptr typedef.
13849 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13850 std::vector. Remove free_line_header call.
13851 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13852 free_line_header call.
13853 (free_cu_line_header): Delete.
13854 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13855 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13856 Adjust to use std::vector.
13857 (free_line_header): Delete.
13858 (free_line_header_voidp): Use delete.
13859 (add_include_dir): Replace with ...
13860 (line_header::add_include_dir): ... this method. Use std::vector.
13861 (add_file_name): Replace with ...
13862 (line_header::add_file_name): ... this method. Use std::vector.
13863 (add_include_dir_stub): Delete.
13864 (read_formatted_entries): Remove memset.
13865 (dwarf_decode_line_header): Return a line_header_up instead of a
13866 raw pointer. Remove cleanup handling. Pass lambdas to
13867 read_formatted_entries. Adjust to use line_header methods.
13868 (dwarf_decode_lines_1): Adjust to use line_header methods.
13869 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13870 use std::vector.
13871
13872 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13873
13874 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13875 instead of struct ptid.
13876
13877 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13878
13879 * frame.c (get_frame_register_bytes): Unwind using value.
13880 (put_frame_register_bytes): Likewise.
13881
13882 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13883
13884 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13885 aggregate-like.
13886
13887 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13888
13889 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13890
13891 2017-03-29 Yao Qi <yao.qi@linaro.org>
13892
13893 * gdbthread.h (struct thread_info): Declare constructor and
13894 destructor. Add some in-class member initializers.
13895 * thread.c (free_thread): Remove.
13896 (init_thread_list): Call delete instead of free_thread.
13897 (new_thread): Call thread_info constructor.
13898 (thread_info::thread_info): New function.
13899 (thread_info::~thread_info): New function.
13900 (delete_thread_1): Call delete instead of free_thread.
13901 (make_cleanup_restore_current_thread): Move tp and frame to
13902 inner block.
13903
13904 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13905
13906 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13907 (arc_skip_prologue): Likewise.
13908 (arc_make_frame_cache): Likewise.
13909 (arc_pv_get_operand): New function.
13910 (arc_is_in_prologue): Likewise.
13911 (arc_analyze_prologue): Likewise.
13912 (arc_print_frame_cache): Likewise.
13913 (MAX_PROLOGUE_LENGTH): New constant.
13914
13915 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13916
13917 * configure.tgt: Add arc-insn.o.
13918 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13919 (dump_arc_instruction_command): New function.
13920 (arc_fprintf_disasm): Likewise.
13921 (arc_disassemble_info): Likewise.
13922 (arc_insn_get_operand_value): Likewise.
13923 (arc_insn_get_operand_value_signed): Likewise.
13924 (arc_insn_get_memory_base_reg): Likewise.
13925 (arc_insn_get_memory_offset): Likewise.
13926 (arc_insn_get_branch_target): Likewise.
13927 (arc_insn_dump): Likewise.
13928 (arc_insn_get_linear_next_pc): Likewise.
13929 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13930 (arc_disassemble_info): Likewise.
13931 (arc_insn_get_branch_target): Likewise.
13932 (arc_insn_get_linear_next_pc): Likewise.
13933 * NEWS: Mention new "maint print arc arc-instruction".
13934
13935 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13936
13937 * arc-tdep (maintenance_print_arc_list): New variable.
13938 (maintenance_print_arc_command): New function.
13939
13940 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13941
13942 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13943 Add "limm" and "reserved".
13944 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13945 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13946 * arc-tdep.h (arc_regnum): Likewise.
13947
13948 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13949
13950 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13951 for THREADPTR register.
13952 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13953 register.
13954 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13955 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13956 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13957
13958 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13959
13960 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13961 registers above gdbarch_num_regs (gdbarch) as privileged in
13962 call0 ABI.
13963
13964 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13965
13966 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13967 for a single specified register or for all registers in
13968 a0_base..a0_base + C0_NREGS range.
13969 (supply_gregset_reg): Call regcache_raw_supply for a single
13970 specified register or for all registers in a0_base..a0_base +
13971 C0_NREGS range.
13972
13973 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13974
13975 * arch/xtensa.h (C0_NREGS): Add definition.
13976 * xtensa-tdep.c (C0_NREGS): Remove definition.
13977
13978 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13979
13980 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13981 Drop xtensa_default_isa initialization.
13982 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13983
13984 2017-03-27 Pedro Alves <palves@redhat.com>
13985
13986 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13987 (file_entry::include_dir): New method.
13988 (line_header::include_dir_at, line_header::file_name_at): New
13989 methods.
13990 (setup_type_unit_groups, setup_type_unit_groups)
13991 (psymtab_include_file_name): Simplify using the new methods.
13992 (lnp_state_machine) <the_line_header>: New field.
13993 <file>: Add comment.
13994 (lnp_state_machine::current_file): New method.
13995 (dwarf_record_line): Simplify using the new methods.
13996 (init_lnp_state_machine): Initialize the "the_line_header" field.
13997 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13998 Simplify using the new methods.
13999
14000 2017-03-27 Pedro Alves <palves@redhat.com>
14001
14002 * cp-name-parser.y (make_empty): Delete.
14003 (demangler_special, nested_name, ptr_operator, array_indicator)
14004 (direct_declarator, declarator_1): Use fill_comp instead of
14005 make_empty.
14006
14007 2017-03-27 Pedro Alves <palves@redhat.com>
14008
14009 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14010 to ATTRIBUTE_PRINTF.
14011 * solib-target.c (library_list_start_list): Print "string" not
14012 "version".
14013 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14014 gdb_xml_error call.
14015
14016 2017-03-27 Pedro Alves <palves@redhat.com>
14017
14018 * dwarf2read.c (struct file_and_directory): New.
14019 (dwarf2_get_dwz_file): Adjust to use std::string.
14020 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14021 (find_file_and_directory): Adjust to return a file_and_directory
14022 object.
14023 (read_file_scope): Adjust to use file_and_directory. Remove
14024 make_cleanup/do_cleanups calls.
14025 (open_and_init_dwp_file): Adjust to use std::string. Remove
14026 make_cleanup/do_cleanups calls.
14027 * python/python.c (do_start_initialization): Adjust to ldirname
14028 returning a std::string.
14029 * utils.c (ldirname): Now returns a std::string.
14030 * utils.h (ldirname): Change return type to std::string.
14031 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14032 returning a std::string.
14033 * xml-tdesc.c (file_read_description_xml): Likewise.
14034
14035 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14036
14037 * regcache.c (regcache_debug_print_register): New function.
14038 * regcache.h (regcache_debug_print_register): New declaration.
14039 * target.c (debug_print_register): Remove.
14040 (target_fetch_registers): Call regcache_debug_print_register.
14041 (target_store_registers): Likewise.
14042
14043 2017-03-24 Pádraig Brady <pbrady@fb.com>
14044
14045 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14046 reference beyond the 'lh->include_dirs' array before accessing to
14047 it.
14048 (psymtab_include_file_name): Likewise.
14049 (dwarf_decode_lines_1): Likewise.
14050 (dwarf_decode_lines): Likewise.
14051 (file_file_name): Likewise.
14052
14053 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14054
14055 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14056 inferior_ptid.
14057 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14058 ps_lsetfpregs): Likewise.
14059 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14060 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14061 ps_lsetfpregs): Likewise.
14062 * target.c (target_fetch_registers, target_store_registers):
14063 Remove asserts.
14064
14065 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14066
14067 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14068
14069 2017-03-23 Yao Qi <yao.qi@linaro.org>
14070
14071 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14072 (_initialize_aarch64_tdep): Register it.
14073 (aarch64_record_load_store): Handle PRFM instruction.
14074 (aarch64_process_record_test): New function.
14075
14076 2017-03-23 Yao Qi <yao.qi@linaro.org>
14077
14078 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14079 indentation.
14080
14081 2017-03-23 Yao Qi <yao.qi@linaro.org>
14082
14083 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14084
14085 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14086
14087 python/python.c (do_start_initialization): Fix memory leak.
14088
14089 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14090
14091 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14092 using get_ptrace_pid.
14093 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14094 inferior_ptid.
14095 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14096 inferior_ptid instead of pid.
14097
14098 2017-03-22 Yao Qi <yao.qi@linaro.org>
14099
14100 * aarch64-tdep.c: Wrap locally used classes in anonymous
14101 namespace.
14102 * arm-tdep.c: Likewise.
14103 * linespec.c: Likewise.
14104 * ui-out.c: Likewise.
14105
14106 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14107
14108 PR gdb/19637
14109 * python/lib/gdb/printer/bound_registers.py: Import sys.
14110
14111 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14112
14113 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14114 windows_thread_info parameter and use it instead of
14115 current_thread.
14116 (windows_fetch_inferior_registers): Don't set current_thread,
14117 pass the thread to do_windows_fetch_inferior_registers. Use
14118 ptid from regcache instead of inferior_ptid.
14119 (do_windows_store_inferior_registers): Add windows_thread_info
14120 parameter and use it instead of current_thread.
14121 (windows_store_inferior_registers): Don't set current_thread,
14122 pass the thread to do_windows_store_inferior_registers. Use
14123 ptid from regcache instead of inferior_ptid.
14124
14125 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14126
14127 * ser-mingw.c (ser_windows_raw): Remove reference to
14128 struct serial::current_timeout.
14129
14130 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14131
14132 PR tdep/20928
14133 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14134 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14135 (sparc64_fsr_type): Fix %fsr decoding.
14136
14137 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14138
14139 * python/py-record-btrace.c (btpy_insn_data): Change return type
14140 for Python 2.
14141
14142 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14143
14144 * spu-linux-nat.c (spu_fetch_inferior_registers,
14145 spu_store_inferior_registers): Use ptid from regcache, set and
14146 restore inferior_ptid.
14147 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14148 Likewise.
14149
14150 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14151
14152 * i386-linux-nat.c (fetch_register, store_register,
14153 i386_linux_fetch_inferior_registers,
14154 i386_linux_store_inferior_registers): Use ptid from regcache.
14155 * ia64-linux-nat.c (ia64_linux_fetch_register,
14156 ia64_linux_store_register): Likewise.
14157 * inf-ptrace.c (inf_ptrace_fetch_register,
14158 inf_ptrace_store_register): Likewise.
14159 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14160 m32r_linux_store_inferior_registers): Likewise.
14161 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14162 m68kbsd_store_inferior_registers): Likewise.
14163 * m68k-linux-nat.c (fetch_register, store_register,
14164 m68k_linux_fetch_inferior_registers,
14165 m68k_linux_store_inferior_registers): Likewise.
14166 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14167 m88kbsd_store_inferior_registers): Likewise.
14168 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14169 mips_fbsd_store_inferior_registers): Likewise.
14170 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14171 mips64_linux_regsets_store_registers): Likewise.
14172 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14173 mipsnbsd_store_inferior_registers): Likewise.
14174 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14175 mips64obsd_store_inferior_registers): Likewise.
14176 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14177 Likewise.
14178 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14179 ppcfbsd_store_inferior_registers): Likewise.
14180 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14181 ppc_linux_store_inferior_registers): Likewise.
14182 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14183 ppcnbsd_store_inferior_registers): Likewise.
14184 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14185 ppcobsd_store_registers): Likewise.
14186 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14187 Likewise.
14188 * ravenscar-thread.c (ravenscar_fetch_registers,
14189 ravenscar_store_registers, ravenscar_prepare_to_store):
14190 Likewise.
14191 * record-btrace.c (record_btrace_fetch_registers,
14192 record_btrace_store_registers, record_btrace_prepare_to_store):
14193 Likewise.
14194 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14195 Lookup inferior using ptid from regcache, instead of
14196 current_inferior.
14197 * remote.c (remote_fetch_registers, remote_store_registers): Use
14198 ptid from regcache.
14199 * rs6000-nat.c (fetch_register, store_register): Likewise.
14200 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14201 s390_linux_store_inferior_registers): Likewise.
14202 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14203 shnbsd_store_inferior_registers): Likewise.
14204 * sol-thread.c (sol_thread_fetch_registers,
14205 sol_thread_store_registers): Likewise.
14206 * sparc-nat.c (sparc_fetch_inferior_registers,
14207 sparc_store_inferior_registers): Likewise.
14208 * tilegx-linux-nat.c (fetch_inferior_registers,
14209 store_inferior_registers): Likewise.
14210 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14211 vaxbsd_store_inferior_registers): Likewise.
14212 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14213 store_xtregs): Likewise.
14214
14215 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14216
14217 PR gdb/14441
14218 * NEWS: Mention support for rvalue references in GDB and python.
14219 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14220 supports both lvalue and rvalue references.
14221
14222 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14223
14224 PR gdb/14441
14225 * gdbtypes.c (rank_one_type): Implement overloading
14226 resolution rules regarding rvalue references.
14227
14228 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14229
14230 PR gdb/14441
14231 * aarch64-tdep.c (aarch64_type_align)
14232 (aarch64_extract_return_value, aarch64_store_return_value): Change
14233 lvalue reference type checks to general reference type checks.
14234 * amd64-tdep.c (amd64_classify): Likewise.
14235 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14236 Likewise.
14237 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14238 (arm_store_return_value): Likewise.
14239 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14240 * c-typeprint.c (c_print_type): Likewise.
14241 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14242 (cplus_number_of_children, cplus_describe_child): Likewise.
14243 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14244 * completer.c (expression_completer): Likewise.
14245 * cp-support.c (make_symbol_overload_list_adl_namespace):
14246 Likewise.
14247 * darwin-nat-info.c (info_mach_region_command): Likewise.
14248 * dwarf2loc.c (entry_data_value_coerce_ref)
14249 (value_of_dwarf_reg_entry): Likewise.
14250 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14251 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14252 Likewise.
14253 * findvar.c (extract_typed_address, store_typed_address):
14254 Likewise.
14255 * gdbtypes.c (rank_one_type): Likewise.
14256 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14257 * infcall.c (value_arg_coerce): Likewise.
14258 * language.c (pointer_type): Likewise.
14259 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14260 Likewise.
14261 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14262 * mn10300-tdep.c (mn10300_type_align): Likewise.
14263 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14264 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14265 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14266 Likewise.
14267 * printcmd.c (print_formatted, x_command): Likewise.
14268 * python/py-type.c (typy_get_composite, typy_template_argument):
14269 Likewise.
14270 * python/py-value.c (valpy_referenced_value)
14271 (valpy_get_dynamic_type, value_has_field): Likewise.
14272 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14273 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14274 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14275 * spu-tdep.c (spu_scalar_value_p): Likewise.
14276 * symtab.c (lookup_symbol_aux): Likewise.
14277 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14278 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14279 Likewise.
14280 * valops.c (value_cast_pointers, value_cast)
14281 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14282 (value_struct_elt, value_struct_elt_bitpos)
14283 (value_find_oload_method_list, find_overload_match)
14284 (value_rtti_indirect_type): Likewise.
14285 * valprint.c (val_print_scalar_type_p, generic_val_print):
14286 Likewise.
14287 * value.c (value_actual_type, value_as_address, unpack_long)
14288 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14289 (coerce_ref): Likewise.
14290 * varobj.c (varobj_get_value_type): Likewise.
14291
14292 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14293
14294 PR gdb/14441
14295 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14296 table of constants.
14297 * python/lib/gdb/command/explore.py: Support exploring values
14298 of rvalue reference types.
14299 * python/lib/gdb/types.py: Implement get_basic_type() for
14300 rvalue reference types.
14301 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14302 constant.
14303 * python/py-value.c (valpy_getitem): Add an rvalue reference
14304 check.
14305 (valpy_reference_value): Add new parameter "refcode".
14306 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14307 New wrappers for valpy_reference_value().
14308 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14309 (gdbpy_invoke_xmethod): Likewise.
14310
14311 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14312
14313 PR gdb/14441
14314 * dwarf2read.c (process_die, read_type_die_1): Handle the
14315 DW_TAG_rvalue_reference_type DIE.
14316 (read_tag_reference_type): Add new parameter "refcode".
14317
14318 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14319
14320 PR gdb/14441
14321 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14322 (c_type_print_modifier, c_type_print_varspec_suffix)
14323 (c_type_print_base): Support printing rvalue reference types.
14324 * c-valprint.c (c_val_print, c_value_print): Support printing
14325 rvalue reference values.
14326
14327 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14328
14329 PR gdb/14441
14330 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14331 typename.
14332 * cp-support.c (replace_typedefs): Handle
14333 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14334 * python/py-type.c (typy_lookup_type): Likewise.
14335
14336 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14337
14338 PR gdb/14441
14339 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14340 * parse.c (insert_type): Change assert statement.
14341 (follow_types): Handle rvalue reference types.
14342 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14343 constant.
14344
14345 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14346
14347 PR gdb/14441
14348 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14349 value_ref() interface.
14350 * c-valprint.c (c_value_print): Likewise.
14351 * infcall.c (value_arg_coerce): Likewise.
14352 * python/py-value.c (valpy_reference_value): Likewise.
14353 * valops.c (value_cast, value_reinterpret_cast)
14354 (value_dynamic_cast, typecmp): Likewise.
14355 (value_ref): Parameterize by kind of return value reference type.
14356 * value.h (value_ref): Add new parameter "refcode".
14357
14358 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14359
14360 PR gdb/14441
14361 * dwarf2read.c (read_tag_reference_type): Use
14362 lookup_lvalue_reference_type() instead of lookup_reference_type().
14363 * eval.c (evaluate_subexp_standard): Likewise.
14364 * f-exp.y: Likewise.
14365 * gdbtypes.c (make_reference_type, lookup_reference_type):
14366 Generalize with rvalue reference types.
14367 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14368 convenience wrappers for lookup_reference_type().
14369 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14370 reference kind parameter.
14371 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14372 wrappers for lookup_reference_type().
14373 * guile/scm-type.c (gdbscm_type_reference): Use
14374 lookup_lvalue_reference_type() instead of lookup_reference_type().
14375 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14376 * parse.c (follow_types): Likewise.
14377 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14378 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14379 Likewise.
14380 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14381 (gdbpy_invoke_xmethod): Likewise.
14382 * stabsread.c: Provide extra argument to make_reference_type()
14383 call.
14384 * valops.c (value_ref, value_rtti_indirect_type): Use
14385 lookup_lvalue_reference_type() instead of lookup_reference_type().
14386
14387 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14388
14389 PR gdb/14441
14390 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14391 (TYPE_IS_REFERENCE): New macro.
14392 (struct type): Add rvalue_reference_type field.
14393 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14394
14395 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14396
14397 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14398 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14399 New function definition.
14400 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14401 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14402 New function declaration.
14403 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14404 * mi/mi-interp.h: New file.
14405 * solib.c (info_sharedlibrary_command): Replace for loop with
14406 ALL_SO_LIBS macro
14407 * solib.h (update_solib_list): New function declaration.
14408 (so_list_head): Move macro.
14409 * solist.h (ALL_SO_LIBS): New macro.
14410
14411 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14412
14413 * infcmd.c (post_create_inferior): Remove unused argument in
14414 call to solib_add.
14415 * remote.c (remote_start_remote): Likewise.
14416 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14417 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14418 (enable_break): Likewise.
14419 * solib.c (update_solib_list): Remove unused target argument
14420 and its documentation.
14421 (solib_add): Remove unused target argument. Remove unused
14422 argument in call to update_solib_list.
14423 (info_sharedlibrary_command): Remove unused argument in call
14424 to update_solib_list.
14425 (sharedlibrary_command): Remove unused argument in call to
14426 solib_add.
14427 (handle_solib_event): Likewise.
14428 (reload_shared_libraries): Likewise.
14429 * solib.h (solib_add): Remove unused target argument.
14430
14431 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14432
14433 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14434 (s390_displaced_step_fixup): Cover relative branches with the
14435 default fixup handling. This fixes lack of support for some
14436 relative branch instructions.
14437
14438 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14439
14440 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14441 ptid from regcache.
14442
14443 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14444
14445 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14446 i386_darwin_store_inferior_registers): Use ptid from regcache.
14447
14448 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14449
14450 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14451 i386bsd_store_inferior_registers): Use ptid from regcache.
14452
14453 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14454
14455 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14456 hppaobsd_store_registers): Use ptid from regcache.
14457
14458 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14459
14460 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14461 hppanbsd_store_registers): Use ptid from regcache.
14462
14463 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14464
14465 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14466 from regcache. Use get_ptrace_pid.
14467
14468 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14469
14470 * corelow.c (get_core_register_section): Use ptid from regcache,
14471 update doc.
14472
14473 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14474
14475 * bsd-uthread.c (bsd_uthread_fetch_registers,
14476 bsd_uthread_store_registers): Use ptid from regcache, set and
14477 restore inferior_ptid.
14478
14479 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14480
14481 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14482 fetch_fp_regs, store_register, store_regs, store_fp_register,
14483 store_fp_regs): Use ptid from regcache.
14484
14485 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14486
14487 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14488 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14489 store_vfp_regs): Use ptid from regcache.
14490
14491 2017-03-17 Pedro Alves <palves@redhat.com>
14492
14493 PR remote/21188
14494 * ser-base.c (ser_base_wait_for): Add comment.
14495 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14496 version.
14497 * ser-unix.c (hardwire_raw): Remove reference to
14498 scb->current_timeout.
14499 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14500 (hardwire_ops): Install ser_base_readchar instead of
14501 hardwire_readchar.
14502 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14503 Remove fields.
14504
14505 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14506
14507 PR gdb/19637
14508 * python/lib/gdb/printer/bound_registers.py: Add support for
14509 Python 3.
14510
14511 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14512
14513 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14514 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14515 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14516 byte_offset to subobj_byte_offset. Fix the handling of
14517 DWARF_VALUE_STACK on big-endian targets when coming via an
14518 implicit pointer.
14519 (dwarf2_evaluate_loc_desc): Adjust call to
14520 dwarf2_evaluate_loc_desc_full.
14521 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14522 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14523
14524 2017-03-16 Yao Qi <yao.qi@linaro.org>
14525
14526 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14527 and REVSH instructions.
14528
14529 2017-03-16 Yao Qi <yao.qi@linaro.org>
14530
14531 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14532 (arm_record_test): Declare.
14533 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14534 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14535 align with the manual.
14536 (thumb_record_misc): Adjust the code order to align with the
14537 manual.
14538 (thumb2_record_decode_insn_handler): Fix instruction matching.
14539 (instruction_reader_thumb): New class.
14540 (arm_record_test): New function.
14541
14542 2017-03-16 Yao Qi <yao.qi@linaro.org>
14543
14544 * arm-tdep.c (abstract_memory_reader): New class.
14545 (instruction_reader): New class.
14546 (extract_arm_insn): Add argument 'reader'. Callers updated.
14547 (decode_insn): Likewise.
14548
14549 2017-03-16 Doug Evans <dje@google.com>
14550
14551 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14552 member. Change type of TYPE member to SCM. All uses updated.
14553 (lsscm_make_lazy_string_smob): Add assert.
14554 (lsscm_make_lazy_string): Flag bad length values.
14555 (lsscm_elt_type): New function.
14556 (gdbscm_lazy_string_to_value): Rewrite to use
14557 lsscm_safe_lazy_string_to_value.
14558 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14559 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14560 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14561 in incoming type.
14562 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14563 * guile/scm-type.c (tyscm_scm_to_type): New function.
14564
14565 2017-03-15 Doug Evans <dje@google.com>
14566
14567 PR python/17728, python/18439, python/18779
14568 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14569 member. Change type of TYPE member to PyObject *. All uses updated.
14570 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14571 (gdbpy_create_lazy_string_object): Flag bad length values.
14572 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14573 Handle typedefs in incoming type.
14574 (stpy_lazy_string_elt_type): New function.
14575 (gdbpy_extract_lazy_string): Call it.
14576 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14577 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14578 typedefs in incoming type.
14579
14580 2017-03-16 Doug Evans <dje@google.com>
14581
14582 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14583 * guile/scm-type.c (tyscm_scm_to_type): New function.
14584
14585 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14586
14587 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14588 "ULONGEST" for "skip".
14589
14590 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14591
14592 PR gdb/21220
14593 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14594 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14595 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14596 over ptrace peek/poke until end of buffer or error.
14597
14598 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14599
14600 * parse.c (length_of_subexp): Make static.
14601 * parser-defs.h (length_of_subexp): Remove.
14602
14603 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14604
14605 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14606 as well.
14607
14608 2017-03-14 Pedro Alves <palves@redhat.com>
14609
14610 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14611 (main): Use std::unique_ptr. Remove calls to
14612 cp_demangled_name_parse_free.
14613
14614 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14615
14616 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14617 alphabsd_store_inferior_registers): Use regcache->ptid instead
14618 of inferior_ptid.
14619
14620 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14621
14622 * aix-thread.c (aix_thread_fetch_registers,
14623 aix_thread_store_registers): Use regcache->ptid instead of
14624 inferior_ptid.
14625
14626 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14627
14628 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14629 store_gregs_to_thread, fetch_fpregs_from_thread,
14630 store_fpregs_to_thread): Use regcache->ptid instead of
14631 inferior_ptid.
14632
14633 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14634
14635 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14636 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14637 instead of inferior_ptid.
14638
14639 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14640
14641 * target.c (target_fetch_registers, target_store_registers): Add
14642 assert.
14643
14644 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14645
14646 * regcache.h (regcache_get_ptid): New function.
14647 * regcache.c (regcache_get_ptid): New function.
14648
14649 2017-03-13 Mark Wielaard <mark@klomp.org>
14650
14651 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14652
14653 2017-03-10 Keith Seitz <keiths@redhat.com>
14654
14655 PR c++/8218
14656 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14657
14658 2017-03-08 Pedro Alves <palves@redhat.com>
14659
14660 PR gdb/18360
14661 * infrun.c (start_step_over, do_target_resume, resume)
14662 (restart_threads): Assert we're not resuming a thread that is
14663 meant to be stopped.
14664 (infrun_thread_stop_requested_callback): Delete.
14665 (infrun_thread_stop_requested): If the thread is internally
14666 stopped, queue a pending stop event and clear the thread's
14667 inline-frame state.
14668 (handle_stop_requested): New function.
14669 (handle_syscall_event, handle_inferior_event_1): Use
14670 handle_stop_requested.
14671 (handle_stop_requested): New function.
14672 (handle_signal_stop): Set the thread's stop_signal here instead of
14673 at caller.
14674 (finish_step_over): Clear step over info unconditionally.
14675 (handle_signal_stop): If the user had interrupted the event
14676 thread, consider the stop a random signal.
14677 (handle_signal_stop) <signal arrived while stepping over
14678 breakpoint>: Don't restart threads here.
14679 (stop_waiting): Don't clear step-over info here.
14680
14681 2017-03-08 Pedro Alves <palves@redhat.com>
14682
14683 PR 21206
14684 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14685 goes to argument 2, not 1.
14686
14687 2017-03-08 Pedro Alves <palves@redhat.com>
14688
14689 PR cli/21218
14690 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14691 display_gdb_prompt.
14692 (command_line_input): Add comment.
14693
14694 2017-03-08 Pedro Alves <palves@redhat.com>
14695
14696 PR tui/21216
14697 * tui/tui-file.c (tui_file::write): New.
14698 * tui/tui-file.h (tui_file): Override "write".
14699 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14700 factored out from ...
14701 (tui_puts): ... here.
14702 (tui_putc): Use them.
14703 (tui_write): New function.
14704 * tui/tui-io.h (tui_write): Declare.
14705
14706 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14707
14708 * Makefile.in (SFILES): Replace "environ.c" with
14709 "common/environ.c".
14710 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14711 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14712 to...
14713 * common/environ.c: ... here.
14714 * environ.h: Moved to...
14715 * common/environ.h: ... here.
14716
14717 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14718
14719 * gdbarch.sh (pstring_ptr): New static function.
14720 (gdbarch_disassembler_options): Use it.
14721 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14722 not valid_disassembler_option->name.
14723 * gdbarch.c: Regenerate.
14724
14725 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14726
14727 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14728
14729 2017-03-07 Pedro Alves <palves@redhat.com>
14730
14731 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14732
14733 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14734
14735 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14736 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14737 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14738 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14739
14740 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14741
14742 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14743
14744 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14745
14746 * remote.c (remote_add_target_side_commands): Use range-based
14747 for loop.
14748
14749 2017-03-03 Yao Qi <yao.qi@linaro.org>
14750
14751 PR gdb/21165
14752 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14753 value is lazy.
14754 * valprint.c (common_val_print): Likewise.
14755
14756 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14757
14758 * NEWS: Mention new set/show disassembler-options commands.
14759 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14760 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14761 (prospective_options): New static variable.
14762 (gdb_disassembler::gdb_disassembler): Initialize
14763 m_di.disassembler_options.
14764 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14765 (get_disassembler_options): New function.
14766 (set_disassembler_options): Likewise.
14767 (set_disassembler_options_sfunc): Likewise.
14768 (show_disassembler_options_sfunc): Likewise.
14769 (disassembler_options_completer): Likewise.
14770 (_initialize_disasm): Likewise.
14771 * disasm.h (get_disassembler_options): New prototype.
14772 (set_disassembler_options): Likewise.
14773 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14774 (gdbarch_verify_disassembler_options): Likewise.
14775 * gdbarch.c: Regenerate.
14776 * gdbarch.h: Likewise.
14777 * arm-tdep.c (num_disassembly_options): Delete.
14778 (set_disassembly_style): Likewise.
14779 (arm_disassembler_options): New static variable.
14780 (set_disassembly_style_sfunc): Convert short style name into long
14781 option name. Call set_disassembler_options.
14782 (show_disassembly_style_sfunc): New function.
14783 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14784 set_gdbarch_verify_disassembler_options.
14785 (_initialize_arm_tdep): Delete regnames variable and update callers.
14786 (arm_disassembler_options): Initialize.
14787 (disasm_options): New variable.
14788 (num_disassembly_options): Rename from this...
14789 (num_disassembly_styles): ...to this. Compute by scanning through
14790 disasm_options.
14791 (valid_disassembly_styles): Initialize using disasm_options.
14792 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14793 set_arm_regname_option.
14794 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14795 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14796 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14797 set_gdbarch_verify_disassembler_options.
14798 * s390-tdep.c (s390_disassembler_options): New static variable.
14799 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14800 set_gdbarch_verify_disassembler_options.
14801
14802 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14803
14804 * remote.c (remote_add_target_side_condition): Remove "struct"
14805 keyword from range-based for loop.
14806
14807 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14808
14809 * remote.c (remote_add_target_side_condition): Use range-based
14810 for loop. Update comment.
14811
14812 2017-02-27 Yao Qi <yao.qi@linaro.org>
14813
14814 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14815
14816 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14817
14818 * regcache.c (regcache_raw_update): New function.
14819 (regcache_raw_read): Move code to regcache_raw_update.
14820 * regcache.h (regcache_raw_update): New declaration.
14821 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14822
14823 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14824
14825 * dwarf2read.c (create_debug_type_hash_table): Initialize
14826 header.signature and header.type_offset_in_tu.
14827
14828 2017-02-24 Pedro Alves <palves@redhat.com>
14829
14830 * symtab.c (make_file_symbol_completion_list_1): Use
14831 add_symtab_completions.
14832
14833 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14834
14835 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14836
14837 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14838
14839 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14840 I386_MAX_REGISTER_SIZE.
14841 (i386_pseudo_register_write): Likewise.
14842 (i386_process_record): Likewise.
14843 * i387-tdep.c (i387_supply_xsave): Likewise.
14844 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14845 (store_register): Likewise.
14846
14847 2017-02-23 Pedro Alves <palves@redhat.com>
14848
14849 * ada-lang.c: Include "common/function-view.h".
14850 (ada_iterate_over_symbols): Adjust to use function_view as
14851 callback type.
14852 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14853 (ada_make_symbol_completion_list): Use a lambda.
14854 (ada_exc_search_name_matches): Delete.
14855 (name_matches_regex): New.
14856 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14857 * compile/compile-c-support.c: Include "common/function-view.h".
14858 (print_one_macro): Change prototype to accept a ui_file pointer.
14859 (write_macro_definitions): Use a lambda.
14860 * dwarf2read.c: Include "common/function-view.h".
14861 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14862 (dw2_expand_symtabs_matching): Adjust to use function_view as
14863 callback type.
14864 * language.h: Include "common/function-view.h".
14865 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14866 function_view as callback type.
14867 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14868 * linespec.c: Include "common/function-view.h".
14869 (collect_info::add_symbol): New method.
14870 (struct symbol_and_data_callback, iterate_inline_only, struct
14871 symbol_matcher_data, iterate_name_matcher): Delete.
14872 (iterate_over_all_matching_symtabs): Adjust to use function_view
14873 as callback type and lambdas.
14874 (iterate_over_file_blocks): Adjust to use function_view as
14875 callback type.
14876 (decode_compound_collector): Now a class with private fields.
14877 (decode_compound_collector::release_symbols): New method.
14878 (collect_one_symbol): Rename to...
14879 (decode_compound_collector::operator()): ... this and adjust.
14880 (lookup_prefix_sym): decode_compound_collector construction bits
14881 move to decode_compound_collector ctor. Pass the
14882 decode_compound_collector object directly as callback. Remove
14883 cleanups and use decode_compound_collector::release_symbols
14884 instead.
14885 (symtab_collector): Now a class with private fields.
14886 (symtab_collector::release_symtabs): New method.
14887 (add_symtabs_to_list): Rename to...
14888 (symtab_collector::operator()): ... this and adjust.
14889 (collect_symtabs_from_filename): symtab_collector construction
14890 bits move to symtab_collector ctor. Pass the symtab_collector
14891 object directly as callback. Remove cleanups and use
14892 symtab_collector::release_symtabs instead.
14893 (collect_symbols): Delete.
14894 (add_matching_symbols_to_info): Use lambdas.
14895 * macrocmd.c (print_macro_callback): Delete.
14896 (info_macro_command): Use a lambda.
14897 (info_macros_command): Pass print_macro_definition as callable
14898 directly.
14899 (print_one_macro): Remove 'ignore' parameter.
14900 (macro_list_command): Adjust.
14901 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14902 (macro_for_each_data::user_data): Delete field.
14903 (foreach_macro): Adjust to call the function_view.
14904 (macro_for_each): Adjust to use function_view as callback type.
14905 (foreach_macro_in_scope): Adjust to call the function_view.
14906 (macro_for_each_in_scope): Adjust to use function_view as callback
14907 type.
14908 * macrotab.h: Include "common/function-view.h".
14909 (macro_callback_fn): Declare a prototype instead of a pointer.
14910 Remove "user_data" parameter.
14911 (macro_for_each, macro_for_each_in_scope): Adjust to use
14912 function_view as callback type.
14913 * psymtab.c (partial_map_expand_apply)
14914 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14915 Adjust to use function_view as callback type and to return bool.
14916 (psym_expand_symtabs_matching): Adjust to use function_view as
14917 callback types.
14918 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14919 to use function_view as callback type and to return bool.
14920 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14921 callback types.
14922 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14923 as callback types.
14924 * symfile.h: Include "common/function-view.h".
14925 (expand_symtabs_file_matcher_ftype)
14926 (expand_symtabs_symbol_matcher_ftype)
14927 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14928 return bool.
14929 (quick_symbol_functions::map_symtabs_matching_filename)
14930 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14931 function_view as callback type and return bool.
14932 (expand_symtabs_matching): Adjust to use function_view as callback
14933 type.
14934 (maintenance_expand_name_matcher)
14935 (maintenance_expand_file_matcher): Delete.
14936 (maintenance_expand_symtabs): Use lambdas.
14937 * symtab.c (iterate_over_some_symtabs): Adjust to use
14938 function_view as callback types and return bool.
14939 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14940 of a cleanup.
14941 (lookup_symtab_callback): Delete.
14942 (lookup_symtab): Use a lambda.
14943 (iterate_over_symbols): Adjust to use function_view as callback
14944 type.
14945 (struct search_symbols_data, search_symbols_file_matches)
14946 (search_symbols_name_matches): Delete.
14947 (search_symbols): Use a pair of lambdas.
14948 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14949 (symtab_expansion_callback): Delete.
14950 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14951 * symtab.h: Include "common/function-view.h".
14952 (iterate_over_some_symtabs): Adjust to use function_view as
14953 callback type and return bool.
14954 (iterate_over_symtabs): Adjust to use function_view as callback
14955 type.
14956 (symbol_found_callback_ftype): Remove 'data' parameter and return
14957 bool.
14958 (iterate_over_symbols): Adjust to use function_view as callback
14959 type.
14960
14961 2017-02-23 Pedro Alves <palves@redhat.com>
14962
14963 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14964 (%.o) <unittests/%.c>: New pattern.
14965 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14966 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14967 * common/function-view.h: New file.
14968 * unittests/function-view-selftests.c: New file.
14969 * configure: Regenerate.
14970
14971 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14972
14973 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14974 inferior_ptid.
14975 * go32-nat.c (go32_thread_alive): Likewise.
14976
14977 2017-02-23 Yao Qi <yao.qi@linaro.org>
14978
14979 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14980 delete.
14981
14982 2017-02-23 Yao Qi <yao.qi@linaro.org>
14983
14984 * varobj.c (varobj_clear_saved_item): Use delete instead of
14985 xfree.
14986 (update_dynamic_varobj_children): Likewise.
14987
14988 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14989
14990 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14991
14992 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14993
14994 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14995 m_enum_value to 0 in default constructor.
14996
14997 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14998
14999 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15000 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15001 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15002 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15003 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15004 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15005 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15006 IS_STORE_CONDITIONAL_INSN.
15007
15008 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15009
15010 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15011
15012 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15013
15014 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15015
15016 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15017
15018 * dwarf2read.c (skip_one_die, read_attribute_value)
15019 (dwarf2_const_value_attr, dump_die_shallow)
15020 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15021 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15022
15023 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15024
15025 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15026 (dwarf_parse_macro_header): Accept DWARF version 5.
15027 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15028
15029 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15030
15031 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15032 DW_AT_GNU_*.
15033 * common/common-exceptions.h (enum errors): Likewise.
15034 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15035 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15036 (dwarf_expr_context::execute_stack_op): Likewise.
15037 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15038 Likewise.
15039 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15040 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15041 (show_entry_values_debug, call_site_to_target_addr)
15042 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15043 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15044 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15045 (value_of_dwarf_block_entry, indirect_pieced_value)
15046 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15047 (disassemble_dwarf_expression): Likewise.
15048 * dwarf2read.c (process_die, inherit_abstract_dies)
15049 (read_call_site_scope): Likewise.
15050 * gdbtypes.h (struct func_type, struct call_site_parameter)
15051 (struct call_site): Likewise.
15052 * stack.c (read_frame_arg): Likewise.
15053 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15054
15055 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15056
15057 * defs.h (read_unsigned_leb128): New declaration.
15058 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15059 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15060 (dwarf2_find_location_expression): Call also
15061 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15062 * dwarf2loc.h (dwarf2_version): New declaration.
15063 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15064 rnglists.
15065 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15066 .debug_rnglists.
15067 (struct dwop_section_names): Add loclists_dwo.
15068 (dwop_section_names): Add .debug_loclists.dwo.
15069 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15070 (struct dwarf2_per_cu_data): Add dwarf_version.
15071 (struct dwo_sections): Add loclists.
15072 (struct attr_abbrev): Add implicit_const.
15073 (read_indirect_line_string): New declaration.
15074 (read_unsigned_leb128): Delete declaration.
15075 (rcuh_kind): New definition.
15076 (read_and_check_comp_unit_head): Change parameter
15077 is_debug_types_section to section_kind.
15078 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15079 (read_comp_unit_head): Change parameter abfd to section, add parameter
15080 section_kind. Handle DWARF-5.
15081 (error_check_comp_unit_head): Accept also DWARF version 5.
15082 (read_and_check_comp_unit_head): Change parameter
15083 is_debug_types_section to section_kind.
15084 (read_and_check_type_unit_head): Delete function.
15085 (read_abbrev_offset): Handle DWARF-5.
15086 (create_debug_type_hash_table): Add parameter section_kind. Process
15087 only DW_UT_type. Use signature and type_offset_in_tu from struct
15088 comp_unit_head.
15089 (create_debug_types_hash_table): Update create_debug_type_hash_table
15090 caller.
15091 (create_all_type_units): Call create_debug_type_hash_table.
15092 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15093 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15094 caller.
15095 (skip_one_die): Handle DW_FORM_implicit_const.
15096 (dwarf2_rnglists_process): New function.
15097 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15098 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15099 (read_attribute_value): Handle DW_FORM_implicit_const,
15100 DW_FORM_line_strp.
15101 (read_attribute): Handle DW_FORM_implicit_const.
15102 (read_indirect_string_at_offset_from): New function from
15103 read_indirect_string_at_offset.
15104 (read_indirect_string_at_offset): Call
15105 read_indirect_string_at_offset_from.
15106 (read_indirect_line_string_at_offset): New function.
15107 (read_indirect_string): New function comment.
15108 (read_indirect_line_string): New function.
15109 (read_unsigned_leb128): Make it global.
15110 (dwarf2_string_attr): Handle DWARF-5.
15111 (add_include_dir_stub, read_formatted_entries): New functions.
15112 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15113 Handle DWARF-5.
15114 (per_cu_header_read_in): Update read_comp_unit_head caller.
15115 (dwarf2_version): New function.
15116 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15117 rnglists.
15118 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15119 fields.
15120
15121 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15122
15123 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15124
15125 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15126
15127 * dwarf2read.c (dwarf2_ranges_process): New function from
15128 dwarf2_ranges_read.
15129 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15130 dwarf2_ranges_process.
15131
15132 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15133
15134 * dwarf2read.c (create_debug_type_hash_table): New function from
15135 create_debug_types_hash_table.
15136 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15137 (create_all_type_units, open_and_init_dwo_file): Update
15138 create_debug_types_hash_table callers.
15139
15140 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15141
15142 PR gdb/16188
15143 * fork-child.c (trace_start_error): Fix thinko. va_end should
15144 refer to 'ap', not 'args'.
15145
15146 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15147 Pedro Alves <palves@redhat.com>
15148
15149 PR gdb/16188
15150 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15151 calls succeeded.
15152 * fork-child.c (trace_start_error): New function.
15153 (trace_start_error_with_name): Likewise.
15154 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15155 * inf-ptrace.c (inf_ptrace_me): Likewise.
15156 * inferior.h (trace_start_error): New prototype.
15157 (trace_start_error_with_name): Likewise.
15158
15159 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15160
15161 PR gdb/21164
15162 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15163 NULL before using it.
15164 * symmisc.c (maintenance_print_symbols): Likewise.
15165 (maintenance_print_msymbols): Likewise.
15166
15167 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15168
15169 * NEWS: Add record Python bindings entry.
15170
15171 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15172
15173 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15174 py-record-full.o.
15175 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15176 * python/py-record-btrace.c, python/py-record-btrace.h,
15177 python/py-record-full.c, python/py-record-full.h: New file.
15178 * python/py-record.c: Add include for py-record-btrace.h and
15179 py-record-full.h.
15180 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15181 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15182 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15183 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15184 New definition.
15185 (gdbpy_initialize_btrace): New export.
15186 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15187
15188 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15189
15190 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15191 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15192 * python/py-record.c: New file.
15193 * python/python-internal.h (gdbpy_start_recording,
15194 gdbpy_current_recording, gdpy_stop_recording,
15195 gdbpy_initialize_record): New export.
15196 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15197 (python_GdbMethods): Add gdbpy_start_recording,
15198 gdbpy_current_recording and gdbpy_stop_recording.
15199
15200 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15201
15202 * record-btrace.c (record_btrace_record_method): New function.
15203 (init_record_btrace_ops): Initialize to_record_method.
15204 * record-full.c (record_full_record_method): New function.
15205 (init_record_full_ops, init_record_full_core_ops): Add
15206 record_full_record_method.
15207 * record.h (enum record_method): New enum.
15208 * target-debug.h (target_debug_print_enum_record_method: New define.
15209 * target-delegates.c: Regenerate.
15210 * target.c (target_record_method): New function.
15211 * target.h: Include record.h.
15212 (struct target_ops) <to_record_method>: New field.
15213 (target_record_method): New export.
15214
15215 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15216
15217 * record.h (record_start, record_stop): New export.
15218 * record.c (record_start, record_stop): New function.
15219
15220 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15221
15222 * btrace.c (btrace_fetch): Copy function call segments pointer
15223 into a vector.
15224 (btrace_clear): Clear the vector.
15225 (btrace_find_insn_by_number): Use binary search to find the correct
15226 function call segment.
15227 * btrace.h (brace_fun_p): New typedef.
15228 (struct btrace_thread_info) <functions>: New field.
15229
15230 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15231
15232 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15233 * btrace.c (btrace_decode_error): ... here. New function.
15234 * btrace.h (btrace_decode_error): New export.
15235
15236 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15237
15238 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15239 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15240 btrace_find_insn_by_number): Remove special case for gaps.
15241 * btrace.h (btrace_insn_get_error): New export.
15242 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15243 * record-btrace.c (btrace_insn_history): Print number for gaps.
15244 (record_btrace_info, record_btrace_goto): Handle gaps.
15245
15246 2017-02-14 Tom Tromey <tom@tromey.com>
15247
15248 PR python/13598:
15249 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15250 event.
15251 * python/py-evts.c (gdbpy_initialize_py_events): Add
15252 before_prompt registry.
15253 * python/py-events.h (events_object) <before_prompt>: New field.
15254
15255 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15256
15257 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15258
15259 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15260
15261 * symfile (_initialize_symfile): Add usage text to the load command's
15262 help text.
15263
15264 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15265
15266 * utils.c (defaulted_query): Don't query on secondary UIs.
15267
15268 2017-02-10 Tom Tromey <tom@tromey.com>
15269
15270 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15271
15272 2017-02-10 Tom Tromey <tom@tromey.com>
15273
15274 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15275 "cleanup" local.
15276 * python/py-type.c (typy_legacy_template_argument): Remove
15277 unnecessary "cleanup" local.
15278
15279 2017-02-10 Tom Tromey <tom@tromey.com>
15280
15281 * python/python.c (do_start_initialization): New function, from
15282 _initialize_python.
15283 (_initialize_python): Call do_start_initialization.
15284 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15285 goto.
15286
15287 2017-02-10 Tom Tromey <tom@tromey.com>
15288
15289 * python/py-prettyprint.c (pretty_print_one_value): Use
15290 gdbpy_ref.
15291
15292 2017-02-10 Tom Tromey <tom@tromey.com>
15293
15294 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15295 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15296 gdbpy_ref.
15297 * python/py-type.c (field_new): Use gdbpy_ref.
15298 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15299 gdbpy_ref.
15300 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15301 (py_free_pspace): Likewise.
15302 (pspace_to_pspace_object): Likewise.
15303 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15304 (py_free_objfile): Likewise.
15305 (objfile_to_objfile_object): Likewise.
15306 * python/py-inferior.c (delete_thread_object): Use
15307 gdbpy_ref.
15308 (infpy_read_memory): Likewise.
15309 (py_free_inferior): Likewise.
15310 * python/py-evtregistry.c (create_eventregistry_object): Use
15311 gdbpy_ref.
15312 * python/py-event.c (create_event_object): Use gdbpy_ref.
15313
15314 2017-02-10 Tom Tromey <tom@tromey.com>
15315
15316 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15317 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15318 used.
15319 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15320 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15321 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15322 python/py-framefilter.c, python/py-function.c,
15323 python/py-inferior.c, python/py-infevents.c,
15324 python/py-linetable.c, python/py-newobjfileevent.c,
15325 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15326 python/py-signalevent.c, python/py-stopevent.c,
15327 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15328 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15329 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15330 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15331
15332 2017-02-10 Tom Tromey <tom@tromey.com>
15333
15334 * ui-out.h (ui_out_emit_type): New class.
15335 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15336 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15337 and ui_out_emit_tuple.
15338 (enumerate_locals): Likewise.
15339 (py_mi_print_variables, py_print_locals, py_print_args): Use
15340 ui_out_emit_list.
15341 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15342 ui_out_emit_list.
15343 * common/gdb_optional.h: New file.
15344
15345 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15346
15347 * MAINTAINERS (Write After Approval): Update my e-mail address.
15348
15349 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15350
15351 PR gdb/21122
15352 * breakpoint.c (_initialize_breakpoint): Update the help description
15353 of the 'commands' command to indicate that it takes a list argument.
15354
15355 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15356
15357 * interps.c (current_interp_set_logging): Remove "return".
15358
15359 2017-02-09 Gary Benson <gbenson@redhat.com>
15360
15361 * symtab.c (add_symtab_completions): Prevent NULL pointer
15362 dereference.
15363
15364 2017-02-08 Pedro Alves <palves@redhat.com>
15365
15366 * interps.c (interp::interp): Remove reference to quiet_p.
15367 (interp_set): Make static. Remove dead "Switching to" output
15368 code.
15369 (interp_quiet_p, interp_set_quiet): Delete.
15370 (interpreter_exec_cmd): Don't set the interpreter quiet.
15371 * interps.h (interp_quiet_p): Make static.
15372 (class interp) <quiet_p>: Remove field
15373
15374 2017-02-08 Jerome Guitton <guitton@adacore.com>
15375
15376 * cli/cli-decode.c (find_command_name_length): Make it extern.
15377 * cli/cli-decode.h (find_command_name_length): Declare.
15378 * cli/cli-script.c (command_name_equals, line_first_arg):
15379 New functions.
15380 (process_next_line): Use cli-decode to parse command names.
15381 (build_command_line): Make args a constant pointer.
15382
15383 2017-02-08 Jerome Guitton <guitton@adacore.com>
15384
15385 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15386 Remove case-insensitive search.
15387
15388 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15389
15390 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15391 at the end of the line. Avoids an ARI warning.
15392
15393 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15394
15395 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15396 rdseed instructions.
15397 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15398
15399 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15400
15401 PR tdep/20936
15402 Provide and use sparc32 and sparc64 target description XML files.
15403 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15404 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15405 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15406 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15407 * features/sparc/sparc32-solaris.xml: New file.
15408 * features/sparc/sparc64-solaris.xml: New file.
15409 * features/sparc/sparc32-solaris.c: Generated.
15410 * features/sparc/sparc64-solaris.c: Generated.
15411 * sparc-tdep.h: Account for differences in target descriptions.
15412 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15413 (sparc32_register_type): Use target provided registers.
15414 (validate_tdesc_registers): New function.
15415 (sparc32_gdbarch_init): Use tdesc_has_registers.
15416 Set pseudoregister functions.
15417 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15418 (sparc64_register_type): Use target provided registers.
15419 (sparc64_init_abi): Set pseudoregister functions.
15420
15421 2017-02-03 Tom Tromey <tom@tromey.com>
15422
15423 PR rust/21097:
15424 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15425 with a single member.
15426
15427 2017-02-03 Pedro Alves <palves@redhat.com>
15428
15429 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15430 (cli_interp_base::~cli_interp_base): New.
15431 (cli_interp): New struct.
15432 (as_cli_interp): Cast the interp itself to cli_interp.
15433 (cli_interpreter_pre_command_loop): Rename to ...
15434 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15435 parameter.
15436 (cli_interpreter_init): Rename to ...
15437 (cli_interp::init): ... this. Remove 'self' parameter. Use
15438 boolean. Make extern.
15439 (cli_interpreter_resume): Rename to ...
15440 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15441 extern.
15442 (cli_interpreter_suspend): Rename to ...
15443 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15444 extern.
15445 (cli_interpreter_exec): Rename to ...
15446 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15447 extern.
15448 (cli_interpreter_supports_command_editing): Rename to ...
15449 (cli_interp_base::supports_command_editing): ... this. Remove
15450 'interp' parameter. Make extern.
15451 (cli_ui_out): Rename to ...
15452 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15453 Make extern.
15454 (cli_set_logging): Rename to ...
15455 (cli_interp_base::set_logging): ... this. Remove 'interp'
15456 parameter. Make extern.
15457 (cli_interp_procs): Delete.
15458 (cli_interp_factory): Adjust to use "new".
15459 * cli/cli-interp.h: Include "interps.h".
15460 (struct cli_interp_base): New struct.
15461 * interps.c (struct interp): Delete. Fields moved to interps.h.
15462 (interp_new): Delete.
15463 (interp::interp, interp::~interp): New.
15464 (interp_set): Use bool, and return void. Assume the interpreter
15465 has suspend, init and resume methods, and that the all return
15466 void.
15467 (set_top_level_interpreter): interp_set returns void.
15468 (interp_ui_out): Adapt.
15469 (current_interp_set_logging): Adapt.
15470 (interp_data): Delete.
15471 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15472 (interp_exec): Adapt.
15473 (top_level_interpreter_data): Delete.
15474 * interps.h (interp_init_ftype, interp_resume_ftype)
15475 (interp_suspend_ftype, interp_exec_ftype)
15476 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15477 (class interp): New.
15478 (interp_new): Delete.
15479 (interp_set): Now returns void. Use bool.
15480 (interp_data, top_level_interpreter_data): Delete.
15481 * mi/mi-common.h: Include interps.h.
15482 (class mi_interp): Inherit from interp. Define a ctor. Declare
15483 init, resume, suspect, exec, interp_ui_out, set_logging and
15484 pre_command_loop methods.
15485 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15486 (mi_interpreter_init): Rename to ...
15487 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15488 bool, return void and make extern. Adjust.
15489 (mi_interpreter_resume): ... Rename to ...
15490 (mi_interp::resume): ... this. Remove the 'data' parameter,
15491 return void and make extern. Adjust.
15492 (mi_interpreter_suspend): ... Rename to ...
15493 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15494 return void and make extern. Adjust.
15495 (mi_interpreter_exec): ... Rename to ...
15496 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15497 extern. Adjust.
15498 (mi_interpreter_pre_command_loop): ... Rename to ...
15499 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15500 parameter and make extern.
15501 (mi_on_normal_stop_1): Adjust.
15502 (mi_ui_out): Rename to ...
15503 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15504 parameter and make extern. Adjust.
15505 (mi_set_logging): Rename to ...
15506 (mi_interp::set_logging): ... this. Remove the 'interp'
15507 parameter and make extern. Adjust.
15508 (mi_interp_procs): Delete.
15509 (mi_interp_factory): Adjust to use 'new'.
15510 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15511 (mi_print_exception, mi_execute_command, mi_load_progress):
15512 Adjust.
15513 * tui/tui-interp.c (tui_interp): New class.
15514 (as_tui_interp): Return a tui_interp pointer.
15515 (tui_on_normal_stop, tui_on_signal_received)
15516 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15517 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15518 to use interp::interp_ui_out.
15519 (tui_init): Rename to ...
15520 (tui_interp::init): ... this. Remove the 'self' parameter, use
15521 bool, return void and make extern. Adjust.
15522 (tui_resume): Rename to ...
15523 (tui_interp::resume): ... this. Remove the 'data' parameter,
15524 return void and make extern. Adjust.
15525 (tui_suspend): Rename to ...
15526 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15527 return void and make extern. Adjust.
15528 (tui_ui_out): Rename to ...
15529 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15530 parameter, and make extern. Adjust.
15531 (tui_exec): Rename to ...
15532 (tui_interp::exec): ... this. Remove the 'data' parameter and
15533 make extern.
15534 (tui_interp_procs): Delete.
15535 (tui_interp_factory): Use "new".
15536
15537 2017-02-02 Tom Tromey <tom@tromey.com>
15538
15539 * rust-exp.y (ends_raw_string, space_then_number)
15540 (rust_identifier_start_p): Return bool.
15541 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15542 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15543 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15544 (rust_chartype_p): Return bool.
15545 (val_print_struct, rust_print_struct_def, rust_print_type):
15546 Update.
15547 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15548 Return bool.
15549
15550 2017-02-02 Tom Tromey <tom@tromey.com>
15551
15552 * rust-lang.c: Reindent.
15553
15554 2017-02-02 Tom Tromey <tom@tromey.com>
15555
15556 * rust-lang.h (rust_crate_for_block): Update.
15557 * rust-lang.c (rust_crate_for_block): Return std::string.
15558 (rust_get_disr_info): Use std:;string, not
15559 gdb::unique_xmalloc_ptr.
15560 * rust-exp.y (crate_name): Update.
15561
15562 2017-02-02 Pedro Alves <palves@redhat.com>
15563
15564 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15565 field out of gdb_disassembler_test and make it static.
15566
15567 2017-02-02 Pedro Alves <palves@redhat.com>
15568
15569 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15570 mi1_interp and mi_interp fields.
15571
15572 2017-02-02 Pedro Alves <palves@redhat.com>
15573
15574 * cli/cli-interp.c (struct saved_output_files, saved_output):
15575 Moved from cli/cli-logging.c.
15576 (cli_set_logging): New function.
15577 (cli_interp_procs): Install cli_set_logging.
15578 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15579 Declare.
15580 * cli/cli-logging.c (struct saved_output_files, saved_output):
15581 Moved to cli/cli-interp.c.
15582 (pop_output_files): Don't save outputs here.
15583 (make_logging_output): New function.
15584 (handle_redirections): Don't build tee nor save previous outputs
15585 here.
15586 * interps.c (current_interp_set_logging): Change prototype.
15587 Assume there's always a set_logging_proc method installed.
15588 * interps.h (interp_set_logging_ftype): Change prototype.
15589 (current_interp_set_logging): Change prototype and adjust comment.
15590 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15591 use make_logging_output.
15592 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15593 2017-02-02 Pedro Alves <palves@redhat.com>
15594
15595 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15596 from ...
15597 (set_logging_overwrite): ... here.
15598 (logging_no_redirect_file): Delete.
15599 (set_logging_redirect): Don't handle redirection on the fly.
15600 Instead warn that "logging off" / "logging on" is necessary.
15601 (pop_output_files): Delete references to logging_no_redirect_file.
15602 (show_logging_command): Always speak in terms of what will happen
15603 once logging is reenabled.
15604
15605 2017-02-02 Pedro Alves <palves@redhat.com>
15606
15607 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15608
15609 2017-02-02 Pedro Alves <palves@redhat.com>
15610
15611 * disasm.c (gdb_pretty_print_insn): Rename to ...
15612 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15613 Remove gdbarch parameter. Adapt to clear the object's buffers
15614 instead of allocating new buffers, and to print using the object's
15615 gdb_disassembler instead of calling gdb_print_insn.
15616 (dump_insns): Use gdb_pretty_print_disassembler.
15617 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15618 (gdb_pretty_print_disassembler): New class.
15619 * record-btrace.c (btrace_insn_history): Use
15620 gdb_pretty_print_disassembler.
15621
15622 2017-02-02 Pedro Alves <palves@redhat.com>
15623
15624 * ada-lang.c (type_as_string): Use string_file.
15625 * ada-valprint.c (ada_print_floating): Use string_file.
15626 * ada-varobj.c (ada_varobj_scalar_image)
15627 (ada_varobj_get_value_image): Use string_file.
15628 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15629 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15630 * breakpoint.c (update_inserted_breakpoint_locations)
15631 (insert_breakpoint_locations, reattach_breakpoints)
15632 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15633 (print_it_watchpoint): Use string_file.
15634 (save_breakpoints): Use stdio_file.
15635 * c-exp.y (oper): Use string_file.
15636 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15637 tee_file.
15638 (pop_output_files): Use delete.
15639 (handle_redirections): Use stdio_file and tee_file.
15640 * cli/cli-setshow.c (do_show_command): Use string_file.
15641 * compile/compile-c-support.c (c_compute_program): Use
15642 string_file.
15643 * compile/compile-c-symbols.c (generate_vla_size): Take a
15644 'string_file &' instead of a 'ui_file *'.
15645 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15646 of a 'ui_file *'. Use string_file.
15647 (generate_c_for_variable_locations): Take a 'string_file &'
15648 instead of a 'ui_file *'.
15649 * compile/compile-internal.h (generate_c_for_for_one_variable):
15650 Take a 'string_file &' instead of a 'ui_file *'.
15651 * compile/compile-loc2c.c (push, pushf, unary, binary)
15652 (print_label, pushf_register_address, pushf_register)
15653 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15654 'ui_file *'. Adjust.
15655 * compile/compile.c (compile_to_object): Use string_file.
15656 * compile/compile.h (compile_dwarf_expr_to_c)
15657 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15658 'ui_file *'.
15659 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15660 (replace_typedefs_qualified_name): Use string_file and
15661 obstack_copy0.
15662 * disasm.c (gdb_pretty_print_insn): Use string_file.
15663 (gdb_disassembly): Adjust reference the null_stream global.
15664 (do_ui_file_delete): Delete.
15665 (gdb_insn_length): Use null_stream.
15666 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15667 * dwarf2loc.c (dwarf2_compile_property_to_c)
15668 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15669 'string_file &' instead of a 'ui_file *'.
15670 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15671 * dwarf2read.c (do_ui_file_peek_last): Delete.
15672 (dwarf2_compute_name): Use string_file.
15673 * event-top.c (gdb_setup_readline): Use stdio_file.
15674 * gdbarch.sh (verify_gdbarch): Use string_file.
15675 * gdbtypes.c (safe_parse_type): Use null_stream.
15676 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15677 string_file.
15678 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15679 'string_file *' instead of a 'ui_file *'.
15680 (gdbscm_arch_disassemble): Use string_file.
15681 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15682 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15683 inherits from ui_file.
15684 (ioscm_file_port_delete, ioscm_file_port_rewind)
15685 (ioscm_file_port_put): Delete.
15686 (ioscm_file_port_write): Rename to ...
15687 (ioscm_file_port::write): ... this. Remove file_port_magic
15688 checks.
15689 (ioscm_file_port_new): Delete.
15690 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15691 ui_file_up.
15692 * guile/scm-type.c (tyscm_type_name): Use string_file.
15693 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15694 Use string_file.
15695 * infcmd.c (print_return_value_1): Use string_file.
15696 * infrun.c (print_target_wait_results): Use string_file.
15697 * language.c (add_language): Use string_file.
15698 * location.c (explicit_to_string_internal): Use string_file.
15699 * main.c (captured_main_1): Use null_file.
15700 * maint.c (maintenance_print_architecture): Use stdio_file.
15701 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15702 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15703 event_channel>: Change type to mi_console_file pointer.
15704 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15705 (mi_console_file_delete): Delete.
15706 (struct mi_console_file): Delete.
15707 (mi_console_file_magic): Delete.
15708 (mi_console_file_new): Delete.
15709 (mi_console_file::mi_console_file): New.
15710 (mi_console_file_delete): Delete.
15711 (mi_console_file_fputs): Delete.
15712 (mi_console_file::write): New.
15713 (mi_console_raw_packet): Delete.
15714 (mi_console_file::flush): New.
15715 (mi_console_file_flush): Delete.
15716 (mi_console_set_raw): Rename to ...
15717 (mi_console_file::set_raw): ... this.
15718 * mi/mi-console.h (class mi_console_file): New class.
15719 (mi_console_file_new, mi_console_set_raw): Delete.
15720 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15721 (mi_set_logging): Use delete and tee_file. Adjust.
15722 * mi/mi-main.c (output_register): Use string_file.
15723 (mi_cmd_data_evaluate_expression): Use string_file.
15724 (mi_cmd_data_read_memory): Use string_file.
15725 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15726 * mi/mi-out.c (mi_ui_out::main_stream): New.
15727 (mi_ui_out::rewind): Use main_stream and
15728 string_file.
15729 (mi_ui_out::put): Use main_stream and string_file.
15730 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15731 Allocate a 'string_file' instead.
15732 (mi_out_new): Don't allocate a mem_fileopen stream here.
15733 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15734 (mi_ui_out::main_stream): Declare method.
15735 * printcmd.c (eval_command): Use string_file.
15736 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15737 * python/py-arch.c (archpy_disassemble): Use string_file.
15738 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15739 * python/py-frame.c (frapy_str): Use string_file.
15740 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15741 Use string_file.
15742 * python/py-type.c (typy_str): Use string_file.
15743 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15744 * python/py-value.c (valpy_str): Use string_file.
15745 * record-btrace.c (btrace_insn_history): Use string_file.
15746 * regcache.c (regcache_print): Use stdio_file.
15747 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15748 * remote.c (escape_buffer): Use string_file.
15749 * rust-lang.c (rust_get_disr_info): Use string_file.
15750 * serial.c (serial_open_ops_1): Use stdio_file.
15751 (do_serial_close): Use delete.
15752 * stack.c (print_frame_arg): Use string_file.
15753 (print_frame_args): Remove local mem_fileopen stream, not used.
15754 (print_frame): Use string_file.
15755 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15756 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15757 Take a 'string_file *' instead of a 'ui_file *'.
15758 * top.c (new_ui): Use stdio_file and stderr_file.
15759 (free_ui): Use delete.
15760 (execute_command_to_string): Use string_file.
15761 (quit_confirm): Use string_file.
15762 * tracepoint.c (collection_list::append_exp): Use string_file.
15763 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15764 * tui/tui-file.c: Don't include "ui-file.h".
15765 (enum streamtype, struct tui_stream): Delete.
15766 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15767 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15768 (tui_file::tui_file): New method.
15769 (tui_file_fputs): Delete.
15770 (tui_file_get_strbuf): Delete.
15771 (tui_file::puts): New method.
15772 (tui_file_adjust_strbuf): Delete.
15773 (tui_file_flush): Delete.
15774 (tui_file::flush): New method.
15775 * tui/tui-file.h: Tweak intro comment.
15776 Include ui-file.h.
15777 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15778 (tui_file_adjust_strbuf): Delete declarations.
15779 (class tui_file): New class.
15780 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15781 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15782 (tui_register_format): Use string_stream.
15783 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15784 (tui_get_function_from_frame): Use string_file.
15785 * typeprint.c (type_to_string): Use string_file.
15786 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15787 (null_stream): New global.
15788 (ui_file_delete): Delete.
15789 (ui_file::ui_file): New.
15790 (null_file_isatty): Delete.
15791 (ui_file::~ui_file): New.
15792 (null_file_rewind): Delete.
15793 (ui_file::printf): New.
15794 (null_file_put): Delete.
15795 (null_file_flush): Delete.
15796 (ui_file::putstr): New.
15797 (null_file_write): Delete.
15798 (ui_file::putstrn): New.
15799 (null_file_read): Delete.
15800 (ui_file::putc): New.
15801 (null_file_fputs): Delete.
15802 (null_file_write_async_safe): Delete.
15803 (ui_file::vprintf): New.
15804 (null_file_delete): Delete.
15805 (null_file::write): New.
15806 (null_file_fseek): Delete.
15807 (null_file::puts): New.
15808 (ui_file_data): Delete.
15809 (null_file::write_async_safe): New.
15810 (gdb_flush, ui_file_isatty): Adjust.
15811 (ui_file_put, ui_file_rewind): Delete.
15812 (ui_file_write): Adjust.
15813 (ui_file_write_for_put): Delete.
15814 (ui_file_write_async_safe, ui_file_read): Adjust.
15815 (ui_file_fseek): Delete.
15816 (fputs_unfiltered): Adjust.
15817 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15818 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15819 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15820 (set_ui_file_data): Delete.
15821 (string_file::~string_file, string_file::write)
15822 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15823 (do_ui_file_as_string, ui_file_as_string): Delete.
15824 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15825 (struct mem_file): Delete.
15826 (mem_file_new): Delete.
15827 (stdio_file::stdio_file): New.
15828 (mem_file_delete): Delete.
15829 (stdio_file::stdio_file): New.
15830 (mem_fileopen): Delete.
15831 (stdio_file::~stdio_file): New.
15832 (mem_file_rewind): Delete.
15833 (stdio_file::set_stream): New.
15834 (mem_file_put): Delete.
15835 (stdio_file::open): New.
15836 (mem_file_write): Delete.
15837 (stdio_file_magic, struct stdio_file): Delete.
15838 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15839 (stdio_file::flush): New.
15840 (stdio_file_read): Rename to ...
15841 (stdio_file::read): ... this. Adjust.
15842 (stdio_file_write): Rename to ...
15843 (stdio_file::write): ... this. Adjust.
15844 (stdio_file_write_async_safe): Rename to ...
15845 (stdio_file::write_async_safe) ... this. Adjust.
15846 (stdio_file_fputs): Rename to ...
15847 (stdio_file::puts) ... this. Adjust.
15848 (stdio_file_isatty): Delete.
15849 (stdio_file_fseek): Delete.
15850 (stdio_file::isatty): New.
15851 (stderr_file_write): Rename to ...
15852 (stderr_file::write) ... this. Adjust.
15853 (stderr_file_fputs): Rename to ...
15854 (stderr_file::puts) ... this. Adjust.
15855 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15856 (stderr_file::stderr_file): New.
15857 (tee_file_magic): Delete.
15858 (struct tee_file): Delete.
15859 (tee_file::tee_file): New.
15860 (tee_file_new): Delete.
15861 (tee_file::~tee_file): New.
15862 (tee_file_delete): Delete.
15863 (tee_file_flush): Rename to ...
15864 (tee_file::flush): ... this. Adjust.
15865 (tee_file_write): Rename to ...
15866 (tee_file::write): ... this. Adjust.
15867 (tee_file::write_async_safe): New.
15868 (tee_file_fputs): Rename to ...
15869 (tee_file::puts): ... this. Adjust.
15870 (tee_file_isatty): Rename to ...
15871 (tee_file::isatty): ... this. Adjust.
15872 * ui-file.h (struct obstack, struct ui_file): Don't
15873 forward-declare.
15874 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15875 (ui_file_write_ftype)
15876 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15877 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15878 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15879 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15880 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15881 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15882 (set_ui_file_fseek): Delete.
15883 (ui_file_data, ui_file_delete, ui_file_rewind)
15884 (struct ui_file): New.
15885 (ui_file_up): New.
15886 (class null_file): New.
15887 (null_stream): Declare.
15888 (ui_file_write_for_put, ui_file_put): Delete.
15889 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15890 Delete.
15891 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15892 (gdb_fopen, tee_file_new): Delete.
15893 (struct string_file): New.
15894 (struct stdio_file): New.
15895 (stdio_file_up): New.
15896 (struct stderr_file): New.
15897 (class tee_file): New.
15898 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15899 of a 'ui_file *'. Adjust.
15900 * ui-out.h (class ui_out) <field_stream>: Likewise.
15901 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15902 (null_stream): Delete.
15903 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15904 Adjust.
15905 * utils.h (struct ui_file): Delete forward declaration..
15906 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15907 (error_stream): Take a 'string_file &' instead of a
15908 'ui_file *'.
15909 * varobj.c (varobj_value_get_print_value): Use string_file.
15910 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15911 * gdbarch.c: Regenerate.
15912
15913 2017-02-02 Pedro Alves <palves@redhat.com>
15914
15915 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15916 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15917 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15918 Adjust to call gdb_print_insn instead of
15919 gdb_disassembler::print_insn.
15920 (dump_insns, do_mixed_source_and_assembly_deprecated)
15921 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15922 'gdbarch' parameter. Remove gdb_disassembler parameter.
15923 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15924 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15925 declaration.
15926 (gdb_pretty_print_insn): Re-add declaration.
15927 * record-btrace.c (btrace_insn_history): Don't allocate a
15928 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15929
15930 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15931
15932 * disasm.h (gdb_disassembly): Remove file_string parameter.
15933 * disasm.c (gdb_disassembly): Likewise.
15934 * cli/cli-cmds.c (print_disassembly): Adapt.
15935 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15936 * stack.c (do_gdb_disassembly): Likewise.
15937
15938 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15939
15940 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15941 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15942 targets. And if the implicit value is longer than needed, extract
15943 the first bytes instead of the "least significant" ones.
15944
15945 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15946
15947 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15948 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15949 (btrace_fetch): Assert can_access_registers_ptid.
15950 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15951 validate_registers_access.
15952
15953 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15954
15955 * gdbthread.h (can_access_registers_ptid): New.
15956 * thread.c (can_access_registers_ptid): New.
15957
15958 2017-02-01 Pedro Alves <palves@redhat.com>
15959
15960 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15961
15962 2017-01-31 Pedro Alves <palves@redhat.com>
15963
15964 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15965 Fix typos.
15966
15967 2017-01-31 Pedro Alves <palves@redhat.com>
15968
15969 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15970 not used.
15971
15972 2017-01-31 Pedro Alves <palves@redhat.com>
15973
15974 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15975
15976 2017-01-31 Pedro Alves <palves@redhat.com>
15977
15978 * common/scoped_restore.h
15979 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15980 change the value's parameter type to T2.
15981 (make_scoped_restore): Likewise.
15982
15983 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15984 Richard Henderson <rth@redhat.com>
15985
15986 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15987 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15988 GS_BASE for older kernels.
15989 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15990 GS_BASE for older kernels.
15991 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15992 and GS_BASE to the offset table.
15993 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15994 system register group.
15995 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15996 for older kernels.
15997 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15998 amd64 ABI.
15999 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16000 AMD64_GSBASE_REGNUM.
16001 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16002 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16003 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16004 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16005 i386/64bit-segments.xml in those rules.
16006 * features/i386/64bit-segments.xml: New file.
16007 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16008 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16009 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16010 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16011 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16012 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16013 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16014 * features/i386/amd64-avx-linux.c: Regenerated.
16015 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16016 * features/i386/amd64-avx-mpx.c: Regenerated.
16017 * features/i386/amd64-avx512-linux.c: Regenerated.
16018 * features/i386/amd64-linux.c: Regenerated.
16019 * features/i386/amd64-mpx-linux.c: Regenerated.
16020 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16021 * features/i386/i386-avx-mpx.c: Regenerated.
16022 * features/i386/x32-avx-linux.c: Regenerated.
16023 * features/i386/x32-avx512-linux.c: Regenerated.
16024 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16025 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16026 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16027 * regformats/i386/amd64-linux.dat: Regenerated.
16028 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16029 * regformats/i386/x32-avx-linux.dat: Regenerated.
16030 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16031 * regformats/i386/x32-linux.dat: Regenerated.
16032
16033 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16034
16035 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16036 Set to AMD64_NUM_REGS.
16037
16038 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16039
16040 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16041 that checks validity of a register number.
16042
16043 2017-01-27 Kees Cook <keescook@google.com>
16044
16045 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16046 fetch_fpregs if target has fpa registers.
16047 (arm_linux_store_inferior_registers): Call store_fpregs if target
16048 has fpa registers.
16049
16050 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16051
16052 * cris-tdep.c (cris_gdbarch_init): Remove check for
16053 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16054
16055 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16056
16057 * corelow.c (get_core_register_section): Check for regset
16058 existence before checking for REGSET_VARIABLE_SIZE.
16059
16060 2017-01-26 Yao Qi <yao.qi@linaro.org>
16061 Pedro Alves <palves@redhat.com>
16062
16063 PR gdb/20939
16064 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16065 call memory_error, save memaddr instead.
16066 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16067 negative, cal memory_error.
16068 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16069
16070 2017-01-26 Yao Qi <yao.qi@linaro.org>
16071
16072 * disasm-selftests.c (memory_error_test): New function.
16073 (_initialize_disasm_selftests): Register memory_error_test.
16074
16075 2017-01-26 Yao Qi <yao.qi@linaro.org>
16076
16077 * Makefile.in (SFILES): Add disasm-selftests.c and
16078 selftest-arch.c.
16079 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16080 * disasm-selftests.c: New file.
16081 * selftest-arch.c: New file.
16082 * selftest-arch.h: New file.
16083
16084 2017-01-26 Yao Qi <yao.qi@linaro.org>
16085
16086 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16087 to bfd_arch_mep. Don't return 0 if section is not
16088 found. Call print_insn_mep.
16089
16090 2017-01-26 Pedro Alves <palves@redhat.com>
16091 Yao Qi <yao.qi@linaro.org>
16092
16093 * arm-tdep.c: Include "disasm.h".
16094 (gdb_print_insn_arm): Update code to get gdbarch.
16095 * disasm.c (dis_asm_read_memory): Change it to
16096 gdb_disassembler::dis_asm_read_memory.
16097 (dis_asm_memory_error): Likewise.
16098 (dis_asm_print_address): Likewise.
16099 (gdb_pretty_print_insn): Change it to
16100 gdb_disassembler::pretty_print_insn.
16101 (dump_insns): Add one argument gdb_disassemlber. All
16102 callers updated.
16103 (do_mixed_source_and_assembly_deprecated): Likewise.
16104 (do_mixed_source_and_assembly): Likewise.
16105 (do_assembly_only): Likewise.
16106 (gdb_disassembler::gdb_disassembler): New.
16107 (gdb_disassembler::print_insn): New.
16108 * disasm.h (class gdb_disassembler): New.
16109 (gdb_pretty_print_insn): Remove declaration.
16110 (gdb_disassemble_info): Likewise.
16111 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16112 (gdbscm_disasm_read_memory_worker): Update.
16113 (gdbscm_disasm_read_memory): Update.
16114 (gdbscm_disasm_memory_error): Remove.
16115 (gdbscm_disasm_print_address): Remove.
16116 (gdbscm_disassembler::gdbscm_disassembler): New.
16117 (gdbscm_print_insn_from_port): Update.
16118 * mips-tdep.c: Include disasm.h.
16119 (gdb_print_insn_mips): Update code to get gdbarch.
16120 * record-btrace.c (btrace_insn_history): Update.
16121 * spu-tdep.c: Include disasm.h.
16122 (struct spu_dis_asm_data): Remove.
16123 (struct spu_dis_asm_info): New.
16124 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16125 SPU id.
16126 (gdb_print_insn_spu): Cast disassemble_info to
16127 spu_dis_asm_info.
16128
16129 2017-01-26 Yao Qi <yao.qi@linaro.org>
16130
16131 * disasm.c (do_ui_file_delete): Delete.
16132 (gdb_insn_length): Move code creating stream to ...
16133 * utils.c (null_stream): ... here. New function.
16134 * utils.h (null_stream): Declare.
16135
16136 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16137
16138 * python/py-inferior.c (find_thread_object): Return directly
16139 from the loop. Remove "found" variable.
16140
16141 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16142
16143 GDB 7.12.1 released.
16144
16145 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16146
16147 * python/py-function.c (fnpy_call): Reorder declarations to have
16148 the gdbpy_enter object declared first.
16149 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16150
16151 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16152
16153 PR python/21068
16154 * python/python-internal.h (PyMem_RawMalloc): Define for
16155 Python < 3.4.
16156 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16157 PyMem_RawMalloc instead of PyMem_Malloc.
16158
16159 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16160 Luis Machado <lgustavo@codesourcery.com>
16161
16162 * NEWS (New commands): Mention flash-erase.
16163 (New MI commands): Mention target-flash-erase.
16164 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16165 command.
16166 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16167 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16168 * target.c (flash_erase_command): New function.
16169 (initialize_targets): Add new flash-erase command.
16170 * target.h (flash_erase_command): New declaration.
16171
16172 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16173
16174 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16175 HAVE_SYS_PROCFS_H is defined.
16176
16177 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16178
16179 * remote.c (struct cached_reg): Change data into a pointer.
16180 * (stop_reply_dtr): Free data pointers before deleting vector.
16181 (process_stop_reply): Likewise.
16182 (remote_parse_stop_reply): Allocate space for data
16183
16184 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16185
16186 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16187 MAX_REGISTER_SIZE.
16188 (amd64_pseudo_register_read_value): Likewise.
16189 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16190 (store_register_using_P): Likewise.
16191 * regcache.c (regcache_xfer_part): Likewise.
16192
16193 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16194
16195 Split real and pseudo registers.
16196 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16197 (sparc32_pseudo_regnum): New enum.
16198 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16199 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16200 (SPARC32_CP0_REGISTERS): New macro.
16201 (sparc32_pseudo_register_name): New function.
16202 (sparc32_register_name): Use sparc32_pseudo_register_name.
16203 (sparc32_pseudo_register_type): New function.
16204 (sparc32_register_type): Use sparc32_pseudo_register_type.
16205 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16206 pseudo register numbers.
16207 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16208 (SPARC64_CP0_REGISTERS): New macro.
16209 (sparc64_pseudo_register_name): New function.
16210 (sparc64_register_name): Use sparc64_pseudo_register_name.
16211 (sparc64_pseudo_register_type): New function.
16212 (sparc64_register_type): Use sparc64_pseudo_register_type.
16213 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16214 pseudo register numbers.
16215 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16216 sparc64_store_arguments): Handle pseudo register numbers.
16217
16218 2017-01-13 Yao Qi <yao.qi@linaro.org>
16219
16220 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16221 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16222 output.
16223 (getpkt_or_notif_sane_1): Likewise.
16224
16225 2017-01-13 Yao Qi <yao.qi@linaro.org>
16226
16227 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16228 of CC. Pass "-x c++-header" instead of "-x c".
16229
16230 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16231
16232 * remote.c (remote_can_async_p): Update comment.
16233
16234 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16235
16236 * linux-nat.c (linux_nat_can_async_p): Update comment.
16237
16238 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16239
16240 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16241
16242 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16243
16244 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16245
16246 2017-01-10 Tom Tromey <tom@tromey.com>
16247
16248 * python/py-type.c (typy_legacy_template_argument): Update.
16249 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16250 ~demangle_parse_info): Declare new members.
16251 (cp_demangled_name_to_comp): Return unique_ptr.
16252 (cp_demangled_name_parse_free)
16253 (make_cleanup_cp_demangled_name_parse_free)
16254 (cp_new_demangle_parse_info): Remove.
16255 * cp-support.c (do_demangled_name_parse_free_cleanup)
16256 (make_cleanup_cp_demangled_name_parse_free): Remove.
16257 (inspect_type, cp_canonicalize_string_full)
16258 (cp_canonicalize_string): Update.
16259 (mangled_name_to_comp): Change return type.
16260 (cp_class_name_from_physname, method_name_from_physname)
16261 (cp_func_name, cp_remove_params): Update.
16262 * cp-name-parser.y (demangle_parse_info): New constructor, from
16263 cp_new_demangle_parse_info.
16264 (~demangle_parse_info): New destructor, from
16265 cp_demangled_name_parse_free.
16266 (cp_merge_demangle_parse_infos): Update.
16267 (cp_demangled_name_to_comp): Change return type.
16268
16269 2017-01-10 Tom Tromey <tom@tromey.com>
16270
16271 * top.c (prevent_dont_repeat): Change return type.
16272 * python/python.c (execute_gdb_command): Use std::string.
16273 Update.
16274 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16275 * command.h (prevent_dont_repeat): Change return type.
16276 * breakpoint.c (bpstat_do_actions_1): Update.
16277
16278 2017-01-10 Tom Tromey <tom@tromey.com>
16279
16280 * value.h (scoped_value_mark::~scoped_value_mark): Call
16281 free_to_mark.
16282 (scoped_value_mark::free_to_mark): New method.
16283 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16284 scoped_value_mark.
16285
16286 2017-01-10 Tom Tromey <tom@tromey.com>
16287
16288 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16289 (valpy_reference_value, valpy_const_value, valpy_get_address)
16290 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16291 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16292 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16293 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16294 scoped_value_mark.
16295 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16296 * value.h (scoped_value_mark): New class.
16297
16298 2017-01-10 Tom Tromey <tom@tromey.com>
16299
16300 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16301 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16302 * psymtab.c (discard_psymtabs_upto): Remove.
16303 (make_cleanup_discard_psymtabs): Remove.
16304 (struct psymtab_state): Remove.
16305
16306 2017-01-10 Tom Tromey <tom@tromey.com>
16307
16308 * record-full.c (record_full_save_cleanups): Remove.
16309 (record_full_save): Use gdb::unlinker.
16310 * gcore.c (do_bfd_delete_cleanup): Remove.
16311 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16312 cleanups.
16313 * dwarf2read.c (unlink_if_set): Remove.
16314 (write_psymtabs_to_index): Use gdb::unlinker.
16315 * common/gdb_unlinker.h: New file.
16316
16317 2017-01-10 Tom Tromey <tom@tromey.com>
16318
16319 * windows-tdep.c (windows_xfer_shared_library): Update.
16320 * windows-nat.c (windows_make_so): Update.
16321 * utils.h (make_cleanup_bfd_unref): Remove.
16322 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16323 * symfile.h (symfile_bfd_open)
16324 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16325 * symfile.c (read_symbols, symbol_file_add)
16326 (separate_debug_file_exists): Update.
16327 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16328 (generic_load, reread_symbols): Update.
16329 * symfile-mem.c (symbol_file_add_from_memory): Update.
16330 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16331 (spu_symbol_file_add_from_memory): Update.
16332 * solist.h (struct target_so_ops) <bfd_open>: Return
16333 gdb_bfd_ref_ptr.
16334 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16335 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16336 gdb_bfd_ref_ptr.
16337 (solib_map_sections, reload_shared_libraries_1): Update.
16338 * solib-svr4.c (enable_break): Update.
16339 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16340 * solib-frv.c (enable_break2): Update.
16341 * solib-dsbt.c (enable_break): Update.
16342 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16343 gdb_bfd_ref_ptr.
16344 (darwin_solib_get_all_image_info_addr_at_init): Update.
16345 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16346 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16347 * record-full.c (record_full_save): Update.
16348 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16349 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16350 * minidebug.c (find_separate_debug_file_in_section): Return
16351 gdb_bfd_ref_ptr.
16352 * machoread.c (macho_add_oso_symfile): Change abfd to
16353 gdb_bfd_ref_ptr.
16354 (macho_symfile_read_all_oso): Update.
16355 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16356 (macho_symfile_read): Update.
16357 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16358 (jit_bfd_try_read_symtab): Update.
16359 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16360 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16361 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16362 gdb_bfd_ref_ptr.
16363 (gdb_bfd_ref_policy): New struct.
16364 (gdb_bfd_ref_ptr): New typedef.
16365 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16366 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16367 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16368 gdb_bfd_ref_ptr.
16369 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16370 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16371 (gcore_command): Update.
16372 * exec.c (exec_file_attach): Update.
16373 * elfread.c (elf_symfile_read): Update.
16374 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16375 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16376 (open_and_init_dwo_file): Update.
16377 (open_dwp_file): Return gdb_bfd_ref_ptr.
16378 (open_and_init_dwp_file): Update.
16379 * corelow.c (core_open): Update.
16380 * compile/compile-object-load.c (compile_object_load): Update.
16381 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16382 * coffread.c (coff_symfile_read): Update.
16383 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16384 gdb_bfd_ref_ptr. Rename.
16385 (dump_bfd_file, restore_command): Update.
16386 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16387 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16388 (find_separate_debug_file_by_buildid): Update.
16389
16390 2017-01-10 Tom Tromey <tom@tromey.com>
16391
16392 * common/gdb_ref_ptr.h: New file.
16393 * python/py-ref.h (struct gdbpy_ref_policy): New.
16394 (gdbpy_ref): Now a typedef.
16395
16396 2017-01-10 Tom Tromey <tom@tromey.com>
16397
16398 * utils.h (make_cleanup_htab_delete): Don't declare.
16399 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16400 Remove.
16401 * linespec.c (decode_compound_collector): Add constructor,
16402 destructor.
16403 (lookup_prefix_sym): Remove cleanup.
16404 (symtab_collector): Add constructor, destructor.
16405 (collect_symtabs_from_filename): Remove cleanup.
16406 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16407 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16408 Use htab_up.
16409 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16410 * dwarf2read.c (dw2_expand_symtabs_matching)
16411 (dw2_map_symbol_filenames, dwarf_decode_macros)
16412 (write_psymtabs_to_index): Use htab_up.
16413 * dwarf2loc.c (func_verify_no_selftailcall)
16414 (call_site_find_chain_1, func_verify_no_selftailcall)
16415 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16416 std::vector, gdb::unique_xmalloc_ptr.
16417 (call_sitep): Remove typedef.
16418 (dwarf2_locexpr_baton_eval): Remove unused variable.
16419
16420 2017-01-10 Tom Tromey <tom@tromey.com>
16421
16422 * python/python-internal.h (make_cleanup_py_decref)
16423 (make_cleanup_py_xdecref): Don't declare.
16424 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16425 (py_xdecref, make_cleanup_py_xdecref): Remove.
16426
16427 2017-01-10 Tom Tromey <tom@tromey.com>
16428
16429 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16430 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16431
16432 2017-01-10 Tom Tromey <tom@tromey.com>
16433
16434 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16435
16436 2017-01-10 Tom Tromey <tom@tromey.com>
16437
16438 * python/py-utils.c (unicode_to_encoded_string)
16439 (python_string_to_target_string)
16440 (python_string_to_target_python_string)
16441 (python_string_to_host_string, gdbpy_obj_to_string)
16442 (get_addr_from_python): Use gdbpy_ref.
16443
16444 2017-01-10 Tom Tromey <tom@tromey.com>
16445
16446 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16447 gdbpy_ref.
16448
16449 2017-01-10 Tom Tromey <tom@tromey.com>
16450
16451 * python/python.c (eval_python_command, gdbpy_decode_line)
16452 (gdbpy_run_events, gdbpy_start_type_printers)
16453 (gdbpy_apply_type_printers): Use gdbpy_ref.
16454
16455 2017-01-10 Tom Tromey <tom@tromey.com>
16456
16457 * python/py-param.c (get_doc_string, compute_enum_values): Use
16458 gdbpy_ref.
16459
16460 2017-01-10 Tom Tromey <tom@tromey.com>
16461
16462 * python/py-inferior.c (find_thread_object, build_inferior_list):
16463 Use gdbpy_ref.
16464
16465 2017-01-10 Tom Tromey <tom@tromey.com>
16466
16467 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16468
16469 2017-01-10 Tom Tromey <tom@tromey.com>
16470
16471 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16472 gdbpy_ref.
16473
16474 2017-01-10 Tom Tromey <tom@tromey.com>
16475
16476 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16477 extra incref.
16478 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16479 Use gdbpy_ref.
16480
16481 2017-01-10 Tom Tromey <tom@tromey.com>
16482
16483 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16484 gdbpy_ref.
16485
16486 2017-01-10 Tom Tromey <tom@tromey.com>
16487
16488 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16489 decref results of PyArg_ParseTupleAndKeywords.
16490
16491 2017-01-10 Tom Tromey <tom@tromey.com>
16492
16493 * python/python.c (python_run_simple_file): Use
16494 unique_xmalloc_ptr, gdbpy_ref.
16495
16496 2017-01-10 Tom Tromey <tom@tromey.com>
16497
16498 * python/py-prettyprint.c (print_stack_unless_memory_error)
16499 (print_string_repr, print_children): Use gdbpy_ref.
16500 (dummy_python_frame): New class.
16501 (dummy_python_frame::dummy_python_frame): Rename from
16502 push_dummy_python_frame.
16503 (py_restore_tstate): Remove.
16504
16505 2017-01-10 Tom Tromey <tom@tromey.com>
16506
16507 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16508
16509 2017-01-10 Tom Tromey <tom@tromey.com>
16510
16511 * python/python.c (ensure_python_env, restore_python_env):
16512 Remove.
16513 * python/python-internal.h (ensure_python_env): Don't declare.
16514 * varobj.h (varobj_ensure_python_env): Don't declare.
16515 * varobj.c (varobj_ensure_python_env): Remove.
16516
16517 2017-01-10 Tom Tromey <tom@tromey.com>
16518
16519 * varobj.c (varobj_value_get_print_value): Use
16520 gdbpy_enter_varobj.
16521
16522 2017-01-10 Tom Tromey <tom@tromey.com>
16523
16524 * python/py-prettyprint.c (print_string_repr, print_children):
16525 Update.
16526 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16527 of "encoding".
16528 * varobj.c (varobj_value_get_print_value): Update.
16529 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16530
16531 2017-01-10 Tom Tromey <tom@tromey.com>
16532
16533 * varobj.c (varobj_get_display_hint)
16534 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16535 (varobj_set_visualizer, free_variable): Use
16536 gdbpy_enter_varobj.
16537
16538 2017-01-10 Tom Tromey <tom@tromey.com>
16539
16540 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16541 (do_finish_initialization): New function. Use gdbpy_ref.
16542 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16543 do_finish_initialization.
16544
16545 2017-01-10 Tom Tromey <tom@tromey.com>
16546
16547 * python/py-param.c (get_set_value, get_show_value): Use
16548 gdbpy_enter, gdbpy_ref.
16549
16550 2017-01-10 Tom Tromey <tom@tromey.com>
16551
16552 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16553
16554 2017-01-10 Tom Tromey <tom@tromey.com>
16555
16556 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16557
16558 2017-01-10 Tom Tromey <tom@tromey.com>
16559
16560 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16561 Use gdbpy_enter_varobj.
16562
16563 2017-01-10 Tom Tromey <tom@tromey.com>
16564
16565 * varobj.c (gdbpy_enter_varobj): New constructor.
16566 * python/python-internal.h (gdbpy_enter_varobj): New class.
16567 * python/py-varobj.c (py_varobj_get_iterator): Use
16568 gdbpy_enter_varobj.
16569
16570 2017-01-10 Tom Tromey <tom@tromey.com>
16571
16572 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16573 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16574 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16575 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16576 unique_xmalloc_ptr.
16577 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16578
16579 2017-01-10 Tom Tromey <tom@tromey.com>
16580
16581 * python/py-xmethods.c (invoke_match_method): Use
16582 gdbpy_ref.
16583
16584 2017-01-10 Tom Tromey <tom@tromey.com>
16585
16586 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16587 gdbpy_enter, gdbpy_ref.
16588
16589 2017-01-10 Tom Tromey <tom@tromey.com>
16590
16591 * python/python.c (python_interactive_command): Use gdbpy_enter.
16592
16593 2017-01-10 Tom Tromey <tom@tromey.com>
16594
16595 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16596 gdbpy_ref.
16597
16598 2017-01-10 Tom Tromey <tom@tromey.com>
16599
16600 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16601 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16602
16603 2017-01-10 Tom Tromey <tom@tromey.com>
16604
16605 * utils.h (htab_deleter): New struct.
16606 (htab_up): New typedef.
16607 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16608 gdbpy_enter, gdbpy_ref, htab_up.
16609
16610 2017-01-10 Tom Tromey <tom@tromey.com>
16611
16612 * python/py-unwind.c (pending_frame_invalidate): Remove.
16613 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16614
16615 2017-01-10 Tom Tromey <tom@tromey.com>
16616
16617 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16618 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16619
16620 2017-01-10 Tom Tromey <tom@tromey.com>
16621
16622 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16623
16624 2017-01-10 Tom Tromey <tom@tromey.com>
16625
16626 * python/python.c (gdbpy_eval_from_control_command)
16627 (gdbpy_source_script, gdbpy_run_events)
16628 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16629 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16630 gdbpy_enter.
16631
16632 2017-01-10 Tom Tromey <tom@tromey.com>
16633
16634 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16635
16636 2017-01-10 Tom Tromey <tom@tromey.com>
16637
16638 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16639
16640 2017-01-10 Tom Tromey <tom@tromey.com>
16641
16642 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16643 (python_on_inferior_call_pre, python_on_inferior_call_post)
16644 (python_on_memory_change, python_on_register_change)
16645 (python_inferior_exit, python_new_objfile, add_thread_object)
16646 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16647
16648 2017-01-10 Tom Tromey <tom@tromey.com>
16649
16650 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16651 (bpfinishpy_handle_exit): Use gdbpy_enter.
16652
16653 2017-01-10 Tom Tromey <tom@tromey.com>
16654
16655 * python/py-cmd.c (cmdpy_destroyer)
16656 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16657 gdbpy_enter.
16658
16659 2017-01-10 Tom Tromey <tom@tromey.com>
16660
16661 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16662 gdbpy_enter.
16663 (gdbpy_breakpoint_has_cond): Likewise.
16664
16665 2017-01-10 Tom Tromey <tom@tromey.com>
16666
16667 * python/python.c (gdbpy_enter): New constructor.
16668 (~gdbpy_enter): New destructor.
16669 (restore_python_env, ensure_python_env): Rewrite.
16670 * python/python-internal.h (gdbpy_enter): New class.
16671
16672 2017-01-10 Tom Tromey <tom@tromey.com>
16673
16674 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16675
16676 2017-01-10 Tom Tromey <tom@tromey.com>
16677
16678 * python/py-value.c (value_has_field, get_field_flag)
16679 (get_field_type, valpy_getitem, convert_value_from_python): Use
16680 gdbpy_ref.
16681
16682 2017-01-10 Tom Tromey <tom@tromey.com>
16683
16684 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16685 gdbpy_ref.
16686
16687 2017-01-10 Tom Tromey <tom@tromey.com>
16688
16689 * python/py-prettyprint.c (search_pp_list)
16690 (find_pretty_printer_from_objfiles)
16691 (find_pretty_printer_from_progspace)
16692 (find_pretty_printer_from_gdb, find_pretty_printer)
16693 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16694 gdbpy_ref.
16695
16696 2017-01-10 Tom Tromey <tom@tromey.com>
16697
16698 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16699
16700 2017-01-10 Tom Tromey <tom@tromey.com>
16701
16702 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16703 (ltpy_get_all_source_lines): Use gdbpy_ref.
16704
16705 2017-01-10 Tom Tromey <tom@tromey.com>
16706
16707 * python/py-framefilter.c (extract_sym, extract_value)
16708 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16709 gdbpy_ref.
16710
16711 2017-01-10 Tom Tromey <tom@tromey.com>
16712
16713 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16714
16715 2017-01-10 Tom Tromey <tom@tromey.com>
16716
16717 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16718
16719 2017-01-10 Tom Tromey <tom@tromey.com>
16720
16721 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16722 gdbpy_ref.
16723
16724 2017-01-10 Tom Tromey <tom@tromey.com>
16725
16726 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16727
16728 2017-01-10 Tom Tromey <tom@tromey.com>
16729
16730 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16731 (typy_range): Use gdbpy_ref.
16732
16733 2017-01-10 Tom Tromey <tom@tromey.com>
16734
16735 * python/py-threadevent.c (create_thread_event_object): Use
16736 gdbpy_ref.
16737 * python/py-stopevent.c (create_stop_event_object): Simplify.
16738 (emit_stop_event): Use gdbpy_ref.
16739 * python/py-signalevent.c (create_signal_event_object): Use
16740 gdbpy_ref.
16741 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16742 (emit_new_objfile_event, create_clear_objfiles_event_object)
16743 (emit_clear_objfiles_event): Use gdbpy_ref.
16744 * python/py-infevents.c (create_inferior_call_event_object)
16745 (create_register_changed_event_object)
16746 (create_memory_changed_event_object, emit_inferior_call_event)
16747 (emit_memory_changed_event, emit_register_changed_event): Use
16748 gdbpy_ref.
16749 * python/py-exitedevent.c (create_exited_event_object)
16750 (emit_exited_event): Use gdbpy_ref.
16751 * python/py-event.h (evpy_emit_event): Remove
16752 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16753 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16754 * python/py-continueevent.c (emit_continue_event): Use
16755 gdbpy_ref.
16756 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16757 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16758 gdbpy_ref.
16759 * python/py-bpevent.c (create_breakpoint_event_object): Use
16760 gdbpy_ref.
16761
16762 2017-01-10 Tom Tromey <tom@tromey.com>
16763
16764 * python/py-ref.h: New file.
16765
16766 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16767
16768 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16769 void.
16770 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16771 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16772 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16773 * ui-out.c (ui_out::redirect): Likewise.
16774 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16775 * cli/cli-logging.c (set_logging_redirect): Update call site of
16776 ui_out::redirect.
16777 (handle_redirections): Likewise.
16778 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16779 * top.c (execute_command_to_string): Likewise.
16780 * utils.c (do_ui_out_redirect_pop): Likewise.
16781
16782 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16783
16784 * stack.c (_initialize_stack): Update "frame" command help message.
16785
16786 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16787
16788 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16789
16790 2017-01-06 Yao Qi <yao.qi@linaro.org>
16791
16792 * x86-linux-nat.h: Include gdb_proc_service.h.
16793
16794 2017-01-06 Yao Qi <yao.qi@linaro.org>
16795
16796 * ser-base.h: Include serial.h.
16797
16798 2017-01-06 Yao Qi <yao.qi@linaro.org>
16799
16800 * ppc-linux-tdep.h: Include ppc-tdep.h.
16801
16802 2017-01-06 Yao Qi <yao.qi@linaro.org>
16803
16804 * nat/amd64-linux-siginfo.h: Include signal.h.
16805
16806 2017-01-06 Yao Qi <yao.qi@linaro.org>
16807
16808 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16809
16810 2017-01-06 Yao Qi <yao.qi@linaro.org>
16811
16812 * mi/mi-parse.h: Include mi-cmds.h.
16813
16814 2017-01-06 Yao Qi <yao.qi@linaro.org>
16815
16816 * inf-loop.c: Don't include "target.h".
16817 * inf-loop.h: Include it here.
16818
16819 2017-01-06 Yao Qi <yao.qi@linaro.org>
16820
16821 * dfp.h: Include "dboulest.h" and "expression.h".
16822
16823 2017-01-06 Yao Qi <yao.qi@linaro.org>
16824
16825 * ax-gdb.h: Include "ax.h".
16826
16827 2017-01-06 Yao Qi <yao.qi@linaro.org>
16828
16829 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16830 with nat/gdb_ptrace.h.
16831
16832 2017-01-05 Yao Qi <yao.qi@linaro.org>
16833
16834 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16835 new line.
16836 (mips64_fbsd_sigframe_init): Likewise.
16837
16838 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16839
16840 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16841 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16842
16843 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16844
16845 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16846 * NEWS: Mention new FreeBSD/mips native configuration.
16847 * config/mips/fbsd.mh: New file.
16848 * configure.host: Add mips*-*-freebsd*.
16849 * mips-fbsd-nat.c: New file.
16850
16851 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16852
16853 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16854 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16855 * NEWS: Mention new FreeBSD/mips target.
16856 * configure.tgt: Add mips*-*-freebsd*.
16857 * mips-fbsd-tdep.c: New file.
16858 * mips-fbsd-tdep.h: New file.
16859
16860 2017-01-04 Yao Qi <yao.qi@linaro.org>
16861
16862 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16863 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16864
16865 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16866
16867 Update copyright year range in all GDB files.
16868
16869 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16870
16871 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16872
16873 For older changes see ChangeLog-2016.
16874 \f
16875 Local Variables:
16876 mode: change-log
16877 left-margin: 8
16878 fill-column: 74
16879 version-control: never
16880 coding: utf-8
16881 End:
This page took 0.368844 seconds and 5 git commands to generate.