Remove dead code in regcache::dump
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
e8d58cba
YQ
12017-11-24 Yao Qi <yao.qi@linaro.org>
2
3 * regcache.c (regcache::dump): Remove footnote_register_size.
4
a63f2d2f
YQ
52017-11-24 Yao Qi <yao.qi@linaro.org>
6
7 * regcache.c (cooked_read_test): Add more test for readonly
8 regcache.
9
1b30aaa5
YQ
102017-11-24 Yao Qi <yao.qi@linaro.org>
11
12 * gdbarch-selftests.c (test_target_has_registers): Move it to
13 target.c.
14 (test_target_has_stack): Likewise.
15 (test_target_has_memory): Likewise.
16 (test_target_prepare_to_store): Likewise.
17 (test_target_store_registers): Likewise.
18 (test_target_ops): Likewise.
19 * regcache.c: Include selftest-arch.h and gdbthread.h.
20 (target_ops_no_register): New class.
21 (test_target_fetch_registers): New.
22 (test_target_store_registers): New.
23 (test_target_xfer_partial): New.
24 (readwrite_regcache): New.
25 (cooked_read_test): New.
26 (_initialize_regcache): Register the test.
27 * target.c: (test_target_has_registers): Moved from
28 gdbarch-selftests.c.
29 (test_target_has_stack): Likewise.
30 (test_target_has_memory): Likewise.
31 (test_target_prepare_to_store): Likewise.
32 (test_target_store_registers): Likewise.
33 * target.h (test_target_ops): New class.
34
6654d750
AH
352017-11-24 Alan Hayward <alan.hayward@arm.com>
36
37 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
38 selftest.
39
49bdb7ee
AH
402017-11-24 Alan Hayward <alan.hayward@arm.com>
41
42 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
43 * arch/aarch64.c (aarch64_create_target_description): Create
44 new target description.
45 * features/Makefile: Add new files.
46 * features/aarch64.c: Remove file.
47 * features/aarch64-core.c: New autogenerated file.
48 * features/aarch64-fpu.c: New autogenerated file.
49 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
50
512017-11-24 Alan Hayward <alan.hayward@arm.com>
52
53 * Makefile.in: Add new files.
54 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
55 aarch64_read_description.
56 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
57 Call aarch64_read_description.
58 * aarch64-tdep.c (aarch64_read_description): New function.
59 (aarch64_gdbarch_init): Call aarch64_read_description.
60 * aarch64-tdep.h (aarch64_read_description): New function.
61 * arch/aarch64.c: New file.
62 * configure.tgt: Add new files.
63
98ead37e
YQ
642017-11-24 Yao Qi <yao.qi@linaro.org>
65
66 * mi/mi-main.c (register_changed_p): Update.
67 * value.c (value_contents_bits_eq): Change return type.
68 (value_contents_eq): Likewise.
69 * value.h: Update comments.
70
62ad7ce7
YQ
712017-11-24 Yao Qi <yao.qi@linaro.org>
72
73 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
74 local 'changed'. Remove error.
75 (register_changed_p): Change return type to bool.
76
506fe5f4
YQ
772017-11-24 Yao Qi <yao.qi@linaro.org>
78
79 * arch/tic6x.c: New file.
80 * arch/tic6x.h: New file.
81 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
82 tic6x-core.xml and tic6x-gp.xml.
83 * features/tic6x-c6xp.c: Generated.
84 * features/tic6x-core.c: Generated.
85 * features/tic6x-gp.c: Generated.
86 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
87 "tic6x-".
88
00ea2e2a
SM
892017-11-23 Simon Marchi <simon.marchi@ericsson.com>
90
91 * mi/mi-main.c (list_available_thread_groups): Change map value
92 type to std::vector.
93
f45e2a77
SM
942017-11-23 Simon Marchi <simon.marchi@ericsson.com>
95
96 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
97
bd046f64
SM
982017-11-23 Simon Marchi <simon.marchi@ericsson.com>
99
100 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
101 back to...
102 <children_requested>: ... this.
103 (varobj_get_num_children, varobj_update): Adjust.
104
4c37490d
SM
1052017-11-23 Simon Marchi <simon.marchi@ericsson.com>
106
107 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
108 (ada_value_has_mutated): Likewise.
109 * c-varobj.c (varobj_is_anonymous_child): Likewise.
110 (c_is_path_expr_parent): Likewise.
111 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
112 (mi_cmd_var_set_frozen): Likewise.
113 (mi_cmd_var_update_iter): Likewise.
114 (mi_cmd_var_update): Likewise.
115 * varobj.c (pretty_printing): Likewise.
116 (varobj_enable_pretty_printing): Likewise.
117 (struct varobj_root) <floating, is_valid>: Likewise.
118 (struct varobj_dynamic) <children_requested>: Likewise.
119 (delete_variable): Likewise.
120 (delete_variable_1): Likewise.
121 (install_variable): Likewise.
122 (update_type_if_necessary): Likewise.
123 (install_new_value): Likewise.
124 (value_of_root): Likewise.
125 (is_root_p): Likewise.
126 (varobj_create): Likewise.
127 (varobj_delete): Likewise.
128 (varobj_has_more): Likewise.
129 (varobj_set_frozen): Likewise.
130 (varobj_get_frozen): Likewise.
131 (install_dynamic_child): Likewise.
132 (dynamic_varobj_has_child_method): Likewise.
133 (update_dynamic_varobj_children): Likewise.
134 (varobj_get_num_children): Likewise.
135 (varobj_list_children): Likewise.
136 (is_path_expr_parent): Likewise.
137 (varobj_default_is_path_expr_parent): Likewise.
138 (varobj_is_dynamic_p): Likewise.
139 (varobj_set_value): Likewise.
140 (varobj_value_has_mutated): Likewise.
141 (varobj_update): Likewise.
142 (check_scope): Likewise.
143 (value_of_root_1): Likewise.
144 (varobj_value_get_print_value): Likewise.
145 (varobj_editable_p): Likewise.
146 (varobj_value_is_changeable_p): Likewise.
147 (varobj_floating_p): Likewise.
148 (varobj_default_value_is_changeable_p): Likewise.
149 (varobj_invalidate_iter): Likewise.
150 * varobj.h (struct varobj_update_result) <type_changed,
151 children_changed, changed, value_installed>: Likewise.
152 (struct varobj) <updated, frozen, not_fetched>: Likewise.
153 (struct lang_varobj_ops) <value_is_changeable_p,
154 value_has_mutated, is_path_expr_parent>: Likewise.
155 (varobj_delete): Likewise.
156 (varobj_set_frozen): Likewise.
157 (varobj_get_frozen): Likewise.
158 (varobj_set_value): Likewise.
159 (varobj_update): Likewise.
160 (varobj_editable_p): Likewise.
161 (varobj_floating_p): Likewise.
162 (varobj_has_more): Likewise.
163 (varobj_is_dynamic_p): Likewise.
164 (varobj_default_value_is_changeable_p): Likewise.
165 (varobj_value_is_changeable_p): Likewise.
166 (varobj_is_anonymous_child): Likewise.
167 (varobj_default_is_path_expr_parent): Likewise.
168
9c23b42f
SDJ
1692017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
170
171 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
172 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
173 <type_str>: Convert to 'std::string'.
174 <expr>: Convert to 'expression_up'.
175 (dtrace_probe_arg_s): Delete type and VEC.
176 (dtrace_probe_enabler_s): Likewise.
177 (struct dtrace_probe): Replace by...
178 (class dtrace_static_probe_ops): ...this and...
179 (class dtrace_probe): ...this.
180 (dtrace_probe_is_linespec): Rename to...
181 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
182 to reflect change.
183 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
184 Adjust code. Create new instance of 'dtrace_probe'.
185 (dtrace_build_arg_exprs): Rename to...
186 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
187 reflect change.
188 (dtrace_get_probes): Rename to...
189 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
190 to reflect change.
191 (dtrace_get_arg): Rename to...
192 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
193 reflect change.
194 (dtrace_probe_is_enabled): Rename to...
195 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
196 change.
197 (dtrace_get_probe_address): Rename to...
198 (dtrace_probe::get_relocated_address): ...this. Adjust code
199 to reflect change.
200 (dtrace_get_probe_argument_count): Rename to...
201 (dtrace_probe::get_argument_count): ...this. Adjust code to
202 reflect change.
203 (dtrace_can_evaluate_probe_arguments): Rename to...
204 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
205 to reflect change.
206 (dtrace_evaluate_probe_argument): Rename to...
207 (dtrace_probe::evaluate_argument): ...this. Adjust code to
208 reflect change.
209 (dtrace_compile_to_ax): Rename to...
210 (dtrace_probe::compile_to_ax): ...this. Adjust code to
211 reflect change.
212 (dtrace_probe_destroy): Delete.
213 (dtrace_type_name): Rename to...
214 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
215 reflect change.
216 (dtrace_probe::get_static_ops): New method.
217 (dtrace_gen_info_probes_table_header): Rename to...
218 (dtrace_static_probe_ops::gen_info_probes_table_header):
219 ...this. Adjust code to reflect change.
220 (dtrace_gen_info_probes_table_values): Rename to...
221 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
222 code to reflect change.
223 (dtrace_enable_probe): Rename to...
224 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
225 change.
226 (dtrace_disable_probe): Rename to...
227 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
228 change.
229 (struct probe_ops dtrace_probe_ops): Delete.
230 (info_probes_dtrace_command): Call 'info_probes_for_spops'
231 instead of 'info_probes_for_ops'.
232 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
233 of 'all_probe_ops'.
234
0e9ae10f
SDJ
2352017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
236 Simon Marchi <simark@simark.ca>
237
238 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
239 variable.
240 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
241 <aexpr>: Change type to 'expression_up'.
242 (stap_probe_arg_s): Delete type and VEC.
243 (struct stap_probe): Delete. Replace by...
244 (class stap_static_probe_ops): ...this and...
245 (class stap_probe): ...this. Rename variables to add 'm_'
246 prefix. Do not use 'union' for arguments anymore.
247 (stap_get_expected_argument_type): Receive probe name instead
248 of 'struct stap_probe'. Adjust code.
249 (stap_parse_probe_arguments): Rename to...
250 (stap_probe::parse_arguments): ...this. Adjust code to
251 reflect change.
252 (stap_get_probe_address): Rename to...
253 (stap_probe::get_relocated_address): ...this. Adjust code
254 to reflect change.
255 (stap_get_probe_argument_count): Rename to...
256 (stap_probe::get_argument_count): ...this. Adjust code
257 to reflect change.
258 (stap_get_arg): Rename to...
259 (stap_probe::get_arg_by_number'): ...this. Adjust code to
260 reflect change.
261 (can_evaluate_probe_arguments): Rename to...
262 (stap_probe::can_evaluate_arguments): ...this. Adjust code
263 to reflect change.
264 (stap_evaluate_probe_argument): Rename to...
265 (stap_probe::evaluate_argument): ...this. Adjust code
266 to reflect change.
267 (stap_compile_to_ax): Rename to...
268 (stap_probe::compile_to_ax): ...this. Adjust code to
269 reflect change.
270 (stap_probe_destroy): Delete.
271 (stap_modify_semaphore): Adjust comment.
272 (stap_set_semaphore): Rename to...
273 (stap_probe::set_semaphore): ...this. Adjust code to reflect
274 change.
275 (stap_clear_semaphore): Rename to...
276 (stap_probe::clear_semaphore): ...this. Adjust code to
277 reflect change.
278 (stap_probe::get_static_ops): New method.
279 (handle_stap_probe): Adjust code to create instance of
280 'stap_probe'.
281 (stap_get_probes): Rename to...
282 (stap_static_probe_ops::get_probes): ...this. Adjust code to
283 reflect change.
284 (stap_probe_is_linespec): Rename to...
285 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
286 reflect change.
287 (stap_type_name): Rename to...
288 (stap_static_probe_ops::type_name): ...this. Adjust code to
289 reflect change.
290 (stap_gen_info_probes_table_header): Rename to...
291 (stap_static_probe_ops::gen_info_probes_table_header):
292 ...this. Adjust code to reflect change.
293 (stap_gen_info_probes_table_values): Rename to...
294 (stap_probe::gen_info_probes_table_values): ...this. Adjust
295 code to reflect change.
296 (struct probe_ops stap_probe_ops): Delete.
297 (info_probes_stap_command): Use 'info_probes_for_spops'
298 instead of 'info_probes_for_ops'.
299 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
300 of 'all_probe_ops'.
301
935676c9
SDJ
3022017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
303
304 * break-catch-throw.c (fetch_probe_arguments): Use
305 'probe.prob' instead of 'probe.probe'.
306 * breakpoint.c (create_longjmp_master_breakpoint): Call
307 'can_evaluate_arguments' and 'get_relocated_address' methods
308 from probe.
309 (create_exception_master_breakpoint): Likewise.
310 (add_location_to_breakpoint): Use 'sal->prob' instead of
311 'sal->probe'.
312 (bkpt_probe_insert_location): Call 'set_semaphore' method from
313 probe.
314 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
315 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
316 of 'probe_ops'.
317 (probe_key_free): Call 'delete' on probe.
318 (check_exception_resume): Use 'probe.prob' instead of
319 'probe.probe'.
320 * location.c (string_to_event_location_basic): Call
321 'probe_linespec_to_static_ops'.
322 * probe.c (class any_static_probe_ops): New class.
323 (any_static_probe_ops any_static_probe_ops): New variable.
324 (parse_probes_in_pspace): Receive 'static_probe_ops' as
325 argument. Adjust code to reflect change.
326 (parse_probes): Use 'static_probe_ops' instead of
327 'probe_ops'. Adjust code to reflect change.
328 (find_probes_in_objfile): Call methods to get name and
329 provider from probe.
330 (find_probe_by_pc): Use 'result.prob' instead of
331 'result.probe'. Call 'get_relocated_address' method from
332 probe.
333 (collect_probes): Adjust comment and argument list to receive
334 'static_probe_ops' instead of 'probe_ops'. Adjust code to
335 reflect change. Call necessary methods from probe.
336 (compare_probes): Call methods to get name and provider from
337 probes.
338 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
339 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
340 adjust code accordingly.
341 (print_ui_out_not_applicables): Likewise.
342 (info_probes_for_ops): Rename to...
343 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
344 as argument instead of 'probe_ops'. Adjust code. Call
345 necessary methods from probe.
346 (info_probes_command): Use 'info_probes_for_spops'.
347 (enable_probes_command): Pass correct argument to
348 'collect_probes'. Call methods from probe.
349 (disable_probes_command): Likewise.
350 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
351 (get_probe_argument_count): Move to
352 'any_static_probe_ops::get_argument_count'.
353 (can_evaluate_probe_arguments): Move to
354 'any_static_probe_ops::can_evaluate_arguments'.
355 (evaluate_probe_argument): Move to
356 'any_static_probe_ops::evaluate_argument'.
357 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
358 'probe.probe'.
359 (probe_linespec_to_ops): Rename to...
360 (probe_linespec_to_static_ops): ...this. Adjust code.
361 (probe_any_is_linespec): Rename to...
362 (any_static_probe_ops::is_linespec): ...this.
363 (probe_any_get_probes): Rename to...
364 (any_static_probe_ops::get_probes): ...this.
365 (any_static_probe_ops::type_name): New method.
366 (any_static_probe_ops::gen_info_probes_table_header): New
367 method.
368 (compute_probe_arg): Use 'pc_probe.prob' instead of
369 'pc_probe.probe'. Call methods from probe.
370 (compile_probe_arg): Likewise.
371 (std::vector<const probe_ops *> all_probe_ops): Delete.
372 (std::vector<const static_probe_ops *> all_static_probe_ops):
373 New variable.
374 (_initialize_probe): Use 'all_static_probe_ops' instead of
375 'all_probe_ops'.
376 * probe.h (struct info_probe_column) <field_name>: Delete
377 extraneous newline
378 (info_probe_column_s): Delete type and VEC.
379 (struct probe_ops): Delete. Replace with...
380 (class static_probe_ops): ...this and...
381 (clas probe): ...this.
382 (struct bound_probe) <bound_probe>: Delete extraneous
383 newline. Adjust constructor to receive 'probe' instead of
384 'struct probe'.
385 <probe>: Rename to...
386 <prob>: ...this. Delete extraneous newline.
387 <objfile>: Delete extraneous newline.
388 (register_probe_ops): Delete unused prototype.
389 (info_probes_for_ops): Rename to...
390 (info_probes_for_spops): ...this. Adjust comment.
391 (get_probe_address): Move to 'probe::get_address'.
392 (get_probe_argument_count): Move to
393 'probe::get_argument_count'.
394 (can_evaluate_probe_arguments): Move to
395 'probe::can_evaluate_arguments'.
396 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
397 * solib-svr4.c (struct svr4_info): Adjust comment.
398 (struct probe_and_action) <probe>: Rename to...
399 <prob>: ...this.
400 (register_solib_event_probe): Receive 'probe' instead of
401 'struct probe' as argument. Use 'prob' instead of 'probe'
402 when applicable.
403 (solib_event_probe_action): Call 'get_argument_count' method
404 from probe. Adjust comment.
405 (svr4_handle_solib_event): Adjust comment. Call
406 'evaluate_argument' method from probe.
407 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
408 from probe.
409 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
410 'struct probe'. Call 'can_evaluate_arguments' from probe.
411 * symfile.h: Forward declare 'class probe' instead of 'struct
412 probe'.
413 * symtab.h: Likewise.
414 (struct symtab_and_line) <probe>: Rename to...
415 <prob>: ...this.
416 * tracepoint.c (start_tracing): Use 'prob' when applicable.
417 Call probe methods.
418 (stop_tracing): Likewise.
419
8f6cb6c3
JB
4202017-11-22 Joel Brobecker <brobecker@adacore.com>
421
422 * ravenscar-thread.c (ravenscar_inferior_created): Remove
423 trailing newline at end of string in call to warning.
424
479f8de1
SM
4252017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
426
427 * osdata.h: Include vector isntead of vec.h.
428 (osdata_column_s): Remove typedef.
429 (struct osdata_column): Add constructor.
430 <name, value>: Change type to std::string.
431 (DEF_VEC_O (osdata_column_s)): Remove.
432 (osdata_item_s): Remove typedef.
433 (struct osdata_item) <columns>: Change type to std::vector.
434 (DEF_VEC_O (osdata_item_s)): Remove.
435 (struct osdata): Add constructor.
436 <type>: Change type to std::string.
437 <items>: Change type to std::vector.
438 (osdata_p): Remove typedef.
439 (DEF_VEC_P (osdata_p)): Remove.
440 (osdata_parse): Return a unique_ptr.
441 (osdata_free): Remove.
442 (make_cleanup_osdata_free): Remove.
443 (get_osdata): Return a unique_ptr.
444 (get_osdata_column): Return pointer to std::string, take a
445 reference to osdata_item as parameter.
446 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
447 unique_ptr.
448 <property_name>: Change type to std::string.
449 (osdata_start_osdata): Allocate osdata with new and adjust.
450 (osdata_start_item): Adjust.
451 (osdata_start_column): Adjust.
452 (osdata_end_column): Adjust.
453 (clear_parsing_data): Remove.
454 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
455 (osdata_item_clear): Remove.
456 (get_osdata): return a unique_ptr and adjust.
457 (get_osdata_column): Return a pointer to std::string and adjust.
458 (info_osdata): Adjust.
459 * mi/mi-main.c: Include <map>.
460 (free_vector_of_osdata_items): Remove.
461 (list_available_thread_groups): Adjust, use std::map instead of
462 splay tree.
463
41bd68f5
SM
4642017-11-22 Simon Marchi <simon.marchi@ericsson.com>
465
466 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
467 case in switch.
468
7e2fd2f4
SM
4692017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
470
471 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
472
0604393c
SM
4732017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
474
475 * varobj.h (struct varobj_update_result): Add constructor, add
476 move constructor, disable copy and assign, initialize fields.
477 <newobj>: Change type to std::vector.
478 (varobj_update): Return std::vector.
479 * varobj.c (install_dynamic_child): Change VEC parameters to
480 std::vector and adjust.
481 (update_dynamic_varobj_children): Likewise.
482 (varobj_update): Return std::vector and adjust.
483 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
484
ddf0ea08
SM
4852017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
486
487 * varobj.h (struct varobj) <parent>: Remove const.
488 <children>: Change type to std::vector.
489 (varobj_list_children): Return std::vector const reference.
490 (varobj_restrict_range): Change parameter type to std::vector
491 const reference.
492 * varobj.c (varobj_has_more): Adjust.
493 (varobj_restrict_range): Change parameter type to std::vector
494 const reference and adjust.
495 (install_dynamic_child): Adjust.
496 (update_dynamic_varobj_children): Adjust.
497 (varobj_list_children): Return std::vector const reference and
498 adjust.
499 (varobj_add_child): Adjust.
500 (update_type_if_necessary): Adjust.
501 (varobj_update): Adjust.
502 (delete_variable_1): Adjust.
503 * ada-varobj.c (ada_value_has_mutated): Adjust.
504 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
505
9e5b9d2b
SM
5062017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
507
508 * varobj.h (struct varobj): Add constructor and destructor,
509 initialize fields.
510 * varobj.c (struct varobj_root): Initialize fields.
511 (struct varobj_dynamic): Initialize fields.
512 (varobj_create): Use unique_ptr instead of cleanup. Create
513 varobj with new instead of new_root_variable.
514 (delete_variable_1): Free variable with delete instead of
515 free_variable.
516 (create_child_with_value): Create variable with new instead of
517 new_variable.
518 (varobj::varobj): New.
519 (varobj::~varobj): New (body mostly coming from free_variable).
520 (new_variable): Remove.
521 (free_variable): Remove.
522 (do_free_variable_cleanup): Remove.
523 (make_cleanup_free_variable): Remove.
524
fc35dab1
UW
5252017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
526
527 * core-regset.c: Remove file.
528 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
529
2400729e
UW
5302017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
531
532 * NEWS: Document use of GNU MPFR.
533 * README: Likewise.
534
535 * Makefile.in (LIBMPFR): Add define.
536 (CLIBS): Add $(LIBMPFR).
537 * configure.ac: Add --with-mpfr configure option.
538 * configure: Regenerate.
539 * config.in: Regenerate.
540
541 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
542 (class mpfr_float_ops): New type.
543 (mpfr_float_ops::from_target): Two new overloaded functions.
544 (mpfr_float_ops::to_target): Likewise.
545 (mpfr_float_ops::to_string): New function.
546 (mpfr_float_ops::from_string): Likewise.
547 (mpfr_float_ops::to_longest): Likewise.
548 (mpfr_float_ops::from_longest): Likewise.
549 (mpfr_float_ops::from_ulongest): Likewise.
550 (mpfr_float_ops::to_host_double): Likewise.
551 (mpfr_float_ops::from_host_double): Likewise.
552 (mpfr_float_ops::convert): Likewise.
553 (mpfr_float_ops::binop): Likewise.
554 (mpfr_float_ops::compare): Likewise.
555 (get_target_float_ops): Use mpfr_float_ops if available.
556
7a26362d
UW
5572017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
558
559 * target-float.c: Do not include <math.h>.
560 Include <cmath> and <limits>.
561 (DOUBLEST): Do not define.
562 (class target_float_ops): New type.
563 (class host_float_ops): New templated type.
564 (class decimal_float_ops): New type.
565
566 (floatformat_to_doublest): Rename to ...
567 (host_float_ops<T>::from_target): ... this. Use template type T
568 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
569 (host_float_ops<T>::from_target): New overload using a type argument.
570 (floatformat_from_doublest): Rename to ...
571 (host_float_ops<T>::to_target): ... this. Use template type T
572 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
573 (host_float_ops<T>::to_target): New overload using a type argument.
574 (floatformat_printf_format): New function.
575 (struct printf_length_modifier): New templated type.
576 (floatformat_to_string): Rename to ...
577 (host_float_ops<T>::to_string): ... this. Use type instead of
578 floatformat argument. Use floatformat_printf_format and
579 printf_length_modifier. Remove special handling of invalid numbers,
580 infinities and NaN (moved to target_float_to_string).
581 (struct scanf_length_modifier): New templated type.
582 (floatformat_from_string): Rename to ...
583 (host_float_ops<T>::from_string): ... this. Use type instead of
584 floatformat argument. Use scanf_length_modifier.
585 (floatformat_to_longest): Rename to ...
586 (host_float_ops<T>::to_longest): ... this. Use type instead of
587 floatformat argument. Handle out-of-range values deterministically.
588 (floatformat_from_longest): Rename to ...
589 (host_float_ops<T>::from_longest): ... this. Use type instead of
590 floatformat argument.
591 (floatformat_from_ulongest): Rename to ...
592 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
593 floatformat argument.
594 (floatformat_to_host_double): Rename to ...
595 (host_float_ops<T>::to_host_double): ... this. Use type instead of
596 floatformat argument.
597 (floatformat_from_host_double): Rename to ...
598 (host_float_ops<T>::from_host_double): ... this. Use type instead of
599 floatformat argument.
600 (floatformat_convert): Rename to ...
601 (host_float_ops<T>::convert): ... this. Use type instead of
602 floatformat arguments. Remove handling of no-op conversions.
603 (floatformat_binop): Rename to ...
604 (host_float_ops<T>::binop): ... this. Use type instead of
605 floatformat arguments.
606 (floatformat_compare): Rename to ...
607 (host_float_ops<T>::compare): ... this. Use type instead of
608 floatformat arguments.
609
610 (match_endianness): Use type instead of length/byte_order arguments.
611 (set_decnumber_context): Likewise.
612 (decimal_from_number): Likewise. Update calls.
613 (decimal_to_number): Likewise.
614 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
615 (decimal_float_ops::to_host_double): New dummy function.
616 (decimal_float_ops::from_host_double): Likewise.
617 (decimal_to_string): Rename to ...
618 (decimal_float_ops::to_string): ... this. Use type instead of
619 length/byte_order arguments. Update calls.
620 (decimal_from_string): Rename to ...
621 (decimal_float_ops::from_string): ... this. Use type instead of
622 length/byte_order arguments. Update calls.
623 (decimal_from_longest): Rename to ...
624 (decimal_float_ops::from_longest): ... this. Use type instead of
625 length/byte_order arguments. Update calls.
626 (decimal_from_ulongest): Rename to ...
627 (decimal_float_ops::from_ulongest): ... this. Use type instead of
628 length/byte_order arguments. Update calls.
629 (decimal_to_longest): Rename to ...
630 (decimal_float_ops::to_longest): ... this. Use type instead of
631 length/byte_order arguments. Update calls.
632 (decimal_binop): Rename to ...
633 (decimal_float_ops::binop): ... this. Use type instead of
634 length/byte_order arguments. Update calls.
635 (decimal_compare): Rename to ...
636 (decimal_float_ops::compare): ... this. Use type instead of
637 length/byte_order arguments. Update calls.
638 (decimal_convert): Rename to ...
639 (decimal_float_ops::convert): ... this. Use type instead of
640 length/byte_order arguments. Update calls.
641
642 (target_float_same_category_p): New function.
643 (target_float_same_format_p): Likewise.
644 (target_float_format_length): Likewise.
645 (enum target_float_ops_kind): New type.
646 (get_target_float_ops_kind): New function.
647 (get_target_float_ops): Three new overloaded functions.
648
649 (target_float_is_zero): Update call.
650 (target_float_to_string): Add special handling of invalid numbers,
651 infinities and NaN (moved from floatformat_to_string). Use
652 target_float_ops callback.
653 (target_float_from_string): Use target_float_ops callback.
654 (target_float_to_longest): Likewise.
655 (target_float_from_longest): Likewise.
656 (target_float_from_ulongest): Likewise.
657 (target_float_to_host_double): Likewise.
658 (target_float_from_host_double): Likewise.
659 (target_float_convert): Add special case for no-op conversions.
660 Use target_float_ops callback.
661 (target_float_binop): Use target_float_ops callback.
662 (target_float_compare): Likewise.
663
a9f26f60
YQ
6642017-11-22 Yao Qi <yao.qi@linaro.org>
665
666 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
667
29f9a567
YQ
6682017-11-22 Yao Qi <yao.qi@linaro.org>
669
670 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
671 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
672
3b1b69bf
JG
6732017-11-21 Jerome Guitton <guitton@adacore.com>
674
675 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
676 with event ptid from the lower layer before doing the
677 ravenscar-specific update.
678
54aa6c67
JB
6792017-11-21 Joel Brobecker <brobecker@adacore.com>
680
681 * ravenscar-thread.c (is_ravenscar_task): Also verify that
682 the ptid's TID is nonzero.
683
cf3fbed4
JB
6842017-11-21 Joel Brobecker <brobecker@adacore.com>
685
686 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
687 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
688 Make non-static. Change return type to char *. Adjust code
689 accordingly. Rewrite the function's documentation.
690 (read_atcb): Adjust call to get_tcb_types_info accordingly.
691 * ravenscar-thread.c (ravenscar_inferior_created): Check that
692 we have enough debugging information in the runtime to support
693 Ada task debugging before we enable the ravenscar-thread layer.
694
9edcc12f
JB
6952017-11-21 Joel Brobecker <brobecker@adacore.com>
696
697 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
698 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
699 * ravenscar-thread.c: Add into comment.
700 (base_magic_null_ptid): Delete.
701 (base_ptid): Change documentation.
702 (ravenscar_active_task): Renames ravenscar_running_thread.
703 All callers updated throughout.
704 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
705 (ravenscar_task_is_currently_active): Likewise.
706 (get_base_thread_from_ravenscar_task): Ditto.
707 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
708 (ravenscar_runtime_initialized): Likewise.
709 (get_running_thread_id): Add new parameter "cpu". Adjust
710 implementation to handle this new parameter.
711 (ravenscar_fetch_registers): Small adjustment to use
712 is_ravenscar_task and ravenscar_task_is_currently_active in
713 order to decide whether to use the target beneath or this
714 module's arch_ops.
715 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
716 (ravenscar_stopped_by_sw_breakpoint): Use
717 get_base_thread_from_ravenscar_task to get the underlying
718 thread, rather than using base_ptid.
719 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
720 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
721 Likewise.
722 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
723
65d40437
JB
7242017-11-21 Joel Brobecker <brobecker@adacore.com>
725
726 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
727 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
728 (get_tcb_types_info): Set fieldnos.base_cpu.
729 (read_atcb): Set task_info->base_cpu.
730 (info_task): Print "Base CPU" info if set by runtime.
731
e02544b2
JB
7322017-11-21 Joel Brobecker <brobecker@adacore.com>
733
734 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
735 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
736 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
737 New functions.
738 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
739 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
740 to_stopped_data_address and to_core_of_thread fields of
741 ravenscar_ops.
742
ed0f4273
UW
7432017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
744
745 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
746 (struct gdbarch_tdep): New member long_double_abi.
747 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
748 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
749 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
750 format depending on long_double_abi tdep member.
751 (ppc_floatformat_for_type): Handle __ibm128 type.
752
0fc76421
SM
7532017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
754
755 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
756
e6b2f5ef
PA
7572017-11-21 Pedro Alves <palves@redhat.com>
758
759 * dwarf2read.c (mapped_index::find_name_components_bounds)
760 <completion mode, upper bound>: Use std::lower_bound instead of
761 std::upper_bound.
762 (test_mapped_index_find_name_component_bounds): Remove incorrect
763 "t1_fund" from expected symbols.
764
5c58de74
PA
7652017-11-21 Pedro Alves <palves@redhat.com>
766
767 * dwarf2read.c (mapped_index::name_components_casing): New field.
768 (mapped_index) <build_name_components,
769 find_name_components_bounds): Declare new methods.
770 (mapped_index::find_name_components_bounds)
771 (mapped_index::build_name_components): New methods, factored out
772 from dw2_expand_symtabs_matching_symbol.
773 (check_find_bounds_finds)
774 (test_mapped_index_find_name_component_bounds): New.
775 (run_test): Rename to ...
776 (test_dw2_expand_symtabs_matching_symbol): ... this.
777 (run_test): Reimplement.
778
e1ef7d7a
PA
7792017-11-21 Pedro Alves <palves@redhat.com>
780
781 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
782 (symbol_end): Use cp_ident_is_alnum.
783 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
784 * dwarf2read.c (make_sort_after_prefix_name): New function.
785 (dw2_expand_symtabs_matching_symbol): Use it.
786 (test_symbols): Add more symbols.
787 (run_test): Add tests.
788
cf724bc9
TT
7892017-11-17 Tom Tromey <tom@tromey.com>
790
791 * symtab.h (enum symbol_subclass_kind): New.
792 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
793 Remove.
794 <subclass>: New member.
795 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
796 * rust-lang.c (rust_get_trait_object_pointer): Update.
797 * dwarf2read.c (read_func_scope): Update.
798 (read_variable): Update.
799
68e745e3
TT
8002017-11-17 Tom Tromey <tom@tromey.com>
801
802 * dwarf2read.c (read_func_scope): Update.
803 * symtab.h (struct template_symbol): Derive from symbol.
804 <base>: Remove.
805
71a3c369
TT
8062017-11-17 Tom Tromey <tom@tromey.com>
807
808 * symtab.h (struct symbol) <is_rust_vtable>: New member.
809 (struct rust_vtable_symbol): New.
810 (find_symbol_at_address): Declare.
811 * symtab.c (find_symbol_at_address): New function.
812 * symfile.h (struct quick_symbol_functions)
813 <find_compunit_symtab_by_address>: New member.
814 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
815 function.
816 (debug_sym_quick_functions): Link to
817 debug_qf_find_compunit_symtab_by_address.
818 * rust-lang.c (rust_get_trait_object_pointer): New function.
819 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
820 rust_get_trait_object_pointer.
821 * psymtab.c (psym_relocate): Clear psymbol_map.
822 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
823 functions.
824 (psym_functions): Link to psym_find_compunit_symtab_by_address.
825 * objfiles.h (struct objfile) <psymbol_map>: New member.
826 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
827 (process_die) <DW_TAG_variable>: New case. Call read_variable.
828 (rust_containing_type, read_variable): New functions.
829
7468702d
SM
8302017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
831
832 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
833
37269bc9
SM
8342017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
835
836 * common/filestuff.c: Include <algorithm>.
837 (open_fds): Change type to std::vector<int>.
838 (do_mark_open_fd): Adjust.
839 (unmark_fd_no_cloexec): Adjust.
840 (do_close): Adjust.
841
5c632425
SM
8422017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * breakpoint.c (output_thread_groups): Take an std::vector.
845 (print_one_breakpoint_location): Adjust.
846
ced9779b
JB
8472017-11-17 Joel Brobecker <brobecker@adacore.com>
848
849 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
850 (ada_evaluate_subexp_for_cast): New function.
851 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
852 ada_evaluate_subexp_for_cast.
853 (ada_evaluate_subexp) <nosideret>: Replace code by call to
854 eval_skip_value.
855 * eval.c (evaluate_var_value): Make non-static.
856 (evaluate_var_msym_value, eval_skip_value): Likewise.
857 * value.h (evaluate_var_value, evaluate_var_msym_value)
858 (eval_skip_value): Declare.
859
b7e22850
JB
8602017-11-16 Joel Brobecker <brobecker@adacore.com>
861
862 * ada-lang.c (ada_value_cast): Remove parameter "noside".
863 Update all callers.
864
9ccabccd
PA
8652017-11-16 Pedro Alves <palves@redhat.com>
866
867 * python/py-unwind.c (pyuw_sniffer): Translate
868 PyExc_KeyboardInterrupt to a GDB Quit exception.
869
d930703d
PA
8702017-11-16 Pedro Alves <palves@redhat.com>
871
872 * infrun.c (resume_cleanups): Delete.
873 (resume): No longer install a resume_cleanups cleanup nor call
874 QUIT.
875 (proceed): Pass the terminal to the inferior.
876 (keep_going_pass_signal): No longer install a resume_cleanups
877 cleanup.
878
38dc2859
PA
8792017-11-16 Pedro Alves <palves@redhat.com>
880
881 * inf-loop.c (inferior_event_handler): Don't swallow the exception
882 if the prompt is blocked.
883
688fca4f
PA
8842017-11-16 Pedro Alves <palves@redhat.com>
885
886 * breakpoint.c (insert_bp_location): Replace bp_err and
887 bp_err_message locals by a gdb_exception local.
888
e2c33ac7
PA
8892017-11-16 Pedro Alves <palves@redhat.com>
890
891 * inflow.c (scoped_ignore_sigttou): New class.
892 (child_terminal_ours_1, new_tty): Use it.
893
d7236961
UW
8942017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
895
896 * target-float.c (decimal_from_number): Add byte_order argument and
897 call match_endianness. Error if unknown floating-point type.
898 (decimal_to_number): Add byte_order argument and call match_endianness.
899 (decimal_from_longest): Update call. Do not call match_endianness.
900 (decimal_from_ulongest): Likewise.
901 (decimal_binop): Likewise.
902 (decimal_is_zero): Likewise.
903 (decimal_compare): Likewise.
904 (decimal_convert): Likewise.
905
d8ae99a7
PM
9062017-11-16 Phil Muldoon <pmuldoon@redhat.com>
907
908 * python/python.c (gdbpy_rbreak): New function.
909 * NEWS: Document Python rbreak feature.
910
c632b645
YQ
9112017-11-16 Yao Qi <yao.qi@linaro.org>
912
913 * features/tic6x-c62x.xml: Remove.
914 * features/tic6x-c64x.xml: Remove.
915 * features/tic6x-c64xp.xml: Remove.
916
a014b87a
JB
9172017-11-15 John Baldwin <jhb@FreeBSD.org>
918
919 * symtab.h: Include <array>.
920
94765011
JB
9212017-11-15 John Baldwin <jhb@FreeBSD.org>
922
923 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
924 (bsd_kvm_proc_cmd): Likewise.
925
625ad440
SM
9262017-11-15 Simon Marchi <simon.marchi@ericsson.com>
927
928 * tui/tui-win.c (window_name_completer): Replace VEC with
929 std::vector.
930
c0c11fa9
AC
9312017-11-15 Andrew Cagney <cagney@gnu.org>
932
933 * MAINTAINERS: Remove no-longer applicable entries.
934
34a7ebaf
AC
9352017-11-15 Andrew Cagney <cagney@gnu.org>
936
937 * MAINTAINERS: Move self to Past Maintainers.
938
5334ef39
YQ
9392017-11-15 Yao Qi <yao.qi@linaro.org>
940
941 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
942 * features/nios2-linux.c: Remove.
943 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
944 initialize_tdesc_nios2_linux.
945
a714b0d6
YQ
9462017-11-15 Yao Qi <yao.qi@linaro.org>
947
948 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
949 M68HC11_LAST_HARD_REG + 1.
950
92ffd475
PC
9512017-11-14 Paul Carroll <pcarroll@codesourcery.com>
952
953 PR gdb/22388
954 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
955 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
956 Return TARGET_XFER_EOF if size of returned data is 0.
957
07431908
SM
9582017-11-14 Simon Marchi <simon.marchi@ericsson.com>
959
960 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
961 memory-map-selftests.c.
962 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
963 * memory-map.c (memory_map_start_memory): Fix computation of hi
964 address.
965 * unittests/memory-map-selftests.c: New file.
966
31432a67
JB
9672017-11-09 Joel Brobecker <brobecker@adacore.com>
968
969 * ada-lang.c: Fix some typos in the general command documenting
970 how Ada expressions are being evaluated and how their result
971 is printed.
972
e793c052
TT
9732017-11-09 Tom Tromey <tom@tromey.com>
974
975 * psymtab.c (psymbol_hash): Do not hash string contents.
976 (psymbol_compare): Add comment.
977
7e8835c5
TT
9782017-11-09 Tom Tromey <tom@tromey.com>
979
980 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
981
286acbb5
JB
9822017-11-08 Joel Brobecker <brobecker@adacore.com>
983
984 * ada-exp.y (write_var_from_sym): Remove parameter
985 "orig_left_context". Update all callers.
986
b44ec619
SM
9872017-11-08 Simon Marchi <simon.marchi@ericsson.com>
988
989 * tracepoint.h (class collection_list) <stringify>: Return
990 std::vector<std::string>.
991 (encode_actions_rsp): Change parameters to
992 std::vector<std::string> *.
993 * tracepoint.c (collection_list::stringify): Return
994 std::vector<std::string> and adjust accordingly.
995 (encode_actions_rsp): Changee parameters to
996 std::vector<std::string> and adjust accordingly.
997 * remote.c (free_actions_list),
998 free_actions_list_cleanup_wrapper): Remove.
999 (remote_download_tracepoint): Adjust to std::vector.
1000
2f4732b0
TT
10012017-11-08 Tom Tromey <tom@tromey.com>
1002
1003 * dwarf2read.c (symbolp): Remove typedef.
1004 (read_func_scope): Use std::vector.
1005 (process_structure_scope): Use std::vector.
1006
f9d67a22
PA
10072017-11-08 Pedro Alves <palves@redhat.com>
1008
1009 * ada-lang.c (ada_make_symbol_completion_list): Use
1010 completion_skip_symbol.
1011 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1012 (symbol_is_function_or_method(symbol*)): New.
1013 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1014 completion_skip_symbol.
1015 (default_collect_symbol_completion_matches_break_on): Use
1016 completion_skip_symbol. Pass down mode.
1017 (collect_file_symbol_completion_matches): Pass down mode.
1018 * symtab.h (symbol_is_function_or_method): New declarations.
1019 (completion_skip_symbol): New template function.
1020
56d87ef7
PA
10212017-11-08 Pedro Alves <palves@redhat.com>
1022
1023 * linespec.c (iterate_over_all_matching_symtabs): Add
1024 search_domain parameter. Pass it down to expand_symtabs_matching.
1025 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1026 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1027 search_domain.
1028 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1029 Pass it down.
1030 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1031 symbols.
1032 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1033 it down.
1034
1b026119
PA
10352017-11-08 Pedro Alves <palves@redhat.com>
1036
1037 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1038 text_len locals and don't pass them down.
1039 * symtab.c (completion_list_add_name): Remove
1040 sym_text/sym_text_len parameters and adjust.
1041 (completion_list_add_symbol, completion_list_add_msymbol)
1042 (completion_list_objc_symbol, completion_list_add_fields)
1043 (add_symtab_completions): Likewise.
1044 (default_collect_symbol_completion_matches_break_on)
1045 (collect_file_symbol_completion_matches): Remove sym_text_len
1046 local and don't pass it down.
1047 * symtab.h (completion_list_add_name): Remove
1048 sym_text/sym_text_len parameters.
1049
c62446b1
PA
10502017-11-08 Pedro Alves <palves@redhat.com>
1051
1052 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1053 unittests/lookup_name_info-selftests.c.
1054 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1055 * cp-support.c: Include "selftest.h".
1056 (cp_remove_params_1): Rename from cp_remove_params. Add
1057 'require_param' parameter, and handle it.
1058 (cp_remove_params): Reimplement.
1059 (cp_remove_params_if_any): New.
1060 (selftests::quote): New.
1061 (selftests::check_remove_params): New.
1062 (selftests::test_cp_remove_params): New.
1063 (_initialize_cp_support): Install
1064 selftests::test_cp_remove_params.
1065 * cp-support.h (cp_remove_params_if_any): Declare.
1066 * dwarf2read.c :Include "selftest.h".
1067 (dw2_expand_symtabs_matching_symbol): Use
1068 lookup_name_info::make_ignore_params.
1069 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1070 (selftests::dw2_expand_symtabs_matching::string_or_null)
1071 (selftests::dw2_expand_symtabs_matching::check_match)
1072 (selftests::dw2_expand_symtabs_matching::test_symbols)
1073 (selftests::dw2_expand_symtabs_matching::run_test): New.
1074 (_initialize_dwarf2_read): Register
1075 selftests::dw2_expand_symtabs_matching::run_test.
1076 * psymtab.c (psym_expand_symtabs_matching): Use
1077 lookup_name_info::make_ignore_params.
1078 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1079 If the lookup name wants to ignore parameters, strip them.
1080 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1081 code handling '('.
1082 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1083 (default_collect_symbol_completion_matches_break_on): Don't try to
1084 strip parameters.
1085 * symtab.h (lookup_name_info::lookup_name_info): Add
1086 'ignore_parameters' parameter.
1087 (lookup_name_info::ignore_parameters)
1088 (lookup_name_info::make_ignore_params): New methods.
1089 (lookup_name_info::m_ignore_parameters): New field.
1090 * unittests/lookup_name_info-selftests.c: New file.
1091
61920122
PA
10922017-11-08 Pedro Alves <palves@redhat.com>
1093
1094 * dwarf2read.c (dw2_expand_marked_cus)
1095 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1096 (dw2_expand_symtabs_matching): Move further below.
1097 (dw2_expand_marked_cus): Reindent.
1098
3f563c84
PA
10992017-11-08 Pedro Alves <palves@redhat.com>
1100
1101 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1102 (struct name_component): New.
1103 (mapped_index::name_components): New field.
1104 (mapped_index::symbol_name_at): New method.
1105 (dwarf2_read_index): Call mapped_index ctor.
1106 (dw2_map_matching_symbols): Add comment about name_components
1107 table.
1108 (dw2_expand_symtabs_matching): Factor part to...
1109 (dw2_expand_symtabs_matching_symbol): ... this new function.
1110 Build name components table, and lookup symbols in it before
1111 calling the name matcher.
1112 (dw2_expand_marked_cus): New, factored out from
1113 dw2_expand_symtabs_matching.
1114 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1115
b5ec771e
PA
11162017-11-08 Pedro Alves <palves@redhat.com>
1117
1118 * ada-lang.c (ada_encode): Rename to ..
1119 (ada_encode_1): ... this. Add throw_errors parameter and handle
1120 it.
1121 (ada_encode): Reimplement.
1122 (match_name): Delete, folded into full_name.
1123 (resolve_subexp): No longer pass the encoded name to
1124 ada_lookup_symbol_list.
1125 (should_use_wild_match): Delete.
1126 (name_match_type_from_name): New.
1127 (ada_lookup_simple_minsym): Use lookup_name_info and the
1128 language's symbol_name_matcher_ftype.
1129 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1130 (ada_add_block_renamings): Adjust to use lookup_name_info.
1131 (ada_lookup_name): New.
1132 (add_nonlocal_symbols, ada_add_all_symbols)
1133 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1134 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1135 (ada_name_for_lookup): Delete.
1136 (ada_lookup_encoded_symbol): Construct a verbatim name.
1137 (wild_match): Reverse sense of return type. Use bool.
1138 (full_match): Reverse sense of return type. Inline bits of old
1139 match_name here.
1140 (ada_add_block_symbols): Adjust to use lookup_name_info.
1141 (symbol_completion_match): Delete, folded into...
1142 (ada_lookup_name_info::matches): ... .this new method.
1143 (symbol_completion_add): Delete.
1144 (ada_collect_symbol_completion_matches): Add name_match_type
1145 parameter. Adjust to use lookup_name_info and
1146 completion_list_add_name.
1147 (get_var_value, ada_add_global_exceptions): Adjust to use
1148 lookup_name_info.
1149 (ada_get_symbol_name_cmp): Delete.
1150 (do_wild_match, do_full_match): New functions.
1151 (ada_lookup_name_info::ada_lookup_name_info): New method.
1152 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1153 functions.
1154 (ada_language_defn): Install ada_get_symbol_name_matcher.
1155 * ada-lex.l (processId): If name starts with '<', copy it
1156 verbatim.
1157 * block.c (block_iter_match_step, block_iter_match_first)
1158 (block_iter_match_next, block_lookup_symbol)
1159 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1160 lookup_name_info.
1161 * block.h (block_iter_match_first, block_iter_match_next)
1162 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1163 * c-lang.c (c_language_defn, cplus_language_defn)
1164 (asm_language_defn, minimal_language_defn): Adjust comments to
1165 refer to la_get_symbol_name_matcher.
1166 * completer.c (complete_files_symbols)
1167 (collect_explicit_location_matches, symbol_completer): Pass a
1168 symbol_name_match_type down.
1169 * completer.h (class completion_match, completion_match_result):
1170 New classes.
1171 (completion_tracker::reset_completion_match_result): New method.
1172 (completion_tracker::m_completion_match_result): New field.
1173 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1174 lookup_name_info.
1175 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1176 functions.
1177 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1178 * d-lang.c: Adjust comments to refer to
1179 la_get_symbol_name_matcher.
1180 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1181 Adjust to use lookup_name_info.
1182 (dict_iter_match_first, dict_iter_match_next)
1183 (iter_match_first_hashed, iter_match_next_hashed)
1184 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1185 with a lookup_name_info.
1186 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1187 Likewise.
1188 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1189 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1190 (gdb_index_symbol_name_matcher): New class.
1191 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1192 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1193 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1194 with a symbol_name_match_type.
1195 (f_language_defn): Adjust comments to refer to
1196 la_get_symbol_name_matcher.
1197 * go-lang.c (go_language_defn): Adjust comments to refer to
1198 la_get_symbol_name_matcher.
1199 * language.c (default_symbol_name_matcher)
1200 (language_get_symbol_name_matcher): New functions.
1201 (unknown_language_defn, auto_language_defn): Adjust comments to
1202 refer to la_get_symbol_name_matcher.
1203 * language.h (symbol_name_cmp_ftype): Delete.
1204 (language_defn) <la_collect_symbol_completion_matches>: Add match
1205 type parameter.
1206 <la_get_symbol_name_cmp>: Delete field.
1207 <la_get_symbol_name_matcher>: New field.
1208 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1209 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1210 Declare.
1211 * linespec.c (iterate_over_all_matching_symtabs)
1212 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1213 (find_methods): Add language parameter, and use lookup_name_info
1214 and the language's symbol_name_matcher_ftype.
1215 (linespec_complete_function): Adjust.
1216 (lookup_prefix_sym): Use lookup_name_info.
1217 (add_all_symbol_names_from_pspace): Adjust.
1218 (find_superclass_methods): Add language parameter and pass it
1219 down.
1220 (find_method): Pass symbol language down.
1221 (find_linespec_symbols): Don't demangle or Ada encode here.
1222 (search_minsyms_for_name): Add lookup_name_info parameter.
1223 (add_matching_symbols_to_info): Add name_match_type parameter.
1224 Use lookup_name_info.
1225 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1226 la_get_symbol_name_matcher.
1227 * minsyms.c: Include <algorithm>.
1228 (add_minsym_to_demangled_hash_table): Remove table parameter and
1229 add objfile parameter. Use search_name_hash, and add language to
1230 demangled languages vector.
1231 (struct found_minimal_symbols): New struct.
1232 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1233 New functions.
1234 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1235 input names here. Use lookup_name_info instead. Lookup up
1236 demangled names once for each language in the demangled names
1237 vector.
1238 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1239 demangled names once for each language in the demangled names
1240 vector.
1241 (build_minimal_symbol_hash_tables): Adjust.
1242 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1243 lookup_name_info.
1244 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1245 la_get_symbol_name_matcher.
1246 * objfiles.h: Include <vector>.
1247 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1248 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1249 la_get_symbol_name_matcher.
1250 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1251 la_get_symbol_name_matcher.
1252 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1253 (match_partial_symbol): Use symbol_name_match_type,
1254 lookup_name_info and psymbol_name_matches.
1255 (lookup_partial_symbol): Use lookup_name_info.
1256 (map_block): Use symbol_name_match_type and lookup_name_info.
1257 (psym_map_matching_symbols): Use symbol_name_match_type.
1258 (psymbol_name_matches): New.
1259 (recursively_search_psymtabs): Use lookup_name_info and
1260 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1261 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1262 'kind' parameter to 'domain'.
1263 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1264 la_get_symbol_name_matcher.
1265 * symfile-debug.c (debug_qf_map_matching_symbols)
1266 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1267 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1268 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1269 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1270 Adjust to use symbol_name_match_type.
1271 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1272 (expand_symtabs_matching): Adjust to use lookup_name_info.
1273 * symmisc.c (maintenance_expand_symtabs): Use
1274 lookup_name_info::match_any ().
1275 * symtab.c (symbol_matches_search_name): New.
1276 (eq_symbol_entry): Adjust to use lookup_name_info and the
1277 language's matcher.
1278 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1279 (lookup_name_info::match_any): New.
1280 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1281 (compare_symbol_name): Add language, lookup_name_info and
1282 completion_match_result parameters, and use them.
1283 (completion_list_add_name): Make extern. Add language and
1284 lookup_name_info parameters. Use them.
1285 (completion_list_add_symbol, completion_list_add_msymbol)
1286 (completion_list_objc_symbol): Add lookup_name_info parameters and
1287 adjust. Pass down language.
1288 (completion_list_add_fields): Add lookup_name_info parameters and
1289 adjust. Pass down language.
1290 (add_symtab_completions): Add lookup_name_info parameters and
1291 adjust.
1292 (default_collect_symbol_completion_matches_break_on): Add
1293 name_match_type parameter, and use it. Use lookup_name_info.
1294 (default_collect_symbol_completion_matches)
1295 (collect_symbol_completion_matches): Add name_match_type
1296 parameter, and pass it down.
1297 (collect_symbol_completion_matches_type): Adjust.
1298 (collect_file_symbol_completion_matches): Add name_match_type
1299 parameter, and use lookup_name_info.
1300 * symtab.h: Include <string> and "common/gdb_optional.h".
1301 (enum class symbol_name_match_type): New.
1302 (class ada_lookup_name_info): New.
1303 (struct demangle_for_lookup_info): New.
1304 (class lookup_name_info): New.
1305 (symbol_name_matcher_ftype): New.
1306 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1307 (symbol_matches_search_name): Declare.
1308 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1309 (default_collect_symbol_completion_matches)
1310 (collect_symbol_completion_matches)
1311 (collect_file_symbol_completion_matches): Add name_match_type
1312 parameter.
1313 (iterate_over_symbols): Use lookup_name_info.
1314 (completion_list_add_name): Declare.
1315 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1316 (strncmp_iw_with_mode): Now extern.
1317 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1318 (strncmp_iw_with_mode): Declare.
1319
5ffa0793
PA
13202017-11-08 Keith Seitz <keiths@redhat.com>
1321 Pedro Alves <palves@redhat.com>
1322
1323 * ada-lang.c (ada_language_defn): Install
1324 default_search_name_hash.
1325 * buildsym.c (struct buildsym_compunit): <language>: New field.
1326 (finish_block_internal): Pass language when creating dictionaries.
1327 (start_buildsym_compunit, start_symtab): New language parameters.
1328 Use them.
1329 (restart_symtab): Pass down compilation unit's language.
1330 * buildsym.h (enum language): Forward declare.
1331 (start_symtab): New 'language' parameter.
1332 * c-lang.c (c_language_defn, cplus_language_defn)
1333 (asm_language_defn, minimal_language_defn): Install
1334 default_search_name_hash.
1335 * coffread.c (coff_start_symtab): Adjust.
1336 * d-lang.c (d_language_defn): Install default_search_name_hash.
1337 * dbxread.c (struct symloc): Add 'pst_language' field.
1338 (PST_LANGUAGE): Define.
1339 (start_psymtab, read_ofile_symtab): Use it.
1340 (process_one_symbol): New 'language' parameter. Pass it down.
1341 * dictionary.c (struct dictionary) <language>: New field.
1342 (DICT_LANGUAGE): Define.
1343 (dict_create_hashed, dict_create_hashed_expandable)
1344 (dict_create_linear, dict_create_linear_expandable): New parameter
1345 'language'. Set the dictionary's language.
1346 (iter_match_first_hashed): Adjust to rename.
1347 (insert_symbol_hashed): Assert we don't see mismatching
1348 languages. Adjust to rename.
1349 (dict_hash): Rename to ...
1350 (default_search_name_hash): ... this and make extern.
1351 * dictionary.h (struct language_defn): Forward declare.
1352 (dict_create_hashed): New parameter 'language'.
1353 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1354 * f-lang.c (f_language_defn): Install default_search_name_hash.
1355 * go-lang.c (go_language_defn): Install default_search_name_hash.
1356 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1357 creation.
1358 * language.c (unknown_language_defn, auto_language_defn):
1359 * language.h (language_defn::la_search_name_hash): New field.
1360 (default_search_name_hash): Declare.
1361 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1362 * mdebugread.c (new_block): New parameter 'language'.
1363 * mdebugread.c (parse_symbol): Pass symbol language to block
1364 allocation.
1365 (psymtab_to_symtab_1): Pass down language.
1366 (new_symtab): Pass compunit's language to block allocation.
1367 * objc-lang.c (objc_language_defn): Install
1368 default_search_name_hash.
1369 * opencl-lang.c (opencl_language_defn):
1370 * p-lang.c (pascal_language_defn): Install
1371 default_search_name_hash.
1372 * rust-lang.c (rust_language_defn): Install
1373 default_search_name_hash.
1374 * stabsread.h (enum language): Forward declare.
1375 (process_one_symbol): Add 'language' parameter.
1376 * symtab.c (search_name_hash): New function.
1377 * symtab.h (search_name_hash): Declare.
1378 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1379
2a1dde5d
PA
13802017-11-08 Pedro Alves <palves@redhat.com>
1381
1382 * cp-name-parser.y (main): Don't initialize extra_chars.
1383
95a6b0a1
TT
13842017-11-07 Tom Tromey <tom@tromey.com>
1385
1386 * event-top.h (command_handler): Constify.
1387 * record-full.c (cmd_record_full_start): Update.
1388 * thread.c (thread_apply_all_command): Update.
1389 * printcmd.c (eval_command): Update.
1390 * mi/mi-main.c (mi_execute_cli_command): Update.
1391 (mi_execute_async_cli_command): Update.
1392 * tui/tui-stack.c (tui_update_command): Update.
1393 * cli/cli-interp.c (safe_execute_command): Constify.
1394 * record.c (record_start): Update.
1395 (record_start, record_stop, cmd_record_start): Update.
1396 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1397 (cmd_record_btrace_pt_start): Update.
1398 (cmd_record_btrace_start): Update.
1399 (cmd_record_btrace_start): Update.
1400 * reverse.c (exec_reverse_once): Update.
1401 * python/python.c (execute_gdb_command): Don't copy the command.
1402 * event-top.c (command_line_handler): Update.
1403 (command_handler): Constify.
1404 * defs.h (deprecated_call_command_hook): Constify.
1405 * cli/cli-script.h (execute_user_command): Constify.
1406 * cli/cli-script.c (execute_user_command): Constify.
1407 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1408 (enum command_control_type): Update.
1409 * main.c (catch_command_errors): Remove non-const overload.
1410 (catch_command_errors_ftype): Remove.
1411 * python/py-cmd.c (cmdpy_function): Constify.
1412 * guile/scm-cmd.c (cmdscm_function): Constify.
1413 * cli/cli-dump.c (call_dump_func): Constify.
1414 * cli/cli-decode.c (do_const_cfunc): Constify.
1415 (do_sfunc): Constify.
1416 (cmd_func): Constify.
1417 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1418 * top.h (execute_command): Constify.
1419 * top.c (execute_command): Constify.
1420 (execute_command_to_string): Constify.
1421 (deprecated_call_command_hook): Constify.
1422 * command.h (cmd_func): Constify.
1423 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1424
eb4c3f4a
TT
14252017-11-07 Tom Tromey <tom@tromey.com>
1426
1427 * ada-lang.c (catch_ada_exception_command): Constify.
1428 (catch_assert_command): Constify.
1429 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1430 (catch_rethrow_command): Constify.
1431 (catch_exception_command_1): Constify.
1432 * breakpoint.h (add_catch_command): Constify.
1433 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1434 (catch_syscall_split_args): Constify.
1435 * break-catch-sig.c (catch_signal_command): Constify.
1436 (catch_signal_split_args): Constify.
1437 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1438 cmd_const_sfunc_ftype.
1439 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1440 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1441 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1442 (add_setshow_string_cmd, struct cmd_list_element)
1443 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1444 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1445 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1446 Constify.
1447 (set_cmd_sfunc): Constify.
1448 (empty_sfunc): Constify.
1449 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1450 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1451 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1452 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1453 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1454 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1455 Constify.
1456 (set_cmd_sfunc): Constify.
1457 (cmd_sfunc_ftype): Remove.
1458 * compile/compile.c (set_compile_args): Constify.
1459 * infrun.c (set_disable_randomization): Constify.
1460 * infcmd.c (set_args_command, set_cwd_command): Constify.
1461 * breakpoint.c (set_condition_evaluation_mode): Constify.
1462 (add_catch_command): Constify.
1463 (catch_fork_command_1, catch_exec_command_1)
1464 (catch_load_command_1, catch_unload_command_1): Constify.
1465 (catch_load_or_unload): Constify.
1466 * guile/scm-param.c (pascm_set_func): Constify.
1467 (add_setshow_generic): Constify.
1468 * python/py-param.c (get_set_value): Constify.
1469 * top.h (set_verbose): Constify.
1470 * tui/tui-win.c (tui_set_var_cmd): Constify.
1471 * mi/mi-main.c (set_mi_async_command): Constify.
1472 * cli/cli-logging.c (set_logging_overwrite)
1473 (set_logging_redirect): Constify.
1474 * value.c (set_max_value_size): Constify.
1475 * valprint.c (set_input_radix, set_output_radix): Constify.
1476 * utils.c (set_width_command, set_height_command): Constify.
1477 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1478 * tracepoint.c (set_disconnected_tracing)
1479 (set_circular_trace_buffer, set_trace_buffer_size)
1480 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1481 * top.c (set_history_size_command, set_verbose, set_editing)
1482 (set_gdb_datadir, set_history_filename): Constify.
1483 * target.c (set_targetdebug, maint_set_target_async_command)
1484 (maint_set_target_non_stop_command, set_target_permissions)
1485 (set_write_memory_permission): Constify.
1486 (open_target): Constify.
1487 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1488 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1489 * symtab.c (set_symbol_cache_size_handler): Constify.
1490 * symfile.c (set_ext_lang_command): Constify.
1491 * symfile-debug.c (set_debug_symfile): Constify.
1492 * source.c (set_directories_command): Constify.
1493 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1494 * serial.c (set_parity): Constify.
1495 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1496 * remote.c (set_remote_exec_file, set_remotebreak)
1497 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1498 * record.c (set_record_insn_history_size)
1499 (set_record_call_history_size): Constify.
1500 * record-full.c (set_record_full_insn_max_num): Constify.
1501 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1502 * osabi.c (set_osabi): Constify.
1503 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1504 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1505 * maint.c (maintenance_set_profile_cmd): Constify.
1506 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1507 * language.c (set_language_command, set_range_command)
1508 (set_case_command): Constify.
1509 * infrun.c (set_non_stop, set_observer_mode)
1510 (set_stop_on_solib_events, set_schedlock_func)
1511 (set_exec_direction_func): Constify.
1512 * infcmd.c (set_inferior_tty_command): Constify.
1513 * disasm.c (set_disassembler_options_sfunc): Constify.
1514 * demangle.c (set_demangling_command): Constify.
1515 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1516 * cris-tdep.c (set_cris_version, set_cris_mode)
1517 (set_cris_dwarf2_cfi): Constify.
1518 * corefile.c (set_gnutarget_command): Constify.
1519 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1520 (set_target_wide_charset_sfunc): Constify.
1521 * breakpoint.c (update_dprintf_commands): Constify.
1522 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1523 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1524 (set_disassembly_style_sfunc): Constify.
1525 * arch-utils.c (set_endian, set_architecture): Constify.
1526 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1527 * agent.c (set_can_use_agent): Constify.
1528
5fed81ff
TT
15292017-11-07 Tom Tromey <tom@tromey.com>
1530
1531 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1532 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1533 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1534 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1535 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1536 (parse_int_arg, show_thread_default_detach_sc_cmd)
1537 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1538 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1539 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1540 (show_task_pause_cmd, set_task_detach_sc_cmd)
1541 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1542 (set_noninvasive_cmd, set_thread_pause_cmd)
1543 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1544 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1545 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1546 * windows-nat.c (display_selectors): Constify.
1547 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1548 non-const "cfunc".
1549 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1550 (cmd_cfunc_eq): Likewise.
1551 (struct cmd_list_element): Likewise.
1552 (do_cfunc): Remove.
1553 (cli_user_command_p): Update.
1554 * command.h (add_cmd): Remove non-const overload.
1555 (cmd_cfunc_ftype): Remove typedef.
1556 (cmd_cfunc_eq): Remove non-const overload.
1557 * value.c (show_values): Constify.
1558 * thread.c (thread_apply_all_command): Constify.
1559 * symfile.c (load_command): Constify.
1560 * source.c (directory_command): Constify.
1561 * maint.c (maintenance_internal_error)
1562 (maintenance_demangler_warning, maintenance_space_display)
1563 (maintenance_print_architecture, maintenance_translate_address)
1564 (maintenance_info_selftests, maintenance_internal_warning):
1565 Constify.
1566 * breakpoint.c (disable_trace_command, enable_trace_command):
1567 Constify.
1568 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1569 Constify.
1570 (add_auto_load_safe_path): Constify.
1571 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1572 * top.h (show_commands): Constify.
1573 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1574 * sparc64-tdep.c (adi_examine_command): Constify.
1575 (adi_assign_command): Constify.
1576
1d12d88f
TT
15772017-11-07 Tom Tromey <tom@tromey.com>
1578
1579 * frame.h (info_locals_command, info_args_command): Constify.
1580 * auto-load.h (auto_load_info_scripts): Constify.
1581 * inferior.h (registers_info): Constify.
1582 * copying.c: Rebuild.
1583 * copying.awk: Constify generated commands.
1584 * auto-load.c (auto_load_info_scripts)
1585 (info_auto_load_gdb_scripts): Constify.
1586 * cli/cli-decode.c (struct cmd_list_element): Take a
1587 cmd_const_cfunc_ftype.
1588 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1589 * tui/tui-win.c (tui_all_windows_info): Constify.
1590 * python/py-auto-load.c (info_auto_load_python_scripts):
1591 Constify.
1592 * cli/cli-cmds.c (show_command): Remove non-const overload.
1593 * tracepoint.c (info_tvariables_command, info_scope_command):
1594 Constify.
1595 (info_static_tracepoint_markers_command): Constify.
1596 * thread.c (info_threads_command): Constify.
1597 (print_thread_info_1): Constify.
1598 * target.c (info_target_command): Constify.
1599 * symtab.c (info_sources_command, info_functions_command)
1600 (info_types_command): Constify.
1601 (info_variables_command): Remove non-const overload.
1602 * symfile.c (info_ext_lang_command): Constify.
1603 * stack.c (info_frame_command, info_locals_command)
1604 (info_args_command): Constify.
1605 (backtrace_command): Remove non-const overload.
1606 * source.c (info_source_command, info_line_command): Constify.
1607 * solib.c (info_sharedlibrary_command): Constify.
1608 * skip.c (info_skip_command): Constify.
1609 * ser-go32.c (info_serial_command): Constify.
1610 * reverse.c (info_bookmarks_command): Constify.
1611 * printcmd.c (info_symbol_command, info_address_command)
1612 (info_display_command): Constify.
1613 * osdata.c (info_osdata_command): Constify.
1614 * objc-lang.c (info_selectors_command, info_classes_command):
1615 Constify.
1616 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1617 * memattr.c (info_mem_command): Constify.
1618 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1619 * linux-fork.c (info_checkpoints_command): Constify.
1620 * infrun.c (info_signals_command): Constify.
1621 * inflow.c (info_terminal_command): Constify.
1622 * inferior.c (info_inferiors_command): Constify.
1623 (print_inferior): Constify.
1624 * infcmd.c (info_program_command, info_all_registers_command)
1625 (info_registers_command, info_vector_command)
1626 (info_float_command): Constify.
1627 (registers_info): Constify.
1628 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1629 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1630 Constify.
1631 * f-valprint.c (info_common_command): Constify.
1632 * dcache.c (info_dcache_command): Constify.
1633 (dcache_info_1): Constify.
1634 * darwin-nat-info.c (info_mach_tasks_command)
1635 (info_mach_task_command, info_mach_ports_command)
1636 (info_mach_port_command, info_mach_threads_command)
1637 (info_mach_thread_command, info_mach_regions_command)
1638 (info_mach_regions_recurse_command, info_mach_region_command)
1639 (info_mach_exceptions_command): Constify.
1640 (get_task_from_args): Constify.
1641 * cp-support.c (info_vtbl_command): Constify.
1642 * breakpoint.c (info_watchpoints_command)
1643 (info_tracepoints_command): Constify.
1644 (info_breakpoints_command): Remove non-const overload.
1645 * avr-tdep.c (avr_io_reg_read_command): Constify.
1646 * auxv.c (info_auxv_command): Constify.
1647 * ada-tasks.c (info_tasks_command): Constify.
1648 (info_task): Constify.
1649 * ada-lang.c (info_exceptions_command): Constify.
1650
0b39b52e
TT
16512017-11-07 Tom Tromey <tom@tromey.com>
1652
1653 * solib.h (no_shared_libraries): Constify.
1654 * frame.h (return_command): Constify.
1655 * cli/cli-cmds.h (quit_command): Constify.
1656 * top.h (quit_command, execute_command): Constify.
1657 * target.h (flash_erase_command): Constify.
1658 * inferior.h (set_inferior_args, attach_command): Constify.
1659 * tracepoint.h (start_tracing, stop_tracing): Constify.
1660 * breakpoint.h (break_command, tbreak_command)
1661 (hbreak_command_wrapper, thbreak_command_wrapper)
1662 (rbreak_command_wrapper, watch_command_wrapper)
1663 (awatch_command_wrapper, rwatch_command_wrapper)
1664 (get_tracepoint_by_number): Constify.
1665 * symtab.c (info_variables_command, rbreak_command)
1666 (symtab_symbol_info): Constify.
1667 (info_variables_command): Add non-const overload.
1668 * top.c (dont_repeat_command): Constify.
1669 * breakpoint.c (ignore_command, commands_command)
1670 (condition_command, tbreak_command, hbreak_command)
1671 (thbreak_command, clear_command, break_command)
1672 (info_breakpoints_command, watch_command, rwatch_command)
1673 (awatch_command, trace_command, ftrace_command, strace_command)
1674 (trace_pass_command, break_range_command, dprintf_command)
1675 (agent_printf_command, get_tracepoint_by_number)
1676 (watch_maybe_just_location, trace_pass_command): Constify.
1677 (info_breakpoints_command): Add non-const overload.
1678 * tracefile.c (tsave_command): Constify.
1679 * infcmd.c (attach_command, disconnect_command, signal_command)
1680 (queue_signal_command, stepi_command, nexti_command)
1681 (finish_command, next_command, step_command, until_command)
1682 (advance_command, jump_command, continue_command, run_command)
1683 (start_command, starti_command, interrupt_command)
1684 (run_command_1, set_inferior_args, step_1): Constify.
1685 * inferior.c (add_inferior_command, remove_inferior_command)
1686 (clone_inferior_command): Constify.
1687 * linux-fork.c (checkpoint_command, restart_command): Constify.
1688 * windows-nat.c (signal_event_command): Constify.
1689 * guile/guile.c (guile_repl_command, guile_command): Constify.
1690 * printcmd.c (x_command, display_command, printf_command)
1691 (output_command, set_command, call_command, print_command)
1692 (eval_command): Constify.
1693 (non_const_set_command): Remove.
1694 (_initialize_printcmd): Update.
1695 * source.c (forward_search_command, reverse_search_command):
1696 Constify.
1697 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1698 Constify.
1699 * infrun.c (handle_command): Constify.
1700 * memattr.c (mem_command): Constify.
1701 * stack.c (return_command, up_command, up_silently_command)
1702 (down_command, down_silently_command, frame_command)
1703 (backtrace_command, func_command, backtrace_command_1): Constify.
1704 (backtrace_command): Add non-const overload.
1705 * remote-sim.c (simulator_command): Constify.
1706 * exec.c (set_section_command): Constify.
1707 * tracepoint.c (tdump_command, trace_variable_command)
1708 (tstatus_command, tstop_command, tstart_command)
1709 (end_actions_pseudocommand, while_stepping_pseudocommand)
1710 (collect_pseudocommand, teval_pseudocommand, actions_command)
1711 (start_tracing, stop_tracing): Constify.
1712 * value.c (init_if_undefined_command): Constify.
1713 * tui/tui-stack.c (tui_update_command): Constify.
1714 * tui/tui-win.c (tui_refresh_all_command)
1715 (tui_set_tab_width_command, tui_set_win_height_command)
1716 (tui_set_focus_command, tui_scroll_forward_command)
1717 (tui_scroll_backward_command, tui_scroll_left_command)
1718 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1719 (tui_set_win_height): Constify.
1720 * tui/tui-layout.c (tui_layout_command): Constify.
1721 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1722 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1723 (proc_untrace_sysexit_cmd): Constify.
1724 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1725 (threadset_test_cmd, threadlist_update_test_cmd)
1726 (threadalive_test): Constify.
1727 * objc-lang.c (print_object_command): Constify.
1728 * command.h (add_com): Constify.
1729 * cli/cli-dump.c (restore_command): Constify.
1730 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1731 (help_command, complete_command, shell_command, edit_command)
1732 (list_command, disassemble_command, make_command)
1733 (apropos_command, alias_command): Constify.
1734 * cli/cli-script.c (document_command, define_command)
1735 (while_command, if_command, validate_comname): Constify.
1736 * cli/cli-decode.c (struct cmd_list_element): Change type of
1737 "fun".
1738 * target.c (do_monitor_command, flash_erase_command): Constify.
1739 * regcache.c (reg_flush_command): Constify.
1740 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1741 (reverse_nexti, reverse_continue, reverse_finish)
1742 (save_bookmark_command, goto_bookmark_command)
1743 (exec_reverse_once): Constify.
1744 * python/python.c (python_interactive_command, python_command):
1745 Constify.
1746 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1747 Constify.
1748 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1749 * gcore.c (gcore_command): Constify.
1750
85c4be7c
TT
17512017-11-07 Tom Tromey <tom@tromey.com>
1752
1753 * printcmd.c (x_command): Call set_repeat_arguments.
1754 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1755 * top.c (repeat_arguments): New global.
1756 (set_repeat_arguments): New function.
1757 (execute_command): Handle repeat_arguments.
1758 (show_commands): Calls set_repeat_arguments.
1759 * command.h (set_repeat_arguments): Declare.
1760
022643b4
TT
17612017-11-07 Tom Tromey <tom@tromey.com>
1762
1763 * stack.c (backtrace_command): Use std::string.
1764 (backtrace_command_1): Make "count_exp" const.
1765
5614fb77
TT
17662017-11-07 Tom Tromey <tom@tromey.com>
1767
1768 * source.c (directory_switch, mod_path, add_path): Constify.
1769 * defs.h (add_path, mod_path, directory_switch): Constify.
1770 * mi/mi-cmd-env.c (env_mod_path): Constify.
1771
6be9a197
TT
17722017-11-07 Tom Tromey <tom@tromey.com>
1773
1774 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1775 (run_command_1, continue_command, step_1, jump_command)
1776 (signal_command, until_command, advance_command, finish_command)
1777 (attach_command): Update.
1778
c2252c0d
TT
17792017-11-07 Tom Tromey <tom@tromey.com>
1780
1781 * command.h (set_cmd_cfunc): Don't declare.
1782 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1783
1ee870c5
TT
17842017-11-07 Tom Tromey <tom@tromey.com>
1785
1786 * stack.c (select_frame_command): Constify.
1787 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1788 * command.h (add_com_suppress_notification): Constify.
1789
ee7ddd71
TT
17902017-11-07 Tom Tromey <tom@tromey.com>
1791
1792 * breakpoint.c (stop_command): Constify.
1793 * cli/cli-decode.c (struct cmd_list_element): Constify.
1794 * command.h (add_abbrev_prefix_cmd): Constify.
1795
95e95a6d
PA
17962017-11-07 Pedro Alves <palves@redhat.com>
1797
1798 * breakpoint.c (extract_bp_kind): New enum.
1799 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1800 factored out from ...
1801 (extract_bp_number_and_location): ... here.
1802 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1803
cc638e86
PA
18042017-11-07 Pedro Alves <palves@redhat.com>
1805
1806 * breakpoint.c (extract_bp_number_and_location): Change return
1807 type to void. Throw error instead of warning.
1808 (enable_disable_command): Adjust.
1809
d0fe4701
XR
18102017-11-07 Xavier Roirand <roirand@adacore.com>
1811 Pedro Alves <palves@redhat.com>
1812
1813 * breakpoint.c (map_breakpoint_number_range): New, factored out
1814 from ...
1815 (map_breakpoint_numbers): ... here.
1816 (find_location_by_number): Change parameters from string to
1817 breakpoint number and location.
1818 (extract_bp_number_and_location): New function.
1819 (enable_disable_bp_num_loc)
1820 (enable_disable_breakpoint_location_range)
1821 (enable_disable_command): New functions, factored out ...
1822 (enable_command, disable_command): ... these functions, and
1823 adjusted to support ranges.
1824 * NEWS: Document enable/disable breakpoint location range feature.
1825
635dc5b2
LM
18262017-11-06 Luis Machado <luis.machado@linaro.org>
1827
1828 * MAINTAINERS (Write After Approval): Update my e-mail address.
1829
556e5da5
PA
18302017-11-06 Pedro Alves <palves@redhat.com>
1831
1832 * gnu-nat.c (gnu_terminal_init): Delete.
1833 (gnu_target): Don't install gnu_terminal_init.
1834 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1835 (child_terminal_init): ... this function.
1836
d1928160
PA
18372017-11-06 Pedro Alves <palves@redhat.com>
1838
1839 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1840 sgtty.h.
1841 * config.in, configure: Regenerate.
1842
6aa899ce
PA
18432017-11-06 Pedro Alves <palves@redhat.com>
1844
1845 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1846 (async_init_signals): Adjust.
1847 (handle_stop_sig): Rename to ...
1848 (handle_sigtstp): ... this.
1849 (async_stop_sig): Rename to ...
1850 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1851 SIGTSTP path.
1852 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1853 instead of STOP_SIGNAL thoughout.
1854 (handle_stop_sig): Rename to ...
1855 (handle_sigtstp): ... this.
1856 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1857
a94799ac
PA
18582017-11-06 Pedro Alves <palves@redhat.com>
1859
1860 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1861 longer set flags twice in row.
1862
726e1356
PA
18632017-11-06 Pedro Alves <palves@redhat.com>
1864
1865 * Makefile.in (SER_HARDWIRE): Update comment.
1866 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1867 * common/gdb_termios.h: Delete file.
1868 * common/job-control.c: Include termios.h and unistd.h instead of
1869 gdb_termios.h.
1870 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1871 check.
1872 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1873 Remove sgtty code.
1874 * configure.ac: No longer check for termio.h and sgtty.h.
1875 * configure: Regenerate.
1876 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1877 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1878 Replace PROCESS_GROUP_TYPE references with pid_t references
1879 throughout.
1880 (gdb_getpgrp): Delete.
1881 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1882 (child_terminal_inferior): Remove comment. Remove sgtty code.
1883 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1884 gdb_getpgrp. Use serial_set_tty_state instead aof
1885 serial_noflush_set_tty_state. Remove sgtty code.
1886 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1887 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1888 (inferior_process_group): Now returns pid_t.
1889 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1890 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1891 * ser-event.c (serial_event_ops): Update.
1892 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1893 (dos_ops): Update.
1894 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1895 * ser-pipe.c (pipe_ops): Update.
1896 * ser-tcp.c (tcp_ops): Update.
1897 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1898 HAVE_TERMIOS checks.
1899 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1900 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1901 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1902 assume termios.
1903 (hardwire_noflush_set_tty_state): Delete.
1904 (hardwire_print_tty_state, hardwire_drain_output)
1905 (hardwire_flush_output, hardwire_flush_input)
1906 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1907 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1908 code, and assume termios.
1909 (hardwire_ops): Update.
1910 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1911 * serial.c (serial_noflush_set_tty_state): Delete.
1912 * serial.h (serial_noflush_set_tty_state): Delete.
1913 (serial_ops::noflush_set_tty_state): Delete.
1914
1cfb73db
UW
19152017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1916
1917 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1918 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1919 (COMMON_OBS): Remove doublest.o and dfp.o.
1920 Do not build target-float.c (instead of doublest.c)
1921 with -Wformat-nonliteral.
1922
1923 * doublest.c: Remove file.
1924 * doublest.h: Remove file.
1925 * dfp.c: Remove file.
1926 * dfp.h: Remove file.
1927
1928 * target-float.c: Do not include "doublest.h" and "dfp.h".
1929 (DOUBLEST): Move here from doublest.h.
1930 (enum float_kind): Likewise.
1931 (FLOATFORMAT_CHAR_BIT): Likewise.
1932 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1933 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1934 (floatformat_precision): Likewise.
1935 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1936 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1937 Likewise.
1938 (host_float_format, host_double_format, host_long_double_format):
1939 Likewise.
1940 (floatformat_to_string, floatformat_from_string): Likewise.
1941 (floatformat_to_doublest): Likewise. Also, inline the original
1942 convert_floatformat_to_doublest.
1943 (floatformat_from_doublest): Likewise. Also, inline the original
1944 convert_floatformat_from_doublest.
1945
1946 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1947 (MAX_DECIMAL_STRING): Move here from dfp.c.
1948 (match_endianness): Likewise.
1949 (set_decnumber_context, decimal_check_errors): Likewise.
1950 (decimal_from_number, decimal_to_number): Likewise.
1951 (decimal_to_string, decimal_from_string): Likewise. Make static.
1952 (decimal_from_longest, decimal_from_ulongest): Likewise.
1953 (decimal_to_longest): Likewise.
1954 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1955 (decimal_convert): Likewise.
1956
b07e9c46
UW
19572017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1958
1959 * doublest.c: Do not include "gdbtypes.h".
1960 (extract_typed_floating): Remove.
1961 (store_typed_floating): Remove.
1962 (convert_typed_floating): Remove.
1963 * doublest.h (struct type): Remove.
1964 (DOUBLEST_PRINT_FORMAT): Remove.
1965 (DOUBLEST_SCAN_FORMAT): Remove.
1966 (extract_typed_floating): Remove.
1967 (store_typed_floating): Remove.
1968 (convert_typed_floating): Remove.
1969
1970 * dfp.c (decimal_from_doublest): Remove.
1971 (decimal_to_doublest): Remove.
1972 * dfp.h: Do not include "doublest.h".
1973 (decimal_from_doublest): Remove.
1974 (decimal_to_doublest): Remove.
1975
1976 * value.c: Do not include "doublest.h" and "dfp.h".
1977 (value_as_double): Remove.
1978 (unpack_double): Remove.
1979 (value_from_double): Remove.
1980 (value_from_decfloat): Remove.
1981 * value.h: Do not include "doublest.h".
1982 (value_as_double): Remove.
1983 (unpack_double): Remove.
1984 (value_from_double): Remove.
1985 (value_from_decfloat): Remove.
1986
3b2ca824
UW
19872017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1988
1989 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1990 (i386_extract_return_value): Use target_float_convert.
1991 (i386_store_return_value): Likewise.
1992 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1993 (i387_value_to_register): Likewise.
1994 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1995 (ia64_register_to_value): Use target_float_convert.
1996 (ia64_value_to_register): Likewise.
1997 (ia64_extract_return_value): Likewise.
1998 (ia64_store_return_value): Likewise.
1999 (ia64_push_dummy_call): Likewise.
2000 * m68k-tdep.c: Include "target-float.h".
2001 (m68k_register_to_value): Use target_float_convert.
2002 (m68k_value_to_register): Likewise.
2003 (m68k_svr4_extract_return_value): Likewise.
2004 (m68k_svr4_store_return_value): Likewise.
2005 * ppc-sysv-tdep.c: Include "target-float.h".
2006 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2007 (do_ppc_sysv_return_value): Likewise.
2008 (ppc64_sysv_abi_push_freg): Likewise.
2009 (ppc64_sysv_abi_return_value_base): Likewise.
2010 * rs6000-aix-tdep.c: Include "target-float.h".
2011 (rs6000_push_dummy_call): Use target_float_convert.
2012 (rs6000_return_value): Likewise.
2013 * rs6000-lynx178-tdep.c: Include "target-float.h".
2014 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2015 (rs6000_lynx178_return_value): Likewise.
2016 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2017 (rs6000_register_to_value): Use target_float_convert.
2018 (rs6000_value_to_register): Likewise.
2019 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2020 (arm_extract_return_value): Use target_float_convert.
2021 (arm_store_return_value): Likewise.
2022 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2023 (sh_register_convert_to_virtual): Use target_float_convert.
2024 (sh_register_convert_to_raw): Likewise.
2025 * sh64-tdep.c: Include "target-float.h".
2026 (sh64_extract_return_value): Use target_float_convert.
2027 (sh64_register_convert_to_virtual): Likewise.
2028 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2029
14ad9311
UW
20302017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2031
2032 * target-float.c (floatformat_to_host_double): New function.
2033 (floatformat_from_host_double): Likewise.
2034 (target_float_to_host_double): Likewise.
2035 (target_float_from_host_double): Likewise.
2036 * target-float.h (target_float_to_host_double): Add prototype.
2037 (target_float_from_host_double): Likewise.
2038
2039 * guile/scm-value.c: Include "target-float.h".
2040 (gdbscm_value_to_real): Use target_float_to_host_double.
2041 Handle integer source values via value_as_long.
2042 * guile/scm-math.c: Include "target-float.h". Do not include
2043 "doublest.h", "dfp.h", and "expression.h".
2044 (vlscm_convert_typed_number): Use target_float_from_host_double.
2045 (vlscm_convert_number): Likewise.
2046
2047 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2048 (convert_value_from_python): Use target_float_from_host_double.
2049
50eff16b
UW
20502017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2051
2052 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2053 (cast_from_fixed): Likewise.
2054 (ada_scaling_type): New function.
2055 (ada_delta): Return value instead of DOUBLEST. Perform target
2056 arithmetic instead of host arithmetic.
2057 (scaling_factor): Rename to ...
2058 (ada_scaling_factor) ... this. Make non-static. Return value instead
2059 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2060 (ada_fixed_to_float): Remove.
2061 (ada_float_to_fixed): Remove.
2062 * ada-lang.h (ada_fixed_to_float): Remove.
2063 (ada_float_to_fixed): Remove.
2064 (ada_delta): Return value instead of DOUBLEST.
2065 (ada_scaling_factor): Add prototype.
2066
2067 * ada-typeprint.c: Include "target-float.h".
2068 (print_fixed_point_type): Perform target arithmetic instead of
2069 host arithmetic.
2070 * ada-valprint.c: Include "target-float.h".
2071 (ada_val_print_num): Perform target arithmetic instead of
2072 host arithmetic for fixed-point types.
2073
66c02b9e
UW
20742017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2075
2076 * target-float.c: Include <math.h>.
2077 (floatformat_binop): New function.
2078 (floatformat_compare): Likewise.
2079 (target_float_binop): Likewise.
2080 (target_float_compare): Likewise.
2081 * target-float.h: Include "expression.h".
2082 (target_float_binop): Add prototype.
2083 (target_float_compare): Likewise.
2084
2085 * valarith.c: Do not include "doublest.h" and "dfp.h".
2086 Include "common/byte-vector.h".
2087 (value_args_as_decimal): Remove, replace by ...
2088 (value_args_as_target_float): ... this function. Handle both
2089 binary and decimal target floating-point formats.
2090 (scalar_binop): Handle both binary and decimal FP using
2091 value_args_as_target_float and target_float_binop.
2092 (value_equal): Handle both binary and decimal FP using
2093 value_args_as_target_float and target_float_compare.
2094 (value_less): Likewise.
2095 (value_pos): Handle all scalar types as simple copy.
2096 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2097 * dfp.c (decimal_binop): Throw error instead of internal_error
2098 when called with an unsupported operation code.
2099
f69fdf9b
UW
21002017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2101
2102 * target-float.c (target_float_to_string): New function.
2103 (target_float_from_string): New function.
2104 * target-float.h (target_float_to_string): Add prototype.
2105 (target_float_from_string): Add prototype.
2106
2107 * valprint.c: Include "target-float.h". Do not include
2108 "doublest.h" and "dfp.h".
2109 (print_floating): Use target_float_to_string.
2110 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2111 (printf_floating): Use target_float_to_string.
2112 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2113 (print_i387_value): Use target_float_to_string.
2114 * mips-tdep.c: Include "target-float.h".
2115 (mips_print_fp_register): Use target_float_to_string.
2116 * sh64-tdep.c: Include "target-float.h".
2117 (sh64_do_fp_register): Use target_float_to_string.
2118
2119 * parse.c: Include "target-float.h". Do not include
2120 "doublest.h" and "dfp.h".
2121 (parse_float): Use target_float_from_string.
2122 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2123 (define_symbol): Use target_float_from_string.
2124 * gdbarch-selftests.c: Include "target-float.h".
2125 (register_to_value_test): Use target_float_from_string.
2126
70100014
UW
21272017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2128
2129 * Makefile.c (SFILES): Add target-float.c.
2130 (HFILES_NO_SRCDIR): Add target-float.h.
2131 (COMMON_OBS): Add target-float.o.
2132 * target-float.h: New file.
2133 * target-float.c: New file.
2134
2135 * doublest.c (floatformat_classify): Fix detection of float_zero.
2136
2137 * gdbtypes.c (is_floating_type): New function.
2138 * gdbtypes.h (is_floating_type): Add prototype.
2139
2140 * value.c: Do not include "floatformat.h".
2141 (unpack_double): Use target_float_is_valid.
2142 (is_floating_value): New function.
2143 * value.h (is_floating_value): Add prototype-
2144
2145 * valarith.c: Include "target-float.h".
2146 (value_logical_not): Use target_float_is_zero.
2147
2148 * python/py-value.c: Include "target-float.h".
2149 (valpy_nonzero): Use target_float_is_zero.
2150
ab4b1c46
TT
21512017-11-04 Tom Tromey <tom@tromey.com>
2152
2153 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2154
454dafbd
TT
21552017-11-04 Tom Tromey <tom@tromey.com>
2156
2157 * breakpoint.c (set_momentary_breakpoint): Return
2158 breakpoint_up.
2159 (until_break_command): Update.
2160 (new_until_break_fsm): Change argument types to
2161 breakpoint_up.
2162 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2163 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2164 Remove.
2165 * infcmd.c (finish_forward): Update.
2166 * breakpoint.h (set_momentary_breakpoint)
2167 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2168 (make_cleanup_delete_breakpoint): Remove.
2169 (struct breakpoint_deleter): New.
2170 (breakpoint_up): New typedef.
2171 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2172 (insert_exception_resume_breakpoint): Update.
2173 (insert_exception_resume_from_probe): Update.
2174 (insert_longjmp_resume_breakpoint): Update.
2175 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2176 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2177 * infcall.c (call_function_by_hand_dummy): Update
2178
331b71e5
TT
21792017-11-04 Tom Tromey <tom@tromey.com>
2180
2181 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2182
9f584b37
TT
21832017-11-04 Tom Tromey <tom@tromey.com>
2184
2185 * linux-tdep.c (linux_core_info_proc_mappings): Use
2186 gdb::def_vector.
2187 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2188 "size" argument.
2189 (linux_corefile_thread): Update.
2190 (linux_make_corefile_notes): Remove unused variable.
2191
779bc38e
TT
21922017-11-04 Tom Tromey <tom@tromey.com>
2193
2194 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2195 gdb::byte_vector.
2196
ed2b3126
TT
21972017-11-04 Tom Tromey <tom@tromey.com>
2198
2199 * objfiles.c (do_free_objfile_cleanup): Remove.
2200 * compile/compile-object-load.c (compile_object_load): Update.
2201 * objfiles.h (make_cleanup_free_objfile): Remove.
2202
7f6743fd
TT
22032017-11-04 Tom Tromey <tom@tromey.com>
2204
2205 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2206 (adi_read_versions): Change "tags" to "gdb_byte *".
2207 (adi_print_versions): Likewise.
2208
c80049d3
TT
22092017-11-04 Tom Tromey <tom@tromey.com>
2210
2211 * breakpoint.c
2212 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2213 from start_rbreak_breakpoints.
2214 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2215 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2216 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2217 * symtab.c (do_end_rbreak_breakpoints): Remove.
2218 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2219
167b0be1
TT
22202017-11-04 Tom Tromey <tom@tromey.com>
2221
2222 * cp-namespace.c (reset_directive_searched): Remove.
2223 (cp_lookup_symbol_via_imports): Use scoped_restore.
2224 * cp-support.c (reset_directive_searched): Remove.
2225 (make_symbol_overload_list_using): Use scoped_restore.
2226 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2227 (reset_directive_searched): Remove.
2228
5eae7aea
TT
22292017-11-04 Tom Tromey <tom@tromey.com>
2230
2231 * symfile.c (find_separate_debug_file_by_debuglink): Use
2232 unique_xmalloc_ptr.
2233
c6bcad5f
TT
22342017-11-04 Tom Tromey <tom@tromey.com>
2235
2236 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2237 type of "info".
2238 (compute_stack_depth): Likewise.
2239 (do_compile_dwarf_expr_to_c): Use std::vector.
2240
20dcd8ca
TT
22412017-11-04 Tom Tromey <tom@tromey.com>
2242
2243 * compile/compile-object-load.c (link_callbacks_einfo): Use
2244 std::string.
2245
33c7c59d
TT
22462017-11-04 Tom Tromey <tom@tromey.com>
2247
2248 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2249 Use scoped_free_pendings.
2250 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2251 scoped_free_pendings.
2252 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2253 (xcoff_initial_scan): Likewise.
2254 * buildsym.c (reset_symtab_globals): Update comment.
2255 (scoped_free_pendings): Rename from really_free_pendings.
2256 (prepare_for_building): Update comment.
2257 (buildsym_init): Likewise.
2258 * buildsym.h (class scoped_free_pendings): New class.
2259 (really_free_pendings): Don't declare.
2260
67fa57cf
UW
22612017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2262
2263 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2264 output when converting a zero value to a special byteorder format.
2265
f26ae15b
YQ
22662017-11-02 Yao Qi <yao.qi@linaro.org>
2267
2268 * frame.c (do_frame_register_read): Remove aspace.
2269 * jit.c (jit_frame_sniffer): Likwise.
2270 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2271 * regcache.c (regcache::regcache): Pass nullptr.
2272 (regcache_print): Caller updated.
2273 * regcache.h (regcache::regcache): Remove one constructor
2274 parameter aspace.
2275
6c6e9412
YQ
22762017-11-02 Yao Qi <yao.qi@linaro.org>
2277
2278 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2279
8b86c959
YQ
22802017-11-02 Yao Qi <yao.qi@linaro.org>
2281
2282 * breakpoint.c (insert_single_step_breakpoints): Update.
2283 * frame.c (struct frame_info) <aspace>: Add const.
2284 (frame_save_as_regcache): Add const.
2285 (get_frame_address_space): Return const address_space *.
2286 * frame.h (get_frame_address_space): Update declaration.
2287 * infrun.c (struct step_over_info) <aspace>: Add const.
2288 (set_step_over_info): Make aspace const.
2289 (displaced_step_prepare_throw): Change variable const.
2290 (resume): Likewise.
2291 (proceed): Likewise.
2292 (adjust_pc_after_break): Likewise.
2293 (save_waitstatus): Likewise.
2294 (handle_signal_stop): Likewise.
2295 (keep_going_pass_signal): Likewise.
2296 * jit.c (jit_frame_sniffer): Add const.
2297 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2298 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2299 * record-full.c (record_full_wait_1): Likewise.
2300 * regcache.c (regcache::regcache): Change parameter to const.
2301 * regcache.h (regcache::regcache): Likewise.
2302 (regcache::aspace): Return const address_space *.
2303 (regcache) <m_aspace>: Add const.
2304
a01bda52
YQ
23052017-11-02 Yao Qi <yao.qi@linaro.org>
2306
2307 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2308 * frame.c (create_sentinel_frame): Likewise.
2309 * infrun.c (displaced_step_prepare_throw): Likewise.
2310 (resume): Likewise.
2311 (thread_still_needs_step_over_bp): Likewise.
2312 (proceed): Likewise.
2313 (do_target_wait): Likewise.
2314 (adjust_pc_after_break): Likewise.
2315 (handle_syscall_event): Likewise.
2316 (save_waitstatus): Likewise.
2317 (handle_inferior_event_1): Likewise.
2318 (handle_signal_stop): Likewise.
2319 (keep_going_pass_signal): Likewise.
2320 * linux-nat.c (status_callback): Likewise.
2321 (save_stop_reason): Likewise.
2322 (resume_stopped_resumed_lwps): Likewise.
2323 * record-full.c (record_full_exec_insn): Likewise.
2324 (record_full_wait_1): Likewise.
2325 * regcache.c (get_regcache_aspace): Remove.
2326 * regcache.h (get_regcache_aspace): Remove.
2327
d999647b
YQ
23282017-11-02 Yao Qi <yao.qi@linaro.org>
2329
2330 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2331 (init_regcache_descr): Use gdbarch_num_regs.
2332 (regcache::regcache): Likewise.
2333 (regcache::get_register_status): Likewise.
2334 (regcache::assert_raw_regnum): Likewise.
2335 (regcache::cooked_read): Likewise.
2336 (regcache::cooked_read_value): Likewise.
2337 (regcache::cooked_write): Likewise.
2338 (regcache::dump): Likewise.
2339 (regcache::num_raw_registers): New method.
2340 * regcache.h (class regcache) <num_raw_registers>: New.
2341
4e888c28
YQ
23422017-11-02 Yao Qi <yao.qi@linaro.org>
2343
2344 * regcache.c (regcache::assert_regnum): New method.
2345 (regcache::invalidate): Call assert_regnum.
2346 (regcache::raw_update): Likewise.
2347 (regcache::raw_write): Likewise.
2348 (regcache::raw_read_part): Likewise.
2349 (regcache::raw_write_part): Likewise.
2350 (regcache::raw_supply): Likewise.
2351 (regcache::raw_supply_integer): Likewise.
2352 (regcache::raw_supply_zeroed): Likewise.
2353 (regcache::raw_collect): Likewise.
2354 (regcache::raw_collect_integer): Likewise.
2355 * regcache.h (regcache::assert_regnum): Declare.
2356
2e1b49b3
YQ
23572017-11-02 Yao Qi <yao.qi@linaro.org>
2358
2359 * regcache.c (regcache::dump): Remove code.
2360
6c5218df
YQ
23612017-11-02 Yao Qi <yao.qi@linaro.org>
2362
2363 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2364 Remove.
2365 <sizeof_cooked_register_status>: Remove.
2366 (init_regcache_descr): Update.
2367 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2368 (regcache::save): Likewise.
2369 (regcache::dump): Likewise.
2370
dcc31d28
JB
23712017-11-01 James Bowman <james.bowman@ftdichip.com>
2372
2373 * ft32-tdep.c (ft32_fetch_instruction): New function.
2374 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2375
3a87ae65
SM
23762017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2377
2378 * cli/cli-script.c (execute_control_command): Rename to ...
2379 (execute_control_command_1): ... this.
2380 (execute_control_command): New function.
2381
09b847f3
SM
23822017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * tracepoint.c (tfind_command): Remove const_cast.
2385
f871c485
MG
23862017-10-30 Mike Gulick <mgulick@mathworks.com>
2387
2388 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2389
b020ff80
SM
23902017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2391
2392 * common/common-utils.h (in_inclusive_range): New function.
2393 * arm-tdep.c (arm_record_extension_space): Use
2394 in_inclusive_range.
2395 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2396 * cris-tdep.c (cris_spec_reg_applicable): Use
2397 in_inclusive_range.
2398
1b81856f
PA
23992017-10-30 Pedro Alves <palves@redhat.com>
2400 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2403 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2404
31b833b3
PA
24052017-10-30 Pedro Alves <palves@redhat.com>
2406
2407 * common/common-utils.c (string_appendf, string_vappendf): New
2408 functions.
2409 * common/common-utils.h (string_appendf, string_vappendf): New
2410 declarations.
2411 * unittests/common-utils-selftests.c (string_appendf_func)
2412 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2413 (string_vappendf_tests): New functions.
2414 (_initialize_common_utils_selftests): Register "string_appendf" and
2415 "string_vappendf tests".
2416
4a250334
PA
24172017-10-30 Pedro Alves <palves@redhat.com>
2418
2419 * unittests/common-utils-selftests.c (format_func): New typedef.
2420 (string_printf_tests, string_vprintf_tests): Tests factored out
2421 and merged to ...
2422 (test_format_func): ... this new function.
2423 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2424 test_format_func.
2425
16c5c17e
SM
24262017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2427
2428 * darwin-nat.c: Remove include of gdb.h.
2429
7ca51576
SM
24302017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * xtensa-xtregs.c: Fix formatting issues.
2433
c1342859
SM
24342017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2435
2436 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2437
484d8d36
MD
24382017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2439
2440 PR python/21213
2441 * python/py-infthread.c (thpy_get_inferior): Increment reference
2442 of inferior before returning it.
2443
b5540b5f
SM
24442017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2445
2446 * unittests/common-utils-selftests.c (format): Add
2447 ATTRIBUTE_PRINTF.
2448
5a9dcda1
SM
24492017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2450
2451 * xml-syscall.c (struct syscall_desc): Add constructor.
2452 <name>: Change type to std::string.
2453 (syscall_desc_up): New typedef.
2454 (syscall_desc_p): Remove typeder.
2455 (DEF_VEC_P(syscall_desc_p)): Remove.
2456 (struct syscall_group_desc): Add constructor.
2457 <name>: Change type to std::string.
2458 <syscalls>: Change type to std::vector.
2459 (syscall_group_desc_up): New typedef.
2460 (syscall_group_desc_p): Remove typedef.
2461 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2462 (struct syscalls_info) <syscalls>: Change type to std::vector of
2463 unique_ptr.
2464 <groups>: Likewise.
2465 <my_gdb_datadir>: Change type to std::string.
2466 (syscalls_info_up): New typedef.
2467 (allocate_syscalls_info): Remove.
2468 (syscalls_info_free_syscalls_desc): Remove.
2469 (syscalls_info_free_syscall_group_desc): Remove.
2470 (free_syscalls_info): Remove.
2471 (make_cleanup_free_syscalls_info): Remove.
2472 (syscall_group_create_syscall_group_desc): Adjust.
2473 (syscall_group_add_syscall): Adjust.
2474 (syscall_create_syscall_desc): Adjust.
2475 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2476 (init_syscalls_info): Adjust.
2477 (syscall_group_get_group_by_name): Adjust.
2478 (xml_get_syscall_number): Adjust.
2479 (xml_get_syscall_name): Adjust.
2480 (xml_list_of_syscalls): Adjust.
2481 (xml_list_syscalls_by_group): Adjust.
2482 (xml_list_of_groups): Adjust.
2483
45461e0d
SM
24842017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2485
2486 * probe.h: Don't include gdb_vecs.h.
2487 (DEF_VEC_P (probe_p)): Remove.
2488 (find_probes_in_objfile): Return an std::vector.
2489 * probe.c (find_probes_in_objfile): Likewise.
2490 * breakpoint.c (breakpoint_objfile_data)
2491 <longjmp_probes>: Change type to std::vector.
2492 <exception_probes>: Likewise.
2493 (free_breakpoint_probes): Don't manually free vectors.
2494 (create_longjmp_master_breakpoint): Adjust.
2495 (create_exception_master_breakpoint): Adjust.
2496 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2497 parameter type, adjust.
2498 (svr4_create_solib_event_breakpoints): Adjust.
2499
43dce439
SM
25002017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2501
2502 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2503 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2504 with new.
2505 (free_breakpoint_probes): Rename to ...
2506 (free_breakpoint_objfile_data): ... this, and call delete on
2507 bp_objfile_data..
2508
6a1b9516
SM
25092017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2510
2511 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2512 (loaded_script_ptr): Remove typedef.
2513 (DEF_VEC_P (loaded_script_ptr)): Remove.
2514 (struct collect_matching_scripts_data): Add constructor.
2515 <scripts_p>: Change type to (pointer to) std::vector.
2516 (collect_matching_scripts_data): Adjust.
2517 (sort_scripts_by_name): Make suitable for std::sort.
2518 (print_scripts): Don't sort vector, adjust to std::vector.
2519 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2520
593e3209
SM
25212017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2522
2523 * symfile.c (filename_language): Make struct, not typedef. Add
2524 constructor.
2525 <ext>: Change type to std::string.
2526 (DEF_VEC_O (filename_language)): Remove.
2527 (filename_language_table): Change type to std::vector.
2528 (add_filename_language): Adjust.
2529 (set_ext_lang_command): Adjust.
2530 (info_ext_lang_command): Adjust.
2531 (deduce_language_from_filename): Adjust.
2532 (class scoped_restore_filename_language_table): Remove.
2533 (test_filename_language): Use scoped_restore.
2534 (test_set_ext_lang_command): Use scoped_restore, adjust to
2535 std::vector change.
2536
32fa66eb
SM
25372017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2538
2539 * symfile.c: Include selftest.h.
2540 (class scoped_restore_filename_language_table): New.
2541 (test_filename_language): New test.
2542 (test_set_ext_lang_command): New test.
2543 (_initialize_symfile): Register tests.
2544
4a27f119
KS
25452017-10-27 Keith Seitz <keiths@redhat.com>
2546
2547 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2548 in the bp_location, falling back to find_pc_sect_function when
2549 needed.
2550 (add_location_to_breakpoint): Save sal->symbol.
2551 * breakpoint.h (struct bp_location) <symbol>: New field.
2552 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2553 * symtab.h (struct symtab_and_line) <symbol>: New field.
2554
a43f3893
PF
25552017-10-26 Patrick Frants <osscontribute@gmail.com>
2556
7453e6b2 2557 PR gdb/13669
a43f3893
PF
2558 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2559 to rewind obstack.
2560
23cc4e1b
PA
25612017-10-26 Pedro Alves <palves@redhat.com>
2562
2563 * remote.c (remote_async_terminal_ours_p): Delete.
2564 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2565 Remove references to 'remote_async_terminal_ours_p'.
2566
6abc18bb
YQ
25672017-10-26 Yao Qi <yao.qi@linaro.org>
2568
2569 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2570
bd522513
YQ
25712017-10-26 Yao Qi <yao.qi@linaro.org>
2572
2573 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2574 aspace const.
2575 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2576 Likewise.
2577 * breakpoint.c (bpstat_check_location): Remove cast.
2578 (breakpoint_hit_catch_fork): Make aspce const.
2579 (breakpoint_hit_catch_solib): Likewise.
2580 (breakpoint_hit_catch_exec): Likewise.
2581 (breakpoint_hit_ranged_breakpoint): Likewise.
2582 (breakpoint_hit_watchpoint): Likewise.
2583 (base_breakpoint_breakpoint_hit): Likewise.
2584 (bkpt_breakpoint_hit): Likewise.
2585 (dprintf_breakpoint_hit): Likewise.
2586 (tracepoint_breakpoint_hit): Likewise.
2587 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2588
accd0bcd
YQ
25892017-10-26 Yao Qi <yao.qi@linaro.org>
2590
2591 * breakpoint.c (breakpoint_location_address_match): Change
2592 "struct address_space *" to "const address_space".
2593 (breakpoint_location_address_range_overlap): Likewise.
2594 (breakpoint_here_p): Likewise.
2595 (breakpoint_in_range_p): Likewise.
2596 (moribund_breakpoint_here_p): Likewise.
2597 (bp_location_inserted_here_p): Likewise.
2598 (software_breakpoint_inserted_here_p): Likewise.
2599 (hardware_breakpoint_inserted_here_p): Likewise.
2600 (hardware_watchpoint_inserted_in_range): Likewise.
2601 (bpstat_check_location): Likewise.
2602 (bpstat_stop_status): Likewise.
2603 (breakpoint_address_match): Likewise.
2604 (breakpoint_address_match_range): Likewise.
2605 (breakpoint_location_address_match): Likewise.
2606 (breakpoint_location_address_range_overlap): Likewise.
2607 (insert_single_step_breakpoint): Likewise.
2608 (breakpoint_has_location_inserted_here): Likewise.
2609 (single_step_breakpoint_inserted_here_p): Likewise.
2610 (pc_at_non_inline_function): Likewise.
2611 * breakpoint.h (bpstat_stop_status): Update declaration.
2612 (breakpoint_here_p): Likewise.
2613 (breakpoint_in_range_p): Likewise.
2614 (moribund_breakpoint_here_p): Likewise.
2615 (breakpoint_inserted_here_p): Likewise.
2616 (software_breakpoint_inserted_here_p): Likewise.
2617 (hardware_breakpoint_inserted_here_p): Likewise.
2618 (breakpoint_has_location_inserted_here): Likewise.
2619 (single_step_breakpoint_inserted_here_p): Likewise.
2620 (hardware_watchpoint_inserted_in_range): Likewise.
2621 (breakpoint_address_match): Likewise.
2622 (insert_single_step_breakpoint): Likewise.
2623 (pc_at_non_inline_function): Likewise.
2624 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2625 * record.c (record_check_stopped_by_breakpoint): Likewise.
2626 * record.h (record_check_stopped_by_breakpoint): Likewise.
2627 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2628
ac7936df
YQ
26292017-10-25 Yao Qi <yao.qi@linaro.org>
2630
2631 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2632 regcache->arch () instead get_regcache_arch.
2633 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2634 Likewise.
2635 (aarch64_fbsd_store_inferior_registers): Likewise.
2636 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2637 (store_gregs_to_thread): Likewise.
2638 (fetch_fpregs_from_thread): Likewise.
2639 (store_fpregs_to_thread): Likewise.
2640 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2641 (aarch64_store_return_value): Likewise.
2642 (aarch64_software_single_step): Likewise.
2643 * aix-thread.c (aix_thread_wait): Likewise.
2644 (supply_reg32): Likewise.
2645 (supply_sprs64): Likewise.
2646 (supply_sprs32): Likewise.
2647 (fill_gprs64): Likewise.
2648 (fill_gprs32): Likewise.
2649 (fill_sprs64): Likewise.
2650 (fill_sprs32): Likewise.
2651 (store_regs_user_thread): Likewise.
2652 (store_regs_kernel_thread): Likewise.
2653 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2654 (alphabsd_store_inferior_registers): Likewise.
2655 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2656 (alpha_store_return_value): Likewise.
2657 (alpha_deal_with_atomic_sequence): Likewise.
2658 (alpha_next_pc): Likewise.
2659 (alpha_software_single_step): Likewise.
2660 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2661 (amd64bsd_store_inferior_registers): Likewise.
2662 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2663 Likewise.
2664 (amd64_linux_store_inferior_registers): Likewise.
2665 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2666 (amd64_collect_native_gregset): Likewise.
2667 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2668 (amd64obsd_collect_uthread): Likewise.
2669 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2670 (amd64_collect_fpregset): Likewise.
2671 (amd64_supply_fxsave): Likewise.
2672 (amd64_supply_xsave): Likewise.
2673 (amd64_collect_fxsave): Likewise.
2674 (amd64_collect_xsave): Likewise.
2675 * arc-tdep.c (arc_write_pc): Likewise.
2676 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2677 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2678 (arm_fbsd_store_inferior_registers): Likewise.
2679 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2680 (store_vfp_regs): Likewise.
2681 (arm_linux_fetch_inferior_registers): Likewise.
2682 (arm_linux_store_inferior_registers): Likewise.
2683 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2684 (arm_linux_sigreturn_next_pc): Likewise.
2685 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2686 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2687 (fetch_register): Likewise.
2688 (store_register): Likewise.
2689 * arm-tdep.c (arm_is_thumb): Likewise.
2690 (displaced_in_arm_mode): Likewise.
2691 (bx_write_pc): Likewise.
2692 (arm_get_next_pcs_addr_bits_remove): Likewise.
2693 (arm_software_single_step): Likewise.
2694 (arm_extract_return_value): Likewise.
2695 (arm_store_return_value): Likewise.
2696 (arm_write_pc): Likewise.
2697 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2698 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2699 (bsd_uthread_store_registers): Likewise.
2700 * core-regset.c (fetch_core_registers): Likewise.
2701 * corelow.c (get_core_registers): Likewise.
2702 * cris-tdep.c (cris_store_return_value): Likewise.
2703 (cris_extract_return_value): Likewise.
2704 (find_step_target): Likewise.
2705 (find_step_target): Likewise.
2706 (cris_software_single_step): Likewise.
2707 * ctf.c (ctf_fetch_registers): Likewise.
2708 * darwin-nat.c (cancel_breakpoint): Likewise.
2709 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2710 * frv-tdep.c (frv_extract_return_value): Likewise.
2711 * ft32-tdep.c (ft32_store_return_value): Likewise.
2712 (ft32_extract_return_value): Likewise.
2713 * go32-nat.c (fetch_register): Likewise.
2714 (go32_fetch_registers): Likewise.
2715 (go32_store_registers): Likewise.
2716 (store_register): Likewise.
2717 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2718 (h8300_store_return_value): Likewise.
2719 * hppa-linux-nat.c (fetch_register): Likewise.
2720 (store_register): Likewise.
2721 (hppa_linux_fetch_inferior_registers): Likewise.
2722 (hppa_linux_store_inferior_registers): Likewise.
2723 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2724 (i386_darwin_store_inferior_registers): Likewise.
2725 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2726 (gnu_store_registers): Likewise.
2727 * i386-linux-nat.c (fetch_register): Likewise.
2728 (store_register): Likewise.
2729 (supply_gregset): Likewise.
2730 (fill_gregset): Likewise.
2731 (i386_linux_fetch_inferior_registers): Likewise.
2732 (i386_linux_store_inferior_registers): Likewise.
2733 (i386_linux_resume): Likewise.
2734 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2735 Likewise.
2736 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2737 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2738 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2739 (i386obsd_collect_uthread): Likewise.
2740 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2741 (i386_supply_gregset): Likewise.
2742 (i386_collect_gregset): Likewise.
2743 (i386_supply_fpregset): Likewise.
2744 (i386_collect_fpregset): Likewise.
2745 (i386_mpx_bd_base): Likewise.
2746 * i386-v4-nat.c (supply_fpregset): Likewise.
2747 (fill_fpregset): Likewise.
2748 * i387-tdep.c (i387_supply_fsave): Likewise.
2749 (i387_collect_fsave): Likewise.
2750 (i387_supply_fxsave): Likewise.
2751 (i387_collect_fxsave): Likewise.
2752 (i387_supply_xsave): Likewise.
2753 (i387_collect_xsave): Likewise.
2754 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2755 (ia64_linux_store_registers): Likewise.
2756 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2757 (ia64_extract_return_value): Likewise.
2758 (ia64_store_return_value): Likewise.
2759 (find_func_descr): Likewise.
2760 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2761 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2762 (inf_ptrace_store_registers): Likewise.
2763 * infrun.c (use_displaced_stepping): Likewise.
2764 (displaced_step_prepare_throw): Likewise.
2765 (resume): Likewise.
2766 (proceed): Likewise.
2767 (do_target_wait): Likewise.
2768 (adjust_pc_after_break): Likewise.
2769 (handle_inferior_event_1): Likewise.
2770 (handle_signal_stop): Likewise.
2771 (save_infcall_suspend_state): Likewise.
2772 (restore_infcall_suspend_state): Likewise.
2773 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2774 * jit.c (jit_frame_prev_register): Likewise.
2775 * linux-nat.c (save_stop_reason): Likewise.
2776 (linux_nat_wait_1): Likewise.
2777 (resume_stopped_resumed_lwps): Likewise.
2778 * linux-record.c (record_linux_sockaddr): Likewise.
2779 (record_linux_msghdr): Likewise.
2780 (record_linux_system_call): Likewise.
2781 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2782 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2783 (lm32_store_return_value): Likewise.
2784 * m32c-tdep.c (m32c_read_flg): Likewise.
2785 (m32c_pseudo_register_read): Likewise.
2786 (m32c_pseudo_register_write): Likewise.
2787 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2788 (m32r_linux_collect_gregset): Likewise.
2789 * m32r-tdep.c (m32r_store_return_value): Likewise.
2790 (m32r_extract_return_value): Likewise.
2791 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2792 (m68kbsd_collect_fpregset): Likewise.
2793 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2794 * m68k-linux-nat.c (fetch_register): Likewise.
2795 (old_fetch_inferior_registers): Likewise.
2796 (old_store_inferior_registers): Likewise.
2797 (store_regs): Likewise.
2798 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2799 (m68k_svr4_store_return_value): Likewise.
2800 * m88k-tdep.c (m88k_store_arguments): Likewise.
2801 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2802 (mi_cmd_data_write_register_values): Likewise.
2803 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2804 (mips_fbsd_store_inferior_registers): Likewise.
2805 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2806 (mips_fbsd_supply_gregs): Likewise.
2807 (mips_fbsd_collect_fpregs): Likewise.
2808 (mips_fbsd_collect_gregs): Likewise.
2809 (mips_fbsd_supply_fpregset): Likewise.
2810 (mips_fbsd_collect_fpregset): Likewise.
2811 (mips_fbsd_supply_gregset): Likewise.
2812 (mips_fbsd_collect_gregset): Likewise.
2813 * mips-linux-nat.c (supply_gregset): Likewise.
2814 (fill_gregset): Likewise.
2815 (supply_fpregset): Likewise.
2816 (fill_fpregset): Likewise.
2817 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2818 (mips_fill_gregset): Likewise.
2819 (mips_supply_fpregset): Likewise.
2820 (mips_fill_fpregset): Likewise.
2821 (mips64_supply_gregset): Likewise.
2822 (micromips_linux_sigframe_validate): Likewise.
2823 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2824 (mipsnbsd_fetch_inferior_registers): Likewise.
2825 (mipsnbsd_store_inferior_registers): Likewise.
2826 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2827 (mipsnbsd_supply_gregset): Likewise.
2828 (mipsnbsd_iterate_over_regset_sections): Likewise.
2829 (mipsnbsd_supply_reg): Likewise.
2830 (mipsnbsd_supply_fpreg): Likewise.
2831 * mips-tdep.c (mips_in_frame_stub): Likewise.
2832 (mips_dummy_id): Likewise.
2833 (is_octeon_bbit_op): Likewise.
2834 (micromips_bc1_pc): Likewise.
2835 (extended_mips16_next_pc): Likewise.
2836 (mips16_next_pc): Likewise.
2837 (deal_with_atomic_sequence): Likewise.
2838 * moxie-tdep.c (moxie_process_readu): Likewise.
2839 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2840 * nto-procfs.c (procfs_store_registers): Likewise.
2841 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2842 (ppcfbsd_store_inferior_registers): Likewise.
2843 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2844 (fetch_altivec_register): Likewise.
2845 (get_spe_registers): Likewise.
2846 (fetch_spe_register): Likewise.
2847 (fetch_altivec_registers): Likewise.
2848 (fetch_all_gp_regs): Likewise.
2849 (fetch_all_fp_regs): Likewise.
2850 (store_vsx_register): Likewise.
2851 (store_altivec_register): Likewise.
2852 (set_spe_registers): Likewise.
2853 (store_spe_register): Likewise.
2854 (store_altivec_registers): Likewise.
2855 (store_all_gp_regs): Likewise.
2856 (store_all_fp_regs): Likewise.
2857 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2858 (ppc_linux_collect_gregset): Likewise.
2859 (ppc_canonicalize_syscall): Likewise.
2860 (ppc_linux_record_signal): Likewise.
2861 (ppu2spu_prev_register): Likewise.
2862 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2863 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2864 (ppcobsd_store_registers): Likewise.
2865 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2866 Likewise.
2867 (ppc_ravenscar_generic_store_registers): Likewise.
2868 * procfs.c (procfs_fetch_registers): Likewise.
2869 (procfs_store_registers): Likewise.
2870 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2871 (ravenscar_store_registers): Likewise.
2872 (ravenscar_prepare_to_store): Likewise.
2873 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2874 * record-full.c (record_full_wait_1): Likewise.
2875 (record_full_registers_change): Likewise.
2876 (record_full_store_registers): Likewise.
2877 (record_full_core_fetch_registers): Likewise.
2878 (record_full_save): Likewise.
2879 (record_full_goto_insn): Likewise.
2880 * regcache.c (regcache_register_size): Likewise.
2881 (get_regcache_arch): Remove.
2882 (regcache_read_pc): Likewise.
2883 * regcache.h (get_regcache_arch): Remove.
2884 * remote-sim.c (gdbsim_fetch_register): Likewise.
2885 (gdbsim_store_register): Likewise.
2886 * remote.c (fetch_register_using_p): Likewise.
2887 (send_g_packet): Likewise.
2888 (remote_prepare_to_store): Likewise.
2889 (store_registers_using_G): Likewise.
2890 * reverse.c (save_bookmark_command): Likewise.
2891 (goto_bookmark_command): Likewise.
2892 * rs6000-aix-tdep.c (branch_dest): Likewise.
2893 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2894 (fetch_register): Likewise.
2895 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2896 (ppc_collect_reg): Likewise.
2897 (ppc_collect_gregset): Likewise.
2898 (ppc_collect_fpregset): Likewise.
2899 (ppc_collect_vsxregset): Likewise.
2900 (ppc_collect_vrregset): Likewise.
2901 (ppc_displaced_step_hw_singlestep): Likewise.
2902 (rs6000_pseudo_register_read): Likewise.
2903 (rs6000_pseudo_register_write): Likewise.
2904 * s390-linux-nat.c (supply_gregset): Likewise.
2905 (fill_gregset): Likewise.
2906 (s390_linux_fetch_inferior_registers): Likewise.
2907 * s390-linux-tdep.c (s390_write_pc): Likewise.
2908 (s390_software_single_step): Likewise.
2909 (s390_all_but_pc_registers_record): Likewise.
2910 (s390_linux_syscall_record): Likewise.
2911 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2912 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2913 (shnbsd_store_inferior_registers): Likewise.
2914 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2915 (sh_extract_return_value_fpu): Likewise.
2916 (sh_store_return_value_nofpu): Likewise.
2917 (sh_corefile_supply_regset): Likewise.
2918 (sh_corefile_collect_regset): Likewise.
2919 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2920 (sh64_store_return_value): Likewise.
2921 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2922 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2923 (sparc_store_inferior_registers): Likewise.
2924 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2925 (sparc_ravenscar_prepare_to_store): Likewise.
2926 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2927 (sparc_analyze_control_transfer): Likewise.
2928 (sparc_step_trap): Likewise.
2929 (sparc_software_single_step): Likewise.
2930 (sparc32_gdbarch_init): Likewise.
2931 (sparc_supply_rwindow): Likewise.
2932 (sparc_collect_rwindow): Likewise.
2933 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2934 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2935 (sparc64nbsd_collect_gregset): Likewise.
2936 (sparc64nbsd_supply_fpregset): Likewise.
2937 (sparc64nbsd_collect_fpregset): Likewise.
2938 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2939 (sparc64_supply_gregset): Likewise.
2940 (sparc64_collect_gregset): Likewise.
2941 (sparc64_supply_fpregset): Likewise.
2942 (sparc64_collect_fpregset): Likewise.
2943 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2944 * spu-tdep.c (spu_unwind_sp): Likewise.
2945 (spu2ppu_prev_register): Likewise.
2946 (spu_memory_remove_breakpoint): Likewise.
2947 * stack.c (return_command): Likewise.
2948 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2949 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2950 * tracefile.c (trace_save_ctf): Likewise.
2951 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2952 (do_windows_store_inferior_registers): Likewise.
2953 (windows_resume): Likewise.
2954 * xtensa-linux-nat.c (fill_gregset): Likewise.
2955 (supply_gregset_reg): Likewise.
2956 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2957 (xtensa_register_read_masked): Likewise.
2958 (xtensa_supply_gregset): Likewise.
2959 (xtensa_extract_return_value): Likewise.
2960 (xtensa_store_return_value): Likewise.
2961
edd079d9
UW
29622017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2963
2964 * doublest.c (floatformat_from_string): New function.
2965 * doublest.h (floatformat_from_string): Add prototype.
2966
2967 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2968 (OP_FLOAT): ... this.
2969 * expression.h: Do not include "doublest.h".
2970 (union exp_element): Replace doubleconst and decfloatconst by
2971 new element floatconst.
2972 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2973 (ada_evaluate_subexp): Likewise.
2974 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2975 OP_DOUBLE and OP_DECFLOAT.
2976 * expprint.c (print_subexp_standard): Likewise.
2977 (dump_subexp_body_standard): Likewise.
2978 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2979
2980 * parse.c: Include "dfp.h".
2981 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2982 (write_exp_elt_floatcst): New function.
2983 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2984 and OP_DECFLOAT.
2985 (operator_check_standard): Likewise.
2986 (parse_float): Do not accept suffix. Take type as input. Return bool.
2987 Return target format buffer instead of host DOUBLEST.
2988 Use floatformat_from_string and decimal_from_string to parse
2989 either binary or decimal floating-point types.
2990 (parse_c_float): Remove.
2991 * parser-defs.h: Do not include "doublest.h".
2992 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2993 (write_exp_elt_floatcst): Add prototype.
2994 (parse_float): Update prototype.
2995 (parse_c_float): Remove.
2996
2997 * c-exp.y: Do not include "dfp.h".
2998 (typed_val_float): Use byte buffer instead of DOUBLEST.
2999 (typed_val_decfloat): Remove.
3000 (DECFLOAT): Remove.
3001 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3002 (parse_number): Update to new parse_float interface.
3003 Parse suffixes and determine type before calling parse_float.
3004 Handle decimal and binary FP types the same way.
3005
3006 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3007 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3008 (parse_number): Update to new parse_float interface.
3009 Parse suffixes and determine type before calling parse_float.
3010
3011 * f-exp.y: Replace dval by typed_val_float.
3012 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3013 (parse_number): Use parse_float instead of atof.
3014
3015 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3016 (parse_go_float): Remove.
3017 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3018 (parse_number): Call parse_float instead of parse_go_float.
3019 Parse suffixes and determine type before calling parse_float.
3020
3021 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3022 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3023 (parse_number): Update to new parse_float interface.
3024 Parse suffixes and determine type before calling parse_float.
3025
3026 * m2-exp.y: Replace dval by byte buffer val.
3027 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3028 (parse_number): Call parse_float instead of atof.
3029
3030 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3031 (lex_number): Call parse_float instead of strtod.
3032 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3033 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3034 Use write_exp_elt_floatcst.
3035 (unit_testing): Remove static variable.
3036 (rust_type): Do not check unit_testing.
3037 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3038
3039 * ada-exp.y (type_float, type_double): Remove.
3040 (typed_val_float): Use byte buffer instead of DOUBLEST.
3041 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3042 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3043
cc628f3d
AH
30442017-10-25 Alan Hayward <alan.hayward@arm.com>
3045
3046 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3047 * arch/aarch64.h: New file.
3048
09a7c6aa
UW
30492017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3050
3051 * dfp.h (decimal_from_string): Use const reference for argument.
3052 * dfp.c (decimal_from_string): Likewise.
3053
8ba0dd51
UW
30542017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3055
3056 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3057 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3058 * mips-tdep.c (mips_print_fp_register): Likewise.
3059
16e812b2
UW
30602017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3061
3062 * common/format.h (enum argclass): Replace decfloat_arg by
3063 dec32float_arg, dec64float_arg, and dec128float_arg.
3064 * common/format.c (parse_format_string): Update to return
3065 new decimal float argument classes.
3066
3067 * printcmd.c (printf_decfloat): Rename to ...
3068 (printf_floating): ... this. Add argclass argument, and use it
3069 instead of parsing the format string again. Add support for
3070 binary floating-point values, using floatformat_to_string.
3071 Convert value to the target format if it doesn't already match.
3072 (ui_printf): Call printf_floating instead of printf_decfloat,
3073 also for double_arg / long_double_arg. Pass argclass.
3074
3075 * dfp.c (decimal_to_string): Add format string argument.
3076 * dfp.h (decimal_to_string): Likewise.
3077
3078 * doublest.c (floatformat_to_string): Add format string argument.
3079 * doublest.h (floatformat_to_string): Likewise.
3080
fdf0cbc2
UW
30812017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3082
3083 * doublest.c (floatformat_precision): New routine.
3084 (floatformat_to_string): Likewise.
3085 * doublest.c (floatformat_to_string): Add prototype.
3086
3087 * printcmd.c (print_scalar_formatted): Only call print_floating
3088 on floating-point types.
3089 * valprint.c: Do not include "floatformat.h".
3090 (generic_val_print_decfloat): Remove.
3091 (generic_val_print): Call generic_val_print_float for both
3092 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3093 (print_floating): Use floatformat_to_string. Handle decimal float.
3094 (print_decimal_floating): Remove, merge into floatformat_to_string.
3095 * value.h (print_decimal_floating): Remove.
3096
3097 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3098
5033013f
UW
30992017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3100
3101 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3102
a664f67e
SM
31032017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3104
3105 * memattr.h: Don't include vec.h.
3106 (struct mem_attrib): Initialize fields.
3107 <unknown>: New static method.
3108 (struct mem_region): Add constructors, operator<, initialize
3109 fields.
3110 * memattr.c: Include algorithm.
3111 (default_mem_attrib, unknown_mem_attrib): Remove.
3112 (user_mem_region_list): New global.
3113 (target_mem_region_list, mem_region_list): Change type to
3114 std::vector<mem_region>.
3115 (mem_use_target): Now a function.
3116 (target_mem_regions_valid): Change type to bool.
3117 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3118 (require_user_regions): Adjust.
3119 (require_target_regions): Adjust.
3120 (create_mem_region): Adjust.
3121 (lookup_mem_region): Adjust.
3122 (invalidate_target_mem_regions): Adjust.
3123 (mem_clear): Rename to...
3124 (user_mem_clear): ... this, and adjust.
3125 (mem_command): Adjust.
3126 (info_mem_command): Adjust.
3127 (mem_enable, enable_mem_command, mem_disable,
3128 disable_mem_command): Adjust.
3129 (mem_delete): Adjust.
3130 (delete_mem_command): Adjust.
3131 * memory-map.h (parse_memory_map): Return an std::vector.
3132 * memory-map.c (parse_memory_map): Likewise.
3133 (struct memory_map_parsing_data): Add constructor.
3134 <memory_map>: Point to std::vector.
3135 (memory_map_start_memory): Adjust.
3136 (memory_map_end_memory): Adjust.
3137 (memory_map_end_property): Adjust.
3138 (clear_result): Remove.
3139 * remote.c (remote_memory_map): Return an std::vector.
3140 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3141 Remove.
3142 (target_debug_print_mem_region_vector): New.
3143 * target-delegates.c: Regenerate.
3144 * target.h (mem_region_vector): New typedef.
3145 (to_memory_map): Return mem_region_vector.
3146 (target_memory_map): Return an std::vector.
3147 * target.c (target_memory_map): Return an std::vector.
3148 (flash_erase_command): Adjust.
3149
6e17c565
SM
31502017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3151
3152 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3153 Change type to std::string.
3154 (memory_map_start_property): Adjust.
3155 (memory_map_end_property): Adjust.
3156
cfba9872
SM
31572017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3158
3159 * infrun.h: Include common/byte-vector.h.
3160 (struct displaced_step_closure): New struct.
3161 (struct buf_displaced_step_closure): New struct.
3162 * infrun.c (displaced_step_closure::~displaced_step_closure):
3163 Provide default implementation.
3164 (displaced_step_clear): Deallocate step closure with delete.
3165 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3166 (aarch64_displaced_step_closure): ... this, extend
3167 displaced_step_closure.
3168 (aarch64_displaced_step_data) <dsc>: Change type to
3169 aarch64_displaced_step_closure.
3170 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3171 unique_ptr.
3172 (aarch64_displaced_step_fixup): Add cast for displaced step
3173 closure.
3174 * amd64-tdep.c (displaced_step_closure): Rename to ...
3175 (amd64_displaced_step_closure): ... this, extend
3176 displaced_step_closure.
3177 <insn_buf>: Change type to std::vector<gdb_byte>.
3178 <max_len>: Remove.
3179 (fixup_riprel): Change type of DSC parameter, adjust to type
3180 change of insn_buf.
3181 (fixup_displaced_copy): Change type of DSC parameter.
3182 (amd64_displaced_step_copy_insn): Instantiate
3183 amd64_displaced_step_closure.
3184 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3185 to type change of insn_buf.
3186 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3187 parameter DSC.
3188 (arm_linux_copy_svc): Likewise.
3189 (cleanup_kernel_helper_return): Likewise.
3190 (arm_catch_kernel_helper_return): Likewise.
3191 (arm_linux_displaced_step_copy_insn): Instantiate
3192 arm_displaced_step_closure.
3193 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3194 (displaced_read_reg): Change type of parameter DSC.
3195 (branch_write_pc): Likewise.
3196 (load_write_pc): Likewise.
3197 (alu_write_pc): Likewise.
3198 (displaced_write_reg): Likewise.
3199 (arm_copy_unmodified): Likewise.
3200 (thumb_copy_unmodified_32bit): Likewise.
3201 (thumb_copy_unmodified_16bit): Likewise.
3202 (cleanup_preload): Likewise.
3203 (install_preload): Likewise.
3204 (arm_copy_preload): Likewise.
3205 (thumb2_copy_preload): Likewise.
3206 (install_preload_reg): Likewise.
3207 (arm_copy_preload_reg): Likewise.
3208 (cleanup_copro_load_store): Likewise.
3209 (install_copro_load_store): Likewise.
3210 (arm_copy_copro_load_store) Likewise.
3211 (thumb2_copy_copro_load_store): Likewise.
3212 (cleanup_branch): Likewise.
3213 (install_b_bl_blx): Likewise.
3214 (arm_copy_b_bl_blx): Likewise.
3215 (thumb2_copy_b_bl_blx): Likewise.
3216 (thumb_copy_b): Likewise.
3217 (install_bx_blx_reg): Likewise.
3218 (arm_copy_bx_blx_reg): Likewise.
3219 (thumb_copy_bx_blx_reg): Likewise.
3220 (cleanup_alu_imm): Likewise.
3221 (arm_copy_alu_imm): Likewise.
3222 (thumb2_copy_alu_imm): Likewise.
3223 (cleanup_alu_reg): Likewise.
3224 (install_alu_reg): Likewise.
3225 (arm_copy_alu_reg): Likewise.
3226 (thumb_copy_alu_reg): Likewise.
3227 (cleanup_alu_shifted_reg): Likewise.
3228 (install_alu_shifted_reg): Likewise.
3229 (arm_copy_alu_shifted_reg): Likewise.
3230 (cleanup_load): Likewise.
3231 (cleanup_store): Likewise.
3232 (arm_copy_extra_ld_st): Likewise.
3233 (install_load_store): Likewise.
3234 (thumb2_copy_load_literal): Likewise.
3235 (thumb2_copy_load_reg_imm): Likewise.
3236 (arm_copy_ldr_str_ldrb_strb): Likewise.
3237 (cleanup_block_load_all): Likewise.
3238 (cleanup_block_store_pc): Likewise.
3239 (cleanup_block_load_pc): Likewise.
3240 (arm_copy_block_xfer): Likewise.
3241 (thumb2_copy_block_xfer): Likewise.
3242 (cleanup_svc): Likewise.
3243 (install_svc): Likewise.
3244 (arm_copy_svc): Likewise.
3245 (thumb_copy_svc): Likewise.
3246 (arm_copy_undef): Likewise.
3247 (thumb_32bit_copy_undef): Likewise.
3248 (arm_copy_unpred): Likewise.
3249 (arm_decode_misc_memhint_neon): Likewise.
3250 (arm_decode_unconditional): Likewise.
3251 (arm_decode_miscellaneous): Likewise.
3252 (arm_decode_dp_misc): Likewise.
3253 (arm_decode_ld_st_word_ubyte): Likewise.
3254 (arm_decode_media): Likewise.
3255 (arm_decode_b_bl_ldmstm): Likewise.
3256 (arm_decode_ext_reg_ld_st): Likewise.
3257 (thumb2_decode_dp_shift_reg): Likewise.
3258 (thumb2_decode_ext_reg_ld_st): Likewise.
3259 (arm_decode_svc_copro): Likewise.
3260 (thumb2_decode_svc_copro): Likewise.
3261 (install_pc_relative): Likewise.
3262 (thumb_copy_pc_relative_16bit): Likewise.
3263 (thumb_decode_pc_relative_16bit): Likewise.
3264 (thumb_copy_pc_relative_32bit): Likewise.
3265 (thumb_copy_16bit_ldr_literal): Likewise.
3266 (thumb_copy_cbnz_cbz): Likewise.
3267 (thumb2_copy_table_branch): Likewise.
3268 (cleanup_pop_pc_16bit_all): Likewise.
3269 (thumb_copy_pop_pc_16bit): Likewise.
3270 (thumb_process_displaced_16bit_insn): Likewise.
3271 (decode_thumb_32bit_ld_mem_hints): Likewise.
3272 (thumb_process_displaced_32bit_insn): Likewise.
3273 (thumb_process_displaced_insn): Likewise.
3274 (arm_process_displaced_insn): Likewise.
3275 (arm_displaced_init_closure): Likewise.
3276 (arm_displaced_step_fixup): Add cast for closure.
3277 * arm-tdep.h: Include infrun.h.
3278 (displaced_step_closure): Rename to ...
3279 (arm_displaced_step_closure): ... this, extend
3280 displaced_step_closure.
3281 <u::svc::copy_svc_os>: Change type of parameter DSC.
3282 <cleanup>: Likewise.
3283 (arm_process_displaced_insn): Likewise.
3284 (arm_displaced_init_closure): Likewise.
3285 (displaced_read_reg): Likewise.
3286 (displaced_write_reg): Likewise.
3287 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3288 Adjust.
3289 * i386-tdep.h: Include infrun.h.
3290 (i386_displaced_step_closure): New typedef.
3291 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3292 i386_displaced_step_closure.
3293 (i386_displaced_step_fixup): Adjust.
3294 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3295 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3296 and unique_ptr.
3297 (ppc_displaced_step_fixup): Adjust.
3298 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3299 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3300 and unique_ptr.
3301 (s390_displaced_step_fixup): Adjust.
3302
b392b304
SM
33032017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3304
3305 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3306 Remove declarations.
3307
d5833c62
TT
33082017-10-20 Tom Tromey <tom@tromey.com>
3309
3310 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3311 std::vector.
3312 (gdb_bfd_record_inclusion): Update.
3313 (bfdp): Remove typedef.
3314
06d5bbc8
TT
33152017-10-20 Tom Tromey <tom@tromey.com>
3316
3317 * gdb_bfd.c (gdb_bfd_ref): Use new.
3318 (struct gdb_bfd_data): Add constructor, destructor, and member
3319 initializers.
3320 (gdb_bfd_unref): Use delete.
3321
2712ce2e
TT
33222017-10-20 Tom Tromey <tom@tromey.com>
3323
3324 * exec.c (exec_file_attach): Use new_bfd_ref.
3325 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3326 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3327 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3328 new_bfd_ref.
3329 * gdb_bfd.h (new_bfd_ref): New function.
3330
fcc8fb2f
PA
33312017-10-20 Pedro Alves <palves@redhat.com>
3332
3333 * main.c (captured_command_loop): Add attribute noinline.
3334
4c2287b0
SM
33352017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3336
3337 * interps.c (struct interp_factory): Add constructor.
3338 (interp_factory_p): Remove typedef.
3339 (DEF_VEC_P(interp_factory_p)): Remove.
3340 (interpreter_factories): Change type to std::vector.
3341 (interp_factory_register): Adjust.
3342 (interp_lookup): Adjust.
3343 (interpreter_completer): Adjust.
3344
3d415c26
TT
33452017-10-19 Tom Tromey <tom@tromey.com>
3346
3347 * break-catch-syscall.c (catch_syscall_completer): Use
3348 std::string, gdb::unique_xmalloc_ptr.
3349
395423c4
TT
33502017-10-19 Tom Tromey <tom@tromey.com>
3351
3352 * infcall.c (call_function_by_hand_dummy): Use std::string.
3353
54f70bc1
TT
33542017-10-19 Tom Tromey <tom@tromey.com>
3355
3356 * mi/mi-main.c (mi_cmd_execute): Update.
3357 * top.h (prepare_execute_command): Return scoped_value_mark.
3358 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3359 Add move constructor.
3360 * top.c (prepare_execute_command): Return scoped_value_mark.
3361 (execute_command): Update.
3362
63929e84
PA
33632017-10-19 Pedro Alves <palves@redhat.com>
3364
3365 * xml-support.c (xml_fetch_content_from_file): Check fread's
3366 return.
3367
a75868f5
PA
33682017-10-19 Pedro Alves <palves@redhat.com>
3369
3370 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3371 async.
3372 (handle_error_fd): New function.
3373 (ser_base_async): Add/delete an event loop file handler for
3374 error_fd.
3375
2edf834e
PA
33762017-10-19 Pedro Alves <palves@redhat.com>
3377
3378 * xml-support.c (xml_fetch_content_from_file): Don't read in
3379 chunks. Instead use fseek to determine the file's size, and read
3380 it in one go.
3381
c8ba13ad
KS
33822017-11-18 Keith Seitz <keiths@redhat.com>
3383
3384 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3385 types.
3386 Add whitespace to front of type name.
3387
37534686
KS
33882017-10-18 Keith Seitz <keiths@redhat.com>
3389
3390 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3391 DW_AT_accessibility.
3392
28c7c158
YQ
33932017-10-18 Yao Qi <yao.qi@linaro.org>
3394
3395 * features/tic6x-c62x-linux.c: Remove.
3396
30f0b101
TT
33972017-10-17 Tom Tromey <tom@tromey.com>
3398
3399 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3400 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3401 (do_mixed_source_and_assembly): Likewise.
3402
57e12da9
TT
34032017-10-17 Tom Tromey <tom@tromey.com>
3404
3405 * regcache.c (regcache::xfer_part): Remove assertion.
3406
7b700999
PA
34072017-10-17 Pedro Alves <palves@redhat.com>
3408
3409 * xml-support.c (xml_fetch_content_from_file): Call
3410 unique_ptr::release() instead unique_ptr::get() when passing
3411 through xrealloc.
3412
d3037ba6
YQ
34132017-10-17 Yao Qi <yao.qi@linaro.org>
3414
3415 * regcache.c (regcache::xfer_part): Remove parameters read and
3416 write, add parameter is_raw. All callers are updated.
3417
83d5a34d
KS
34182017-10-16 Keith Seitz <keiths@redhat.com>
3419
3420 * c-typeprint.c (enum access_specifier): Moved here from
3421 c_type_print_base.
3422 (output_access_specifier): New function.
3423 (c_type_print_base): Consider typedefs when assessing
3424 whether access labels are needed.
3425 Use output_access_specifier as needed.
3426 Output access specifier for typedefs, if needed.
3427 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3428 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3429 fields.
3430 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3431 accessor macros.
3432
87028b87
TT
34332017-10-16 Tom Tromey <tom@tromey.com>
3434
3435 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3436 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3437 * target.c (target_fileio_read_stralloc): Update.
3438 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3439 * target.h (target_fileio_read_stralloc): Return
3440 unique_xmalloc_ptr.
3441
b7b030ad
TT
34422017-10-16 Tom Tromey <tom@tromey.com>
3443
3444 * xml-syscall.c (xml_init_syscalls_info): Update.
3445 * xml-support.c (xinclude_start_include): Update.
3446 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3447 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3448 (xml_fetch_content_from_file): Likewise.
3449 * osdata.c (get_osdata): Update.
3450 * target.h (target_read_stralloc, target_get_osdata): Return
3451 unique_xmalloc_ptr.
3452 * solib-aix.c (solib_aix_get_library_list): Update.
3453 * solib-target.c (solib_target_current_sos): Update.
3454 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3455 * xml-tdesc.c (fetch_available_features_from_target): Update.
3456 (target_fetch_description_xml): Update.
3457 (file_read_description_xml): Update.
3458 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3459 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3460 (remote_pid_to_exec_file): Update.
3461 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3462 (target_get_osdata): Likewise.
3463
b80406ac
TT
34642017-10-16 Tom Tromey <tom@tromey.com>
3465
3466 * remote.c (remote_register_number_and_offset): Use std::vector.
3467 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3468 (putpkt_binary): Use gdb::def_vector.
3469 (compare_sections_command): Use gdb::byte_vector.
3470
a90ecff8
TT
34712017-10-16 Tom Tromey <tom@tromey.com>
3472
3473 * ppc-linux-nat.c (hwdebug_insert_point): Use
3474 gdb::unique_xmalloc_ptr, XDUP.
3475
2dc0e219
TT
34762017-10-16 Tom Tromey <tom@tromey.com>
3477
3478 * probe.c (parse_probes): Use std::string.
3479 (info_probes_for_ops, enable_probes_command)
3480 (disable_probes_command): Remove cleanups.
3481
b05628f0
TT
34822017-10-16 Tom Tromey <tom@tromey.com>
3483
3484 * buildsym.c (block_compar): Remove.
3485 (end_symtab_get_static_block): Use std::vector.
3486
a79b1bc6
SM
34872017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3488
3489 * memrange.h (struct mem_range): Define operator< and operator==.
3490 (mem_range_s): Remove.
3491 (DEF_VEC_O (mem_range_s)): Remove.
3492 (normalize_mem_ranges): Change parameter type to std::vector.
3493 * memrange.c (compare_mem_ranges): Remove.
3494 (normalize_mem_ranges): Change parameter type to std::vector,
3495 adjust to vector change.
3496 * exec.c (section_table_available_memory): Return vector, remove
3497 parameter.
3498 (section_table_read_available_memory): Adjust to std::vector
3499 change.
3500 * remote.c (remote_read_bytes): Adjust to std::vector
3501 change.
3502 * tracepoint.h (traceframe_available_memory): Change parameter
3503 type to std::vector.
3504 * tracepoint.c (traceframe_available_memory): Change parameter
3505 type to std::vector, adjust.
3506 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3507 std::vector change.
3508 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3509 unittests/memrange-selftests.c.
3510 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3511 * gdb/unittests/memrange-selftests.c: New file.
3512
63f0e930
PA
35132017-10-16 Pedro Alves <palves@redhat.com>
3514
3515 * elfread.c (probe_key_free): Rename range-for variable.
3516 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3517 (find_probe_by_pc, collect_probes): Rename range-for variable.
3518
c40c7bfc
YQ
35192017-10-16 Yao Qi <yao.qi@linaro.org>
3520
3521 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3522 * features/tic6x-c62x.c: Remove.
3523 * features/tic6x-c64x-linux.c: Remove.
3524 * features/tic6x-c64x.c: Remove.
3525 * features/tic6x-c64xp-linux.c: Remove.
3526 * features/tic6x-c64xp.c: Remove.
3527 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3528 initialize_tdesc_tic6x_*_linux functions.
3529 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3530 initialize_tdesc_tic6x_* functions.
3531
df27ae6a
YQ
35322017-10-16 Yao Qi <yao.qi@linaro.org>
3533
3534 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3535 tic6x-c62x.
3536 * regformats/tic6x-c62x.dat: Remove.
3537 * regformats/tic6x-c64x.dat: Remove.
3538 * regformats/tic6x-c64xp.dat: Remove.
3539
86766165
SM
35402017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3541
3542 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3543 (the !HAVE_LIBEXPAT version).
3544
824dfcc3
SM
35452017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3546
3547 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3548 const.
3549
2098b393
SM
35502017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3551
3552 * target.h: Include tracepoint.h.
3553 (enum trace_find_type): Move to tracepoint.h.
3554 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3555 * tracepoint.h: Don't include target.h
3556 (enum trace_find_type): Move from target.h.
3557 (parse_traceframe_info): Return a unique ptr.
3558 * tracepoint.c (current_traceframe_info): Change type to unique
3559 ptr.
3560 (free_traceframe_info): Remove.
3561 (clear_traceframe_info): Don't manually free
3562 current_traceframe_info.
3563 (free_result): Remove.
3564 (parse_traceframe_info): Return a unique ptr.
3565 (get_traceframe_info): Adjust to unique ptr.
3566 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3567 * remote.c (remote_traceframe_info): Return a unique ptr.
3568 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3569 ptr.
3570 * target-debug.h (target_debug_print_traceframe_info_up): New
3571 macro.
3572 * target-delegates.c: Regenerate.
3573
4cdd21a8
SM
35742017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3575
3576 * memrange.h (struct mem_range): Add constructors.
3577 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3578 std::vector<mem_range>.
3579 * tracepoint.c (free_traceframe_info): Don't manually free
3580 vector.
3581 (traceframe_info_start_memory): Adjust to vector change.
3582 (traceframe_available_memory): Likewise.
3583 * tracefile-tfile.c (build_traceframe_info): Likewise.
3584 * ctf.c (ctf_traceframe_info): Likewise.
3585
d0d292a2
SM
35862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3587
3588 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3589 std::vector<int>.
3590 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3591 (traceframe_info_start_tvar): Adjust to vector change.
3592 (parse_traceframe_info): Allocate with new.
3593 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3594 vector change.
3595 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3596 change.
3597 tfile_traceframe_info): Allocate with new.
3598 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3599 change.
3600
8d3c73ef
SM
36012017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3602
3603 * tracepoint.c (traceframe_info): Rename to...
3604 (current_traceframe_info): ...this.
3605 (clear_traceframe_info): Adjust.
3606 (get_traceframe_info): Adjust.
3607
b129dcac
SM
36082017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3609
3610 * nat/linux-osdata.c: Include algorithm.
3611 (compare_processes): Remove.
3612 (struct pid_pgid_entry): New struct.
3613 (linux_xfer_osdata_processgroups): Use std::vector instead of
3614 XNEWVEC.
3615
af5bf4ad
SM
36162017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3617
3618 * objfiles.h: Don't include symfile.h.
3619 (struct partial_symbol): Remove forward-declaration.
3620 (struct objfile) <global_psymbols, static_psymbols>: Change type
3621 to std::vector<partial_symbol *>.
3622 * objfiles.c (objfile::objfile): Don't memset those fields.
3623 (objfile::~objfile): Don't free those fields.
3624 * psympriv.h (struct psymbol_allocation_list): Remove
3625 forward-declaration.
3626 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3627 to std::vector.
3628 (start_psymtab_common): Change parameters to std::vector.
3629 * psymtab.c: Include algorithm.
3630 (require_partial_symbols): Call shrink_to_fit.
3631 (find_pc_sect_psymbol): Adjust to vector change.
3632 (match_partial_symbol): Likewise.
3633 (lookup_partial_symbol): Likewise.
3634 (psym_relocate): Likewise.
3635 (dump_psymtab): Likewise.
3636 (recursively_search_psymtabs): Likewise.
3637 (compare_psymbols): Remove.
3638 (sort_pst_symbols): Adjust to vector change.
3639 (start_psymtab_common): Likewise.
3640 (end_psymtab_common): Likewise.
3641 (psymbol_bcache_full): De-constify return value.
3642 (add_psymbol_to_bcache): Likewise.
3643 (extend_psymbol_list): Remove.
3644 (append_psymbol_to_list): Adjust to vector change.
3645 (add_psymbol_to_list): Likewise.
3646 (init_psymbol_list): Likewise.
3647 (maintenance_info_psymtabs): Likewise.
3648 (maintenance_check_psymtabs): Likewise.
3649 * symfile.h (struct psymbol_allocation_list): Remove.
3650 * symfile.c (reread_symbols): Adjust to vector change.
3651 * dbxread.c (start_psymtab): Change type of parameters.
3652 (dbx_symfile_read): Adjust to vector change.
3653 (read_dbx_symtab): Likewise.
3654 (start_psymtab): Change type of parameters.
3655 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3656 (create_partial_symtab): Likewise.
3657 (add_partial_symbol): Likewise.
3658 (write_one_signatured_type): Likewise.
3659 (recursively_write_psymbols): Likewise.
3660 * mdebugread.c (parse_partial_symbols): Likewise.
3661 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3662 (scan_xcoff_symtab): Adjust to vector change.
3663 (xcoff_initial_scan): Likewise.
3664
3ec5942f
SM
36652017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3666
3667 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3668
2399fe6a
YQ
36692017-10-13 Yao Qi <yao.qi@linaro.org>
3670
3671 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3672 Remove s390x-*-expedite, add s390x-expedite.
3673
4bf3f4a8
YQ
36742017-10-13 Yao Qi <yao.qi@linaro.org>
3675
3676 * features/s390-gs-linux64.c: Regenerated.
3677 * features/s390x-gs-linux64.c: Regenerated.
3678
9e86da07
TT
36792017-10-13 Tom Tromey <tom@tromey.com>
3680
3681 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3682 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3683 delete.
3684 * symfile.c (symbol_file_add_with_addrs): Use new.
3685 (symbol_file_add_separate): Update comment.
3686 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3687 * jit.c (jit_object_close_impl): Use new.
3688 (jit_unregister_code): Use delete.
3689 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3690 (~objfile): Rename from free_objfile.
3691 (free_objfile_separate_debug, do_free_objfile_cleanup)
3692 (free_all_objfiles, objfile_purge_solibs): Use delete.
3693 * objfiles.h (struct objfile): Add constructor and destructor.
3694 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3695 (allocate_objfile, free_objfile): Don't declare.
3696 (struct objstats): Add initializers.
3697
c2508e90
SM
36982017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3699
3700 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3701 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3702 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3703 * gdbarch.h: Regenerate.
3704 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3705 Adjust comment.
3706 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3707 (i386_displaced_step_fixup): Adjust comment.
3708 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3709
a900ff72
TT
37102017-10-12 Tom Tromey <tom@tromey.com>
3711
3712 * prologue-value.h (pv_area::store_would_trash): Return bool.
3713 (pv_area::find_reg): Likewise.
3714 * prologue-value.c (pv_area::store_would_trash): Return bool.
3715 (pv_area::find_reg): Likewise.
3716
f7b7ed97
TT
37172017-10-12 Tom Tromey <tom@tromey.com>
3718
3719 * s390-linux-tdep.c (s390_store, s390_load)
3720 (s390_check_for_saved, s390_analyze_prologue): Update.
3721 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3722 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3723 * prologue-value.h (class pv_area): Move from prologue-value.c.
3724 Change names of members. Add constructor, destructor, member
3725 functions.
3726 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3727 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3728 (pv_area_fetch, pv_area_scan): Don't declare.
3729 * prologue-value.c (struct pv_area::area_entry): Now member of
3730 pv_area.
3731 (struct pv_area): Move to prologue-value.h.
3732 (pv_area::pv_area): Rename from make_pv_area.
3733 (pv_area::~pv_area): Rename from free_pv_area.
3734 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3735 (clear_entries, find_entry, overlaps, store_would_trash, store)
3736 (fetch, find_reg, scan): Now member of pv_area.
3737 Remove "area" argument. Update.
3738 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3739 Update.
3740 * mn10300-tdep.c (push_reg, check_for_saved)
3741 (mn10300_analyze_prologue): Update.
3742 * mep-tdep.c (is_arg_spill, check_for_saved)
3743 (mep_analyze_prologue): Update.
3744 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3745 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3746 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3747 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3748 Update.
3749 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3750 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3751
466eecee
SM
37522017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3753
3754 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3755 * linux-nat.c (linux_nat_delete_thread): New variable.
3756 (lwp_free): Invoke linux_nat_delete_thread if set.
3757 (linux_nat_set_delete_thread): New function.
3758 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3759 thread delete callback.
3760 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3761 (_initialize_arm_linux_nat): Assign thread delete callback.
3762 * s390-linux-nat.c (s390_delete_thread): New function.
3763 (_initialize_s390_nat): Assign thread delete callback.
3764 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3765 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3766 function.
3767 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3768 declaration.
3769 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3770 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3771
f71c8822
TT
37722017-10-09 Tom Tromey <tom@tromey.com>
3773
3774 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3775 std::string.
3776 * tui/tui-layout.c (enum tui_status): Use std::string.
3777
981a3fb3
TT
37782017-10-11 Tom Tromey <tom@tromey.com>
3779
3780 * gdbthread.h (thread_command): Constify.
3781 * inferior.h (detach_command): Constify.
3782 * top.h (set_history, show_history): Constify.
3783 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3784 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3785 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3786 * printcmd.c (set_command): Constify.
3787 (non_const_set_command): New function.
3788 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3789 * breakpoint.c (enable_command, disable_command, delete_command)
3790 (catch_command, tcatch_command, set_breakpoint_cmd)
3791 (show_breakpoint_cmd): Constify.
3792 * macrocmd.c (macro_command): Constify.
3793 * infcmd.c (unset_command, kill_command, detach_command)
3794 (info_proc_cmd): Constify.
3795 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3796 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3797 (info_auto_load_cmd): Constify.
3798 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3799 (unset_tdesc_cmd): Constify.
3800 * ada-lang.c (set_ada_command, show_ada_command)
3801 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3802 * guile/guile.c (set_guile_command, show_guile_command)
3803 (info_guile_command): Constify.
3804 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3805 Constify.
3806 * skip.c (skip_command): Constify.
3807 * compile/compile.c (_initialize_compile): Constify.
3808 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3809 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3810 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3811 (maint_btrace_pt_show_cmd): Constify.
3812 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3813 Constify.
3814 * python/python.c (user_show_python, user_set_python): Constify.
3815 * mips-tdep.c (set_mips_command, show_mips_command)
3816 (set_mipsfpu_command): Constify.
3817 * record-btrace.c (cmd_record_btrace_start)
3818 (cmd_set_record_btrace, cmd_show_record_btrace)
3819 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3820 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3821 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3822 Constify.
3823 * symfile.c (overlay_command): Constify.
3824 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3825 * cli/cli-logging.c (set_logging_command, show_logging_command):
3826 Constify.
3827 * cli/cli-dump.c (dump_command, append_command)
3828 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3829 (tekhex_dump_command, binary_dump_command)
3830 (binary_append_command): Constify.
3831 * cli/cli-decode.c (struct cmd_list_element): Change type of
3832 "fun".
3833 * cli/cli-cmds.c (info_command, show_command, set_debug)
3834 (show_debug): Constify.
3835 (show_command): Add non-const overload.
3836 * top.c (set_history, show_history): Constify.
3837 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3838 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3839 * target.c (target_command): Constify.
3840 * sparc64-tdep.c (info_adi_command): Constify.
3841 * record-full.c (cmd_record_full_start): Constify.
3842 (set_record_full_command): Constify. Fix typo.
3843 (show_record_full_command): Constify.
3844 * thread.c (thread_command, thread_apply_command): Constify.
3845 * memattr.c (dummy_cmd): Constify.
3846 * value.c (function_command): Constify.
3847 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3848 * probe.c (info_probes_command): Constify.
3849 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3850 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3851 (show_thread_cmd, set_thread_default_cmd)
3852 (show_thread_default_cmd): Constify.
3853 (check_empty): Constify.
3854 * tracepoint.c (tfind_command): Constify.
3855 * cp-support.c (maint_cplus_command): Constify.
3856 * windows-tdep.c (info_w32_command): Constify.
3857 * record.c (cmd_record_start, set_record_command)
3858 (show_record_command, info_record_command, cmd_record_goto):
3859 Constify.
3860 * ravenscar-thread.c (set_ravenscar_command)
3861 (show_ravenscar_command): Constify.
3862 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3863 Constify.
3864 (add_internal_problem_command): Remove casts.
3865 * arc-tdep.c (maintenance_print_arc_command): Constify.
3866 * valprint.c (set_print, show_print, set_print_raw)
3867 (show_print_raw): Constify.
3868 * maint.c (maintenance_command, maintenance_info_command)
3869 (maintenance_print_command, maintenance_set_cmd)
3870 (maintenance_show_cmd, set_per_command_cmd)
3871 (show_per_command_cmd, maintenance_check_command): Constify.
3872 * language.c (set_check, show_check): Constify.
3873 * typeprint.c (show_print_type, set_print_type): Constify.
3874 * go32-nat.c (go32_info_dos_command): Constify.
3875
fdf44873
TT
38762017-10-11 Tom Tromey <tom@tromey.com>
3877
3878 * breakpoint.c (prepare_re_set_context): Remove.
3879 (breakpoint_re_set_one): Update. Don't use cleanups.
3880 (breakpoint_re_set): Use scoped_restore, std::string, and
3881 scoped_restore_current_language.
3882
81b1e71c
TT
38832017-10-11 Tom Tromey <tom@tromey.com>
3884
3885 * breakpoint.c (commands_command_1): Use std::string.
3886 (cleanup_executing_breakpoints): Remove.
3887 (bpstat_do_actions_1): Use scoped_restore.
3888 (bpstat_check_watchpoint): Use std::string.
3889 (decode_static_tracepoint_spec): Likewise.
3890 (break_range_command): Likewise.
3891 (watch_command_1): Likewise.
3892 (compare_breakpoints): Change argument types.
3893 (clear_command): Use std::vector.
3894 (cleanup_executing_breakpoints): Remove.
3895 (update_global_location_list): Use unique_xmalloc_ptr.
3896 (strace_command): Remove unused declaration.
3897
4f9d9906
JB
38982017-10-11 John Baldwin <jhb@FreeBSD.org>
3899
3900 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3901 * NEWS: Mention new FreeBSD/arm native configuration.
3902 * configure.host: Add arm*-*-freebsd*.
3903 * configure.nat: Likewise.
3904 * arm-fbsd-nat.c: New file.
3905
7176dfd2
JB
39062017-10-11 John Baldwin <jhb@FreeBSD.org>
3907
3908 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3909 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3910 * NEWS: Mention new FreeBSD/arm target.
3911 * configure.tgt: Add arm*-*-freebsd*.
3912 * arm-fbsd-tdep.c: New file.
3913 * arm-fbsd-tdep.h: New file.
3914
fe220226
MR
39152017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3916
3917 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3918 `gdbarch_elfcore_write_linux_prpsinfo'.
3919 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3920 method.
3921 (elf_internal_linux_prpsinfo): Remove declaration.
3922 * gdbarch.h: Regenerate.
3923 * gdbarch.c: Regenerate.
3924
a2f63b2e
MR
39252017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3926
3927 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3928 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3929
458ca1d0
PA
39302017-10-11 Pedro Alves <palves@redhat.com>
3931
3932 * breakpoint.c (reattach_breakpoints): Delete.
3933 * breakpoint.h (reattach_breakpoints): Delete.
3934
905014d7
SM
39352017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * symfile.c (registered_sym_fns): Make struct, not typedef.
3938 (DEF_VEC_O (registered_sym_fns)): Remove.
3939 (symtab_fns): Change type to std::vector.
3940 (add_symtab_fns): Adjust.
3941 (find_sym_fns): Adjust.
3942
56d704da
AK
39432017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3944
3945 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3946 * arc-tdep.h (arc_arch_is_em): New function.
3947 (arc_arch_is_hs): Likewise.
3948
7fa29be9
EB
39492017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3950
3951 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3952 parentheses in the declaration.
3953 (macro_lookup_inclusion): Likewise.
3954 (macro_lookup_definition): Likewise.
3955 * p-lang.h (pascal_builtin_types): Likewise.
3956 * tui/tui-data.c (tui_win_list): Likewise.
3957 * tui/tui-data.h (tui_win_list): Likewise.
3958 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3959
d9b477e3
KB
39602017-10-11 Mark Rages <markrages@gmail.com>
3961
3962 * target-memory.c (block_boundaries): Fix for block address not
3963 aligned on block size.
3964
65630365
PA
39652017-10-10 Pedro Alves <palves@redhat.com>
3966 Tom Tromey <tom@tromey.com>
3967
3968 * breakpoint.c (struct captured_breakpoint_query_args)
3969 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3970 (print_breakpoint): New.
3971 * breakpoint.h (print_breakpoint): Declare.
3972 * common/common-exceptions.h (enum return_reason): Remove
3973 references to catch_exceptions.
3974 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3975 Delete.
3976 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3977 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3978 * gdb.h: Delete.
3979 * gdbthread.h (thread_select): Declare.
3980 * mi/mi-cmd-break.c: Don't include gdb.h.
3981 (breakpoint_notify): Use print_breakpoint.
3982 * mi/mi-cmd-catch.c: Don't include gdb.h.
3983 * mi/mi-interp.c: Don't include gdb.h.
3984 (mi_print_breakpoint_for_event): New.
3985 (mi_breakpoint_created, mi_breakpoint_modified): Use
3986 mi_print_breakpoint_for_event.
3987 * mi/mi-main.c: Don't include gdb.h.
3988 (mi_cmd_thread_select): Parse the global thread ID here. Use
3989 thread_select instead of gdb_thread_select.
3990 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3991 of using gdb_list_thread_ids.
3992 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3993 FILEIO_ENOSYS here.
3994 (remote_fileio_request): Use TRY/CATCH instead of
3995 catch_exceptions.
3996 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3997 (symbol_file_add_from_memory_wrapper): Delete.
3998 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3999 * thread.c: Don't include gdb.h.
4000 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4001 (thread_alive): Use thread_select.
4002 (do_captured_thread_select): Delete, parts salvaged as ...
4003 (thread_select): ... this new function.
4004 (gdb_thread_select): Delete.
4005
bf469271
PA
40062017-10-10 Pedro Alves <palves@redhat.com>
4007 Tom Tromey <tom@tromey.com>
4008
4009 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4010 and reverse logic.
4011 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4012 No longer macros. Instead ...
4013 (enum wp_check_result): They're now values of this new
4014 enumeration.
4015 (watchpoint_check): Change return type to wp_check_result and
4016 parameter type to bpstat.
4017 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4018 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4019 catch_errors. Reverse logic of watchpoint_check call.
4020 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4021 pointer as parameter.
4022 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4023 * common/common-exceptions.c (throw_exception_sjlj): Update
4024 comments to avoid mentioning catch_errors.
4025 * exceptions.c (catch_errors): Delete.
4026 * exceptions.h: Update comments to avoid mentioning catch_errors.
4027 (catch_errors_ftype, catch_errors): Delete.
4028 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4029 (hook_stop_stub): Delete.
4030 (restore_selected_frame): Change return type to void, and
4031 parameter type to const frame_id &.
4032 (restore_infcall_control_state): Use TRY/CATCH instead of
4033 catch_errors.
4034 * main.c (captured_command_loop): Return void and remove
4035 parameter. Remove references to catch_errors.
4036 (captured_main): Use TRY/CATCH instead of catch_errors.
4037 * objc-lang.c (objc_submethod_helper_data)
4038 (find_objc_msgcall_submethod_helper): Delete.
4039 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4040 catch_errors.
4041 * record-full.c (record_full_message): Return void.
4042 (record_full_message_args, record_full_message_wrapper): Delete.
4043 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4044 instead of catch_errors.
4045 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4046 parameter type to int.
4047 * solib-darwin.c (open_symbol_file_object): Ditto.
4048 * solib-dsbt.c (open_symbol_file_object): Ditto.
4049 * solib-frv.c (open_symbol_file_object): Ditto.
4050 * solib-svr4.c (open_symbol_file_object): Ditto.
4051 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4052 * solib.c (update_solib_list): Use TRY/CATCH instead of
4053 catch_errors.
4054 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4055 Change type.
4056 * symmisc.c (struct print_symbol_args): Remove.
4057 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4058 (print_symbol): Change type.
4059 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4060 and remove parameters.
4061 (catch_errors): New.
4062 (get_windows_debug_event): Adjust.
4063
1a56bfa5
TT
40642017-10-09 Tom Tromey <tom@tromey.com>
4065
4066 * mi/mi-main.c (free_splay_tree): Remove.
4067 (list_available_thread_groups): Use splay_tree_up.
4068 * common/gdb_splay_tree.h: New file.
4069
0c478e2d
TT
40702017-10-09 Tom Tromey <tom@tromey.com>
4071
4072 * mi/mi-main.c (do_nothing): Remove.
4073 (list_available_thread_groups): Update.
4074
cbd2b4e3
PA
40752017-10-09 Pedro Alves <palves@redhat.com>
4076
4077 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4078 reading registers when switching context.
4079
a181c0bf
JB
40802017-10-09 John Baldwin <jhb@FreeBSD.org>
4081
4082 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4083 (fbsd_convert_siginfo): Likewise.
4084 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4085
6e66f753
SM
40862017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4087
4088 * configure.ac (try_guile_versions): Remove guile-2.2.
4089 * configure: Regenerate.
4090
890e9790
TT
40912017-10-09 Tom Tromey <tom@tromey.com>
4092
4093 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4094 (COMPILE.pre): Use $(CXX).
4095
109483d9
PA
40962017-10-09 Pedro Alves <palves@redhat.com>
4097
4098 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4099 Use bool.
4100 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4101 * cp-support.h (cp_remove_params): Now returns a
4102 gdb::unique_xmalloc_ptr.
4103 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4104 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4105 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4106 returning a gdb::unique_xmalloc_ptr.
4107 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4108 * stack.c (find_frame_funname): Adjust to cp_remove_params
4109 returning a gdb::unique_xmalloc_ptr.
4110
791afaa2
TT
41112017-10-08 Tom Tromey <tom@tromey.com>
4112
4113 * dwarf2read.c (dwarf2_get_dwz_file): Use
4114 gdb::unique_xmalloc_ptr.
4115 (find_slot_in_mapped_hash): Likewise.
4116 (dwarf2_physname): Likewise.
4117 (create_dwo_unit_in_dwp_v1): Use std::string.
4118 (create_dwo_unit_in_dwp_v2): Likewise.
4119 (lookup_dwo_cutu): Likewise.
4120 (inherit_abstract_dies): Use std::vector.
4121 (read_array_type): Likewise.
4122 (dwarf_decode_macros): Remove unused declaration.
4123 (unsigned_int_compar): Remove.
4124 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4125 (psymtabs_addrmap_cleanup): Remove.
4126
30a9c02f
TT
41272017-10-08 Tom Tromey <tom@tromey.com>
4128
4129 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4130 * frame.h (frame_cleanup_after_sniffer): Declare.
4131 (frame_prepare_for_sniffer): Return void.
4132 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4133 type of argument.
4134 (frame_prepare_for_sniffer): Return void.
4135
757325a3
TT
41362017-10-08 Tom Tromey <tom@tromey.com>
4137
4138 * utils.h (make_cleanup_value_free): Remove.
4139 * utils.c (do_value_free, struct cleanup): Remove.
4140 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4141 Use gdb_value_up.
4142 * value.h (struct value_deleter): New.
4143 (gdb_value_up): New typedef.
4144
b9c04fb2
TT
41452017-10-08 Tom Tromey <tom@tromey.com>
4146
4147 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4148 (make_cleanup_free_search_symbols): Remove.
4149 (search_symbols): Return std::vector.
4150 (symbol_search::compare_search_syms): Now member of
4151 symbol_search. Change arguments.
4152 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4153 (symtab_symbol_info, rbreak_command): Update.
4154 * symtab.h (struct symbol_search) <next>: Remove.
4155 Add constructors.
4156 (symbol_search::operator<): New function.
4157 (symbol_search::operator==): New function.
4158 (search_symbols): Remove std::vector.
4159 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4160 (symbol_search::compare_search_syms): Declare.
4161
0d28b0a5
YQ
41622017-10-06 Yao Qi <yao.qi@linaro.org>
4163
4164 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4165 arch/aarch64-insn.o.
4166 Remove one rule.
4167 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4168
71917808
YQ
41692017-10-06 Yao Qi <yao.qi@linaro.org>
4170
4171 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4172 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4173 arch/arm-linux.o respectively.
4174 * configure.tgt: Likewise.
4175
2081b2b2
YQ
41762017-10-06 Yao Qi <yao.qi@linaro.org>
4177
4178 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4179 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4180
a1b85d28
PA
41812017-10-06 Pedro Alves <palves@redhat.com>
4182
4183 * windows-nat.c: Include <algorithm>.
4184
d97987e2
YQ
41852017-10-06 Yao Qi <yao.qi@linaro.org>
4186
4187 * configure.tgt (i386_tobjs): New variable.
4188 (amd64_tobjs): New variable.
4189 Set $cpu_obs and $os_obs.
4190
f38307f5
YQ
41912017-10-06 Yao Qi <yao.qi@linaro.org>
4192
4193 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4194 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4195 (clean): Remove object files and dependency files.
4196 (distclean): Remove the directory.
4197 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4198 * configure: Re-generated.
4199 * configure.tgt: Replace amd64.o with arch/amd64.o.
4200
2f924de6
JM
42012017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4202
4203 PR build/22188
4204 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4205 and SETEND.
4206
2fd9d7ca
PA
42072017-10-05 Pedro Alves <palves@redhat.com>
4208
4209 * linux-nat.c (linux_child_follow_fork): When following the parent
4210 and detaching the child, consult the parent thread's architecture
4211 instead of the child's.
4212
d13b8493
UW
42132017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4214
4215 * ax.h: Do not include "doublest.h".
4216 (union agent_val): Remove.
4217
3b4b2f16
UW
42182017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4219
4220 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4221 (decimal_to_string): Return std::string object.
4222 (decimal_from_string): Accept std::string object. Return bool.
4223 (decimal_from_integral, decimal_from_doublest): Remove.
4224 (decimal_from_longest): Add prototype.
4225 (decimal_from_ulongest): Likewise.
4226 (decimal_to_longest): Likewise.
4227 (decimal_from_doublest): Likewise.
4228 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4229 (MAX_DECIMAL_STRING): Move here.
4230 (decimal_to_string): Return std::string object.
4231 (decimal_from_string): Accept std::string object. Return bool.
4232 (decimal_from_integral): Remove, replace by ...
4233 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4234 (decimal_to_longest): New function.
4235 (decimal_from_floating): Remove, replace by ...
4236 (decimal_from_doublest): ... this new function.
4237 (decimal_to_doublest): Update to new decimal_to_string interface.
4238
4239 * value.c (unpack_long): Use decimal_to_longest.
4240 * valops.c (value_cast): Use decimal_from_doublest instead of
4241 decimal_from_floating. Use decimal_from_[u]longest isntead of
4242 decimal_from_integral.
4243 * valarith.c (value_args_as_decimal): Likewise.
4244 * valprint.c (print_decimal_floating): Update to new
4245 decimal_to_string interface.
4246 * printcmd.c (printf_decfloat): Likewise.
4247 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4248
1841ee5d
UW
42492017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4250
4251 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4252 * gdbtypes.c: Include "floatformat.h".
4253 * value.c: Likewise.
4254 * m68k-tdep.c: Likewise.
4255
4256 * findvar.c: Do not include "floatformat.h".
4257 * amd64-darwin-tdep.c: Likewise.
4258 * arm-linux-tdep.c: Likewise.
4259 * i386-darwin-tdep.c: Likewise.
4260 * i387-tdep.c: Likewise.
4261 * m68k-linux-tdep.c: Likewise.
4262 * mep-tdep.c: Likewise.
4263 * mips-tdep.c: Likewise.
4264 * nios2-tdep.c: Likewise.
4265 * s390-linux-tdep.c: Likewise.
4266 * sparc-obsd-tdep.c: Likewise.
4267 * sparc-tdep.c: Likewise.
4268 * sparc64-tdep.c: Likewise.
4269 * spu-tdep.c: Likewise.
4270 * tic6x-tdep.c: Likewise.
4271 * tilegx-tdep.c: Likewise.
4272 * vax-tdep.c: Likewise.
4273 * xstormy16-tdep.c: Likewise.
4274 * xtensa-tdep.c: Likewise.
4275
4276 * top.c: Do not include "doublest.h".
4277 * aarch64-tdep.c: Likewise.
4278 * alpha-tdep.c: Likewise.
4279 * arm-linux-tdep.c: Likewise.
4280 * m68k-linux-tdep.c: Likewise.
4281 * tilegx-tdep.c: Likewise.
4282 * xstormy16-tdep.c: Likewise.
4283
a80a6471
JB
42842017-10-05 John Baldwin <jhb@FreeBSD.org>
4285
4286 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4287 (mipsn32_fbsd_sigframe): Define.
4288 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4289 for FreeBSD/mipsn32.
4290
12c4bd7f
JB
42912017-10-05 John Baldwin <jhb@FreeBSD.org>
4292
4293 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4294 AT_HWCAP.
4295
c91933e9
TG
42962017-10-05 Tristan Gingold <tgingold@free.fr>
4297
4298 * MAINTAINERS (Misc): Update my email address.
4299
5cd63fda
PA
43002017-10-04 Pedro Alves <palves@redhat.com>
4301
4302 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4303 it instead of target_gdbarch.
4304 (get_remote_state, get_remote_packet_size): Adjust
4305 get_remote_arch_state calls, passing down target_gdbarch
4306 explicitly.
4307 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4308 'gdbarch' and use it instead of target_gdbarch.
4309 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4310 passing down target_gdbarch explicitly.
4311 (struct stop_reply) <arch>: New field.
4312 (remote_parse_stop_reply): Use the stopped thread's architecture,
4313 not the current inferior's. Save the architecture in the
4314 stop_reply.
4315 (process_stop_reply): Use the stop reply's architecture.
4316 (process_g_packet, remote_fetch_registers)
4317 (remote_prepare_to_store, store_registers_using_G)
4318 (remote_store_registers): Adjust get_remote_arch_state calls,
4319 using the regcache's architecture.
4320 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4321 passing down target_gdbarch explicitly.
4322 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4323 beneath instead of calling target_gdbarch.
4324 * target.c (default_thread_architecture): Use the specified
4325 inferior's architecture, instead of the current inferior's
4326 architecture (via target_gdbarch).
4327
ed4227b7
PA
43282017-10-04 Pedro Alves <palves@redhat.com>
4329
4330 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4331 case.
4332 (regcache_print): Handle !target_has_registers here instead.
4333
55b11ddf
PA
43342017-10-04 Pedro Alves <palves@redhat.com>
4335
4336 * frame.c (create_test_frame): Delete.
4337 * frame.h (create_test_frame): Delete.
4338 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4339 (class regcache_test): Delete.
4340 (test_target_has_registers, test_target_has_stack)
4341 (test_target_has_memory, test_target_prepare_to_store)
4342 (test_target_store_registers): New functions.
4343 (test_target_ops): New class.
4344 (register_to_value_test): Error out if there's already a
4345 process_stratum (or higher) target pushed. Create a fuller mock
4346 environment, with mock target_ops, inferior, address space, thread
4347 and inferior_ptid.
4348 * progspace.c (struct address_space): Move to ...
4349 * progspace.h (struct address_space): ... here.
4350 * regcache.h (regcache::~regcache, regcache::raw_write)
4351 [GDB_SELF_TEST]: No longer virtual.
4352
4c71c105
SM
43532017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4354
4355 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4356
73dcd72d
PA
43572017-10-04 Pedro Alves <palves@redhat.com>
4358
4359 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4360 out of 'between TRY and CATCH'.
4361
44704526
PA
43622017-10-04 Pedro Alves <palves@redhat.com>
4363
4364 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4365 * common/common-exceptions.h (TRY): Open an outermost scope.
4366 Expand intro comment.
4367 (CATCH): Reindent.
4368 (END_CATCH): Close the outermost scope.
4369 * completer.c (complete_line_internal): Add missing END_CATCH.
4370
bc3b087d
SDJ
43712017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4372
4373 * NEWS (Changes since GDB 8.0): Add entry about new
4374 'set-cwd-on-gdbserver' feature.
4375 (New remote packets): Add entry for QSetWorkingDir.
4376 * common/common-inferior.h (set_inferior_cwd): New prototype.
4377 * infcmd.c (set_inferior_cwd): Remove "static".
4378 (show_cwd_command): Expand text to include remote debugging.
4379 * remote.c: Add PACKET_QSetWorkingDir.
4380 (remote_protocol_features) <QSetWorkingDir>: New entry for
4381 PACKET_QSetWorkingDir.
4382 (extended_remote_set_inferior_cwd): New function.
4383 (extended_remote_create_inferior): Call
4384 "extended_remote_set_inferior_cwd".
4385 (_initialize_remote): Call "add_packet_config_cmd" for
4386 QSetWorkingDir.
4387
d092c5a2
SDJ
43882017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4389
4390 * NEWS (New commands): Mention "set/show cwd".
4391 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4392 "cd" command's help text.
4393 * common/common-inferior.h (get_inferior_cwd): New prototype.
4394 * infcmd.c (inferior_cwd_scratch): New global variable.
4395 (set_inferior_cwd): New function.
4396 (get_inferior_cwd): Likewise.
4397 (set_cwd_command): Likewise.
4398 (show_cwd_command): Likewise.
4399 (_initialize_infcmd): Add "set/show cwd" commands.
4400 * inferior.h (class inferior) <cwd>: New field.
4401 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4402 (fork_inferior): Change inferior's cwd before its execution.
4403 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4404 to CreateProcess.
4405
7da0a886
SDJ
44062017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4407
4408 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4409 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4410 (COMMON_OBS): Add gdb_tilde_expand.o.
4411 * common/gdb_tilde_expand.c: New file.
4412 * common/gdb_tilde_expand.h: Likewise.
4413
db8dd160
MR
44142017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4415
4416 * gdbarch.sh (objfile): Remove duplicate declaration.
4417 * gdbarch.h: Regenerate.
4418
f8bfbf22
TT
44192017-10-03 Tom Tromey <tom@tromey.com>
4420
4421 * utils.c (internal_vproblem): Use string_vprintf.
4422
5178ed48
TT
44232017-10-03 Tom Tromey <tom@tromey.com>
4424
4425 * printcmd.c (info_symbol_command): Use std::string.
4426
8cff8730
TT
44272017-10-03 Tom Tromey <tom@tromey.com>
4428
4429 * top.c (gdb_safe_append_history): Use std::string.
4430
895b8f30
TT
44312017-10-03 Tom Tromey <tom@tromey.com>
4432
4433 * event-top.c (stdin_event_handler): Update.
4434 * main.c (captured_main_1): Update.
4435 * top.h (make_delete_ui_cleanup): Remove.
4436 (struct ui): Add constructor and destructor.
4437 (new_ui, delete_ui): Remove.
4438 * top.c (make_delete_ui_cleanup): Remove.
4439 (new_ui_command): Use std::unique_ptr.
4440 (delete_ui_cleanup): Remove.
4441 (ui::ui): Rename from new_ui. Update.
4442 (free_ui): Remove.
4443 (ui::~ui): Rename from delete_ui. Update.
4444
0efef640
TT
44452017-10-03 Tom Tromey <tom@tromey.com>
4446
4447 * symfile.c (load_progress): Use gdb::byte_vector.
4448
245ad7d3
TT
44492017-10-03 Tom Tromey <tom@tromey.com>
4450
4451 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4452 declaration.
4453 * printcmd.c (x_command): Remove unused declaration.
4454 * symfile.c (symbol_file_command): Remove unused declaration.
4455
e05550d7
TT
44562017-10-03 Tom Tromey <tom@tromey.com>
4457
4458 * utils.c (internal_vproblem): Use std::string.
4459 (defaulted_query): Likewise.
4460
b95de2b7
TT
44612017-10-03 Tom Tromey <tom@tromey.com>
4462
4463 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4464 * top.c (execute_command_to_string): Update.
4465 * utils.c (make_cleanup_restore_page_info): Remove.
4466 (do_restore_page_info_cleanup): Remove.
4467 (set_batch_flag_and_restore_page_info):
4468 New.
4469 (make_cleanup_restore_page_info): Remove.
4470 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4471 (~set_batch_flag_and_restore_page_info): New
4472 (make_cleanup_restore_uinteger): Remove.
4473 (make_cleanup_restore_integer): Remove.
4474 (struct restore_integer_closure): Remove.
4475 (restore_integer): Remove.
4476 * utils.h (struct set_batch_flag_and_restore_page_info): New
4477 class.
4478 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4479 (make_cleanup_restore_page_info): Remove.
4480 (make_cleanup_restore_uinteger) Remove.
4481 (make_cleanup_restore_integer) Remove.
4482
07036511
TT
44832017-10-03 Tom Tromey <tom@tromey.com>
4484
4485 * record-full.h (record_full_gdb_operation_disable_set): Return
4486 scoped_restore_tmpl<int>.
4487 * infrun.c (adjust_pc_after_break): Update.
4488 (handle_signal_stop): Update.
4489 * record-full.c (record_full_gdb_operation_disable_set): Return
4490 scoped_restore_tmpl<int>.
4491 (record_full_wait_1, record_full_insert_breakpoint)
4492 (record_full_remove_breakpoint, record_full_save)
4493 (record_full_goto_insn): Update.
4494
45320ffa
TT
44952017-10-02 Tom Tromey <tom@tromey.com>
4496
4497 PR rust/22236:
4498 * rust-lang.c (rust_val_print_str): New function.
4499 (val_print_struct): Call it.
4500 (rust_subscript): Preserve name of slice type.
4501
b3e3859b
TT
45022017-10-02 Tom Tromey <tom@tromey.com>
4503
4504 * rust-lang.c (rust_subscript): Handle slices in
4505 EVAL_AVOID_SIDE_EFFECTS case.
4506
01af5e0d
TT
45072017-10-02 Tom Tromey <tom@tromey.com>
4508
4509 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4510
888e3ddb
TT
45112017-10-02 Tom Tromey <tom@tromey.com>
4512
4513 * rust-lang.h (rust_slice_type): Add "extern".
4514
cc536b21
PA
45152017-10-02 Tom Tromey <tom@tromey.com>
4516 Pedro Alves <palves@redhat.com>
4517
4518 * ada-lang.h (ada_exc_info::operator<): Make const.
4519 (ada_exc_info::operator==): Make const.
4520 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4521 Make const.
4522
386c8614
TT
45232017-09-29 Tom Tromey <tom@tromey.com>
4524
4525 * target.c (read_whatever_is_readable): Change type of "result".
4526 Update.
4527 (free_memory_read_result_vector): Remove.
4528 (read_memory_robust): Change return type. Update.
4529 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4530 bin2hex, std::string.
4531 * target.h (memory_read_result_s): Remove typedef.
4532 (free_memory_read_result_vector): Remove.
4533 (read_memory_robust): Return std::vector.
4534
789c4b5e
TT
45352017-09-29 Tom Tromey <tom@tromey.com>
4536
4537 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4538
ab816a27
TT
45392017-09-29 Tom Tromey <tom@tromey.com>
4540
4541 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4542 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4543 operator< and operator==.
4544 (ada_exceptions_list): Return a std::vector.
4545 * ada-lang.c (ada_exc_info::operator<): Rename from
4546 compare_ada_exception_info.
4547 (ada_exc_info::operator==): New.
4548 (sort_remove_dups_ada_exceptions_list): Change type of
4549 "exceptions".
4550 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4551 (ada_add_global_exceptions): Likewise.
4552 (ada_exceptions_list_1): Return a std::vector.
4553 (ada_exceptions_list): Likewise.
4554
52f9abe4
TT
45552017-09-29 Tom Tromey <tom@tromey.com>
4556
4557 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4558 'std::set *'.
4559 (print_one_inferior): Update.
4560 (free_vector_of_ints): Remove.
4561 (list_available_thread_groups): Change "ids" to std::set.
4562 (mi_cmd_list_thread_groups): Update.
4563 (struct collect_cores_data) <core>: Now a std::set.
4564 (collect_cores): Update.
4565 (unique): Remove.
4566 (print_one_inferior): Update.
4567
dcd5ddcc
TT
45682017-09-29 Tom Tromey <tom@tromey.com>
4569
4570 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4571 (mi_execute_async_cli_command): Likewise.
4572 (mi_cmd_trace_frame_collected): Use field_fmt.
4573
45d288cc
TT
45742017-09-29 Tom Tromey <tom@tromey.com>
4575
4576 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4577 gdb::byte_vector.
4578
6afe2f4a
TT
45792017-09-29 Tom Tromey <tom@tromey.com>
4580
4581 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4582
9813429a
TT
45832017-09-29 Tom Tromey <tom@tromey.com>
4584
4585 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4586
2d6960b4
TT
45872017-09-29 Tom Tromey <tom@tromey.com>
4588
4589 * varobj.h (varobj_gen_name): Return std::string.
4590 * varobj.c (varobj_gen_name): Return std::string.
4591 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4592 (mi_cmd_var_delete): Don't copy "name".
4593
784c453a
TT
45942017-09-29 Tom Tromey <tom@tromey.com>
4595
4596 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4597 (mi_cmd_break_insert_1): Update.
4598
a9bc57b9
TT
45992017-09-29 Tom Tromey <tom@tromey.com>
4600
4601 * target.h (make_scoped_defer_target_commit_resume): Update.
4602 * target.c (make_scoped_defer_target_commit_resume): Rename from
4603 make_cleanup_defer_target_commit_resume. Return a
4604 scoped_restore.
4605 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4606
9754d8c4
TT
46072017-09-29 Tom Tromey <tom@tromey.com>
4608
4609 * main.c (captured_main_1): Remove unused declaration.
4610 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4611
99ef965c
TT
46122017-09-29 Tom Tromey <tom@tromey.com>
4613
4614 * symtab.c (search_symbols): Remove unused outer cleanup.
4615 (make_source_files_completion_list): Remove unused declaration.
4616
42518ba7
TT
46172017-09-29 Tom Tromey <tom@tromey.com>
4618
4619 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4620
726b2169
TT
46212017-09-29 Tom Tromey <tom@tromey.com>
4622
4623 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4624 gdb::byte_vector.
4625
55b06432
TT
46262017-09-29 Tom Tromey <tom@tromey.com>
4627
4628 * complaints.c (vcomplaint): Use std::string.
4629
8abcee91
TT
46302017-09-29 Tom Tromey <tom@tromey.com>
4631
4632 * tracepoint.c (trace_variable_command): Use std::string.
4633 (encode_actions_1): Remove unused declarations.
4634 (create_tsv_from_upload): Use std::string.
4635
6ad94bc7
TT
46362017-09-29 Tom Tromey <tom@tromey.com>
4637
4638 * cp-support.c (gdb_demangle): Use std::string.
4639
2003f3d8
TT
46402017-09-29 Tom Tromey <tom@tromey.com>
4641
4642 * stack.c (parse_frame_specification): Use std::string
4643 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4644
8f8accb5
TT
46452017-09-29 Tom Tromey <tom@tromey.com>
4646
4647 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4648
200aa7b1
TT
46492017-09-29 Tom Tromey <tom@tromey.com>
4650
4651 * utils.c (vfprintf_maybe_filtered): Use std::string.
4652 (vfprintf_unfiltered): Likewise.
4653
606aae8a
TT
46542017-09-29 Tom Tromey <tom@tromey.com>
4655
4656 * event-top.c (top_level_prompt): Return std::string.
4657 (display_gdb_prompt): Update.
4658
bd413795
TT
46592017-09-29 Tom Tromey <tom@tromey.com>
4660
4661 * unittests/common-utils-selftests.c (format): New function.
4662 (string_vprintf_tests): New function.
4663 (_initialize_common_utils_selftests): Register new tests.
4664 * common/common-utils.c (string_vprintf): New function.
4665 * common/common-utils.h (string_vprintf): Declare.
4666
256642e8
PA
46672017-09-29 Pedro Alves <palves@redhat.com>
4668
4669 * common/rsp-low.c (unpack_varlen_hex): Constify.
4670 * common/rsp-low.h (unpack_varlen_hex): Constify.
4671 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4672 Constify.
4673 * remote.c (remote_set_permissions, read_ptid)
4674 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4675 (remote_static_tracepoint_marker_at)
4676 (remote_static_tracepoint_markers_by_strid)
4677 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4678 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4679 (parse_tracepoint_definition, parse_tsv_definition)
4680 (parse_static_tracepoint_marker_definition): Constify.
4681 * tracepoint.h (parse_static_tracepoint_marker_definition)
4682 (parse_trace_status, parse_tracepoint_status)
4683 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4684
b6bb3468
PA
46852017-09-29 Pedro Alves <palves@redhat.com>
4686
4687 * remote.c (target_buf, target_buf_size): Delete.
4688 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4689 Use the connection's packet buffer instead.
4690 All callers adjusted.
4691 (_initialize_remote): Remove references to target_buf and
4692 target_buf_size.
4693
b2f8eb7a
PA
46942017-09-28 Pedro Alves <palves@redhat.com>
4695
4696 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4697 unittests/common-utils-selftests.c.
4698 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4699 (COMMON_OBS): Remove utils-selftests.o.
4700 * utils-selftests.c: Move to ...
4701 * unittests/common-utils-selftests.c: ... here and rename self
4702 test to "string_printf".
4703
08302ed2
DE
47042017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4705
4706 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4707 having NULL cus or tus.
4708
96a5a1d3
UW
47092017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4710
4711 * arm-tdep.c: (convert_from_extended): Remove.
4712 (convert_to_extended): Likewise.
4713 (arm_extract_return_value): Use convert_typed_floating.
4714 (arm_store_return_value): Likewise.
4715
4716 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4717 * sh-tdep.c: Do not include "floatformat.h".
4718 (sh_littlebyte_bigword_type): New function.
4719 (sh_register_convert_to_virtual): Use convert_typed_floating.
4720 (sh_register_convert_to_raw): Likewise.
4721 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4722 (sh64_littlebyte_bigword_type): New function.
4723 (sh64_extract_return_value): Use convert_typed_floating.
4724 (sh64_register_convert_to_virtual): Likewise.
4725 (sh64_register_convert_to_raw): Likewise.
4726
0db7851f
UW
47272017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4728
4729 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4730 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4731
4732 * gdbtypes.h (union type_specific): Make field floatformat hold
4733 just a single struct floatformat, not an array.
4734 (floatformat_from_type): Move here.
4735 * gdbtypes.c (floatformat_from_type): Move here. Update to
4736 changed TYPE_FLOATFORMAT definition.
4737 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4738 (recursive_dump_type): Likewise.
4739 (init_float_type): Install correct floatformat for byte order.
4740 (arch_float_type): Likewise.
4741
77b7c781
UW
47422017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4743
4744 * gdbtypes.c (init_type): Change incoming argument from
4745 length-in-bytes to length-in-bits. Assert length is a
4746 multiple of TARGET_CHAR_BITS.
4747 (arch_type, arch_flags_type): Likewise.
4748 (init_integer_type): Update call to init_type.
4749 (init_character_type): Likewise.
4750 (init_boolean_type): Likewise.
4751 (init_float_type): Likewise.
4752 (init_decfloat_type): Likewise.
4753 (init_complex_type): Likewise.
4754 (init_pointer_type): Likewise.
4755 (objfile_type): Likewise.
4756 (arch_integer_type): Update call to arch_type.
4757 (arch_character_type): Likewise.
4758 (arch_boolean_type): Likewise.
4759 (arch_float_type): Likewise.
4760 (arch_decfloat_type): Likewise.
4761 (arch_complex_type): Likewise.
4762 (arch_pointer_type): Likewise.
4763 (gdbtypes_post_init): Likewise.
4764
4765 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4766 (read_base_type): Likewise.
4767 * mdebugread.c (basic_type): Likewise.
4768 * stabsread.c (dbx_init_float_type): Likewise.
4769 (rs6000_builtin_type): Likewise.
4770 (read_range_type): Likewise. Also, fix call to init_integer_type
4771 with erroneous length argument.
4772
4773 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4774 * d-lang.c (build_d_types): Likewise.
4775 * f-lang.c (build_fortran_types): Likewise.
4776 * go-lang.c (build_go_types): Likewise.
4777 * opencl-lang.c (build_opencl_types): Likewise.
4778 * jit.c (finalize_symtab): Likewise.
4779 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4780 (build_std_type_info_type): Likewise.
4781 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4782 update call to arch_flags_type.
4783
4784 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4785 arch_type.
4786 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4787 * windows-tdep.c (windows_get_tlb_type): Likewise.
4788
4789 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4790 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4791 * m32c-tdep.c (make_types): Likewise.
4792 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4793 (rl78_psw_type): Update call to arch_flags_type.
4794 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4795 * rx-tdep.c (rx_psw_type): Likewise.
4796 (rx_fpsw_type): Likewise.
4797 * sparc-tdep.c (sparc_psr_type): Likewise.
4798 (sparc_fsr_type): Likewise.
4799 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4800 (sparc64_ccr_type): Likewise.
4801 (sparc64_fsr_type): Likewise.
4802 (sparc64_fprs_type): Likewise.
4803
f21b4d5c
TT
48042017-09-27 Tom Tromey <tom@tromey.com>
4805
4806 * findcmd.c (find_command): Constify.
4807
643c2ffa
TT
48082017-09-27 Tom Tromey <tom@tromey.com>
4809
4810 * ada-tasks.c (task_command_1, task_command): Constify.
4811
510e5e56
TT
48122017-09-27 Tom Tromey <tom@tromey.com>
4813
4814 * symtab.c (maintenance_print_symbol_cache)
4815 (maintenance_flush_symbol_cache)
4816 (maintenance_print_symbol_cache_statistics): Constify.
4817
e503b191
TT
48182017-09-27 Tom Tromey <tom@tromey.com>
4819
4820 * inferior.c (detach_inferior_command, kill_inferior_command)
4821 (inferior_command): Constify.
4822
4e001312
TT
48232017-09-27 Tom Tromey <tom@tromey.com>
4824
4825 * regcache.c (regcache_print, maintenance_print_registers)
4826 (maintenance_print_raw_registers)
4827 (maintenance_print_cooked_registers)
4828 (maintenance_print_register_groups)
4829 (maintenance_print_remote_registers): Constify.
4830
77763700
TT
48312017-09-27 Tom Tromey <tom@tromey.com>
4832
4833 * printcmd.c (map_display_numbers, undisplay_command)
4834 (enable_disable_display_command, enable_display_command)
4835 (disable_display_command): Constify.
4836
4495129a
TT
48372017-09-27 Tom Tromey <tom@tromey.com>
4838
4839 * breakpoint.h (delete_command): Don't declare.
4840 * breakpoint.c (delete_command, enable_once_command)
4841 (enable_count_command, enable_delete_command, breakpoint_1)
4842 (maintenance_info_breakpoints, stopin_command, stopat_command)
4843 (delete_command, delete_trace_command, save_breakpoints)
4844 (save_breakpoints_command, save_tracepoints_command): Constify.
4845
3088cf40
TT
48462017-09-27 Tom Tromey <tom@tromey.com>
4847
4848 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4849 (skip_ws, extract_identifier, macro_define_command)
4850 (macro_undef_command, macro_list_command): Constify.
4851
69f476a3
TT
48522017-09-27 Tom Tromey <tom@tromey.com>
4853
4854 * infcmd.c (environment_info, set_environment_command)
4855 (unset_environment_command, path_info, info_proc_cmd_1)
4856 (info_proc_cmd_mappings, info_proc_cmd_stat)
4857 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4858 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4859
c4a3e68e
TT
48602017-09-27 Tom Tromey <tom@tromey.com>
4861
4862 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4863 Constify.
4864
c9d31bd6
TT
48652017-09-27 Tom Tromey <tom@tromey.com>
4866
4867 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4868
1f3f85eb
TT
48692017-09-27 Tom Tromey <tom@tromey.com>
4870
4871 * demangle.c (demangle_command): Constify.
4872
9c504b5d
TT
48732017-09-27 Tom Tromey <tom@tromey.com>
4874
4875 * progspace.c (maintenance_info_program_spaces_command):
4876 Constify.
4877
6663cf91
TT
48782017-09-27 Tom Tromey <tom@tromey.com>
4879
4880 * compile/compile.c (check_raw_argument, compile_file_command)
4881 (compile_code_command, compile_print_command): Constify.
4882
34e5fa26
TT
48832017-09-27 Tom Tromey <tom@tromey.com>
4884
4885 * reggroups.c (maintenance_print_reggroups): Constify.
4886
8384c356
TT
48872017-09-27 Tom Tromey <tom@tromey.com>
4888
4889 * dwarf2read.c (save_gdb_index_command): Constify.
4890
884beb0c
TT
48912017-09-27 Tom Tromey <tom@tromey.com>
4892
4893 * stap-probe.c (info_probes_stap_command): Constify.
4894
e0b2930c
TT
48952017-09-27 Tom Tromey <tom@tromey.com>
4896
4897 * fork-child.c (unset_exec_wrapper_command): Constify.
4898
f938677d
TT
48992017-09-27 Tom Tromey <tom@tromey.com>
4900
4901 * btrace.c (get_uint, get_context_size, no_chunk)
4902 (maint_btrace_packet_history_cmd)
4903 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4904 (maint_info_btrace_cmd): Constify.
4905
8949cb87
TT
49062017-09-27 Tom Tromey <tom@tromey.com>
4907
4908 * reverse.c (delete_bookmark_command): Constify.
4909
ac88e2de
TT
49102017-09-27 Tom Tromey <tom@tromey.com>
4911
4912 * remote.c (set_memory_packet_size)
4913 (set_memory_write_packet_size, show_memory_write_packet_size)
4914 (set_memory_read_packet_size, show_memory_read_packet_size)
4915 (compare_sections_command, packet_command, remote_put_command)
4916 (remote_get_command, remote_delete_command): Constify.
4917
bd4c9dfe
TT
49182017-09-27 Tom Tromey <tom@tromey.com>
4919
4920 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4921 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4922 (set_mipsfpu_auto_command): Constify.
4923
5e93d4c6
TT
49242017-09-27 Tom Tromey <tom@tromey.com>
4925
4926 * cli/cli-cmds.h (cd_command): Constify.
4927 * cli/cli-cmds.c (cd_command): Constify.
4928
fc41a75b
TT
49292017-09-27 Tom Tromey <tom@tromey.com>
4930
4931 * thread.c (thread_name_command, thread_find_command): Constify.
4932
67810076
TT
49332017-09-27 Tom Tromey <tom@tromey.com>
4934
4935 * probe.c (enable_probes_command, disable_probes_command):
4936 Constify.
4937
1d8b34a7
TT
49382017-09-27 Tom Tromey <tom@tromey.com>
4939
4940 * symfile.c (symbol_file_command): Constify.
4941 * gdbcore.h (deprecated_file_changed_hook): Constify.
4942 * exec.c (deprecated_file_changed_hook, exec_file_command)
4943 (file_command): Constify.
4944 * defs.h (symbol_file_command): Constify.
4945
442019e1
TT
49462017-09-27 Tom Tromey <tom@tromey.com>
4947
4948 * remote-fileio.c (set_system_call_allowed)
4949 (show_system_call_allowed): Constify.
4950
2983f7cb
TT
49512017-09-27 Tom Tromey <tom@tromey.com>
4952
4953 * tracepoint.c (delete_trace_variable_command)
4954 (tfind_end_command, tfind_start_command, tfind_pc_command)
4955 (tfind_tracepoint_command, tfind_line_command)
4956 (tfind_range_command, tfind_outside_command): Constify.
4957
4fd41b24
TT
49582017-09-27 Tom Tromey <tom@tromey.com>
4959
4960 * ax-gdb.c (maint_agent_printf_command, agent_command)
4961 (agent_eval_command): Constify.
4962
f2fc3015
TT
49632017-09-27 Tom Tromey <tom@tromey.com>
4964
4965 * tracepoint.c (info_scope_command): Constify.
4966 * python/python.c (gdbpy_decode_line): Constify.
4967 * python/py-breakpoint.c (bppy_init): Constify.
4968 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4969 * location.h: (new_linespec_location)
4970 (string_to_event_location_basic, string_to_event_location):
4971 Constify.
4972 * location.c (new_linespec_location)
4973 (string_to_event_location_basic, string_to_event_location):
4974 Constify.
4975 * linespec.h (decode_line_with_current_source)
4976 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4977 * linespec.c (linespec_lex_to_end)
4978 (decode_line_with_current_source)
4979 (decode_line_with_last_displayed): Constify.
4980 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4981 Constify.
4982 * cli/cli-cmds.c (edit_command, list_command): Constify.
4983 * breakpoint.h (until_break_command, watch_command_wrapper)
4984 (awatch_command_wrapper, rwatch_command_wrapper)
4985 (init_ada_exception_breakpoint): Constify.
4986 * breakpoint.c (break_command_1, dprintf_command)
4987 (break_range_command, watch_command_wrapper)
4988 (rwatch_command_wrapper, awatch_command_wrapper)
4989 (until_break_command, init_ada_exception_breakpoint)
4990 (strace_marker_create_sals_from_location, trace_command)
4991 (ftrace_command, strace_command, struct tracepoint): Constify.
4992 * ax-gdb.c (agent_command_1): Constify.
4993 * ada-lang.c (ada_exception_sal): Constify.
4994
8c2f95f4
TT
49952017-09-27 Tom Tromey <tom@tromey.com>
4996
4997 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4998 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4999 (get_context_size, no_chunk, get_insn_history_modifiers)
5000 (cmd_record_insn_history, get_call_history_modifiers)
5001 (cmd_record_call_history): Constify.
5002
a0d65762
TT
50032017-09-27 Tom Tromey <tom@tromey.com>
5004
5005 * source.c (show_substitute_path_command)
5006 (unset_substitute_path_command, set_substitute_path_command):
5007 Constify.
5008
58971144
TT
50092017-09-27 Tom Tromey <tom@tromey.com>
5010
5011 * typeprint.c (maintenance_print_type): Constify.
5012 * maint.c (maintenance_dump_me, maintenance_demangle)
5013 (maintenance_time_display, maintenance_info_sections)
5014 (maintenance_print_statistics, maintenance_deprecate)
5015 (maintenance_undeprecate): Constify.
5016 (maintenance_do_deprecate): Constify. Use std::string.
5017 (maintenance_selftest): Constify.
5018 * gdbtypes.h (maintenance_print_type): Constify.
5019
c482f52c
TT
50202017-09-27 Tom Tromey <tom@tromey.com>
5021
5022 * hppa-tdep.c (unwind_command): Constify.
5023
e100df1a
TT
50242017-09-27 Tom Tromey <tom@tromey.com>
5025
5026 * target-descriptions.c (unset_tdesc_filename_cmd)
5027 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5028 Constify.
5029
31d56ade
TT
50302017-09-27 Tom Tromey <tom@tromey.com>
5031
5032 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5033
b961da0b
TT
50342017-09-27 Tom Tromey <tom@tromey.com>
5035
5036 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5037
e2d8ae16
TT
50382017-09-27 Tom Tromey <tom@tromey.com>
5039
5040 * tui/tui-regs.c (tui_reg_command): Constify.
5041
863779b0
TT
50422017-09-27 Tom Tromey <tom@tromey.com>
5043
5044 * skip.c (skip_file_command, skip_function_command)
5045 (skip_enable_command, skip_disable_command, skip_delete_command):
5046 Constify.
5047
cdb34d4a
TT
50482017-09-27 Tom Tromey <tom@tromey.com>
5049
5050 * record-btrace.c (cmd_record_btrace_bts_start)
5051 (cmd_record_btrace_pt_start): Constify.
5052
e99c83e7
TT
50532017-09-27 Tom Tromey <tom@tromey.com>
5054
5055 * symmisc.c (maintenance_print_symbols)
5056 (maintenance_print_msymbols, maintenance_print_objfiles)
5057 (maintenance_info_symtabs, maintenance_check_symtabs)
5058 (maintenance_expand_symtabs, maintenance_info_line_tables):
5059 Constify.
5060
32faf971
TT
50612017-09-27 Tom Tromey <tom@tromey.com>
5062
5063 * top.c (new_ui_command): Constify.
5064
2cf311eb
TT
50652017-09-27 Tom Tromey <tom@tromey.com>
5066
5067 * symfile.c (add_symbol_file_command)
5068 (remove_symbol_file_command, list_overlays_command)
5069 (map_overlay_command, unmap_overlay_command)
5070 (overlay_auto_command, overlay_manual_command)
5071 (overlay_off_command, overlay_load_command): Constify.
5072
e6738699
TT
50732017-09-27 Tom Tromey <tom@tromey.com>
5074
5075 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5076 (info_spu_mailbox_command, info_spu_dma_command)
5077 (info_spu_proxydma_command): Constify.
5078
aa360cd5
TT
50792017-09-27 Tom Tromey <tom@tromey.com>
5080
5081 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5082
898241a5
TT
50832017-09-27 Tom Tromey <tom@tromey.com>
5084
5085 * cli/cli-script.c (user_defined_command): Constify.
5086
2d0ac106
TT
50872017-09-27 Tom Tromey <tom@tromey.com>
5088
5089 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5090 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5091 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5092 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5093 (dump_binary_value, append_binary_memory, append_binary_value):
5094 Constify.
5095 (struct dump_context) <func>: Constify.
5096 (add_dump_command): Update.
5097
dede02ce
TT
50982017-09-27 Tom Tromey <tom@tromey.com>
5099
5100 * cli/cli-cmds.c (show_version, show_configuration)
5101 (source_command, show_user): Constify.
5102
d3cb6b99
TT
51032017-09-27 Tom Tromey <tom@tromey.com>
5104
5105 * target.c (maintenance_print_target_stack): Constify.
5106
1970a12f
TT
51072017-09-27 Tom Tromey <tom@tromey.com>
5108
5109 * interps.c (interpreter_exec_cmd): Constify.
5110
41243651
TT
51112017-09-27 Tom Tromey <tom@tromey.com>
5112
5113 * record-full.c (cmd_record_full_restore): Constify.
5114
4465d9db
TT
51152017-09-27 Tom Tromey <tom@tromey.com>
5116
5117 * memattr.c (enable_mem_command, disable_mem_command)
5118 (delete_mem_command): Constify.
5119
ad25e423
TT
51202017-09-27 Tom Tromey <tom@tromey.com>
5121
5122 * value.c (show_convenience): Constify.
5123
d64097b1
TT
51242017-09-27 Tom Tromey <tom@tromey.com>
5125
5126 * gdbcore.h (core_file_command): Update.
5127 * corefile.c (core_file_command): Constify.
5128
4d4589ef
TT
51292017-09-27 Tom Tromey <tom@tromey.com>
5130
5131 * user-regs.c (maintenance_print_user_registers): Constify.
5132
32a7bf17
TT
51332017-09-27 Tom Tromey <tom@tromey.com>
5134
5135 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5136
4a475551
TT
51372017-09-27 Tom Tromey <tom@tromey.com>
5138
5139 * cp-support.c (first_component_command): Constify.
5140
990b9f9f
TT
51412017-09-27 Tom Tromey <tom@tromey.com>
5142
5143 * psymtab.c (maintenance_print_psymbols)
5144 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5145 Constify.
5146
c281872e
TT
51472017-09-27 Tom Tromey <tom@tromey.com>
5148
5149 * windows-tdep.c (display_tib): Constify.
5150
5b64bf74
TT
51512017-09-27 Tom Tromey <tom@tromey.com>
5152
5153 * linux-fork.c (delete_checkpoint_command)
5154 (detach_checkpoint_command): Constify.
5155
4ada038f
TT
51562017-09-27 Tom Tromey <tom@tromey.com>
5157
5158 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5159
57f5a81b
TT
51602017-09-27 Tom Tromey <tom@tromey.com>
5161
5162 * arc-tdep.c (dump_arc_instruction_command): Constify.
5163
b0a8e6c4
TT
51642017-09-27 Tom Tromey <tom@tromey.com>
5165
5166 * valprint.c (set_radix, show_radix): Constify.
5167
8d97dc1c
TT
51682017-09-27 Tom Tromey <tom@tromey.com>
5169
5170 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5171
eb7c454d
TT
51722017-09-27 Tom Tromey <tom@tromey.com>
5173
5174 * command.h (not_just_help_class_command): Update.
5175 * cli/cli-decode.h (not_just_help_class_command): Update.
5176 * cli/cli-decode.c (not_just_help_class_command): Constify.
5177
e4e33335
TT
51782017-09-27 Tom Tromey <tom@tromey.com>
5179
5180 * gdb_bfd.c (maintenance_info_bfds): Constify.
5181
0450cc4c
TT
51822017-09-27 Tom Tromey <tom@tromey.com>
5183
5184 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5185 overloads.
5186 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5187 (do_const_cfunc): New function.
5188 (cmd_cfunc_eq): New overload.
5189 (cli_user_command_p): Check do_const_cfunc.
5190 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5191 const_cfunc.
5192 * command.h (add_cmd): Add const overload and no-function
5193 overload.
5194 (set_cmd_cfunc): Add const overload.
5195 (cmd_const_cfunc_ftype): Declare.
5196 (cmd_cfunc_eq): Add const overload.
5197 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5198 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5199 overload.
5200
a9bbfbd8
TT
52012017-09-27 Tom Tromey <tom@tromey.com>
5202
5203 * macroexp.c (get_next_token_for_substitution): New function.
5204 (substitute_args): Call it. Check for __VA_OPT__.
5205
5230b05a
WT
52062017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5207 Pedro Alves <palves@redhat.com>
5208
5209 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5210 producer_is_icc_lt_14.
5211 (producer_is_icc_lt_14): New function.
5212 (check_producer): Add code for checking version of ICC.
5213 (producer_is_icc): Move to producer.c.
5214 (read_structure_type): Restrict ICC workaround to ICC<14.
5215 * producer.c: Include selftest.h.
5216 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5217 New functions.
5218 * producer.h (producer_is_icc): New declaration.
5219
b32b108a
WT
52202017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5221
5222 * Makefile.in (SFILES): Add producer.c.
5223 (COMMON_OBS): Add producer.o
5224 * amd64-tdep.c (producer.h): Add new include.
5225 * dwarf2read.c (producer.h): Add new include.
5226 * producer.c: New file.
5227 * producer.h: New file.
5228 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5229 producer.c.
5230 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5231 producer.h.
5232
5007d765
MK
52332017-09-26 Matthias Klose <doko@ubuntu.com>
5234
5235 * configure.ac: Search ncursesw before ncurses.
5236 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5237 * gdb_curses.h: Include <ncursesw/ncurses.h>
5238 * config.in, configure: Regenerate.
5239
281c4447
RO
52402017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5241
5242 PR gdb/22185
5243 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5244 obsolete.
5245 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5246 Remove i386sol2 support.
5247 * configure.nat <i386sol2>: Remove.
5248 <sol2-64>: Fold into ...
5249 <sol2>: ... this.
5250 Move common settings to default section.
5251 Add sol-thread.o.
5252 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5253 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5254 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5255 <i[34567]86-*-solaris*>: Remove.
5256 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5257
5258 * configure.ac: Remove wctype in libw check.
5259 (_MSE_INT_H): Don't define on Solaris 7-9.
5260 <solaris*>: Remove libthread_db.so.1 check.
5261 * configure: Regenerate.
5262 * config.in: Regenerate.
5263
5264 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5265 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5266 (gdb_ps_size_t): Remove.
5267 Use base types in users.
5268 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5269
5270 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5271
39b06c20
RO
52722017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5273
5274 PR build/22206
5275 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5276 (adi_is_addr_mapped): Likewise.
5277 (PSR_ICC): Don't redefine.
5278 (PSR_IMPL): Likewise.
5279
6c3e20f1
TT
52802017-09-25 Tom Tromey <tom@tromey.com>
5281
5282 * regcache.c (regcache::dump): Use string_printf.
5283
b292235f
TT
52842017-09-25 Tom Tromey <tom@tromey.com>
5285
5286 * regcache.c (class regcache_invalidator): New.
5287 (struct register_to_invalidate): Remove.
5288 (make_cleanup_regcache_invalidate): Remove.
5289 (regcache::raw_write): Use regcache_invalidator.
5290
9ac86b52
TT
52912017-09-25 Tom Tromey <tom@tromey.com>
5292
5293 * spu-tdep.c (spu2ppu_sniffer): Update.
5294 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5295 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5296 Remove.
5297 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5298 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5299 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5300 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5301 (frame_pop): Update.
5302
c0e383c6
TT
53032017-09-25 Tom Tromey <tom@tromey.com>
5304
5305 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5306 * regcache.h (regcache_xfree): Don't declare.
5307 * regcache.c (regcache_xfree): Remove.
5308 (do_regcache_xfree): Use delete.
5309 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5310 * linux-fork.c (free_fork): Use delete.
5311 (fork_save_infrun_state): Likewise.
5312 * jit.c (jit_dealloc_cache): Use delete.
5313 * infrun.c (discard_infcall_suspend_state): Use delete.
5314
791199cc
TT
53152017-09-25 Tom Tromey <tom@tromey.com>
5316
5317 * regcache.h (regcache_xmalloc): Don't declare.
5318 (regcache_raw_set_cached_value): Update comment.
5319 * regcache.c (regcache_xmalloc): Remove.
5320 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5321 * jit.c (jit_frame_sniffer): Use new.
5322 * frame.c (frame_save_as_regcache): Use new.
5323
289e23aa
AA
53242017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5325
5326 * NEWS: Advertise support for guarded-storage registers on IBM z.
5327
1b63490c
AA
53282017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5329
5330 * s390-linux-nat.c (have_regset_gs): New static variable.
5331 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5332 control block and guarded-storage broadcast control regsets.
5333 (s390_read_description): Detect whether the target has
5334 guarded-storage support, return appropriate tdesc.
5335 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5336 (features/s390x-gs-linux64.c): Likewise.
5337 (struct gdbarch_tdep) <have_gs>: New field.
5338 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5339 (s390_gsbc_regset): New variables.
5340 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5341 and s390_gsbc_regset, if applicable.
5342 (s390_core_read_description): Check whether core file was from a
5343 target with guarded-storage support; include appropriate regsets.
5344 (s390_gdbarch_init): Add registers for guarded-storage support.
5345 (_initialize_s390_tdep): Initialize new target descriptions that
5346 include registers for guarded-storage support.
5347 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5348 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5349 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5350 (S390_NUM_REGS): Adjust macro definition.
5351 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5352 (tdesc_s390x_gs_linux64): New declarations.
5353
96235dc1
AA
53542017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5355
5356 * features/s390-gs-linux64.xml: New file.
5357 * features/s390-gs.xml: New file.
5358 * features/s390-gsbc.xml: New file.
5359 * features/s390x-gs-linux64.xml: New file.
5360 * features/Makefile (WHICH): Add s390-gs-linux64 and
5361 s390x-gs-linux64.
5362 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5363 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5364 * features/s390-gs-linux64.c: New generated file.
5365 * features/s390x-gs-linux64.c: New file.
5366 * regformats/s390-gs-linux64.dat: New file.
5367 * regformats/s390x-gs-linux64.dat: New file.
5368
b4a7c699
TT
53692017-09-23 Tom Tromey <tom@tromey.com>
5370
5371 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5372
c2f97536
TT
53732017-09-22 Tom Tromey <tom@tromey.com>
5374
5375 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5376 type to scoped_restore_tmpl.
5377 <scoped_input_handler>: Initialize m_quit_handler directly.
5378
43573013
SDJ
53792017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5380
5381 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5382 (cd_command): Likewise. Free "current_directory" before
5383 assigning to it.
5384 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5385 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5386 * top.c (gdb_dirbuf): Remove global declaration.
5387 * top.h (gdb_dirbuf): Likewise.
5388
6ec2e0f5
SDJ
53892017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5390
5391 * gnulib/aclocal.m4: Regenerate.
5392 * gnulib/config.in: Regenerate.
5393 * gnulib/configure: Regenerate.
5394 * gnulib/import/Makefile.am: Regenerate.
5395 * gnulib/import/Makefile.in: Regenerate.
5396 * gnulib/import/assure.h: New file.
5397 * gnulib/import/at-func.c: Likewise
5398 * gnulib/import/chdir-long.c: New file.
5399 * gnulib/import/chdir-long.h: New file.
5400 * gnulib/import/cloexec.c: New file.
5401 * gnulib/import/cloexec.h: New file.
5402 * gnulib/import/close.c: New file.
5403 * gnulib/import/closedir.c: New file.
5404 * gnulib/import/dirent-private.h: New file.
5405 * gnulib/import/dup-safer.c: New file.
5406 * gnulib/import/dup.c: New file.
5407 * gnulib/import/dup2.c: New file.
5408 * gnulib/import/error.c: New file.
5409 * gnulib/import/error.h: New file.
5410 * gnulib/import/exitfail.c: New file.
5411 * gnulib/import/exitfail.h: New file.
5412 * gnulib/import/fchdir.c: New file.
5413 * gnulib/import/fcntl.c: New file.
5414 * gnulib/import/fcntl.in.h: New file.
5415 * gnulib/import/fd-hook.c: New file.
5416 * gnulib/import/fd-hook.h: New file.
5417 * gnulib/import/fd-safer.c: New file.
5418 * gnulib/import/fdopendir.c: New file.
5419 * gnulib/import/filename.h: New file.
5420 * gnulib/import/filenamecat-lgpl.c: New file.
5421 * gnulib/import/filenamecat.h: New file.
5422 * gnulib/import/fstat.c: New file.
5423 * gnulib/import/fstatat.c: New file.
5424 * gnulib/import/getcwd-lgpl.c: New file.
5425 * gnulib/import/getcwd.c: New file.
5426 * gnulib/import/getdtablesize.c: New file.
5427 * gnulib/import/getlogin_r.c: New file.
5428 * gnulib/import/getprogname.c: New file.
5429 * gnulib/import/getprogname.h: New file.
5430 * gnulib/import/gettext.h: New file.
5431 * gnulib/import/glob-libc.h: New file.
5432 * gnulib/import/glob.c: New file.
5433 * gnulib/import/glob.in.h: New file.
5434 * gnulib/import/intprops.h: New file.
5435 * gnulib/import/m4/chdir-long.m4: New file.
5436 * gnulib/import/m4/close.m4: New file.
5437 * gnulib/import/m4/closedir.m4: New file.
5438 * gnulib/import/m4/d-ino.m4: New file.
5439 * gnulib/import/m4/d-type.m4: New file.
5440 * gnulib/import/m4/dup.m4: New file.
5441 * gnulib/import/m4/dup2.m4: New file.
5442 * gnulib/import/m4/error.m4: New file.
5443 * gnulib/import/m4/fchdir.m4: New file.
5444 * gnulib/import/m4/fcntl.m4: New file.
5445 * gnulib/import/m4/fcntl_h.m4: New file.
5446 * gnulib/import/m4/fdopendir.m4: New file.
5447 * gnulib/import/m4/filenamecat.m4: New file.
5448 * gnulib/import/m4/fstat.m4: New file.
5449 * gnulib/import/m4/fstatat.m4: New file.
5450 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5451 * gnulib/import/m4/getcwd-path-max.m4: New file.
5452 * gnulib/import/m4/getcwd.m4: New file.
5453 * gnulib/import/m4/getdtablesize.m4: New file.
5454 * gnulib/import/m4/getlogin_r.m4: New file.
5455 * gnulib/import/m4/getprogname.m4: New file.
5456 * gnulib/import/m4/glob.m4: New file.
5457 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5458 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5459 * gnulib/import/m4/mempcpy.m4: New file.
5460 * gnulib/import/m4/memrchr.m4: New file.
5461 * gnulib/import/m4/mode_t.m4: New file.
5462 * gnulib/import/m4/msvc-inval.m4: New file.
5463 * gnulib/import/m4/msvc-nothrow.m4: New file.
5464 * gnulib/import/m4/open.m4: New file.
5465 * gnulib/import/m4/openat.m4: New file.
5466 * gnulib/import/m4/opendir.m4: New file.
5467 * gnulib/import/m4/readdir.m4: New file.
5468 * gnulib/import/m4/realloc.m4: New file.
5469 * gnulib/import/m4/rewinddir.m4: New file.
5470 * gnulib/import/m4/save-cwd.m4: New file.
5471 * gnulib/import/m4/strdup.m4: New file.
5472 * gnulib/import/m4/strerror.m4: New file.
5473 * gnulib/import/m4/unistd-safer.m4: New file.
5474 * gnulib/import/mempcpy.c: New file.
5475 * gnulib/import/memrchr.c: New file.
5476 * gnulib/import/msvc-inval.c: New file.
5477 * gnulib/import/msvc-inval.h: New file.
5478 * gnulib/import/msvc-nothrow.c: New file.
5479 * gnulib/import/msvc-nothrow.h: New file.
5480 * gnulib/import/open.c: New file.
5481 * gnulib/import/openat-die.c: New file.
5482 * gnulib/import/openat-priv.h: New file.
5483 * gnulib/import/openat-proc.c: New file.
5484 * gnulib/import/openat.c: New file.
5485 * gnulib/import/openat.h: New file.
5486 * gnulib/import/opendir.c: New file.
5487 * gnulib/import/pipe-safer.c: New file.
5488 * gnulib/import/readdir.c: New file.
5489 * gnulib/import/realloc.c: New file.
5490 * gnulib/import/rewinddir.c: New file.
5491 * gnulib/import/save-cwd.c: New file.
5492 * gnulib/import/save-cwd.h: New file.
5493 * gnulib/import/strdup.c: New file.
5494 * gnulib/import/strerror-override.c: New file.
5495 * gnulib/import/strerror-override.h: New file.
5496 * gnulib/import/strerror.c: New file.
5497 * gnulib/import/unistd--.h: New file.
5498 * gnulib/import/unistd-safer.h: New file.
5499 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5500 "getcwd" and "glob".
5501 * ser-tcp.c: Undefine "close" before redefining it.
5502
432ae719
SM
55032017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5504
5505 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5506 get rid of res_val.
5507
4fa7574e
RO
55082017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5509
5510 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5511 <sol2,sparc>: Likewise.
5512 <sol2-64,i386>: Likewise.
5513
5514 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5515 -Wdeprecated-declarations on *-*-solaris*.
5516 * configure: Regenerate.
5517
5518 * procfs.c: Include "nat/inferior.h".
5519 (procfs_info_proc): Fix typo.
5520
f6327dcb
KB
55212017-09-21 Kevin Buettner <kevinb@redhat.com>
5522
5523 * remote.c (vector): Include.
5524 (struct private_thread_info): Add field, thread_handle.
5525 (free_private_thread_info): Deallocate storage associated with
5526 thread handle.
5527 (get_private_info_thread): Initialize `thread_handle' field.
5528 (struct thread_item): Add field, thread_handle.
5529 (clear_threads_listing_context): Deallocate storage associated
5530 with thread handle.
5531 (start_thread): Add support for "handle" attribute.
5532 (thread_attributes): Add "handle".
5533 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5534 field.
5535 (remote_update_thread_list): Update thread_handle.
5536 (remote_thread_handle_to_thread_info): New function.
5537 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5538
fbbe5337
KB
55392017-09-21 Kevin Buettner <kevinb@redhat.com>
5540
5541 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5542 function.
5543 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5544 * python/python-internal.h (thread_object_type): Declare.
5545
e04ee09e
KB
55462017-09-21 Kevin Buettner <kevinb@redhat.com>
5547
5548 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5549 (target_thread_handle_to_thread_info): Declare.
5550 * target.c (target_thread_handle_to_thread_info): New function.
5551 * target-delegates.c: Regenerate.
5552 * gdbthread.h (find_thread_by_handle): Declare.
5553 * thread.c (find_thread_by_handle): New function.
5554 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5555 function.
5556 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5557
1e5b66ed
SM
55582017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5559
5560 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5561
ebe48ba0
SM
55622017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5563
5564 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5565
0a0bf5dc
YQ
55662017-09-21 Yao Qi <yao.qi@linaro.org>
5567
5568 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5569 to gdb_target_obs.
5570
d1b0a7bf
TT
55712017-09-20 Tom Tromey <tom@tromey.com>
5572
5573 * breakpoint.c (struct counted_command_line): Remove.
5574 (breakpoint_commands): Update.
5575 (alloc_counted_command_line, incref_counted_command_line)
5576 (decref_counted_command_line, do_cleanup_counted_command_line)
5577 (make_cleanup_decref_counted_command_line): Remove.
5578 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5579 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5580 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5581 (save_breakpoints): Update.
5582 * breakpoint.h (counted_command_line): Now a typedef to
5583 shared_ptr.
5584 (struct breakpoint) <commands>: Now a counted_command_line.
5585 (struct bpstats) <command>: Likewise.
5586
48649e1b
TT
55872017-09-20 Tom Tromey <tom@tromey.com>
5588
5589 * breakpoint.c (struct commands_info, do_map_commands_command):
5590 Remove.
5591 (commands_command_1): Update.
5592 (iterate_over_related_breakpoints): Take a function_view.
5593 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5594 (delete_command): Update.
5595 (map_breakpoint_numbers): Take a function_view.
5596 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5597 (disable_command): Update.
5598 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5599 (enable_command): Update.
5600 (struct disp_data, do_enable_breakpoint_disp)
5601 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5602 (do_map_enable_delete_breakpoint): Remove.
5603 (enable_once_command, enable_count_command, enable_delete_command)
5604 (delete_trace_variable_command): Update.
5605
04afa70c
TT
56062017-09-20 Tom Tromey <tom@tromey.com>
5607
5608 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5609 (bpstat_clear): Use delete.
5610 (bpstats): New constructors.
5611 (bpstat_copy, bpstat_stop_status): Use new.
5612 (dprintf_after_condition_true): Update.
5613 * breakpoint.h (bpstats::bpstats): Add constructors.
5614 (bpstats::~bpstats): Add destructor.
5615
c83833f4
PA
56162017-09-20 Pedro Alves <palves@redhat.com>
5617
5618 * eval.c (make_params): Delete, refactored as ...
5619 (class fake_method): ... this new type's ctor.
5620 (fake_method::~fake_method): New.
5621 (evaluate_subexp_standard): Use 'fake_method'.
5622
223ffa71
TT
56232017-09-20 Tom Tromey <tom@tromey.com>
5624
5625 * windows-nat.c (get_windows_debug_event, windows_wait)
5626 (do_initial_windows_stuff, windows_attach): Update.
5627 * utils.c (vwarning, internal_vproblem): Update.
5628 (ui_unregister_input_event_handler_cleanup)
5629 (prepare_to_handle_input): Remove.
5630 (class scoped_input_handler): New.
5631 (defaulted_query, prompt_for_continue): Update.
5632 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5633 Update.
5634 * top.c (undo_terminal_modifications_before_exit): Update.
5635 * target/target.h (target_terminal_init, target_terminal_inferior)
5636 (target_terminal_ours): Don't declare.
5637 (class target_terminal): New.
5638 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5639 (target_terminal_ours_for_output)
5640 (make_cleanup_restore_target_terminal): Don't declare.
5641 (target_terminal_info): Remove.
5642 * target.c (enum terminal_state, terminal_state): Remove.
5643 (target_terminal::terminal_state): Define.
5644 (target_terminal::init): Rename from target_terminal_init.
5645 (target_terminal::inferior): Rename from
5646 target_terminal_inferior.
5647 (target_terminal::ours): Rename from target_terminal_ours.
5648 (target_terminal::ours_for_output): Rename from
5649 target_terminal_ours_for_output.
5650 (target_terminal::info): New method.
5651 (cleanup_restore_target_terminal)
5652 (make_cleanup_restore_target_terminal): Remove.
5653 * solib.c (handle_solib_event): Update.
5654 * remote.c (remote_serial_quit_handler): Update.
5655 (remote_terminal_inferior, remote_wait_as): Update.
5656 * record-full.c (record_full_wait_1): Update.
5657 * nto-procfs.c (procfs_create_inferior): Update.
5658 * nat/fork-inferior.c (startup_inferior): Update.
5659 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5660 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5661 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5662 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5663 (mi_breakpoint_created, mi_breakpoint_deleted)
5664 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5665 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5666 (mi_user_selected_context_changed, report_initial_inferior):
5667 Update.
5668 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5669 (linux_nat_terminal_inferior): Update.
5670 * infrun.c (follow_fork_inferior)
5671 (handle_vfork_child_exec_or_exit, do_target_resume)
5672 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5673 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5674 Update.
5675 * inflow.c (child_terminal_init, info_terminal_command): Update.
5676 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5677 (attach_command): Update.
5678 * infcall.c (call_thread_fsm_should_stop): Update.
5679 * gnu-nat.c (gnu_attach): Update.
5680 * extension.c (struct active_ext_lang_state)
5681 (restore_active_ext_lang): Update.
5682 * exceptions.c (print_flush): Update.
5683 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5684 (struct quit_handler_cleanup_data, restore_quit_handler)
5685 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5686 Remove.
5687 * cp-support.c (gdb_demangle): Update.
5688 * breakpoint.c (update_inserted_breakpoint_locations)
5689 (insert_breakpoint_locations, handle_jit_event)
5690 (disable_breakpoints_in_unloaded_shlib): Update.
5691 * annotate.c (annotate_breakpoints_invalid)
5692 (annotate_frames_invalid): Update.
5693
013af3fc
TT
56942017-09-20 Tom Tromey <tom@tromey.com>
5695
5696 * main.c (catch_command_errors): Rename from
5697 catch_command_errors_const.
5698 (captured_main_1): Update.
5699
06871ae8
PA
57002017-09-20 Pedro Alves <palves@redhat.com>
5701
5702 * cli/cli-cmds.c (list_command): Use print_sal_location.
5703 (print_sal_location): New function.
5704 (ambiguous_line_spec): Use print_sal_location.
5705 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5706 * symtab.c (find_function_start_sal): Likewise.
5707 * symtab.h (symtab_and_line::symbol): New field.
5708
e5f25bc5
PA
57092017-09-20 Pedro Alves <palves@redhat.com>
5710
5711 * linespec.c (minsym_found): Handle non-text minsyms.
5712 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5713
1b7fa39e
WT
57142017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5715
5716 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5717 backslash.
5718
37dd0825
WT
57192017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5720
5721 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5722 vmovups instead vmovaps.
5723 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5724
4e5a4f58
JB
57252017-09-19 John Baldwin <jhb@FreeBSD.org>
5726
5727 * NEWS (Changes since GDB 8.0): Add starti.
5728 * infcmd.c (enum run_break): New.
5729 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5730 case.
5731 (run_command): Use enum run_how.
5732 (start_command): Likewise.
5733 (starti_command): New function.
5734 (RUN_ARGS_HELP): New macro.
5735 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5736 commands. Add starti command.
5737
aa70c9f1
YQ
57382017-09-19 Yao Qi <yao.qi@linaro.org>
5739
5740 * Makefile.in (monitor.o): Remove the rule.
5741
d6541620
YQ
57422017-09-19 Yao Qi <yao.qi@linaro.org>
5743
5744 * annotate.h (struct annotate_arg_emitter): Use
5745 DISABLE_COPY_AND_ASSIGN.
5746 * common/refcounted-object.h (refcounted_object): Likewise.
5747 * completer.h (struct completion_result): Likewise.
5748 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5749 * filename-seen-cache.h (filename_seen_cache): Likewise.
5750 * gdbcore.h (thread_section_name): Likewise.
5751 * gdb_regex.h (compiled_regex): Likewise.
5752 * gdbthread.h (scoped_restore_current_thread): Likewise.
5753 * inferior.h (scoped_restore_current_inferior): Likewise.
5754 * jit.c (jit_reader): Likewise.
5755 * linespec.h (struct linespec_result): Likewise.
5756 * mi/mi-parse.h (struct mi_parse): Likewise.
5757 * nat/fork-inferior.c (execv_argv): Likewise.
5758 * progspace.h (scoped_restore_current_program_space): Likewise.
5759 * python/python-internal.h (class gdbpy_enter): Likewise.
5760 * regcache.h (regcache): Likewise.
5761 * target-descriptions.c (struct tdesc_reg): Likewise.
5762 (struct tdesc_type): Likewise.
5763 (struct tdesc_feature): Likewise.
5764 * ui-out.h (ui_out_emit_type): Likewise.
5765
0615127c
SM
57662017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5767
5768 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5769 label abort_expression.
5770
5e187554
SM
57712017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5772
5773 * common/buffer.c (buffer_xml_printf): Adjust.
5774 * common/xml-utils.c (xml_escape_text): Change return type to
5775 std::string, update code accordingly.
5776 * common/xml-utils.h (xml_escape_text): Change return type to
5777 std::string.
5778 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5779 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5780 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5781 Adjust.
5782
c3d7b541
SM
57832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5784
5785 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5786 (SUBDIR_UNITTESTS_OBS): Add new object file.
5787 * unittests/xml-utils-selftests.c: New file.
5788
1526853e
SM
57892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5790
5791 * common/selftest.h (selftest): New struct/interface.
5792 (register_test): Add name parameter, add new overload.
5793 (run_tests): Add filter parameter.
5794 (for_each_selftest_ftype): New typedef.
5795 (for_each_selftest): New declaration.
5796 * common/selftest.c (tests): Change type to
5797 map<string, unique_ptr<selftest>>.
5798 (simple_selftest): New struct.
5799 (register_test): New function.
5800 (register_test): Add name parameter and use it.
5801 (run_tests): Add filter parameter and use it. Add prints.
5802 Adjust to vector -> map change.
5803 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5804 registering selftests.
5805 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5806 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5807 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5808 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5809 * findvar.c (_initialize_findvar): Likewise.
5810 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5811 * maint.c (maintenance_selftest): Update call to run_tests.
5812 (maintenance_info_selftests): New function.
5813 (_initialize_maint_cmds): Register "maintenance info selftests"
5814 command. Update "maintenance selftest" doc.
5815 * regcache.c (_initialize_regcache): Add names when registering
5816 selftests.
5817 * rust-exp.y (_initialize_rust_exp): Likewise.
5818 * selftest-arch.c (gdbarch_selftest): New struct.
5819 (gdbarch_tests): Remove.
5820 (register_test_foreach_arch): Add name parameter. Call
5821 register_test.
5822 (tests_with_arch): Remove, move most content to
5823 gdbarch_selftest::operator().
5824 (_initialize_selftests_foreach_arch): Remove.
5825 * selftest-arch.h (register_test_foreach_arch): Add name
5826 parameter.
5827 (run_tests_with_arch): New declaration.
5828 * utils-selftests.c (_initialize_utils_selftests): Add names
5829 when registering selftests.
5830 * utils.c (_initialize_utils): Likewise.
5831 * unittests/array-view-selftests.c
5832 (_initialize_array_view_selftests): Likewise.
5833 * unittests/environ-selftests.c (_initialize_environ_selftests):
5834 Likewise.
5835 * unittests/function-view-selftests.c
5836 (_initialize_function_view_selftests): Likewise.
5837 * unittests/offset-type-selftests.c
5838 (_initialize_offset_type_selftests): Likewise.
5839 * unittests/optional-selftests.c
5840 (_initialize_optional_selftests): Likewise.
5841 * unittests/scoped_restore-selftests.c
5842 (_initialize_scoped_restore_selftests): Likewise.
5843 * NEWS: Document "maintenance selftest" and "maint info
5844 selftests".
5845
5846367a
SM
58462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5847
5848 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5849 scoped_restore.
5850
bd77e8ff
SM
58512017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5852
5853 * mi/mi-main.c (mi_load_progress): Make uiout variable
5854 a unique_ptr.
5855
26a67918
PA
58562017-09-15 Pedro Alves <palves@redhat.com>
5857
5858 * compile/compile-c-types.c (convert_enum, convert_int)
5859 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5860
3f8a7804
SM
58612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5862
5863 * dwarf2read.c (copy_string): Remove.
5864 (parse_macro_definition): Replace copy_string with savestring.
5865
8d200706
YQ
58662017-09-15 Yao Qi <yao.qi@linaro.org>
5867
5868 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5869 gdb_target_obs.
5870 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5871 Likewise.
5872 (i[34567]86-*-linux*): Likewise.
5873
d185219d
SM
58742017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5875
5876 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5877 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5878 <stack>: Change type to std::vector.
5879 <stack_len, stack_allocated>: Remove.
5880 <grow_stack>: Remove.
5881 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5882 (dwarf_expr_context::~dwarf_expr_context): Remove.
5883 (dwarf_expr_context::grow_stack): Remove.
5884 (dwarf_expr_context::push): Adjust.
5885 (dwarf_expr_context::pop): Adjust.
5886 (dwarf_expr_context::fetch): Adjust.
5887 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5888 (dwarf_expr_context::stack_empty_p): Adjust.
5889 (dwarf_expr_context::execute_stack_op): Adjust.
5890
eccd80d6
SM
58912017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5892
5893 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5894 return type to bool.
5895 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5896
69009882
SM
58972017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5898
5899 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5900 Change type to bool.
5901 (dwarf_stack_value) <in_stack_memory>: Likewise.
5902 (dwarf_expr_context) <push_address>: Change parameter type to
5903 bool.
5904 <fetch_in_stack_memory>: Change return type to bool.
5905 <push>: Change parameter type to bool.
5906 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5907 to bool.
5908 (dwarf_expr_context::push_address): Likewise.
5909 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5910 to bool.
5911 (dwarf_expr_context::execute_stack_op): Adjust.
5912 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5913
1e467161
SM
59142017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5915
5916 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5917 (struct dwarf_expr_context) <n_pieces>: Remove.
5918 <pieces>: Change type to std::vector.
5919 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5920 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5921 pieces.
5922 (dwarf_expr_context::add_piece): Adjust.
5923 * dwarf2loc.c (struct piece_closure): Initialize fields.
5924 <n_pieces>: Remove.
5925 <pieces>: Change type to std::vector.
5926 (allocate_piece_closure): Adjust, change parameter to
5927 std::vector rvalue and std::move it to piece_closure.
5928 (rw_pieced_value): Adjust.
5929 (check_pieced_synthetic_pointer): Adjust.
5930 (indirect_synthetic_pointer): Adjust.
5931 (coerce_pieced_ref): Adjust.
5932 (free_pieced_value_closure): Adjust. Use delete to free
5933 piece_closure.
5934 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5935 to allocate_piece_closure.
5936 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5937
0782db84
SM
59382017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5939
5940 * probe.h (probe_ops_cp): Remove typedef.
5941 (DEF_VEC_P (probe_ops_cp)): Remove.
5942 (all_probe_ops): Change type to std::vector.
5943 * probe.c (info_probes_for_ops): Adjust to vector change.
5944 (probe_linespec_to_ops): Likewise.
5945 (all_probe_ops): Change type to std::vector.
5946 (_initialize_probe): Adjust to vector change.
5947 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5948 * elfread.c (elf_get_probes): Likewise.
5949 * stap-probe.c (_initialize_stap_probe): Likewise.
5950
1eac6bea
SM
59512017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5952
5953 * probe.h (struct bound_probe): Define constructors.
5954 * probe.c (bound_probe_s): Remove typedef.
5955 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5956 (collect_probes): Change return type to std::vector, remove
5957 cleanup.
5958 (compare_probes): Return bool, change parameter type. Change
5959 semantic to "less than".
5960 (gen_ui_out_table_header_info): Change parameter to std::vector
5961 and update.
5962 (exists_probe_with_pops): Likewise.
5963 (info_probes_for_ops): Update to std::vector change.
5964 (enable_probes_command): Likewise.
5965 (disable_probes_command): Likewise.
5966
aaa63a31
SM
59672017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5968
5969 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5970 vec to std::vector.
5971 * probe.c (parse_probes_in_pspace): Update.
5972 (find_probes_in_objfile): Update.
5973 (find_probe_by_pc): Update.
5974 (collect_probes): Update.
5975 (probe_any_get_probes): Update.
5976 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5977 return type to reference to std::vector.
5978 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5979 std::vector and update.
5980 (dtrace_process_dof): Likewise.
5981 (dtrace_get_probes): Likewise.
5982 * elfread.c (elf_get_probes): Change return type to std::vector,
5983 store an std::vector in bfd_data.
5984 (probe_key_free): Update to std::vector.
5985 * stap-probe.c (handle_stap_probe): Change parameter to
5986 std::vector and update.
5987 (stap_get_probes): Likewise.
5988 * symfile-debug.c (debug_sym_get_probes): Change return type to
5989 std::vector and update.
5990
cb85b21b
TT
59912017-09-11 Tom Tromey <tom@tromey.com>
5992
5993 * breakpoint.c (program_breakpoint_here_p): Update.
5994 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5995 from make_show_memory_breakpoints_cleanup. Return a
5996 scoped_restore_tmpl<int>.
5997 (restore_show_memory_breakpoints): Remove.
5998 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5999 * mem-break.c (memory_validate_breakpoint): Update.
6000 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6001 (ia64_memory_remove_breakpoint): Update.
6002 (ia64_breakpoint_from_pc): Update.
6003 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6004 from make_show_memory_breakpoints_cleanup.
6005
8fbc99ef
TT
60062017-09-11 Tom Tromey <tom@tromey.com>
6007
6008 * d-namespace.c (d_lookup_symbol): Use std::string.
6009 (find_symbol_in_baseclass): Likewise.
6010
50feb4bd
TT
60112017-09-11 Tom Tromey <tom@tromey.com>
6012
6013 * ctf.c (ctf_start): Use std::string.
6014
c6dc63a1
TT
60152017-09-11 Tom Tromey <tom@tromey.com>
6016
6017 * ada-lang.c (is_known_support_routine): Update.
6018 (ada_unhandled_exception_name_addr_from_raise): Update.
6019 * guile/scm-frame.c (gdbscm_frame_name): Update.
6020 * python/py-frame.c (frapy_name): Update.
6021 (frapy_function): Update.
6022 * stack.h (find_frame_funname): Update.
6023 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6024 (print_frame): Update.
6025
d6b9b80f
TT
60262017-09-11 Tom Tromey <tom@tromey.com>
6027
6028 * findcmd.c (put_bits): Take a gdb::byte_vector.
6029 (parse_find_args): Return gdb::byte_vector. "args" now const.
6030 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6031 cleanups.
6032 (find_command): Update.
6033
a9921622
TT
60342017-09-11 Tom Tromey <tom@tromey.com>
6035
6036 * cli/cli-script.c (class scoped_restore_hook_in): New.
6037 (clear_hook_in_cleanup): Remove.
6038 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6039 scoped_restore_hook_in.
6040
be0d7abb
TT
60412017-09-11 Tom Tromey <tom@tromey.com>
6042
6043 * cli/cli-script.c (restore_interp): Remove.
6044 (read_command_lines): Use scoped_restore_interp.
6045 * interps.c (scoped_restore_interp::set_temp): Rename from
6046 interp_set_temp.
6047 * interps.h (class scoped_restore_interp): New.
6048 (interp_set_temp): Remove.
6049
00f675ff
TT
60502017-09-11 Tom Tromey <tom@tromey.com>
6051
6052 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6053 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6054 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6055 scoped_restore.
6056 (mi_cmd_break_insert_1): Update.
6057 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6058 scoped_restore.
6059
cb791d59
TT
60602017-09-11 Tom Tromey <tom@tromey.com>
6061
6062 * demangle.c (demangle_command): Update.
6063 * breakpoint.c (disable_command): Update.
6064 (enable_command): Update.
6065 (find_location_by_number): Make "number" const. Use
6066 get_number_trailer.
6067 * cli/cli-utils.c (extract_arg): Return std::string.
6068 * probe.c (parse_probe_linespec): Update. Change types.
6069 (collect_probes): Take string arguments.
6070 (parse_probe_linespec): Likewise.
6071 (info_probes_for_ops): Update.
6072 (enable_probes_command): Update.
6073 (disable_probes_command): Update.
6074 * break-catch-sig.c (catch_signal_split_args): Update.
6075 * mi/mi-parse.c (mi_parse): Update.
6076
2039bd9f
TT
60772017-09-11 Tom Tromey <tom@tromey.com>
6078
6079 * language.h (language_enum): Make argument const.
6080 * language.c (language_enum): Make argument const.
6081
f1735a53
TT
60822017-09-11 Tom Tromey <tom@tromey.com>
6083
6084 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6085 as function.
6086 (skip_to_space): Rename from skip_to_space_const.
6087 * common/common-utils.c (skip_to_space): New function.
6088 (skip_to_space): Rename from skip_to_space_const.
6089 * cli/cli-utils.h (get_number): Rename from get_number_const.
6090 (extract_arg): Rename from extract_arg_const.
6091 * cli/cli-utils.c (get_number): Rename from get_number_const.
6092 (extract_arg): Rename from extract_arg_const.
6093 (number_or_range_parser::get_number): Use ::get_number.
6094 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6095 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6096 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6097 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6098 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6099 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6100 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6101 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6102
7d221d74
TT
61032017-09-11 Tom Tromey <tom@tromey.com>
6104
6105 * python/python.c (do_start_initialization): Use
6106 py-event-types.def to initialize types.
6107 Define all object type structures.
6108 * python/python-internal.h: Don't declare event initialization
6109 functions.
6110 * python/py-threadevent.c (thread_event_object_type): Don't
6111 define.
6112 * python/py-stopevent.c (stop_event_object_type): Don't define.
6113 * python/py-signalevent.c (signal_event_object_type): Don't
6114 declare or define.
6115 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6116 (clear_objfiles_event_object_type): Don't declare or define.
6117 * python/py-infevents.c (inferior_call_pre_event_object_type)
6118 (inferior_call_post_event_object_type)
6119 (register_changed_event_object_type)
6120 (memory_changed_event_object_type): Don't declare or define.
6121 * python/py-inferior.c (new_thread_event_object_type)
6122 (new_inferior_event_object_type)
6123 (inferior_deleted_event_object_type): Don't declare or define.
6124 * python/py-exitedevent.c (exited_event_object_type): Don't
6125 declare or define.
6126 * python/py-evts.c (gdbpy_initialize_py_events): Use
6127 py-all-events.def.
6128 * python/py-events.h (thread_event_object_type): Don't declare.
6129 (events_object): Use py-all-events.def.
6130 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6131 py-event-types.def.
6132 * python/py-event-types.def: New file.
6133 * python/py-continueevent.c (create_continue_event_object): Don't
6134 declare or define.
6135 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6136 declare or define.
6137 * python/py-all-events.def: New file.
6138
35c61a1d
TT
61392017-09-11 Tom Tromey <tom@tromey.com>
6140
6141 * python/py-threadevent.c (create_thread_event_object): Return
6142 gdbpy_ref.
6143 * python/py-stopevent.h (create_stop_event_object)
6144 (create_breakpoint_event_object, create_signal_event_object):
6145 Update.
6146 * python/py-stopevent.c (create_stop_event_object): Return
6147 gdbpy_ref.
6148 (emit_stop_event): Update.
6149 * python/py-signalevent.c (create_signal_event_object): Return
6150 gdbpy_ref.
6151 * python/py-infevents.c (create_inferior_call_event_object):
6152 Update.
6153 * python/py-event.h (create_event_object)
6154 (create_thread_event_object): Update.
6155 * python/py-event.c (create_event_object): Return gdbpy_ref.
6156 * python/py-continueevent.c: Return gdbpy_ref.
6157 * python/py-bpevent.c (create_breakpoint_event_object): Return
6158 gdbpy_ref.
6159
7c96f8c1
TT
61602017-09-11 Tom Tromey <tom@tromey.com>
6161
6162 PR python/15622:
6163 * NEWS: Add entry.
6164 * python/python.c (do_start_initialization): Initialize new event
6165 types.
6166 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6167 (gdbpy_initialize_inferior_deleted_event)
6168 (gdbpy_initialize_new_thread_event): Declare.
6169 * python/py-threadevent.c (create_thread_event_object): Add option
6170 "thread" parameter.
6171 * python/py-inferior.c (new_thread_event_object_type)
6172 (new_inferior_event_object_type)
6173 (inferior_deleted_event_object_type): Declare.
6174 (python_new_inferior, python_inferior_deleted): New functions.
6175 (add_thread_object): Emit new_thread event.
6176 (gdbpy_initialize_inferior): Attach new functions to corresponding
6177 observers.
6178 (new_thread, new_inferior, inferior_deleted): Define new event
6179 types.
6180 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6181 registries.
6182 * python/py-events.h (events_object) <new_inferior,
6183 inferior_deleted, new_thread>: New fields.
6184 * python/py-event.h (create_thread_event_breakpoint): Add optional
6185 "thread" parameter.
6186
72542b8e
AB
61872017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6188
6189 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6190 check current_ui instead.
6191 (internal_vproblem): Likewise.
6192
0d64823e
SM
61932017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6194
6195 * thread.c (print_thread_info_1): Remove unnecessary calls to
6196 uiout->is_mi_like_p.
6197
eb1e02fd
TT
61982017-09-09 Tom Tromey <tom@tromey.com>
6199
6200 * namespace.h (add_using_directive): Update.
6201 * namespace.c (add_using_directive): Change type of excludes to
6202 std::vector.
6203 * dwarf2read.c (read_import_statement): Use std::vector.
6204 (read_namespace): Update.
6205 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6206
0fc21fd8
TT
62072017-09-09 Tom Tromey <tom@tromey.com>
6208
6209 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6210
49663d05
TT
62112017-09-09 Tom Tromey <tom@tromey.com>
6212
6213 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6214
0b868b60
TT
62152017-09-09 Tom Tromey <tom@tromey.com>
6216
6217 * stack.c (func_command): Use gdb::def_vector.
6218
c0470d48
TT
62192017-09-09 Tom Tromey <tom@tromey.com>
6220
6221 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6222 ui_out_emit_list, ui_out_emit_tuple.
6223 (mi_cmd_var_update): Likewise.
6224
ca5909c7
TT
62252017-09-09 Tom Tromey <tom@tromey.com>
6226
6227 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6228 ui_out_redirect_pop.
6229 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6230 ui_out_redirect_pop.
6231 * utils.c (do_ui_out_redirect_pop)
6232 (make_cleanup_ui_out_redirect_pop): Remove.
6233 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6234 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6235 * ui-out.h (ui_out_redirect_pop): New class.
6236
e6a2252a
TT
62372017-09-09 Tom Tromey <tom@tromey.com>
6238
6239 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6240 (list_available_thread_groups, mi_cmd_list_thread_groups)
6241 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6242 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6243 Likewise.
6244
393702cd
TT
62452017-09-09 Tom Tromey <tom@tromey.com>
6246
6247 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6248 ui_out_emit_tuple.
6249
76f9c9cf
TT
62502017-09-09 Tom Tromey <tom@tromey.com>
6251
6252 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6253 * stack.c (print_frame): Use ui_out_emit_tuple.
6254 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6255 (info_spu_mailbox_command, info_spu_dma_command)
6256 (info_spu_proxydma_command): Likewise.
6257 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6258 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6259 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6260 ui_out_emit_tuple.
6261 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6262
dc9fe180
TT
62632017-09-09 Tom Tromey <tom@tromey.com>
6264
6265 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6266 (class ui_out_emit_table): Update comment.
6267 * ui-out.c (do_cleanup_table_end)
6268 (make_cleanup_ui_out_table_begin_end): Remove.
6269 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6270 (info_spu_dma_cmdlist): Likewise.
6271 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6272 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6273 ui_out_emit_table.
6274
f8cc3da6
TT
62752017-09-09 Tom Tromey <tom@tromey.com>
6276
6277 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6278 ui_out_emit_list, gdb::optional.
6279
481695ed
JB
62802017-09-09 John Baldwin <jhb@FreeBSD.org>
6281
6282 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6283 prototype.
6284 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6285 prototype.
6286 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6287 prototype.
6288 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6289 * ada-exp.y: Remove _initialize_ada_exp prototype.
6290 * ada-lang.c: Remove _initialize_ada_language prototype.
6291 * ada-tasks.c: Remove _initialize_tasks prototype.
6292 * addrmap.c: Remove _initialize_addrmap prototype.
6293 * agent.c: Remove _initialize_agent prototype.
6294 * aix-thread.c: Remove _initialize_aix_thread prototype.
6295 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6296 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6297 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6298 prototype.
6299 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6300 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6301 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6302 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6303 prototype.
6304 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6305 prototype.
6306 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6307 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6308 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6309 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6310 prototype.
6311 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6312 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6313 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6314 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6315 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6316 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6317 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6318 prototype.
6319 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6320 prototype.
6321 * annotate.c: Remove _initialize_annotate prototype.
6322 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6323 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6324 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6325 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6326 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6327 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6328 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6329 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6330 prototype.
6331 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6332 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6333 * auto-load.c: Remove _initialize_auto_load prototype.
6334 * auxv.c: Remove _initialize_auxv prototype.
6335 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6336 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6337 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6338 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6339 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6340 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6341 prototype.
6342 * break-catch-throw.c: Remove _initialize_break_catch_throw
6343 prototype.
6344 * breakpoint.c: Remove _initialize_breakpoint prototype.
6345 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6346 * btrace.c: Remove _initialize_btrace prototype.
6347 * charset.c: Remove _initialize_charset prototype.
6348 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6349 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6350 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6351 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6352 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6353 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6354 * coffread.c: Remove _initialize_coffread prototype.
6355 * compile/compile.c: Remove _initialize_compile prototype.
6356 * complaints.c: Remove _initialize_complaints prototype.
6357 * completer.c: Remove _initialize_completer prototype.
6358 * copying.awk: Remove _initialize_copying prototype.
6359 * copying.c: Regenerate.
6360 * core-regset.c: Remove _initialize_core_regset prototype.
6361 * corefile.c: Remove _initialize_core prototype.
6362 * corelow.c: Remove _initialize_corelow prototype.
6363 * cp-abi.c: Remove _initialize_cp_abi prototype.
6364 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6365 * cp-support.c: Remove _initialize_cp_support prototype.
6366 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6367 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6368 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6369 * ctf.c: Remove _initialize_ctf prototype.
6370 * d-lang.c: Remove _initialize_d_language prototype.
6371 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6372 prototype.
6373 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6374 * dbxread.c: Remove _initialize_dbxread prototype.
6375 * dcache.c: Remove _initialize_dcache prototype.
6376 * demangle.c: Remove _initialize_demangler prototype.
6377 * disasm-selftests.c: Remove _initialize_disasm_selftests
6378 prototype.
6379 * disasm.c: Remove _initialize_disasm prototype.
6380 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6381 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6382 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6383 prototype.
6384 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6385 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6386 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6387 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6388 * elfread.c: Remove _initialize_elfread prototype.
6389 * exec.c: Remove _initialize_exec prototype.
6390 * extension.c: Remove _initialize_extension prototype.
6391 * f-lang.c: Remove _initialize_f_language prototype.
6392 * f-valprint.c: Remove _initialize_f_valprint prototype.
6393 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6394 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6395 * filesystem.c: Remove _initialize_filesystem prototype.
6396 * findcmd.c: Remove _initialize_mem_search prototype.
6397 * fork-child.c: Remove _initialize_fork_child prototype.
6398 * frame-base.c: Remove _initialize_frame_base prototype.
6399 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6400 * frame.c: Remove _initialize_frame prototype.
6401 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6402 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6403 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6404 * gcore.c: Remove _initialize_gcore prototype.
6405 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6406 * gdbarch.c: Regenerate.
6407 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6408 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6409 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6410 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6411 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6412 * go-lang.c: Remove _initialize_go_language prototype.
6413 * go32-nat.c: Remove _initialize_go32_nat prototype.
6414 * guile/guile.c: Remove _initialize_guile prototype.
6415 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6416 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6417 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6418 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6419 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6420 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6421 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6422 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6423 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6424 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6425 prototype.
6426 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6427 prototype.
6428 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6429 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6430 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6431 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6432 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6433 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6434 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6435 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6436 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6437 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6438 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6439 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6440 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6441 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6442 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6443 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6444 prototype.
6445 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6446 prototype.
6447 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6448 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6449 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6450 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6451 * infcall.c: Remove _initialize_infcall prototype.
6452 * infcmd.c: Remove _initialize_infcmd prototype.
6453 * inferior.c: Remove _initialize_inferiors prototype.
6454 * inflow.c: Remove _initialize_inflow prototype.
6455 * infrun.c: Remove _initialize_infrun prototype.
6456 * interps.c: Remove _initialize_interpreter prototype.
6457 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6458 * jit.c: Remove _initialize_jit prototype.
6459 * language.c: Remove _initialize_language prototype.
6460 * linux-fork.c: Remove _initialize_linux_fork prototype.
6461 * linux-nat.c: Remove _initialize_linux_nat prototype.
6462 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6463 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6464 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6465 * m2-lang.c: Remove _initialize_m2_language prototype.
6466 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6467 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6468 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6469 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6470 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6471 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6472 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6473 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6474 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6475 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6476 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6477 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6478 * machoread.c: Remove _initialize_machoread prototype.
6479 * macrocmd.c: Remove _initialize_macrocmd prototype.
6480 * macroscope.c: Remove _initialize_macroscope prototype.
6481 * maint.c: Remove _initialize_maint_cmds prototype.
6482 * mdebugread.c: Remove _initialize_mdebugread prototype.
6483 * memattr.c: Remove _initialize_mem prototype.
6484 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6485 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6486 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6487 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6488 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6489 * microblaze-linux-tdep.c: Remove
6490 _initialize_microblaze_linux_tdep prototype.
6491 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6492 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6493 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6494 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6495 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6496 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6497 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6498 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6499 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6500 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6501 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6502 prototype.
6503 * mipsread.c: Remove _initialize_mipsread prototype.
6504 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6505 prototype.
6506 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6507 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6508 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6509 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6510 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6511 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6512 prototype.
6513 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6514 * nto-procfs.c: Remove _initialize_procfs prototype.
6515 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6516 * objc-lang.c: Remove _initialize_objc_language prototype.
6517 * objfiles.c: Remove _initialize_objfiles prototype.
6518 * observer.c: Remove observer_test_first_notification_function,
6519 observer_test_second_notification_function,
6520 observer_test_third_notification_function, and
6521 _initialize_observer prototypes.
6522 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6523 * osabi.c: Remove _initialize_gdb_osabi prototype.
6524 * osdata.c: Remove _initialize_osdata prototype.
6525 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6526 * parse.c: Remove _initialize_parse prototype.
6527 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6528 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6529 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6530 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6531 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6532 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6533 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6534 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6535 * printcmd.c: Remove _initialize_printcmd prototype.
6536 * probe.c: Remove _initialize_probe prototype.
6537 * proc-api.c: Remove _initialize_proc_api prototype.
6538 * proc-events.c: Remove _initialize_proc_events prototype.
6539 * proc-service.c: Remove _initialize_proc_service prototype.
6540 * procfs.c: Remove _initialize_procfs prototype.
6541 * psymtab.c: Remove _initialize_psymtab prototype.
6542 * python/python.c: Remove _initialize_python prototype.
6543 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6544 * record-btrace.c: Remove _initialize_record_btrace prototype.
6545 * record-full.c: Remove _initialize_record_full prototype.
6546 * record.c: Remove _initialize_record prototype.
6547 * regcache.c: Remove _initialize_regcache prototype.
6548 * reggroups.c: Remove _initialize_reggroup prototype.
6549 * remote-notif.c: Remove _initialize_notif prototype.
6550 * remote-sim.c: Remove _initialize_remote_sim prototype.
6551 * remote.c: Remove _initialize_remote prototype.
6552 * reverse.c: Remove _initialize_reverse prototype.
6553 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6554 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6555 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6556 prototype.
6557 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6558 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6559 * rust-exp.y: Remove _initialize_rust_exp prototype.
6560 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6561 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6562 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6563 * score-tdep.c: Remove _initialize_score_tdep prototype.
6564 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6565 prototype.
6566 * ser-go32.c: Remove _initialize_ser_dos prototype.
6567 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6568 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6569 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6570 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6571 * serial.c: Remove _initialize_serial prototype.
6572 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6573 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6574 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6575 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6576 * skip.c: Remove _initialize_step_skip prototype.
6577 * sol-thread.c: Remove _initialize_sol_thread prototype.
6578 * solib-aix.c: Remove _initialize_solib_aix prototype.
6579 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6580 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6581 * solib-frv.c: Remove _initialize_frv_solib prototype.
6582 * solib-spu.c: Remove _initialize_spu_solib prototype.
6583 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6584 * solib-target.c: Remove _initialize_solib_target prototype.
6585 * solib.c: Remove _initialize_solib prototype.
6586 * source.c: Remove _initialize_source prototype.
6587 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6588 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6589 prototype.
6590 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6591 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6592 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6593 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6594 prototype.
6595 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6596 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6597 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6598 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6599 prototype.
6600 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6601 prototype.
6602 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6603 prototype.
6604 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6605 prototype.
6606 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6607 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6608 prototype.
6609 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6610 prototype.
6611 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6612 prototype.
6613 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6614 prototype.
6615 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6616 prototype.
6617 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6618 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6619 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6620 * stabsread.c: Remove _initialize_stabsread prototype.
6621 * stack.c: Remove _initialize_stack prototype.
6622 * stap-probe.c: Remove _initialize_stap_probe prototype.
6623 * std-regs.c: Remove _initialize_frame_reg prototype.
6624 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6625 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6626 * symfile.c: Remove _initialize_symfile prototype.
6627 * symmisc.c: Remove _initialize_symmisc prototype.
6628 * symtab.c: Remove _initialize_symtab prototype.
6629 * target-dcache.c: Remove _initialize_target_dcache prototype.
6630 * target-descriptions.c: Remove _initialize_target_descriptions
6631 prototype.
6632 * thread.c: Remove _initialize_thread prototype.
6633 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6634 prototype.
6635 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6636 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6637 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6638 prototype.
6639 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6640 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6641 * tracefile.c: Remove _initialize_tracefile prototype.
6642 * tracepoint.c: Remove _initialize_tracepoint prototype.
6643 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6644 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6645 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6646 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6647 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6648 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6649 * tui/tui.c: Remove _initialize_tui prototype.
6650 * typeprint.c: Remove _initialize_typeprint prototype.
6651 * user-regs.c: Remove _initialize_user_regs prototype.
6652 * utils.c: Remove _initialize_utils prototype.
6653 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6654 * valarith.c: Remove _initialize_valarith prototype.
6655 * valops.c: Remove _initialize_valops prototype.
6656 * valprint.c: Remove _initialize_valprint prototype.
6657 * value.c: Remove _initialize_values prototype.
6658 * varobj.c: Remove _initialize_varobj prototype.
6659 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6660 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6661 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6662 * windows-nat.c: Remove _initialize_windows_nat,
6663 _initialize_check_for_gdb_ini, and _initialize_loadable
6664 prototypes.
6665 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6666 * xcoffread.c: Remove _initialize_xcoffread prototype.
6667 * xml-support.c: Remove _initialize_xml_support prototype.
6668 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6669 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6670 prototype.
6671 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6672 prototype.
6673 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6674
a611b5cb
KS
66752017-09-08 Keith Seitz <keiths@redhat.com>
6676
6677 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6678 field.
6679
469412dd
CW
66802017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6681
6682 * f-valprint.c (f_val_print): Remove check for one byte
6683 sized integers. Remove printing of character type.
6684
a5ad232b
FP
66852017-09-08 Frank Penczek <frank.penczek@intel.com>
6686 Christoph Weinmann <christoph.t.weinmann@intel.com>
6687 Bernhard Heckel <bernhard.heckel@intel.com>
6688
6689 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6690 to maintain proper indentation when printing pointers/refs.
6691
e5014227
JB
66922017-09-07 Joel Brobecker <brobecker@adacore.com>
6693
6694 GDB 8.0.1 released.
6695
63c99141
JB
66962017-09-07 Joel Brobecker <brobecker@adacore.com>
6697
6698 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6699
69c1e056
TT
67002017-09-05 Tom Tromey <tom@tromey.com>
6701
6702 * parse.c (funcall_chain): Now a std::vector.
6703 (start_arglist, end_arglist): Simplify.
6704 (free_funcalls): Remove.
6705 (parse_exp_in_context_1): Remove cleanup.
6706
fef704bf
TT
67072017-09-05 Tom Tromey <tom@tromey.com>
6708
6709 * go-exp.y (go_parse): Don't create a cleanup.
6710
5613c585
TT
67112017-09-05 Tom Tromey <tom@tromey.com>
6712
6713 * d-exp.y (PrimaryExpression): Use std::string.
6714 (d_parse): Don't create a cleanup.
6715
eae49211
TT
67162017-09-05 Tom Tromey <tom@tromey.com>
6717
6718 * utils.c (do_clear_parser_state): Remove.
6719 (make_cleanup_clear_parser_state): Remove.
6720 * p-exp.y (pascal_parse): Use scoped_restore.
6721 * m2-exp.y (m2_parse): Use scoped_restore.
6722 * f-exp.y (f_parse): Use scoped_restore.
6723 * d-exp.y (d_parse): Use scoped_restore.
6724 * c-exp.y (c_parse): Use scoped_restore.
6725 * ada-exp.y (ada_parse): Use scoped_restore.
6726 * utils.h (make_cleanup_clear_parser_state): Remove.
6727
73b9be8b
KS
67282017-09-06 Keith Seitz <keiths@redhat.com>
6729
6730 * dwarf2read.c (dw2_linkage_name_attr): New function.
6731 (dw2_linkage_name): New function.
6732 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6733 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6734 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6735
a102602b
KR
67362017-09-06 Kamil Rytarowski <n54@gmx.com>
6737
6738 * config/djgpp/djconfig.sh: Correct shell portability issue.
6739
28ad437d
KR
67402017-09-06 Kamil Rytarowski <n54@gmx.com>
6741
6742 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6743
351787dd
JB
67442017-09-06 John Baldwin <jhb@FreeBSD.org>
6745
6746 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6747 * NEWS: Mention new FreeBSD/mips native configuration.
6748 * configure.host: Add aarch64*-*-freebsd*.
6749 * configure.nat: Likewise.
6750 * aarch64-fbsd-nat.c: New file.
6751
c0f84956
JB
67522017-09-06 John Baldwin <jhb@FreeBSD.org>
6753
6754 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6755 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6756 * NEWS: Mention new FreeBSD/aarch64 target.
6757 * configure.tgt: Add aarch64*-*-freebsd*.
6758 * aarch64-fbsd-tdep.c: New file.
6759 * aarch64-fbsd-tdep.h: New file.
6760
7610297a
KR
67612017-09-06 Kamil Rytarowski <n54@gmx.com>
6762
6763 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6764
fbd1b771
JK
67652017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6766
6767 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6768 of TLS symbols.
6769
5ca79eae
PW
67702017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6771
6772 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6773 call.
6774
bf93d7ba
SM
67752017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6776
6777 * infrun.c (follow_exec): Call add_thread after
6778 target_find_description.
6779
1bb7c059
SM
67802017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6781
6782 * infrun.c (handle_inferior_event_1): When exec'ing, read
6783 stop_pc after follow_exec.
6784
fc809827
SM
67852017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6786
6787 * remote.c (process_g_packet): Update error message.
6788
d2fcdd85
YQ
67892017-09-05 Yao Qi <yao.qi@linaro.org>
6790
6791 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6792 targets.
6793
e69570ee
PA
67942017-09-05 Pedro Alves <palves@redhat.com>
6795
6796 * eval.c (eval_call, evaluate_funcall): New functions, factored
6797 out from ...
6798 (evaluate_subexp_standard): ... this.
6799
22916b07
YQ
68002017-09-05 Yao Qi <yao.qi@linaro.org>
6801
6802 * amd64-tdep.c (amd64_target_description): Create target
6803 descriptions.
6804 (_initialize_amd64_tdep): Don't call functions
6805 initialize_tdesc_amd64_*. Add self tests.
6806 * arch/amd64.c (amd64_create_target_description): Add parameter
6807 is_linux. Call set_tdesc_osabi if is_linux is true.
6808 * arch/amd64.h (amd64_create_target_description): Update the
6809 declaration.
6810 * arch/i386.c (i386_create_target_description): Add parameter
6811 is_linux. Call set_tdesc_osabi if is_linux is true.
6812 * arch/i386.h (i386_create_target_description): Update
6813 declaration.
6814 * configure.tgt: Add i386.o to gdb_target_obs.
6815 * features/Makefile (XMLTOC): Remove i386/*.xml.
6816 * features/i386/amd64-avx-avx512.c: Remove.
6817 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6818 * features/i386/amd64-avx-mpx.c: Remove.
6819 * features/i386/amd64-avx.c: Remove.
6820 * features/i386/amd64-mpx.c: Remove.
6821 * features/i386/amd64.c: Remove.
6822 * features/i386/i386-avx-avx512.c: Remove.
6823 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6824 * features/i386/i386-avx-mpx.c: Remove.
6825 * features/i386/i386-avx.c: Remove.
6826 * features/i386/i386-mmx.c: Remove.
6827 * features/i386/i386-mpx.c: Remove.
6828 * features/i386/i386.c: Remove.
6829 * i386-tdep.c: Don't include features/i386/i386*.c., include
6830 target-descriptions.h and arch/i386.h.
6831 (i386_target_description): Create target descriptions.
6832 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6833 functions. Do self tests.
6834
0854b7b1
YQ
68352017-09-05 Yao Qi <yao.qi@linaro.org>
6836
6837 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6838 * features/i386/amd64-avx-avx512-linux.c: Removed.
6839 * features/i386/amd64-avx-linux.c: Removed.
6840 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6841 * features/i386/amd64-avx-mpx-linux.c: Removed.
6842 * features/i386/amd64-linux.c: Removed.
6843 * features/i386/amd64-mpx-linux.c: Removed.
6844 * features/i386/x32-avx-avx512-linux.c: Removed.
6845 * features/i386/x32-avx-linux.c: Removed.
6846 * features/i386/x32-linux.c: Removed.
6847
b4570e4b
YQ
68482017-09-05 Yao Qi <yao.qi@linaro.org>
6849
6850 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6851 features/i386/*.c.
6852 (amd64_linux_read_description): Call
6853 amd64_create_target_description.
6854 * arch/amd64.c: New file.
6855 * arch/amd64.h: New file.
6856 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6857 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6858
6c73f67f
YQ
68592017-09-05 Yao Qi <yao.qi@linaro.org>
6860
6861 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6862 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6863 (amd64_linux_read_description): Create target descriptions.
6864 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6865 functions. Add unit tests.
6866 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6867 x32-core.xml.
6868 * features/i386/64bit-avx.c: Generated.
6869 * features/i386/64bit-avx512.c: Generated.
6870 * features/i386/64bit-core.c: Generated.
6871 * features/i386/64bit-linux.c: Generated.
6872 * features/i386/64bit-mpx.c: Generated.
6873 * features/i386/64bit-pkeys.c: Generated.
6874 * features/i386/64bit-segments.c: Generated.
6875 * features/i386/64bit-sse.c: Generated.
6876 * features/i386/x32-core.c: Generated.
6877 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6878 c files for amd64-linux and x32-linux.
6879
9d3d478b
YQ
68802017-09-05 Yao Qi <yao.qi@linaro.org>
6881
6882 * amd64-linux-tdep.c (amd64_linux_read_description): New
6883 function.
6884 (amd64_linux_core_read_description): Call
6885 amd64_linux_read_description.
6886 (amd64_linux_init_abi): Likewise.
6887 (amd64_x32_linux_init_abi): Likewise.
6888 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6889 * x86-linux-nat.c (x86_linux_read_description): Call
6890 amd64_linux_read_description.
6891
b9f1d50f
YQ
68922017-09-05 Yao Qi <yao.qi@linaro.org>
6893
6894 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6895 comments.
6896
188c9e6d
YQ
68972017-09-05 Yao Qi <yao.qi@linaro.org>
6898
6899 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6900 * features/i386/i386-avx-avx512-linux.c: Remove.
6901 * features/i386/i386-avx-linux.c: Remove.
6902 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6903 * features/i386/i386-avx-mpx-linux.c: Remove.
6904 * features/i386/i386-linux.c: Remove.
6905 * features/i386/i386-mmx-linux.c: Remove.
6906 * features/i386/i386-mpx-linux.c: Remove.
6907
5f035c07
YQ
69082017-09-05 Yao Qi <yao.qi@linaro.org>
6909
6910 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6911 (SFILES): Add arch/i386.c.
6912 (HFILES_NO_SRCDIR): Add arch/i386.h.
6913 * arch/i386.c: New file.
6914 * arch/i386.h: New file.
6915 * arch/tdesc.h (allocate_target_description): Declare.
6916 (set_tdesc_architecture): Declare.
6917 (set_tdesc_osabi): Declare.
6918 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6919 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6920 include arch/i386.h.
6921 (i386_linux_read_description): Remove code and call
6922 i386_create_target_description.
6923 (set_tdesc_architecture): New function.
6924 (set_tdesc_osabi): New function.
6925 * target-descriptions.h (allocate_target_description): Remove.
6926
0abe8a89
YQ
69272017-09-05 Yao Qi <yao.qi@linaro.org>
6928
6929 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6930 * target-descriptions.c (tdesc_create_feature): Likewise, and
6931 adjust code.
6932 * features/i386/32bit-avx.c: Re-generated.
6933 * features/i386/32bit-avx512.c: Re-generated.
6934 * features/i386/32bit-core.c: Re-generated.
6935 * features/i386/32bit-linux.c: Re-generated.
6936 * features/i386/32bit-mpx.c: Re-generated.
6937 * features/i386/32bit-pkeys.c: Re-generated.
6938 * features/i386/32bit-sse.c: Re-generated.
6939
0a188386
YQ
69402017-09-05 Yao Qi <yao.qi@linaro.org>
6941
6942 * regformats/regdef.h (struct reg): Override operator == and !=.
6943
f49ff000
YQ
69442017-09-05 Yao Qi <yao.qi@linaro.org>
6945
6946 * arch/tdesc.h: New file.
6947 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6948 * target-descriptions.c: Update comments.
6949 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6950 declarations.
6951 * features/i386/32bit-avx.c: Re-generated.
6952 * features/i386/32bit-avx512.c: Re-generated.
6953 * features/i386/32bit-core.c: Re-generated.
6954 * features/i386/32bit-linux.c: Re-generated.
6955 * features/i386/32bit-mpx.c: Re-generated.
6956 * features/i386/32bit-pkeys.c: Re-generated.
6957 * features/i386/32bit-sse.c: Re-generated.
6958
f7000548
YQ
69592017-09-05 Yao Qi <yao.qi@linaro.org>
6960
6961 * regformats/regdat.sh: Update generated code.
6962
c9a5e2a5
YQ
69632017-09-05 Yao Qi <yao.qi@linaro.org>
6964
6965 * regformats/regdat.sh: Adjust code order.
6966
d6b687ac
SM
69672017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6968
6969 * expprint.c (dump_subexp_body_standard): Use constant format
6970 string in fprintf_filtered call.
6971
a379bfd0
JB
69722017-09-04 John Baldwin <jhb@FreeBSD.org>
6973
6974 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6975 NetBSD/i386.
6976 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6977
f7efc967
JB
69782017-09-04 John Baldwin <jhb@FreeBSD.org>
6979
6980 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6981
c49fbc6c
JB
69822017-09-04 John Baldwin <jhb@FreeBSD.org>
6983
6984 * bsd-kvm.o: Define _KMEMUSER.
6985 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6986 * configure: Regenerate.
6987
26562e73
JB
69882017-09-04 John Baldwin <jhb@FreeBSD.org>
6989
6990 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6991 * i386-fbsd-nat.c: Likewise.
6992
31cf1487
JB
69932017-09-04 John Baldwin <jhb@FreeBSD.org>
6994
6995 * unittests/array-view-selftests.c: Add include of <array>.
6996
5b9f8a7c
JB
69972017-09-04 John Baldwin <jhb@FreeBSD.org>
6998
6999 * spu-tdep.c (flush_ea_cache): Add missing argument to
7000 call_function_by_hand.
7001
d69cf9b2
PA
70022017-09-04 Pedro Alves <palves@redhat.com>
7003
7004 * NEWS (Safer support for debugging with no debug info): New.
7005
3693fdb3
PA
70062017-09-04 Pedro Alves <palves@redhat.com>
7007
7008 * c-exp.y (function_method, function_method_void): Add current
7009 instance flags to TYPE_INSTANCE.
7010 * dwarf2read.c (check_modifier): New.
7011 (compute_delayed_physnames): Assert that only C++ adds delayed
7012 physnames. Mark fn_fields as const/volatile depending on
7013 physname.
7014 * eval.c (make_params): New type_instance_flags parameter. Use
7015 it as the new type's instance flags.
7016 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7017 flags element and pass it to make_params.
7018 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7019 instance flags element.
7020 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7021 * gdbtypes.h: Include "enum-flags.h".
7022 (type_instance_flags): New enum-flags type.
7023 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7024 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7025 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7026 (follow_type_instance_flags): New function.
7027 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7028 * parser-defs.h (follow_type_instance_flags): Declare.
7029 * valops.c (value_struct_elt_for_reference): const/volatile must
7030 match too.
7031
e68cb8e0
PA
70322017-09-04 Pedro Alves <palves@redhat.com>
7033
7034 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7035 function/method scopes; lookup the nested name as a function local
7036 static variable.
7037
858be34c
PA
70382017-09-04 Pedro Alves <palves@redhat.com>
7039
7040 (%type <voidval>): Add function_method.
7041 * c-exp.y (exp): New production for calls with no arguments.
7042 (function_method, function_method_void_or_typelist): New
7043 productions.
7044 (exp): New production for "method()::static_var".
7045 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7046 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7047 Handle OP_FUNC_STATIC_VAR.
7048 * parse.c (operator_length_standard):
7049 Handle OP_FUNC_STATIC_VAR.
7050
dd5901a6
PA
70512017-09-04 Pedro Alves <palves@redhat.com>
7052
7053 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7054 handling.
7055 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7056 Ditto.
7057 * parse.c (operator_length_standard, operator_check_standard):
7058 Ditto.
7059 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7060
46a4882b
PA
70612017-09-04 Pedro Alves <palves@redhat.com>
7062
7063 * ax-gdb.c: Include "typeprint.h".
7064 (gen_expr_for_cast): New function.
7065 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7066 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7067 type is unknown.
7068 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7069 nodebug_data_symbol.
7070 * eval.c: Include "typeprint.h".
7071 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7072 Error out if symbol has unknown type.
7073 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7074 evaluate_subexp_for_cast.
7075 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7076 OP_VAR_MSYM_VALUE.
7077 (evaluate_subexp_for_cast): New function.
7078 * gdbtypes.c (init_nodebug_var_type): New function.
7079 (objfile_type): Use it to initialize types of variables with no
7080 debug info.
7081 * typeprint.c (error_unknown_type): New.
7082 * typeprint.h (error_unknown_type): New declaration.
7083 * compile/compile-c-types.c (convert_type_basic): Handle
7084 TYPE_CODE_ERROR; warn and fallback to int for variables with
7085 unknown type.
7086
fe13dfec
PA
70872017-09-04 Pedro Alves <palves@redhat.com>
7088
7089 * eval.c (evaluate_var_value): New function, factored out from ...
7090 (evaluate_subexp_standard): ... here.
7091
d008ee21
PA
70922017-09-04 Pedro Alves <palves@redhat.com>
7093
7094 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7095 Remove useless assignments to 'op'.
7096
827d0c51
PA
70972017-09-04 Pedro Alves <palves@redhat.com>
7098
7099 * eval.c (eval_skip_value): New function.
7100 (evaluate_subexp_standard): Use it.
7101
2c5a2be1
PA
71022017-09-04 Pedro Alves <palves@redhat.com>
7103
7104 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7105 function name from symbol/minsym and pass it to
7106 error_call_unknown_return_type.
7107
74ea4be4
PA
71082017-09-04 Pedro Alves <palves@redhat.com>
7109
7110 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7111 * ax-gdb.c (gen_msym_var_ref): New function.
7112 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7113 * eval.c (evaluate_var_msym_value): New function.
7114 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7115 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7116 to call_function_by_hand.
7117 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7118 Handle OP_VAR_MSYM_VALUE.
7119 (union exp_element) <msymbol>: New field.
7120 * minsyms.h (struct type): Forward declare.
7121 (find_minsym_type_and_address): Declare.
7122 * parse.c (write_exp_elt_msym): New function.
7123 (write_exp_msymbol): Delete, refactored as ...
7124 (find_minsym_type_and_address): ... this new function.
7125 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7126 (operator_length_standard, operator_check_standard): Handle
7127 OP_VAR_MSYM_VALUE.
7128 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7129
7022349d
PA
71302017-09-04 Pedro Alves <palves@redhat.com>
7131
7132 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7133 TYPE_GNU_IFUNC specially here. Throw error if return type is
7134 unknown.
7135 * ada-typeprint.c (print_func_type): Handle functions with unknown
7136 return type.
7137 * c-typeprint.c (c_type_print_base): Handle functions and methods
7138 with unknown return type.
7139 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7140 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7141 * compile/compile-c-types.c: Include "objfiles.h".
7142 (convert_func): For functions with unknown return type, warn and
7143 default to int.
7144 * compile/compile-object-run.c (compile_object_run): Adjust call
7145 to call_function_by_hand_dummy.
7146 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7147 call_function_by_hand.
7148 * eval.c (evaluate_subexp_standard): Adjust calls to
7149 call_function_by_hand. Handle functions and methods with unknown
7150 return type. Pass expect_type to call_function_by_hand.
7151 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7152 return type.
7153 * gcore.c (call_target_sbrk): Adjust call to
7154 call_function_by_hand.
7155 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7156 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7157 an integer address type instead of nodebug.
7158 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7159 call_function_by_hand.
7160 * infcall.c (error_call_unknown_return_type): New function.
7161 (call_function_by_hand): New "default_return_type" parameter.
7162 Pass it down.
7163 (call_function_by_hand_dummy): New "default_return_type"
7164 parameter. Use it instead of defaulting to int. If there's no
7165 default and the return type is unknown, throw an error. If
7166 there's a default return type, and the called function has no
7167 debug info, then assume the function is prototyped.
7168 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7169 New "default_return_type" parameter.
7170 (error_call_unknown_return_type): New declaration.
7171 * linux-fork.c (call_lseek): Cast return type of lseek.
7172 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7173 call_function_by_hand.
7174 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7175 calls to call_function_by_hand.
7176 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7177 return type.
7178 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7179 (value_nsstring, print_object_command): Adjust calls to
7180 call_function_by_hand.
7181 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7182 functions with unknown return type.
7183 (pascal_type_print_func_varspec_suffix): New function.
7184 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7185 TYPE_CODE_METHOD>: Use it.
7186 * python/py-value.c (valpy_call): Adjust call to
7187 call_function_by_hand.
7188 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7189 call_function_by_hand.
7190 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7191 call_function_by_hand.
7192 * valops.c (value_allocate_space_in_inferior): Adjust call to
7193 call_function_by_hand.
7194 * typeprint.c (type_print_unknown_return_type): New function.
7195 * typeprint.h (type_print_unknown_return_type): New declaration.
7196
54990598
PA
71972017-09-04 Pedro Alves <palves@redhat.com>
7198
7199 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7200 types with more than one parameter as prototyped.
7201
9a24775b
PA
72022017-09-04 Pedro Alves <palves@redhat.com>
7203
7204 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7205 (disassemble_command): Use gdb_disassembly_flags instead of bare
7206 int.
7207 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7208 (dump_insns, do_mixed_source_and_assembly_deprecated)
7209 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7210 Use gdb_disassembly_flags instead of bare int.
7211 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7212 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7213 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7214 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7215 (enum gdb_disassembly_flag): ... values of this new enumeration.
7216 (gdb_disassembly_flags): Define.
7217 (gdb_disassembly)
7218 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7219 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7220 gdb_disassembly_flags instead of bare int.
7221 * record-btrace.c (btrace_insn_history)
7222 (record_btrace_insn_history, record_btrace_insn_history_range)
7223 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7224 instead of bare int.
7225 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7226 Use gdb_disassembly_flags instead of bare int.
7227 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7228 Define.
7229 * target-delegates.c: Regenerate.
7230 * target.c (target_insn_history, target_insn_history_from)
7231 (target_insn_history_range): Use gdb_disassembly_flags instead of
7232 bare int.
7233 * target.h: Include "disasm.h".
7234 (struct target_ops) <to_insn_history, to_insn_history_from,
7235 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7236 int.
7237 (target_insn_history, target_insn_history_from)
7238 (target_insn_history_range): Use gdb_disassembly_flags instead of
7239 bare int.
7240
80a65e9b
SM
72412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7242
7243 * cli/cli-script.c (build_command_line): For if/while commands,
7244 check whether args is empty.
7245
6b66338c
SM
72462017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7247
7248 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7249 (enum command_control_type): Likewise.
7250 (struct command_line): Likewise.
7251 (free_command_lines): Likewise.
7252 (struct command_lines_deleter): Likewise.
7253 (command_line_up): Likewise.
7254 (read_command_lines): Likewise.
7255 (read_command_lines_1): Likewise.
7256 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7257 (enum command_control_type): Likewise.
7258 (struct command_line): Likewise.
7259 (free_command_lines): Likewise.
7260 (struct command_lines_deleter): Likewise.
7261 (command_line_up): Likewise.
7262 (read_command_lines): Likewise.
7263 (read_command_lines_1): Likewise.
7264 * breakpoint.h: Include cli/cli-script.h.
7265 * extension-priv.h: Likewise.
7266 * gdbcmd.h: Likewise.
7267
51abb421
PA
72682017-09-04 Pedro Alves <palves@redhat.com>
7269
7270 * ada-lang.c (is_known_support_routine): Move sal declaration to
7271 where it is initialized.
7272 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7273 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7274 (clear_command, update_static_tracepoint): Remove init_sal
7275 references. Move declarations closer to initializations.
7276 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7277 initializations.
7278 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7279 references. Move sal declarations closer to initializations.
7280 * frame.c (find_frame_sal): Return a symtab_and_line via function
7281 return instead of output parameter. Remove init_sal references.
7282 * frame.h (find_frame_sal): Return a symtab_and_line via function
7283 return instead of output parameter.
7284 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7285 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7286 instead of memset.
7287 (gdbscm_find_pc_line): Remove init_sal reference.
7288 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7289 references. Move declarations closer to initializations.
7290 * infcmd.c (set_step_frame): Update. Move declarations closer to
7291 initializations.
7292 (finish_backward): Remove init_sal references. Move declarations
7293 closer to initializations.
7294 * infrun.c (process_event_stop_test, handle_step_into_function)
7295 (insert_hp_step_resume_breakpoint_at_frame)
7296 (insert_step_resume_breakpoint_at_caller): Likewise.
7297 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7298 (symbol_to_sal): Likewise.
7299 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7300 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7301 to its initialization.
7302 * reverse.c (save_bookmark_command): Use new/delete. Remove
7303 init_sal references. Move declarations closer to initializations.
7304 * source.c (get_current_source_symtab_and_line): Remove brace
7305 initialization.
7306 (set_current_source_symtab_and_line): Now takes the sal by const
7307 reference. Remove brace initialization.
7308 (line_info): Remove init_sal reference.
7309 * source.h (set_current_source_symtab_and_line): Now takes a
7310 symtab_and_line via const reference.
7311 * stack.c (set_current_sal_from_frame): Adjust.
7312 (print_frame_info): Adjust.
7313 (get_last_displayed_sal): Return the sal via function return
7314 instead of via output parameter. Simplify.
7315 (frame_info): Adjust.
7316 * stack.h (get_last_displayed_sal): Return the sal via function
7317 return instead of via output parameter.
7318 * symtab.c (init_sal): Delete.
7319 (find_pc_sect_line): Remove init_sal references. Move
7320 declarations closer to initializations.
7321 (find_function_start_sal): Remove init_sal references. Move
7322 declarations closer to initializations.
7323 * symtab.h (struct symtab_and_line): In-class initialize all
7324 fields.
7325 * tracepoint.c (set_traceframe_context)
7326 (print_one_static_tracepoint_marker): Remove init_sal references.
7327 Move declarations closer to initializations.
7328 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7329 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7330 declarations closer to initializations.
7331 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7332 init_sal references. Adjust.
7333
6c5b2ebe
PA
73342017-09-04 Pedro Alves <palves@redhat.com>
7335
7336 * ax-gdb.c (agent_command_1): Use range-for.
7337 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7338 * breakpoint.c: Include "common/array-view.h".
7339 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7340 parameter from struct symtabs_and_lines to
7341 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7342 (breakpoint_sals_to_pc): Change sals parameter from struct
7343 symtabs_and_lines to std::vector reference.
7344 (check_fast_tracepoint_sals): Change sals parameter from struct
7345 symtabs_and_lines to std::array_view. Use range-for.
7346 (decode_static_tracepoint_spec): Return a std::vector instead of
7347 symtabs_and_lines. Update.
7348 (create_breakpoint): Update.
7349 (break_range_command, until_break_command, clear_command): Update.
7350 (base_breakpoint_decode_location, bkpt_decode_location)
7351 (bkpt_probe_create_sals_from_location)
7352 (bkpt_probe_decode_location, tracepoint_decode_location)
7353 (tracepoint_probe_decode_location)
7354 (strace_marker_create_sals_from_location): Return a std::vector
7355 instead of symtabs_and_lines.
7356 (strace_marker_create_breakpoints_sal): Update.
7357 (strace_marker_decode_location): Return a std::vector instead of
7358 symtabs_and_lines. Update.
7359 (update_breakpoint_locations): Change struct symtabs_and_lines
7360 parameters to gdb::array_view. Adjust.
7361 (location_to_sals): Return a std::vector instead of
7362 symtabs_and_lines. Update.
7363 (breakpoint_re_set_default): Use std::vector instead of struct
7364 symtabs_and_lines.
7365 (decode_location_default): Return a std::vector instead of
7366 symtabs_and_lines. Update.
7367 * breakpoint.h: Include "common/array-view.h".
7368 (struct breakpoint_ops) <decode_location>: Now returns a
7369 std::vector instead of returning a symtabs_and_lines via output
7370 parameter.
7371 (update_breakpoint_locations): Change sals parameters to use
7372 gdb::array_view.
7373 * cli/cli-cmds.c (edit_command, list_command): Update to use
7374 std::vector and gdb::array_view.
7375 (ambiguous_line_spec): Adjust to use gdb::array_view and
7376 range-for.
7377 (compare_symtabs): Rename to ...
7378 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7379 const reference and adjust.
7380 (filter_sals): Rewrite using std::vector and standard algorithms.
7381 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7382 (jump_command): Update to use std::vector.
7383 * linespec.c (struct linespec_state) <canonical_names>: Update
7384 comment.
7385 (add_sal_to_sals_basic): Delete.
7386 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7387 (decode_line_2, create_sals_line_offset)
7388 (convert_address_location_to_sals, convert_linespec_to_sals)
7389 (convert_explicit_location_to_sals, parse_linespec)
7390 (event_location_to_sals, decode_line_full, decode_line_1)
7391 (decode_line_with_current_source)
7392 (decode_line_with_last_displayed, decode_objc)
7393 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7394 (linespec_result::~linespec_result): Adjust to use std::vector
7395 instead of symtabs_and_lines.
7396 * linespec.h (linespec_sals::sals): Now a std::vector.
7397 (struct linespec_result): Use std::vector, bool, and in-class
7398 initialization.
7399 (decode_line_1, decode_line_with_current_source)
7400 (decode_line_with_last_displayed): Return std::vector.
7401 * macrocmd.c (info_macros_command): Use std::vector.
7402 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7403 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7404 std::vector.
7405 * probe.h (parse_probes): Return a std::vector.
7406 * python/python.c (gdbpy_decode_line): Use std::vector and
7407 gdb::array_view.
7408 * source.c (select_source_symtab, line_info): Use std::vector.
7409 * stack.c (func_command): Use std::vector.
7410 * symtab.h (struct symtabs_and_lines): Delete.
7411 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7412
7c44b49c
PA
74132017-09-04 Pedro Alves <palves@redhat.com>
7414
7415 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7416 unittests/array-view-selftests.c.
7417 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7418 * common/array-view.h: New file.
7419 * unittests/array-view-selftests.c: New file.
7420
e439fa14
PA
74212017-09-04 Pedro Alves <palves@redhat.com>
7422
7423 * cli/cli-cmds.c (edit_command): Pass message to
7424 ambiguous_line_spec.
7425 (list_command): Pass message to ambiguous_line_spec. Say
7426 "first"/"last" instead of "start" and "end" to be consistent with
7427 the manual.
7428 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7429 them to print formatted message.
7430
7525b645
PA
74312017-09-04 Pedro Alves <palves@redhat.com>
7432
7433 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7434 ftrace_update_insns by reference instead of pointer.
7435
badc0020
YQ
74362017-09-04 Yao Qi <yao.qi@linaro.org>
7437
7438 * i386-go32-tdep.c: Include x86-xstate.h.
7439 (i386_go32_init_abi): Call i386_target_description.
7440 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7441 if xcr0 is X86_XSTATE_X87_MASK.
7442 * i386-tdep.h (tdesc_i386): Remove the declaration.
7443 (tdesc_i386_mmx): Likewise.
7444
d78bdb54
YQ
74452017-09-04 Yao Qi <yao.qi@linaro.org>
7446
7447 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7448 X86_XSTATE_SSE_MASK instead of 0.
7449
ca1fa5ee
YQ
74502017-09-04 Yao Qi <yao.qi@linaro.org>
7451
7452 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7453 i386_target_description.
7454 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7455 i386_target_description.
7456 * i386-tdep.c (i386_gdbarch_init): Likewise.
7457
2434b019
YQ
74582017-09-04 Yao Qi <yao.qi@linaro.org>
7459
7460 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7461 (x86_darwin_init_abi_64): Call amd64_target_description.
7462 * amd64-dicos-tdep.c: Likewise.
7463 * amd64-fbsd-nat.c: Likewise.
7464 * amd64-fbsd-tdep.c: Likewise.
7465 * amd64-nbsd-tdep.c: Likewise.
7466 * amd64-obsd-tdep.c: Likewise.
7467 * amd64-sol2-tdep.c: Likewise.
7468 * amd64-windows-tdep.c: Likewise.
7469 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7470
0860c437
SM
74712017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7472
7473 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7474 (btrace_function) <insn>: Change type to use std::vector.
7475 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7476 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7477 ftrace_update_insns, ftrace_compute_global_level_offset,
7478 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7479 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7480 change to std::vector.
7481 (ftrace_update_insns): Adjust to change to std::vector, change
7482 type of INSN parameter.
7483 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7484 * record-btrace.c (btrace_call_history_insn_range,
7485 btrace_compute_src_line_range,
7486 record_btrace_frame_prev_register): Adjust to change to
7487 std::vector.
7488 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7489 to change to std::vector.
7490
0638b7f9
TT
74912017-09-03 Tom Tromey <tom@tromey.com>
7492
7493 * corefile.c (reopen_exec_file): Use std::string.
7494
8f84fb0e
TT
74952017-09-03 Tom Tromey <tom@tromey.com>
7496
7497 * compile/compile.c (compile_register_name_mangled): Return
7498 std::string.
7499 * compile/compile-loc2c.c (pushf_register_address): Update.
7500 (pushf_register): Update.
7501 * compile/compile-c-types.c (convert_array): Update.
7502 * compile/compile-c-symbols.c (generate_vla_size): Update.
7503 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7504 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7505 (convert_one_symbol): Update.
7506 (generate_c_for_for_one_variable): Update.
7507 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7508 std::string.
7509 (generate_register_struct): Update.
7510 * compile/compile-internal.h (c_get_range_decl_name): Return a
7511 std::string.
7512 (compile_register_name_mangled): Return std::string.
7513
18e9961f
TT
75142017-09-03 Tom Tromey <tom@tromey.com>
7515
7516 * utils.c (perror_string): Return a std::string.
7517 (throw_perror_with_name, perror_warning_with_name): Update.
7518
45343786
TT
75192017-09-03 Tom Tromey <tom@tromey.com>
7520
7521 * demangle.c (demangle_command): Use std::string,
7522 unique_xmalloc_ptr.
7523
b57af503
TT
75242017-09-03 Tom Tromey <tom@tromey.com>
7525
7526 * cli/cli-setshow.c (do_set_command): Use std::string.
7527
6eecf35f
TT
75282017-09-03 Tom Tromey <tom@tromey.com>
7529
7530 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7531
56496dd4
TT
75322017-09-03 Tom Tromey <tom@tromey.com>
7533
7534 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7535
e91a1fa7
TT
75362017-09-03 Tom Tromey <tom@tromey.com>
7537
7538 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7539 gdb::unique_xmalloc_ptr.
7540
7ffd83d7
TT
75412017-09-03 Tom Tromey <tom@tromey.com>
7542
7543 * thread.c (print_thread_info_1): Use string_printf.
7544 (thread_apply_command, thread_apply_all_command): Use
7545 std::string.
7546
1ccbe998
TT
75472017-09-03 Tom Tromey <tom@tromey.com>
7548
7549 * valprint.c (val_print_string): Update.
7550 * gdbcore.h (memory_error_message): Return std::string.
7551 * corefile.c (memory_error_message): Return std::string.
7552 (memory_error): Update.
7553 * breakpoint.c (insert_bp_location): Update.
7554
23fdd69e
SM
75552017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7556
7557 * target/waitstatus.h (target_waitstatus_to_string): Change
7558 return type to std::string.
7559 * target/waitstatus.c (target_waitstatus_to_string): Return
7560 std::string.
7561 * target.h (target_waitstatus_to_string): Remove declaration.
7562 * infrun.c (resume, clear_proceed_status_thread,
7563 print_target_wait_results, do_target_wait, save_waitstatus,
7564 stop_all_threads): Adjust.
7565 * record-btrace.c (record_btrace_wait): Adjust.
7566 * target-debug.h
7567 (target_debug_print_struct_target_waitstatus_p): Adjust.
7568
5c811d30
JK
75692017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7570
7571 PR gdb/22046
7572 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7573 detection.
7574
0a2dde4a
SDJ
75752017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7576
7577 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7578 for setting/unsetting environment variables on the remote target.
7579 (New remote packets): Add entries for QEnvironmentHexEncoded,
7580 QEnvironmentUnset and QEnvironmentReset.
7581 * common/environ.c (gdb_environ::operator=): Extend method to
7582 handle m_user_set_env_list and m_user_unset_env_list.
7583 (gdb_environ::clear): Likewise.
7584 (match_var_in_string): Change type of first parameter from 'char
7585 *' to 'const char *'.
7586 (gdb_environ::set): Extend method to handle
7587 m_user_set_env_list and m_user_unset_env_list.
7588 (gdb_environ::unset): Likewise.
7589 (gdb_environ::clear_user_set_env): New method.
7590 (gdb_environ::user_set_envp): Likewise.
7591 (gdb_environ::user_unset_envp): Likewise.
7592 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7593 m_user_unset_env_list on move constructor/assignment.
7594 (unset): Add new default parameter 'update_unset_list = true'.
7595 (clear_user_set_env): New method.
7596 (user_set_envp): Likewise.
7597 (user_unset_envp): Likewise.
7598 (m_user_set_env_list): New std::set.
7599 (m_user_unset_env_list): Likewise.
7600 * common/rsp-low.c (hex2str): New function.
7601 (bin2hex): New overload for bin2hex function.
7602 * common/rsp-low.c (hex2str): New prototype.
7603 (str2hex): New overload prototype.
7604 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7605 QEnvironmentUnset and QEnvironmentReset.
7606 (remote_protocol_features): Add QEnvironmentHexEncoded,
7607 QEnvironmentUnset and QEnvironmentReset packets.
7608 (send_environment_packet): New function.
7609 (extended_remote_environment_support): Likewise.
7610 (extended_remote_create_inferior): Call
7611 extended_remote_environment_support.
7612 (_initialize_remote): Add QEnvironmentHexEncoded,
7613 QEnvironmentUnset and QEnvironmentReset packet configs.
7614 * unittests/environ-selftests.c (gdb_selftest_env_var):
7615 New variable.
7616 (test_vector_initialization): New function.
7617 (test_init_from_host_environ): Likewise.
7618 (test_reinit_from_host_environ): Likewise.
7619 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7620 Likewise.
7621 (test_unset_set_empty_vector): Likewise.
7622 (test_vector_clear): Likewise.
7623 (test_std_move): Likewise.
7624 (test_move_constructor):
7625 (test_self_move): Likewise.
7626 (test_set_unset_reset): Likewise.
7627 (run_tests): Rewrite in terms of the functions above.
7628
654670a4
WP
76292017-08-31 Weimin Pan <weimin.pan@oracle.com>
7630
7631 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7632 (adi_available): Use a temp variable of type CORE_ADDR as argument
7633 3 when calling target_auxv_search.
7634 (adi_normalize_address): Use masks and xor operators to calculate
7635 normalized address.
7636 (adi_read_versions, adi_write_versions, adi_print_versions)
7637 (do_examine, do_assign): Use paddress.
7638
7755ddb7
JB
76392017-08-29 John Baldwin <jhb@FreeBSD.org>
7640
7641 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7642 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7643 out of loop and add supply of FIR.
7644 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7645 add collect of FIR.
7646
fd437cbc
SM
76472017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7648
3804a343 7649 PR gdb/21827
fd437cbc
SM
7650 * cli/cli-script.c (define_command): Don't convert command name
7651 to lower case.
7652
988f6b3d
JB
76532017-08-25 Joel Brobecker <brobecker@adacore.com>
7654
7655 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7656 Update all callers accordingly. Remove all code blocks handling
7657 the case where DISPP is not NULL.
7658
663c44ac
JK
76592017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7660
7661 PR symtab/22003
7662 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7663 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7664 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7665
f1902523
JK
76662017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7667
7668 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7669 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7670 (read_comp_units_from_section): New parameter abbrev_section, use
7671 read_and_check_comp_unit_head, allocate signatured_type if needed.
7672 (create_all_comp_units): Update read_comp_units_from_section caller.
7673
87215ad1
SDJ
76742017-08-23 Pedro Alves <palves@redhat.com>
7675
7676 PR remote/21852
7677 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7678 to null_ptid and switch to thread without reading the registers
7679 after adding the inferior.
7680
6e41ddec
JK
76812017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7682
7683 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7684 compile-gcc.
7685 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7686 (compile_to_object): Implement compile_gcc.
7687 (_initialize_compile): Install "set compile-gcc". Initialize
7688 compile_gcc.
7689
e68c32d5
JK
76902017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7691
7692 * compile/compile.c (compile_to_object): Conditionally call
7693 set_verbose. Conditionally call compile or compile_v0.
7694
58afddc6
WP
76952017-08-07 Weimin Pan <weimin.pan@oracle.com>
7696
7697 * sparc64-tdep.h: (adi_normalize_address): New export.
7698 * sparc-nat.h: (open_adi_tag_fd): New export.
7699 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7700 * sparc64-linux-tdep.c:
7701 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7702 (sparc64_linux_handle_segmentation_fault): New function.
7703 (sparc64_linux_init_abi): Register
7704 sparc64_linux_handle_segmentation_fault
7705 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7706 (sparc64_addr_bits_remove): New function.
7707 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7708 (MAX_PROC_NAME_SIZE): New macro.
7709 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7710 (sparc64adilist): New variable.
7711 (adi_proc_list): New variable.
7712 (find_adi_info): New function.
7713 (add_adi_info): New function.
7714 (get_adi_info_proc): New function.
7715 (get_adi_info): New function.
7716 (info_adi_command): New function.
7717 (read_maps_entry): New function.
7718 (adi_available): New function.
7719 (adi_normalize_address): New function.
7720 (adi_align_address): New function.
7721 (adi_convert_byte_count): New function.
7722 (adi_tag_fd): New function.
7723 (adi_is_addr_mapped): New function.
7724 (adi_read_versions): New function.
7725 (adi_write_versions): New function.
7726 (adi_print_versions): New function.
7727 (do_examine): New function.
7728 (do_assign): New function.
7729 (adi_examine_command): New function.
7730 (adi_assign_command): New function.
7731 (_initialize_sparc64_adi_tdep): New function.
7732
11db9430
SM
77332017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7734
7735 * breakpoint.c (breakpoints_info): Rename to ...
7736 (info_breakpoints_command): ... this.
7737 (watchpoints_info): Rename to ...
7738 (info_watchpoints_command): ... this.
7739 (tracepoints_info): Rename to ...
7740 (info_tracepoints_command): ... this.
7741 (_initialize_breakpoint): Adjust.
7742 * dcache.c (dcache_info): Rename to ...
7743 (info_display_command): ... this.
7744 (_initialize_dcache): Adjust.
7745 * frame.h (args_info): Rename to ...
7746 (info_args_command): ... this.
7747 (locals_info): Rename to ...
7748 (info_locals_command): ... this.
7749 * infcmd.c (nofp_registers_info): Rename to ...
7750 (info_registers_command): ... this.
7751 (float_info): Rename to ...
7752 (info_float_command): ... this.
7753 (program_info): Rename to ...
7754 (info_program_command): ... this.
7755 (all_registers_info): Rename to ...
7756 (info_all_registers_command): ... this.
7757 (vector_info): Rename to ...
7758 (info_vector_command): ... this.
7759 (float_info): Rename to ...
7760 (info_float_command): ... this.
7761 (_initialize_infcmd): Adjust.
7762 * inferior.h (term_info): Rename to ...
7763 (info_terminal_command): ... this.
7764 * inflow.c (term_info): Rename to ...
7765 (info_terminal_command): ... this.
7766 (_initialize_inflow): Adjust.
7767 * infrun.c (signals_info): Rename to ...
7768 (info_signals_command): ... this.
7769 (_initialize_infrun): Adjust.
7770 * objc-lang.c (classes_info): Rename to ...
7771 (info_classes_command): ... this.
7772 (selectors_info): Rename to ...
7773 (info_selectors_command): ... this.
7774 (_initialize_objc_language): Adjust.
7775 * printcmd.c (sym_info): Rename to ...
7776 (info_symbol_command): ... this.
7777 (address_info): Rename to ...
7778 (info_address_command): ... this.
7779 (display_info): Rename to ...
7780 (info_display_command): ... this.
7781 (_initialize_printcmd): Adjust.
7782 * reverse.c (bookmarks_info): Rename to ...
7783 (info_breakpoints_command): ... this.
7784 (_initialize_reverse): Adjust.
7785 * ser-go32.c (dos_info): Rename to ...
7786 (info_serial_command): ... this.
7787 (_initialize_ser_dos): Adjust.
7788 * skip.c (skip_info): Rename to ...
7789 (info_skip_command): ... this.
7790 (_initialize_step_skip): Adjust.
7791 * source.c (line_info): Rename to ...
7792 (info_line_command): ... this.
7793 (source_info): Rename to ...
7794 (info_source_command)
7795 * stack.c (frame_info): Rename to ...
7796 (info_frame_command): ... this.
7797 (locals_info): Rename to ...
7798 (info_locals_command): ... this.
7799 (args_info): Rename to ...
7800 (info_args_command): ... this.
7801 (_initialize_stack): Adjust.
7802 * symtab.c (sources_info): Rename to ...
7803 (info_sources_command): ... this.
7804 (variables_info): Rename to ...
7805 (info_variables_command): ... this.
7806 (functions_info): Rename to ...
7807 (info_functions_command): ... this.
7808 (types_info): Rename to ...
7809 (info_types_command): ... this.
7810 (_initialize_symtab): Adjust.
7811 * target.c (target_info): Rename to ...
7812 (info_target_command): ... this.
7813 (initialize_targets): Adjust.
7814 * tracepoint.c (tvariables_info): Rename to ...
7815 (info_tvariables_command): ... this.
7816 (scope_info): Rename to ...
7817 (info_scope_command): ... this.
7818 (trace_dump_actions): Adjust.
7819 (_initialize_tracepoint): Adjust.
7820
b270e6f9
TT
78212017-08-22 Tom Tromey <tom@tromey.com>
7822
7823 * breakpoint.h (install_breakpoint): Update.
7824 * breakpoint.c (add_solib_catchpoint): Update.
7825 (install_breakpoint): Change argument to a std::unique_ptr.
7826 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7827 (create_breakpoint_sal, create_breakpoint): Update.
7828 (watch_command_1, catch_exec_command_1)
7829 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7830 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7831 Return the breakpoint.
7832 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7833 (new_single_step_breakpoint): Update.
7834 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7835 std::unique_ptr.
7836 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7837 std::unique_ptr.
7838 * break-catch-sig.c (create_signal_catchpoint): Use
7839 std::unique_ptr.
7840 * ada-lang.c (create_ada_exception_catchpoint): Use
7841 std::unique_ptr.
7842
36bd8eaa
TT
78432017-08-22 Tom Tromey <tom@tromey.com>
7844
7845 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7846
56f37645
TT
78472017-08-22 Tom Tromey <tom@tromey.com>
7848
7849 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7850 (lookup_partial_symbol): Update.
7851
0b581c69
TT
78522017-08-22 Tom Tromey <tom@tromey.com>
7853
7854 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7855 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7856 (find_and_open_source, symtab_to_fullname): Update.
7857 * psymtab.c (psymtab_to_fullname): Update.
7858
14278e1f
TT
78592017-08-22 Tom Tromey <tom@tromey.com>
7860
7861 * exec.c (exec_file_attach): Update.
7862 * linux-thread-db.c (try_thread_db_load): Update.
7863 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7864 * utils.c (gdb_realpath): Change return type.
7865 (gdb_realpath_keepfile): Update.
7866 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7867 (_initialize_utils): Register the new self test.
7868 * source.c (openp): Update.
7869 (find_and_open_source): Update.
7870 * nto-tdep.c (nto_find_and_open_solib): Update.
7871 * main.c (set_gdb_data_directory): Update.
7872 (captured_main_1): Update.
7873 * dwarf2read.c (dwarf2_get_dwz_file): Update
7874 (dw2_map_symbol_filenames): Update.
7875 * auto-load.c (auto_load_safe_path_vec_update): Update.
7876 (filename_is_in_auto_load_safe_path_vec): Change type of
7877 "filename_realp".
7878 (auto_load_objfile_script): Update.
7879 (file_is_auto_load_safe): Update. Use std::string.
7880 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7881
4971c9a7
TT
78822017-08-22 Tom Tromey <tom@tromey.com>
7883
7884 * utils.c (gdb_realpath_keepfile): Return a
7885 gdb::unique_xmalloc_ptr.
7886 * exec.c (exec_file_attach): Update.
7887 * utils.h (gdb_realpath_keepfile): Return a
7888 gdb::unique_xmalloc_ptr.
7889
e3e41d58
TT
78902017-08-22 Tom Tromey <tom@tromey.com>
7891
7892 * compile/compile.c (compile_file_command): Use
7893 gdb::unique_xmalloc_ptr, std::string.
7894 * utils.c (gdb_abspath): Change return type.
7895 * source.c (openp): Update.
7896 * objfiles.c (allocate_objfile): Update.
7897 * main.c (set_gdb_data_directory): Update.
7898 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7899
0d999a6e
ZZ
79002017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7901
7902 * cli-cmds.c (list_commands): List actual code around more than
7903 one location.
7904
329d5e7e
JB
79052017-08-21 John Baldwin <jhb@FreeBSD.org>
7906
7907 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7908
bf223d3e
PA
79092017-08-21 Pedro Alves <palves@redhat.com>
7910
7911 PR gdb/19487
7912 * c-exp.y (variable production): Handle function aliases.
7913 * minsyms.c (msymbol_is_text): New function.
7914 * minsyms.h (msymbol_is_text): Declare.
7915 * symtab.c (find_function_alias_target): New function.
7916 * symtab.h (find_function_alias_target): Declare.
7917
c973d0aa
PA
79182017-08-21 Pedro Alves <palves@redhat.com>
7919
7920 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7921 typedefs.
7922 * typeprint.c (whatis_exp): If handling "whatis", and expression
7923 is OP_TYPE, strip one typedef level. Otherwise don't strip
7924 typedefs here.
7925 * valops.c (value_cast): Save "to" type before resolving
7926 stubs/typedefs. Use that type as resulting value's type.
7927
2989a365
TT
79282017-08-18 Tom Tromey <tom@tromey.com>
7929 Pedro Alves <palves@redhat.com>
7930
7931 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7932 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7933 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7934 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7935 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7936 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7937 (linux_get_siginfo_data): Add "thread" argument. Use
7938 scoped_restore.
7939 * linux-nat.c (linux_child_follow_fork)
7940 (check_stopped_by_watchpoint): Use scoped_restore.
7941 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7942 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7943 (restore_inferior_ptid, save_inferior_ptid): Remove.
7944 * btrace.c (btrace_fetch): Use scoped_restore.
7945 * bsd-uthread.c (bsd_uthread_fetch_registers)
7946 (bsd_uthread_store_registers): Use scoped_restore.
7947 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7948 scoped_restore.
7949 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7950 (aix_thread_xfer_partial): Use scoped_restore.
7951 * inferior.h (save_inferior_ptid): Remove.
7952
e60eb288
YQ
79532017-08-18 Yao Qi <yao.qi@linaro.org>
7954
7955 PR tdep/21818
7956 * arm-tdep.c (gdb_print_insn_arm): Mark
7957 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7958
6d580b63
YQ
79592017-08-18 Yao Qi <yao.qi@linaro.org>
7960
7961 * NEWS: Mention GDBserver's new option "--selftest".
7962 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7963 * selftest.c: Move it to common/selftest.c.
7964 * selftest.h: Move it to common/selftest.h.
7965 * selftest-arch.c (reset): New function.
7966 (tests_with_arch): Call reset.
7967
86dcbf50
YQ
79682017-08-18 Yao Qi <yao.qi@linaro.org>
7969
7970 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7971 instead of exception_fprintf and printf_filtered.
7972
7649770c
YQ
79732017-08-18 Yao Qi <yao.qi@linaro.org>
7974
7975 * selftest.c (register_self_test): Rename it to
7976 selftests::register_test.
7977 (run_self_tests): selftest::run_tests.
7978 * selftest.h: Update declarations.
7979 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7980 selftests::register_test_foreach_arch.
7981 * selftest-arch.h: Update declaration.
7982 * aarch64-tdep.c: Update.
7983 * arm-tdep.c: Likewise.
7984 * disasm-selftests.c: Likewise.
7985 * dwarf2loc.c: Likewise.
7986 * dwarf2-frame.c: Likewise.
7987 * findvar.c: Likewise.
7988 * gdbarch-selftests.c: Likewise.
7989 * maint.c (maintenance_selftest): Likewise.
7990 * regcache.c: Likewise.
7991 * rust-exp.y: Likewise.
7992 * selftest-arch.c: Likewise.
7993 * unittests/environ-selftests.c: Likewise.
7994 * unittests/function-view-selftests.c: Likewise.
7995 * unittests/offset-type-selftests.c: Likewise.
7996 * unittests/optional-selftests.c: Likewise.
7997 * unittests/scoped_restore-selftests.c: Likewise.
7998 * utils-selftests.c: Likewise.
7999
b0cba12e
PA
80002017-08-17 Pedro Alves <palves@redhat.com>
8001
8002 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8003 local.
8004
4c8aa72d
PA
80052017-08-17 Pedro Alves <palves@redhat.com>
8006
8007 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8008 field.
8009 (reset_die_in_process): Delete, replaced by ...
8010 (process_die_scope): ... this new class. Make it responsible for
8011 freeing cu->line_header too.
8012 (process_die): Use process_die_scope.
8013 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8014 cu->line_header_die_owner. Don't release the line header if it's
8015 owned by the CU.
8016 (setup_type_unit_groups): Make the CU/DIE own the line header.
8017 Don't release the line header here.
8018
ba713918
AL
80192017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8020
8021 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8022
44d0fb3a
RK
80232017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8024
8025 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8026 Single-Key mode
8027
a5afdb16
RK
80282017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8029
8030 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8031 mode command list.
8032
47613aeb
SH
80332017-08-15 Stafford Horne <shorne@gmail.com>
8034
8035 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8036
9c3cc999
SH
80372017-08-15 Stafford Horne <shorne@gmail.com>
8038
8039 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8040
206726fb
SDJ
80412017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8042
8043 PR gdb/21954
8044 * infcmd.c (unset_environment_command): Use the 'clear' method on
8045 the environment instead of resetting it.
8046
0335ac6d
JB
80472017-08-15 John Baldwin <jhb@FreeBSD.org>
8048
8049 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8050 platforms.
8051
d3abe1c8
TT
80522017-08-14 Tom Tromey <tom@tromey.com>
8053
8054 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8055 (print_binary_chars): Likewise.
8056 (BITS_IN_BYTES): Remove.
8057
d6382fff
TT
80582017-08-14 Tom Tromey <tom@tromey.com>
8059
8060 PR gdb/21675
8061 * valprint.c (LOW_ZERO): Change value to 034.
8062 (print_octal_chars): Add static_asserts for octal constants.
8063 * printcmd.c (print_scalar_formatted): Add 'd' case.
8064
f978cb06
TT
80652017-08-11 Tom Tromey <tom@tromey.com>
8066
8067 * symfile.c (add_symbol_file_command): Use std::vector.
8068
2f5404b3
TT
80692017-08-14 Tom Tromey <tom@tromey.com>
8070
8071 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8072 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8073 std::move.
8074 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8075
de7985c3
PA
80762017-08-11 Pedro Alves <palves@redhat.com>
8077
8078 * infrun.c (process_event_stop_test): Adjust
8079 function_name_is_marked_for_skip call.
8080 * skip.c: Include <list>.
8081 (skiplist_entry): Make it a class with private fields, and
8082 getters/setters.
8083 (skiplist_entry_chain): Delete.
8084 (skiplist_entries): New.
8085 (skiplist_entry_count): Delete.
8086 (highest_skiplist_entry_num): New.
8087 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8088 (add_skiplist_entry): Delete.
8089 (skiplist_entry::skiplist_entry): New.
8090 (skiplist_entry::add_entry): New.
8091 (skip_file_command, skip_function): Adjust.
8092 (compile_skip_regexp): Delete.
8093 (skip_command): Don't compile regexp here. Adjust to use
8094 skiplist_entry::add_entry.
8095 (skip_info): Adjust to use range-for and getters.
8096 (skip_enable_command, skip_disable_command): Adjust to use
8097 range-for and setters.
8098 (skip_delete_command): Adjust to use std::list.
8099 (add_skiplist_entry): Delete.
8100 (skip_file_p): Delete, refactored as ...
8101 (skiplist_entry::do_skip_file_p): ... this new method.
8102 (skip_gfile_p): Delete, refactored as ...
8103 (skiplist_entry::do_gskip_file_p): ... this new method.
8104 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8105 (skiplist_entry::skip_function_p): ... this new method.
8106 (function_name_is_marked_for_skip): Now returns bool, and takes
8107 the function sal by const reference. Adjust to use range-for and
8108 skiplist_entry methods.
8109 (_initialize_step_skip): Remove references to
8110 skiplist_entry_chain, skiplist_entry_count.
8111 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8112 takes the function sal by const reference.
8113
be7d3cd5
YQ
81142017-08-11 Yao Qi <yao.qi@linaro.org>
8115
8116 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8117 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8118 (dwarf2_frame_cache):
8119 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8120 RETURN_MASK_ALL and set *this_case to NULL.
8121 * frame-unwind.h: Update comments.
8122
1c90d9f0
YQ
81232017-08-11 Yao Qi <yao.qi@linaro.org>
8124
8125 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8126 (dwarf2_frame_state_copy_regs): Remove.
8127 (dwarf2_frame_state_free_regs): Remove.
8128 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8129 (dwarf2_restore_rule): Call method .alloc_regs instead of
8130 dwarf2_frame_state_alloc_regs.
8131 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8132 constructor. Call std::move.
8133 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8134 (dwarf2_frame_cache): Likewise.
8135
8136 [GDB_SELF_TEST]: Include selftest.h and
8137 selftest-arch.h.
8138 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8139 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8140 execute_cfa_program_test.
8141
8142 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8143 copy ctor, assignment operator, move assignment.
8144 <alloc_regs>: New method.
8145 <swap>: New method.
8146 (struct dwarf2_frame_state): Delete dtor.
8147 (dwarf2_frame_state_alloc_regs): Remove declaration.
8148 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8149 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8150
afe37d6b
YQ
81512017-08-11 Yao Qi <yao.qi@linaro.org>
8152
8153 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8154 (dwarf2_frame_state::dwarf2_frame_state): New.
8155 (dwarf2_frame_state::~dwarf2_frame_state): New.
8156 (dwarf2_fetch_cfa_info): Update.
8157 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8158 rather than a pointer. Update code.
8159 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8160 dtor.
8161 <data_align, code_align, retaddr_column>: Change them to const.
8162 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8163 to bool.
8164
b348037f
YQ
81652017-08-11 Yao Qi <yao.qi@linaro.org>
8166
8167 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8168 <loc.exp>: New field.
8169 * dwarf2-frame.c (execute_cfa_program): Update.
8170 (dwarf2_frame_prev_register): Update.
8171
e7c9de26
PA
81722017-08-10 Pedro Alves <palves@redhat.com>
8173
8174 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8175
e8c6b620
JB
81762017-08-09 John Baldwin <jhb@FreeBSD.org>
8177
8178 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8179 (fbsd_pending_children): Use std::list.
8180 (fbsd_remember_child): Likewise.
8181 (fbsd_is_child_pending): Likewise.
8182 (fbsd_pending_vfork_done): Use std::forward_list.
8183 (fbsd_add_vfork_done): Likewise.
8184 (fbsd_is_vfork_done_pending): Likewise.
8185 (fbsd_next_vfork_done): Likewise.
8186
e4a26669
JB
81872017-08-09 John Baldwin <jhb@FreeBSD.org>
8188
8189 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8190 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8191 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8192 for `mapfilename'.
8193 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 8194 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 8195
142311d3
JB
81962017-08-09 John Baldwin <jhb@FreeBSD.org>
8197
8198 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8199 "filestuff.h".
8200 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8201
42fa2e0e
TT
82022017-08-09 Tom Tromey <tom@tromey.com>
8203
8204 * skip.c (skiplist_entry): New constructor.
8205 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8206 (skiplist_entry::file_is_glob): Now bool.
8207 (skiplist_entry::file, skiplist_entry::function): Now
8208 std::string.
8209 (make_skip_entry): Return a unique_ptr. Use new.
8210 (free_skiplist_entry, free_skiplist_entry_cleanup)
8211 (make_free_skiplist_entry_cleanup): Remove.
8212 (skip_command, skip_disable_command, add_skiplist_entry)
8213 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8214 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8215 (function_name_is_marked_for_skip): Update.
8216 (skip_delete_command): Update. Use delete.
8217
cd3af38d
JW
82182017-08-09 Jiong Wang <jiong.wang@arm.com>
8219
8220 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8221 (aarch64_linux_core_read_description): New function.
8222 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8223
29592bde
PA
82242017-08-09 Pedro Alves <palves@redhat.com>
8225
8226 * cp-name-parser.y (cp_comp_to_string): Return a
8227 gdb::unique_xmalloc_ptr<char>.
8228 * cp-support.c (replace_typedefs_qualified_name)
8229 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8230 (cp_canonicalize_string_full): Use op= instead of explicit
8231 convertion.
8232 (cp_class_name_from_physname, method_name_from_physname)
8233 (cp_func_name, cp_remove_params): Adjust to use
8234 gdb::unique_xmalloc_ptr<char>.
8235 * cp-support.h (cp_comp_to_string): Return a
8236 gdb::unique_xmalloc_ptr<char>.
8237 * python/py-type.c (typy_lookup_type): Adjust to use
8238 gdb::unique_xmalloc_ptr<char>.
8239
b3340438
L
82402017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8241
8242 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8243
e88e8651
YQ
82442017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8245 Yao Qi <yao.qi@linaro.org>
8246
8247 * cp-support.c (cp_canonicalize_string_full): Use
8248 gdb::unique_xmalloc_ptr<char>.
8249 (cp_canonicalize_string): Likewise.
8250
f5a29eb0
YQ
82512017-08-09 Yao Qi <yao.qi@linaro.org>
8252
8253 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8254 * regformats/i386/amd64-avx-avx512.dat: Remove.
8255 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8256 * regformats/i386/amd64-avx-mpx.dat:Remove.
8257 * regformats/i386/amd64-avx.dat: Remove.
8258 * regformats/i386/amd64-mpx.dat: Remove.
8259 * regformats/i386/i386-avx-avx512.dat: Remove.
8260 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8261 * regformats/i386/i386-avx-mpx.dat: Remove.
8262 * regformats/i386/i386-mmx.dat: Remove.
8263 * regformats/i386/i386-mpx.dat: Remove.
8264
57757c2f
YQ
82652017-08-09 Yao Qi <yao.qi@linaro.org>
8266
8267 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8268 * amd64-tdep.c: Don't include features/i386/x32*.c.
8269 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8270 functions.
8271 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8272 and i386/x32-avx-avx512.
8273 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8274 and i386/x32.xml.
8275 * features/i386/x32-avx-avx512.c: Removed.
8276 * features/i386/x32-avx-avx512.xml: Removed.
8277 * features/i386/x32-avx.c: Removed.
8278 * features/i386/x32-avx.xml: Removed.
8279 * features/i386/x32.c: Removed.
8280 * features/i386/x32.xml: Removed.
8281 * regformats/i386/x32-avx-avx512.dat: Removed.
8282 * regformats/i386/x32-avx.dat: Removed.
8283 * regformats/i386/x32.dat: Removed.
8284
ba7b109b
MR
82852017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8286
8287 PR breakpoints/21886
8288 * mem-break.c (default_memory_insert_breakpoint): Use
8289 `->placed_address' rather than `->reqstd_address' for the
8290 breakpoint location.
8291
e347efc3
MR
82922017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8293
8294 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8295 assertions.
8296
0dba2a6c
MR
82972017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8298
8299 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8300 a union of `tdep_info', `tdesc_data' and `id'.
8301 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8302 rather than `info.tdep_info'.
8303 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8304 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8305 * i386-tdep.c (i386_gdbarch_init): Likewise.
8306 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8307 * mips-tdep.c (mips_gdbarch_init): Likewise.
8308 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8309 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8310 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8311 `info.tdep_info'.
8312 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8313 `info.tdep_info'.
8314 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8315 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8316 `info.tdep_info'.
8317 * spu-tdep.c (spu_gdbarch_init): Likewise.
8318 * gdbarch.h: Regenerate.
8319
16eb6b2d
LS
83202017-08-07 Leszek Swirski <leszeks@google.com>
8321
7b005726 8322 PR symtab/20899
16eb6b2d
LS
8323 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8324
74cbb09e
SM
83252017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8326
8327 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8328 (gdbsim_open): Rename gdb_argv args object to argv.
8329
ee0c3293
TT
83302017-08-05 Tom Tromey <tom@tromey.com>
8331
8332 * compile/compile-object-load.c (compile_object_load): Use
8333 gdb::unique_xmalloc_ptr.
8334 * cli/cli-dump.c (scan_filename): Rename from
8335 scan_filename_with_cleanup. Change return type.
8336 (scan_expression): Rename from scan_expression_with_cleanup.
8337 Change return type.
8338 (dump_memory_to_file, dump_value_to_file, restore_command):
8339 Use gdb::unique_xmalloc_ptr. Update.
8340 * cli/cli-cmds.c (find_and_open_script): Use
8341 gdb::unique_xmalloc_ptr.
8342 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8343 * symmisc.c (maintenance_print_symbols)
8344 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8345 * symfile.c (symfile_bfd_open, generic_load)
8346 (add_symbol_file_command, remove_symbol_file_command): Use
8347 gdb::unique_xmalloc_ptr.
8348 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8349 * psymtab.c (maintenance_print_psymbols): Use
8350 gdb::unique_xmalloc_ptr.
8351 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8352 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8353 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8354 (reload_shared_libraries_1): Likewise.
8355
3232fabd
TT
83562017-08-05 Tom Tromey <tom@tromey.com>
8357
8358 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8359 (rust_op_vector, rust_set_vector): New typedefs.
8360 (current_parser): New global.
8361 (work_obstack): Change to pointer type. Update all users.
8362 (rust_ast, pstate): Remove globals.
8363 (struct rust_parser): New.
8364 (%union) <params, field_inits>: Change type.
8365 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8366 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8367 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8368 (convert_params_to_types, convert_params_to_expression): Change
8369 type of "params".
8370 (ast_string): Change type of "fields".
8371 (rust_parse): Make a rust_parser. Remove cleanups.
8372 (rust_lex_tests): Make and install an auto_obstack.
8373
f02fd774
YQ
83742017-08-04 Yao Qi <yao.qi@linaro.org>
8375
8376 * configure.srv (ipa_x32_linux_regobj): New.
8377 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8378 instead of X86_TDESC_AVX512.
8379 (initialize_low_tracepoint): Call
8380 init_registers_x32_avx_avx512_linux.
8381
91975afd
YQ
83822017-08-04 Yao Qi <yao.qi@linaro.org>
8383
8384 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8385
2331fa3a
RK
83862017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8387
8388 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8389
744e4fe1
TT
83902017-08-03 Tom Tromey <tom@tromey.com>
8391
8392 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8393 Remove.
8394 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8395
1c034b67
TT
83962017-08-03 Tom Tromey <tom@tromey.com>
8397
8398 * python/py-param.c (compute_enum_values): Use gdb_argv.
8399
773a1edc
TT
84002017-08-03 Tom Tromey <tom@tromey.com>
8401
8402 * utils.h (struct gdb_argv_deleter): New.
8403 (gdb_argv): New class.
8404 * utils.c (gdb_argv::reset): New method.
8405 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8406 * tracefile.c (tsave_command): Use gdb_argv.
8407 * top.c (new_ui_command): Use gdb_argv.
8408 * symmisc.c (maintenance_print_symbols)
8409 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8410 * symfile.c (symbol_file_command, generic_load)
8411 (remove_symbol_file_command): Use gdb_argv.
8412 * stack.c (backtrace_command): Use gdb_argv.
8413 * source.c (add_path, show_substitute_path_command)
8414 (unset_substitute_path_command, set_substitute_path_command):
8415 Use gdb_argv.
8416 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8417 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8418 * remote.c (extended_remote_run, remote_put_command)
8419 (remote_get_command, remote_delete_command): Use gdb_argv.
8420 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8421 (gdbsim_open): Use gdb_argv.
8422 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8423 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8424 * procfs.c (procfs_info_proc): Use gdb_argv.
8425 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8426 * infrun.c (handle_command): Use gdb_argv.
8427 * inferior.c (add_inferior_command, clone_inferior_command):
8428 Use gdb_argv.
8429 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8430 * exec.c (exec_file_command): Use gdb_argv.
8431 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8432 * compile/compile.c (build_argc_argv): Use gdb_argv.
8433
0d50bde3
TT
84342017-08-03 Tom Tromey <tom@tromey.com>
8435
8436 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8437
7f968c89
TT
84382017-08-03 Tom Tromey <tom@tromey.com>
8439
8440 * python/python.c (compute_python_string): Return std::string.
8441 (gdbpy_eval_from_control_command): Update.
8442 (do_start_initialization): Use std::string.
8443 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8444 xstrprintf.
8445 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8446 xstrprintf.
8447
3c9ebddd
TT
84482017-08-03 Tom Tromey <tom@tromey.com>
8449
8450 * top.h (do_restore_instream_cleanup): Remove.
8451 * top.c (do_restore_instream_cleanup): Remove.
8452 (read_command_file): Use scoped_restore.
8453 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8454
b51b225e
TT
84552017-08-03 Tom Tromey <tom@tromey.com>
8456
8457 * cli/cli-script.c (execute_user_command)
8458 (execute_control_command): Use scoped_restore.
8459
ac991630
TT
84602017-08-03 Tom Tromey <tom@tromey.com>
8461
8462 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8463 (execute_user_command): Remove user_call_depth; use
8464 user_args_stack's size instead.
8465
898e0c8e
TT
84662017-08-03 Tom Tromey <tom@tromey.com>
8467
8468 * top.h (in_user_command): Remove.
8469 * top.c (in_user_command): Remove.
8470 * cli/cli-script.c (do_restore_user_call_depth)
8471 (execute_user_command): Update.
8472
26fcd5d7
TT
84732017-08-03 Tom Tromey <tom@tromey.com>
8474
8475 * valops.c (search_struct_method): Use gdb::byte_vector.
8476 * valarith.c (value_concat): Use std::vector.
8477 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8478 (simple_search_memory): Likewise.
8479 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8480 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8481 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8482 * elfread.c (elf_rel_plt_read): Use std::string.
8483 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8484 * cli/cli-dump.c (restore_section_callback): Use
8485 gdb::byte_vector.
8486
7c218e6c
TT
84872017-08-03 Tom Tromey <tom@tromey.com>
8488
8489 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8490
31b68d4a
TT
84912017-08-03 Tom Tromey <tom@tromey.com>
8492
8493 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8494 (tui_register_format): Use scoped_restore.
8495
2ec845e7
TT
84962017-08-03 Tom Tromey <tom@tromey.com>
8497
8498 * reverse.c (exec_direction_default): Remove.
8499 (exec_reverse_once): Use scoped_restore.
8500 * remote.c (restore_remote_timeout): Remove.
8501 (remote_flash_erase, remote_flash_write, remote_flash_done)
8502 (readchar, remote_serial_write): Use scoped_restore.
8503 * cli/cli-script.c (struct source_cleanup_lines_args)
8504 (source_cleanup_lines): Remove.
8505 (script_from_file): Use scoped_restore.
8506 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8507 (source_command): Use scoped_restore.
8508
b3bc8453
TT
85092017-08-03 Tom Tromey <tom@tromey.com>
8510
8511 * utils.h (make_cleanup_free_so): Remove.
8512 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8513 * solist.h (struct so_deleter): New.
8514 (so_list_up): New typedef.
8515 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8516
e3ad2841
TT
85172017-08-03 Tom Tromey <tom@tromey.com>
8518
8519 * utils.h (make_cleanup_restore_current_language): Remove.
8520 * utils.c (do_restore_current_language)
8521 (make_cleanup_restore_current_language): Remove.
8522 * parse.c (parse_exp_in_context_1)
8523 (parse_expression_with_language): Use
8524 scoped_restore_current_language.
8525 * mi/mi-main.c (mi_cmd_execute): Use
8526 scoped_restore_current_language.
8527 * language.h (scoped_restore_current_language): New class.
8528
b80cf838
TT
85292017-08-03 Tom Tromey <tom@tromey.com>
8530
8531 * compile/compile.c (cleanup_unlink_file): Remove.
8532 (compile_to_object): Use gdb::unlinker.
8533 (eval_compile_command): Likewise.
8534
fad0444a
TT
85352017-08-03 Tom Tromey <tom@tromey.com>
8536
8537 * utils.h (make_cleanup_fclose): Remove.
8538 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8539
6e7bc05c
TT
85402017-08-03 Tom Tromey <tom@tromey.com>
8541
8542 * top.c (open_terminal_stream): Return gdb_file_up.
8543 (new_ui_command): Update.
8544
4a45905b
TT
85452017-08-03 Tom Tromey <tom@tromey.com>
8546
8547 * source.c (print_source_lines_base, forward_search_command)
8548 (reverse_search_command): Use gdb_file_up.
8549
7cd06d6e
TT
85502017-08-03 Tom Tromey <tom@tromey.com>
8551
8552 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8553
ed166945
TT
85542017-08-03 Tom Tromey <tom@tromey.com>
8555
8556 * cli/cli-cmds.c (find_and_open_script): Change return type.
8557 Remove "streamp" and "full_path" parameters.
8558 (source_script_with_search): Update.
8559 * auto-load.c (source_script_file): Update.
8560 * cli/cli-cmds.h (find_and_open_script): Change type.
8561 (open_script): New struct.
8562
d419f42d
TT
85632017-08-03 Tom Tromey <tom@tromey.com>
8564
8565 * xml-support.c (xml_fetch_content_from_file): Update.
8566 * ui-file.c (stdio_file::open): Update.
8567 * tracefile-tfile.c (tfile_start): Update.
8568 * remote.c (remote_file_put, remote_file_get): Update.
8569 * nat/linux-procfs.c (linux_proc_get_int)
8570 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8571 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8572 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8573 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8574 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8575 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8576 * linux-nat.c (linux_proc_pending_signals): Update.
8577 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8578 (file_closer): Remove.
8579 * compile/compile.c (compile_to_object): Update.
8580 * common/filestuff.h (struct gdb_file_deleter): New.
8581 (gdb_file_up): New typedef.
8582 (gdb_fopen_cloexec): Change return type.
8583 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8584 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8585 (dump_binary_file, restore_binary_file): Update.
8586 * auto-load.c (auto_load_objfile_script_1): Update.
8587
4a2b031d
TT
85882017-08-03 Tom Tromey <tom@tromey.com>
8589
8590 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8591 (info_static_tracepoint_markers_command): Likewise.
8592 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8593 * skip.c (skip_info): Use ui_out_emit_table.
8594 * progspace.c (print_program_space): Use ui_out_emit_table.
8595 * osdata.c (info_osdata): Use ui_out_emit_table.
8596 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8597 ui_out_emit_table.
8598 * linux-thread-db.c (info_auto_load_libthread_db): Use
8599 ui_out_emit_table.
8600 * inferior.c (print_inferior): Use ui_out_emit_table.
8601 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8602 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8603 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8604 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8605 * ui-out.h (class ui_out_emit_table): New.
8606
a4f320fd
MR
86072017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8608
8609 * mips-tdep.c (mips_fpu_type_str): New function.
8610 (mips_dump_tdep): Call it.
8611
a2f1f308
MR
86122017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8613
8614 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8615 `->mips_fpu_type'.
8616
7e5ed83b
XR
86172017-07-31 Xavier Roirand <roirand@adacore.com>
8618
8619 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8620
4c9dc811
XR
86212017-07-27 Xavier Roirand <roirand@adacore.com>
8622
8623 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8624
27d41eac
YQ
86252017-07-26 Yao Qi <yao.qi@linaro.org>
8626
8627 * cli/cli-cmds.c (maintenancechecklist): New variable.
8628 * gdbcmd.h (maintenancechecklist): Declare it.
8629 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8630 Call i386_linux_read_description with different masks.
8631 * maint.c (maintenance_check_command): New function.
8632 (_initialize_maint_cmds): Call add_prefix_cmd.
8633 * target-descriptions.c (tdesc_reg): override operator != and ==.
8634 (tdesc_type): Likewise.
8635 (tdesc_feature): Likewise.
8636 (target_desc): Likewise.
8637 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8638 (maintenance_check_xml_descriptions): New function.
8639 (_initialize_target_descriptions) Add command "xml-descriptions".
8640 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8641
ea03d0d3
YQ
86422017-07-26 Yao Qi <yao.qi@linaro.org>
8643
8644 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8645 Include features/i386/32bit-*.c.
8646 (i386_linux_read_description): Generate target description if it
8647 doesn't exist.
8648 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8649 functions.
8650 * features/i386/32bit-linux.c: Re-generated.
8651 * features/i386/32bit-sse.c: Likewise.
8652 * target-descriptions.c (print_c_feature::visit): Print code to
8653 set register number if needed.
8654 (print_c_feature) <m_next_regnum>: New field.
8655
25aa13e5
YQ
86562017-07-26 Yao Qi <yao.qi@linaro.org>
8657
8658 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8659 (FEATURE_XMLFILES): New.
8660 (FEATURE_CFILES): New.
8661 New rules.
8662 (clean-cfiles): Remove generated c files.
8663 * features/i386/32bit-avx.c: Generated.
8664 * features/i386/32bit-avx512.c: Generated.
8665 * features/i386/32bit-core.c: Generated.
8666 * features/i386/32bit-linux.c: Generated.
8667 * features/i386/32bit-mpx.c: Generated.
8668 * features/i386/32bit-pkeys.c: Generated.
8669 * features/i386/32bit-sse.c: Generated.
8670 * target-descriptions.c: Include algorithm.
8671 (tdesc_element_visitor): Add method visit_end.
8672 (print_c_tdesc): Implement visit_end.
8673 (print_c_tdesc:: m_filename_after_features): Move it to
8674 protected.
8675 (print_c_feature): New class.
8676 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8677 name starts with "i386/32bit-".
8678
6eb1e6a8
YQ
86792017-07-26 Yao Qi <yao.qi@linaro.org>
8680
8681 * target-descriptions.c (tdesc_element_visitor): New class.
8682 (tdesc_element): New class.
8683 (tdesc_reg): Inherit from tdesc_element.
8684 (tdesc_reg::accept): New function.
8685 (tdesc_type): Inherit from tdesc_element.
8686 (tdesc_type::accept): New function.
8687 (tdesc_feature): Inherit from tdesc_element.
8688 (tdesc_feature::accept): New function.
8689 (target_desc): Inherit from tdesc_element.
8690 (target_desc::target_desc): New.
8691 (target_desc::~target_desc): New.
8692 (target_desc::accept): New.
8693 (allocate_target_description): Use new.
8694 (free_target_description): Use delete.
8695 (print_c_tdesc): New class.
8696 (maint_print_c_tdesc_cmd): Adjust.
8697
8698 * features/aarch64.c: Re-generated.
8699 * features/arc-arcompact.c: Re-generated.
8700 * features/arc-v2.c: Re-generated.
8701 * features/arm/arm-with-iwmmxt.c: Re-generated.
8702 * features/arm/arm-with-m.c: Re-generated.
8703 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8704 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8705 * features/arm/arm-with-neon.c: Re-generated.
8706 * features/arm/arm-with-vfpv2.c: Re-generated.
8707 * features/arm/arm-with-vfpv3.c: Re-generated.
8708 * features/i386/amd64-avx-avx512.c: Re-generated.
8709 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8710 * features/i386/amd64-avx.c: Re-generated.
8711 * features/i386/amd64-avx-linux.c: Re-generated.
8712 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8713 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8714 * features/i386/amd64-avx-mpx.c: Re-generated.
8715 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8716 * features/i386/amd64.c: Re-generated.
8717 * features/i386/amd64-linux.c: Re-generated.
8718 * features/i386/amd64-mpx.c: Re-generated.
8719 * features/i386/amd64-mpx-linux.c: Re-generated.
8720 * features/i386/i386-avx-avx512.c: Re-generated.
8721 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8722 * features/i386/i386-avx.c: Re-generated.
8723 * features/i386/i386-avx-linux.c: Re-generated.
8724 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8725 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8726 * features/i386/i386-avx-mpx.c: Re-generated.
8727 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8728 * features/i386/i386.c: Re-generated.
8729 * features/i386/i386-linux.c: Re-generated.
8730 * features/i386/i386-mmx.c: Re-generated.
8731 * features/i386/i386-mmx-linux.c: Re-generated.
8732 * features/i386/i386-mpx.c: Re-generated.
8733 * features/i386/i386-mpx-linux.c: Re-generated.
8734 * features/i386/x32-avx-avx512.c: Re-generated.
8735 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8736 * features/i386/x32-avx.c: Re-generated.
8737 * features/i386/x32-avx-linux.c: Re-generated.
8738 * features/i386/x32.c: Re-generated.
8739 * features/i386/x32-linux.c: Re-generated.
8740 * features/microblaze.c: Re-generated.
8741 * features/microblaze-with-stack-protect.c: Re-generated.
8742 * features/mips64-dsp-linux.c: Re-generated.
8743 * features/mips64-linux.c: Re-generated.
8744 * features/mips-dsp-linux.c: Re-generated.
8745 * features/mips-linux.c: Re-generated.
8746 * features/nds32.c: Re-generated.
8747 * features/nios2.c: Re-generated.
8748 * features/nios2-linux.c: Re-generated.
8749 * features/rs6000/powerpc-32.c: Re-generated.
8750 * features/rs6000/powerpc-32l.c: Re-generated.
8751 * features/rs6000/powerpc-403.c: Re-generated.
8752 * features/rs6000/powerpc-403gc.c : Re-generated.
8753 * features/rs6000/powerpc-405.c: Re-generated.
8754 * features/rs6000/powerpc-505.c: Re-generated.
8755 * features/rs6000/powerpc-601.c: Re-generated.
8756 * features/rs6000/powerpc-602.c: Re-generated.
8757 * features/rs6000/powerpc-603.c: Re-generated.
8758 * features/rs6000/powerpc-604.c: Re-generated.
8759 * features/rs6000/powerpc-64.c: Re-generated.
8760 * features/rs6000/powerpc-64l.c: Re-generated.
8761 * features/rs6000/powerpc-7400.c: Re-generated.
8762 * features/rs6000/powerpc-750.c: Re-generated.
8763 * features/rs6000/powerpc-860.c: Re-generated.
8764 * features/rs6000/powerpc-altivec32.c: Re-generated.
8765 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8766 * features/rs6000/powerpc-altivec64.c: Re-generated.
8767 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8768 * features/rs6000/powerpc-cell32l.c: Re-generated.
8769 * features/rs6000/powerpc-cell64l.c: Re-generated.
8770 * features/rs6000/powerpc-e500.c: Re-generated.
8771 * features/rs6000/powerpc-e500l.c: Re-generated.
8772 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8773 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8774 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8775 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8776 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8777 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8778 * features/rs6000/powerpc-vsx32.c: Re-generated.
8779 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8780 * features/rs6000/powerpc-vsx64.c: Re-generated.
8781 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8782 * features/rs6000/rs6000.c: Re-generated.
8783 * features/s390-linux32.c: Re-generated.
8784 * features/s390-linux32v1.c: Re-generated.
8785 * features/s390-linux32v2.c: Re-generated.
8786 * features/s390-linux64.c: Re-generated.
8787 * features/s390-linux64v1.c: Re-generated.
8788 * features/s390-linux64v2.c: Re-generated.
8789 * features/s390-te-linux64.c: Re-generated.
8790 * features/s390-tevx-linux64.c: Re-generated.
8791 * features/s390-vx-linux64.c: Re-generated.
8792 * features/s390x-linux64.c: Re-generated.
8793 * features/s390x-linux64v1.c: Re-generated.
8794 * features/s390x-linux64v2.c: Re-generated.
8795 * features/s390x-te-linux64.c: Re-generated.
8796 * features/s390x-tevx-linux64.c: Re-generated.
8797 * features/s390x-vx-linux64.c: Re-generated.
8798 * features/sparc/sparc32-solaris.c: Re-generated.
8799 * features/sparc/sparc64-solaris.c: Re-generated.
8800 * features/tic6x-c62x.c: Re-generated.
8801 * features/tic6x-c62x-linux.c: Re-generated.
8802 * features/tic6x-c64x.c: Re-generated.
8803 * features/tic6x-c64x-linux.c: Re-generated.
8804 * features/tic6x-c64xp.c: Re-generated.
8805 * features/tic6x-c64xp-linux.c: Re-generated.
8806
35b4818d
YQ
88072017-07-26 Yao Qi <yao.qi@linaro.org>
8808
8809 * i386-linux-tdep.c (i386_linux_read_description): New function.
8810 (i386_linux_core_read_description): Call
8811 i386_linux_read_description.
8812 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8813 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8814 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8815 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8816 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8817 * x86-linux-nat.c (x86_linux_read_description): Call
8818 i386_linux_read_description.
8819
8e2141c6
YQ
88202017-07-26 Yao Qi <yao.qi@linaro.org>
8821
8822 * NEWS: Mention it.
8823 * features/Makefile (%.c: %.xml): Pass the xml file name to
8824 command "maint print c-tdesc".
8825 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8826 name from 'arg'.
8827
b468ff4c
YQ
88282017-07-26 Yao Qi <yao.qi@linaro.org>
8829
8830 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8831 in-class initialization.
8832 (tdesc_create_feature): Call new instead of XCNEW.
8833 (free_target_description): Ue delete.
8834
b9c0e1b4
JB
88352017-07-25 John Baldwin <jhb@FreeBSD.org>
8836
8837 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8838
a04b5337
YQ
88392017-07-25 Yao Qi <yao.qi@linaro.org>
8840
8841 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8842 constant.
8843 (amd64_x32_init_abi): Likewise.
8844 * amd64-tdep.h (amd64_init_abi): Update declaration.
8845 (amd64_x32_init_abi): Likewise.
8846
02ad7fc2
YQ
88472017-07-25 Yao Qi <yao.qi@linaro.org>
8848
8849 PR tdep/21717
8850 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8851 condition for FPSCR.
8852 (arm_linux_store_inferior_registers): Likewise.
8853
b6f48cb0
TT
88542017-07-22 Tom Tromey <tom@tromey.com>
8855
8856 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8857 <syscalls_counts>: Now a std::vector.
8858 (get_catch_syscall_inferior_data): Use "new".
8859 (catch_syscall_inferior_data_cleanup): Use "delete".
8860 (insert_catch_syscall, remove_catch_syscall)
8861 (clear_syscall_counts): Update.
8862
e12c9b7a
TT
88632017-07-22 Tom Tromey <tom@tromey.com>
8864
8865 * break-catch-syscall.c (syscall_catchpoint)
8866 <syscalls_to_be_caught>: Now a std::vector<int>
8867 (~syscall_catchpoint): Remove.
8868 (insert_catch_syscall, remove_catch_syscall)
8869 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8870 (print_mention_catch_syscall, print_recreate_catch_syscall):
8871 Update.
8872 (create_syscall_event_catchpoint): Change type of "filter"
8873 parameter.
8874 (catch_syscall_split_args): Return a std::vector.
8875 (catch_syscall_command_1, catching_syscall_number_1): Update.
8876
4fa8aeac
TT
88772017-07-22 Tom Tromey <tom@tromey.com>
8878
8879 * break-catch-throw.c (struct exception_catchpoint)
8880 <exception_rx>: Now a std::string.
8881 (~exception_catchpoint): Remove.
8882 (print_one_detail_exception_catchpoint): Update.
8883 (handle_gnu_v3_exceptions): Change type of except_rx.
8884 (extract_exception_regexp): Return a std::string.
8885 (catch_exception_command_1): Update.
8886
f746a154
TT
88872017-07-22 Tom Tromey <tom@tromey.com>
8888
8889 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8890 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8891 std::vector.
8892 <catch_all>: Now a bool.
8893 (~signal_catchpoint): Remove.
8894 (signal_catchpoint_insert_location)
8895 (signal_catchpoint_remove_location)
8896 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8897 (signal_catchpoint_print_mention)
8898 (signal_catchpoint_print_recreate)
8899 (signal_catchpoint_explains_signal): Update.
8900 (create_signal_catchpoint): Change type of "filter" and
8901 "catch_all".
8902 (catch_signal_split_args): Return a std::vector. Change type of
8903 "catch_all".
8904 (catch_signal_command): Update.
8905
47e77640
PA
89062017-07-20 Pedro Alves <palves@redhat.com>
8907
8908 * ada-lang.c (ada_language_defn): Make extern.
8909 (_initialize_ada_language): Remove add_language call.
8910 * c-lang.c (c_language_defn, cplus_language_defn)
8911 (asm_language_defn, minimal_language_defn): Make extern.
8912 (_initialize_c_language): Delete.
8913 * completer.c (compare_cstrings): Delete, moved to utils.h.
8914 * d-lang.c (d_language_defn): Make extern.
8915 (_initialize_d_language): Remove add_language calls.
8916 * defs.h (enum language): Add comment.
8917 * f-lang.c (f_language_defn): Make extern.
8918 (_initialize_f_language): Remove add_language call.
8919 * go-lang.c (go_language_defn): Make extern.
8920 (_initialize_go_language): Remove add_language call.
8921 * language.c: Include <algorithm>.
8922 (languages): Redefine as const array.
8923 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8924 (set_language_command): Handle "local". Use for-range loop.
8925 (set_language): Remove loop.
8926 (language_enum): Rewrite.
8927 (language_def, language_str): Remove loops.
8928 (add_language): Delete.
8929 (add_set_language_command): New, based on add_languages.
8930 (skip_language_trampoline): Adjust.
8931 (local_language_defn): Delete.
8932 (language_gdbarch_post_init): Adjust.
8933 (_initialize_language): Remove add_language calls. Call
8934 add_set_language_command.
8935 * language.h (add_language): Delete.
8936 (auto_language_defn)
8937 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8938 (asm_language_defn, c_language_defn, cplus_language_defn)
8939 (d_language_defn, f_language_defn, go_language_defn)
8940 (m2_language_defn, objc_language_defn, opencl_language_defn)
8941 (pascal_language_defn, rust_language_defn): Declare.
8942 * m2-lang.c (m2_language_defn): Make extern.
8943 (_initialize_m2_language): Remove add_language call.
8944 * objc-lang.c (objc_language_defn): Make extern.
8945 (_initialize_objc_language): Remove add_language call.
8946 * opencl-lang.c (opencl_language_defn): Make extern.
8947 (_initialize_opencl_language): Remove add_language call.
8948 * p-lang.c (pascal_language_defn): Make extern.
8949 (_initialize_pascal_language): Delete.
8950 * rust-lang.c (rust_language_defn): Make extern.
8951 (_initialize_rust_language): Delete.
8952 * utils.h (compare_cstrings): New static inline function.
8953
edb0c9cb
PA
89542017-07-20 Pedro Alves <palves@redhat.com>
8955
8956 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8957 (get_var_value): Constify parameters.
8958 (get_int_var_value): Change prototype.
8959 (to_fixed_range_type): Adjust.
8960 * ada-lang.h (get_int_var_value): Change prototype.
8961
a778f165
PA
89622017-07-20 Pedro Alves <palves@redhat.com>
8963
8964 * dwarf2read.c (dw2_lookup_symbol): Use
8965 SYMBOL_MATCHES_SEARCH_NAME.
8966 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8967
42edd901
PA
89682017-07-20 Pedro Alves <palves@redhat.com>
8969
8970 * block.c (block_iter_name_step, block_iter_name_first)
8971 (block_iter_name_next): Delete.
8972 (block_lookup_symbol_primary): Adjust to use
8973 dict_iter_match_first/dict_iter_match_next.
8974 * block.h (block_iter_name_first, block_iter_name_next): Delete
8975 declarations.
8976 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8977 dict_iter_match_first/dict_iter_match_next.
8978
cf325299
PA
89792017-07-20 Pedro Alves <palves@redhat.com>
8980
8981 * cp-support.c (cp_find_first_component_aux): Add missing case for
8982 end of string.
8983
c5ed0576
DB
89842017-07-18 David Blaikie <dblaikie@gmail.com>
8985
8986 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8987 of dwo_cu's dwo_file.
8988
27841e76
YQ
89892017-07-18 Yao Qi <yao.qi@linaro.org>
8990
8991 * remote.c (store_registers_using_G): Remove one line comment.
8992
cfb7e58b
YQ
89932017-07-18 Yao Qi <yao.qi@linaro.org>
8994
8995 * regcache.c (regcache_cpy): Simplify it.
8996 (regcache::cpy_no_passthrough): Remove it.
8997 * regcache.h (cpy_no_passthrough): Remove it.
8998 (regcache_dup, regcache_cpy): Update comments.
8999
386535dd
PA
90002017-07-18 Pedro Alves <palves@redhat.com>
9001
9002 * remote-sim.c (sim_command_completer): Adjust to work with a
9003 completion_tracker instead of a VEC.
9004
c45ec17c
PA
90052017-07-17 Pedro Alves <palves@redhat.com>
9006
9007 * completer.c (complete_source_filenames): New function.
9008 (complete_address_and_linespec_locations): New function.
9009 (location_completer): Use complete_address_and_linespec_locations.
9010 (completion_tracker::build_completion_result): Honor the tracker's
9011 request to suppress append.
9012 * completer.h (completion_tracker::suppress_append_ws)
9013 (completion_tracker::set_suppress_append_ws): New methods.
9014 (completion_tracker::m_suppress_append_ws): New field.
9015 (complete_source_filenames): New declaration.
9016 * linespec.c (linespec_complete_what): New.
9017 (struct ls_parser) <complete_what, completion_word,
9018 completion_quote_char, completion_quote_end, completion_tracker>:
9019 New fields.
9020 (string_find_incomplete_keyword_at_end): New.
9021 (linespec_lexer_lex_string): Record quote char. If in completion
9022 mode, don't throw.
9023 (linespec_lexer_consume_token): Advance the completion word point.
9024 (linespec_lexer_peek_token): Save/restore completion info.
9025 (save_stream_and_consume_token): New.
9026 (set_completion_after_number): New.
9027 (linespec_parse_basic): Set what to complete next depending on
9028 token. Handle function and label completions specially.
9029 (parse_linespec): Disable objc shortcut in completion mode. Set
9030 what to complete next depending on token type. Skip keyword if in
9031 completion mode.
9032 (complete_linespec_component, linespec_complete): New.
9033 * linespec.h (linespec_complete): Declare.
9034
be966d42
PA
90352017-07-17 Pedro Alves <palves@redhat.com>
9036
9037 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9038 Handle 'operator<' / 'operator<<'.
9039
a2459270
PA
90402017-07-17 Pedro Alves <palves@redhat.com>
9041
9042 * completer.c (collect_explicit_location_matches): Handle
9043 MATCH_LABEL.
9044 (convert_explicit_location_to_linespec): New, factored out from
9045 ...
9046 (convert_explicit_location_to_sals): ... this.
9047 (complete_label): New.
9048 (linespec_complete_label, find_label_symbols_in_block): New.
9049 (find_label_symbols): Add completion_mode parameter and adjust to
9050 call find_label_symbols_in_block.
9051 * linespec.h (linespec_complete_label): Declare.
9052
c6756f62
PA
90532017-07-17 Pedro Alves <palves@redhat.com>
9054
9055 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9056 complete_symbol_mode parameter.
9057 * cli/cli-cmds.c (complete_command): Get the completion result out
9058 of the handle_brkchars tracker if used a custom word point.
9059 * completer.c: Include "linespec.h".
9060 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9061 (advance_to_expression_complete_word_point): New.
9062 (completion_tracker::completes_to_completion_word): New.
9063 (complete_files_symbols): Pass down
9064 complete_symbol_mode::EXPRESSION.
9065 (explicit_options, probe_options): New.
9066 (collect_explicit_location_matches): Complete on the
9067 explictit_loc->foo instead of word. Use
9068 linespec_complete_function. Handle MATCH_LINE. Handle offering
9069 keyword and options completions.
9070 (backup_text_ptr): Delete.
9071 (skip_keyword): New.
9072 (complete_explicit_location): Remove 'word' parameter. Add
9073 language, quoted_arg_start and quoted_arg_end parameters.
9074 Rewrite, parsing left to right.
9075 (location_completer): Rewrite.
9076 (location_completer_handle_brkchars): New function.
9077 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9078 (enum complete_line_internal_reason): Adjust comments.
9079 (completion_tracker::discard_completions): New.
9080 (completer_handle_brkchars_func_for_completer): Handle
9081 location_completer.
9082 (gdb_custom_word_point_brkchars)
9083 (gdb_org_rl_basic_quote_characters): New.
9084 (gdb_completion_word_break_characters_throw)
9085 (completion_find_completion_word): Handle trackers that use a
9086 custom word point.
9087 (completion_tracker::advance_custom_word_point_by): New.
9088 (completion_tracker::build_completion_result): Don't rely on
9089 readline appending the quote char.
9090 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9091 use a custom word point.
9092 (gdb_rl_attempted_completion_function): Restore
9093 rl_basic_quote_characters.
9094 * completer.h (class completion_tracker): Extend intro comment.
9095 (completion_tracker::set_quote_char)
9096 (completion_tracker::quote_char)
9097 (completion_tracker::set_use_custom_word_point)
9098 (completion_tracker::use_custom_word_point)
9099 (completion_tracker::custom_word_point)
9100 (completion_tracker::set_custom_word_point)
9101 (completion_tracker::advance_custom_word_point_by)
9102 (completion_tracker::completes_to_completion_word)
9103 (completion_tracker::discard_completions): New methods.
9104 (completion_tracker::m_quote_char)
9105 (completion_tracker::m_use_custom_word_point)
9106 (completion_tracker::m_custom_word_point): New fields.
9107 (advance_to_expression_complete_word_point): Declare.
9108 * f-lang.c (f_collect_symbol_completion_matches): Add
9109 complete_symbol_mode parameter.
9110 * language.h (struct language_defn)
9111 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9112 parameter.
9113 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9114 (linespec_complete_function): New function.
9115 (linespec_lexer_lex_keyword): Adjust.
9116 * linespec.h (linespec_keywords, linespec_complete_function): New
9117 declarations.
9118 * location.c (find_end_quote): New function.
9119 (explicit_location_lex_one): Add explicit_completion_info
9120 parameter. Save quoting info. Don't throw if being called for
9121 completion. Don't handle Ada operators here.
9122 (is_cp_operator, skip_op_false_positives, first_of)
9123 (explicit_location_lex_one_function): New function.
9124 (string_to_explicit_location): Replace 'dont_throw' parameter with
9125 an explicit_completion_info pointer parameter. Handle it. Don't
9126 use explicit_location_lex_one to lex function names. Use
9127 explicit_location_lex_one_function instead.
9128 * location.h (struct explicit_completion_info): New.
9129 (string_to_explicit_location): Replace 'dont_throw' parameter with
9130 an explicit_completion_info pointer parameter.
9131 * symtab.c (default_collect_symbol_completion_matches_break_on):
9132 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9133 (default_collect_symbol_completion_matches)
9134 (collect_symbol_completion_matches): Add complete_symbol_mode
9135 parameter.
9136 (collect_symbol_completion_matches_type): Pass down
9137 complete_symbol_mode::EXPRESSION.
9138 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9139 parameter. Handle LINESPEC mode.
9140 * symtab.h (complete_symbol_mode): New.
9141 (default_collect_symbol_completion_matches_break_on)
9142 (default_collect_symbol_completion_matches)
9143 (collect_symbol_completion_matches)
9144 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9145 parameter.
9146
1d550c82
PA
91472017-07-17 Pedro Alves <palves@redhat.com>
9148
9149 * utils.c (enum class strncmp_iw_mode): New.
9150 (strcmp_iw): Rename to ...
9151 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9152 parameters. Handle them.
9153 (strncmp_iw): New.
9154 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9155 * utils.h (strncmp_iw): Declare.
9156 (strcmp_iw): Move describing comments here.
9157
8090b426
PA
91582017-07-17 Pedro Alves <palves@redhat.com>
9159
9160 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9161 CP_OPERATOR_STR.
9162 * c-typeprint.c (is_type_conversion_operator): Use
9163 CP_OPERATOR_STR.
9164 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9165 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9166 CP_OPERATOR_LEN.
9167 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9168 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9169 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9170 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9171 CP_OPERATOR_STR.
9172 * location.c: Include "cp-support.h".
9173 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9174 CP_OPERATOR_STR.
9175 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9176 CP_OPERATOR_LEN.
9177
6a2c1b87
PA
91782017-07-17 Pedro Alves <palves@redhat.com>
9179
9180 * cli/cli-cmds.c (complete_command): Use a completion tracker
9181 along with completion_find_completion_word for handle_brkchars
9182 phase.
9183 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9184 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9185 (struct gdb_rl_completion_word_info): New.
9186 (gdb_rl_find_completion_word): New.
9187 (completion_find_completion_word): New.
9188 * completer.h (completion_find_completion_word): Declare.
9189
eb3ff9a5
PA
91902017-07-17 Pedro Alves <palves@redhat.com>
9191
9192 * ada-lang.c (symbol_completion_match): Adjust comments.
9193 (symbol_completion_add): Replace vector parameter with
9194 completion_tracker parameter. Use it.
9195 (ada_make_symbol_completion_list): Rename to...
9196 (ada_collect_symbol_completion_matches): ... this. Add
9197 completion_tracker parameter and use it.
9198 (ada_language_defn): Adjust.
9199 * break-catch-syscall.c (catch_syscall_completer): Adjust
9200 prototype and work with completion_tracker instead of VEC.
9201 * breakpoint.c (condition_completer): Adjust prototype and work
9202 with completion_tracker instead of VEC.
9203 * c-lang.c (c_language_defn, cplus_language_defn)
9204 (asm_language_defn, minimal_language_defn): Adjust to renames.
9205 * cli/cli-cmds.c (complete_command): Rework using
9206 completion_tracker. Catch exceptions when completing.
9207 * cli/cli-decode.c (integer_unlimited_completer)
9208 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9209 with completion_tracker instead of VEC.
9210 * command.h (struct completion_tracker): Forward declare.
9211 (completer_ftype, completer_handle_brkchars_ftype): Change
9212 types.
9213 (complete_on_cmdlist, complete_on_enum): Adjust.
9214 * completer.c: Include <algorithm>.
9215 (struct gdb_completer_state): New.
9216 (current_completion): New global.
9217 (readline_line_completion_function): Delete.
9218 (noop_completer, filename_completer)
9219 (filename_completer_handle_brkchars, complete_files_symbols)
9220 (linespec_location_completer): Adjust to work with a
9221 completion_tracker instead of a VEC.
9222 (string_or_empty): New.
9223 (collect_explicit_location_matches): Adjust to work with a
9224 completion_tracker instead of a VEC.
9225 (explicit_location_completer): Rename to ...
9226 (complete_explicit_location): ... this and adjust to work with a
9227 completion_tracker instead of a VEC.
9228 (location_completer): Adjust to work with a completion_tracker
9229 instead of a VEC.
9230 (add_struct_fields): Adjust to work with a completion_list instead
9231 of VEC.
9232 (expression_completer): Rename to ...
9233 (complete_expression): ... this and adjust to work with a
9234 completion_tracker instead of a VEC. Use complete_files_symbols.
9235 (expression_completer): Reimplement on top of complete_expression.
9236 (symbol_completer): Adjust to work with a completion_tracker
9237 instead of a VEC.
9238 (enum complete_line_internal_reason): Add describing comments.
9239 (complete_line_internal_normal_command): Adjust to work with a
9240 completion_tracker instead of a VEC.
9241 (complete_line_internal): Rename to ...
9242 (complete_line_internal_1): ... this and adjust to work with a
9243 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9244 handle_brkchars phase.
9245 (new_completion_tracker): Delete.
9246 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9247 complete_line_internal_1.
9248 (free_completion_tracker): Delete.
9249 (INITIAL_COMPLETION_HTAB_SIZE): New.
9250 (completion_tracker::completion_tracker)
9251 (completion_tracker::~completion_tracker): New.
9252 (maybe_add_completion): Delete.
9253 (completion_tracker::maybe_add_completion)
9254 (completion_tracker::add_completion)
9255 (completion_tracker::add_completions): New.
9256 (throw_max_completions_reached_error): Delete.
9257 (complete_line): Adjust to work with a completion_tracker instead
9258 of a VEC. Don't create a completion_tracker_t or check for max
9259 completions here.
9260 (command_completer, command_completer_handle_brkchars)
9261 (signal_completer, reg_or_group_completer_1)
9262 (reg_or_group_completer, default_completer_handle_brkchars):
9263 Adjust to work with a completion_tracker.
9264 (gdb_completion_word_break_characters_throw): New.
9265 (gdb_completion_word_break_characters): Reimplement.
9266 (line_completion_function): Delete.
9267 (completion_tracker::recompute_lowest_common_denominator)
9268 (expand_preserving_ws)
9269 (completion_tracker::build_completion_result)
9270 (completion_result::completion_result)
9271 (completion_result::completion_result)
9272 (completion_result::~completion_result)
9273 (completion_result::completion_result)
9274 (completion_result::release_match_list, compare_cstrings)
9275 (completion_result::sort_match_list)
9276 (completion_result::reset_match_list)
9277 (gdb_rl_attempted_completion_function_throw)
9278 (gdb_rl_attempted_completion_function): New.
9279 * completer.h (completion_list, struct completion_result)
9280 (class completion_tracker): New.
9281 (complete_line): Add completion_tracker parameter.
9282 (readline_line_completion_function): Delete.
9283 (gdb_rl_attempted_completion_function): New.
9284 (noop_completer, filename_completer, expression_completer)
9285 (location_completer, symbol_completer, command_completer)
9286 (signal_completer, reg_or_group_completer): Update prototypes.
9287 (completion_tracker_t, new_completion_tracker)
9288 (make_cleanup_free_completion_tracker): Delete.
9289 (enum maybe_add_completion_enum): Delete.
9290 (maybe_add_completion): Delete.
9291 (throw_max_completions_reached_error): Delete.
9292 * corefile.c (complete_set_gnutarget): Adjust to work with a
9293 completion_tracker instead of a VEC.
9294 * cp-abi.c (cp_abi_completer): Adjust to work with a
9295 completion_tracker instead of a VEC.
9296 * d-lang.c (d_language_defn): Adjust.
9297 * disasm.c (disassembler_options_completer): Adjust to work with a
9298 completion_tracker instead of a VEC.
9299 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9300 (f_collect_symbol_completion_matches): ... this. Adjust to work
9301 with a completion_tracker instead of a VEC.
9302 (f_language_defn): Adjust.
9303 * go-lang.c (go_language_defn): Adjust.
9304 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9305 Adjust to work with a completion_tracker instead of a VEC.
9306 * infrun.c (handle_completer): Likewise.
9307 * interps.c (interpreter_completer): Likewise.
9308 * interps.h (interpreter_completer): Likewise.
9309 * language.c (unknown_language_defn, auto_language_defn)
9310 (local_language_defn): Adjust.
9311 * language.h (language_defn::la_make_symbol_completion_list):
9312 Rename to ...
9313 (language_defn::la_collect_symbol_completion_matches): ... this
9314 and adjust to work with a completion_tracker instead of a VEC.
9315 * m2-lang.c (m2_language_defn): Adjust.
9316 * objc-lang.c (objc_language_defn): Adjust.
9317 * opencl-lang.c (opencl_language_defn): Adjust.
9318 * p-lang.c (pascal_language_defn): Adjust.
9319 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9320 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9321 with a completion_tracker.
9322 * rust-lang.c (rust_language_defn): Adjust.
9323 * symtab.c (free_completion_list, do_free_completion_list)
9324 (return_val, completion_tracker): Delete.
9325 (completion_list_add_name, completion_list_add_symbol)
9326 (completion_list_add_msymbol, completion_list_objc_symbol)
9327 (completion_list_add_fields, add_symtab_completions): Add
9328 completion_tracker parameter and use it.
9329 (default_make_symbol_completion_list_break_on_1): Rename to...
9330 (default_collect_symbol_completion_matches_break_on): ... this.
9331 Add completion_tracker parameter and use it instead of allocating
9332 a completion tracker here.
9333 (default_make_symbol_completion_list_break_on): Delete old
9334 implementation.
9335 (default_make_symbol_completion_list): Delete.
9336 (default_collect_symbol_completion_matches): New.
9337 (make_symbol_completion_list): Delete.
9338 (collect_symbol_completion_matches): New.
9339 (make_symbol_completion_type): Rename to ...
9340 (collect_symbol_completion_matches_type): ... this. Add
9341 completion_tracker parameter and use it instead of VEC.
9342 (make_file_symbol_completion_list_1): Rename to...
9343 (collect_file_symbol_completion_matches): ... this. Add
9344 completion_tracker parameter and use it instead of VEC.
9345 (make_file_symbol_completion_list): Delete.
9346 (add_filename_to_list): Use completion_list instead of a VEC.
9347 (add_partial_filename_data::list): Now a completion_list.
9348 (make_source_files_completion_list): Work with a completion_list
9349 instead of a VEC.
9350 * symtab.h: Include "completer.h".
9351 (default_make_symbol_completion_list_break_on)
9352 (default_make_symbol_completion_list, make_symbol_completion_list)
9353 (make_symbol_completion_type, make_file_symbol_completion_list)
9354 (make_source_files_completion_list): Delete.
9355 (default_collect_symbol_completion_matches_break_on)
9356 (default_collect_symbol_completion_matches)
9357 (collect_symbol_completion_matches)
9358 (collect_symbol_completion_matches_type)
9359 (collect_file_symbol_completion_matches)
9360 (make_source_files_completion_list): New.
9361 * top.c (init_main): Don't install a rl_completion_entry_function
9362 hook. Install a rl_attempted_completion_function hook instead.
9363 * tui/tui-layout.c (layout_completer): Adjust to work with a
9364 completion_tracker.
9365 * tui/tui-regs.c (tui_reggroup_completer):
9366 * tui/tui-win.c (window_name_completer, focus_completer)
9367 (winheight_completer): Adjust to work with a completion_tracker.
9368 * value.c: Include "completer.h".
9369 (complete_internalvar): Adjust to work with a completion_tracker.
9370 * value.h (complete_internalvar): Likewise.
9371
6e1dbf8c
PA
93722017-07-17 Pedro Alves <palves@redhat.com>
9373
9374 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9375 renames.
9376 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9377 comments to completer_ftype's declaration.
9378 <completer_handle_brkchars>: Change type to
9379 completer_handle_brkchars_ftype.
9380 * command.h (completer_ftype): Add describing comment and give
9381 names to parameters.
9382 (completer_ftype_void): Rename to ...
9383 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9384 (set_cmd_completer_handle_brkchars): Adjust.
9385 * completer.c (filename_completer_handle_brkchars): New function.
9386 (complete_line_internal_normal_command): New function, factored
9387 out from ...
9388 (complete_line_internal): ... here.
9389 (command_completer_handle_brkchars)
9390 (default_completer_handle_brkchars)
9391 (completer_handle_brkchars_func_for_completer): New functions.
9392 * completer.h (set_gdb_completion_word_break_characters): Delete
9393 declaration.
9394 (completer_handle_brkchars_func_for_completer): New declaration.
9395 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9396 completer_handle_brkchars_func_for_completer.
9397
78b13106
PA
93982017-07-17 Pedro Alves <palves@redhat.com>
9399
9400 * completer.c (symbol_completer): New function, based on
9401 make_symbol_completion_list_fn.
9402 * completer.h (symbol_completer): New declaration.
9403 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9404 * python/py-cmd.c (completers): Adjust.
9405 * symtab.c (make_symbol_completion_list_fn): Delete.
9406 * symtab.h (make_symbol_completion_list_fn): Delete.
9407 * cli/cli-decode.c (add_cmd): Adjust.
9408
bbf2f4df
PA
94092017-07-17 Pedro Alves <palves@redhat.com>
9410
9411 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9412 * dwarf2read.c: Include "filename-seen-cache.h".
9413 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9414 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9415 * filename-seen-cache.c: New file.
9416 * filename-seen-cache.h: New file.
9417 * symtab.c: Include "filename-seen-cache.h".
9418 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9419 (create_filename_seen_cache, clear_filename_seen_cache)
9420 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9421 to filename-seen-cache.h/filename-seen-cache.c.
9422 (output_source_filename, sources_info)
9423 (maybe_add_partial_symtab_filename)
9424 (make_source_files_completion_list): Adjust to use
9425 filename_seen_cache.
9426
330cdd98
PA
94272017-07-17 Pedro Alves <palves@redhat.com>
9428
9429 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9430 fields.
9431 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9432 dwarf2_debug_sections*)): New.
9433 (dwarf2_per_objfile::dwarf2_per_objfile(const
9434 dwarf2_per_objfile&)): Declare as deleted.
9435 (dwarf2_per_objfile::operator=): Declare as deleted.
9436 (dwarf2_per_objfile::dwarf2_per_objfile)
9437 (dwarf2_per_objfile::~dwarf2_per_objfile)
9438 (dwarf2_per_objfile::free_cached_comp_units): New.
9439 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9440 ctor. Call dwarf2_per_objfile's ctor manually.
9441 (dwarf2_locate_sections): Deleted/refactored as ...
9442 (dwarf2_per_objfile::locate_sections): ... this new method.
9443 (free_cached_comp_units): Defer to
9444 dwarf2_per_objfile::free_cached_comp_units.
9445 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9446
8880f2a9
TT
94472017-07-14 Tom Tromey <tom@tromey.com>
9448
9449 PR rust/21764:
9450 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9451 parameter.
9452 <UNOP_SIZEOF>: Split into separate case.
9453 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9454
65547233
TT
94552017-07-14 Tom Tromey <tom@tromey.com>
9456
9457 PR rust/21763:
9458 * symtab.c (symbol_matches_domain): Add language_rust to special
9459 case.
9460 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9461 treat LOC_TYPEDEF symbols as variables.
9462
8f14146e
PA
94632017-07-14 Pedro Alves <palves@redhat.com>
9464
9465 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9466 symtabs matching all symtabs with SRCFILE as file name instead of
9467 only considering the first hit, with lookup_symtab.
9468
2347965c
SM
94692017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9470
9471 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9472 operator_name parameters.
9473 (gen_expr): Update function call.
9474
40f4af28
SM
94752017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9476
9477 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9478 parameter.
9479 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9480 Likewise.
9481 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9482 parameter, use agent_expr::gdbarch instead, update function
9483 calls.
9484 (locexpr_tracepoint_var_ref): Likewise.
9485 (loclist_tracepoint_var_ref): Likewise.
9486 * ax-gdb.c (gen_trace_static_fields): Likewise.
9487 (gen_traced_pop): Likewise.
9488 (gen_frame_args_address): Likewise.
9489 (gen_frame_locals_address): Likewise.
9490 (gen_var_ref): Likewise.
9491 (gen_struct_ref_recursive): Likewise.
9492 (gen_static_field): Likewise.
9493 (gen_maybe_namespace_elt): Likewise.
9494 (gen_expr): Likewise.
9495 (gen_trace_for_var): Likewise.
9496 (gen_trace_for_expr): Likewise.
9497 (gen_trace_for_return_address): Likewise.
9498
053f8057
SM
94992017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9500
9501 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9502 parameter.
9503 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9504
6661ad48
SM
95052017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9506
9507 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9508 from ax, update calls.
9509 (gen_usual_arithmetic): Likewise.
9510 (gen_integral_promotions): Likewise.
9511 (gen_bitfield_ref): Likewise.
9512 (gen_primitive_field): Likewise.
9513 (gen_struct_ref_recursive): Likewise.
9514 (gen_struct_ref): Likewise.
9515 (gen_maybe_namespace_elt): Likewise.
9516 (gen_struct_elt_for_reference): Likewise.
9517 (gen_namespace_elt): Likewise.
9518 (gen_aggregate_elt_ref): Likewise.
9519 (gen_expr): Get gdbarch from ax, update calls.
9520 (gen_expr_binop_rest): Likewise.
9521
c55a47e7
PA
95222017-07-13 Pedro Alves <palves@redhat.com>
9523
9524 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9525 as default tdesc.
9526 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9527 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9528 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9529 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9530 tdep.
9531 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9532 Get final tdesc from the tdep.
9533 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9534 default tdesc.
9535 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9536 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9537 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9538 Use it as default tdesc.
9539 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9540 down to amd_init_abi. No longer handle fallback tdesc here.
9541 * amd64-tdep.h (tdesc_x32): Declare.
9542 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9543 parameter.
9544 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9545 as default tdesc.
9546
55efceab
AA
95472017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9548
9549 * s390-linux-tdep.c (s390_process_record): Add support for
9550 instructions new in arch12.
9551
0aa37b65
JB
95522017-07-11 John Baldwin <jhb@FreeBSD.org>
9553
9554 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9555 PT_GETFSBASE and PT_GETGSBASE.
9556 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9557 PT_SETGSBASE.
9558
48aeef91
JB
95592017-07-11 John Baldwin <jhb@FreeBSD.org>
9560
9561 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9562 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9563 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9564 those rules.
9565 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9566 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9567 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9568 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9569 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9570 * features/i386/amd64.xml: Add 64bit-segments.xml.
9571 * features/i386/amd64-avx-avx512.c: Regenerated.
9572 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9573 * features/i386/amd64-avx-mpx.c: Regenerated.
9574 * features/i386/amd64-avx.c: Regenerated.
9575 * features/i386/amd64-mpx.c: Regenerated.
9576 * features/i386/amd64.c: Regenerated.
9577 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9578 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9579 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9580 * regformats/i386/amd64-avx.dat: Regenerated.
9581 * regformats/i386/amd64-mpx.dat: Regenerated.
9582 * regformats/i386/amd64.dat: Regenerated.
9583
77c501bc
YQ
95842017-07-10 Yao Qi <yao.qi@linaro.org>
9585
9586 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9587 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9588
6dc8d757
AK
95892017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9590
9591 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9592 unsetenv.
9593 * gnulib/aclocal.m4: Regenerate.
9594 * gnulib/config.in: Regenerate.
9595 * gnulib/configure: Regenerate.
9596 * gnulib/import/Makefile.am: Regenerate.
9597 * gnulib/import/Makefile.in: Regenerate.
9598 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9599 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9600 * gnulib/import/m4/environ.m4: New file.
9601 * gnulib/import/m4/setenv.m4: New file.
9602 * gnulib/import/setenv.c: New file.
9603 * gnulib/import/unsetenv.c: New file.
9604
266934d1
SM
96052017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9606
9607 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9608 address when op is DW_OP_addr.
9609
03278692
TT
96102017-07-09 Tom Tromey <tom@tromey.com>
9611
9612 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9613 check and apply to outer type.
9614
4b654465
JB
96152017-07-07 John Baldwin <jhb@FreeBSD.org>
9616
9617 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9618 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9619 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9620 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9621
2af9fc44
JB
96222017-07-07 John Baldwin <jhb@FreeBSD.org>
9623
9624 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9625
382b69bb
JB
96262017-07-07 John Baldwin <jhb@FreeBSD.org>
9627
9628 * corelow.c (get_core_siginfo): Remove.
9629 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9630 instead of get_core_siginfo.
9631 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9632 * gdbarch.h: Re-generate.
9633 * gdbarch.c: Re-generate.
9634 * linux-tdep.c (linux_core_xfer_siginfo): New.
9635 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9636
6e5eab33
JB
96372017-07-07 John Baldwin <jhb@FreeBSD.org>
9638
9639 * corelow.c (thread_section_name): Move to ...
9640 * gdbcore.h (thread_section_name): ... here.
9641
929edea9
JB
96422017-07-07 John Baldwin <jhb@FreeBSD.org>
9643
9644 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9645 (struct siginfo32): New.
9646 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9647 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9648 via ptrace(PT_LWPINFO).
9649
762c974a
JB
96502017-07-07 John Baldwin <jhb@FreeBSD.org>
9651
9652 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9653 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9654 (fbsd_get_siginfo_type): New.
9655 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9656 (_initialize_fbsd_tdep): New.
9657
33c5cd75
DB
96582017-07-06 David Blaikie <dblaikie@gmail.com>
9659
9660 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9661 a singular dwo_unit*) to support multiple CUs in the same way that
9662 multiple TUs are supported.
9663 (create_cus_hash_table): Replace create_dwo_cu with a function for
9664 parsing multiple CUs from a DWO file.
9665 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9666 create_dwo_cu.
9667 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9668 htab_find, rather than comparing the signature to a singleton CU in
9669 the dwo_file.
9670
8455d262
PA
96712017-07-06 Pedro Alves <palves@redhat.com>
9672
9673 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9674
4da3eb35
PA
96752017-07-04 Pedro Alves <palves@redhat.com>
9676
9677 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9678 * gdbtypes.h (TYPE_STATIC): Delete.
9679 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9680 is_synchronized, is_native>: Delete.
9681 <dummy>: Bump.
9682 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9683 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9684 (TYPE_FN_FIELD_ABSTRACT): Delete.
9685
5bfd255c
SM
96862017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9687
9688 * buffer.h (buffer_finish): Fix spelling mistakes.
9689
25c54127
EZ
96902017-07-01 Eli Zaretskii <eliz@gnu.org>
9691
9692 * .dir-locals.el: Automatically switch to C-style comments in
9693 versions of Emacs that support the feature.
9694
dc4bde35
SDJ
96952017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9696 Pedro Alves <palves@redhat.com>
9697
9698 PR cli/21688
9699 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9700 (process_next_line): New variable 'inline_cmd'.
9701 Adjust 'if' clauses for "python", "compile" and "guile" to use
9702 'command_name_equals' and check for '!inline_cmd'.
9703
51ed89aa
SDJ
97042017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9705
9706 PR cli/21688
9707 * cli/cli-script.c (command_name_equals_not_inline): New function.
9708 (process_next_line): Adjust 'if' clauses for "python", "compile"
9709 and "guile" to use command_name_equals_not_inline.
9710
eb17d413
PA
97112017-06-29 Pedro Alves <palves@redhat.com>
9712
9713 * completer.c (expression_completer): Call
9714 linespec_location_completer instead of location_completer.
9715
195bcdd5
PA
97162017-06-29 Pedro Alves <palves@redhat.com>
9717
9718 * completer.c (expression_completer): Remove code that recomputes
9719 'text' from 'word'.
9720
adc764e7
YQ
97212017-06-29 Yao Qi <yao.qi@linaro.org>
9722
9723 * regformats/regdat.sh: Generate code with
9724 "ifndef IN_PROCESS_AGENT".
9725
6e75794e
PA
97262017-06-28 Pedro Alves <palves@redhat.com>
9727
9728 * command.h: Include "common/scoped_restore.h".
9729
bc491f2e
YQ
97302017-06-28 Yao Qi <yao.qi@linaro.org>
9731
9732 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9733 instead of obstack_grow.
9734
41664b45
DG
97352017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9736
9737 PR gdb/21337
9738 * symfile.c (reread_symbols): Call objfiles_changed just before
9739 read_symbols.
9740
6da67eb1
PA
97412017-06-27 Pedro Alves <palves@redhat.com>
9742
9743 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9744 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9745 (completion_list_add_symbol, completion_list_add_msymbol):
9746 ... these new functions.
9747 (add_symtab_completions)
9748 (default_make_symbol_completion_list_break_on_1): Adjust.
9749
23732b1e
PA
97502017-06-27 Pedro Alves <palves@redhat.com>
9751
9752 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9753 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9754 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9755 dtor.
9756 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9757 'storage_obstack' field an auto_obstack. In-class initialize all
9758 non-bitfield fields. Make minsyms_read bool.
9759 * symfile.c (read_symbols): Adjust.
9760
a4d1e79a
AH
97612017-06-27 Alan Hayward <alan.hayward@arm.com>
9762
9763 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9764 (gdbsim_store_register): Likewise.
9765
8268c778
PA
97662017-06-27 Pedro Alves <palves@redhat.com>
9767
9768 * c-exp.y (name_obstack): Now an auto_obstack.
9769 (yylex): Use auto_obstack::clear.
9770 (c_parse): Use auto_obstack::clear instead of reinitializing and
9771 freeing the obstack.
9772 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9773 * d-exp.y (name_obstack): Now an auto_obstack.
9774 (yylex): Use auto_obstack::clear.
9775 (d_parse): Use auto_obstack::clear instead of reinitializing and
9776 freeing the obstack.
9777 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9778 auto_obstack.
9779 * dwarf2read.c (create_addrmap_from_index)
9780 (dwarf2_build_psymtabs_hard)
9781 (update_enumeration_type_from_children): Likewise.
9782 * gdb_obstack.h (auto_obstack): New type.
9783 * go-exp.y (name_obstack): Now an auto_obstack.
9784 (build_packaged_name): Use auto_obstack::clear.
9785 (go_parse): Use auto_obstack::clear instead of reinitializing and
9786 freeing the obstack.
9787 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9788 auto_obstack.
9789 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9790 * rust-exp.y (work_obstack): Now an auto_obstack.
9791 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9792 reinitializing and freeing the obstack.
9793 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9794 (host_char_to_target): Use auto_obstack.
9795 * utils.h (make_cleanup_obstack_free): Delete declaration.
9796 * valprint.c (generic_emit_char, generic_printstr): Use
9797 auto_obstack.
9798
db665f42
SM
97992017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9800
9801 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9802 thread.
9803 (darwin_init_thread_list): Don't update dummy thread.
9804 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9805
873c0814
SM
98062017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9807
9808 * record-full.c (netorder16): Remove.
9809
8b5a7a6e
SM
98102017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9811
9812 * common/diagnostics.h: Define macros for GCC.
9813 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9814 * common/vec.h: Include diagnostics.h.
9815 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9816 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9817 warning.
9818
d1435379
SM
98192017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9820
9821 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9822 New macro.
9823 * ada-lex.l: Ignore deprecated register warnings.
9824
cc75e0fd
SM
98252017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9826
9827 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9828 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9829
07809eaf
SM
98302017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9831
9832 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9833 its own line.
9834
f076f034
SM
98352017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9836
9837 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9838
0dd5cbc5
AH
98392017-06-23 Alan Hayward <alan.hayward@arm.com>
9840
9841 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9842 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9843 (xtensa_register_read_masked): Likewise.
9844
d4c6ce5b
SDJ
98452017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9846
9847 * common/environ.c (gdb_environ::unset): Update comment.
9848
16892a03
AH
98492017-06-22 Alan Hayward <alan.hayward@arm.com>
9850
9851 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9852 registers.
9853
d7dcbefc
AH
98542017-06-22 Alan Hayward <alan.hayward@arm.com>
9855
9856 * record-full.c (record_full_exec_insn): Use byte_vector.
9857
b30ff123
YQ
98582017-06-22 Yao Qi <yao.qi@linaro.org>
9859
9860 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9861 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9862
4fa847d7
AH
98632017-06-22 Alan Hayward <alan.hayward@arm.com>
9864
9865 * remote.c (cached_reg): Move from here...
9866 * regcache.h (cached_reg): ...to here.
9867 * python/py-unwind.c (struct reg_info): Remove.
9868 (cached_frame_info): Use cached_reg_t.
9869 (pyuw_prev_register): Likewise.
9870 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9871 (pyuw_dealloc_cache): Free all registers.
9872
f4906a9a
PA
98732017-06-22 Pedro Alves <palves@redhat.com>
9874 Simon Marchi <simon.marchi@ericsson.com>
9875
9876 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9877 warning.
9878 * common/diagnostics.h: New file.
9879
b45a1208
PA
98802017-06-22 Pedro Alves <palves@redhat.com>
9881
9882 * common/agent.h: Add include guards.
9883
e4da2c61
SM
98842017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9887 talk about addressable units instead of bytes.
9888
96160d60
SDJ
98892017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9890
9891 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9892 of '::const_iterator'.
9893
9a6c7d9c
SDJ
98942017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9895
9896 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9897 'unittests/environ-selftests.c'.
9898 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9899 * charset.c (find_charset_names): Declare object 'iconv_env'.
9900 Update code to use 'iconv_env' object. Remove call to
9901 'free_environ'.
9902 * common/environ.c: Include <utility>.
9903 (make_environ): Delete function.
9904 (free_environ): Delete function.
9905 (gdb_environ::clear): New function.
9906 (gdb_environ::operator=): New function.
9907 (gdb_environ::get): Likewise.
9908 (environ_vector): Delete function.
9909 (set_in_environ): Delete function.
9910 (gdb_environ::set): New function.
9911 (unset_in_environ): Delete function.
9912 (gdb_environ::unset): New function.
9913 (gdb_environ::envp): Likewise.
9914 * common/environ.h: Include <vector>.
9915 (struct gdb_environ): Delete; transform into...
9916 (class gdb_environ): ... this class.
9917 (free_environ): Delete prototype.
9918 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9919 environ_vector): Likewise.
9920 * infcmd.c (run_command_1): Update code to call
9921 'envp' from 'gdb_environ' class.
9922 (environment_info): Update code to call methods from 'gdb_environ'
9923 class.
9924 (unset_environment_command): Likewise.
9925 (path_info): Likewise.
9926 (path_command): Likewise.
9927 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9928 (inferior::inferior): Initialize 'environment' using the host's
9929 information.
9930 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9931 Include "environ.h".
9932 (class inferior) <environment>: Change type from 'struct
9933 gdb_environ' to 'gdb_environ'.
9934 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9935 methods from 'gdb_environ' class.
9936 * solib.c (solib_find_1): Likewise
9937 * unittests/environ-selftests.c: New file.
9938
75c554cf
YQ
99392017-06-20 Yao Qi <yao.qi@linaro.org>
9940
9941 * features/i386/i386-linux.xml: Exchange the order of including
9942 32bit-linux.xml and 32bit-sse.xml.
9943 * features/i386/i386-linux.c: Regenerated.
9944
72ddacb7
YQ
99452017-06-20 Yao Qi <yao.qi@linaro.org>
9946
9947 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9948 Delete copy ctor and assignment operator.
9949 (tdesc_type): Likewise.
9950 (tdesc_feature): Likewise.
9951 (tdesc_free_reg): Remove.
9952 (tdesc_create_reg): Use new.
9953 (tdesc_free_type): Remove.
9954 (tdesc_create_vector): Use new.
9955 (tdesc_create_union): Likewise.
9956 (tdesc_create_flags): Likewise.
9957 (tdesc_create_enum): Likewise.
9958 (tdesc_free_feature): Delete.
9959 (free_target_description): Use delete.
9960
325c9fd4
JB
99612017-06-19 John Baldwin <jhb@FreeBSD.org>
9962
9963 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9964 registers.
9965
16b7a719
PA
99662017-06-19 Pedro Alves <palves@redhat.com>
9967
9968 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9969 after gdb::unlinker.
9970
1c8e01c9
SDJ
99712017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9972
9973 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9974 gdb_environ to access an environment variable.
9975
ffce45d2
TP
99762017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9977
9978 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9979 gdb_byte*.
9980
1d4fbac9
SM
99812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9982
9983 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9984
8465943a
SM
99852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9986
9987 * configure: Re-generate.
9988 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9989
3e019bdc
SM
99902017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9991
9992 * configure: Re-generate.
9993 * warning.m4: Pass -Werror to compiler when checking for
9994 supported warning flags.
9995
cf0dd6f0
SM
99962017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9997
9998 * Makefile.in (COMPILE.pre): Add "-x c++".
9999
6f98355c
YQ
100002017-06-16 Alan Hayward <alan.hayward@arm.com>
10001 Pedro Alves <palves@redhat.com>
10002 Yao Qi <yao.qi@linaro.org>
10003
10004 * defs.h (RequireLongest): New.
10005 (extract_integer): Declare function template.
10006 (extract_signed_integer): Remove the declaration, but define it
10007 static inline.
10008 (extract_unsigned_integer): Likewise.
10009 (store_integer): Declare function template.
10010 (store_signed_integer): Remove the declaration, but define it
10011 static inline.
10012 (store_unsigned_integer): Likewise.
10013 * findvar.c (extract_integer): New function template.
10014 (extract_signed_integer): Remove.
10015 (extract_unsigned_integer): Remove.
10016 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10017 instantiations.
10018 (store_integer): New function template.
10019 (store_signed_integer): Remove.
10020 (store_unsigned_integer): Remove.
10021 (store_integer): Explicit instantiations.
10022 * regcache.c (regcache_raw_read_signed): Update.
10023 (regcache::raw_read): New function.
10024 (regcache::raw_read_signed): Remove.
10025 (regcache::raw_read_unsigned): Remove.
10026 (regcache_raw_read_unsigned): Update.
10027 (regcache_raw_write_unsigned): Update.
10028 (regcache::raw_write_signed): Remove.
10029 (regcache::raw_write): New function.
10030 (regcache_cooked_read_signed): Update.
10031 (regcache::raw_write_unsigned): Remove.
10032 (regcache::cooked_read_signed): Remove.
10033 (regcache_cooked_read_unsigned): Update.
10034 (regcache::cooked_read_unsigned): Remove.
10035 (regcache_cooked_write_signed): Update.
10036 (regcache_cooked_write_unsigned): Update.
10037 * regcache.h (regcache) <raw_read_signed>: Remove.
10038 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10039 <raw_read, raw_write>: New.
10040 <cooked_read_signed, cooked_write_signed>: Remove.
10041 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10042 <cooked_read, cooked_write>: New.
10043 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10044 (sh64_pseudo_register_write): Update.
10045
a87dc45a
AK
100462017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10047
10048 * arc-tdep.c (arc_disassembler_options): New variable.
10049 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10050 of default_print_insn.
10051 (arc_delayed_print_insn): Set info->section when needed,
10052 use default_print_insn to retrieve a disassembler.
10053
45159d6a
SDJ
100542017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10055
10056 PR gdb/21574
10057 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10058 to mention $SHELL and startup-with-shell.
10059
b46c4cf0
MF
100602017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10061
10062 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10063
6394c606
YQ
100642017-06-14 Yao Qi <yao.qi@linaro.org>
10065
10066 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10067 default_print_insn instead of print_insn_aarch64.
10068 * arm-tdep.c (gdb_print_insn_arm): Call
10069 default_print_insn instead of print_insn_big_arm
10070 and print_insn_little_arm.
10071 * i386-tdep.c (i386_print_insn): Call default_print_insn
10072 instead of print_insn_i386.
10073 * ia64-tdep.c (ia64_print_insn): Call
10074 default_print_insn instead of print_insn_ia64.
10075 * mips-tdep.c (gdb_print_insn_mips): Call
10076 default_print_insn instead of print_insn_big_mips
10077 and print_insn_little_mips.
10078 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10079 instead of print_insn_spu.
10080
d5722aa2
PA
100812017-06-14 Pedro Alves <palves@redhat.com>
10082
10083 * ada-lang.c: Include "common/byte-vector.h".
10084 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10085 * charset.c (wchar_iterator::iterate): Resize the vector instead
10086 of reserving it.
10087 * common/byte-vector.h: Include "common/def-vector.h".
10088 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10089 * cli/cli-dump.c: Include "common/byte-vector.h".
10090 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10091 * common/byte-vector.h: New file.
10092 * common/def-vector.h: New file.
10093 * common/default-init-alloc.h: New file.
10094 * dwarf2loc.c: Include "common/byte-vector.h".
10095 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10096 instead of reserving it.
10097 * dwarf2read.c: Include "common/byte-vector.h".
10098 (data_buf::m_vec): Now a gdb::byte_vector.
10099 * gdb_regex.c: Include "common/def-vector.h".
10100 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10101 * mi/mi-main.c: Include "common/byte-vector.h".
10102 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10103 * printcmd.c: Include "common/byte-vector.h".
10104 (print_scalar_formatted): Use gdb::byte_vector.
10105 * valprint.c: Include "common/byte-vector.h".
10106 (maybe_negate_by_bytes, print_decimal_chars): Use
10107 gdb::byte_vector.
10108
01ec7a27
SM
101092017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10110
10111 * darwin-nat.c: Include "nat/fork-inferior.h".
10112
848d9074
SM
101132017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10114
10115 * configure.nat: Factor out Darwin bits that are not
10116 architecture-specific. Add fork-inferior.o.
10117
3b912944
SM
101182017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10119
10120 * configure.nat: Factor out AIX bits that are not
10121 architecture-specific. Add fork-inferior.o.
10122
55acdf22
AA
101232017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10124
10125 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10126 (read_pieced_value, write_pieced_value): ...here. Reduce to
10127 wrappers that just call rw_pieced_value.
10128
f65e2044
AA
101292017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10130
10131 * dwarf2loc.c (write_pieced_value): When writing the data for a
10132 memory piece, use write_memory_with_notification instead of
10133 write_memory.
10134
23f945bf
AA
101352017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10136
10137 * valops.c (read_value_memory): Change embedded_offset to
10138 represent a bit offset instead of a byte offset.
10139 * value.h (read_value_memory): Adjust comment.
10140
f236533e
AA
101412017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10142
10143 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10144 dest_offset_bits and source_offset_bits.
10145 (write_pieced_value): Likewise.
10146
65d84b76
AA
101472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10148
10149 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10150 given by DW_OP_bit_piece.
10151 (write_pieced_value): Likewise.
10152
242d31ab
AA
101532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10154
10155 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10156 some other preparations to the places where sufficient information
10157 is available.
10158 (write_pieced_value): Likewise.
10159
03c8af18
AA
101602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10161
10162 * dwarf2loc.c (bits_to_bytes): New function.
10163 (read_pieced_value): Fix offset calculations for register pieces
10164 on big-endian targets.
10165 (write_pieced_value): Likewise.
10166
840989c1
AA
101672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10168
10169 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10170 (write_pieced_value): Likewise.
10171
359b19bb
AA
101722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10173
10174 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10175 transfer the source value's least significant bits, instead of its
10176 lowest-addressed ones. Rename type_len to max_offset.
10177 (read_pieced_value): Mirror above changes to write_pieced_value as
10178 applicable.
10179
07c9ca3b
AA
101802017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10181
10182 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10183 truncate full bytes from dest_offset_bits before using it as an
10184 offset into the buffer.
10185
f1cc9874
AA
101862017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10187
10188 * dwarf2loc.c (write_pieced_value): Include transfer size in
10189 byte-wise check.
10190
cdaac320
AA
101912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10192
10193 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10194 calculation of this_size.
10195
af547a96
AA
101962017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10197
10198 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10199 when targeting a bit-field.
10200 (write_pieced_value): Likewise.
10201
ddd7882a
AA
102022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10203
10204 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10205 (allocate_piece_closure): Drop addr_size parameter.
10206 (dwarf2_evaluate_loc_desc_full): Adjust call to
10207 allocate_piece_closure.
10208
e9352324
AA
102092017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10210
10211 PR gdb/21226
10212 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10213 the LSB end, independent of endianness.
10214
d5d1163e
AA
102152017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10216
10217 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10218 size capping.
10219
032bb6ea
YQ
102202017-06-13 Yao Qi <yao.qi@linaro.org>
10221
10222 * mips-linux-nat.c: Move include features/mips*-linux.c to
10223 mips-linux-tdep.c.
10224 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10225 to mips-linux-tdep.c.
10226 * mips-linux-tdep.c: Include features/mips*-linux.c
10227 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10228 functions.
10229 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10230 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10231 (tdesc_mips64_dsp_linux): Declare.
10232
f12f6bad
TT
102332017-06-12 Tom Tromey <tom@tromey.com>
10234
10235 * valprint.h (val_print_type_code_int): Remove.
10236 * valprint.c (generic_val_print_int): Always call
10237 val_print_scalar_formatted.
10238 (val_print_type_code_int): Remove.
10239 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10240 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10241 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10242 * ada-valprint.c (ada_val_print_num): Use
10243 val_print_scalar_formatted.
10244
d9109c80
TT
102452017-06-12 Tom Tromey <tom@tromey.com>
10246
10247 * printcmd.c (print_scalar_formatted): Unify the two switches.
10248 Don't convert scalars to LONGEST.
10249
4ac0cb1c
TT
102502017-06-12 Tom Tromey <tom@tromey.com>
10251
10252 PR exp/16225:
10253 * valprint.h (print_decimal_chars): Update.
10254 * valprint.c (maybe_negate_by_bytes): New function.
10255 (print_decimal_chars): Add "is_signed" argument.
10256 * printcmd.c (print_scalar_formatted): Update.
10257
30a25466
TT
102582017-06-12 Tom Tromey <tom@tromey.com>
10259
10260 PR exp/16225:
10261 * valprint.h (print_binary_chars, print_hex_chars): Update.
10262 * valprint.c (val_print_type_code_int): Update.
10263 (print_binary_chars): Add "zero_pad" argument.
10264 (emit_octal_digit): New function.
10265 (print_octal_chars): Don't zero-pad.
10266 (print_decimal_chars): Likewise.
10267 (print_hex_chars): Add "zero_pad" argument.
10268 * sh64-tdep.c (sh64_do_fp_register): Update.
10269 * regcache.c (regcache::dump): Update.
10270 * printcmd.c (print_scalar_formatted): Update.
10271 * infcmd.c (default_print_one_register_info): Update.
10272
b3464d03
PA
102732017-06-12 Pedro Alves <palves@redhat.com>
10274 Alan Hayward <alan.hayward@arm.com>
10275
10276 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10277 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10278 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10279 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10280 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10281
4b76cda9
PA
102822017-06-12 Pedro Alves <palves@redhat.com>
10283
10284 * dwarf2read.c (mapped_symtab::data): Now a vector of
10285 symtab_index_entry instead of vector of
10286 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10287 whether an element's name is NULL instead of checking whether the
10288 element itself is NULL.
10289 (find_slot): Change return type. Adjust.
10290 (hash_expand, , add_index_entry, uniquify_cu_indices)
10291 (write_hash_table): Adjust.
10292
e8f8bcb3
PA
102932017-06-12 Pedro Alves <palves@redhat.com>
10294
10295 * dwarf2read.c (recursively_count_psymbols): New function.
10296 (write_psymtabs_to_index): Call it to compute number of psyms and
10297 pass estimate size of psyms_seen to unordered_set's ctor.
10298
70a1152b
PA
102992017-06-12 Pedro Alves <palves@redhat.com>
10300
10301 * dwarf2read.c (write_hash_table): Check if key already exists
10302 before emplacing.
10303
c2f134ac
PA
103042017-06-12 Pedro Alves <palves@redhat.com>
10305
10306 * dwarf2read.c (data_buf::append_space): Rename to...
10307 (data_buf::grow): ... this, and make private. Adjust all callers.
10308 (data_buf::append_uint): New method.
10309 (add_address_entry, write_one_signatured_type)
10310 (write_psymtabs_to_index): Use it.
10311
a81e6d4d
PA
103122017-06-12 Pedro Alves <palves@redhat.com>
10313
10314 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10315 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10316 (data_buf::file_write): Call ::fwrite directly.
10317
6fd931f2
PA
103182017-06-12 Pedro Alves <palves@redhat.com>
10319
10320 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10321 std::vector::erase.
10322
bc8f2430
JK
103232017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10324
10325 Code cleanup: C++ify .gdb_index producer.
10326 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10327 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10328 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10329 (create_strtab, add_string): Remove.
10330 (file_write, data_buf): New.
10331 (struct symtab_index_entry): Use std::vector for cu_indices.
10332 (struct mapped_symtab): Use std::vector for data.
10333 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10334 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10335 Remove.
10336 (find_slot): Change return type. Update it to the new data structures.
10337 (hash_expand, add_index_entry): Update it to the new data structures.
10338 (offset_type_compare): Remove.
10339 (uniquify_cu_indices): Update it to the new data structures.
10340 (c_str_view, c_str_view_hasher, vector_hasher): New.
10341 (add_indices_to_cpool): Remove.
10342 (write_hash_table): Update it to the new data structures.
10343 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10344 (eq_psymtab_cu_index): Remove.
10345 (psym_index_map): New typedef.
10346 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10347 reference and std::unordered_map for cu_index_htab.
10348 (add_address_entry, add_address_entry_worker, write_address_map)
10349 (write_psymbols): Update it to the new data structures.
10350 (write_obstack): Remove.
10351 (struct signatured_type_index_data): Change types_list to a data_buf
10352 reference and psyms_seen to a std::unordered_set reference.
10353 (write_one_signatured_type, recursively_write_psymbols)
10354 (write_psymtabs_to_index): Update it to the new data structures.
10355
c4dcb155
SM
103562017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10357
10358 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10359 separate-debug-file commands.
10360 * symfile.h (separate_debug_file_debug): New global.
10361 * symfile.c (separate_debug_file_debug): New global.
10362 (separate_debug_file_exists, find_separate_debug_file): Add
10363 debug output.
10364 (_initialize_symfile): Add "set debug separate-debug-file"
10365 command.
10366 * build-id.c (build_id_to_debug_bfd,
10367 find_separate_debug_file_by_buildid): Add debug output.
10368
6d45d4b4
SM
103692017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10370
10371 * gdbarch.sh (displaced_step_free_closure): Remove.
10372 * gdbarch.h, gdbarch.c: Re-generate.
10373 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10374 displaced_step_free_closure.
10375 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10376 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10377 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10378 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10379 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10380 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10381 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10382 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10383 * infrun.c (displaced_step_clear): Call xfree instead of
10384 gdbarch_displaced_step_free_closure.
10385
2f91880f
SDJ
103862017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10387
10388 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10389 NULL".
10390
b8b6e72f
AH
103912017-06-08 Alan Hayward <alan.hayward@arm.com>
10392
10393 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10394 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10395 (mn10300_push_dummy_call): Likewise.
10396
5369082e
AH
103972017-06-08 Alan Hayward <alan.hayward@arm.com>
10398
10399 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10400
ff4ca5ac
AH
104012017-06-08 Alan Hayward <alan.hayward@arm.com>
10402
10403 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10404
aefd8b33
SDJ
104052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10406
10407 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10408 able to start inferiors using a shell.
10409 (New remote packets): Announce new packet "QStartupWithShell".
10410 * remote.c: Add PACKET_QStartupWithShell.
10411 (extended_remote_create_inferior): Handle new
10412 PACKET_QStartupWithShell.
10413 (remote_protocol_features) <QStartupWithShell>: New entry for
10414 PACKET_QStartupWithShell.
10415 (_initialize_remote): Call "add_packet_config_cmd" for
10416 QStartupShell.
10417
2090129c
SDJ
104182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10419 Pedro Alves <palves@redhat.com>
10420
10421 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10422 and "nat/fork-inferior.h".
10423 * common/common-inferior.h: New file, with contents from
10424 "gdb/inferior.h".
10425 * commom/common-utils.c: Include "common-utils.h".
10426 (stringify_argv): New function.
10427 * common/common-utils.h (stringify_argv): New prototype.
10428 * configure.nat: Add "fork-inferior.o" as a dependency for
10429 "*linux*", "fbsd*" and "nbsd*" hosts.
10430 * corefile.c (get_exec_file): Update comment.
10431 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10432 instead of "startup_inferior".
10433 (darwin_create_inferior): Call "add_thread_silent" after
10434 "fork_inferior".
10435 * fork-child.c: Cleanup unnecessary includes.
10436 (SHELL_FILE): Move to "common/common-fork-child.c".
10437 (environ): Likewise.
10438 (exec_wrapper): Initialize.
10439 (get_exec_wrapper): New function.
10440 (breakup_args): Move to "common/common-fork-child.c"; rename to
10441 "breakup_args_for_exec".
10442 (escape_bang_in_quoted_argument): Move to
10443 "common/common-fork-child.c".
10444 (saved_ui): New variable.
10445 (prefork_hook): New function.
10446 (postfork_hook): Likewise.
10447 (postfork_child_hook): Likewise.
10448 (gdb_startup_inferior): Likewise.
10449 (fork_inferior): Move to "common/common-fork-child.c". Update
10450 function to support gdbserver.
10451 (startup_inferior): Likewise.
10452 * gdbcore.h (get_exec_file): Remove declaration.
10453 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10454 instead of "startup_inferior". Call "add_thread_silent" after
10455 "fork_inferior".
10456 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10457 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10458 instead of "startup_inferior". Call "add_thread_silent" after
10459 "fork_inferior".
10460 * inferior.h: Include "common-inferior.h".
10461 (trace_start_error): Move to "common/common-utils.h".
10462 (trace_start_error_with_name): Likewise.
10463 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10464 (startup_inferior): Likewise.
10465 (gdb_startup_inferior): New prototype.
10466 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10467 * nat/fork-inferior.h: New file.
10468 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10469 instead of "startup_inferior". Call "add_thread_silent" after
10470 "fork_inferior".
10471 * target.h (target_terminal_init): Move prototype to
10472 "target/target.h".
10473 (target_terminal_inferior): Likewise.
10474 (target_terminal_ours): Likewise.
10475 * target/target.h (target_terminal_init): New prototype, moved
10476 from "target.h".
10477 (target_terminal_inferior): Likewise.
10478 (target_terminal_ours): Likewise.
10479 * utils.c (gdb_flush_out_err): New function.
10480
043a4934
SDJ
104812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10482
10483 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10484 * common/common-gdbthread.h: New file, with parts from
10485 "gdb/gdbthread.h".
10486 * gdbthread.h: Include "common-gdbthread.h".
10487 (switch_to_thread): Moved to "common/common-gdbthread.h".
10488
15652511
SDJ
104892017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10490
10491 * Makefile.in (SFILES): Add "common/job-control.c".
10492 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10493 (COMMON_OBS): Add "job-control.o".
10494 * common/job-control.c: New file, with contents from
10495 "gdb/inflow.c".
10496 * common/job-control.h: New file, with contents from "terminal.h".
10497 * fork-child.c: Include "job-control.h".
10498 * inflow.c: Include "job-control.h".
10499 (gdb_setpgid): Move to "common/common-inflow.c".
10500 (_initialize_inflow): Move setting of "job_control" to
10501 "handle_job_control".
10502 * terminal.h (job_control): Moved to "common/common-terminal.h".
10503 (gdb_setpgid): Likewise.
10504 * top.c: Include "job_control.h".
10505 * utils.c: Likewise.
10506 (job_control): Moved to "job-control.c".
10507
2d7cc5c7
PA
105082017-06-07 Pedro Alves <palves@redhat.com>
10509
10510 * Makefile.in (SFILES): Add gdb_regex.c.
10511 (COMMON_OBS): Add gdb_regex.o.
10512 * ada-lang.c (ada_add_standard_exceptions)
10513 (ada_add_exceptions_from_frame, name_matches_regex)
10514 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10515 parameter type to compiled_regex. Adjust.
10516 (ada_exceptions_list): Use compiled_regex.
10517 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10518 std::unique_ptr<compiled_regex>.
10519 (exception_catchpoint::~exception_catchpoint): Remove regfree
10520 call.
10521 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10522 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10523 * breakpoint.c (solib_catchpoint::compiled): Now a
10524 std::unique_ptr<compiled_regex>.
10525 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10526 (check_status_catch_solib): Adjust to use compiled_regex.
10527 (add_solib_catchpoint): Adjust to use compiled_regex.
10528 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10529 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10530 compiled_regex reference. Adjust to use it.
10531 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10532 declaration. Include "gdb_regex.h".
10533 (apropos_cmd): Change regex parameter to compiled_regex reference.
10534 * gdb_regex.c: New file.
10535 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10536 declarations.
10537 (class compiled_regex): New.
10538 * linux-tdep.c: Include "common/gdb_optional.h".
10539 (struct mapping_regexes): New, factored out from
10540 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10541 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10542 gdb::optional and remove cleanups. Adjust to compiled_regex.
10543 * probe.c: Include "common/gdb_optional.h".
10544 (collect_probes): Use compiled_regex and gdb::optional and remove
10545 cleanups.
10546 * skip.c: Include "common/gdb_optional.h".
10547 (skiplist_entry::compiled_function_regexp): Now a
10548 gdb::optional<compiled_regex>.
10549 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10550 (free_skiplist_entry): Remove regfree call.
10551 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10552 compiled_regex and gdb::optional.
10553 * symtab.c: Include "common/gdb_optional.h".
10554 (search_symbols): Use compiled_regex and gdb::optional.
10555 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10556 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10557 to gdb_regex.c.
10558
50d6adef
AH
105592017-06-07 Alan Hayward <alan.hayward@arm.com>
10560
10561 * regcache.c (regcache::save): Avoid buffer use.
10562 (regcache::dump): Likewise.
10563
4a8a33c8
AH
105642017-06-07 Alan Hayward <alan.hayward@arm.com>
10565
10566 * sh-tdep.c (sh_pseudo_register_read): Remove
10567 MAX_REGISTER_SIZE.
10568 (sh_pseudo_register_write): Likewise.
10569 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10570 (sh64_pseudo_register_write): Likewise
10571
d1be909e
AH
105722017-06-07 Alan Hayward <alan.hayward@arm.com>
10573
10574 * aarch64-tdep.c (aarch64_store_return_value): Use
10575 V_REGISTER_SIZE.
10576 (aarch64_pseudo_read_value): Likewise.
10577 (aarch64_pseudo_write): Likewise.
10578
f4a65042
YQ
105792017-06-06 Yao Qi <yao.qi@linaro.org>
10580
10581 * regformats/regdef.h (set_register_cache): Remove the
10582 declaration.
10583
9f7fb0aa
AH
105842017-06-06 Alan Hayward <alan.hayward@arm.com>
10585
10586 * frame.c (frame_unwind_register_signed): Use
10587 frame_unwind_register_value.
10588
e1e01040
PA
105892017-06-06 Pedro Alves <palves@redhat.com>
10590
10591 PR breakpoints/21553
10592 * breakpoint.c (create_breakpoints_sal_default)
10593 (init_breakpoint_sal, create_breakpoint_sal): Use
10594 gdb::unique_xmalloc_ptr for string parameters.
10595 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10596 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10597 (base_breakpoint_create_breakpoints_sal)
10598 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10599 (strace_marker_create_breakpoints_sal)
10600 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10601 string parameters.
10602 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10603 gdb::unique_xmalloc_ptr for string parameters.
10604 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10605 parameters.
10606
fbe654c8
AH
106072017-06-06 Alan Hayward <alan.hayward@arm.com>
10608
10609 * alpha-tdep.c (alpha_register_to_value): Use
10610 get_frame_register_value.
10611 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10612
ae0d01d6
AH
106132017-06-06 Alan Hayward <alan.hayward@arm.com>
10614
10615 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10616 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10617 (ia64_value_to_register): Likewise.
10618 (ia64_extract_return_value): Likewise.
10619 (ia64_store_return_value): Likewise.
10620 (ia64_push_dummy_call): Likewise.
10621
49cf576c
JB
106222017-06-04 Joel Brobecker <brobecker@adacore.com>
10623
10624 GDB 8.0 released.
10625
26b6a6ab
SM
106262017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10627
10628 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10629
22827c51
SM
106302017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10631
10632 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10633 parameter.
10634 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10635
0e05cf3a
SM
106362017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10637
10638 * event-loop.c (poll_timers): Unallocate timer using delete
10639 instead of xfree.
10640
c1fc2657
SM
106412017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10642
10643 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10644 (struct breakpoint) <~breakpoint>: New.
10645 (struct watchpoint): Inherit from breakpoint.
10646 <~watchpoint>: New.
10647 <base>: Remove.
10648 (struct tracepoint): Inherit from breakpoint.
10649 <base>: Remove.
10650 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10651 (struct longjmp_breakpoint): Inherit from breakpoint.
10652 <~longjmp_breakpoint>: New.
10653 <base>: Remove.
10654 (new_breakpoint_from_type): Remove casts.
10655 (watchpoint_in_thread_scope): Remove reference to base field.
10656 (watchpoint_del_at_next_stop): Likewise.
10657 (update_watchpoint): Likewise.
10658 (watchpoint_check): Likewise.
10659 (bpstat_check_watchpoint): Likewise.
10660 (set_longjmp_breakpoint): Likewise.
10661 (struct fork_catchpoint): Inherit from breakpoint.
10662 <base>: Remove.
10663 (struct solib_catchpoint): Inherit from breakpoint.
10664 <~solib_catchpoint>: New.
10665 <base>: Remove.
10666 (dtor_catch_solib): Change to ...
10667 (solib_catchpoint::~solib_catchpoint): ... this.
10668 (breakpoint_hit_catch_solib): Remove reference to base field.
10669 (add_solib_catchpoint): Likewise.
10670 (create_fork_vfork_event_catchpoint): Likewise.
10671 (struct exec_catchpoint): Inherit from breakpoint.
10672 <~exec_catchpoint>: New.
10673 <base>: Remove.
10674 (dtor_catch_exec): Change to ...
10675 (exec_catchpoint::~exec_catchpoint): ... this.
10676 (dtor_watchpoint): Change to ...
10677 (watchpoint::~watchpoint): ... this.
10678 (watch_command_1): Remove reference to base field.
10679 (catch_exec_command_1): Likewise.
10680 (base_breakpoint_dtor): Change to ...
10681 (breakpoint::~breakpoint): ... this.
10682 (base_breakpoint_ops): Remove dtor field value.
10683 (longjmp_bkpt_dtor): Change to ...
10684 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10685 (strace_marker_create_breakpoints_sal): Remove reference to base
10686 field.
10687 (delete_breakpoint): Don't manually call breakpoint destructor.
10688 (create_tracepoint_from_upload): Remove reference to base field.
10689 (trace_pass_set_count): Likewise.
10690 (initialize_breakpoint_ops): Don't initialize
10691 momentary_breakpoint_ops, don't set dtors.
10692 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10693 <~ada_catchpoint>: New.
10694 <base>: Remove.
10695 (create_excep_cond_exprs): Remove reference to base field.
10696 (dtor_exception): Change to ...
10697 (ada_catchpoint::~ada_catchpoint): ... this.
10698 (dtor_catch_exception): Remove.
10699 (dtor_catch_exception_unhandled): Remove.
10700 (dtor_catch_assert): Remove.
10701 (create_ada_exception_catchpoint): Remove reference to base
10702 field.
10703 (initialize_ada_catchpoint_ops): Don't set dtors.
10704 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10705 breakpoint.
10706 <~signal_catchpoint>: New.
10707 <base>: Remove.
10708 (signal_catchpoint_dtor): Change to ...
10709 (signal_catchpoint::~signal_catchpoint): ... this.
10710 (create_signal_catchpoint): Remove reference to base field.
10711 (initialize_signal_catchpoint_ops): Don't set dtor.
10712 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10713 from breakpoint.
10714 <~syscall_catchpoint>: New.
10715 <base>: Remove.
10716 (dtor_catch_syscall): Change to ...
10717 (syscall_catchpoint::~syscall_catchpoint): ... this.
10718 (create_syscall_event_catchpoint): Remove reference to base
10719 field.
10720 (initialize_syscall_catchpoint_ops): Don't set dtor.
10721 * break-catch-throw.c (struct exception_catchpoint): Inherit
10722 from breakpoint.
10723 <~exception_catchpoint>: New.
10724 <base>: Remove.
10725 (dtor_exception_catchpoint): Change to ...
10726 (exception_catchpoint::~exception_catchpoint): ... this.
10727 (handle_gnu_v3_exceptions): Remove reference to base field.
10728 (initialize_throw_catchpoint_ops): Don't set dtor.
10729 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10730 field.
10731 * remote.c (remote_get_tracepoint_status): Likewise.
10732 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10733 * tracefile.c (tracefile_fetch_registers): Likewise.
10734 * tracepoint.c (actions_command): Likewise.
10735 (validate_actionline): Likewise.
10736 (tfind_1): Likewise.
10737 (get_traceframe_location): Likewise.
10738 (find_matching_tracepoint_location): Likewise.
10739 (parse_tracepoint_status): Likewise.
10740 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10741
3b0871f4
SM
107422017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10743
10744 * breakpoint.c (struct longjmp_breakpoint): New struct.
10745 (is_tracepoint_type): Change return type to bool.
10746 (is_longjmp_type): New function.
10747 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10748 (set_raw_breakpoint_without_location): Use
10749 new_breakpoint_from_type.
10750 (set_raw_breakpoint): Likewise.
10751
a5e364af
SM
107522017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10753
10754 * breakpoint.c (new_breakpoint_from_type): New function.
10755 (create_breakpoint_sal): Use new_breakpoint_from_type and
10756 unique_ptr.
10757 (create_breakpoint): Likewise.
10758
ae3b3f34
SM
107592017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10760
10761 * memattr.c (mem_info_command): Rename to ...
10762 (info_mem_command): ... this.
10763 (mem_enable_command): Rename to ...
10764 (enable_mem_command): ... this.
10765 (mem_disable_command): Rename to ...
10766 (disable_mem_command): ... this.
10767 (mem_delete_command): Rename to ...
10768 (delete_mem_command): ... this.
10769 (_initialize_mem): Adjust function names.
10770
13ace077
MM
107712017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10772
10773 * btrace.c (handle_pt_insn_events): New.
10774 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10775 STATUS. Split into this and ...
10776 (handle_pt_insn_event_flags): ... this.
10777
c56ccc05
MM
107782017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10779
10780 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10781 and struct pt_insn.resynced.
10782 * configure: Regenerated.
10783 * config.in: Regenerated.
10784
08c3f6d2
TW
107852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10786
10787 * btrace.c (ftrace_find_call_by_number): New function.
10788 (ftrace_new_function): Store objects, not pointers.
10789 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10790 ftrace_new_gap, ftrace_update_function,
10791 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10792 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10793 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10794 btrace_ends_with_single_insn, btrace_call_get): Account for
10795 btrace_thread_info::functions now storing objects.
10796 * btrace.h (struct btrace_thread_info): Add constructor.
10797 (struct btrace_thread_info) <functions>: Make std::vector.
10798 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10799 Initialize with default values.
10800 * record-btrace.c (record_btrace_frame_sniffer): Account for
10801 btrace_thread_info::functions now storing objects.
10802
8ffd39f2
TW
108032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10804
10805 * btrace.c: Remove typedef bfun_s.
10806 (ftrace_new_gap): Directly add gaps to the list of gaps.
10807 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10808 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10809 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10810 instead of gdb VEC.
10811
4aeb0dfc
TW
108122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10813
10814 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10815 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10816 with btrace_thread_info::next_segment and
10817 btrace_thread_info::prev_segment.
10818 * btrace.h: Remove struct btrace_func_link.
10819 (struct btrace_function): Replace pair of function segment pointers
10820 with pair of indices.
10821 * python/py-record-btrace.c (btpy_call_prev_sibling,
10822 btpy_call_next_sibling): Replace references to
10823 btrace_thread_info::segment with btrace_thread_info::next_segment and
10824 btrace_thread_info::prev_segment.
10825 * record-btrace.c (record_btrace_frame_this_id): Use
10826 btrace_find_call_by_number.
10827
eb8f2b9c
TW
108282017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10829
10830 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10831 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10832 btrace_insn_next, btrace_insn_prev): Remove references to
10833 btrace_thread_info::flow.
10834 * btrace.h (struct btrace_function): Remove FLOW.
10835
42bfe59e
TW
108362017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10837
10838 * btrace.c (ftrace_find_call_by_number): New function.
10839 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10840 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10841 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10842 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10843 index.
10844 * btrace.h (struct btrace_function): Turn UP into an index.
10845 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10846 as an index.
10847 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10848 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10849 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10850
b54b03bd
TW
108512017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10852
10853 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10854 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10855 ftrace_update_function, ftrace_compute_global_level_offset,
10856 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10857 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10858 btrace_insn_end, btrace_is_empty): Remove references to
10859 btrace_thread_info::begin and btrace_thread_info::end.
10860 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10861 (struct btrace_thread_info) <functions>: Adjust comment.
10862 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10863 btrace_thread_info::begin.
10864
8286623c
TW
108652017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10866
10867 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10868 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10869 ftrace_update_function): Remove arguments that implicitly were always
10870 BTINFO->END.
10871 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10872 Don't pass BTINFO->END.
10873
a0f1b963
TW
108742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10875
10876 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10877 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10878 btrace_find_insn_by_number): Replace function segment pointer with
10879 index.
10880 (btrace_insn_cmp): Simplify.
10881 * btrace.h: (struct btrace_insn_iterator) Rename index to
10882 insn_index. Replace function segment pointer with index into function
10883 segment vector.
10884 * record-btrace.c (record_btrace_call_history): Replace function
10885 segment pointer use with index.
10886 (record_btrace_frame_sniffer): Retrieve function call segment through
10887 vector.
10888 (record_btrace_set_replay): Remove defunc't safety check.
10889
f158f208
TW
108902017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10891
10892 * btrace.c (btrace_ends_with_single_insn): New function.
10893 (btrace_call_get, btrace_call_number, btrace_call_begin,
10894 btrace_call_end, btrace_call_next, btrace_call_prev,
10895 btrace_find_call_by_number): Use index into call segment vector
10896 instead of pointer.
10897 (btrace_call_cmp): Simplify.
10898 * btrace.h (struct btrace_call_iterator): Replace function call segment
10899 pointer with index into vector.
10900 * record-btrace.c (record_btrace_call_history): Use index instead of
10901 pointer.
10902
521103fd
TW
109032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10904
10905 * btrace.c (btrace_insn_begin, btrace_insn_end,
10906 btrace_find_insn_by_number): Add btinfo to iterator.
10907 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10908
17b89b34
TW
109092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10910
10911 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10912 and save pointers directly.
10913 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10914 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10915 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10916 changed signature of functions.
10917 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10918 (btrace_fetch): Remove code that adds btrace_function pointers to
10919 vector of btrace_functions.
10920 (btrace_clear): Simplify freeing vector of btrace_functions.
10921
2b51eddc
TW
109222017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10923
10924 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10925 Replace VEC_* with std::vector functions.
10926 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10927 (struct btrace_thread_info)<functions>: Change type to std::vector.
10928
db6be0d5
SM
109292017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10930
10931 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10932 "Removed targets and native configurations" up. Merge duplicate
10933 "New commands" sub-sections. Add "New options" sub-sections.
10934
b057297a
AH
109352017-05-26 Alan Hayward <alan.hayward@arm.com>
10936
10937 * defs.h (copy_integer_to_size): New declaration.
10938 * findvar.c (copy_integer_to_size): New function.
10939 (do_cint_test): New selftest function.
10940 (copy_integer_to_size_test): Likewise.
10941 (_initialize_findvar): Likewise.
10942 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10943 (mips_fbsd_collect_reg): Use raw_collect_integer.
10944 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10945 (mips64_fill_gregset): Use raw_collect_integer
10946 (mips64_fill_fpregset): Use raw_supply_integer.
10947 * regcache.c (regcache::raw_supply_integer): New function.
10948 (regcache::raw_collect_integer): Likewise.
10949 * regcache.h: (regcache::raw_supply_integer): New declaration.
10950 (regcache::raw_collect_integer): Likewise.
10951
b77b02a5
YQ
109522017-05-24 Yao Qi <yao.qi@linaro.org>
10953
10954 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10955 (COMMON_OBS): Add gdbarch-selftests.o.
10956 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10957 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10958 * gdbarch-selftests.c: New file.
10959 * regcache.h (regcache) <~regcache>: Mark it virtual if
10960 GDB_SELF_TEST.
10961 <raw_write>: Likewise.
10962
e521e87e
YQ
109632017-05-24 Yao Qi <yao.qi@linaro.org>
10964
10965 * regcache.c (current_regcache): Change it to
10966 regcache::current_regcache.
10967 (regcache_observer_target_changed): Update.
10968 (regcache_thread_ptid_changed): Make it a regcache static
10969 method.
10970 (regcache_thread_ptid_changed): Update.
10971 (class regcache_access): New.
10972 (current_regcache_test): Update.
10973 (_initialize_regcache): Update.
10974 * regcache.h: Include forward_list.
10975 (regcache): Declare regcache_thread_ptid_changed and declare
10976 registers_changed_ptid as friend.
10977
d8e07dda
YQ
109782017-05-24 Yao Qi <yao.qi@linaro.org>
10979
10980 * i387-tdep.c (i387_register_to_value): Use register_size
10981 instead of TYPE_LENGTH.
10982 * m68k-tdep.c (m68k_register_to_value): Likewise.
10983
8c8f9122
YQ
109842017-05-24 Yao Qi <yao.qi@linaro.org>
10985
10986 * i387-tdep.c (i387_convert_register_p): Return false if type
10987 code isn't TYPE_CODE_FLT.
10988
68fce50f
YQ
109892017-05-24 Yao Qi <yao.qi@linaro.org>
10990
10991 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10992 length is 4.
10993 (alpha_register_to_value): Remove type length check.
10994 (alpha_value_to_register): Likewise.
10995
88954b49
YQ
109962017-05-24 Yao Qi <yao.qi@linaro.org>
10997
10998 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10999 TYPE_CODE_FLT.
11000
e3ec9b69
YQ
110012017-05-24 Yao Qi <yao.qi@linaro.org>
11002
11003 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11004 TYPE_CODE_FLT or not.
11005
cdd238da
YQ
110062017-05-24 Yao Qi <yao.qi@linaro.org>
11007
11008 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11009 * avr-tdep.c (avr_gdbarch_init): Likewise.
11010 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11011 * cris-tdep.c (cris_gdbarch_init): Likewise.
11012 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11013 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11014 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11015 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11016 * mep-tdep.c (mep_gdbarch_init): Likewise.
11017 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11018 * mips-tdep.c (mips_gdbarch_init): Likewise.
11019 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11020 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11021 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11022 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11023 * v850-tdep.c (v850_gdbarch_init): Likewise.
11024
7a3929c4
YQ
110252017-05-24 Yao Qi <yao.qi@linaro.org>
11026
11027 * selftest-arch.c (tests_with_arch): Call registers_changed
11028 and reinit_frame_cache.
11029 * selftest.c (run_self_tests): Likewise.
11030
f4985dba
YQ
110312017-05-24 Yao Qi <yao.qi@linaro.org>
11032
11033 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11034 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11035
ab20fa4a
YQ
110362017-05-24 Yao Qi <yao.qi@linaro.org>
11037
11038 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11039 set_gdbarch_print_insn.
11040
f532ab94
YQ
110412017-05-24 Yao Qi <yao.qi@linaro.org>
11042
11043 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11044 set_gdbarch_print_insn.
11045
39503f82
YQ
110462017-05-24 Yao Qi <yao.qi@linaro.org>
11047
11048 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11049 set_gdbarch_print_insn.
11050 * arc-tdep.c (arc_gdbarch_init): Likewise.
11051 * arch-utils.c: include dis-asm.h.
11052 (default_print_insn): New function.
11053 * arch-utils.h (default_print_insn): Declare.
11054 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11055 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11056 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11057 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11058 * frv-tdep.c (frv_gdbarch_init): Likewise.
11059 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11060 * gdbarch.sh (print_insn): Use default_print_insn.
11061 * gdbarch.c: Regenerated.
11062 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11063 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11064 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11065 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11066 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11067 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11068 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11069 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11070 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11071 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11072 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11073 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11074 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11075 * mt-tdep.c (mt_gdbarch_init): Likewise.
11076 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11077 * nios2-tdep.c (nios2_print_insn): Remove.
11078 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11079 * rx-tdep.c (rx_gdbarch_init): Likewise.
11080 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11081 * score-tdep.c (score_print_insn): Remove.
11082 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11083 * sh-tdep.c (sh_gdbarch_init): Likewise.
11084 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11085 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11086 * tic6x-tdep.c (tic6x_print_insn): Remove.
11087 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11088 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11089 * v850-tdep.c (v850_gdbarch_init): Likewise.
11090 * vax-tdep.c (vax_gdbarch_init): Likewise.
11091 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11092 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11093
f7241d4f
JB
110942017-05-23 John Baldwin <jhb@FreeBSD.org>
11095
11096 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11097 (MIPS_FP0_REGNUM): Remove.
11098 (MIPS_FSR_REGNUM): Remove.
11099 (mips_fbsd_supply_fpregs): Use mips_regnum.
11100 (mips_fbsd_supply_gregs): Likewise.
11101 (mips_fbsd_collect_fpregs): Likewise.
11102 (mips_fbsd_collect_gregs): Likewise.
11103
d489d81d
JB
111042017-05-23 John Baldwin <jhb@FreeBSD.org>
11105
11106 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11107 (getpfpregs_supplies): New function.
11108 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11109 getfpregs_supplies.
11110 (mips_fbsd_store_inferior_registers): Likewise.
11111
e11b3cdc
PA
111122017-05-22 Pedro Alves <palves@redhat.com>
11113
11114 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11115 maintainer.
11116
0f068fb5
AH
111172017-05-22 Alan Hayward <alan.hayward@arm.com>
11118
11119 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11120 (store_register): Likewise.
11121 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11122 (get_decimal_float_return_value): Likewise.
11123 (do_ppc_sysv_return_value): Likewise.
11124 (ppc64_sysv_abi_push_integer): Likewise.
11125 (ppc64_sysv_abi_push_freg): Likewise.
11126 (ppc64_sysv_abi_return_value_base): Likewise.
11127 (ppc64_sysv_abi_return_value): Likewise.
11128 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11129 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11130 * rs6000-nat.c: Likewise.
11131 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11132 (rs6000_value_to_register): Likewise.
11133 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11134
e6cf65f2
TT
111352017-05-21 Tom Tromey <tom@tromey.com>
11136
11137 PR rust/21466:
11138 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11139 arrays as "[T]", not "[T; ]".
11140
43cc5389
TT
111412017-05-19 Tom Tromey <tom@tromey.com>
11142
11143 PR rust/21484:
11144 * rust-lang.c (exp_descriptor_rust): New function.
11145 (rust_language_defn): Use it.
11146 * p-lang.c (pascal_language_defn): Update.
11147 * opencl-lang.c (opencl_language_defn): Update.
11148 * objc-lang.c (objc_language_defn): Update.
11149 * m2-lang.c (m2_language_defn): Update.
11150 * language.h (struct language_defn)
11151 <la_watch_location_expression>: New member.
11152 * language.c (unknown_language_defn, auto_language_defn)
11153 (local_language_defn): Update.
11154 * go-lang.c (go_language_defn): Update.
11155 * f-lang.c (f_language_defn): Update.
11156 * d-lang.c (d_language_defn): Update.
11157 * c-lang.h (c_watch_location_expression): Declare.
11158 * c-lang.c (c_watch_location_expression): New function.
11159 (c_language_defn, cplus_language_defn, asm_language_defn)
11160 (minimal_language_defn): Use it.
11161 * breakpoint.c (watch_command_1): Call
11162 la_watch_location_expression.
11163 * ada-lang.c (ada_language_defn): Update.
11164
7a6e7fcc
RO
111652017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11166
6e7e1744
RO
11167 PR tui/21482
11168 * gdb_curses.h (NOMACROS): Define.
11169 (NCURSES_NOMACROS): Define.
11170
111712017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11172
11173 PR tui/21482
7a6e7fcc
RO
11174 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11175 arg to char *.
11176 * tui/tui-wingeneral.c (box_win): Likewise.
11177 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11178 (tui_show_source_line): Likewise.
11179 (tui_show_exec_info_content): Likewise.
11180
1933fd8e
VM
111812017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11182
11183 * sparc-tdep.c (sparc_structure_return_p)
11184 (sparc_arg_on_registers_p): New functions.
11185 (sparc32_store_arguments): Use them.
11186 * sparc64-tdep.c (sparc64_16_byte_align_p)
11187 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11188 Handle TYPE_CODE_ARRAY.
11189
21873064
YQ
111902017-05-17 Yao Qi <yao.qi@linaro.org>
11191
11192 * cli/cli-decode.c (add_alias_cmd): New function.
11193 * command.h (add_alias_cmd): Declare.
11194 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11195 instead call add_alias_cmd.
11196
2b351b19
PA
111972017-05-17 Pedro Alves <palves@redhat.com>
11198
11199 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11200 (nat_makefile_frag): ... this. All references updated.
11201 * configure.ac: Likewise.
11202 * configure.nat: Likewise. Enhance comments.
11203 * configure: Regenerate.
11204
5f2ad7a3
RO
112052017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11206
11207 * procfs.c (procfs_create_inferior): Change prototype to match
11208 definition.
11209
adf3dde5
EZ
112102017-05-13 Eli Zaretskii <eliz@gnu.org>
11211
11212 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11213 C++ compiler warning.
11214
6830f270
TT
112152017-05-12 Tom Tromey <tom@tromey.com>
11216
11217 PR rust/21483:
11218 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11219 recurse, just call value_struct_elt directly.
11220
68f2f2e3
TT
112212017-05-12 Tom Tromey <tom@tromey.com>
11222
11223 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11224 OP_RUST_ARRAY>: Fix.
11225
256afbc2
TT
112262017-05-12 Tom Tromey <tom@tromey.com>
11227
11228 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11229
94bb8dfe
YQ
112302017-05-09 Yao Qi <yao.qi@linaro.org>
11231
11232 * regcache.c: Include <forward_list>.
11233 (struct regcache_list): Remove.
11234 (current_regcache): Update.
11235 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11236 (regcache_thread_ptid_changed): Likewise.
11237 (registers_changed_ptid): Likewise.
11238 (current_regcache_size): Likewise.
11239
8248946c
YQ
112402017-05-09 Yao Qi <yao.qi@linaro.org>
11241
11242 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11243 (current_regcache_size): New function.
11244 (current_regcache_test): New function.
11245 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11246
313c5961
AH
112472017-05-08 Alan Hayward <alan.hayward@arm.com>
11248
11249 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11250 (print_gp_register_row): Use get_frame_register_value.
11251
27bfc1d1
AH
112522017-05-08 Alan Hayward <alan.hayward@arm.com>
11253
11254 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11255 (mips_supply_fpregset): Likewise.
11256 (mips64_supply_gregset): Likewise.
11257
146e6c5c
AH
112582017-05-08 Alan Hayward <alan.hayward@arm.com>
11259
11260 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11261 regcache->raw_supply_zeroed.
11262
e50f25ec
SDJ
112632017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11264
11265 * configure.nat: Rearrange 'case' statements to match
11266 host before cpu.
11267
21ea5acd
SDJ
112682017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11269
11270 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11271 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11272 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11273 "@nat_extra_makefile_frag@".
11274 (Makefile): Remove dependency on "@frags@".
11275 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11276 (data-directory/Makefile): Likewise.
11277 * config/aarch64/linux.mh: Deleted; moved contents to
11278 "gdb/configure.nat".
11279 * config/alpha/alpha-linux.mh: Likewise.
11280 * config/alpha/nbsd.mh: Likewise.
11281 * config/arm/linux.mh: Likewise.
11282 * config/arm/nbsdelf.mh: Likewise.
11283 * config/i386/cygwin.mh: Likewise.
11284 * config/i386/cygwin64.mh: Likewise.
11285 * config/i386/darwin.mh: Likewise.
11286 * config/i386/fbsd.mh: Likewise.
11287 * config/i386/fbsd64.mh: Likewise.
11288 * config/i386/go32.mh: Likewise.
11289 * config/i386/i386gnu.mh: Likewise.
11290 * config/i386/i386sol2.mh: Likewise.
11291 * config/i386/linux.mh: Likewise.
11292 * config/i386/linux64.mh: Likewise.
11293 * config/i386/mingw.mh: Likewise.
11294 * config/i386/mingw64.mh: Likewise.
11295 * config/i386/nbsd64.mh: Likewise.
11296 * config/i386/nbsdelf.mh: Likewise.
11297 * config/i386/nto.mh: Likewise.
11298 * config/i386/obsd.mh: Likewise.
11299 * config/i386/obsd64.mh: Likewise.
11300 * config/i386/sol2-64.mh: Likewise.
11301 * config/ia64/linux.mh: Likewise.
11302 * config/m32r/linux.mh: Likewise.
11303 * config/m68k/linux.mh: Likewise.
11304 * config/m68k/nbsdelf.mh: Likewise.
11305 * config/m68k/obsd.mh: Likewise.
11306 * config/m88k/obsd.mh: Likewise.
11307 * config/mips/fbsd.mh: Likewise.
11308 * config/mips/linux.mh: Likewise.
11309 * config/mips/nbsd.mh: Likewise.
11310 * config/mips/obsd64.mh: Likewise.
11311 * config/pa/linux.mh: Likewise.
11312 * config/pa/nbsd.mh: Likewise.
11313 * config/pa/obsd.mh: Likewise.
11314 * config/powerpc/aix.mh: Likewise.
11315 * config/powerpc/fbsd.mh: Likewise.
11316 * config/powerpc/linux.mh: Likewise.
11317 * config/powerpc/nbsd.mh: Likewise.
11318 * config/powerpc/obsd.mh: Likewise.
11319 * config/powerpc/ppc64-linux.mh: Likewise.
11320 * config/powerpc/spu-linux.mh: Likewise.
11321 * config/s390/linux.mh: Likewise.
11322 * config/sh/nbsd.mh: Likewise.
11323 * config/sparc/fbsd.mh: Likewise.
11324 * config/sparc/linux.mh: Likewise.
11325 * config/sparc/linux64.mh: Likewise.
11326 * config/sparc/nbsd64.mh: Likewise.
11327 * config/sparc/nbsdelf.mh: Likewise.
11328 * config/sparc/obsd64.mh: Likewise.
11329 * config/sparc/sol2.mh: Likewise.
11330 * config/tilegx/linux.mh: Likewise.
11331 * config/vax/nbsdelf.mh: Likewise.
11332 * config/vax/obsd.mh: Likewise.
11333 * config/xtensa/linux.mh: Likewise.
11334 * config/i386/i386gnu.mn: New file, with excerpts from
11335 "config/i386/i386gnu.mh".
11336 * configure: Regenerate.
11337 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11338 *.mh files under "gdb/config".
11339 * configure.nat: New file, with contents from the
11340 "gdb/config/*/*.mh" files.
11341
7ed1acaf
TW
113422017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11343
11344 * btrace.c (btrace_clear): Free insn vector.
11345
e13cb306
PA
113462017-05-05 Pedro Alves <palves@redhat.com>
11347
11348 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11349 * configure: Regenerate.
11350
5ed8105e
PA
113512017-05-04 Pedro Alves <palves@redhat.com>
11352
11353 * Makefile.in (SFILES): Add progspace-and-thread.c.
11354 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11355 (COMMON_OBS): Add progspace-and-thread.o.
11356 * breakpoint.c: Include "progspace-and-thread.h".
11357 (update_inserted_breakpoint_locations)
11358 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11359 Use scoped_restore_current_pspace_and_thread.
11360 (create_std_terminate_master_breakpoint): Use
11361 scoped_restore_current_program_space.
11362 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11363 (print_breakpoint_location): Use
11364 scoped_restore_current_program_space.
11365 (bp_loc_is_permanent): Use
11366 scoped_restore_current_pspace_and_thread.
11367 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11368 (download_tracepoint_locations): Use
11369 scoped_restore_current_pspace_and_thread.
11370 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11371 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11372 (enum step_over_calls_kind): Moved from inferior.h.
11373 (class scoped_restore_current_thread): New class.
11374 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11375 declaration.
11376 (scoped_restore_current_thread): New class.
11377 * infcmd.c: Include "common/gdb_optional.h".
11378 (continue_1, proceed_after_attach): Use
11379 scoped_restore_current_thread.
11380 (notice_new_inferior): Use scoped_restore_current_thread.
11381 * inferior.c: Include "progspace-and-thread.h".
11382 (restore_inferior, save_current_inferior): Delete.
11383 (add_inferior_command, clone_inferior_command): Use
11384 scoped_restore_current_pspace_and_thread.
11385 * inferior.h (scoped_restore_current_inferior): New class.
11386 * infrun.c: Include "progspace-and-thread.h" and
11387 "common/gdb_optional.h".
11388 (follow_fork_inferior): Use
11389 scoped_restore_current_pspace_and_thread.
11390 (scoped_restore_exited_inferior): New class.
11391 (handle_vfork_child_exec_or_exit): Use
11392 scoped_restore_exited_inferior,
11393 scoped_restore_current_pspace_and_thread,
11394 scoped_restore_current_thread and scoped_restore.
11395 (fetch_inferior_event): Use scoped_restore_current_thread.
11396 * linespec.c (decode_line_full, decode_line_1): Use
11397 scoped_restore_current_program_space.
11398 * mi/mi-main.c: Include "progspace-and-thread.h".
11399 (exec_continue): Use scoped_restore_current_thread.
11400 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11401 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11402 * proc-service.c (ps_pglobal_lookup): Use
11403 scoped_restore_current_program_space.
11404 * progspace-and-thread.c: New file.
11405 * progspace-and-thread.h: New file.
11406 * progspace.c (release_program_space, clone_program_space): Use
11407 scoped_restore_current_program_space.
11408 (restore_program_space, save_current_program_space)
11409 (save_current_space_and_thread): Delete.
11410 (switch_to_program_space_and_thread): Moved to
11411 progspace-and-thread.c.
11412 * progspace.h (save_current_program_space)
11413 (save_current_space_and_thread): Delete declarations.
11414 (scoped_restore_current_program_space): New class.
11415 * remote.c (remote_btrace_maybe_reopen): Use
11416 scoped_restore_current_thread.
11417 * symtab.c: Include "progspace-and-thread.h".
11418 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11419 * thread.c (print_thread_info_1): Use
11420 scoped_restore_current_thread.
11421 (struct current_thread_cleanup): Delete.
11422 (do_restore_current_thread_cleanup)
11423 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11424 (scoped_restore_current_thread::~scoped_restore_current_thread):
11425 ... this new dtor.
11426 (make_cleanup_restore_current_thread): Rename/convert to ...
11427 (scoped_restore_current_thread::scoped_restore_current_thread):
11428 ... this new ctor.
11429 (thread_apply_all_command): Use scoped_restore_current_thread.
11430 (thread_apply_command): Use scoped_restore_current_thread.
11431 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11432 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11433
f6223dbb
PA
114342017-05-04 Pedro Alves <palves@redhat.com>
11435
11436 * thread.c (make_cleanup_restore_current_thread): Move
11437 find_thread_ptid call before the is_stopped call. Assert that the
11438 thread is found. Replace is_stopped call by checking the thread's
11439 state directly. Remove unnecessary NULL-thread check.
11440
3c3ae77e
PA
114412017-05-04 Pedro Alves <palves@redhat.com>
11442
11443 * corelow.c (thread_section_name): New class.
11444 (get_core_register_section, get_core_siginfo): Use it.
11445
45eba0ab
AA
114462017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11447
11448 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11449 (get_core_register_section): Remove xfree of NULL pointer.
11450
f81fdd35
AH
114512017-05-03 Alan Hayward <alan.hayward@arm.com>
11452
11453 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11454 * regcache.c (regcache::raw_supply_zeroed): New function.
11455 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11456
35837774
SM
114572017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11458
11459 * gdbarch.sh: Remove commented out definition of
11460 TARGET_CHAR_BIT.
11461 * gdbarch.h: Re-generate.
11462
c94fee56
SDJ
114632017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11464
11465 * configure: Regenerate.
11466
d17f7b36
SM
114672017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11468
11469 * solib-target.c (solib_target_relocate_section_addresses):
11470 Remove num_section_bases, num_bases, segment_bases variables.
11471
b560ebd6
SM
114722017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11473
11474 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11475
f2f46dfc
SM
114762017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11477
11478 * solib-target.c: Include <vector>
11479 (struct lm_info_target) <~lm_info_target>: Remove.
11480 <segment_bases, section_bases>: Change type to
11481 std::vector<CORE_ADDR>.
11482 (library_list_start_segment, library_list_start_section,
11483 library_list_end_library,
11484 solib_target_relocate_section_addresses): Adjust.
11485
a0ff9e1a
SM
114862017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11487
11488 * gdbarch.sh (software_single_step): Change return type to
11489 std::vector<CORE_ADDR>.
11490 * gdbarch.c, gdbarch.h: Re-generate.
11491 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11492 Adjust.
11493 (arm_deal_with_atomic_sequence_raw): Adjust.
11494 (thumb_get_next_pcs_raw): Adjust.
11495 (arm_get_next_pcs_raw): Adjust.
11496 (arm_get_next_pcs): Adjust.
11497 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11498 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11499 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11500 (alpha_software_single_step): Adjust.
11501 * alpha-tdep.h (alpha_software_single_step): Adjust.
11502 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11503 * arm-tdep.c (arm_software_single_step): Adjust.
11504 (arm_breakpoint_kind_from_current_state): Adjust.
11505 * arm-tdep.h (arm_software_single_step): Adjust.
11506 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11507 * cris-tdep.c (cris_software_single_step): Adjust.
11508 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11509 (micromips_deal_with_atomic_sequence): Adjust.
11510 (deal_with_atomic_sequence): Adjust.
11511 (mips_software_single_step): Adjust.
11512 * mips-tdep.h (mips_software_single_step): Adjust.
11513 * moxie-tdep.c (moxie_software_single_step): Adjust.
11514 * nios2-tdep.c (nios2_software_single_step): Adjust.
11515 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11516 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11517 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11518 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11519 * sparc-tdep.c (sparc_software_single_step): Adjust.
11520 * spu-tdep.c (spu_software_single_step): Adjust.
11521 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11522
ea480a30
SM
115232017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11524
11525 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11526 * gdbarch.h: Re-generate.
11527
d050f7d7
TW
115282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11529
11530 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11531 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11532 * python/py-instruction.c, python/py-instruction.h: New file.
11533 * python/py-record.c: Add py-instruction.h include.
11534 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11535 gdb.RecordInstruction.
11536 * python/python-internal.h: Add gdbpy_initialize_instruction
11537 declaration.
11538 * python/python.c (do_start_initialization): Add
11539 gdbpy_initialize_instruction.
11540
14f819c8
TW
115412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11542
11543 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11544 Remove.
11545 (btrace_func_from_recpy_func): New function.
11546 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11547 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11548 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11549 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11550 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11551 Also, use new helper functions.
11552 (btpy_list_item): Use new helper functions.
11553 (recpy_bt_function_call_history): Use new type name.
11554 (btpy_call_getset): Remove.
11555 (gdbpy_initialize_btrace): Remove code to initialize
11556 gdb.BtraceFunctionCall.
11557 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11558 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11559 recpy_bt_func_prev, recpy_bt_func_next): New export.
11560 * python/py-record.c (recpy_func_type): New static object.
11561 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11562 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11563 recpy_func_next): New function.
11564 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11565 (recpy_func_getset): New static object.
11566 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11567 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11568
0ed5da75
TW
115692017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11570
11571 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11572 (btpy_object, btpy_insn_type, btpy_new): Remove.
11573 (btpy_list_object): Use gdb.RecordInstruction type instead of
11574 gdb.BtraceInstruction type.
11575 (btrace_insn_from_recpy_insn): New function.
11576 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11577 btpy_new.
11578 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11579 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11580 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11581 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11582 instead of btpy_object.
11583 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11584 btpy_insn_data, btpy_insn_decode): Rename to ...
11585 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11586 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11587 recpy_bt_insn_decode): This. Also, use new helper functions.
11588 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11589 recpy_insn_type.
11590 (btpy_insn_getset): Remove.
11591 (gdbpy_initialize_btrace): Remove code to initialize
11592 gdb.BtraceInstruction. Use recpy_element_object.
11593 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11594 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11595 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11596 * python/py-record.c (recpy_insn_type): New static object.
11597 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11598 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11599 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11600 New function.
11601 (recpy_insn_getset): New static object.
11602 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11603 * python/py-record.h (recpy_element_object): New typedef.
11604 (recpy_insn_type, recpy_insn_new): New export.
11605
913aeadd
TW
116062017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11607
11608 * py-record-btrace.c (btpy_insn_new): Removed.
11609 (btpy_insn_or_gap_new): New function.
11610 (btpy_insn_error): Removed.
11611 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11612 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11613 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11614 btpy_insn_or_gap_new instead of btpy_insn_new.
11615 (btpy_insn_getset): Remove btpy_insn_error.
11616 * py-record.c (recpy_gap_type): New static object.
11617 (recpy_gap_object): New typedef.
11618 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11619 recpy_gap_reason_string): New function.
11620 (recpy_gap_getset): New static object.
11621 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11622 * py-record.h (recpy_gap_new): New export.
11623
a3be24ad
TW
116242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11625
11626 * python/py-record.c (recpy_ptid): Remove.
11627 (recpy_record_getset): Remove recpy_ptid.
11628
ae20e79a
TW
116292017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11630
11631 * btrace.c (btrace_fetch): Set inferior_ptid.
11632 * python/py-record-btrace.c: Add "py-record.h" include.
11633 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11634 recpy_bt_end, recpy_bt_instruction_history,
11635 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11636 in gdb.Record object instead of current ptid.
11637 * python/py-record.c: Include new "py-record.h" file.
11638 (recpy_record_object): Moved to py-record.h.
11639 * python/py-record.h: New file.
11640
8d0050ea
TW
116412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11642
11643 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11644 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11645 indentation.
11646
3f380b50
JB
116472017-05-01 Joel Brobecker <brobecker@adacore.com>
11648
11649 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11650 the past maintainers section.
11651
07495424
YQ
116522017-04-28 Yao Qi <yao.qi@linaro.org>
11653
11654 * infcmd.c (get_return_value): Use regcache ctor, and remove
11655 cleanup.
11656
deb1fa3e
YQ
116572017-04-28 Yao Qi <yao.qi@linaro.org>
11658 Pedro Alves <palves@redhat.com>
11659
11660 * regcache.c (regcache::regcache): New tag dispatch ctor.
11661 (do_cooked_read): Moved above.
11662 (regcache_dup): Use the tag dispatch ctor..
11663 * regcache.h (regcache): Declare ctor, delete copy ctor and
11664 assignment operator, remove friend regcache_dup.
11665
b421c83c
YQ
116662017-04-28 Yao Qi <yao.qi@linaro.org>
11667
11668 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11669 call method save instead of regcache_cpy.
11670 * regcache.h (struct regcache): Make regcache_dup a friend.
11671
ef79d9a3
YQ
116722017-04-28 Yao Qi <yao.qi@linaro.org>
11673
11674 * regcache.c (struct regcache): Move to regcache.h
11675 (regcache::arch): New method.
11676 (regcache_get_ptid): Update.
11677 (get_regcache_arch): Call arch method.
11678 (get_regcache_aspace): Call method aspace.
11679 (register_buffer): Change it to method.
11680 (regcache_save): Change it to regcache::save.
11681 (regcache_restore): Likewise.
11682 (regcache_cpy_no_passthrough): Remove the declaration.
11683 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11684 (regcache_cpy_no_passthrough): Change it to method
11685 cpy_no_passthrough.
11686 (regcache_register_status): Change it to method
11687 get_register_status.
11688 (regcache_invalidate): Change it to method invalidate.
11689 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11690 (regcache_raw_update): Change it to method raw_update.
11691 (regcache_raw_read): Likewise.
11692 (regcache_raw_read_signed): Likewise.
11693 (regcache_raw_read_unsigned): Likewise.
11694 (regcache_raw_write_signed): Likewise.
11695 (regcache_raw_write_unsigned): Likewise.
11696 (regcache_cooked_read): Likewise.
11697 (regcache_cooked_read_value): Likewise.
11698 (regcache_cooked_read_signed): Likewise.
11699 (regcache_cooked_read_unsigned): Likewise.
11700 (regcache_cooked_write_signed): Likewise.
11701 (regcache_cooked_write_unsigned): Likewise.
11702 (regcache_raw_set_cached_value): Likewise.
11703 (regcache_raw_write): Likewise.
11704 (regcache_cooked_write): Likewise.
11705 (regcache_xfer_part): Likewise.
11706 (regcache_raw_read_part): Likewise.
11707 (regcache_raw_write_part): Likewise.
11708 (regcache_cooked_read_part): Likewise.
11709 (regcache_cooked_write_part): Likewise.
11710 (regcache_raw_supply): Likewise.
11711 (regcache_raw_collect): Likewise.
11712 (regcache_transfer_regset): Likewise.
11713 (regcache_supply_regset): Likewise.
11714 (regcache_collect_regset): Likewise.
11715 (regcache_debug_print_register): Likewise.
11716 (enum regcache_dump_what): Move it to regcache.h.
11717 (regcache_dump): Change it to method dump.
11718 * regcache.h (enum regcache_dump_what): New.
11719 (class regcache): New.
11720 * target.c (target_fetch_registers): Call method
11721 debug_print_register.
11722 (target_store_registers): Likewise.
11723
f8fdb78e
SM
117242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11725
11726 * windows-nat.c (struct lm_info_windows): Initialize field.
11727 (windows_make_so): Allocate lm_info_windows with new.
11728 (windows_free_so): Free lm_info_windows with delete.
11729
9ccbfd7b
SM
117302017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11731
11732 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11733 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11734 cleanup.
11735 (darwin_free_so): Free lm_info_darwin with delete.
11736
76e75227
SM
117372017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11738
11739 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11740 <l_addr_p>: Change type to bool.
11741 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11742 (svr4_free_so): Free lm_info_svr4 with delete.
11743 (svr4_copy_library_list): Replace memcpy with call to copy
11744 constructor.
11745 (library_list_start_library, svr4_default_sos): Allocate
11746 lm_info_svr4 with new.
11747
51046d9e
SM
117482017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11749
11750 * solib-target.c (struct lm_info_target): Add destructor,
11751 initialize fields.
11752 <name>: Change type to std::string.
11753 (library_list_start_library): Allocate lm_info_target with new.
11754 (solib_target_free_library_list): Free lm_info_target with
11755 delete.
11756 (solib_target_current_sos): Adapt to std::string.
11757 (solib_target_free_so): Free lm_info_target with delete.
11758
4023ae76
SM
117592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11760
11761 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11762 fields.
11763 (frv_current_sos): Allocate lm_info_frv with new.
11764 (frv_relocate_main_executable): Free lm_info_frv with delete,
11765 allocate with new.
11766 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11767
af43057b
SM
117682017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11769
11770 * solib-frv.c (struct lm_info_frv): Fix indentation.
11771
b0911207
SM
117722017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11773
11774 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11775 map field.
11776 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11777 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11778 and allocate with new.
11779 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11780
6c401f72
SM
117812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11782
11783 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11784 <filename, member_name>: Change type to std::string.
11785 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11786 (library_list_start_library): Allocate lm_info_aix with new.
11787 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11788 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11789 with copy constructor.
11790
d0e449a1
SM
117912017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11792
11793 * solist.h (struct lm_info): Remove.
11794 (struct lm_info_base): New class.
11795 (struct so_list) <lm_info>: Change type to lm_info_base *.
11796 * nto-tdep.c (struct lm_info): Remove.
11797 (lm_addr): Adjust.
11798 * solib-aix.c (struct lm_info): Rename to ...
11799 (struct lm_info_aix): ... this. Extend lm_info_base.
11800 (lm_info_p): Rename to ...
11801 (lm_info_aix_p): ... this, and adjust.
11802 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11803 solib_aix_parse_libraries, library_list_start_library,
11804 solib_aix_free_library_list, solib_aix_parse_libraries,
11805 solib_aix_get_library_list,
11806 solib_aix_relocate_section_addresses, solib_aix_free_so,
11807 solib_aix_get_section_offsets,
11808 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11809 Adjust.
11810 (struct solib_aix_inferior_data) <library_list>: Adjust.
11811 * solib-darwin.c (struct lm_info): Rename to ...
11812 (struct lm_info_darwin): ... this. Extend lm_info_base.
11813 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11814 * solib-dsbt.c (struct lm_info): Rename to ...
11815 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11816 (struct dsbt_info) <main_executable_lm_info): Adjust.
11817 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11818 dsbt_relocate_section_addresses): Adjust.
11819 * solib-frv.c (struct lm_info): Rename to ...
11820 (struct lm_info_frv): ... this. Extend lm_info_base.
11821 (main_executable_lm_info): Adjust.
11822 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11823 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11824 find_canonical_descriptor_in_load_object,
11825 frv_fdpic_find_canonical_descriptor): Adjust.
11826 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11827 to lm_info_svr4.
11828 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11829 svr4_clear_so, svr4_copy_library_list,
11830 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11831 svr4_current_sos, svr4_fetch_objfile_link_map,
11832 solist_update_incremental): Adjust.
11833 * solib-svr4.h (struct lm_info_svr4): Move here from
11834 solib-svr4.c.
11835 * solib-target.c (struct lm_info): Rename to ...
11836 (struct lm_info_target): ... this. Extend lm_info_base.
11837 (lm_info_p): Rename to ...
11838 (lm_info_target_p): ... this.
11839 (solib_target_parse_libraries, library_list_start_segment,
11840 library_list_start_section, library_list_start_library,
11841 library_list_end_library, solib_target_free_library_list,
11842 solib_target_current_sos, solib_target_free_so,
11843 solib_target_relocate_section_addresses): Adjust.
11844 * windows-nat.c (struct lm_info): Rename to ...
11845 (struct lm_info_windows): ... this. Extend lm_info_base.
11846 (windows_make_so, handle_load_dll, handle_unload_dll,
11847 windows_xfer_shared_libraries): Adjust.
11848
434a4023
SM
118492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11850
11851 * solib-darwin.c (struct darwin_so_list): Remove.
11852 (darwin_current_sos): Allocate an so_list object instead of a
11853 darwin_so_list, separately allocate an lm_info object.
11854 (darwin_free_so): Free lm_info.
11855
428544e8
JB
118562017-04-28 John Baldwin <jhb@FreeBSD.org>
11857
11858 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11859 with fprintf_filtered.
11860
4621115f
YQ
118612017-04-28 Yao Qi <yao.qi@linaro.org>
11862
11863 * regcache.c (regcache::regcache): New function.
11864 (regcache::~regcache): New function.
11865 (regcache_xmalloc_1): Remove.
11866 (regcache_xmalloc): Call new regcache.
11867 (regcache_xfree): Call delete regcache.
11868 (get_thread_arch_aspace_regcache): Call new regcache.
11869
339053c2
YQ
118702017-04-28 Yao Qi <yao.qi@linaro.org>
11871
11872 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11873 lwp instead of ptid_get_lwp.
11874
7974a605
YQ
118752017-04-28 Yao Qi <yao.qi@linaro.org>
11876
11877 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11878 lwp_info instead of getting from inferior_ptid.
11879
e15c3eb4
KS
118802017-04-27 Keith Seitz <keiths@redhat.com>
11881
11882 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11883 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11884 (CV_CONVERSION_BADNESS): Define.
11885 (rank_one_type): Remove overly restrictive rvalue reference
11886 rank checks.
11887 Add cv-qualifier checks and subranks for type equality.
11888 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11889 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11890 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11891
72bc1d24
SM
118922017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11893
11894 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11895 count when creating the object.
11896
55bcecda
UW
118972017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11898 Ulrich Weigand <uweigand@de.ibm.com>
11899
11900 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11901 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11902 is used in AIX.
11903 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11904 (process_xcoff_symbol): Likewise.
11905 (scan_xcoff_symtab): Likewise.
11906
5c99fcf8
AH
119072017-04-26 Alan Hayward <alan.hayward@arm.com>
11908
11909 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11910 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11911 (ia64_access_reg): Use get_frame_register_unsigned.
11912 (ia64_access_rse_reg): Likewise.
11913 (ia64_libunwind_frame_prev_register): Likewise.
11914
b41c5a85
JW
119152017-04-26 Jiong Wang <jiong.wang@arm.com>
11916
11917 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11918 * gdbarch.c: Regenerated.
11919 * gdbarch.h: Regenerated.
11920 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11921 visibility external.
11922 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11923 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11924 (enum cfa_how_kind): Move to ...
11925 (struct dwarf2_frame_state_reg_info): Likewise.
11926 (struct dwarf2_frame_state): Likewise.
11927 * dwarf2-frame.h: ... here.
11928 (dwarf2_frame_state_alloc_regs): New declaration.
11929 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11930 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11931
c185f580
AH
119322017-04-26 Alan Hayward <alan.hayward@arm.com>
11933
11934 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11935 regcache_raw_read_unsigned.
11936 (xtensa_pseudo_register_write): Likewise.
11937
19c45594
AH
119382017-04-26 Alan Hayward <alan.hayward@arm.com>
11939
11940 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11941 (nds32_pseudo_register_write): Likewise.
11942
4658f12e
YQ
119432017-04-25 Yao Qi <yao.qi@linaro.org>
11944
11945 * regcache.c (struct regcache) <readonly_p>: Change its type
11946 to bool.
11947 (regcache_xmalloc_1): Update parameter type and callers update.
11948
d581dda8
YQ
119492017-04-25 Yao Qi <yao.qi@linaro.org>
11950
11951 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11952 set_gdbarch_wchar_bit.
11953 * arm-tdep.c (arm_gdbarch_init): Likewise.
11954
debed3db
PA
119552017-04-25 Pedro Alves <palves@redhat.com>
11956
11957 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11958 (BothAreRelocatable, memcopy, memmove): Don't define.
11959 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11960 macros.
11961
b0b92aeb
PA
119622017-04-25 Pedro Alves <palves@redhat.com>
11963
11964 * common/common-defs.h: Include "common/poison.h".
11965 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11966 and adjust.
11967 * common/poison.h: New file.
11968 * common/traits.h: Include <type_traits>.
11969 (Not, Or, Requires): New, moved from common/function-view.h.
11970
16c4d54a
PA
119712017-04-25 Pedro Alves <palves@redhat.com>
11972
11973 * breakpoint.h (struct breakpoint): In-class initialize all
11974 fields. Make boolean fields "bool".
11975 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11976 memset call and initializations no longer necessary.
11977
b5c36682
PA
119782017-04-25 Pedro Alves <palves@redhat.com>
11979
11980 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11981 reference.
11982 (pt_btrace_insn): New function.
11983 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11984
5625a286
PA
119852017-04-25 Pedro Alves <palves@redhat.com>
11986
11987 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11988 "base" field and inherit from "bp_location" instead. Add
11989 non-default ctor.
11990 (allocate_location_exception): Use new non-default ctor.
11991 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11992 (init_bp_location): Convert to ...
11993 (bp_location::bp_location): ... this new ctor, and remove memset
11994 call.
11995 (base_breakpoint_allocate_location): Use the new non-default ctor.
11996 * breakpoint.h (bp_location): Now a class. Declare default and
11997 non-default ctors. In-class initialize all members.
11998 (init_bp_location): Remove declaration.
11999
23bcc18f
PA
120002017-04-25 Pedro Alves <palves@redhat.com>
12001
12002 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12003 assignment operator.
12004
e1ba3053
YQ
120052017-04-24 Yao Qi <yao.qi@linaro.org>
12006
12007 * doublest.c (convert_doublest_to_floatformat): Call
12008 floatformat_totalsize_bytes.
12009
10f489e5
TT
120102017-04-22 Tom Tromey <tom@tromey.com>
12011
12012 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12013 ui_out_emit_list.
12014 * stack.c (print_frame): Use ui_out_emit_list.
12015 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12016 ui_out_emit_list.
12017 * mi/mi-main.c (print_one_inferior)
12018 (mi_cmd_data_list_register_names)
12019 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12020 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12021 ui_out_emit_list.
12022 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12023 (mi_output_solib_attribs): Use ui_out_emit_list,
12024 ui_out_emit_tuple.
12025 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12026 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12027 (mi_cmd_stack_list_args, list_args_or_locals): Use
12028 ui_out_emit_list.
12029 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12030 * breakpoint.c (print_solib_event, output_thread_groups): Use
12031 ui_out_emit_list.
12032
0092b74d
TT
120332017-04-22 Tom Tromey <tom@tromey.com>
12034
12035 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12036 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12037 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12038
a14a62dd
TT
120392017-04-22 Tom Tromey <tom@tromey.com>
12040
12041 * tracepoint.c (tvariables_info_1)
12042 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12043
46b9c129
TT
120442017-04-22 Tom Tromey <tom@tromey.com>
12045
12046 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12047 annotate_arg_emitter.
12048 * breakpoint.c (print_mention_watchpoint)
12049 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12050 * annotate.h (struct annotate_arg_emitter): New.
12051
2e783024
TT
120522017-04-22 Tom Tromey <tom@tromey.com>
12053
12054 * record-btrace.c (record_btrace_insn_history)
12055 (record_btrace_insn_history_range, record_btrace_call_history)
12056 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12057 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12058 ui_out_emit_tuple.
12059 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12060 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12061 * skip.c (skip_info): Use ui_out_emit_tuple.
12062 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12063 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12064 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12065 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12066 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12067 ui_out_emit_tuple.
12068 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12069 (output_register, mi_cmd_data_read_memory)
12070 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12071 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12072 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12073 Use ui_out_emit_tuple.
12074 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12075 ui_out_emit_tuple.
12076 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12077 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12078 * linux-thread-db.c (info_auto_load_libthread_db): Use
12079 ui_out_emit_tuple.
12080 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12081 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12082 * disasm.c (do_mixed_source_and_assembly_deprecated)
12083 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12084 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12085 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12086 * breakpoint.c (print_one_breakpoint_location)
12087 (print_one_breakpoint): Use ui_out_emit_tuple.
12088 * auto-load.c (print_script, info_auto_load_cmd): Use
12089 ui_out_emit_tuple.
12090 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12091
9be21bb4
SM
120922017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12093
12094 * thread.c (print_thread_info_1): Remove dead code.
12095
0d4c07af
JK
120962017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12097
12098 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12099 GDB_SELF_TEST.
12100 * arm-tdep.c (selftests::arm_record_test): Likewise.
12101
4daf993d
YQ
121022017-04-21 Yao Qi <yao.qi@linaro.org>
12103
12104 * regcache.c (regcache_restore): Remove argument 2. Replace
12105 argument 3 with regcache. Get register status from
12106 src->register_status and get register contents from
12107 register_buffer (src, regnum).
12108 (regcache_cpy): Update.
12109
a6c21d4a
PA
121102017-04-19 Pedro Alves <palves@redhat.com>
12111
12112 * gdbthread.h (thread): Add missing closing parenthesis in
12113 comment.
12114
3a3fd0fd
PA
121152017-04-19 Pedro Alves <palves@redhat.com>
12116
12117 * common/refcounted-object.h: New file.
12118 * gdbthread.h: Include "common/refcounted-object.h".
12119 (thread_info): Inherit from refcounted_object and add comments.
12120 (thread_info::incref, thread_info::decref)
12121 (thread_info::m_refcount): Delete.
12122 (thread_info::deletable): Use the refcounted_object::refcount()
12123 method.
12124 * inferior.c (current_inferior_): Add comment.
12125 (set_current_inferior): Increment/decrement refcounts.
12126 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12127 not-deletable instead of comparing with the current inferior.
12128 (initialize_inferiors): Increment the initial inferior's refcount.
12129 * inferior.h (struct inferior): Forward declare.
12130 Include "common/refcounted-object.h".
12131 (current_inferior, set_current_inferior): Move declaration to
12132 before struct inferior's definition, and fix comment.
12133 (inferior): Inherit from refcounted_object. Add comments.
12134 * thread.c (switch_to_thread_no_regs): Reference the thread's
12135 inferior pointer directly instead of doing a ptid lookup.
12136 (switch_to_no_thread): New function.
12137 (switch_to_thread(thread_info *)): New function, factored out
12138 from ...
12139 (switch_to_thread(ptid_t)): ... this.
12140 (restore_current_thread): Delete.
12141 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12142 fields, and add 'inf' field.
12143 (do_restore_current_thread_cleanup): Check whether old->inf is
12144 alive instead of looking up an inferior by ptid. Use
12145 switch_to_thread and switch_to_no_thread.
12146 (restore_current_thread_cleanup_dtor): Use old->inf directly
12147 instead of lookup up an inferior by id. Decref the inferior.
12148 Don't restore 'removable'.
12149 (make_cleanup_restore_current_thread): Same the inferior pointer
12150 in old, instead of the inferior number. Incref the inferior.
12151 Don't save/clear 'removable'.
12152
9bcb1f16
PA
121532017-04-19 Pedro Alves <palves@redhat.com>
12154
12155 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12156 unittests/scoped_restore-selftests.c.
12157 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12158 * common/scoped_restore.h (scoped_restore_base): Make "class".
12159 (scoped_restore_base::release): New public method.
12160 (scoped_restore_base::scoped_restore_base): New protected ctor.
12161 (scoped_restore_base::m_saved_var): New protected field.
12162 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12163 scoped_restore_base base class instead of m_saved_var directly.
12164 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12165 (scoped_restore_tmpl::scoped_restore_tmpl(const
12166 scoped_restore_tmpl<T>&)): Likewise.
12167 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12168 method.
12169 (scoped_restore_tmpl::saved_var): New method.
12170 (scoped_restore_tmpl::m_saved_var): Delete.
12171 * inferior.h (inferior::detaching): Now a bool.
12172 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12173 cleanup.
12174 * unittests/scoped_restore-selftests.c: New file.
12175
26fcd539
PA
121762017-04-19 Pedro Alves <palves@redhat.com>
12177
12178 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12179 Re-sort in alphabetic order.
12180
fdd243b0
PA
121812017-04-18 Pedro Alves <palves@redhat.com>
12182
12183 * xml-support.c (obstack_xml_printf): Delete.
12184 * xml-support.h (obstack_xml_printf): Delete.
12185
4895cde2
PA
121862017-04-18 Pedro Alves <palves@redhat.com>
12187
12188 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12189 vdebug, verror, body_text, start_element, end_element, name,
12190 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12191 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12192 is_xinclude>: Make private and add m_ prefix.
12193 (gdb_xml_parser::body_text): New method, based on ...
12194 (gdb_xml_body_text): ... this. Adjust.
12195 (gdb_xml_parser::vdebug): New method, based on ...
12196 (gdb_xml_debug): ... this. Adjust.
12197 (gdb_xml_parser::verror): New method, based on ...
12198 (gdb_xml_error): ... this. Adjust.
12199 (gdb_xml_parser::start_element): New method, based on ...
12200 (gdb_xml_start_element): ... this. Adjust.
12201 (gdb_xml_start_element_wrapper): Defer to
12202 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12203 (gdb_xml_parser::end_element): New method, based on ...
12204 (gdb_xml_end_element_wrapper): ... this. Adjust.
12205 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12206 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12207 (gdb_xml_parser::use_dtd): New method, based on ...
12208 (gdb_xml_use_dtd): ... this. Adjust.
12209 (gdb_xml_parser::parse): New method, based on ...
12210 (gdb_xml_parse): ... this. Adjust.
12211 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12212 (xinclude_start_include): Adjust to call the parser's name method.
12213 (xml_xinclude_default, xml_xinclude_start_doctype)
12214 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12215 method.
12216 (xml_process_xincludes): Adjust to call parser methods.
12217 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12218 declarations.
12219
bd8a901f
PA
122202017-04-18 Pedro Alves <palves@redhat.com>
12221
12222 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12223 gdb::optional<std::string>.
12224 * xml-support.c: Include <string>.
12225 (scope_level::scope_level(scope_level &&))
12226 (scope_level::~scope_level): Delete.
12227 (scope_level::body): Now a std::string.
12228 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12229 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12230 parameter.
12231 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12232 (xinclude_parsing_data::output): Now a std::string reference.
12233 (xinclude_start_include): Adjust.
12234 (xml_xinclude_default): Adjust.
12235 (xml_process_xincludes): Add 'output' parameter, and return bool.
12236 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12237 and return bool.
12238 * xml-tdesc.c: Include <unordered_map> and <string>.
12239 (tdesc_xml_cache): Delete.
12240 (tdesc_xml_cache_s): Delete.
12241 (xml_cache): Now an std::unordered_map.
12242 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12243 (target_fetch_description_xml): Change return type to
12244 gdb::optional<std::string>, and adjust.
12245 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12246 (target_fetch_description_xml): Change return type to
12247 gdb::optional<std::string>.
12248
d35d1958
PA
122492017-04-18 Pedro Alves <palves@redhat.com>
12250
12251 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12252 unittests/optional-selftests.c.
12253 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12254 * unittests/optional-selftests.c: New file.
12255 * unittests/optional/assignment/1.cc: New file.
12256 * unittests/optional/assignment/2.cc: New file.
12257 * unittests/optional/assignment/3.cc: New file.
12258 * unittests/optional/assignment/4.cc: New file.
12259 * unittests/optional/assignment/5.cc: New file.
12260 * unittests/optional/assignment/6.cc: New file.
12261 * unittests/optional/assignment/7.cc: New file.
12262 * unittests/optional/cons/copy.cc: New file.
12263 * unittests/optional/cons/default.cc: New file.
12264 * unittests/optional/cons/move.cc: New file.
12265 * unittests/optional/cons/value.cc: New file.
12266 * unittests/optional/in_place.cc: New file.
12267 * unittests/optional/observers/1.cc: New file.
12268 * unittests/optional/observers/2.cc: New file.
12269
22796e97
PA
122702017-04-18 Pedro Alves <palves@redhat.com>
12271
12272 * common/gdb_optional.h: Include common/traits.h.
12273 (in_place_t): New type.
12274 (in_place): New constexpr variable.
12275 (optional::optional): Remove member initialization of
12276 m_instantiated.
12277 (optional::optional(in_place_t...)): New constructor.
12278 (optional::~optional): Use reset.
12279 (optional::optional(const optional&)): New.
12280 (optional::optional(const optional&&)): New.
12281 (optional::optional(T &)): New.
12282 (optional::optional(T &&)): New.
12283 (operator::operator=(const optional &)): New.
12284 (operator::operator=(optional &&)): New.
12285 (operator::operator= (const T &))
12286 (operator::operator= (T &&))
12287 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12288 (operator::reset): New.
12289 (operator::m_instantiated):: Add in-class initializer.
12290 * common/traits.h: Include <type_traits>.
12291 (struct And): New types.
12292
a7fc9b61
PA
122932017-04-18 Pedro Alves <palves@redhat.com>
12294
12295 * xml-support.c: Include <vector>.
12296 (scope_level::scope_level(const gdb_xml_element *))
12297 (scope_level::scope_level(scope_level&&)): New.
12298 (scope_level::~scope_level): New.
12299 (scope_level_s): Delete.
12300 (gdb_xml_parser::scopes): Now a std::vector.
12301 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12302 Use std::vector.
12303 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12304 scope cleanup code.
12305 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12306 of the scopes member. Use std::vector::emplace_back.
12307
010151c9
PA
123082017-04-18 Pedro Alves <palves@redhat.com>
12309
12310 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12311 a bool.
12312 (gdb_xml_end_element): Change type of first parameter.
12313 (gdb_xml_cleanup): Rename to ...
12314 (gdb_xml_parser::~gdb_xml_parser): ... this.
12315 (gdb_xml_create_parser_and_cleanup): Delete with ...
12316 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12317 to this new ctor.
12318 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12319 using gdb_xml_create_parser_and_cleanup.
12320 (xinclude_parsing_data): Add ctor/dtor.
12321 (xml_xinclude_cleanup): Delete.
12322 (xml_process_xincludes): Create a local xinclude_parsing_data
12323 instead of heap-allocating one. Create a local gdb_xml_parser
12324 instead of heap-allocating one with
12325 gdb_xml_create_parser_and_cleanup.
12326
d56060f0
JB
123272017-04-18 John Baldwin <jhb@FreeBSD.org>
12328
12329 PR threads/20743
12330 * fbsd-nat.c (resume_one_thread_cb): Remove.
12331 (resume_all_threads_cb): Remove.
12332 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12333 iterate_over_threads.
12334
305d16a9
JB
123352017-04-17 Joel Brobecker <brobecker@adacore.com>
12336
12337 * NEWS: Create a new section for the next release branch.
12338 Rename the section of the current branch, now that it has
12339 been cut.
12340
8bb57231
JB
123412017-04-17 Joel Brobecker <brobecker@adacore.com>
12342
12343 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12344 * version.in: Bump version to 8.0.50.DATE-git.
12345
096c92dd
SDJ
123462017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12347
12348 PR gdb/21385
12349 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12350 independently of the host, and fix build breakage on Cygwin.
12351
0550c955
PA
123522017-04-13 Pedro Alves <palves@redhat.com>
12353
12354 * inferior.c (free_inferior): Convert to ...
12355 (inferior::~inferior): ... this dtor.
12356 (inferior::inferior): New ctor, factored out from ...
12357 (add_inferior_silent): ... here. Allocate the inferior with a new
12358 expression.
12359 (delete_inferior): Call delete instead of free_inferior.
12360 * inferior.h (gdb_environ, continuation): Forward declare.
12361 (inferior): Now a class. Add in-class initialization to all
12362 members. Make boolean fields bool, except 'detaching'.
12363 (inferior::inferior): New explicit ctor.
12364 (inferior::~inferior): New.
12365
e3d60dfc
PA
123662017-04-13 Pedro Alves <palves@redhat.com>
12367
12368 * inferior.c (init_inferior_list): Delete.
12369 * inferior.h (init_inferior_list): Delete.
12370
5fd69d0a
PA
123712017-04-13 Pedro Alves <palves@redhat.com>
12372
12373 PR threads/13217
12374 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12375 (top level): Call it twice, with different thread sets.
12376
c6609450
PA
123772017-04-13 Pedro Alves <palves@redhat.com>
12378
12379 * thread.c: Include <algorithm>.
12380 (thread_array_cleanup): Delete.
12381 (scoped_inc_dec_ref): New class.
12382 (live_threads_count): New function.
12383 (set_thread_refcount): Delete.
12384 (tp_array_compar_ascending): Now a bool.
12385 (tp_array_compar): Convert to a std::sort comparison function.
12386 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12387 and live_threads_count.
12388
2a00d7ce
PA
123892017-04-13 Pedro Alves <palves@redhat.com>
12390
12391 * infrun.c (follow_fork_inferior): Also switch the current
12392 inferior.
12393
441d7c93
PA
123942017-04-13 Pedro Alves <palves@redhat.com>
12395
12396 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12397 before calling create_internal_breakpoint.
12398
808480f6
PA
123992017-04-13 Pedro Alves <palves@redhat.com>
12400
12401 * fork-child.c (execv_argv): New class.
12402 (breakup_args): Refactored as ...
12403 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12404 Copy arguments to storage and replace separators with NULL
12405 terminators in place.
12406 (escape_bang_in_quoted_argument): Adjust to return bool.
12407 (execv_argv::execv_argv): New ctor.
12408 (execv_argv::init_for_shell): New method, factored out from
12409 fork_inferior. Don't strdup strings into the vector.
12410 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12411 Remove free_vector_argv call.
12412
ad3d022a
YQ
124132017-04-13 Yao Qi <yao.qi@linaro.org>
12414
12415 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12416 tdep->rx_psw_type.
12417
e6ddc3bf
YQ
124182017-04-13 Yao Qi <yao.qi@linaro.org>
12419
12420 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12421 * rx-tdep.c (rx_gdbarch_init): Likewise.
12422
bfb8cf90
PA
124232017-04-13 Pedro Alves <palves@redhat.com>
12424
12425 * breakpoint.h (struct breakpoint): Reindent.
12426
f5336ca5
PA
124272017-04-13 Pedro Alves <palves@redhat.com>
12428
12429 * breakpoint.c (bp_location): Rename to ...
12430 (bp_locations): ... this. All references updated.
12431 (bp_location_count): Rename to ...
12432 (bp_locations_count): ... this. All references updated.
12433 (bp_location_placed_address_before_address_max): Rename to ...
12434 (bp_locations_placed_address_before_address_max): ... this. All
12435 references updated.
12436 (bp_location_shadow_len_after_address_max): Rename to ...
12437 (bp_locations_shadow_len_after_address_max): ... this. All
12438 references updated.
12439 (bp_location_compare_addrs): Rename to ...
12440 (bp_locations_compare_addrs): ... this. All references updated.
12441 (bp_location_compare):Rename to ...
12442 (bp_locations_compare): ... this. All references updated.
12443 (bp_location_target_extensions_update): Rename to ...
12444 (bp_locations_target_extensions_update): ... this. All references
12445 updated.
12446
be628ab8
SDJ
124472017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12448
12449 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12450 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12451 'sgtty.h'.
12452 * common/gdb_termios.h: New file, with parts of "terminal.h".
12453 * inflow.c: Include "gdb_termios.h".
12454 * ser-unix.c: Include "gdb_termios.h".
12455 * terminal.h: Move terminal-related defines to
12456 "common/gdb_termios.h".
12457
8e9e35b1
TT
124582017-04-12 Tom Tromey <tom@tromey.com>
12459
12460 * probe.c (parse_probes): Update.
12461 * location.h (delete_event_location): Don't declare.
12462 (event_location_deleter::operator()): Update.
12463 * location.c (event_location_deleter::operator()): Rename from
12464 delete_event_location.
12465 * linespec.h (linespec_result) <location>: Change type to
12466 event_location_up.
12467 * linespec.c (canonicalize_linespec, event_location_to_sals)
12468 (decode_objc): Update.
12469 (linespec_result): Don't call delete_event_location.
12470 * breakpoint.c (create_breakpoints_sal)
12471 (bkpt_probe_create_sals_from_location)
12472 (strace_marker_create_sals_from_location): Update.
12473
16e802b9
TT
124742017-04-12 Tom Tromey <tom@tromey.com>
12475
12476 * linespec.h (struct linespec_result): Add constructor and
12477 destructor.
12478 (init_linespec_result, destroy_linespec_result)
12479 (make_cleanup_destroy_linespec_result): Don't declare.
12480 * linespec.c (init_linespec_result): Remove.
12481 (linespec_result::~linespec_result): Rename from
12482 destroy_linespec_result. Update.
12483 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12484 Remove.
12485 * breakpoint.c (create_breakpoint, break_range_command)
12486 (decode_location_default): Update.
12487 * ax-gdb.c (agent_command_1): Update.
12488
d28cd78a
TT
124892017-04-12 Tom Tromey <tom@tromey.com>
12490
12491 * remote.c (remote_download_tracepoint): Update.
12492 * python/py-breakpoint.c (bppy_get_location): Update.
12493 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12494 (gdbscm_breakpoint_location): Update.
12495 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12496 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12497 Change type to event_location_up.
12498 * breakpoint.c (create_overlay_event_breakpoint)
12499 (create_longjmp_master_breakpoint)
12500 (create_std_terminate_master_breakpoint)
12501 (create_exception_master_breakpoint)
12502 (breakpoint_event_location_empty_p, print_breakpoint_location)
12503 (print_one_breakpoint_location, create_thread_event_breakpoint)
12504 (init_breakpoint_sal, create_breakpoint)
12505 (print_recreate_ranged_breakpoint, break_range_command)
12506 (init_ada_exception_breakpoint, say_where): Update.
12507 (base_breakpoint_dtor): Don't call delete_event_location.
12508 (bkpt_print_recreate, tracepoint_print_recreate)
12509 (dprintf_print_recreate, update_static_tracepoint)
12510 (breakpoint_re_set_default): Update.
12511
711799d5
TT
125122017-04-12 Tom Tromey <tom@tromey.com>
12513
12514 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12515 type of "to_do". Update.
12516 (compute_stack_depth): Use std::vector.
12517
52d214d3
TT
125182017-04-12 Tom Tromey <tom@tromey.com>
12519
12520 * printcmd.c (find_instruction_backward): Use std::vector.
12521
4c404b8b
TT
125222017-04-12 Tom Tromey <tom@tromey.com>
12523
12524 * symfile.c (objfilep): Remove typedef.
12525 (reread_symbols): Use a std::vector.
12526
156d9eab
TT
125272017-04-12 Tom Tromey <tom@tromey.com>
12528
12529 * mi/mi-main.c (exec_direction_forward): Remove.
12530 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12531 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12532 scoped_restore.
12533 * guile/guile.c (guile_repl_command, guile_command)
12534 (gdbscm_execute_gdb_command): Use scoped_restore.
12535 * go-exp.y (go_parse): Use scoped_restore.
12536 * d-exp.y (d_parse): Use scoped_restore.
12537 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12538 * c-exp.y (c_parse): Use scoped_restore.
12539
4d89769a
TT
125402017-04-12 Tom Tromey <tom@tromey.com>
12541
12542 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12543 (mi_parse): Update return type.
12544 (mi_parse_free): Remove.
12545 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12546 (mi_parse::~mi_parse): Rename from mi_parse_free.
12547 (mi_parse_cleanup): Remove.
12548 (mi_parse): Return a unique_ptr. Use new.
12549 * mi/mi-main.c (mi_execute_command): Update.
12550
4b217cc7
TT
125512017-04-12 Tom Tromey <tom@tromey.com>
12552
12553 * location.c (explicit_location_lex_one): Return a
12554 unique_xmalloc_ptr.
12555 (string_to_explicit_location): Update. Remove cleanups.
12556
59d3651b
TT
125572017-04-12 Tom Tromey <tom@tromey.com>
12558
12559 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12560 (compare_value_and_voffset): Change type. Update.
12561 (compute_vtable_size): Change type of "offset_vec".
12562 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12563 (gnuv3_get_typeid): Remove extraneous declaration.
12564
b24b0d6c
TT
125652017-04-12 Tom Tromey <tom@tromey.com>
12566
12567 * charset.h (wchar_iterator): Fix comment.
12568
80a3b8c5
TT
125692017-04-12 Tom Tromey <tom@tromey.com>
12570
12571 * charset.c (iconv_wrapper): New class.
12572 (cleanup_iconv): Remove.
12573 (convert_between_encodings): Use it.
12574
c83dd867
TT
125752017-04-12 Tom Tromey <tom@tromey.com>
12576
12577 * symfile.h (increment_reading_symtab): Update type.
12578 * symfile.c (decrement_reading_symtab): Remove.
12579 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12580 * psymtab.c (psymtab_to_symtab): Update.
12581 * dwarf2read.c (dw2_instantiate_symtab): Update.
12582
0e8621a0
TT
125832017-04-12 Tom Tromey <tom@tromey.com>
12584
12585 * jit.c (struct jit_reader): Declare separately. Add constructor
12586 and destructor. Change type of "handle".
12587 (loaded_jit_reader): Define separately.
12588 (jit_reader_load): Update. New "new".
12589 (jit_reader_unload_command): Use "delete".
12590 * gdb-dlfcn.h (struct dlclose_deleter): New.
12591 (gdb_dlhandle_up): New typedef.
12592 (gdb_dlopen, gdb_dlsym): Update types.
12593 (gdb_dlclose): Remove.
12594 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12595 (gdb_dlsym): Change type of "handle".
12596 (make_cleanup_dlclose): Remove.
12597 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12598 * compile/compile-c-support.c (load_libcc): Update.
12599
67d89901
TT
126002017-04-12 Tom Tromey <tom@tromey.com>
12601
12602 * symtab.h (find_pcs_for_symtab_line): Change return type.
12603 * symtab.c (find_pcs_for_symtab_line): Change return type.
12604 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12605 type of "vec". Update.
12606 (ltpy_get_pcs_for_line): Update.
12607 * linespec.c (decode_digits_ordinary): Update.
12608
93921405
TT
126092017-04-12 Tom Tromey <tom@tromey.com>
12610
12611 * tracepoint.c (actions_command): Update.
12612 * python/python.c (python_command, python_interactive_command):
12613 Update.
12614 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12615 * guile/guile.c (guile_command): Update.
12616 * defs.h (read_command_lines, read_command_lines_1): Return
12617 command_line_up.
12618 (command_lines_deleter): New struct.
12619 (command_line_up): New typedef.
12620 * compile/compile.c (compile_code_command)
12621 (compile_print_command): Update.
12622 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12623 command_line_up.
12624 (make_cleanup_free_command_lines): Remove.
12625 * cli/cli-script.c (get_command_line, read_command_lines_1)
12626 (copy_command_lines): Return command_line_up.
12627 (while_command, if_command, read_command_lines, define_command)
12628 (document_command): Update.
12629 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12630 Remove.
12631 * breakpoint.h (breakpoint_set_commands): Change type of
12632 "commands".
12633 * breakpoint.c (breakpoint_set_commands): Change type of
12634 "commands". Update.
12635 (do_map_commands_command, update_dprintf_command_list)
12636 (create_tracepoint_from_upload): Update.
12637
ffc2605c
TT
126382017-04-12 Tom Tromey <tom@tromey.com>
12639
12640 * tracepoint.c (scope_info): Update.
12641 * spu-tdep.c (spu_catch_start): Update.
12642 * python/python.c (gdbpy_decode_line): Update.
12643 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12644 * python/py-breakpoint.c (bppy_init): Update.
12645 * probe.c (parse_probes): Update.
12646 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12647 * location.h (event_location_deleter): New struct.
12648 (event_location_up): New typedef.
12649 (new_linespec_location, new_address_location, new_probe_location)
12650 (new_explicit_location, copy_event_location)
12651 (string_to_event_location, string_to_event_location_basic)
12652 (string_to_explicit_location): Update return type.
12653 (make_cleanup_delete_event_location): Remove.
12654 * location.c (new_linespec_location, new_address_location)
12655 (new_probe_location, new_explicit_location, copy_event_location):
12656 Return event_location_up.
12657 (delete_event_location_cleanup)
12658 (make_cleanup_delete_event_location): Remove.
12659 (string_to_explicit_location, string_to_event_location_basic)
12660 (string_to_event_location): Return event_location_up.
12661 * linespec.c (canonicalize_linespec, event_location_to_sals)
12662 (decode_line_with_current_source)
12663 (decode_line_with_last_displayed, decode_objc): Update.
12664 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12665 * completer.c (location_completer): Update.
12666 * cli/cli-cmds.c (edit_command, list_command): Update.
12667 * breakpoint.c (create_overlay_event_breakpoint)
12668 (create_longjmp_master_breakpoint)
12669 (create_std_terminate_master_breakpoint)
12670 (create_exception_master_breakpoint)
12671 (create_thread_event_breakpoint): Update.
12672 (init_breakpoint_sal): Update. Remove some dead code.
12673 (create_breakpoint_sal): Change type of "location". Update.
12674 (create_breakpoints_sal, create_breakpoint, break_command_1)
12675 (dprintf_command, break_range_command, until_break_command)
12676 (init_ada_exception_breakpoint)
12677 (strace_marker_create_sals_from_location)
12678 (update_static_tracepoint, trace_command, ftrace_command)
12679 (strace_command, create_tracepoint_from_upload): Update.
12680 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12681 * ax-gdb.c (agent_command_1): Update.
12682
8f10c932
PA
126832017-04-12 Pedro Alves <palves@redhat.com>
12684
12685 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12686 * configure.tgt: Handle i[34567]86-*-go32* and
12687 i[34567]86-*-msdosdjgpp*.
12688 * i386-tdep.c (i386_svr4_reg_to_regnum):
12689 Make extern.
12690 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12691 i386-go32-tdep.c.
12692 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12693 * i386-go32-tdep.c: New file.
12694 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12695 declarations.
12696
0a31ccfb
SM
126972017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12698
12699 * aix-thread.c (pd_status2str): Change return type to const char *.
12700
e9bb3fbb
PA
127012017-04-12 Pedro Alves <palves@redhat.com>
12702
12703 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12704 calls to set_gdbarch_gnu_triplet_regexp.
12705
53375380
PA
127062017-04-12 Pedro Alves <palves@redhat.com>
12707
12708 PR gdb/21323
12709 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12710 New enum value.
12711 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12712 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12713 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12714 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12715 * gdbarch.h, gdbarch.c: Regenerate.
12716 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12717 gdbarch_wchar_bit and gdbarch_wchar_signed.
12718 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12719 * arm-tdep.c (arm_gdbarch_init): Likewise.
12720 * avr-tdep.c (avr_gdbarch_init): Likewise.
12721 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12722 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12723 * i386-tdep.c (i386_go32_init_abi): Likewise.
12724 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12725 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12726 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12727 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12728 * sh-tdep.c (sh_gdbarch_init): Likewise.
12729 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12730 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12731 * windows-tdep.c (windows_init_abi): Likewise.
12732 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12733
53e710ac
PA
127342017-04-12 Pedro Alves <palves@redhat.com>
12735
12736 PR c++/21323
12737 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12738 cplus_primitive_type_char32_t>: New enum values.
12739 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12740 and cplus_primitive_type_char32_t.
12741 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12742 32, use the archtecture's built-in type for char16_t and char32_t,
12743 respectively. Otherwise, fallback to init_integer_type as before,
12744 but make the type unsigned, and issue a complaint.
12745 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12746
ab0538b8
AH
127472017-04-12 Alan Hayward <alan.hayward@arm.com>
12748
5e0e0422 12749 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12750 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12751
5430098f
SDJ
127522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12753
12754 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12755 'const char *'.
12756
7c5ded6a
SDJ
127572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12758
12759 * common/common-utils.c (free_vector_argv): New function.
12760 * common/common-utils.h: Include <vector>.
12761 (free_vector_argv): New prototype.
12762 * darwin-nat.c (darwin_create_inferior): Rewrite function
12763 prototype in order to constify "exec_file" and accept a
12764 "std::string" for "allargs".
12765 * fork-child.c: Include <vector>.
12766 (breakup_args): Rewrite function, using C++.
12767 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12768 and accept "std::string" for "allargs". Update the code to
12769 calculate "argv" based on "allargs". Update calls to "exec_fun"
12770 and "execvp".
12771 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12772 order to constify "exec_file" and accept a "std::string" for
12773 "allargs".
12774 * go32-nat.c (go32_create_inferior): Likewise.
12775 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12776 * infcmd.c (run_command_1): Constify "exec_file". Use
12777 "std::string" for inferior arguments.
12778 * inferior.h (fork_inferior): Update prototype.
12779 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12780 prototype in order to constify "exec_file" and accept a
12781 "std::string" for "allargs".
12782 * nto-procfs.c (procfs_create_inferior): Likewise.
12783 * procfs.c (procfs_create_inferior): Likewise.
12784 * remote-sim.c (gdbsim_create_inferior): Likewise.
12785 * remote.c (extended_remote_run): Update code to accept
12786 "std::string" as argument.
12787 (extended_remote_create_inferior): Rewrite function prototype in
12788 order to constify "exec_file" and accept a "std::string" for
12789 "allargs".
12790 * rs6000-nat.c (super_create_inferior): Likewise.
12791 (rs6000_create_inferior): Likewise.
12792 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12793 * windows-nat.c (windows_create_inferior): Likewise.
12794
ae0eee42
PA
127952017-04-11 Pedro Alves <palves@redhat.com>
12796
12797 * thread.c: Fix whitespace throughout.
12798
a6acac06
PR
127992017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12800
12801 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12802
64403bd1
AH
128032017-04-11 Alan Hayward <alan.hayward@arm.com>
12804
12805 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12806
a5bef50f
SDJ
128072017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12808
12809 PR gdb/21364
12810 * osdata.c (info_osdata): Check if 'type' is an empty string
12811 instead of NULL.
12812
9295a5a9
PA
128132017-04-10 Pedro Alves <palves@redhat.com>
12814
12815 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12816 (ptid_to_global_thread_id, in_thread_list)
12817 (do_captured_list_thread_ids, set_resumed, set_running)
12818 (set_executing, set_stop_requested, finish_thread_state)
12819 (validate_registers_access, can_access_registers_ptid)
12820 (print_thread_info_1, switch_to_thread)
12821 (do_restore_current_thread_cleanup)
12822 (make_cleanup_restore_current_thread, thread_command)
12823 (thread_name_command): Use operator== instead of ptid_equal.
12824
996812e3
PA
128252017-04-10 Pedro Alves <palves@redhat.com>
12826
12827 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12828 (current_thread_cleanup_chain): Delete.
12829 (restore_current_thread_cleanup_dtor)
12830 (make_cleanup_restore_current_thread): Remove references to
12831 current_thread_cleanup_chain.
12832
845b344f
AH
128332017-04-10 Alan Hayward <alan.hayward@arm.com>
12834
12835 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12836 REG_UNKNOWN.
12837
803bdfe4
YQ
128382017-04-10 Yao Qi <yao.qi@linaro.org>
12839
12840 PR gdb/19942
12841 * gdbthread.h (thread_info::deletable): New method.
12842 (thread_info::incref): New method.
12843 (thread_info::decref): New method.
12844 (thread_info::refcount): Move it to private.
12845 * infrun.c (save_stop_context): Call inc_refcount.
12846 (release_stop_context_cleanup): Likewise.
12847 * thread.c (set_thread_exited): New function.
12848 (init_thread_list): Delete "tp" only it is deletable, otherwise
12849 call set_thread_exited.
12850 (delete_thread_1): Call set_thread_exited.
12851 (current_thread_cleanup) <inferior_pid>: Remove.
12852 <thread>: New field.
12853 (restore_current_thread_ptid_changed): Removed.
12854 (do_restore_current_thread_cleanup): Adjust.
12855 (restore_current_thread_cleanup_dtor): Don't call
12856 find_thread_ptid.
12857 (set_thread_refcount): Use dec_refcount.
12858 (make_cleanup_restore_current_thread): Adjust.
12859 (thread_apply_all_command): Call inc_refcount.
12860 (_initialize_thread): Don't call
12861 observer_attach_thread_ptid_changed.
12862
8c25b497
YQ
128632017-04-10 Yao Qi <yao.qi@linaro.org>
12864
12865 * thread.c (delete_thread_1): Hoist code on marking thread as
12866 exited.
12867
8473b447
SM
128682017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12869
12870 * windows-nat.c (windows_detach): Initialize ptid with
12871 minus_one_ptid.
12872
6670ec13
SM
128732017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12874
12875 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12876
ba2f91bb
AH
128772017-04-07 Alan Hayward <alan.hayward@arm.com>
12878
12879 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12880 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12881 (bfin_pseudo_register_write): Likewise
12882
436252de
SM
128832017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12884
12885 * common/ptid.h (struct ptid): Change to...
12886 (class ptid_t): ... this.
12887 <ptid_t>: New constructors.
12888 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12889 matches>: New methods.
12890 <make_null, make_minus_one>: New static methods.
12891 <pid>: Rename to...
12892 <m_pid>: ...this.
12893 <lwp>: Rename to...
12894 <m_lwp>: ...this.
12895 <tid>: Rename to...
12896 <m_tid>: ...this.
12897 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12898 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12899 as references, move comment to class ptid_t.
12900 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12901 ptid_t static methods.
12902 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12903 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12904 Take ptid arguments as references, implement using ptid_t methods.
12905 * unittests/ptid-selftests.c: New file.
12906 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12907 unittests/ptid-selftests.c.
12908 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12909
0dedf377
TP
129102017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12911
12912 * python/python.c (python_run_simple_file): Cast mode literal to
12913 non-const char pointer as expected by PyFile_FromString.
12914
4e9868d4
SM
129152017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12916
12917 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12918 minus_one_ptid and null_ptid.
12919
9bf2a700
PA
129202017-04-05 Pedro Alves <palves@redhat.com>
12921
12922 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12923 * configure: Regenerate.
12924
a121b7c1
PA
129252017-04-05 Pedro Alves <palves@redhat.com>
12926
12927 * ada-exp.y (yyerror): Constify.
12928 * ada-lang.c (bound_name, get_selections)
12929 (ada_variant_discrim_type)
12930 (ada_variant_discrim_name, ada_value_struct_elt)
12931 (ada_lookup_struct_elt_type, is_unchecked_variant)
12932 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12933 (catch_ada_exception_command_split)
12934 (catch_ada_assert_command_split, catch_assert_command)
12935 (ada_op_name): Constify.
12936 * ada-lang.h (ada_yyerror, get_selections)
12937 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12938 * arc-tdep.c (arc_print_frame_cache): Constify.
12939 * arm-tdep.c (arm_skip_stub): Constify.
12940 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12941 (gen_aggregate_elt_ref): Constify.
12942 * bcache.c (print_bcache_statistics): Constify.
12943 * bcache.h (print_bcache_statistics): Constify.
12944 * break-catch-throw.c (catch_exception_command_1):
12945 * breakpoint.c (struct ep_type_description::description):
12946 Constify.
12947 (add_solib_catchpoint): Constify.
12948 (catch_fork_command_1): Add cast.
12949 (add_catch_command): Constify.
12950 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12951 Constify.
12952 * bsd-uthread.c (bsd_uthread_state): Constify.
12953 * buildsym.c (patch_subfile_names): Constify.
12954 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12955 Constify.
12956 * c-exp.y (yyerror): Constify.
12957 (token::oper): Constify.
12958 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12959 * c-varobj.c (cplus_describe_child): Constify.
12960 * charset.c (find_charset_names): Add cast.
12961 (find_charset_names): Constify array and add const_cast.
12962 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12963 (edit_command): Constify.
12964 * cli/cli-decode.c (lookup_cmd): Constify.
12965 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12966 Constify.
12967 (struct dump_context): Constify.
12968 (add_dump_command, restore_command): Constify.
12969 * cli/cli-script.c (get_command_line): Constify.
12970 * cli/cli-script.h (get_command_line): Constify.
12971 * cli/cli-utils.c (check_for_argument): Constify.
12972 * cli/cli-utils.h (check_for_argument): Constify.
12973 * coff-pe-read.c (struct read_pe_section_data): Constify.
12974 * command.h (lookup_cmd): Constify.
12975 * common/print-utils.c (decimal2str): Constify.
12976 * completer.c (gdb_print_filename): Constify.
12977 * corefile.c (set_gnutarget): Constify.
12978 * cp-name-parser.y (yyerror): Constify.
12979 * cp-valprint.c (cp_print_class_member): Constify.
12980 * cris-tdep.c (cris_register_name, crisv32_register_name):
12981 Constify.
12982 * d-exp.y (yyerror): Constify.
12983 (struct token::oper): Constify.
12984 * d-lang.h (d_yyerror): Constify.
12985 * dbxread.c (struct header_file_location::name): Constify.
12986 (add_old_header_file, add_new_header_file, last_function_name)
12987 (dbx_next_symbol_text, add_bincl_to_list)
12988 (find_corresponding_bincl_psymtab, set_namestring)
12989 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12990 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12991 * defs.h (command_line_input, print_address_symbolic)
12992 (deprecated_readline_begin_hook): Constify.
12993 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12994 Constify.
12995 * event-top.c (handle_line_of_input): Constify and add cast.
12996 * exceptions.c (catch_errors): Constify.
12997 * exceptions.h (catch_errors): Constify.
12998 * expprint.c (print_subexp_standard, op_string, op_name)
12999 (op_name_standard, dump_raw_expression, dump_raw_expression):
13000 * expression.h (op_name, op_string, dump_raw_expression):
13001 Constify.
13002 * f-exp.y (yyerror): Constify.
13003 (struct token::oper): Constify.
13004 (struct f77_boolean_val::name): Constify.
13005 * f-lang.c (f_word_break_characters): Constify.
13006 * f-lang.h (f_yyerror): Constify.
13007 * fork-child.c (fork_inferior): Add cast.
13008 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13009 (new_variant): Constify.
13010 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13011 * gdbarch.c: Regenerate.
13012 * gdbcore.h (set_gnutarget): Constify.
13013 * go-exp.y (yyerror): Constify.
13014 (token::oper): Constify.
13015 * go-lang.h (go_yyerror): Constify.
13016 * go32-nat.c (go32_sysinfo): Constify.
13017 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13018 * guile/scm-cmd.c (cmdscm_function): Constify.
13019 * guile/scm-param.c (pascm_param_value): Constify.
13020 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13021 (h8300sx_register_name): Constify.
13022 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13023 Constify.
13024 * ia64-tdep.c (ia64_register_names): Constify.
13025 * infcmd.c (construct_inferior_arguments): Constify.
13026 (path_command, attach_post_wait): Constify.
13027 * language.c (show_range_command, show_case_command)
13028 (unk_lang_error): Constify.
13029 * language.h (language_defn::la_error)
13030 (language_defn::la_name_of_this): Constify.
13031 * linespec.c (decode_line_2): Constify.
13032 * linux-thread-db.c (thread_db_err_str): Constify.
13033 * lm32-tdep.c (lm32_register_name): Constify.
13034 * m2-exp.y (yyerror): Constify.
13035 * m2-lang.h (m2_yyerror): Constify.
13036 * m32r-tdep.c (m32r_register_names): Constify and make static.
13037 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13038 * m88k-tdep.c (m88k_register_name): Constify.
13039 * macroexp.c (appendmem): Constify.
13040 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13041 (upgrade_type, parse_external, parse_partial_symbols)
13042 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13043 (new_symbol): Constify.
13044 * memattr.c (mem_info_command): Constify.
13045 * mep-tdep.c (register_name_from_keyword): Constify.
13046 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13047 Constify.
13048 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13049 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13050 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13051 cast.
13052 (mi_execute_async_cli_command): Constify.
13053 * mips-tdep.c (mips_register_name): Constify.
13054 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13055 (am33_register_name, am33_2_register_name)
13056 * moxie-tdep.c (moxie_register_names): Constify.
13057 * nat/linux-osdata.c (osdata_type): Constify fields.
13058 * nto-tdep.c (nto_parse_redirection): Constify.
13059 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13060 (lookup_child_selector): Constify.
13061 (objc_methcall::name): Constify.
13062 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13063 (lookup_struct_typedef): Constify.
13064 * objfiles.c (pc_in_section): Constify.
13065 * objfiles.h (pc_in_section): Constify.
13066 * p-exp.y (struct token::oper): Constify.
13067 (yyerror): Constify.
13068 * p-lang.h (pascal_yyerror): Constify.
13069 * parser-defs.h (op_name_standard): Constify.
13070 (op_print::string): Constify.
13071 (exp_descriptor::op_name): Constify.
13072 * printcmd.c (print_address_symbolic): Constify.
13073 * psymtab.c (print_partial_symbols): Constify.
13074 * python/py-breakpoint.c (stop_func): Constify.
13075 (bppy_get_expression): Constify.
13076 * python/py-cmd.c (cmdpy_completer::name): Constify.
13077 (cmdpy_function): Constify.
13078 * python/py-event.c (evpy_add_attribute)
13079 (gdbpy_initialize_event_generic): Constify.
13080 * python/py-event.h (evpy_add_attribute)
13081 (gdbpy_initialize_event_generic): Constify.
13082 * python/py-evts.c (add_new_registry): Constify.
13083 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13084 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13085 * python/py-inferior.c (get_buffer): Add cast.
13086 * python/py-param.c (parm_constant::name): Constify.
13087 * python/py-unwind.c (fprint_frame_id): Constify.
13088 * python/python.c (gdbpy_parameter_value): Constify.
13089 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13090 * remote.c (memory_packet_config::name): Constify.
13091 (show_packet_config_cmd, remote_write_bytes)
13092 (remote_buffer_add_string):
13093 * reverse.c (exec_reverse_once): Constify.
13094 * rs6000-tdep.c (variant::name, variant::description): Constify.
13095 * rust-exp.y (rustyyerror): Constify.
13096 * rust-lang.c (rust_op_name): Constify.
13097 * rust-lang.h (rustyyerror): Constify.
13098 * serial.h (serial_ops::name): Constify.
13099 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13100 (sh_sh3e_register_name, sh_sh2e_register_name)
13101 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13102 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13103 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13104 (sh_sh4al_dsp_register_name): Constify.
13105 * sh64-tdep.c (sh64_register_name): Constify.
13106 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13107 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13108 * stabsread.c (patch_block_stabs, read_type_number)
13109 (ref_map::stabs, ref_add, process_reference)
13110 (symbol_reference_defined, define_symbol, define_symbol)
13111 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13112 (read_one_struct_field, read_struct_fields, read_baseclasses)
13113 (read_tilde_fields, read_struct_type, read_array_type)
13114 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13115 (read_huge_number, read_range_type, read_args, common_block_start)
13116 (find_name_end): Constify.
13117 * stabsread.h (common_block_start, define_symbol)
13118 (process_one_symbol, symbol_reference_defined, ref_add):
13119 * symfile.c (get_section_index, add_symbol_file_command):
13120 * symfile.h (get_section_index): Constify.
13121 * target-descriptions.c (tdesc_type::name): Constify.
13122 (tdesc_free_type): Add cast.
13123 * target.c (find_default_run_target):
13124 (add_deprecated_target_alias, find_default_run_target)
13125 (target_announce_detach): Constify.
13126 (do_option): Constify.
13127 * target.h (add_deprecated_target_alias): Constify.
13128 * thread.c (print_thread_info_1): Constify.
13129 * top.c (deprecated_readline_begin_hook, command_line_input):
13130 Constify.
13131 (init_main): Add casts.
13132 * top.h (handle_line_of_input): Constify.
13133 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13134 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13135 (tfind_command): Rename to ...
13136 (tfind_command_1): ... this and constify.
13137 (tfind_command): New function.
13138 (tfind_end_command, tfind_start_command): Adjust.
13139 (encode_source_string): Constify.
13140 * tracepoint.h (encode_source_string): Constify.
13141 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13142 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13143 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13144 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13145 * tui/tui-win.c (parse_scrolling_args): Constify.
13146 * tui/tui-windata.c (tui_erase_data_content): Constify.
13147 * tui/tui-windata.h (tui_erase_data_content): Constify.
13148 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13149 * tui/tui.c (tui_enable): Add cast.
13150 * utils.c (defaulted_query): Constify.
13151 (init_page_info): Add cast.
13152 (puts_debug, subset_compare): Constify.
13153 * utils.h (subset_compare): Constify.
13154 * varobj.c (varobj_format_string): Constify.
13155 * varobj.h (varobj_format_string): Constify.
13156 * vax-tdep.c (vax_register_name): Constify.
13157 * windows-nat.c (windows_detach): Constify.
13158 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13159 * xml-support.c (gdb_xml_end_element): Constify.
13160 * xml-tdesc.c (tdesc_start_reg): Constify.
13161 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13162 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13163 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13164
995816ba
PA
131652017-04-05 Pedro Alves <palves@redhat.com>
13166
13167 * proc-api.c (struct trans): Constify.
13168 (procfs_note): Constify.
13169 * proc-events.c (struct trans, syscall_table):
13170 * proc-flags.c (struct trans): Constify.
13171 * proc-utils.h (procfs_note): Constify.
13172 * proc-why.c (struct trans): Constify.
13173 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13174 (procfs_detach): Constify.
13175 * sol-thread.c (struct string_map): Constify.
13176 (td_err_string, td_state_string): Constify.
13177
3e83a920
PA
131782017-04-05 Pedro Alves <palves@redhat.com>
13179
13180 * proc-api.c (procfs_filename): Don't initialize
13181 procfs_filename.
13182 (prepare_to_trace): Assume procfs_filename is non-NULL.
13183 (_initialize_proc_api): Give procfs_filename a default value here.
13184
63160a43
PA
131852017-04-05 Pedro Alves <palves@redhat.com>
13186
13187 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13188 'cond_string' parameter.
13189 (extract_exception_regexp): Constify 'string' parameter.
13190 (catch_exception_command_1): Constify.
13191 * breakpoint.c (init_catchpoint)
13192 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13193 parameter.
13194 (ep_parse_optional_if_clause, catch_fork_command_1)
13195 (catch_exec_command_1): Constify.
13196 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13197 parameter.
13198 (ep_parse_optional_if_clause): Constify.
13199 * cli/cli-utils.c (remove_trailing_whitespace)
13200 (check_for_argument): Constify.
13201 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13202 non-const overload.
13203 (check_for_argument): Likewise.
13204
9b2eba3d
PA
132052017-04-05 Pedro Alves <palves@redhat.com>
13206
13207 * event-top.c (command_line_handler): Add cast to execute_command
13208 call.
13209 * record-btrace.c (cmd_record_btrace_bts_start)
13210 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13211 (cmd_record_btrace_start): Add cast to execute_command call.
13212 * record-full.c (record_full_goto_insn):
13213 * record.c (record_start, record_stop): Add cast to
13214 execute_command_to_string calls.
13215 (cmd_record_start): Add cast to execute_command calls.
13216
2adadf51
PA
132172017-04-05 Pedro Alves <palves@redhat.com>
13218
13219 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13220 static inline function.
13221 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13222 array and use gdb_PyArg_ParseTupleAndKeywords.
13223 * python/py-cmd.c (cmdpy_init): Likewise.
13224 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13225 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13226 (infpy_search_memory): Likewise.
13227 * python/py-objfile.c (objfpy_add_separate_debug_file)
13228 (gdbpy_lookup_objfile): Likewise.
13229 * python/py-symbol.c (gdbpy_lookup_symbol)
13230 (gdbpy_lookup_global_symbol): Likewise.
13231 * python/py-type.c (gdbpy_lookup_type): Likewise.
13232 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13233 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13234 Likewise.
13235
0d1f4ceb
PA
132362017-04-05 Pedro Alves <palves@redhat.com>
13237
13238 * python/python-internal.h (gdb_PyGetSetDef): New type.
13239 * python/py-block.c (block_object_getset)
13240 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13241 * python/py-event.c (event_object_getset)
13242 (finish_breakpoint_object_getset): Likewise.
13243 * python/py-inferior.c (inferior_object_getset): Likewise.
13244 * python/py-infthread.c (thread_object_getset): Likewise.
13245 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13246 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13247 * python/py-objfile.c (objfile_getset): Likewise.
13248 * python/py-progspace.c (pspace_getset): Likewise.
13249 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13250 Likewise.
13251 * python/py-record.c (recpy_record_getset): Likewise.
13252 * python/py-symbol.c (symbol_object_getset): Likewise.
13253 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13254 Likewise.
13255 * python/py-type.c (type_object_getset, field_object_getset):
13256 Likewise.
13257 * python/py-value.c (value_object_getset): Likewise.
13258
4d759979
PA
132592017-04-05 Pedro Alves <palves@redhat.com>
13260
13261 * python/python-internal.h (gdb_PyObject_CallMethod)
13262 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13263 New functions.
13264 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13265 (PySys_GetObject, PySys_SetPath): New macros.
13266
fdf9e36f
PA
132672017-04-05 Pedro Alves <palves@redhat.com>
13268
13269 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13270 info_osdata_command.
13271 * osdata.c (info_osdata_command): Rename to ...
13272 (info_osdata): ... this. Constify 'type' parameter, and remove
13273 the 'from_tty' parameter. Accept NULL TYPE.
13274 (info_osdata_command): New function.
13275 * osdata.h (info_osdata_command): Remove declaration.
13276 (info_osdata): New declaration.
13277
9f33b8b7
PA
132782017-04-05 Pedro Alves <palves@redhat.com>
13279
13280 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13281 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13282 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13283 parameter.
13284 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13285 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13286 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13287 parameter.
13288 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13289 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13290 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13291 (mi_cmd_file_list_exec_source_files)
13292 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13293 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13294 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13295 parameter.
13296 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13297 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13298 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13299 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13300 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13301 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13302 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13303 'command' parameter.
13304 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13305 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13306 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13307 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13308 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13309 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13310 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13311 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13312 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13313 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13314 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13315 parameter.
13316 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13317 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13318 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13319 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13320 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13321 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13322 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13323 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13324 (mi_cmd_data_list_changed_registers)
13325 (mi_cmd_data_write_register_values)
13326 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13327 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13328 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13329 (mi_cmd_list_features, mi_cmd_list_target_features)
13330 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13331 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13332 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13333 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13334 (mi_cmd_trace_frame_collected): Constify 'command'
13335 parameter.
13336 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13337 'command' parameter.
13338
67cb5b2d
PA
133392017-04-05 Pedro Alves <palves@redhat.com>
13340
13341 * ada-lang.c (ada_completer_word_break_characters): Now a const
13342 array.
13343 (ada_get_gdb_completer_word_break_characters): Constify.
13344 * completer.c (gdb_completer_command_word_break_characters)
13345 (gdb_completer_file_name_break_characters)
13346 (gdb_completer_quote_characters): Now const arrays.
13347 (get_gdb_completer_quote_characters): Constify.
13348 (set_rl_completer_word_break_characters): New function.
13349 (set_gdb_completion_word_break_characters)
13350 (complete_line_internal): Use it.
13351 * completer.h (get_gdb_completer_quote_characters): Constify.
13352 (set_rl_completer_word_break_characters): Declare.
13353 * f-lang.c (f_word_break_characters): Constify.
13354 * language.c (default_word_break_characters): Constify.
13355 * language.h (language_defn::la_word_break_characters): Constify.
13356 (default_word_break_characters): Constify.
13357 * top.c (init_main): Use set_rl_completer_word_break_characters.
13358
7a114964
PA
133592017-04-05 Pedro Alves <palves@redhat.com>
13360
13361 * aix-thread.c (aix_thread_pid_to_str)
13362 (aix_thread_extra_thread_info): Constify.
13363 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13364 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13365 (bsd_uthread_pid_to_str): Constify.
13366 * corelow.c (core_pid_to_str): Constify.
13367 * darwin-nat.c (darwin_pid_to_str): Constify.
13368 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13369 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13370 Constify.
13371 * gnu-nat.c (gnu_pid_to_str): Constify.
13372 * go32-nat.c (go32_pid_to_str): Constify.
13373 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13374 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13375 * inferior.c (inferior_pid_to_str): Constify.
13376 * linux-nat.c (linux_nat_pid_to_str): Constify.
13377 * linux-tdep.c (linux_core_pid_to_str): Constify.
13378 * linux-thread-db.c (thread_db_pid_to_str)
13379 (thread_db_extra_thread_info): Constify.
13380 * nto-tdep.c (nto_extra_thread_info): Constify.
13381 * nto-tdep.h (nto_extra_thread_info): Constify.
13382 * obsd-nat.c (obsd_pid_to_str): Constify.
13383 * procfs.c (procfs_pid_to_str): Constify.
13384 * ravenscar-thread.c (ravenscar_extra_thread_info)
13385 (ravenscar_pid_to_str): Constify.
13386 * remote-sim.c (gdbsim_pid_to_str): Constify.
13387 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13388 Constify.
13389 * sol-thread.c (solaris_pid_to_str): Constify.
13390 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13391 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13392 * target.c (default_pid_to_str, target_pid_to_str)
13393 (normal_pid_to_str, default_pid_to_str): Constify.
13394 * target.h (target_ops::to_pid_to_str)
13395 (target_ops::to_extra_thread_info): Constify.
13396 (target_pid_to_str, normal_pid_to_str): Constify.
13397 * windows-nat.c (windows_pid_to_str): Constify.
13398 * gdbarch.sh (core_pid_to_str): Constify.
13399 * target-delegates.c: Regenerate.
13400 * gdbarch.h, gdbarch.c: Regenerate.
13401
69bbf465
PA
134022017-04-05 Pedro Alves <palves@redhat.com>
13403
13404 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13405 the memory of the temporary warning_pre_print override.
13406 * utils.c (warning_pre_print): Constify.
13407 * utils.h (warning_pre_print): Constify.
13408
be47f9e8
PA
134092017-04-05 Pedro Alves <palves@redhat.com>
13410
13411 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13412 (shell_command): New function.
13413 (make_command): Use std::string.
13414 (init_cli_cmds): Register shell_command instead of shell_escape.
13415
bde6261a
PA
134162017-04-05 Pedro Alves <palves@redhat.com>
13417
13418 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13419 * tracepoint.c (default_collect): Don't initialize.
13420
b38ef47f
PA
134212017-04-05 Pedro Alves <palves@redhat.com>
13422
13423 * macroexp.c (macro_buffer::shared): Now a bool.
13424 (init_buffer): Update.
13425 (init_shared_buffer): Constify 'addr' parameter.
13426 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13427 casts.
13428
f995bbe8
PA
134292017-04-05 Pedro Alves <palves@redhat.com>
13430
13431 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13432 * disasm.c (set_disassembler_options): Constify local.
13433 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13434
4a596fe2
SDJ
134352017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13436
13437 PR gdb/21352
13438 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13439 option.
13440
2cad08ea
YQ
134412017-04-05 Yao Qi <yao.qi@linaro.org>
13442
13443 * frame.c (frame_unwind_register_unsigned): Call
13444 frame_unwind_register_value.
13445
55a98976
YQ
134462017-04-05 Yao Qi <yao.qi@linaro.org>
13447
13448 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13449 Use gdb_test_multiple, and don't match anchor.
13450
4ac40124
PA
134512017-04-05 Pedro Alves <palves@redhat.com>
13452
13453 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13454 (Write After Approval): Remove Simon Marchi.
13455
c053b654
PA
134562017-04-05 Pedro Alves <palves@redhat.com>
13457
13458 * common/gdb_optional.h (optional::optional): Make constexpr and
13459 initialize m_dummy.
13460
4c7bf4f9
JB
134612017-04-04 John Baldwin <jhb@FreeBSD.org>
13462
13463 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13464 (amd64fbsd_jmp_buf_reg_offset): Remove.
13465 (amd64fbsd_supply_uthread): Remove function.
13466 (amd64fbsd_collect_uthread): Remove function.
13467 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13468 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13469 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13470 (fbsd-nat.c): Update comment.
13471 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13472 (i386fbsd_jmp_buf_reg_offset): Remove.
13473 (i386fbsd_supply_uthread): Remove function.
13474 (i386fbsd_collect_uthread): Remove function.
13475 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13476
1e1a8bef
JB
134772017-04-04 John Baldwin <jhb@FreeBSD.org>
13478
13479 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13480 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13481 * NEWS: Mention that support for FreeBSD/alpha was removed.
13482 * alpha-fbsd-tdep.c: Delete file.
13483 * config/alpha/fbsd.mh: Delete file.
13484 * configure.host: Delete alpha*-*-freebsd* and
13485 alpha*-*-kfreebsd*-gnu.
13486 * configure.tgt: Delete alpha*-*-freebsd* and
13487 alpha*-*-kfreebsd*-gnu.
13488
49907934
JB
134892017-04-04 John Baldwin <jhb@FreeBSD.org>
13490
13491 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13492 amd64bsd_store_inferior_registers): Use ptid from regcache.
13493
6f77053d
PA
134942017-04-04 Pedro Alves <palves@redhat.com>
13495
13496 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13497 data fields, make them private and add "m_" prefixes.
13498 (lnp_state_machine::lnp_state_machine): New ctor.
13499 (record_line, check_line_address, handle_set_discriminator)
13500 (handle_set_address, handle_advance_pc, handle_special_opcode)
13501 (handle_advance_line, handle_set_file, handle_negate_stmt)
13502 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13503 (end_sequence, advance_line): New methods.
13504 (m_gdbarch, m_record_lines_p): New fields.
13505 (lnp_reader_state): Delete.
13506 (dwarf_record_line): Rename to ...
13507 (lnp_state_machine::record_line): ... adjust.
13508 (init_lnp_state_machine): Delete.
13509 (lnp_state_machine::lnp_state_machine): New.
13510 (check_line_address): Rename to ...
13511 (lnp_state_machine::check_line_address): This.
13512 (dwarf_decode_lines_1): Remove reference to "reader_state".
13513 Adjust lnp_state_machine having a non-default ctor. Use bool.
13514 State machine internal state manipulation moved to
13515 lnp_state_machine methods.
13516
9c541725
PA
135172017-04-04 Pedro Alves <palves@redhat.com>
13518
13519 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13520 unittests/offset-type-selftests.c.
13521 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13522 * common/offset-type.h: New file.
13523 * common/preprocessor.h: New file.
13524 * common/traits.h: New file.
13525 * common/valid-expr.h: New file.
13526 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13527 sect_offset and cu_offset strong typedefs throughout.
13528 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13529 typedefs throughout.
13530 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13531 sect_offset and cu_offset strong typedefs throughout.
13532 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13533 typedefs throughout.
13534 * gdbtypes.h: Include "common/offset-type.h".
13535 (cu_offset): Now an offset type (strong typedef) instead of a
13536 struct.
13537 (sect_offset): Likewise.
13538 (union call_site_parameter_u): Rename "param_offset" field to
13539 "param_cu_off".
13540 * unittests/offset-type-selftests.c: New file.
13541
ecfb656c
PA
135422017-04-04 Pedro Alves <palves@redhat.com>
13543
13544 * common/underlying.h: New file.
13545 * dwarf2read.c: Include "common/gdb_optional.h" and
13546 "common/underlying.h".
13547 (dir_index, file_name_index): New types.
13548 (file_entry): Use them.
13549 (file_entry::include): Use to_underlying.
13550 (line_header::add_file_name): Use dir_index.
13551 (read_formatted_entries): Use gdb::optional. Read form before
13552 writting to file_entry.
13553 (dwarf_decode_line_header): Use dir_index.
13554 (lnp_state_machine::current_file): Use to_underlying.
13555 (lnp_state_machine::file): Change type to file_name_index.
13556 (dwarf_record_line): Use to_underlying.
13557 (init_lnp_state_machine): Use file_name_index.
13558 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13559
d194f1fe
PA
135602017-04-04 Pedro Alves <palves@redhat.com>
13561
13562 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13563 operator bool, has_value and get methods.
13564
fff8551c
PA
135652017-04-04 Pedro Alves <palves@redhat.com>
13566
13567 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13568 fields.
13569 (line_header): Initialize all data fields. Change type of
13570 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13571 Change type of include_dirs to std::vector<const char *>. Remove
13572 num_include_dirs, include_dirs_size. Change type of file_names to
13573 std::vector<file_entry>. Remove num_file_names, file_names_size.
13574 (line_header::line_header): New.
13575 (line_header::add_include_dir, line_header::add_file_name): New
13576 methods.
13577 (line_header::include_dir_at): Remove NULL check.
13578 (line_header::file_name_at): Add const overload.
13579 (line_header_up): New unique_ptr typedef.
13580 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13581 std::vector. Remove free_line_header call.
13582 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13583 free_line_header call.
13584 (free_cu_line_header): Delete.
13585 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13586 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13587 Adjust to use std::vector.
13588 (free_line_header): Delete.
13589 (free_line_header_voidp): Use delete.
13590 (add_include_dir): Replace with ...
13591 (line_header::add_include_dir): ... this method. Use std::vector.
13592 (add_file_name): Replace with ...
13593 (line_header::add_file_name): ... this method. Use std::vector.
13594 (add_include_dir_stub): Delete.
13595 (read_formatted_entries): Remove memset.
13596 (dwarf_decode_line_header): Return a line_header_up instead of a
13597 raw pointer. Remove cleanup handling. Pass lambdas to
13598 read_formatted_entries. Adjust to use line_header methods.
13599 (dwarf_decode_lines_1): Adjust to use line_header methods.
13600 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13601 use std::vector.
13602
d62a8ae2
SM
136032017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13604
13605 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13606 instead of struct ptid.
13607
db3a1dc7
AH
136082017-05-04 Alan Hayward <alan.hayward@arm.com>
13609
13610 * frame.c (get_frame_register_bytes): Unwind using value.
13611 (put_frame_register_bytes): Likewise.
13612
b1b45502
IB
136132017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13614
13615 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13616 aggregate-like.
13617
ec13808e
JK
136182017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13619
13620 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13621
12316564
YQ
136222017-03-29 Yao Qi <yao.qi@linaro.org>
13623
13624 * gdbthread.h (struct thread_info): Declare constructor and
13625 destructor. Add some in-class member initializers.
13626 * thread.c (free_thread): Remove.
13627 (init_thread_list): Call delete instead of free_thread.
13628 (new_thread): Call thread_info constructor.
13629 (thread_info::thread_info): New function.
13630 (thread_info::~thread_info): New function.
13631 (delete_thread_1): Call delete instead of free_thread.
13632 (make_cleanup_restore_current_thread): Move tp and frame to
13633 inner block.
13634
fe5f7374
AK
136352017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13636
13637 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13638 (arc_skip_prologue): Likewise.
13639 (arc_make_frame_cache): Likewise.
13640 (arc_pv_get_operand): New function.
13641 (arc_is_in_prologue): Likewise.
13642 (arc_analyze_prologue): Likewise.
13643 (arc_print_frame_cache): Likewise.
13644 (MAX_PROLOGUE_LENGTH): New constant.
13645
eea78757
AK
136462017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13647
13648 * configure.tgt: Add arc-insn.o.
13649 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13650 (dump_arc_instruction_command): New function.
13651 (arc_fprintf_disasm): Likewise.
13652 (arc_disassemble_info): Likewise.
13653 (arc_insn_get_operand_value): Likewise.
13654 (arc_insn_get_operand_value_signed): Likewise.
13655 (arc_insn_get_memory_base_reg): Likewise.
13656 (arc_insn_get_memory_offset): Likewise.
13657 (arc_insn_get_branch_target): Likewise.
13658 (arc_insn_dump): Likewise.
13659 (arc_insn_get_linear_next_pc): Likewise.
13660 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13661 (arc_disassemble_info): Likewise.
13662 (arc_insn_get_branch_target): Likewise.
13663 (arc_insn_get_linear_next_pc): Likewise.
13664 * NEWS: Mention new "maint print arc arc-instruction".
13665
3be78afd
AK
136662017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13667
13668 * arc-tdep (maintenance_print_arc_list): New variable.
13669 (maintenance_print_arc_command): New function.
13670
296ec4fa
AK
136712017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13672
13673 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13674 Add "limm" and "reserved".
13675 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13676 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13677 * arc-tdep.h (arc_regnum): Likewise.
13678
f74f865e
MF
136792017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13680
13681 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13682 for THREADPTR register.
13683 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13684 register.
13685 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13686 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13687 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13688
0d0bf81a
MF
136892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13690
13691 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13692 registers above gdbarch_num_regs (gdbarch) as privileged in
13693 call0 ABI.
13694
0ce4291e
MF
136952017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13696
13697 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13698 for a single specified register or for all registers in
13699 a0_base..a0_base + C0_NREGS range.
13700 (supply_gregset_reg): Call regcache_raw_supply for a single
13701 specified register or for all registers in a0_base..a0_base +
13702 C0_NREGS range.
13703
c56054f9
MF
137042017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13705
13706 * arch/xtensa.h (C0_NREGS): Add definition.
13707 * xtensa-tdep.c (C0_NREGS): Remove definition.
13708
a4398628
MF
137092017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13710
13711 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13712 Drop xtensa_default_isa initialization.
13713 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13714
8c43009f
PA
137152017-03-27 Pedro Alves <palves@redhat.com>
13716
13717 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13718 (file_entry::include_dir): New method.
13719 (line_header::include_dir_at, line_header::file_name_at): New
13720 methods.
13721 (setup_type_unit_groups, setup_type_unit_groups)
13722 (psymtab_include_file_name): Simplify using the new methods.
13723 (lnp_state_machine) <the_line_header>: New field.
13724 <file>: Add comment.
13725 (lnp_state_machine::current_file): New method.
13726 (dwarf_record_line): Simplify using the new methods.
13727 (init_lnp_state_machine): Initialize the "the_line_header" field.
13728 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13729 Simplify using the new methods.
13730
a7e80b9e
PA
137312017-03-27 Pedro Alves <palves@redhat.com>
13732
13733 * cp-name-parser.y (make_empty): Delete.
13734 (demangler_special, nested_name, ptr_operator, array_indicator)
13735 (direct_declarator, declarator_1): Use fill_comp instead of
13736 make_empty.
13737
21047726
PA
137382017-03-27 Pedro Alves <palves@redhat.com>
13739
13740 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13741 to ATTRIBUTE_PRINTF.
13742 * solib-target.c (library_list_start_list): Print "string" not
13743 "version".
13744 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13745 gdb_xml_error call.
13746
d721ba37
PA
137472017-03-27 Pedro Alves <palves@redhat.com>
13748
13749 * dwarf2read.c (struct file_and_directory): New.
13750 (dwarf2_get_dwz_file): Adjust to use std::string.
13751 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13752 (find_file_and_directory): Adjust to return a file_and_directory
13753 object.
13754 (read_file_scope): Adjust to use file_and_directory. Remove
13755 make_cleanup/do_cleanups calls.
13756 (open_and_init_dwp_file): Adjust to use std::string. Remove
13757 make_cleanup/do_cleanups calls.
13758 * python/python.c (do_start_initialization): Adjust to ldirname
13759 returning a std::string.
13760 * utils.c (ldirname): Now returns a std::string.
13761 * utils.h (ldirname): Change return type to std::string.
13762 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13763 returning a std::string.
13764 * xml-tdesc.c (file_read_description_xml): Likewise.
13765
ed771251
AH
137662017-03-24 Alan Hayward <alan.hayward@arm.com>
13767
13768 * regcache.c (regcache_debug_print_register): New function.
13769 * regcache.h (regcache_debug_print_register): New declaration.
13770 * target.c (debug_print_register): Remove.
13771 (target_fetch_registers): Call regcache_debug_print_register.
13772 (target_store_registers): Likewise.
13773
568c1b9f
PB
137742017-03-24 Pádraig Brady <pbrady@fb.com>
13775
13776 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13777 reference beyond the 'lh->include_dirs' array before accessing to
13778 it.
13779 (psymtab_include_file_name): Likewise.
13780 (dwarf_decode_lines_1): Likewise.
13781 (dwarf_decode_lines): Likewise.
13782 (file_file_name): Likewise.
13783
3e00d44f
SM
137842017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13785
13786 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13787 inferior_ptid.
13788 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13789 ps_lsetfpregs): Likewise.
13790 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13791 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13792 ps_lsetfpregs): Likewise.
13793 * target.c (target_fetch_registers, target_store_registers):
13794 Remove asserts.
13795
077ae656
AH
137962017-03-23 Alan Hayward <alan.hayward@arm.com>
13797
13798 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13799
1e2b521d
YQ
138002017-03-23 Yao Qi <yao.qi@linaro.org>
13801
13802 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13803 (_initialize_aarch64_tdep): Register it.
13804 (aarch64_record_load_store): Handle PRFM instruction.
13805 (aarch64_process_record_test): New function.
13806
33877125
YQ
138072017-03-23 Yao Qi <yao.qi@linaro.org>
13808
13809 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13810 indentation.
13811
a0eef940
YQ
138122017-03-23 Yao Qi <yao.qi@linaro.org>
13813
13814 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13815
3f2a3564
PR
138162017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13817
13818 python/python.c (do_start_initialization): Fix memory leak.
13819
b67aeab0
SM
138202017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13821
13822 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13823 using get_ptrace_pid.
13824 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13825 inferior_ptid.
13826 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13827 inferior_ptid instead of pid.
13828
ffdbe864
YQ
138292017-03-22 Yao Qi <yao.qi@linaro.org>
13830
13831 * aarch64-tdep.c: Wrap locally used classes in anonymous
13832 namespace.
13833 * arm-tdep.c: Likewise.
13834 * linespec.c: Likewise.
13835 * ui-out.c: Likewise.
13836
9d736fbf
JG
138372017-03-22 Jonah Graham <jonah@kichwacoders.com>
13838
13839 PR gdb/19637
13840 * python/lib/gdb/printer/bound_registers.py: Import sys.
13841
3de88e9a
SM
138422017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13843
13844 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13845 windows_thread_info parameter and use it instead of
13846 current_thread.
13847 (windows_fetch_inferior_registers): Don't set current_thread,
13848 pass the thread to do_windows_fetch_inferior_registers. Use
13849 ptid from regcache instead of inferior_ptid.
13850 (do_windows_store_inferior_registers): Add windows_thread_info
13851 parameter and use it instead of current_thread.
13852 (windows_store_inferior_registers): Don't set current_thread,
13853 pass the thread to do_windows_store_inferior_registers. Use
13854 ptid from regcache instead of inferior_ptid.
13855
0e7b8f61
SM
138562017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13857
13858 * ser-mingw.c (ser_windows_raw): Remove reference to
13859 struct serial::current_timeout.
13860
5badf10a
IR
138612017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13862
13863 PR tdep/20928
13864 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13865 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13866 (sparc64_fsr_type): Fix %fsr decoding.
13867
cee59b3f
TW
138682017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13869
13870 * python/py-record-btrace.c (btpy_insn_data): Change return type
13871 for Python 2.
13872
639a9038
SM
138732017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13874
13875 * spu-linux-nat.c (spu_fetch_inferior_registers,
13876 spu_store_inferior_registers): Use ptid from regcache, set and
13877 restore inferior_ptid.
13878 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13879 Likewise.
13880
bcc0c096
SM
138812017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13882
13883 * i386-linux-nat.c (fetch_register, store_register,
13884 i386_linux_fetch_inferior_registers,
13885 i386_linux_store_inferior_registers): Use ptid from regcache.
13886 * ia64-linux-nat.c (ia64_linux_fetch_register,
13887 ia64_linux_store_register): Likewise.
13888 * inf-ptrace.c (inf_ptrace_fetch_register,
13889 inf_ptrace_store_register): Likewise.
13890 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13891 m32r_linux_store_inferior_registers): Likewise.
13892 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13893 m68kbsd_store_inferior_registers): Likewise.
13894 * m68k-linux-nat.c (fetch_register, store_register,
13895 m68k_linux_fetch_inferior_registers,
13896 m68k_linux_store_inferior_registers): Likewise.
13897 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13898 m88kbsd_store_inferior_registers): Likewise.
13899 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13900 mips_fbsd_store_inferior_registers): Likewise.
13901 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13902 mips64_linux_regsets_store_registers): Likewise.
13903 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13904 mipsnbsd_store_inferior_registers): Likewise.
13905 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13906 mips64obsd_store_inferior_registers): Likewise.
13907 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13908 Likewise.
13909 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13910 ppcfbsd_store_inferior_registers): Likewise.
13911 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13912 ppc_linux_store_inferior_registers): Likewise.
13913 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13914 ppcnbsd_store_inferior_registers): Likewise.
13915 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13916 ppcobsd_store_registers): Likewise.
13917 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13918 Likewise.
13919 * ravenscar-thread.c (ravenscar_fetch_registers,
13920 ravenscar_store_registers, ravenscar_prepare_to_store):
13921 Likewise.
13922 * record-btrace.c (record_btrace_fetch_registers,
13923 record_btrace_store_registers, record_btrace_prepare_to_store):
13924 Likewise.
13925 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13926 Lookup inferior using ptid from regcache, instead of
13927 current_inferior.
13928 * remote.c (remote_fetch_registers, remote_store_registers): Use
13929 ptid from regcache.
13930 * rs6000-nat.c (fetch_register, store_register): Likewise.
13931 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13932 s390_linux_store_inferior_registers): Likewise.
13933 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13934 shnbsd_store_inferior_registers): Likewise.
13935 * sol-thread.c (sol_thread_fetch_registers,
13936 sol_thread_store_registers): Likewise.
13937 * sparc-nat.c (sparc_fetch_inferior_registers,
13938 sparc_store_inferior_registers): Likewise.
13939 * tilegx-linux-nat.c (fetch_inferior_registers,
13940 store_inferior_registers): Likewise.
13941 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13942 vaxbsd_store_inferior_registers): Likewise.
13943 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13944 store_xtregs): Likewise.
13945
c0f55cc6
AV
139462017-03-20 Artemiy Volkov <artemiyv@acm.org>
13947
13948 PR gdb/14441
13949 * NEWS: Mention support for rvalue references in GDB and python.
13950 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13951 supports both lvalue and rvalue references.
13952
15c0a2a9
AV
139532017-03-20 Artemiy Volkov <artemiyv@acm.org>
13954
13955 PR gdb/14441
13956 * gdbtypes.c (rank_one_type): Implement overloading
13957 resolution rules regarding rvalue references.
13958
aa006118
AV
139592017-03-20 Artemiy Volkov <artemiyv@acm.org>
13960
13961 PR gdb/14441
13962 * aarch64-tdep.c (aarch64_type_align)
13963 (aarch64_extract_return_value, aarch64_store_return_value): Change
13964 lvalue reference type checks to general reference type checks.
13965 * amd64-tdep.c (amd64_classify): Likewise.
13966 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13967 Likewise.
13968 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13969 (arm_store_return_value): Likewise.
13970 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13971 * c-typeprint.c (c_print_type): Likewise.
13972 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13973 (cplus_number_of_children, cplus_describe_child): Likewise.
13974 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13975 * completer.c (expression_completer): Likewise.
13976 * cp-support.c (make_symbol_overload_list_adl_namespace):
13977 Likewise.
13978 * darwin-nat-info.c (info_mach_region_command): Likewise.
13979 * dwarf2loc.c (entry_data_value_coerce_ref)
13980 (value_of_dwarf_reg_entry): Likewise.
13981 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13982 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13983 Likewise.
13984 * findvar.c (extract_typed_address, store_typed_address):
13985 Likewise.
13986 * gdbtypes.c (rank_one_type): Likewise.
13987 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13988 * infcall.c (value_arg_coerce): Likewise.
13989 * language.c (pointer_type): Likewise.
13990 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13991 Likewise.
13992 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13993 * mn10300-tdep.c (mn10300_type_align): Likewise.
13994 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13995 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13996 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13997 Likewise.
13998 * printcmd.c (print_formatted, x_command): Likewise.
13999 * python/py-type.c (typy_get_composite, typy_template_argument):
14000 Likewise.
14001 * python/py-value.c (valpy_referenced_value)
14002 (valpy_get_dynamic_type, value_has_field): Likewise.
14003 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14004 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14005 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14006 * spu-tdep.c (spu_scalar_value_p): Likewise.
14007 * symtab.c (lookup_symbol_aux): Likewise.
14008 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14009 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14010 Likewise.
14011 * valops.c (value_cast_pointers, value_cast)
14012 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14013 (value_struct_elt, value_struct_elt_bitpos)
14014 (value_find_oload_method_list, find_overload_match)
14015 (value_rtti_indirect_type): Likewise.
14016 * valprint.c (val_print_scalar_type_p, generic_val_print):
14017 Likewise.
14018 * value.c (value_actual_type, value_as_address, unpack_long)
14019 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14020 (coerce_ref): Likewise.
14021 * varobj.c (varobj_get_value_type): Likewise.
14022
3fcf899d
AV
140232017-03-20 Artemiy Volkov <artemiyv@acm.org>
14024
14025 PR gdb/14441
14026 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14027 table of constants.
14028 * python/lib/gdb/command/explore.py: Support exploring values
14029 of rvalue reference types.
14030 * python/lib/gdb/types.py: Implement get_basic_type() for
14031 rvalue reference types.
14032 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14033 constant.
14034 * python/py-value.c (valpy_getitem): Add an rvalue reference
14035 check.
14036 (valpy_reference_value): Add new parameter "refcode".
14037 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14038 New wrappers for valpy_reference_value().
14039 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14040 (gdbpy_invoke_xmethod): Likewise.
14041
4297a3f0
AV
140422017-03-20 Artemiy Volkov <artemiyv@acm.org>
14043
14044 PR gdb/14441
14045 * dwarf2read.c (process_die, read_type_die_1): Handle the
14046 DW_TAG_rvalue_reference_type DIE.
14047 (read_tag_reference_type): Add new parameter "refcode".
14048
e1cb3213
AV
140492017-03-20 Artemiy Volkov <artemiyv@acm.org>
14050
14051 PR gdb/14441
14052 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14053 (c_type_print_modifier, c_type_print_varspec_suffix)
14054 (c_type_print_base): Support printing rvalue reference types.
14055 * c-valprint.c (c_val_print, c_value_print): Support printing
14056 rvalue reference values.
14057
e4347c89
AV
140582017-03-20 Artemiy Volkov <artemiyv@acm.org>
14059
14060 PR gdb/14441
14061 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14062 typename.
14063 * cp-support.c (replace_typedefs): Handle
14064 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14065 * python/py-type.c (typy_lookup_type): Likewise.
14066
53cc15f5
AV
140672017-03-20 Artemiy Volkov <artemiyv@acm.org>
14068
14069 PR gdb/14441
14070 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14071 * parse.c (insert_type): Change assert statement.
14072 (follow_types): Handle rvalue reference types.
14073 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14074 constant.
14075
a65cfae5
AV
140762017-03-20 Artemiy Volkov <artemiyv@acm.org>
14077
14078 PR gdb/14441
14079 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14080 value_ref() interface.
14081 * c-valprint.c (c_value_print): Likewise.
14082 * infcall.c (value_arg_coerce): Likewise.
14083 * python/py-value.c (valpy_reference_value): Likewise.
14084 * valops.c (value_cast, value_reinterpret_cast)
14085 (value_dynamic_cast, typecmp): Likewise.
14086 (value_ref): Parameterize by kind of return value reference type.
14087 * value.h (value_ref): Add new parameter "refcode".
14088
3b224330
AV
140892017-03-20 Artemiy Volkov <artemiyv@acm.org>
14090
14091 PR gdb/14441
14092 * dwarf2read.c (read_tag_reference_type): Use
14093 lookup_lvalue_reference_type() instead of lookup_reference_type().
14094 * eval.c (evaluate_subexp_standard): Likewise.
14095 * f-exp.y: Likewise.
14096 * gdbtypes.c (make_reference_type, lookup_reference_type):
14097 Generalize with rvalue reference types.
14098 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14099 convenience wrappers for lookup_reference_type().
14100 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14101 reference kind parameter.
14102 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14103 wrappers for lookup_reference_type().
14104 * guile/scm-type.c (gdbscm_type_reference): Use
14105 lookup_lvalue_reference_type() instead of lookup_reference_type().
14106 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14107 * parse.c (follow_types): Likewise.
14108 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14109 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14110 Likewise.
14111 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14112 (gdbpy_invoke_xmethod): Likewise.
14113 * stabsread.c: Provide extra argument to make_reference_type()
14114 call.
14115 * valops.c (value_ref, value_rtti_indirect_type): Use
14116 lookup_lvalue_reference_type() instead of lookup_reference_type().
14117
f9aeb8d4
AV
141182017-03-20 Artemiy Volkov <artemiyv@acm.org>
14119
14120 PR gdb/14441
14121 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14122 (TYPE_IS_REFERENCE): New macro.
14123 (struct type): Add rvalue_reference_type field.
14124 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14125
51457a05
MAL
141262017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14127
14128 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14129 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14130 New function definition.
14131 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14132 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14133 New function declaration.
14134 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14135 * mi/mi-interp.h: New file.
14136 * solib.c (info_sharedlibrary_command): Replace for loop with
14137 ALL_SO_LIBS macro
14138 * solib.h (update_solib_list): New function declaration.
14139 (so_list_head): Move macro.
14140 * solist.h (ALL_SO_LIBS): New macro.
14141
e696b3ad
MAL
141422017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14143
14144 * infcmd.c (post_create_inferior): Remove unused argument in
14145 call to solib_add.
14146 * remote.c (remote_start_remote): Likewise.
14147 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14148 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14149 (enable_break): Likewise.
14150 * solib.c (update_solib_list): Remove unused target argument
14151 and its documentation.
14152 (solib_add): Remove unused target argument. Remove unused
14153 argument in call to update_solib_list.
14154 (info_sharedlibrary_command): Remove unused argument in call
14155 to update_solib_list.
14156 (sharedlibrary_command): Remove unused argument in call to
14157 solib_add.
14158 (handle_solib_event): Likewise.
14159 (reload_shared_libraries): Likewise.
14160 * solib.h (solib_add): Remove unused target argument.
14161
dcb84eda
AA
141622017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14163
14164 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14165 (s390_displaced_step_fixup): Cover relative branches with the
14166 default fixup handling. This fixes lack of support for some
14167 relative branch instructions.
14168
d9cb6cdc
SM
141692017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14170
14171 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14172 ptid from regcache.
14173
1afaf9f4
SM
141742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14175
14176 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14177 i386_darwin_store_inferior_registers): Use ptid from regcache.
14178
aac12e24
SM
141792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14180
14181 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14182 i386bsd_store_inferior_registers): Use ptid from regcache.
14183
bbe1eef1
SM
141842017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14185
14186 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14187 hppaobsd_store_registers): Use ptid from regcache.
14188
10799020
SM
141892017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14190
14191 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14192 hppanbsd_store_registers): Use ptid from regcache.
14193
00204cf7
SM
141942017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14195
14196 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14197 from regcache. Use get_ptrace_pid.
14198
11a33714
SM
141992017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14200
14201 * corelow.c (get_core_register_section): Use ptid from regcache,
14202 update doc.
14203
317cd492
SM
142042017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14205
14206 * bsd-uthread.c (bsd_uthread_fetch_registers,
14207 bsd_uthread_store_registers): Use ptid from regcache, set and
14208 restore inferior_ptid.
14209
9ac8a7c2
SM
142102017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14211
14212 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14213 fetch_fp_regs, store_register, store_regs, store_fp_register,
14214 store_fp_regs): Use ptid from regcache.
14215
4ac4bb6a
SM
142162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14217
14218 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14219 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14220 store_vfp_regs): Use ptid from regcache.
14221
9bcbdca8
PA
142222017-03-17 Pedro Alves <palves@redhat.com>
14223
14224 PR remote/21188
14225 * ser-base.c (ser_base_wait_for): Add comment.
14226 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14227 version.
14228 * ser-unix.c (hardwire_raw): Remove reference to
14229 scb->current_timeout.
14230 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14231 (hardwire_ops): Install ser_base_readchar instead of
14232 hardwire_readchar.
14233 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14234 Remove fields.
14235
7503099f
JG
142362017-03-17 Jonah Graham <jonah@kichwacoders.com>
14237
14238 PR gdb/19637
14239 * python/lib/gdb/printer/bound_registers.py: Add support for
14240 Python 3.
14241
7942e96e
AA
142422017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14243
14244 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14245 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14246 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14247 byte_offset to subobj_byte_offset. Fix the handling of
14248 DWARF_VALUE_STACK on big-endian targets when coming via an
14249 implicit pointer.
14250 (dwarf2_evaluate_loc_desc): Adjust call to
14251 dwarf2_evaluate_loc_desc_full.
14252 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14253 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14254
ba14f379
YQ
142552017-03-16 Yao Qi <yao.qi@linaro.org>
14256
14257 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14258 and REVSH instructions.
14259
b121eeb9
YQ
142602017-03-16 Yao Qi <yao.qi@linaro.org>
14261
14262 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14263 (arm_record_test): Declare.
14264 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14265 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14266 align with the manual.
14267 (thumb_record_misc): Adjust the code order to align with the
14268 manual.
14269 (thumb2_record_decode_insn_handler): Fix instruction matching.
14270 (instruction_reader_thumb): New class.
14271 (arm_record_test): New function.
14272
728a7913
YQ
142732017-03-16 Yao Qi <yao.qi@linaro.org>
14274
14275 * arm-tdep.c (abstract_memory_reader): New class.
14276 (instruction_reader): New class.
14277 (extract_arm_insn): Add argument 'reader'. Callers updated.
14278 (decode_insn): Likewise.
14279
34b43320
DE
142802017-03-16 Doug Evans <dje@google.com>
14281
a7c0469f
DE
14282 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14283 member. Change type of TYPE member to SCM. All uses updated.
14284 (lsscm_make_lazy_string_smob): Add assert.
14285 (lsscm_make_lazy_string): Flag bad length values.
14286 (lsscm_elt_type): New function.
14287 (gdbscm_lazy_string_to_value): Rewrite to use
14288 lsscm_safe_lazy_string_to_value.
14289 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14290 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14291 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14292 in incoming type.
14293 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14294 * guile/scm-type.c (tyscm_scm_to_type): New function.
14295
142962017-03-15 Doug Evans <dje@google.com>
14297
34b43320
DE
14298 PR python/17728, python/18439, python/18779
14299 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14300 member. Change type of TYPE member to PyObject *. All uses updated.
14301 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14302 (gdbpy_create_lazy_string_object): Flag bad length values.
14303 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14304 Handle typedefs in incoming type.
14305 (stpy_lazy_string_elt_type): New function.
14306 (gdbpy_extract_lazy_string): Call it.
14307 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14308 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14309 typedefs in incoming type.
14310
a3a5fecc
DE
143112017-03-16 Doug Evans <dje@google.com>
14312
14313 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14314 * guile/scm-type.c (tyscm_scm_to_type): New function.
14315
28f1c605
JW
143162017-03-16 Jiong Wang <jiong.wang@arm.com>
14317
14318 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14319 "ULONGEST" for "skip".
14320
87c336f6
AA
143212017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14322
14323 PR gdb/21220
14324 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14325 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14326 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14327 over ptrace peek/poke until end of buffer or error.
14328
cf81cf60
SM
143292017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14330
14331 * parse.c (length_of_subexp): Make static.
14332 * parser-defs.h (length_of_subexp): Remove.
14333
a379284a
AA
143342017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14335
14336 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14337 as well.
14338
8a6200ba
PA
143392017-03-14 Pedro Alves <palves@redhat.com>
14340
14341 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14342 (main): Use std::unique_ptr. Remove calls to
14343 cp_demangled_name_parse_free.
14344
f79ec206
SM
143452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14346
14347 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14348 alphabsd_store_inferior_registers): Use regcache->ptid instead
14349 of inferior_ptid.
14350
edb5fb00
SM
143512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14352
14353 * aix-thread.c (aix_thread_fetch_registers,
14354 aix_thread_store_registers): Use regcache->ptid instead of
14355 inferior_ptid.
14356
55119686
SM
143572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14358
14359 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14360 store_gregs_to_thread, fetch_fpregs_from_thread,
14361 store_fpregs_to_thread): Use regcache->ptid instead of
14362 inferior_ptid.
14363
6a06fbb7
SM
143642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14365
14366 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14367 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14368 instead of inferior_ptid.
14369
c6386875
SM
143702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14371
14372 * target.c (target_fetch_registers, target_store_registers): Add
14373 assert.
14374
ddaaf0fb
SM
143752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14376
14377 * regcache.h (regcache_get_ptid): New function.
14378 * regcache.c (regcache_get_ptid): New function.
14379
b9da89d1 143802017-03-13 Mark Wielaard <mark@klomp.org>
14381
14382 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14383
5f4d1085
KS
143842017-03-10 Keith Seitz <keiths@redhat.com>
14385
14386 PR c++/8218
14387 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14388
c65d6b55
PA
143892017-03-08 Pedro Alves <palves@redhat.com>
14390
14391 PR gdb/18360
14392 * infrun.c (start_step_over, do_target_resume, resume)
14393 (restart_threads): Assert we're not resuming a thread that is
14394 meant to be stopped.
14395 (infrun_thread_stop_requested_callback): Delete.
14396 (infrun_thread_stop_requested): If the thread is internally
14397 stopped, queue a pending stop event and clear the thread's
14398 inline-frame state.
14399 (handle_stop_requested): New function.
14400 (handle_syscall_event, handle_inferior_event_1): Use
14401 handle_stop_requested.
14402 (handle_stop_requested): New function.
14403 (handle_signal_stop): Set the thread's stop_signal here instead of
14404 at caller.
14405 (finish_step_over): Clear step over info unconditionally.
14406 (handle_signal_stop): If the user had interrupted the event
14407 thread, consider the stop a random signal.
14408 (handle_signal_stop) <signal arrived while stepping over
14409 breakpoint>: Don't restart threads here.
14410 (stop_waiting): Don't clear step-over info here.
14411
15c22686
PA
144122017-03-08 Pedro Alves <palves@redhat.com>
14413
14414 PR 21206
14415 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14416 goes to argument 2, not 1.
14417
6e5d74e7
PA
144182017-03-08 Pedro Alves <palves@redhat.com>
14419
14420 PR cli/21218
14421 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14422 display_gdb_prompt.
14423 (command_line_input): Add comment.
14424
9753a2f6
PA
144252017-03-08 Pedro Alves <palves@redhat.com>
14426
14427 PR tui/21216
14428 * tui/tui-file.c (tui_file::write): New.
14429 * tui/tui-file.h (tui_file): Override "write".
14430 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14431 factored out from ...
14432 (tui_puts): ... here.
14433 (tui_putc): Use them.
14434 (tui_write): New function.
14435 * tui/tui-io.h (tui_write): Declare.
14436
1672e0d9
SDJ
144372017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14438
14439 * Makefile.in (SFILES): Replace "environ.c" with
14440 "common/environ.c".
14441 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14442 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14443 to...
14444 * common/environ.c: ... here.
14445 * environ.h: Moved to...
14446 * common/environ.h: ... here.
14447
f7bb4e3a
PB
144482017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14449
14450 * gdbarch.sh (pstring_ptr): New static function.
14451 (gdbarch_disassembler_options): Use it.
14452 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14453 not valid_disassembler_option->name.
14454 * gdbarch.c: Regenerate.
14455
e45ced6c
PB
144562017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14457
14458 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14459
5f6fd321
PA
144602017-03-07 Pedro Alves <palves@redhat.com>
14461
14462 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14463
6dbb839a 144642017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
14465
14466 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14467 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14468 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 14469 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 14470
d274ecf4
SM
144712017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14472
14473 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14474
df97be55
SM
144752017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14476
14477 * remote.c (remote_add_target_side_commands): Use range-based
14478 for loop.
14479
7d45f3df
YQ
144802017-03-03 Yao Qi <yao.qi@linaro.org>
14481
14482 PR gdb/21165
14483 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14484 value is lazy.
14485 * valprint.c (common_val_print): Likewise.
14486
65b48a81
PB
144872017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14488
14489 * NEWS: Mention new set/show disassembler-options commands.
14490 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14491 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14492 (prospective_options): New static variable.
14493 (gdb_disassembler::gdb_disassembler): Initialize
14494 m_di.disassembler_options.
14495 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14496 (get_disassembler_options): New function.
14497 (set_disassembler_options): Likewise.
14498 (set_disassembler_options_sfunc): Likewise.
14499 (show_disassembler_options_sfunc): Likewise.
14500 (disassembler_options_completer): Likewise.
14501 (_initialize_disasm): Likewise.
14502 * disasm.h (get_disassembler_options): New prototype.
14503 (set_disassembler_options): Likewise.
14504 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14505 (gdbarch_verify_disassembler_options): Likewise.
14506 * gdbarch.c: Regenerate.
14507 * gdbarch.h: Likewise.
14508 * arm-tdep.c (num_disassembly_options): Delete.
14509 (set_disassembly_style): Likewise.
14510 (arm_disassembler_options): New static variable.
14511 (set_disassembly_style_sfunc): Convert short style name into long
14512 option name. Call set_disassembler_options.
14513 (show_disassembly_style_sfunc): New function.
14514 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14515 set_gdbarch_verify_disassembler_options.
14516 (_initialize_arm_tdep): Delete regnames variable and update callers.
14517 (arm_disassembler_options): Initialize.
14518 (disasm_options): New variable.
14519 (num_disassembly_options): Rename from this...
14520 (num_disassembly_styles): ...to this. Compute by scanning through
14521 disasm_options.
14522 (valid_disassembly_styles): Initialize using disasm_options.
14523 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14524 set_arm_regname_option.
14525 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14526 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14527 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14528 set_gdbarch_verify_disassembler_options.
14529 * s390-tdep.c (s390_disassembler_options): New static variable.
14530 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14531 set_gdbarch_verify_disassembler_options.
14532
d538e36d
SM
145332017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14534
14535 * remote.c (remote_add_target_side_condition): Remove "struct"
14536 keyword from range-based for loop.
14537
83621223
SM
145382017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14539
14540 * remote.c (remote_add_target_side_condition): Use range-based
14541 for loop. Update comment.
14542
2123df0e
YQ
145432017-02-27 Yao Qi <yao.qi@linaro.org>
14544
14545 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14546
8e368124
AH
145472017-02-26 Alan Hayward <alan.hayward@arm.com>
14548
14549 * regcache.c (regcache_raw_update): New function.
14550 (regcache_raw_read): Move code to regcache_raw_update.
14551 * regcache.h (regcache_raw_update): New declaration.
14552 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14553
a49dd8dd
JK
145542017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14555
14556 * dwarf2read.c (create_debug_type_hash_table): Initialize
14557 header.signature and header.type_offset_in_tu.
14558
34e4bae9
PA
145592017-02-24 Pedro Alves <palves@redhat.com>
14560
14561 * symtab.c (make_file_symbol_completion_list_1): Use
14562 add_symtab_completions.
14563
b0e4b369
AH
145642017-02-24 Alan Hayward <alan.hayward@arm.com>
14565
14566 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14567
975c21ab
AH
145682017-02-24 Alan Hayward <alan.hayward@arm.com>
14569
14570 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14571 I386_MAX_REGISTER_SIZE.
14572 (i386_pseudo_register_write): Likewise.
14573 (i386_process_record): Likewise.
14574 * i387-tdep.c (i387_supply_xsave): Likewise.
14575 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14576 (store_register): Likewise.
14577
14bc53a8
PA
145782017-02-23 Pedro Alves <palves@redhat.com>
14579
14580 * ada-lang.c: Include "common/function-view.h".
14581 (ada_iterate_over_symbols): Adjust to use function_view as
14582 callback type.
14583 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14584 (ada_make_symbol_completion_list): Use a lambda.
14585 (ada_exc_search_name_matches): Delete.
14586 (name_matches_regex): New.
14587 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14588 * compile/compile-c-support.c: Include "common/function-view.h".
14589 (print_one_macro): Change prototype to accept a ui_file pointer.
14590 (write_macro_definitions): Use a lambda.
14591 * dwarf2read.c: Include "common/function-view.h".
14592 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14593 (dw2_expand_symtabs_matching): Adjust to use function_view as
14594 callback type.
14595 * language.h: Include "common/function-view.h".
14596 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14597 function_view as callback type.
14598 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14599 * linespec.c: Include "common/function-view.h".
14600 (collect_info::add_symbol): New method.
14601 (struct symbol_and_data_callback, iterate_inline_only, struct
14602 symbol_matcher_data, iterate_name_matcher): Delete.
14603 (iterate_over_all_matching_symtabs): Adjust to use function_view
14604 as callback type and lambdas.
14605 (iterate_over_file_blocks): Adjust to use function_view as
14606 callback type.
14607 (decode_compound_collector): Now a class with private fields.
14608 (decode_compound_collector::release_symbols): New method.
14609 (collect_one_symbol): Rename to...
14610 (decode_compound_collector::operator()): ... this and adjust.
14611 (lookup_prefix_sym): decode_compound_collector construction bits
14612 move to decode_compound_collector ctor. Pass the
14613 decode_compound_collector object directly as callback. Remove
14614 cleanups and use decode_compound_collector::release_symbols
14615 instead.
14616 (symtab_collector): Now a class with private fields.
14617 (symtab_collector::release_symtabs): New method.
14618 (add_symtabs_to_list): Rename to...
14619 (symtab_collector::operator()): ... this and adjust.
14620 (collect_symtabs_from_filename): symtab_collector construction
14621 bits move to symtab_collector ctor. Pass the symtab_collector
14622 object directly as callback. Remove cleanups and use
14623 symtab_collector::release_symtabs instead.
14624 (collect_symbols): Delete.
14625 (add_matching_symbols_to_info): Use lambdas.
14626 * macrocmd.c (print_macro_callback): Delete.
14627 (info_macro_command): Use a lambda.
14628 (info_macros_command): Pass print_macro_definition as callable
14629 directly.
14630 (print_one_macro): Remove 'ignore' parameter.
14631 (macro_list_command): Adjust.
14632 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14633 (macro_for_each_data::user_data): Delete field.
14634 (foreach_macro): Adjust to call the function_view.
14635 (macro_for_each): Adjust to use function_view as callback type.
14636 (foreach_macro_in_scope): Adjust to call the function_view.
14637 (macro_for_each_in_scope): Adjust to use function_view as callback
14638 type.
14639 * macrotab.h: Include "common/function-view.h".
14640 (macro_callback_fn): Declare a prototype instead of a pointer.
14641 Remove "user_data" parameter.
14642 (macro_for_each, macro_for_each_in_scope): Adjust to use
14643 function_view as callback type.
14644 * psymtab.c (partial_map_expand_apply)
14645 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14646 Adjust to use function_view as callback type and to return bool.
14647 (psym_expand_symtabs_matching): Adjust to use function_view as
14648 callback types.
14649 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14650 to use function_view as callback type and to return bool.
14651 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14652 callback types.
14653 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14654 as callback types.
14655 * symfile.h: Include "common/function-view.h".
14656 (expand_symtabs_file_matcher_ftype)
14657 (expand_symtabs_symbol_matcher_ftype)
14658 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14659 return bool.
14660 (quick_symbol_functions::map_symtabs_matching_filename)
14661 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14662 function_view as callback type and return bool.
14663 (expand_symtabs_matching): Adjust to use function_view as callback
14664 type.
14665 (maintenance_expand_name_matcher)
14666 (maintenance_expand_file_matcher): Delete.
14667 (maintenance_expand_symtabs): Use lambdas.
14668 * symtab.c (iterate_over_some_symtabs): Adjust to use
14669 function_view as callback types and return bool.
14670 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14671 of a cleanup.
14672 (lookup_symtab_callback): Delete.
14673 (lookup_symtab): Use a lambda.
14674 (iterate_over_symbols): Adjust to use function_view as callback
14675 type.
14676 (struct search_symbols_data, search_symbols_file_matches)
14677 (search_symbols_name_matches): Delete.
14678 (search_symbols): Use a pair of lambdas.
14679 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14680 (symtab_expansion_callback): Delete.
14681 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14682 * symtab.h: Include "common/function-view.h".
14683 (iterate_over_some_symtabs): Adjust to use function_view as
14684 callback type and return bool.
14685 (iterate_over_symtabs): Adjust to use function_view as callback
14686 type.
14687 (symbol_found_callback_ftype): Remove 'data' parameter and return
14688 bool.
14689 (iterate_over_symbols): Adjust to use function_view as callback
14690 type.
14691
07e253aa
PA
146922017-02-23 Pedro Alves <palves@redhat.com>
14693
14694 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14695 (%.o) <unittests/%.c>: New pattern.
14696 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14697 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14698 * common/function-view.h: New file.
14699 * unittests/function-view-selftests.c: New file.
14700 * configure: Regenerate.
14701
8eaf5320
SM
147022017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14703
14704 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14705 inferior_ptid.
14706 * go32-nat.c (go32_thread_alive): Likewise.
14707
38768751
YQ
147082017-02-23 Yao Qi <yao.qi@linaro.org>
14709
14710 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14711 delete.
14712
0a8beaba
YQ
147132017-02-23 Yao Qi <yao.qi@linaro.org>
14714
14715 * varobj.c (varobj_clear_saved_item): Use delete instead of
14716 xfree.
14717 (update_dynamic_varobj_children): Likewise.
14718
58fdfd2c
JK
147192017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14720
14721 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14722
1b90b139
SM
147232017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14724
14725 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14726 m_enum_value to 0 in default constructor.
14727
2039d74e
EBM
147282017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14729
14730 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14731 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14732 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14733 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14734 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14735 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14736 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14737 IS_STORE_CONDITIONAL_INSN.
14738
7814882a
JK
147392017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14740
14741 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14742
0ae60b63
JK
147432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14744
14745 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14746
0224619f
JK
147472017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14748
14749 * dwarf2read.c (skip_one_die, read_attribute_value)
14750 (dwarf2_const_value_attr, dump_die_shallow)
14751 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14752 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14753
0af92d60
JK
147542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14755
14756 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14757 (dwarf_parse_macro_header): Accept DWARF version 5.
14758 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14759
216f72a1
JK
147602017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14761
14762 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14763 DW_AT_GNU_*.
14764 * common/common-exceptions.h (enum errors): Likewise.
14765 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14766 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14767 (dwarf_expr_context::execute_stack_op): Likewise.
14768 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14769 Likewise.
14770 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14771 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14772 (show_entry_values_debug, call_site_to_target_addr)
14773 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14774 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14775 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14776 (value_of_dwarf_block_entry, indirect_pieced_value)
14777 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14778 (disassemble_dwarf_expression): Likewise.
14779 * dwarf2read.c (process_die, inherit_abstract_dies)
14780 (read_call_site_scope): Likewise.
14781 * gdbtypes.h (struct func_type, struct call_site_parameter)
14782 (struct call_site): Likewise.
14783 * stack.c (read_frame_arg): Likewise.
14784 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14785
43988095
JK
147862017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14787
14788 * defs.h (read_unsigned_leb128): New declaration.
14789 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14790 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14791 (dwarf2_find_location_expression): Call also
14792 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14793 * dwarf2loc.h (dwarf2_version): New declaration.
14794 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14795 rnglists.
14796 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14797 .debug_rnglists.
14798 (struct dwop_section_names): Add loclists_dwo.
14799 (dwop_section_names): Add .debug_loclists.dwo.
14800 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14801 (struct dwarf2_per_cu_data): Add dwarf_version.
14802 (struct dwo_sections): Add loclists.
14803 (struct attr_abbrev): Add implicit_const.
14804 (read_indirect_line_string): New declaration.
14805 (read_unsigned_leb128): Delete declaration.
14806 (rcuh_kind): New definition.
14807 (read_and_check_comp_unit_head): Change parameter
14808 is_debug_types_section to section_kind.
14809 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14810 (read_comp_unit_head): Change parameter abfd to section, add parameter
14811 section_kind. Handle DWARF-5.
14812 (error_check_comp_unit_head): Accept also DWARF version 5.
14813 (read_and_check_comp_unit_head): Change parameter
14814 is_debug_types_section to section_kind.
14815 (read_and_check_type_unit_head): Delete function.
14816 (read_abbrev_offset): Handle DWARF-5.
14817 (create_debug_type_hash_table): Add parameter section_kind. Process
14818 only DW_UT_type. Use signature and type_offset_in_tu from struct
14819 comp_unit_head.
14820 (create_debug_types_hash_table): Update create_debug_type_hash_table
14821 caller.
14822 (create_all_type_units): Call create_debug_type_hash_table.
14823 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14824 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14825 caller.
14826 (skip_one_die): Handle DW_FORM_implicit_const.
14827 (dwarf2_rnglists_process): New function.
14828 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14829 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14830 (read_attribute_value): Handle DW_FORM_implicit_const,
14831 DW_FORM_line_strp.
14832 (read_attribute): Handle DW_FORM_implicit_const.
14833 (read_indirect_string_at_offset_from): New function from
14834 read_indirect_string_at_offset.
14835 (read_indirect_string_at_offset): Call
14836 read_indirect_string_at_offset_from.
14837 (read_indirect_line_string_at_offset): New function.
14838 (read_indirect_string): New function comment.
14839 (read_indirect_line_string): New function.
14840 (read_unsigned_leb128): Make it global.
14841 (dwarf2_string_attr): Handle DWARF-5.
14842 (add_include_dir_stub, read_formatted_entries): New functions.
14843 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14844 Handle DWARF-5.
14845 (per_cu_header_read_in): Update read_comp_unit_head caller.
14846 (dwarf2_version): New function.
14847 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14848 rnglists.
14849 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14850 fields.
14851
22d2f3ab
JK
148522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14853
14854 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14855
5f46c5a5
JK
148562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14857
14858 * dwarf2read.c (dwarf2_ranges_process): New function from
14859 dwarf2_ranges_read.
14860 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14861 dwarf2_ranges_process.
14862
78d4d2c5
JK
148632017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14864
14865 * dwarf2read.c (create_debug_type_hash_table): New function from
14866 create_debug_types_hash_table.
14867 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14868 (create_all_type_units, open_and_init_dwo_file): Update
14869 create_debug_types_hash_table callers.
14870
1b076f25
SDJ
148712017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14872
14873 PR gdb/16188
14874 * fork-child.c (trace_start_error): Fix thinko. va_end should
14875 refer to 'ap', not 'args'.
14876
0db8980c
SDJ
148772017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14878 Pedro Alves <palves@redhat.com>
14879
14880 PR gdb/16188
14881 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14882 calls succeeded.
14883 * fork-child.c (trace_start_error): New function.
14884 (trace_start_error_with_name): Likewise.
14885 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14886 * inf-ptrace.c (inf_ptrace_me): Likewise.
14887 * inferior.h (trace_start_error): New prototype.
14888 (trace_start_error_with_name): Likewise.
14889
99e8a4f9
SDJ
148902017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14891
14892 PR gdb/21164
14893 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14894 NULL before using it.
14895 * symmisc.c (maintenance_print_symbols): Likewise.
14896 (maintenance_print_msymbols): Likewise.
14897
4e746bb6
TW
148982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14899
14900 * NEWS: Add record Python bindings entry.
14901
149022017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14903
14904 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14905 py-record-full.o.
14906 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14907 * python/py-record-btrace.c, python/py-record-btrace.h,
14908 python/py-record-full.c, python/py-record-full.h: New file.
14909 * python/py-record.c: Add include for py-record-btrace.h and
14910 py-record-full.h.
14911 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14912 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14913 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14914 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14915 New definition.
14916 (gdbpy_initialize_btrace): New export.
14917 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14918
149192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14920
14921 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14922 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14923 * python/py-record.c: New file.
14924 * python/python-internal.h (gdbpy_start_recording,
14925 gdbpy_current_recording, gdpy_stop_recording,
14926 gdbpy_initialize_record): New export.
14927 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14928 (python_GdbMethods): Add gdbpy_start_recording,
14929 gdbpy_current_recording and gdbpy_stop_recording.
14930
149312017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14932
14933 * record-btrace.c (record_btrace_record_method): New function.
14934 (init_record_btrace_ops): Initialize to_record_method.
14935 * record-full.c (record_full_record_method): New function.
14936 (init_record_full_ops, init_record_full_core_ops): Add
14937 record_full_record_method.
14938 * record.h (enum record_method): New enum.
14939 * target-debug.h (target_debug_print_enum_record_method: New define.
14940 * target-delegates.c: Regenerate.
14941 * target.c (target_record_method): New function.
14942 * target.h: Include record.h.
14943 (struct target_ops) <to_record_method>: New field.
14944 (target_record_method): New export.
14945
149462017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14947
14948 * record.h (record_start, record_stop): New export.
14949 * record.c (record_start, record_stop): New function.
14950
149512017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14952
14953 * btrace.c (btrace_fetch): Copy function call segments pointer
14954 into a vector.
14955 (btrace_clear): Clear the vector.
14956 (btrace_find_insn_by_number): Use binary search to find the correct
14957 function call segment.
14958 * btrace.h (brace_fun_p): New typedef.
14959 (struct btrace_thread_info) <functions>: New field.
14960
149612017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14962
14963 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14964 * btrace.c (btrace_decode_error): ... here. New function.
14965 * btrace.h (btrace_decode_error): New export.
14966
149672017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14968
14969 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14970 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14971 btrace_find_insn_by_number): Remove special case for gaps.
14972 * btrace.h (btrace_insn_get_error): New export.
14973 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14974 * record-btrace.c (btrace_insn_history): Print number for gaps.
14975 (record_btrace_info, record_btrace_goto): Handle gaps.
14976
3f77c769
TT
149772017-02-14 Tom Tromey <tom@tromey.com>
14978
14979 PR python/13598:
14980 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14981 event.
14982 * python/py-evts.c (gdbpy_initialize_py_events): Add
14983 before_prompt registry.
14984 * python/py-events.h (events_object) <before_prompt>: New field.
14985
4c2c7ac6
MM
149862017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14987
14988 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14989
5cf30ebf
LM
149902017-02-13 Luis Machado <lgustavo@codesourcery.com>
14991
14992 * symfile (_initialize_symfile): Add usage text to the load command's
14993 help text.
14994
26a06916
SM
149952017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14996
14997 * utils.c (defaulted_query): Don't query on secondary UIs.
14998
0b145e37
TT
149992017-02-10 Tom Tromey <tom@tromey.com>
15000
15001 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15002
2d8365c4
TT
150032017-02-10 Tom Tromey <tom@tromey.com>
15004
15005 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15006 "cleanup" local.
15007 * python/py-type.c (typy_legacy_template_argument): Remove
15008 unnecessary "cleanup" local.
15009
2bb8f231
TT
150102017-02-10 Tom Tromey <tom@tromey.com>
15011
15012 * python/python.c (do_start_initialization): New function, from
15013 _initialize_python.
15014 (_initialize_python): Call do_start_initialization.
15015 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15016 goto.
15017
1bdfaf42
TT
150182017-02-10 Tom Tromey <tom@tromey.com>
15019
15020 * python/py-prettyprint.c (pretty_print_one_value): Use
15021 gdbpy_ref.
15022
88b6faea
TT
150232017-02-10 Tom Tromey <tom@tromey.com>
15024
15025 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15026 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15027 gdbpy_ref.
15028 * python/py-type.c (field_new): Use gdbpy_ref.
15029 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15030 gdbpy_ref.
15031 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15032 (py_free_pspace): Likewise.
15033 (pspace_to_pspace_object): Likewise.
15034 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15035 (py_free_objfile): Likewise.
15036 (objfile_to_objfile_object): Likewise.
15037 * python/py-inferior.c (delete_thread_object): Use
15038 gdbpy_ref.
15039 (infpy_read_memory): Likewise.
15040 (py_free_inferior): Likewise.
15041 * python/py-evtregistry.c (create_eventregistry_object): Use
15042 gdbpy_ref.
15043 * python/py-event.c (create_event_object): Use gdbpy_ref.
15044
7780f186
TT
150452017-02-10 Tom Tromey <tom@tromey.com>
15046
15047 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15048 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15049 used.
15050 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15051 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15052 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15053 python/py-framefilter.c, python/py-function.c,
15054 python/py-inferior.c, python/py-infevents.c,
15055 python/py-linetable.c, python/py-newobjfileevent.c,
15056 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15057 python/py-signalevent.c, python/py-stopevent.c,
15058 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15059 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15060 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15061 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15062
d4b0bb18
TT
150632017-02-10 Tom Tromey <tom@tromey.com>
15064
15065 * ui-out.h (ui_out_emit_type): New class.
15066 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15067 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15068 and ui_out_emit_tuple.
15069 (enumerate_locals): Likewise.
15070 (py_mi_print_variables, py_print_locals, py_print_args): Use
15071 ui_out_emit_list.
15072 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15073 ui_out_emit_list.
15074 * common/gdb_optional.h: New file.
15075
f67f945c
MG
150762017-02-10 Martin Galvan <martingalvan@sourceware.org>
15077
15078 * MAINTAINERS (Write After Approval): Update my e-mail address.
15079
18da0c51
MG
150802017-02-10 Martin Galvan <martingalvan@sourceware.org>
15081
15082 PR gdb/21122
15083 * breakpoint.c (_initialize_breakpoint): Update the help description
15084 of the 'commands' command to indicate that it takes a list argument.
15085
62c14536
SM
150862017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15087
15088 * interps.c (current_interp_set_logging): Remove "return".
15089
ff6fa247
GB
150902017-02-09 Gary Benson <gbenson@redhat.com>
15091
15092 * symtab.c (add_symtab_completions): Prevent NULL pointer
15093 dereference.
15094
a474bd8e
PA
150952017-02-08 Pedro Alves <palves@redhat.com>
15096
15097 * interps.c (interp::interp): Remove reference to quiet_p.
15098 (interp_set): Make static. Remove dead "Switching to" output
15099 code.
15100 (interp_quiet_p, interp_set_quiet): Delete.
15101 (interpreter_exec_cmd): Don't set the interpreter quiet.
15102 * interps.h (interp_quiet_p): Make static.
15103 (class interp) <quiet_p>: Remove field
15104
3d7b173c
JG
151052017-02-08 Jerome Guitton <guitton@adacore.com>
15106
604c4576
JG
15107 * cli/cli-decode.c (find_command_name_length): Make it extern.
15108 * cli/cli-decode.h (find_command_name_length): Declare.
15109 * cli/cli-script.c (command_name_equals, line_first_arg):
15110 New functions.
15111 (process_next_line): Use cli-decode to parse command names.
15112 (build_command_line): Make args a constant pointer.
15113
151142017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 15115
3d7b173c
JG
15116 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15117 Remove case-insensitive search.
15118
1291063d
JM
151192017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15120
15121 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15122 at the end of the line. Avoids an ARI warning.
15123
20b477a7
LM
151242017-02-06 Luis Machado <lgustavo@codesourcery.com>
15125
15126 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15127 rdseed instructions.
15128 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15129
3f7b46f2
IR
151302017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15131
15132 PR tdep/20936
15133 Provide and use sparc32 and sparc64 target description XML files.
15134 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15135 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15136 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15137 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15138 * features/sparc/sparc32-solaris.xml: New file.
15139 * features/sparc/sparc64-solaris.xml: New file.
15140 * features/sparc/sparc32-solaris.c: Generated.
15141 * features/sparc/sparc64-solaris.c: Generated.
15142 * sparc-tdep.h: Account for differences in target descriptions.
15143 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15144 (sparc32_register_type): Use target provided registers.
15145 (validate_tdesc_registers): New function.
15146 (sparc32_gdbarch_init): Use tdesc_has_registers.
15147 Set pseudoregister functions.
15148 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15149 (sparc64_register_type): Use target provided registers.
15150 (sparc64_init_abi): Set pseudoregister functions.
15151
f0fd41c1
TT
151522017-02-03 Tom Tromey <tom@tromey.com>
15153
15154 PR rust/21097:
15155 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15156 with a single member.
15157
d6f9b0fb
PA
151582017-02-03 Pedro Alves <palves@redhat.com>
15159
15160 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15161 (cli_interp_base::~cli_interp_base): New.
15162 (cli_interp): New struct.
15163 (as_cli_interp): Cast the interp itself to cli_interp.
15164 (cli_interpreter_pre_command_loop): Rename to ...
15165 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15166 parameter.
15167 (cli_interpreter_init): Rename to ...
15168 (cli_interp::init): ... this. Remove 'self' parameter. Use
15169 boolean. Make extern.
15170 (cli_interpreter_resume): Rename to ...
15171 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15172 extern.
15173 (cli_interpreter_suspend): Rename to ...
15174 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15175 extern.
15176 (cli_interpreter_exec): Rename to ...
15177 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15178 extern.
15179 (cli_interpreter_supports_command_editing): Rename to ...
15180 (cli_interp_base::supports_command_editing): ... this. Remove
15181 'interp' parameter. Make extern.
15182 (cli_ui_out): Rename to ...
15183 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15184 Make extern.
15185 (cli_set_logging): Rename to ...
15186 (cli_interp_base::set_logging): ... this. Remove 'interp'
15187 parameter. Make extern.
15188 (cli_interp_procs): Delete.
15189 (cli_interp_factory): Adjust to use "new".
15190 * cli/cli-interp.h: Include "interps.h".
15191 (struct cli_interp_base): New struct.
15192 * interps.c (struct interp): Delete. Fields moved to interps.h.
15193 (interp_new): Delete.
15194 (interp::interp, interp::~interp): New.
15195 (interp_set): Use bool, and return void. Assume the interpreter
15196 has suspend, init and resume methods, and that the all return
15197 void.
15198 (set_top_level_interpreter): interp_set returns void.
15199 (interp_ui_out): Adapt.
15200 (current_interp_set_logging): Adapt.
15201 (interp_data): Delete.
15202 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15203 (interp_exec): Adapt.
15204 (top_level_interpreter_data): Delete.
15205 * interps.h (interp_init_ftype, interp_resume_ftype)
15206 (interp_suspend_ftype, interp_exec_ftype)
15207 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15208 (class interp): New.
15209 (interp_new): Delete.
15210 (interp_set): Now returns void. Use bool.
15211 (interp_data, top_level_interpreter_data): Delete.
15212 * mi/mi-common.h: Include interps.h.
15213 (class mi_interp): Inherit from interp. Define a ctor. Declare
15214 init, resume, suspect, exec, interp_ui_out, set_logging and
15215 pre_command_loop methods.
15216 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15217 (mi_interpreter_init): Rename to ...
15218 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15219 bool, return void and make extern. Adjust.
15220 (mi_interpreter_resume): ... Rename to ...
15221 (mi_interp::resume): ... this. Remove the 'data' parameter,
15222 return void and make extern. Adjust.
15223 (mi_interpreter_suspend): ... Rename to ...
15224 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15225 return void and make extern. Adjust.
15226 (mi_interpreter_exec): ... Rename to ...
15227 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15228 extern. Adjust.
15229 (mi_interpreter_pre_command_loop): ... Rename to ...
15230 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15231 parameter and make extern.
15232 (mi_on_normal_stop_1): Adjust.
15233 (mi_ui_out): Rename to ...
15234 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15235 parameter and make extern. Adjust.
15236 (mi_set_logging): Rename to ...
15237 (mi_interp::set_logging): ... this. Remove the 'interp'
15238 parameter and make extern. Adjust.
15239 (mi_interp_procs): Delete.
15240 (mi_interp_factory): Adjust to use 'new'.
15241 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15242 (mi_print_exception, mi_execute_command, mi_load_progress):
15243 Adjust.
15244 * tui/tui-interp.c (tui_interp): New class.
15245 (as_tui_interp): Return a tui_interp pointer.
15246 (tui_on_normal_stop, tui_on_signal_received)
15247 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15248 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15249 to use interp::interp_ui_out.
15250 (tui_init): Rename to ...
15251 (tui_interp::init): ... this. Remove the 'self' parameter, use
15252 bool, return void and make extern. Adjust.
15253 (tui_resume): Rename to ...
15254 (tui_interp::resume): ... this. Remove the 'data' parameter,
15255 return void and make extern. Adjust.
15256 (tui_suspend): Rename to ...
15257 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15258 return void and make extern. Adjust.
15259 (tui_ui_out): Rename to ...
15260 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15261 parameter, and make extern. Adjust.
15262 (tui_exec): Rename to ...
15263 (tui_interp::exec): ... this. Remove the 'data' parameter and
15264 make extern.
15265 (tui_interp_procs): Delete.
15266 (tui_interp_factory): Use "new".
15267
65c40c95
TT
152682017-02-02 Tom Tromey <tom@tromey.com>
15269
15270 * rust-exp.y (ends_raw_string, space_then_number)
15271 (rust_identifier_start_p): Return bool.
15272 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15273 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15274 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15275 (rust_chartype_p): Return bool.
15276 (val_print_struct, rust_print_struct_def, rust_print_type):
15277 Update.
15278 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15279 Return bool.
15280
b50f188d
TT
152812017-02-02 Tom Tromey <tom@tromey.com>
15282
15283 * rust-lang.c: Reindent.
15284
03c85b11
TT
152852017-02-02 Tom Tromey <tom@tromey.com>
15286
15287 * rust-lang.h (rust_crate_for_block): Update.
15288 * rust-lang.c (rust_crate_for_block): Return std::string.
15289 (rust_get_disr_info): Use std:;string, not
15290 gdb::unique_xmalloc_ptr.
15291 * rust-exp.y (crate_name): Update.
15292
9b6da501
PA
152932017-02-02 Pedro Alves <palves@redhat.com>
15294
15295 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15296 field out of gdb_disassembler_test and make it static.
15297
ec4cb20b
PA
152982017-02-02 Pedro Alves <palves@redhat.com>
15299
15300 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15301 mi1_interp and mi_interp fields.
15302
5be5dbf0
PA
153032017-02-02 Pedro Alves <palves@redhat.com>
15304
616268b6
PA
15305 * cli/cli-interp.c (struct saved_output_files, saved_output):
15306 Moved from cli/cli-logging.c.
15307 (cli_set_logging): New function.
15308 (cli_interp_procs): Install cli_set_logging.
15309 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15310 Declare.
15311 * cli/cli-logging.c (struct saved_output_files, saved_output):
15312 Moved to cli/cli-interp.c.
15313 (pop_output_files): Don't save outputs here.
15314 (make_logging_output): New function.
15315 (handle_redirections): Don't build tee nor save previous outputs
15316 here.
15317 * interps.c (current_interp_set_logging): Change prototype.
15318 Assume there's always a set_logging_proc method installed.
15319 * interps.h (interp_set_logging_ftype): Change prototype.
15320 (current_interp_set_logging): Change prototype and adjust comment.
15321 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15322 use make_logging_output.
15323 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
153242017-02-02 Pedro Alves <palves@redhat.com>
15325
5be5dbf0
PA
15326 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15327 from ...
15328 (set_logging_overwrite): ... here.
15329 (logging_no_redirect_file): Delete.
15330 (set_logging_redirect): Don't handle redirection on the fly.
15331 Instead warn that "logging off" / "logging on" is necessary.
15332 (pop_output_files): Delete references to logging_no_redirect_file.
15333 (show_logging_command): Always speak in terms of what will happen
15334 once logging is reenabled.
15335
c99cc448
PA
153362017-02-02 Pedro Alves <palves@redhat.com>
15337
15338 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15339
8b172ce7
PA
153402017-02-02 Pedro Alves <palves@redhat.com>
15341
15342 * disasm.c (gdb_pretty_print_insn): Rename to ...
15343 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15344 Remove gdbarch parameter. Adapt to clear the object's buffers
15345 instead of allocating new buffers, and to print using the object's
15346 gdb_disassembler instead of calling gdb_print_insn.
15347 (dump_insns): Use gdb_pretty_print_disassembler.
15348 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15349 (gdb_pretty_print_disassembler): New class.
15350 * record-btrace.c (btrace_insn_history): Use
15351 gdb_pretty_print_disassembler.
15352
d7e74731
PA
153532017-02-02 Pedro Alves <palves@redhat.com>
15354
15355 * ada-lang.c (type_as_string): Use string_file.
15356 * ada-valprint.c (ada_print_floating): Use string_file.
15357 * ada-varobj.c (ada_varobj_scalar_image)
15358 (ada_varobj_get_value_image): Use string_file.
15359 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15360 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15361 * breakpoint.c (update_inserted_breakpoint_locations)
15362 (insert_breakpoint_locations, reattach_breakpoints)
15363 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15364 (print_it_watchpoint): Use string_file.
15365 (save_breakpoints): Use stdio_file.
15366 * c-exp.y (oper): Use string_file.
15367 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15368 tee_file.
15369 (pop_output_files): Use delete.
15370 (handle_redirections): Use stdio_file and tee_file.
15371 * cli/cli-setshow.c (do_show_command): Use string_file.
15372 * compile/compile-c-support.c (c_compute_program): Use
15373 string_file.
15374 * compile/compile-c-symbols.c (generate_vla_size): Take a
15375 'string_file &' instead of a 'ui_file *'.
15376 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15377 of a 'ui_file *'. Use string_file.
15378 (generate_c_for_variable_locations): Take a 'string_file &'
15379 instead of a 'ui_file *'.
15380 * compile/compile-internal.h (generate_c_for_for_one_variable):
15381 Take a 'string_file &' instead of a 'ui_file *'.
15382 * compile/compile-loc2c.c (push, pushf, unary, binary)
15383 (print_label, pushf_register_address, pushf_register)
15384 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15385 'ui_file *'. Adjust.
15386 * compile/compile.c (compile_to_object): Use string_file.
15387 * compile/compile.h (compile_dwarf_expr_to_c)
15388 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15389 'ui_file *'.
15390 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15391 (replace_typedefs_qualified_name): Use string_file and
15392 obstack_copy0.
15393 * disasm.c (gdb_pretty_print_insn): Use string_file.
15394 (gdb_disassembly): Adjust reference the null_stream global.
15395 (do_ui_file_delete): Delete.
15396 (gdb_insn_length): Use null_stream.
15397 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15398 * dwarf2loc.c (dwarf2_compile_property_to_c)
15399 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15400 'string_file &' instead of a 'ui_file *'.
15401 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15402 * dwarf2read.c (do_ui_file_peek_last): Delete.
15403 (dwarf2_compute_name): Use string_file.
15404 * event-top.c (gdb_setup_readline): Use stdio_file.
15405 * gdbarch.sh (verify_gdbarch): Use string_file.
15406 * gdbtypes.c (safe_parse_type): Use null_stream.
15407 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15408 string_file.
15409 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15410 'string_file *' instead of a 'ui_file *'.
15411 (gdbscm_arch_disassemble): Use string_file.
15412 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15413 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15414 inherits from ui_file.
15415 (ioscm_file_port_delete, ioscm_file_port_rewind)
15416 (ioscm_file_port_put): Delete.
15417 (ioscm_file_port_write): Rename to ...
15418 (ioscm_file_port::write): ... this. Remove file_port_magic
15419 checks.
15420 (ioscm_file_port_new): Delete.
15421 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15422 ui_file_up.
15423 * guile/scm-type.c (tyscm_type_name): Use string_file.
15424 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15425 Use string_file.
15426 * infcmd.c (print_return_value_1): Use string_file.
15427 * infrun.c (print_target_wait_results): Use string_file.
15428 * language.c (add_language): Use string_file.
15429 * location.c (explicit_to_string_internal): Use string_file.
15430 * main.c (captured_main_1): Use null_file.
15431 * maint.c (maintenance_print_architecture): Use stdio_file.
15432 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15433 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15434 event_channel>: Change type to mi_console_file pointer.
15435 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15436 (mi_console_file_delete): Delete.
15437 (struct mi_console_file): Delete.
15438 (mi_console_file_magic): Delete.
15439 (mi_console_file_new): Delete.
15440 (mi_console_file::mi_console_file): New.
15441 (mi_console_file_delete): Delete.
15442 (mi_console_file_fputs): Delete.
15443 (mi_console_file::write): New.
15444 (mi_console_raw_packet): Delete.
15445 (mi_console_file::flush): New.
15446 (mi_console_file_flush): Delete.
15447 (mi_console_set_raw): Rename to ...
15448 (mi_console_file::set_raw): ... this.
15449 * mi/mi-console.h (class mi_console_file): New class.
15450 (mi_console_file_new, mi_console_set_raw): Delete.
15451 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15452 (mi_set_logging): Use delete and tee_file. Adjust.
15453 * mi/mi-main.c (output_register): Use string_file.
15454 (mi_cmd_data_evaluate_expression): Use string_file.
15455 (mi_cmd_data_read_memory): Use string_file.
15456 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15457 * mi/mi-out.c (mi_ui_out::main_stream): New.
15458 (mi_ui_out::rewind): Use main_stream and
15459 string_file.
15460 (mi_ui_out::put): Use main_stream and string_file.
15461 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15462 Allocate a 'string_file' instead.
15463 (mi_out_new): Don't allocate a mem_fileopen stream here.
15464 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15465 (mi_ui_out::main_stream): Declare method.
15466 * printcmd.c (eval_command): Use string_file.
15467 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15468 * python/py-arch.c (archpy_disassemble): Use string_file.
15469 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15470 * python/py-frame.c (frapy_str): Use string_file.
15471 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15472 Use string_file.
15473 * python/py-type.c (typy_str): Use string_file.
15474 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15475 * python/py-value.c (valpy_str): Use string_file.
15476 * record-btrace.c (btrace_insn_history): Use string_file.
15477 * regcache.c (regcache_print): Use stdio_file.
15478 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15479 * remote.c (escape_buffer): Use string_file.
15480 * rust-lang.c (rust_get_disr_info): Use string_file.
15481 * serial.c (serial_open_ops_1): Use stdio_file.
15482 (do_serial_close): Use delete.
15483 * stack.c (print_frame_arg): Use string_file.
15484 (print_frame_args): Remove local mem_fileopen stream, not used.
15485 (print_frame): Use string_file.
15486 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15487 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15488 Take a 'string_file *' instead of a 'ui_file *'.
15489 * top.c (new_ui): Use stdio_file and stderr_file.
15490 (free_ui): Use delete.
15491 (execute_command_to_string): Use string_file.
15492 (quit_confirm): Use string_file.
15493 * tracepoint.c (collection_list::append_exp): Use string_file.
15494 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15495 * tui/tui-file.c: Don't include "ui-file.h".
15496 (enum streamtype, struct tui_stream): Delete.
15497 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15498 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15499 (tui_file::tui_file): New method.
15500 (tui_file_fputs): Delete.
15501 (tui_file_get_strbuf): Delete.
15502 (tui_file::puts): New method.
15503 (tui_file_adjust_strbuf): Delete.
15504 (tui_file_flush): Delete.
15505 (tui_file::flush): New method.
15506 * tui/tui-file.h: Tweak intro comment.
15507 Include ui-file.h.
15508 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15509 (tui_file_adjust_strbuf): Delete declarations.
15510 (class tui_file): New class.
15511 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15512 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15513 (tui_register_format): Use string_stream.
15514 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15515 (tui_get_function_from_frame): Use string_file.
15516 * typeprint.c (type_to_string): Use string_file.
15517 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15518 (null_stream): New global.
15519 (ui_file_delete): Delete.
15520 (ui_file::ui_file): New.
15521 (null_file_isatty): Delete.
15522 (ui_file::~ui_file): New.
15523 (null_file_rewind): Delete.
15524 (ui_file::printf): New.
15525 (null_file_put): Delete.
15526 (null_file_flush): Delete.
15527 (ui_file::putstr): New.
15528 (null_file_write): Delete.
15529 (ui_file::putstrn): New.
15530 (null_file_read): Delete.
15531 (ui_file::putc): New.
15532 (null_file_fputs): Delete.
15533 (null_file_write_async_safe): Delete.
15534 (ui_file::vprintf): New.
15535 (null_file_delete): Delete.
15536 (null_file::write): New.
15537 (null_file_fseek): Delete.
15538 (null_file::puts): New.
15539 (ui_file_data): Delete.
15540 (null_file::write_async_safe): New.
15541 (gdb_flush, ui_file_isatty): Adjust.
15542 (ui_file_put, ui_file_rewind): Delete.
15543 (ui_file_write): Adjust.
15544 (ui_file_write_for_put): Delete.
15545 (ui_file_write_async_safe, ui_file_read): Adjust.
15546 (ui_file_fseek): Delete.
15547 (fputs_unfiltered): Adjust.
15548 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15549 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15550 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15551 (set_ui_file_data): Delete.
15552 (string_file::~string_file, string_file::write)
15553 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15554 (do_ui_file_as_string, ui_file_as_string): Delete.
15555 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15556 (struct mem_file): Delete.
15557 (mem_file_new): Delete.
15558 (stdio_file::stdio_file): New.
15559 (mem_file_delete): Delete.
15560 (stdio_file::stdio_file): New.
15561 (mem_fileopen): Delete.
15562 (stdio_file::~stdio_file): New.
15563 (mem_file_rewind): Delete.
15564 (stdio_file::set_stream): New.
15565 (mem_file_put): Delete.
15566 (stdio_file::open): New.
15567 (mem_file_write): Delete.
15568 (stdio_file_magic, struct stdio_file): Delete.
15569 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15570 (stdio_file::flush): New.
15571 (stdio_file_read): Rename to ...
15572 (stdio_file::read): ... this. Adjust.
15573 (stdio_file_write): Rename to ...
15574 (stdio_file::write): ... this. Adjust.
15575 (stdio_file_write_async_safe): Rename to ...
15576 (stdio_file::write_async_safe) ... this. Adjust.
15577 (stdio_file_fputs): Rename to ...
15578 (stdio_file::puts) ... this. Adjust.
15579 (stdio_file_isatty): Delete.
15580 (stdio_file_fseek): Delete.
15581 (stdio_file::isatty): New.
15582 (stderr_file_write): Rename to ...
15583 (stderr_file::write) ... this. Adjust.
15584 (stderr_file_fputs): Rename to ...
15585 (stderr_file::puts) ... this. Adjust.
15586 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15587 (stderr_file::stderr_file): New.
15588 (tee_file_magic): Delete.
15589 (struct tee_file): Delete.
15590 (tee_file::tee_file): New.
15591 (tee_file_new): Delete.
15592 (tee_file::~tee_file): New.
15593 (tee_file_delete): Delete.
15594 (tee_file_flush): Rename to ...
15595 (tee_file::flush): ... this. Adjust.
15596 (tee_file_write): Rename to ...
15597 (tee_file::write): ... this. Adjust.
15598 (tee_file::write_async_safe): New.
15599 (tee_file_fputs): Rename to ...
15600 (tee_file::puts): ... this. Adjust.
15601 (tee_file_isatty): Rename to ...
15602 (tee_file::isatty): ... this. Adjust.
15603 * ui-file.h (struct obstack, struct ui_file): Don't
15604 forward-declare.
15605 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15606 (ui_file_write_ftype)
15607 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15608 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15609 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15610 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15611 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15612 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15613 (set_ui_file_fseek): Delete.
15614 (ui_file_data, ui_file_delete, ui_file_rewind)
15615 (struct ui_file): New.
15616 (ui_file_up): New.
15617 (class null_file): New.
15618 (null_stream): Declare.
15619 (ui_file_write_for_put, ui_file_put): Delete.
15620 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15621 Delete.
15622 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15623 (gdb_fopen, tee_file_new): Delete.
15624 (struct string_file): New.
15625 (struct stdio_file): New.
15626 (stdio_file_up): New.
15627 (struct stderr_file): New.
15628 (class tee_file): New.
15629 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15630 of a 'ui_file *'. Adjust.
15631 * ui-out.h (class ui_out) <field_stream>: Likewise.
15632 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15633 (null_stream): Delete.
15634 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15635 Adjust.
15636 * utils.h (struct ui_file): Delete forward declaration..
15637 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15638 (error_stream): Take a 'string_file &' instead of a
15639 'ui_file *'.
15640 * varobj.c (varobj_value_get_print_value): Use string_file.
15641 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15642 * gdbarch.c: Regenerate.
15643
187808b0
PA
156442017-02-02 Pedro Alves <palves@redhat.com>
15645
15646 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15647 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15648 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15649 Adjust to call gdb_print_insn instead of
15650 gdb_disassembler::print_insn.
15651 (dump_insns, do_mixed_source_and_assembly_deprecated)
15652 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15653 'gdbarch' parameter. Remove gdb_disassembler parameter.
15654 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15655 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15656 declaration.
15657 (gdb_pretty_print_insn): Re-add declaration.
15658 * record-btrace.c (btrace_insn_history): Don't allocate a
15659 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15660
7a8eb317
SM
156612017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15662
15663 * disasm.h (gdb_disassembly): Remove file_string parameter.
15664 * disasm.c (gdb_disassembly): Likewise.
15665 * cli/cli-cmds.c (print_disassembly): Adapt.
15666 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15667 * stack.c (do_gdb_disassembly): Likewise.
15668
7346ef59
AA
156692017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15670
15671 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15672 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15673 targets. And if the implicit value is longer than needed, extract
15674 the first bytes instead of the "least significant" ones.
15675
cd4007e4
MM
156762017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15677
15678 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15679 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15680 (btrace_fetch): Assert can_access_registers_ptid.
15681 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15682 validate_registers_access.
15683
cf77c34e
MM
156842017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15685
15686 * gdbthread.h (can_access_registers_ptid): New.
15687 * thread.c (can_access_registers_ptid): New.
15688
be85ce7d
PA
156892017-02-01 Pedro Alves <palves@redhat.com>
15690
15691 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15692
29b0b251
PA
156932017-01-31 Pedro Alves <palves@redhat.com>
15694
15695 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15696 Fix typos.
15697
289b5b24
PA
156982017-01-31 Pedro Alves <palves@redhat.com>
15699
15700 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15701 not used.
15702
b47413b4
PA
157032017-01-31 Pedro Alves <palves@redhat.com>
15704
15705 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15706
60adb36c
PA
157072017-01-31 Pedro Alves <palves@redhat.com>
15708
15709 * common/scoped_restore.h
15710 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15711 change the value's parameter type to T2.
15712 (make_scoped_restore): Likewise.
15713
2735833d
WT
157142017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15715 Richard Henderson <rth@redhat.com>
15716
15717 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15718 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15719 GS_BASE for older kernels.
15720 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15721 GS_BASE for older kernels.
15722 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15723 and GS_BASE to the offset table.
15724 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15725 system register group.
15726 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15727 for older kernels.
15728 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15729 amd64 ABI.
15730 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15731 AMD64_GSBASE_REGNUM.
15732 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15733 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15734 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15735 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15736 i386/64bit-segments.xml in those rules.
15737 * features/i386/64bit-segments.xml: New file.
15738 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15739 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15740 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15741 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15742 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15743 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15744 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15745 * features/i386/amd64-avx-linux.c: Regenerated.
15746 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15747 * features/i386/amd64-avx-mpx.c: Regenerated.
15748 * features/i386/amd64-avx512-linux.c: Regenerated.
15749 * features/i386/amd64-linux.c: Regenerated.
15750 * features/i386/amd64-mpx-linux.c: Regenerated.
15751 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15752 * features/i386/i386-avx-mpx.c: Regenerated.
15753 * features/i386/x32-avx-linux.c: Regenerated.
15754 * features/i386/x32-avx512-linux.c: Regenerated.
15755 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15756 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15757 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15758 * regformats/i386/amd64-linux.dat: Regenerated.
15759 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15760 * regformats/i386/x32-avx-linux.dat: Regenerated.
15761 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15762 * regformats/i386/x32-linux.dat: Regenerated.
15763
8884e97e
WT
157642017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15765
15766 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15767 Set to AMD64_NUM_REGS.
15768
7005d26a
WT
157692017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15770
15771 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15772 that checks validity of a register number.
15773
4bd2e1b2
KC
157742017-01-27 Kees Cook <keescook@google.com>
15775
15776 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15777 fetch_fpregs if target has fpa registers.
15778 (arm_linux_store_inferior_registers): Call store_fpregs if target
15779 has fpa registers.
15780
7cf1de6c
AA
157812017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15782
15783 * cris-tdep.c (cris_gdbarch_init): Remove check for
15784 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15785
874a1c8c
AT
157862017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15787
15788 * corelow.c (get_core_register_section): Check for regset
15789 existence before checking for REGSET_VARIABLE_SIZE.
15790
d8b49cf0
YQ
157912017-01-26 Yao Qi <yao.qi@linaro.org>
15792 Pedro Alves <palves@redhat.com>
15793
15794 PR gdb/20939
15795 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15796 call memory_error, save memaddr instead.
15797 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15798 negative, cal memory_error.
15799 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15800
658ca58c
YQ
158012017-01-26 Yao Qi <yao.qi@linaro.org>
15802
15803 * disasm-selftests.c (memory_error_test): New function.
15804 (_initialize_disasm_selftests): Register memory_error_test.
15805
79843d45
YQ
158062017-01-26 Yao Qi <yao.qi@linaro.org>
15807
15808 * Makefile.in (SFILES): Add disasm-selftests.c and
15809 selftest-arch.c.
15810 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15811 * disasm-selftests.c: New file.
15812 * selftest-arch.c: New file.
15813 * selftest-arch.h: New file.
15814
8cafda32
YQ
158152017-01-26 Yao Qi <yao.qi@linaro.org>
15816
15817 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15818 to bfd_arch_mep. Don't return 0 if section is not
15819 found. Call print_insn_mep.
15820
e47ad6c0
YQ
158212017-01-26 Pedro Alves <palves@redhat.com>
15822 Yao Qi <yao.qi@linaro.org>
15823
15824 * arm-tdep.c: Include "disasm.h".
15825 (gdb_print_insn_arm): Update code to get gdbarch.
15826 * disasm.c (dis_asm_read_memory): Change it to
15827 gdb_disassembler::dis_asm_read_memory.
15828 (dis_asm_memory_error): Likewise.
15829 (dis_asm_print_address): Likewise.
15830 (gdb_pretty_print_insn): Change it to
15831 gdb_disassembler::pretty_print_insn.
15832 (dump_insns): Add one argument gdb_disassemlber. All
15833 callers updated.
15834 (do_mixed_source_and_assembly_deprecated): Likewise.
15835 (do_mixed_source_and_assembly): Likewise.
15836 (do_assembly_only): Likewise.
15837 (gdb_disassembler::gdb_disassembler): New.
15838 (gdb_disassembler::print_insn): New.
15839 * disasm.h (class gdb_disassembler): New.
15840 (gdb_pretty_print_insn): Remove declaration.
15841 (gdb_disassemble_info): Likewise.
15842 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15843 (gdbscm_disasm_read_memory_worker): Update.
15844 (gdbscm_disasm_read_memory): Update.
15845 (gdbscm_disasm_memory_error): Remove.
15846 (gdbscm_disasm_print_address): Remove.
15847 (gdbscm_disassembler::gdbscm_disassembler): New.
15848 (gdbscm_print_insn_from_port): Update.
15849 * mips-tdep.c: Include disasm.h.
15850 (gdb_print_insn_mips): Update code to get gdbarch.
15851 * record-btrace.c (btrace_insn_history): Update.
15852 * spu-tdep.c: Include disasm.h.
15853 (struct spu_dis_asm_data): Remove.
15854 (struct spu_dis_asm_info): New.
15855 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15856 SPU id.
15857 (gdb_print_insn_spu): Cast disassemble_info to
15858 spu_dis_asm_info.
15859
80d75874
YQ
158602017-01-26 Yao Qi <yao.qi@linaro.org>
15861
15862 * disasm.c (do_ui_file_delete): Delete.
15863 (gdb_insn_length): Move code creating stream to ...
15864 * utils.c (null_stream): ... here. New function.
15865 * utils.h (null_stream): Declare.
15866
60685cd0
SM
158672017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15868
15869 * python/py-inferior.c (find_thread_object): Return directly
15870 from the loop. Remove "found" variable.
15871
eb1cdb62
JB
158722017-01-21 Joel Brobecker <brobecker@adacore.com>
15873
15874 GDB 7.12.1 released.
15875
b1ce6568
SM
158762017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15877
15878 * python/py-function.c (fnpy_call): Reorder declarations to have
15879 the gdbpy_enter object declared first.
15880 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15881
6f8b0407
SM
158822017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15883
fec93fb1 15884 PR python/21068
6f8b0407
SM
15885 * python/python-internal.h (PyMem_RawMalloc): Define for
15886 Python < 3.4.
15887 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15888 PyMem_RawMalloc instead of PyMem_Malloc.
15889
78cbbba8
LM
158902017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15891 Luis Machado <lgustavo@codesourcery.com>
15892
15893 * NEWS (New commands): Mention flash-erase.
15894 (New MI commands): Mention target-flash-erase.
15895 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15896 command.
15897 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15898 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15899 * target.c (flash_erase_command): New function.
15900 (initialize_targets): Add new flash-erase command.
15901 * target.h (flash_erase_command): New declaration.
15902
2132fe85
JB
159032017-01-20 Joel Brobecker <brobecker@adacore.com>
15904
15905 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15906 HAVE_SYS_PROCFS_H is defined.
15907
d1dff226
AH
159082017-01-18 Alan Hayward <alan.hayward@arm.com>
15909
15910 * remote.c (struct cached_reg): Change data into a pointer.
15911 * (stop_reply_dtr): Free data pointers before deleting vector.
15912 (process_stop_reply): Likewise.
15913 (remote_parse_stop_reply): Allocate space for data
15914
9890e433
AH
159152017-01-18 Alan Hayward <alan.hayward@arm.com>
15916
15917 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15918 MAX_REGISTER_SIZE.
15919 (amd64_pseudo_register_read_value): Likewise.
15920 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15921 (store_register_using_P): Likewise.
15922 * regcache.c (regcache_xfer_part): Likewise.
15923
7a36499a
IR
159242017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15925
15926 Split real and pseudo registers.
15927 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15928 (sparc32_pseudo_regnum): New enum.
15929 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15930 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15931 (SPARC32_CP0_REGISTERS): New macro.
15932 (sparc32_pseudo_register_name): New function.
15933 (sparc32_register_name): Use sparc32_pseudo_register_name.
15934 (sparc32_pseudo_register_type): New function.
15935 (sparc32_register_type): Use sparc32_pseudo_register_type.
15936 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15937 pseudo register numbers.
15938 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15939 (SPARC64_CP0_REGISTERS): New macro.
15940 (sparc64_pseudo_register_name): New function.
15941 (sparc64_register_name): Use sparc64_pseudo_register_name.
15942 (sparc64_pseudo_register_type): New function.
15943 (sparc64_register_type): Use sparc64_pseudo_register_type.
15944 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15945 pseudo register numbers.
15946 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15947 sparc64_store_arguments): Handle pseudo register numbers.
15948
6f8976bf
YQ
159492017-01-13 Yao Qi <yao.qi@linaro.org>
15950
15951 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15952 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15953 output.
15954 (getpkt_or_notif_sane_1): Likewise.
15955
e4241ace
YQ
159562017-01-13 Yao Qi <yao.qi@linaro.org>
15957
15958 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15959 of CC. Pass "-x c++-header" instead of "-x c".
15960
3015c064
SM
159612017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15962
15963 * remote.c (remote_can_async_p): Update comment.
15964
fde1b17d
SM
159652017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15966
15967 * linux-nat.c (linux_nat_can_async_p): Update comment.
15968
ca1ca08b
SM
159692017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15970
15971 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15972
4ad2da73
SM
159732017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15974
15975 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15976
c8b23b3f
TT
159772017-01-10 Tom Tromey <tom@tromey.com>
15978
15979 * python/py-type.c (typy_legacy_template_argument): Update.
15980 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15981 ~demangle_parse_info): Declare new members.
15982 (cp_demangled_name_to_comp): Return unique_ptr.
15983 (cp_demangled_name_parse_free)
15984 (make_cleanup_cp_demangled_name_parse_free)
15985 (cp_new_demangle_parse_info): Remove.
15986 * cp-support.c (do_demangled_name_parse_free_cleanup)
15987 (make_cleanup_cp_demangled_name_parse_free): Remove.
15988 (inspect_type, cp_canonicalize_string_full)
15989 (cp_canonicalize_string): Update.
15990 (mangled_name_to_comp): Change return type.
15991 (cp_class_name_from_physname, method_name_from_physname)
15992 (cp_func_name, cp_remove_params): Update.
15993 * cp-name-parser.y (demangle_parse_info): New constructor, from
15994 cp_new_demangle_parse_info.
15995 (~demangle_parse_info): New destructor, from
15996 cp_demangled_name_parse_free.
15997 (cp_merge_demangle_parse_infos): Update.
15998 (cp_demangled_name_to_comp): Change return type.
15999
1ac32117
TT
160002017-01-10 Tom Tromey <tom@tromey.com>
16001
16002 * top.c (prevent_dont_repeat): Change return type.
16003 * python/python.c (execute_gdb_command): Use std::string.
16004 Update.
16005 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16006 * command.h (prevent_dont_repeat): Change return type.
16007 * breakpoint.c (bpstat_do_actions_1): Update.
16008
0cf08227
TT
160092017-01-10 Tom Tromey <tom@tromey.com>
16010
16011 * value.h (scoped_value_mark::~scoped_value_mark): Call
16012 free_to_mark.
16013 (scoped_value_mark::free_to_mark): New method.
16014 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16015 scoped_value_mark.
16016
eb115069
TT
160172017-01-10 Tom Tromey <tom@tromey.com>
16018
16019 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16020 (valpy_reference_value, valpy_const_value, valpy_get_address)
16021 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16022 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16023 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16024 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16025 scoped_value_mark.
16026 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16027 * value.h (scoped_value_mark): New class.
16028
906768f9
TT
160292017-01-10 Tom Tromey <tom@tromey.com>
16030
16031 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16032 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16033 * psymtab.c (discard_psymtabs_upto): Remove.
16034 (make_cleanup_discard_psymtabs): Remove.
16035 (struct psymtab_state): Remove.
16036
bef155c3
TT
160372017-01-10 Tom Tromey <tom@tromey.com>
16038
16039 * record-full.c (record_full_save_cleanups): Remove.
16040 (record_full_save): Use gdb::unlinker.
16041 * gcore.c (do_bfd_delete_cleanup): Remove.
16042 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16043 cleanups.
16044 * dwarf2read.c (unlink_if_set): Remove.
16045 (write_psymtabs_to_index): Use gdb::unlinker.
16046 * common/gdb_unlinker.h: New file.
16047
192b62ce
TT
160482017-01-10 Tom Tromey <tom@tromey.com>
16049
16050 * windows-tdep.c (windows_xfer_shared_library): Update.
16051 * windows-nat.c (windows_make_so): Update.
16052 * utils.h (make_cleanup_bfd_unref): Remove.
16053 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16054 * symfile.h (symfile_bfd_open)
16055 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16056 * symfile.c (read_symbols, symbol_file_add)
16057 (separate_debug_file_exists): Update.
16058 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16059 (generic_load, reread_symbols): Update.
16060 * symfile-mem.c (symbol_file_add_from_memory): Update.
16061 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16062 (spu_symbol_file_add_from_memory): Update.
16063 * solist.h (struct target_so_ops) <bfd_open>: Return
16064 gdb_bfd_ref_ptr.
16065 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16066 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16067 gdb_bfd_ref_ptr.
16068 (solib_map_sections, reload_shared_libraries_1): Update.
16069 * solib-svr4.c (enable_break): Update.
16070 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16071 * solib-frv.c (enable_break2): Update.
16072 * solib-dsbt.c (enable_break): Update.
16073 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16074 gdb_bfd_ref_ptr.
16075 (darwin_solib_get_all_image_info_addr_at_init): Update.
16076 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16077 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16078 * record-full.c (record_full_save): Update.
16079 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16080 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16081 * minidebug.c (find_separate_debug_file_in_section): Return
16082 gdb_bfd_ref_ptr.
16083 * machoread.c (macho_add_oso_symfile): Change abfd to
16084 gdb_bfd_ref_ptr.
16085 (macho_symfile_read_all_oso): Update.
16086 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16087 (macho_symfile_read): Update.
16088 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16089 (jit_bfd_try_read_symtab): Update.
16090 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16091 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16092 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16093 gdb_bfd_ref_ptr.
16094 (gdb_bfd_ref_policy): New struct.
16095 (gdb_bfd_ref_ptr): New typedef.
16096 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16097 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16098 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16099 gdb_bfd_ref_ptr.
16100 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16101 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16102 (gcore_command): Update.
16103 * exec.c (exec_file_attach): Update.
16104 * elfread.c (elf_symfile_read): Update.
16105 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16106 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16107 (open_and_init_dwo_file): Update.
16108 (open_dwp_file): Return gdb_bfd_ref_ptr.
16109 (open_and_init_dwp_file): Update.
16110 * corelow.c (core_open): Update.
16111 * compile/compile-object-load.c (compile_object_load): Update.
16112 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16113 * coffread.c (coff_symfile_read): Update.
16114 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16115 gdb_bfd_ref_ptr. Rename.
16116 (dump_bfd_file, restore_command): Update.
16117 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16118 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16119 (find_separate_debug_file_by_buildid): Update.
16120
50315b21
TT
161212017-01-10 Tom Tromey <tom@tromey.com>
16122
16123 * common/gdb_ref_ptr.h: New file.
16124 * python/py-ref.h (struct gdbpy_ref_policy): New.
16125 (gdbpy_ref): Now a typedef.
16126
fc4007c9
TT
161272017-01-10 Tom Tromey <tom@tromey.com>
16128
16129 * utils.h (make_cleanup_htab_delete): Don't declare.
16130 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16131 Remove.
16132 * linespec.c (decode_compound_collector): Add constructor,
16133 destructor.
16134 (lookup_prefix_sym): Remove cleanup.
16135 (symtab_collector): Add constructor, destructor.
16136 (collect_symtabs_from_filename): Remove cleanup.
16137 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16138 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16139 Use htab_up.
16140 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16141 * dwarf2read.c (dw2_expand_symtabs_matching)
16142 (dw2_map_symbol_filenames, dwarf_decode_macros)
16143 (write_psymtabs_to_index): Use htab_up.
16144 * dwarf2loc.c (func_verify_no_selftailcall)
16145 (call_site_find_chain_1, func_verify_no_selftailcall)
16146 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16147 std::vector, gdb::unique_xmalloc_ptr.
16148 (call_sitep): Remove typedef.
16149 (dwarf2_locexpr_baton_eval): Remove unused variable.
16150
8dbcee67
TT
161512017-01-10 Tom Tromey <tom@tromey.com>
16152
16153 * python/python-internal.h (make_cleanup_py_decref)
16154 (make_cleanup_py_xdecref): Don't declare.
16155 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16156 (py_xdecref, make_cleanup_py_xdecref): Remove.
16157
13df46cc
TT
161582017-01-10 Tom Tromey <tom@tromey.com>
16159
16160 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16161 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16162
06fc9bf7
TT
161632017-01-10 Tom Tromey <tom@tromey.com>
16164
16165 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16166
830a4934
TT
161672017-01-10 Tom Tromey <tom@tromey.com>
16168
16169 * python/py-utils.c (unicode_to_encoded_string)
16170 (python_string_to_target_string)
16171 (python_string_to_target_python_string)
16172 (python_string_to_host_string, gdbpy_obj_to_string)
16173 (get_addr_from_python): Use gdbpy_ref.
16174
4586d543
TT
161752017-01-10 Tom Tromey <tom@tromey.com>
16176
16177 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16178 gdbpy_ref.
16179
59876f8f
TT
161802017-01-10 Tom Tromey <tom@tromey.com>
16181
16182 * python/python.c (eval_python_command, gdbpy_decode_line)
16183 (gdbpy_run_events, gdbpy_start_type_printers)
16184 (gdbpy_apply_type_printers): Use gdbpy_ref.
16185
97d83487
TT
161862017-01-10 Tom Tromey <tom@tromey.com>
16187
16188 * python/py-param.c (get_doc_string, compute_enum_values): Use
16189 gdbpy_ref.
16190
9205649a
TT
161912017-01-10 Tom Tromey <tom@tromey.com>
16192
16193 * python/py-inferior.c (find_thread_object, build_inferior_list):
16194 Use gdbpy_ref.
16195
74c49d45
TT
161962017-01-10 Tom Tromey <tom@tromey.com>
16197
16198 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16199
16361ffb
TT
162002017-01-10 Tom Tromey <tom@tromey.com>
16201
16202 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16203 gdbpy_ref.
16204
905f2cca
TT
162052017-01-10 Tom Tromey <tom@tromey.com>
16206
16207 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16208 extra incref.
16209 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16210 Use gdbpy_ref.
16211
64081434
TT
162122017-01-10 Tom Tromey <tom@tromey.com>
16213
16214 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16215 gdbpy_ref.
16216
59e9e831
TT
162172017-01-10 Tom Tromey <tom@tromey.com>
16218
16219 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16220 decref results of PyArg_ParseTupleAndKeywords.
16221
9de10f6d
TT
162222017-01-10 Tom Tromey <tom@tromey.com>
16223
16224 * python/python.c (python_run_simple_file): Use
16225 unique_xmalloc_ptr, gdbpy_ref.
16226
2bd5759d
TT
162272017-01-10 Tom Tromey <tom@tromey.com>
16228
16229 * python/py-prettyprint.c (print_stack_unless_memory_error)
16230 (print_string_repr, print_children): Use gdbpy_ref.
16231 (dummy_python_frame): New class.
16232 (dummy_python_frame::dummy_python_frame): Rename from
16233 push_dummy_python_frame.
16234 (py_restore_tstate): Remove.
16235
3b4e0e01
TT
162362017-01-10 Tom Tromey <tom@tromey.com>
16237
16238 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16239
17a22718
TT
162402017-01-10 Tom Tromey <tom@tromey.com>
16241
16242 * python/python.c (ensure_python_env, restore_python_env):
16243 Remove.
16244 * python/python-internal.h (ensure_python_env): Don't declare.
16245 * varobj.h (varobj_ensure_python_env): Don't declare.
16246 * varobj.c (varobj_ensure_python_env): Remove.
16247
68cdc557
TT
162482017-01-10 Tom Tromey <tom@tromey.com>
16249
16250 * varobj.c (varobj_value_get_print_value): Use
16251 gdbpy_enter_varobj.
16252
1eba6383
TT
162532017-01-10 Tom Tromey <tom@tromey.com>
16254
16255 * python/py-prettyprint.c (print_string_repr, print_children):
16256 Update.
16257 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16258 of "encoding".
16259 * varobj.c (varobj_value_get_print_value): Update.
16260 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16261
bde7b3e3
TT
162622017-01-10 Tom Tromey <tom@tromey.com>
16263
16264 * varobj.c (varobj_get_display_hint)
16265 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16266 (varobj_set_visualizer, free_variable): Use
16267 gdbpy_enter_varobj.
16268
a7785f8c
TT
162692017-01-10 Tom Tromey <tom@tromey.com>
16270
16271 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16272 (do_finish_initialization): New function. Use gdbpy_ref.
16273 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16274 do_finish_initialization.
16275
2865bfce
TT
162762017-01-10 Tom Tromey <tom@tromey.com>
16277
16278 * python/py-param.c (get_set_value, get_show_value): Use
16279 gdbpy_enter, gdbpy_ref.
16280
0e9dcc75
TT
162812017-01-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16284
12a5cedd
TT
162852017-01-10 Tom Tromey <tom@tromey.com>
16286
16287 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16288
788f2586
TT
162892017-01-10 Tom Tromey <tom@tromey.com>
16290
16291 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16292 Use gdbpy_enter_varobj.
16293
6cd67bea
TT
162942017-01-10 Tom Tromey <tom@tromey.com>
16295
16296 * varobj.c (gdbpy_enter_varobj): New constructor.
16297 * python/python-internal.h (gdbpy_enter_varobj): New class.
16298 * python/py-varobj.c (py_varobj_get_iterator): Use
16299 gdbpy_enter_varobj.
16300
14b122bf
TT
163012017-01-10 Tom Tromey <tom@tromey.com>
16302
16303 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16304 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16305 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16306 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16307 unique_xmalloc_ptr.
16308 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16309
bf1ca3b9
TT
163102017-01-10 Tom Tromey <tom@tromey.com>
16311
16312 * python/py-xmethods.c (invoke_match_method): Use
16313 gdbpy_ref.
16314
572a5524
TT
163152017-01-10 Tom Tromey <tom@tromey.com>
16316
16317 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16318 gdbpy_enter, gdbpy_ref.
16319
396a78b6
TT
163202017-01-10 Tom Tromey <tom@tromey.com>
16321
16322 * python/python.c (python_interactive_command): Use gdbpy_enter.
16323
a88b13c7
TT
163242017-01-10 Tom Tromey <tom@tromey.com>
16325
16326 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16327 gdbpy_ref.
16328
e9f0c363
TT
163292017-01-10 Tom Tromey <tom@tromey.com>
16330
16331 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16332 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16333
6349f452
TT
163342017-01-10 Tom Tromey <tom@tromey.com>
16335
16336 * utils.h (htab_deleter): New struct.
16337 (htab_up): New typedef.
16338 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16339 gdbpy_enter, gdbpy_ref, htab_up.
16340
c0171de6
TT
163412017-01-10 Tom Tromey <tom@tromey.com>
16342
16343 * python/py-unwind.c (pending_frame_invalidate): Remove.
16344 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16345
f18e226f
TT
163462017-01-10 Tom Tromey <tom@tromey.com>
16347
16348 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16349 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16350
c57af3f1
TT
163512017-01-10 Tom Tromey <tom@tromey.com>
16352
16353 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16354
60e600ec
TT
163552017-01-10 Tom Tromey <tom@tromey.com>
16356
16357 * python/python.c (gdbpy_eval_from_control_command)
16358 (gdbpy_source_script, gdbpy_run_events)
16359 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16360 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16361 gdbpy_enter.
16362
bf7da5b0
TT
163632017-01-10 Tom Tromey <tom@tromey.com>
16364
16365 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16366
2d38bced
TT
163672017-01-10 Tom Tromey <tom@tromey.com>
16368
16369 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16370
07bc7329
TT
163712017-01-10 Tom Tromey <tom@tromey.com>
16372
16373 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16374 (python_on_inferior_call_pre, python_on_inferior_call_post)
16375 (python_on_memory_change, python_on_register_change)
16376 (python_inferior_exit, python_new_objfile, add_thread_object)
16377 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16378
6e7c365e
TT
163792017-01-10 Tom Tromey <tom@tromey.com>
16380
16381 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16382 (bpfinishpy_handle_exit): Use gdbpy_enter.
16383
6ba0cd40
TT
163842017-01-10 Tom Tromey <tom@tromey.com>
16385
16386 * python/py-cmd.c (cmdpy_destroyer)
16387 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16388 gdbpy_enter.
16389
de2dc875
TT
163902017-01-10 Tom Tromey <tom@tromey.com>
16391
16392 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16393 gdbpy_enter.
16394 (gdbpy_breakpoint_has_cond): Likewise.
16395
4ecee2c4
TT
163962017-01-10 Tom Tromey <tom@tromey.com>
16397
16398 * python/python.c (gdbpy_enter): New constructor.
16399 (~gdbpy_enter): New destructor.
16400 (restore_python_env, ensure_python_env): Rewrite.
16401 * python/python-internal.h (gdbpy_enter): New class.
16402
37fce74f
TT
164032017-01-10 Tom Tromey <tom@tromey.com>
16404
16405 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16406
53a0cca3
TT
164072017-01-10 Tom Tromey <tom@tromey.com>
16408
16409 * python/py-value.c (value_has_field, get_field_flag)
16410 (get_field_type, valpy_getitem, convert_value_from_python): Use
16411 gdbpy_ref.
16412
ff3724f5
TT
164132017-01-10 Tom Tromey <tom@tromey.com>
16414
16415 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16416 gdbpy_ref.
16417
0700aea5
TT
164182017-01-10 Tom Tromey <tom@tromey.com>
16419
16420 * python/py-prettyprint.c (search_pp_list)
16421 (find_pretty_printer_from_objfiles)
16422 (find_pretty_printer_from_progspace)
16423 (find_pretty_printer_from_gdb, find_pretty_printer)
16424 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16425 gdbpy_ref.
16426
1bb44c9f
TT
164272017-01-10 Tom Tromey <tom@tromey.com>
16428
16429 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16430
87ce03fd
TT
164312017-01-10 Tom Tromey <tom@tromey.com>
16432
16433 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16434 (ltpy_get_all_source_lines): Use gdbpy_ref.
16435
ee0a3fb8
TT
164362017-01-10 Tom Tromey <tom@tromey.com>
16437
16438 * python/py-framefilter.c (extract_sym, extract_value)
16439 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16440 gdbpy_ref.
16441
bf2a52fa
TT
164422017-01-10 Tom Tromey <tom@tromey.com>
16443
16444 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16445
f59fe7f8
TT
164462017-01-10 Tom Tromey <tom@tromey.com>
16447
16448 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16449
80bd970a
TT
164502017-01-10 Tom Tromey <tom@tromey.com>
16451
16452 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16453 gdbpy_ref.
16454
d1b3de2e
TT
164552017-01-10 Tom Tromey <tom@tromey.com>
16456
16457 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16458
3bb43384
TT
164592017-01-10 Tom Tromey <tom@tromey.com>
16460
16461 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16462 (typy_range): Use gdbpy_ref.
16463
abf5651e
TT
164642017-01-10 Tom Tromey <tom@tromey.com>
16465
16466 * python/py-threadevent.c (create_thread_event_object): Use
16467 gdbpy_ref.
16468 * python/py-stopevent.c (create_stop_event_object): Simplify.
16469 (emit_stop_event): Use gdbpy_ref.
16470 * python/py-signalevent.c (create_signal_event_object): Use
16471 gdbpy_ref.
16472 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16473 (emit_new_objfile_event, create_clear_objfiles_event_object)
16474 (emit_clear_objfiles_event): Use gdbpy_ref.
16475 * python/py-infevents.c (create_inferior_call_event_object)
16476 (create_register_changed_event_object)
16477 (create_memory_changed_event_object, emit_inferior_call_event)
16478 (emit_memory_changed_event, emit_register_changed_event): Use
16479 gdbpy_ref.
16480 * python/py-exitedevent.c (create_exited_event_object)
16481 (emit_exited_event): Use gdbpy_ref.
16482 * python/py-event.h (evpy_emit_event): Remove
16483 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16484 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16485 * python/py-continueevent.c (emit_continue_event): Use
16486 gdbpy_ref.
16487 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16488 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16489 gdbpy_ref.
16490 * python/py-bpevent.c (create_breakpoint_event_object): Use
16491 gdbpy_ref.
16492
a68ff33e
TT
164932017-01-10 Tom Tromey <tom@tromey.com>
16494
16495 * python/py-ref.h: New file.
16496
7becfd03
SM
164972017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16498
16499 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16500 void.
16501 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16502 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16503 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16504 * ui-out.c (ui_out::redirect): Likewise.
16505 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16506 * cli/cli-logging.c (set_logging_redirect): Update call site of
16507 ui_out::redirect.
16508 (handle_redirections): Likewise.
16509 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16510 * top.c (execute_command_to_string): Likewise.
16511 * utils.c (do_ui_out_redirect_pop): Likewise.
16512
df294654
SM
165132017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16514
16515 * stack.c (_initialize_stack): Update "frame" command help message.
16516
f5e6296e
IB
165172017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16518
16519 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16520
0e2d6fa6
YQ
165212017-01-06 Yao Qi <yao.qi@linaro.org>
16522
16523 * x86-linux-nat.h: Include gdb_proc_service.h.
16524
44d6d3f9
YQ
165252017-01-06 Yao Qi <yao.qi@linaro.org>
16526
16527 * ser-base.h: Include serial.h.
16528
656731fe
YQ
165292017-01-06 Yao Qi <yao.qi@linaro.org>
16530
16531 * ppc-linux-tdep.h: Include ppc-tdep.h.
16532
1ca8f924
YQ
165332017-01-06 Yao Qi <yao.qi@linaro.org>
16534
16535 * nat/amd64-linux-siginfo.h: Include signal.h.
16536
bc3008c4
YQ
165372017-01-06 Yao Qi <yao.qi@linaro.org>
16538
16539 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16540
66c80d03
YQ
165412017-01-06 Yao Qi <yao.qi@linaro.org>
16542
16543 * mi/mi-parse.h: Include mi-cmds.h.
16544
051d2dda
YQ
165452017-01-06 Yao Qi <yao.qi@linaro.org>
16546
16547 * inf-loop.c: Don't include "target.h".
16548 * inf-loop.h: Include it here.
16549
8018d34f
YQ
165502017-01-06 Yao Qi <yao.qi@linaro.org>
16551
16552 * dfp.h: Include "dboulest.h" and "expression.h".
16553
c0b8369c
YQ
165542017-01-06 Yao Qi <yao.qi@linaro.org>
16555
16556 * ax-gdb.h: Include "ax.h".
16557
ad5cba2a
YQ
165582017-01-06 Yao Qi <yao.qi@linaro.org>
16559
16560 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16561 with nat/gdb_ptrace.h.
16562
1c33cd7f
YQ
165632017-01-05 Yao Qi <yao.qi@linaro.org>
16564
16565 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16566 new line.
16567 (mips64_fbsd_sigframe_init): Likewise.
16568
c988ac1d
JB
165692017-01-04 John Baldwin <jhb@FreeBSD.org>
16570
16571 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16572 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16573
b268007c
JB
165742017-01-04 John Baldwin <jhb@FreeBSD.org>
16575
16576 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16577 * NEWS: Mention new FreeBSD/mips native configuration.
16578 * config/mips/fbsd.mh: New file.
16579 * configure.host: Add mips*-*-freebsd*.
16580 * mips-fbsd-nat.c: New file.
16581
387360da
JB
165822017-01-04 John Baldwin <jhb@FreeBSD.org>
16583
16584 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16585 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16586 * NEWS: Mention new FreeBSD/mips target.
16587 * configure.tgt: Add mips*-*-freebsd*.
16588 * mips-fbsd-tdep.c: New file.
16589 * mips-fbsd-tdep.h: New file.
16590
2aaaf250
YQ
165912017-01-04 Yao Qi <yao.qi@linaro.org>
16592
16593 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16594 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16595
61baf725
JB
165962017-01-01 Joel Brobecker <brobecker@adacore.com>
16597
6dbb839a 16598 Update copyright year range in all GDB files.
61baf725 16599
c113e7ff 166002017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16601
c113e7ff 16602 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16603
c113e7ff 16604For older changes see ChangeLog-2016.
c906108c
SS
16605\f
16606Local Variables:
16607mode: change-log
16608left-margin: 8
16609fill-column: 74
16610version-control: never
57da7796 16611coding: utf-8
c906108c 16612End:
This page took 2.840765 seconds and 4 git commands to generate.